/*
 * Arc_Prod File Role: XH Design System — Global utilities (tenant + admin shared).
 * File: public_html/assets/xhelpers/css/custom.css
 *
 * Rôle : utilitaires globaux, animations, corrections accessibilité,
 *         classes de présentation non-scopées body.arcprod-tenant.
 * Note : classes .text-display-* / .text-heading-* / .animate-* à migrer vers
 *        redesign/00-variables.css en Phase 3.
 */
/* === DESIGN SYSTEM XHelpers  === */
:root {
    /* === Palette de Couleurs Moderne === */
    /* Primary Palette - Blue/Green moderne */
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-200: #bae6fd;
    --primary-300: #7dd3fc;
    --primary-400: #38bdf8;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --primary-800: #075985;
    --primary-900: #0c4a6e;
    /* Secondary Palette - Emerald moderne */
    --secondary-50: #ecfdf5;
    --secondary-100: #d1fae5;
    --secondary-200: #a7f3d0;
    --secondary-300: #6ee7b7;
    --secondary-400: #34d399;
    --secondary-500: #10b981;
    --secondary-600: #059669;
    --secondary-700: #047857;
    --secondary-800: #065f46;
    --secondary-900: #064e3b;
    /* Neutral Palette - Sophistiquée */
    --neutral-50: #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #e5e5e5;
    --neutral-300: #d4d4d4;
    --neutral-400: #a3a3a3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;
    /* Couleurs Sémantiques */
    --success-50: #f0fdf4;
    --success-500: #22c55e;
    --success-600: #16a34a;
    --warning-50: #fffbeb;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    --error-50: #fef2f2;
    --error-500: #ef4444;
    --error-600: #dc2626;
    /* === Typographie Moderne === */
    --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-family-display: 'Plus Jakarta Sans', var(--font-family-primary);
    /* Display Sizes */
    --text-display-2xl: 4.5rem;    /* 72px */
    --text-display-xl: 3.75rem;    /* 60px */
    --text-display-lg: 3rem;       /* 48px */
    /* Heading Sizes */
    --text-4xl: 2.25rem;           /* 36px */
    --text-3xl: 1.875rem;          /* 30px */
    --text-2xl: 1.5rem;            /* 24px */
    --text-xl: 1.25rem;            /* 20px */
    --text-lg: 1.125rem;           /* 18px */
    /* Body Sizes */
    --text-base: 1rem;             /* 16px */
    --text-sm: 0.875rem;           /* 14px */
    --text-xs: 0.75rem;            /* 12px */
    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
    /* === Espacement Moderne === */
    --space-0: 0;
    --space-1: 0.25rem;    /* 4px */
    --space-2: 0.5rem;     /* 8px */
    --space-3: 0.75rem;    /* 12px */
    --space-4: 1rem;       /* 16px */
    --space-5: 1.25rem;    /* 20px */
    --space-6: 1.5rem;     /* 24px */
    --space-8: 2rem;       /* 32px */
    --space-10: 2.5rem;    /* 40px */
    --space-12: 3rem;      /* 48px */
    --space-16: 4rem;      /* 64px */
    --space-20: 5rem;      /* 80px */
    --space-24: 6rem;      /* 96px */
    --space-32: 8rem;      /* 128px */
    /* === Ombres Professionnelles === */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    /* Ombres Colorées */
    --shadow-primary: 0 10px 30px -5px rgba(14, 165, 233, 0.3);
    --shadow-secondary: 0 10px 30px -5px rgba(16, 185, 129, 0.3);
    --shadow-success: 0 10px 30px -5px rgba(34, 197, 94, 0.3);
    --shadow-warning: 0 10px 30px -5px rgba(245, 158, 11, 0.3);
    --shadow-error: 0 10px 30px -5px rgba(239, 68, 68, 0.3);
    /* === Border Radius Moderne === */
    --radius-none: 0;
    --radius-sm: 0.125rem;     /* 2px */
    --radius-base: 0.25rem;    /* 4px */
    --radius-md: 0.375rem;     /* 6px */
    --radius-lg: 0.5rem;       /* 8px */
    --radius-xl: 0.75rem;      /* 12px */
    --radius-2xl: 1rem;        /* 16px */
    --radius-3xl: 1.5rem;      /* 24px */
    --radius-full: 9999px;
    /* === Transitions Modernes === */
    --transition-none: none;
    --transition-all: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-default: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 100ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    /* === Variables principales consolidées === */
    /* Couleurs ULB (palette principale) */
    /* --ulb-blue est ecrase a l'execution par la couleur du tenant : ses derivees
       doivent la suivre, sinon un tenant non bleu voit ses etats de survol et ses
       degrades retomber en bleu marine. Valeurs alignees sur tokens.css. */
    --ulb-blue: #003f7f;
    --ulb-blue-light: color-mix(in srgb, var(--ulb-blue) 55%, #ffffff);
    --ulb-blue-hover: color-mix(in srgb, var(--ulb-blue) 15%, transparent);
    --ulb-blue-dark: color-mix(in srgb, var(--ulb-blue) 60%, #000000);
    /* Alias pour compatibilité (basés sur ULB) */
    --primary-green: var(--ulb-blue);
    --primary-green-light: var(--ulb-blue-hover);
    --primary-green-dark: var(--ulb-blue-dark);
    --primary-green-accent: var(--ulb-blue-light);
    --pastel-success: var(--ulb-blue);
    /* Textes standardisés */
    --text-primary: var(--neutral-900);
    --text-secondary: var(--neutral-600);
    /* --neutral-500 (#737373) plafonnait a 4,42:1 sur le fond de page, sous le
       seuil AA. Alignee sur --text-tertiary de tokens.css (meme role). */
    --text-muted: #6b6b6b;
    --dark-text: var(--neutral-900);
    --text-on-pastel: #ffffff;
    /* Backgrounds standardisés */
    --light-bg: var(--neutral-50);
    --border-color: var(--neutral-200);
    /* États unifiés */
    --success-light: var(--success-50);
    --warning-light: var(--warning-50);
    --danger-light: var(--error-50);
    --danger-color: var(--error-500);
    /* Layout constants */
    --border-radius: var(--radius-lg);
    --navbar-height: 68px;
    --sidebar-width-lg: 240px;
    --sidebar-width-collapsed-lg: 80px;
    --footer-height: 48px;
    /* Sidebar (basé sur les nouvelles variables) */
    --sidebar-bg: var(--neutral-100);
    --sidebar-bg-dark: var(--neutral-200);
    --sidebar-active: linear-gradient(135deg, var(--ulb-blue), var(--ulb-blue-light));
    --sidebar-hover: var(--neutral-50);
    --sidebar-text: var(--neutral-700);
    --sidebar-text-active: #ffffff;
    --sidebar-text-hover: var(--neutral-800);
    /* Navbar (consolidée) */
    /* Le fond effectif est posé par layout.css sur `body.arcprod-tenant`, au même
       niveau que celui de la sidebar : une variable declarée ici, sur :root, ne
       peut PAS lire --rd-sidebar-bg, qui n'existe qu'un cran plus bas. */
    --navbar-bg: linear-gradient(135deg, #ffffff 0%, var(--neutral-50) 100%);
    --navbar-border: var(--neutral-200);
    --navbar-shadow: var(--shadow-md);
    --navbar-shadow-scrolled: 0 4px 12px rgba(0,63,127,0.15);
    /* Ombres consolidées */
    --shadow-soft: var(--shadow-sm);
    --shadow-medium: var(--shadow-md);
    --shadow-large: var(--shadow-lg);
    --shadow-navbar: 0 4px 12px rgba(0,63,127,0.1);
    /* Design System Extensions */
    --lsh-stats-primary: var(--primary-green);
    --lsh-stats-info: #06b6d4;
    --lsh-stats-danger: #ef4444;
    --lsh-forum-primary: var(--primary-green);
    --lsh-forum-accent: #8b5cf6;
    --lsh-forum-thread-bg: #ffffff;
    --lsh-forum-post-bg: #f8fafc;
    --lsh-admin-primary: var(--primary-green);
    --lsh-transition-fast: 0.15s ease;
    --lsh-transition-normal: 0.3s cubic-bezier(0.4,0,0.2,1);
    --lsh-gradient-primary: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
    --lsh-gradient-forum: linear-gradient(135deg, var(--lsh-forum-primary), var(--lsh-forum-accent));
    --gradient-success: linear-gradient(135deg, var(--ulb-blue) 0%, var(--ulb-blue-light) 100%);
    --gradient-warning: linear-gradient(135deg, #FFF3CD 0%, #FFE5A1 100%);
    --shadow-success: 0 4px 15px rgba(0,63,127,0.3);
    --shadow-success-hover: 0 6px 20px rgba(0,63,127,0.4);
    --text-warning: #856404;
}
.dropdown-item.dropdown-item-modern.active {
    background-color: var(--ulb-blue-hover);
    color: var(--brand-text);
    font-weight: 500;
}
.dropdown-item.dropdown-item-modern:hover {
    background-color: #f8f9fa;
}
.dropdown-item.dropdown-item-modern .flag-icon {
    transition: transform 0.2s ease;
}
.dropdown-item.dropdown-item-modern:hover .flag-icon {
    transform: scale(1.1);
}
/* === Layout et base extraits vers base.css === */
/* === Bannière extraite vers base.css === */
/* === CARDS & BADGES === */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    background: var(--bg-primary);
    box-shadow: var(--shadow-soft);
}
.card:hover {
    box-shadow: var(--shadow-large);
    border-color: var(--primary-green-accent);
    transform: translateY(-2px);
}
/* === BADGES ADMIN ET ÉDITEUR MODERNES === */
.admin-badge, .editor-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
    vertical-align: middle;
}
/* Les quatre regles qui donnaient a ces badges un fond pastel fige (#e0e7ff /
   #ccfbf1), un texte assorti et une icone en ::before ont ete retirees le
   2026-08-02. Elles ne pouvaient jamais s'appliquer : custom.css n'est charge
   que par le layout tenant (_layout_header.php), lequel pose TOUJOURS la classe
   arcprod-tenant sur le body. Or la section ROLE BADGES plus bas dans ce meme
   fichier redefinit fond, texte, bordure, ombre et neutralise le ::before sous
   `body.arcprod-tenant :is(.admin-badge, .editor-badge, ...)` en !important, et
   core.css fait de meme par conteneur avec une paire clair/sombre dediee. Une
   regle non prefixee de ce fichier perd donc systematiquement. Verifie par
   empreinte sur /forumThread : 0 ecart sur 448 elements dans les deux themes,
   ::before inclus. Les couleurs affichees sur le badge admin (#3730a3 sur
   #e0e7ff en clair, #a5b4fc sur voile indigo en sombre) viennent de core.css. */
/* Version compacte pour les tableaux */
.admin-badge.forum-compact,
.editor-badge.forum-compact {
    font-size: 0.65rem;
    padding: 0.125rem 0.5rem;
    margin-left: 0.25rem;
}
/* Avatars mini pour les badges */
.admin-avatar-mini {
    background: linear-gradient(135deg, #ffc107 0%, #f39c12 100%);
    border: 2px solid rgba(255, 193, 7, 0.3);
}
.editeur-avatar-mini {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    border: 2px solid rgba(16, 185, 129, 0.3);
}
.user-avatar-mini {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    border: 2px solid rgba(107, 114, 128, 0.3);
}
/* === Footer et responsive extraits vers base.css === */
/* === ANIMATIONS === */
@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-15px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
/* Badge "Membres" (visibilite restreinte) en FAQ/tutoriels/guides : classes
   Bootstrap brutes bg-secondary-subtle/text-secondary/border-secondary-subtle
   (chacune deja !important cote Bootstrap, donc theme-invariantes) donnent
   108,117,125 sur 226,227,229 = 3,65:1, identique en clair et en sombre.
   Assombri au texte secondaire Bootstrap officiel (#495057) : 6,36:1. */
.badge.bg-secondary-subtle.text-secondary {
    color: var(--member-visibility-badge-text) !important;
}

/* === CLASSES UTILITAIRES MODERNES === */
/* Couleurs de texte */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }
.text-brand { color: var(--primary-600); }
.text-success { color: var(--primary-600); }
.text-on-primary { color: var(--text-on-primary); }

/* Utilitaires semantiques de Bootstrap : surcharge du runtime tenant.
 *
 * Les vues utilisent `text-warning`, `text-info`, `text-success`, `text-danger`
 * (21 occurrences) pour des icones et des libelles. Les valeurs de Bootstrap
 * sont pensees comme des FONDS : en couleur de texte ou d'icone sur une surface
 * claire elles echouent — mesures du 2026-08-01 sur /contentStats, /forumStats
 * et /tenantAudit : bi-exclamation-triangle 1,63:1, bi-link-45deg 1,52:1,
 * bi-graph-up 1,96:1, bi-heart 2,15:1, bi-plus-circle 2,12:1.
 *
 * Une seule regle couvre les 21 usages et tous les futurs, plutot que de
 * corriger chaque vue. Le `!important` est INDISPENSABLE : les utilitaires de
 * Bootstrap en portent un, sans quoi cette surcharge serait lettre morte
 * (c'est le cas des declarations sans !important juste au-dessus).
 * Les declinaisons -emphasis de Bootstrap 5.3 sont incluses : meme role. */
body.arcprod-tenant :is(.text-warning, .text-warning-emphasis) { color: var(--warning-text) !important; }
body.arcprod-tenant :is(.text-info, .text-info-emphasis) { color: var(--info-text) !important; }
body.arcprod-tenant :is(.text-success, .text-success-emphasis) { color: var(--success-text) !important; }
body.arcprod-tenant :is(.text-danger, .text-danger-emphasis) { color: var(--danger-text) !important; }

/* Code en ligne : Bootstrap impose son rose #d63384, soit 3,92 a 4,20:1 selon
 * la surface (mesures sur /tenantAudit). Voir --code-text dans tokens.css. */
body.arcprod-tenant code:not([class]) { color: var(--code-text); }

/* Arrière-plans */
.bg-primary { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-muted { background-color: var(--bg-muted); }
.bg-subtle { background-color: var(--bg-subtle); }
.bg-brand { background-color: var(--primary-600); color: var(--text-on-primary); }
.bg-brand-light { background-color: var(--primary-100); color: var(--primary-800); }
/* Bordures modernes */
.border { border: var(--border-width) solid var(--border-color); }
.border-light { border: var(--border-width) solid var(--border-color-light); }
.border-strong { border: var(--border-width) solid var(--border-color-strong); }
.border-brand { border: var(--border-width) solid var(--primary-600); }
/* Border radius */
.rounded-none { border-radius: var(--border-radius-none); }
.rounded-sm { border-radius: var(--border-radius-sm); }
.rounded { border-radius: var(--border-radius); }
.rounded-md { border-radius: var(--border-radius-md); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-xl { border-radius: var(--border-radius-xl); }
.rounded-2xl { border-radius: var(--border-radius-2xl); }
.rounded-full { border-radius: var(--border-radius-full); }
/* Ombres */
.shadow-none { box-shadow: none; }
.shadow-xs { box-shadow: var(--shadow-xs); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-2xl { box-shadow: var(--shadow-2xl); }
.shadow-primary { box-shadow: var(--shadow-primary); }
/* === ACCESSIBILITY === */
.menu-toggle:focus-visible,
.brand-container-text:focus-visible,
.ulb-partner:focus-visible,
.user-dropdown-toggle:focus-visible {
    outline: 2px solid var(--ulb-blue);
    outline-offset: 2px;
    border-radius: 12px;
}
.dropdown-item-modern:focus-visible {
    outline: 2px solid var(--ulb-blue);
    outline-offset: -2px;
}
/* === UTILITIES === */
/* Standardisation des textes mutés et sous-titres */
.text-muted-consistent {
    color: var(--text-muted);
    opacity: 0.75; /* Valeur standardisée pour tout le système */
    font-size: 0.9rem;
    line-height: 1.5;
}
.text-subtitle-consistent {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
    opacity: 0.9;
}
/* === CORRECTIONS === */
.user-dropdown .dropdown-menu.show,
.user-dropdown .dropdown-menu[data-bs-popper] {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}
.dropdown-user-name,
.dropdown-user-role,
.dropdown-item-modern {
    color: var(--text-primary) !important;
    text-shadow: none !important;
    -webkit-text-fill-color: var(--text-primary) !important;
}
.dropdown-user-role .badge {
    color: white !important;
    -webkit-text-fill-color: white !important;
}
/* === ACCESSIBILITÉ WCAG AAA === */
/* Amélioration des contrastes pour WCAG AAA */
:root {
    --text-muted-accessible: #6b7280; /* Contraste amélioré 7.1:1 */
    --text-secondary-accessible: #4b5563; /* Contraste amélioré 9.1:1 */
    --border-color-accessible: #d1d5db; /* Plus visible pour les bordures */
}
/* Mode haute visibilité */
@media (prefers-contrast: high) {
    :root {
        --text-muted: var(--text-muted-accessible);
        --text-secondary: var(--text-secondary-accessible);
        --border-color: var(--border-color-accessible);
        --shadow-soft: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
        --shadow-medium: 0 4px 8px -1px rgba(0, 0, 0, 0.3);
    }
    .text-muted-consistent {
        color: var(--text-muted-accessible);
        opacity: 1; /* Pas d'opacité en mode haute visibilité */
    }
    .text-subtitle-consistent {
        color: var(--text-secondary-accessible);
        opacity: 1;
    }
    /* Bordures plus visibles */
    .card, .lsh-card, .lsh-form-control {
        border-width: 2px;
        border-color: var(--border-color-accessible);
    }
    /* Focus states renforcés */
    .lsh-btn:focus, .lsh-form-control:focus {
        outline: 3px solid var(--ulb-blue);
        outline-offset: 2px;
        box-shadow: 0 0 0 5px rgba(0, 63, 127, 0.3);
    }
}
/* Support pour les préférences de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    .lsh-animate-fade-in,
    .lsh-animate-slide-up,
    .lsh-animate-scale-in,
    .lsh-animate-bounce {
        animation: none;
    }
    .lsh-card,
    .lsh-btn {
        transition: none;
    }
    /* Désactiver toutes les animations de transform */
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* Classes utilitaires pour l'accessibilité */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0.5rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: var(--ulb-blue);
    color: var(--text-on-primary, white);
    border-radius: var(--radius-md);
    z-index: 9999;
}
/* Amélioration des tailles tactiles (minimum 44px) */
.lsh-btn, .navbar-modern button, .sidebar-link {
    min-height: 44px;
    min-width: 44px;
}
/* Focus visible amélioré pour tous les éléments interactifs */
.lsh-btn:focus-visible,
.lsh-form-control:focus-visible,
.card:focus-visible,
.sidebar-link:focus-visible {
    outline: 2px solid var(--ulb-blue);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}
/* États de focus pour les liens */
a:focus-visible {
    outline: 2px solid var(--ulb-blue);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
    text-decoration: underline;
}
/* Mode d'impression accessible */
@media print {
    .text-muted-consistent {
        color: #000 !important;
        opacity: 0.8 !important;
    }
    .text-subtitle-consistent {
        color: #333 !important;
        opacity: 1 !important;
    }
    /* S'assurer que les liens sont visibles à l'impression */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}
/* === DARK MODE GLOBAL SUPPRIMÉ === */
/* Chaque module gère son propre thème pour une meilleure cohérence */

/* =====================================================
   BOOTSTRAP PRIMARY THEME BRIDGE
   Harmonise les .btn-primary/.btn-outline-primary avec ARC tenant color
   ===================================================== */

.btn-primary {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    color: var(--text-on-primary, #fff);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-green-dark);
    border-color: var(--primary-green-dark);
    color: var(--text-on-primary, #fff);
}

.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
    background-color: var(--primary-green-dark);
    border-color: var(--primary-green-dark);
    color: var(--text-on-primary, #fff);
}

.btn-outline-primary {
    color: var(--brand-text);
    border-color: var(--primary-green);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: var(--text-on-primary, #fff);
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

/* ================================================================ */
/* MODULES RUNTIME — Hero banner + filtres unifiés                  */
/* ================================================================ */

/* Gradient tenant-adaptatif pour tous les héros de modules */
.faq-page-content .faq-header,
.tutorials-page-content .tutorial-header-custom,
.videos-page-content .video-header-custom,
.glossary-page-content .glossary-header-custom,
.guides-page-content .guide-header-custom,
.resources-page-content .tutorial-header-custom,
.contact-page-content .tutorial-header-custom,
.xh-announcements-admin .xh-announcements-header {
    background: linear-gradient(135deg,
        var(--ulb-blue, #003f7f) 0%,
        color-mix(in srgb, var(--ulb-blue, #003f7f) 72%, black 28%) 55%,
        color-mix(in srgb, var(--ulb-blue, #003f7f) 52%, black 48%) 100%
    ) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.20),
                0 2px 8px rgba(0, 0, 0, 0.14) !important;
    border-radius: 16px !important;
}

/* Barre de recherche dans les héros modules */
.faq-page-content .faq-header .input-group .form-control,
.tutorials-page-content .tutorial-header-custom .form-control,
.videos-page-content .video-header-custom .form-control,
.glossary-page-content .glossary-header-custom .form-control,
.guides-page-content .guide-header-custom .form-control {
    border-radius: 999px !important;
    border: none !important;
    padding-left: 2.6rem !important;
    background: rgba(255, 255, 255, 0.97) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12) !important;
    font-size: 0.95rem;
}

/* Chips de filtres — style pill cohérent avec la home */
/* Classes réelles dans le DOM : nav-link.category-tab, nav-link.all-categories */
.faq-page-content .nav-link.category-tab,
.faq-page-content .nav-link.all-categories,
.tutorials-page-content .nav-link.category-tab,
.tutorials-page-content .nav-link.all-categories,
.videos-page-content .nav-link.category-tab,
.videos-page-content .nav-link.all-categories,
.glossary-page-content .nav-link.category-tab,
.glossary-page-content .nav-link.all-categories,
.guides-page-content .nav-link.category-tab,
.guides-page-content .nav-link.all-categories {
    border-radius: 999px !important;
    font-size: 0.82rem !important;
    padding: 0.35rem 0.85rem !important;
    font-weight: 500 !important;
    transition: all 0.18s ease !important;
    white-space: nowrap;
}

/* État actif des chips */
.faq-page-content .nav-link.category-tab.active,
.faq-page-content .nav-link.all-categories.active,
.tutorials-page-content .nav-link.category-tab.active,
.tutorials-page-content .nav-link.all-categories.active,
.videos-page-content .nav-link.category-tab.active,
.videos-page-content .nav-link.all-categories.active,
.glossary-page-content .nav-link.category-tab.active,
.glossary-page-content .nav-link.all-categories.active,
.guides-page-content .nav-link.category-tab.active,
.guides-page-content .nav-link.all-categories.active {
    background: var(--ulb-blue, #003f7f) !important;
    border-color: var(--ulb-blue, #003f7f) !important;
    color: var(--text-on-primary, #fff) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
}

/* ---------------------------------------------------------------- */
/* ANNONCES — Hero banner gradient (override blanc + top bar)        */
/* ---------------------------------------------------------------- */
.xh-announcements-admin .xh-announcements-header::before {
    display: none !important;
}
.xh-announcements-admin .xh-announcements-title {
    color: #fff !important;
}
.xh-announcements-admin .xh-announcements-header > p {
    color: rgba(255, 255, 255, 0.78) !important;
}

/* ---------------------------------------------------------------- */
/* FORUM — Hero banner gradient (override stats-header blanc/bordure)*/
/* ---------------------------------------------------------------- */
.forum-home-content .stats-header {
    background: linear-gradient(135deg,
        var(--ulb-blue, #003f7f) 0%,
        color-mix(in srgb, var(--ulb-blue, #003f7f) 72%, black 28%) 55%,
        color-mix(in srgb, var(--ulb-blue, #003f7f) 52%, black 48%) 100%
    ) !important;
    border: none !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.20),
                0 2px 8px rgba(0, 0, 0, 0.14) !important;
    border-radius: 16px !important;
}

/* Supprimer la barre bleue du haut (inutile sur fond gradient) */
.forum-home-content .stats-header::before {
    display: none !important;
}

/* Textes en blanc sur fond foncé */
.forum-home-content .stats-title {
    color: #fff !important;
}
.forum-home-content .stats-subtitle {
    color: rgba(255, 255, 255, 0.78) !important;
}

/* Bouton secondaire adapté au fond foncé */
.forum-home-content .stats-header .btn-stats.secondary {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
}
.forum-home-content .stats-header .btn-stats.secondary:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.55) !important;
}

/* ══════════════════════════════════════════════════════════════════════
   ROLE BADGES — (fusionné depuis role-badges.css 2026-03-18)
   Apple flat style global — badges admin/éditeur neutres
   ══════════════════════════════════════════════════════════════════════ */
body.arcprod-tenant :is(.admin-badge, .editor-badge, .role-badge, .role-badge.role-admin, .role-badge.role-editeur, .role-badge.role-editor) {
    background: var(--bg-tertiary, #f3f4f6) !important;
    color: var(--token-text-secondary, #737373) !important;
    border: 1px solid var(--token-border, #e5e7eb) !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: 0.03em !important;
    padding: 2px 6px !important;
    min-height: 0 !important;
    line-height: 1.4 !important;
    text-transform: none !important;
    box-shadow: none !important;
    gap: 0 !important;
    white-space: nowrap !important;
}
body.arcprod-tenant :is(.admin-badge, .editor-badge, .role-badge, .role-badge.role-admin, .role-badge.role-editeur, .role-badge.role-editor) i {
    display: none !important;
}
body.arcprod-tenant :is(.admin-badge, .editor-badge, .role-badge, .role-badge.role-admin, .role-badge.role-editeur, .role-badge.role-editor)::before {
    content: none !important;
    display: none !important;
}
body.arcprod-tenant .forum-home-content :is(.admin-badge, .editor-badge, .admin-badge.forum-compact, .editor-badge.forum-compact),
body.arcprod-tenant .forum-thread-page-content :is(.admin-badge, .editor-badge) {
    background: var(--bg-tertiary, #f3f4f6) !important;
    color: var(--token-text-secondary, #737373) !important;
    border: 1px solid var(--token-border, #e5e7eb) !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    padding: 2px 6px !important;
    min-height: 0 !important;
    letter-spacing: 0.03em !important;
    text-transform: none !important;
    box-shadow: none !important;
}
body.arcprod-tenant .forum-home-content :is(.admin-badge i, .editor-badge i, .admin-badge.forum-compact i, .editor-badge.forum-compact i),
body.arcprod-tenant .forum-thread-page-content :is(.admin-badge i, .editor-badge i) {
    display: none !important;
}
body.arcprod-tenant .forum-home-content :is(.admin-badge, .editor-badge, .admin-badge.forum-compact, .editor-badge.forum-compact)::before,
body.arcprod-tenant .forum-thread-page-content :is(.admin-badge, .editor-badge)::before {
    content: none !important;
    display: none !important;
}
