/* ======================================================
   main_core.css - ENS-NDJ - VERSION AVEC RTL INTÉGRÉ
   ====================================================== */

/* 1. RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* 2. VARIABLES */
:root {
    --color-primary: #006633;
    --color-primary-dark: #004d26;
    --color-primary-light: #e6f2ec;
    --color-accent-yellow: #e6b400;
    --color-text: #1a1a1a;
    --color-text-secondary: #4d4d4d;
    --color-text-muted: #666666;
    --color-background: #f8f9fa;
    --color-background-white: #ffffff;
    --color-background-light: #f5f5f5;
    --color-border: #dee2e6;
    --logos_background: #c7f7d5;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --z-sticky: 1000;
    --z-modal: 1050;
    --sidebar-width: 250px;
    --header-height: 70px;
    --header-height-mobile: 56px;
    
      /* ─────────────────────────────────────────────
       VERSION FRANÇAISE (LTR) - Par défaut
       ───────────────────────────────────────────── */
    --actu-title-size: 1.25rem;
    --actu-content-size: 1.15rem;
    --actu-excerpt-size: 0.95rem;
    --actu-meta-size: 0.9rem;
    --actu-small-size: 0.85rem;
    
    /* Article détail */
    --article-title-size: clamp(1.5rem, 2.5vw, 2.2rem);
    --article-content-size: 1.2rem;
    --article-line-height: 1.8;

    [lang="ar"],
[dir="rtl"],
.rtl {
    --actu-title-size: 1.35rem;
    --actu-content-size: 1.25rem;
    --actu-excerpt-size: 1.05rem;
    --actu-meta-size: 1rem;
    --actu-small-size: 0.9rem;
    
    /* Article détail - Arabe légèrement plus grand */
    --article-title-size: clamp(1.6rem, 2.8vw, 2.4rem);
    --article-content-size: 1.5rem;
    --article-line-height: 1.9;
}

}

/* 3. DARK MODE */
@media (prefers-color-scheme: dark) {
    :root {
        --color-text: #e0e0e0;
        --color-text-secondary: #b0b0b0;
        --color-text-muted: #888;
        --color-background: #121212;
        --color-background-white: #1e1e1e;
        --color-background-light: #252525;
        --color-border: #333;
        --color-primary: #4a9;
        --color-primary-dark: #3a8;
        --color-primary-light: #1a3020;
        --logos_background: #1a2a1a;
    }
}

/* 4. BASE */
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: "Inter", -apple-system, sans-serif;
    color: var(--color-text);
    background: var(--color-background);
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
}

html[lang="ar"] body {
    font-family: "Amiri", "Noto Naskh Arabic", serif;
    font-size: 19px;
}

.container-right { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-lg); width: 100%; }
.breadcrumb { display: none !important; }

/* 5. LAYOUT */
.left-panel {
    grid-column: 1;
    grid-row: 1 / -1;
    position: fixed;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--color-background-white);
    border-inline-end: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    z-index: var(--z-sticky);
}

.right-main-content {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main.main-content { flex: 1; padding: var(--space-lg); }
.right-fixed-footer { margin-top: auto; }

/* 6. SIDEBAR */
.left-fixed-header {
    background: var(--logos_background);
    padding: var(--space-lg);
    text-align: center;
}
.left-fixed-header .identity-logo { max-width: 120px; height: auto; }
.main-sidebar-nav { flex: 1; overflow-y: auto; padding: var(--space-md); }
.sidebar-box { margin-bottom: var(--space-xl); }
.sidebar-box h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-xs);
    margin-bottom: var(--space-sm);
}
.sidebar-links { list-style: none; }
.sidebar-links a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text);
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s;
}
.sidebar-links a:hover { background: var(--color-primary); color: #fff; }
.left-fixed-footer { padding: var(--space-md); text-align: center; font-size: 0.75rem; color: var(--color-text-muted); border-top: 1px solid var(--color-border); }

/* 7. HEADER GLOBAL */
.right-fixed-header {
    position: sticky;
    top: 0;
    background: var(--color-background-white);
    z-index: var(--z-sticky);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s;
}
.right-fixed-header.header-scrolled { box-shadow: var(--shadow-md); }

/* Éléments qui disparaissent au scroll */
.right-fixed-header.header-scrolled .scroll-hide-element {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    transition: all 0.3s ease;
}
.scroll-hide-element { transition: all 0.3s ease; }

/* 8. HEADER DESKTOP */
.desktop-header-wrapper { display: block; }
.desktop-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: var(--space-md);
}
.nav-links-inline { display: flex; list-style: none; gap: var(--space-xs); }
.btn-nav-app {
    display: inline-block;
    padding: 8px 14px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary);
    background: var(--color-primary-light);
    border: 1px solid transparent;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-nav-app:hover, .btn-nav-app.active { background: var(--color-primary); color: #fff; }

.nav-separator-wrapper { display: flex; align-items: center; }
.nav-separator-img { height: 45px; opacity: 0.9; }

.right-actions-group { display: flex; align-items: center; gap: var(--space-md); }

/* Recherche Desktop */
.compact-search {
    display: flex;
    background: var(--color-background-light);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    overflow: hidden;
}
.compact-search input {
    border: none;
    background: transparent;
    padding: 8px 12px;
    width: 140px;
    outline: none;
    color: var(--color-text);
}
.compact-search button {
    background: var(--color-primary);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    cursor: pointer;
}
.compact-search button:hover { background: var(--color-primary-dark); }

/* Langue Desktop */
.btn-lang-toggle {
    padding: 8px 16px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-lang-toggle:hover { background: var(--color-primary-dark); }

/* Auth Desktop avec TEXTE */
.btn-auth-desktop {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.btn-login-desktop { background: var(--color-primary); color: #fff; }
.btn-login-desktop:hover { background: var(--color-primary-dark); color: #fff; }
.btn-logout-desktop { background: #dc3545; color: #fff; }
.btn-logout-desktop:hover { background: #b02a37; color: #fff; }

/* 9. HEADER MOBILE - CACHÉ PAR DÉFAUT */
.mobile-header-wrapper { display: none; }
.mobile-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height-mobile);
    padding: 0 var(--space-sm);
    gap: 6px;
}
.mobile-logo-img { height: 38px; border-radius: 4px; }
.mobile-home-btn, .mobile-search-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid var(--color-border);
    background: var(--color-background-white);
    color: var(--color-primary);
    cursor: pointer;
}
.mobile-home-btn { background: var(--color-primary); color: #fff; border: none; }
.mobile-lang-btn {
    padding: 8px 12px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 18px;
    font-weight: 700;
    cursor: pointer;
}
.mobile-menu-toggle {
    width: 36px;
    height: 36px;
    background: var(--color-background-light);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hamburger-icon { display: flex; flex-direction: column; gap: 4px; width: 18px; }
.hamburger-line { height: 2px; background: var(--color-primary); border-radius: 1px; transition: all 0.3s; }
.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) { opacity: 0; }
.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* Recherche Mobile */
.mobile-search-bar { display: none; padding: var(--space-sm); background: var(--color-background-light); }
.mobile-search-bar:not([hidden]) { display: block; }
.mobile-search-form { display: flex; gap: var(--space-xs); }
.mobile-search-input { flex: 1; padding: 10px; border: 1px solid var(--color-border); border-radius: 20px; }
.mobile-search-submit { width: 40px; background: var(--color-primary); color: #fff; border: none; border-radius: 50%; cursor: pointer; }
.mobile-search-close { width: 40px; background: var(--color-background-light); border: 1px solid var(--color-border); border-radius: 50%; cursor: pointer; }

/* 10. DRAPEAU */
.chad-flag-wrapper { padding: 2px 0; background: var(--color-background-white); }
.chad-flag-strip { display: flex; height: 5px; }
.strip-color { flex: 1; }
.strip-color.blue { background: #002664; }
.strip-color.gold { background: #FECB00; }
.strip-color.red { background: #C60C30; }

/* 11. MENU MOBILE */
.mobile-menu {
    position: fixed;
    top: var(--header-height-mobile);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-background-white);
    z-index: var(--z-modal);
    overflow-y: auto;
    padding: var(--space-md);
    transform: translateX(-100%);
    transition: transform 0.3s;
}
.mobile-menu:not([hidden]) { transform: translateX(0); }
.mobile-menu-section { margin-bottom: var(--space-lg); padding-bottom: var(--space-md); border-bottom: 1px solid var(--color-border); }
.mobile-section-title { font-size: 0.75rem; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: var(--space-md); display: flex; align-items: center; gap: var(--space-sm); }
.mobile-nav-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-sm); }
.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-md);
    background: var(--color-background-light);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
}
.mobile-nav-item:hover { background: var(--color-primary-light); transform: translateY(-2px); }
.mobile-nav-item.active { background: var(--color-primary); }
.mobile-nav-item.active .nav-item-icon, .mobile-nav-item.active .nav-item-label { color: #fff; }
.nav-item-icon { font-size: 1.3rem; color: var(--color-primary); margin-bottom: var(--space-xs); }
.nav-item-label { font-size: 0.7rem; color: var(--color-text); text-align: center; }
.mobile-app-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-sm); }
.mobile-app-item { display: flex; flex-direction: column; align-items: center; padding: var(--space-sm); text-decoration: none; }
.app-item-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.2rem; margin-bottom: 4px; }
.icon-calendar { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.icon-student { background: linear-gradient(135deg, #3498db, #2980b9); }
.icon-teacher { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.icon-library { background: linear-gradient(135deg, #e67e22, #d35400); }
.app-item-label { font-size: 0.65rem; color: var(--color-text-secondary); text-align: center; }
.mobile-social-links { display: flex; justify-content: center; gap: var(--space-md); }
.social-link { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; }
.social-link.facebook { background: #1877f2; }
.social-link.youtube { background: #ff0000; }
.social-link.twitter { background: #1da1f2; }

/* Auth dans menu mobile */
.mobile-auth-section { text-align: center; }
.mobile-menu-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    width: 100%;
    max-width: 280px;
    justify-content: center;
}
.mobile-menu-auth-btn.login { background: var(--color-primary); color: #fff; }
.mobile-menu-auth-btn.logout { background: #dc3545; color: #fff; }

/* 12. FOOTER */
.right-fixed-footer { background: #8B4049; color: #f0f0f0; padding: var(--space-md) 0; }
.sponsor-banderole { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-lg); max-width: 1200px; margin: 0 auto; padding: var(--space-md) var(--space-lg); }
.footer-info-text { flex: 1; min-width: 200px; }
.footer-info-text p { margin: 4px 0; font-size: 0.85rem; }
.footer-link { color: #fff; text-decoration: none; }
.footer-link:hover { text-decoration: underline; }
.social-icons-footer { display: flex; gap: var(--space-sm); margin-top: var(--space-sm); }
.social-icons-footer img { height: 28px; }
.sponsor-logos { display: flex; flex-wrap: wrap; gap: var(--space-md); align-items: center; }
.sponsor-logo { height: 45px; }

/* 13. ALERTES */
.alert { padding: var(--space-md); border-radius: 6px; margin-bottom: var(--space-md); }
.alert-success { background: #d4edda; color: #155724; }
.alert-danger { background: #f8d7da; color: #721c24; }
.alert-info { background: #d1ecf1; color: #0c5460; }
.alert-warning { background: #fff3cd; color: #856404; }


/* ══════════════════════════════════════════════════════════════════════
   AJOUT AUTH DROPDOWNS - À ajouter à la FIN de main_core.css
   ══════════════════════════════════════════════════════════════════════ */

/* Desktop - Wrapper auth */
.auth-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

/* Desktop - Bouton trigger */
.btn-auth-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    background: var(--color-background-white);
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-auth-trigger:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
}

.btn-auth-trigger.active {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
}

/* Avatar dans bouton */
.auth-avatar-img,
.auth-avatar-text {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
}

.auth-avatar-img {
    object-fit: cover;
}

.auth-avatar-text {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
}

.auth-user-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.btn-auth-trigger.active .auth-arrow {
    transform: rotate(180deg);
}

/* Desktop - Dropdown */
.auth-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 260px;
    background: var(--color-background-white);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
}

.auth-dropdown:not([hidden]) {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown header - connecté */
.auth-dropdown-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.auth-avatar-large,
.auth-avatar-large-text {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid var(--color-primary);
    flex-shrink: 0;
}

.auth-avatar-large {
    object-fit: cover;
}

.auth-avatar-large-text {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
}

.auth-user-details {
    flex: 1;
    min-width: 0;
}

.auth-user-details strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-user-details small {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.auth-badge.badge-etudiant { background: #17a2b8; color: white; }
.auth-badge.badge-enseignant { background: #28a745; color: white; }
.auth-badge.badge-administratif { background: #ffc107; color: #000; }
.auth-badge.badge-visiteur { background: #6c757d; color: white; }

/* Dropdown header - guest */
.auth-dropdown-guest-header {
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.auth-dropdown-guest-header i {
    font-size: 2.5rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.auth-dropdown-guest-header p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text);
}

/* Dropdown links */
.auth-dropdown-links {
    padding: var(--space-sm);
}

.auth-dropdown-links a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--color-text);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.auth-dropdown-links a:hover {
    background: var(--color-background-light);
}

.auth-dropdown-links a i {
    width: 18px;
    text-align: center;
}

.auth-primary-link {
    background: var(--color-primary) !important;
    color: white !important;
}

.auth-primary-link:hover {
    background: var(--color-primary-dark) !important;
}

/* Dropdown footer */
.auth-dropdown-footer {
    padding: var(--space-sm);
    border-top: 1px solid var(--color-border);
}

.auth-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 10px;
    width: 100%;
    border-radius: 6px;
    text-decoration: none;
    color: #dc3545;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.auth-logout-btn:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* ========== MOBILE AUTH ========== */

.mobile-auth-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-background-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-auth-btn:hover {
    background: var(--color-primary-light);
}

.mobile-auth-btn.active {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
}

.mobile-auth-avatar,
.mobile-auth-initial {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
}

.mobile-auth-avatar {
    object-fit: cover;
}

.mobile-auth-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
}

.mobile-auth-btn i {
    font-size: 1.3rem;
    color: var(--color-primary);
}

/* Mobile dropdown */
.mobile-auth-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-background-white);
    border-bottom: 3px solid var(--color-primary);
    box-shadow: var(--shadow-md);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
}

.mobile-auth-dropdown:not([hidden]) {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-auth-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
}

.mobile-auth-avatar-large,
.mobile-auth-initial-large {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid white;
    flex-shrink: 0;
}

.mobile-auth-avatar-large {
    object-fit: cover;
}

.mobile-auth-initial-large {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.3);
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
}

.mobile-auth-header strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 3px;
}

.mobile-auth-header small {
    display: block;
    font-size: 0.8rem;
    opacity: 0.9;
}

.mobile-auth-guest-header {
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    background: var(--color-background-light);
}

.mobile-auth-guest-header i {
    font-size: 2.5rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.mobile-auth-guest-header p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text);
}

.mobile-auth-links {
    padding: var(--space-sm);
}

.mobile-auth-links a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--color-text);
    font-size: 0.95rem;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.mobile-auth-links a:hover {
    background: var(--color-background-light);
}

.mobile-auth-links a i {
    width: 20px;
    text-align: center;
}

.mobile-auth-primary {
    background: var(--color-primary) !important;
    color: white !important;
}

.mobile-auth-primary:hover {
    background: var(--color-primary-dark) !important;
}

.mobile-auth-logout {
    color: #dc3545 !important;
}

.mobile-auth-logout:hover {
    background: rgba(220, 53, 69, 0.1) !important;
}

/* ========== RTL ========== */

[dir="rtl"] .auth-dropdown {
    right: auto;
    left: 0;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 991px) {
    .auth-dropdown-wrapper {
        display: none;
    }
}

@media (min-width: 992px) {
    .mobile-auth-btn,
    .mobile-auth-dropdown {
        display: none;
    }
}


/* ══════════════════════════════════════════════════════════════════════
   DROPDOWN NAVIGATION - À AJOUTER DANS main_core.css
   Menu déroulant au survol pour la navigation desktop et mobile
   ══════════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────────────
   DROPDOWN DESKTOP - Survol
   ────────────────────────────────────────────────────────────────────── */

.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-dropdown .dropdown-icon {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* Menu déroulant */
.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--color-background-white, #fff);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    z-index: 1000;
    list-style: none;
    margin: 0;
}

/* Afficher au survol */
.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Liens du dropdown */
.nav-dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--color-text, #333);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-dropdown-menu li a:hover {
    background: var(--color-primary-light, #e8f4fd);
    color: var(--color-primary, #2563eb);
}

.nav-dropdown-menu li a i {
    width: 20px;
    text-align: center;
    color: var(--color-primary, #2563eb);
    font-size: 0.95rem;
}

/* Séparateur */
.dropdown-divider {
    height: 1px;
    background: var(--color-border, #e5e7eb);
    margin: 8px 16px;
}

/* Flèche du dropdown (pseudo-element) */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 24px;
    width: 16px;
    height: 16px;
    background: var(--color-background-white, #fff);
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.05);
    z-index: -1;
}

/* ──────────────────────────────────────────────────────────────────────
   DROPDOWN MOBILE - Click
   ────────────────────────────────────────────────────────────────────── */

.mobile-nav-dropdown {
    display: contents;
}

.mobile-dropdown-trigger {
    position: relative;
}

.mobile-dropdown-arrow {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 0.6rem;
    color: var(--color-text-muted, #6b7280);
    transition: transform 0.2s ease;
}

.mobile-dropdown-trigger.active .mobile-dropdown-arrow {
    transform: rotate(180deg);
}

.mobile-dropdown-content {
    grid-column: 1 / -1;
    background: var(--color-background-light, #f8f9fa);
    border-radius: 10px;
    padding: 8px;
    margin-top: 8px;
    display: none;
}

.mobile-dropdown-content:not([hidden]) {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--color-text, #333);
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.mobile-dropdown-link:hover,
.mobile-dropdown-link:active {
    background: var(--color-primary-light, #e8f4fd);
}

.mobile-dropdown-link i {
    width: 20px;
    text-align: center;
    color: var(--color-primary, #2563eb);
}

/* ──────────────────────────────────────────────────────────────────────
   DARK MODE
   ────────────────────────────────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
    .nav-dropdown-menu {
        background: var(--color-background-dark, #1f2937);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    }
    
    .nav-dropdown-menu::before {
        background: var(--color-background-dark, #1f2937);
    }
    
    .nav-dropdown-menu li a {
        color: var(--color-text-light, #e5e7eb);
    }
    
    .nav-dropdown-menu li a:hover {
        background: rgba(59, 130, 246, 0.2);
    }
    
    .dropdown-divider {
        background: var(--color-border-dark, #374151);
    }
    
    .mobile-dropdown-content {
        background: var(--color-background-dark, #1f2937);
    }
    
    .mobile-dropdown-link {
        color: var(--color-text-light, #e5e7eb);
    }
    
    .mobile-dropdown-link:hover {
        background: rgba(59, 130, 246, 0.2);
    }
}

/* ──────────────────────────────────────────────────────────────────────
   RTL SUPPORT
   ────────────────────────────────────────────────────────────────────── */

[dir="rtl"] .nav-dropdown-menu {
    left: auto;
    right: 0;
}

[dir="rtl"] .nav-dropdown-menu::before {
    left: auto;
    right: 24px;
}

[dir="rtl"] .nav-dropdown-menu li a,
[dir="rtl"] .mobile-dropdown-link {
    flex-direction: row-reverse;
}

[dir="rtl"] .mobile-dropdown-arrow {
    right: auto;
    left: 8px;
}


/* ══════════════════════════════════════════════════════════════════════
   SUPPORT RTL - PAGE PAIE
   Ajustements pour l'affichage en arabe (droite vers gauche)
   ══════════════════════════════════════════════════════════════════════ */

[dir="rtl"] .paie-header h1,
[dir="rtl"] .paie-header .subtitle,
[dir="rtl"] .paie-header .periode {
    text-align: center;
}

[dir="rtl"] .paie-header .periode i {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Statistiques RTL */
[dir="rtl"] .stat-card {
    text-align: center;
}

/* Actions RTL */
[dir="rtl"] .actions-section h2 {
    flex-direction: row-reverse;
}

[dir="rtl"] .action-card {
    text-align: center;
}

/* Tableau personnel RTL */
[dir="rtl"] .personnel-table th,
[dir="rtl"] .personnel-table td {
    text-align: right;
}

[dir="rtl"] .personnel-table .actions-cell {
    text-align: center;
}

[dir="rtl"] .personnel-table th:first-child {
    border-radius: 0 8px 0 0;
}

[dir="rtl"] .personnel-table th:last-child {
    border-radius: 8px 0 0 0;
}

/* Badge fonction RTL */
[dir="rtl"] .badge-fonction {
    direction: rtl;
}

/* Masse salariale RTL */
[dir="rtl"] .masse-salariale h3 {
    flex-direction: row-reverse;
}

[dir="rtl"] .masse-item {
    text-align: center;
}

[dir="rtl"] .personnel-section h2 {
    flex-direction: row-reverse;
}


/* ═══════════════════════════════════════════════════════════════════════════
   AUTHENTIFICATION - STYLES RTL (ARABE)
   À ajouter dans global_rtl.css
   ═══════════════════════════════════════════════════════════════════════════ */

[dir="rtl"] .auth-header,
[dir="rtl"] .auth-footer {
    text-align: center; /* Reste centré */
}

[dir="rtl"] .form-group label {
    flex-direction: row-reverse;
}

[dir="rtl"] .form-group label i {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .required {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .form-options {
    flex-direction: row-reverse;
}

[dir="rtl"] .form-check {
    flex-direction: row-reverse;
}

[dir="rtl"] .form-check label {
    margin-right: 0.5rem;
    margin-left: 0;
}

[dir="rtl"] .password-requirements {
    border-left: none;
    border-right: 3px solid var(--primary-color);
}

[dir="rtl"] .password-requirements ul {
    padding-left: 0;
    padding-right: 1.5rem;
}

[dir="rtl"] .error-message::before {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .social-btn {
    flex-direction: row-reverse;
}

[dir="rtl"] .back-link {
    flex-direction: row-reverse;
}

[dir="rtl"] .btn-block i {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .alert {
    text-align: right;
}

/* ═══════════════════════════════════════════════════════════════════════════
   AUTHENTIFICATION - STYLES GLOBAUX
   ═══════════════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────────────────
   CONTENEUR PRINCIPAL
   ────────────────────────────────────────────────────────────────────────── */

.auth-container {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.auth-card {
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    width: 100%;
    max-width: 520px;
    animation: fadeInUp 0.5s ease-out;
}

.auth-card-narrow {
    max-width: 420px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   EN-TÊTE
   ────────────────────────────────────────────────────────────────────────── */

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
}

.auth-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.success-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 1rem;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   AUTHENTIFICATION SOCIALE
   ────────────────────────────────────────────────────────────────────────── */

.social-auth-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-bg);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: var(--text-primary);
}

.social-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.google-btn:hover {
    border-color: #4285F4;
    background: rgba(66, 133, 244, 0.05);
}

.facebook-btn:hover {
    border-color: #1877F2;
    background: rgba(24, 119, 242, 0.05);
}

.apple-btn:hover {
    border-color: #000000;
    background: rgba(0, 0, 0, 0.05);
}

/* ──────────────────────────────────────────────────────────────────────────
   SÉPARATEUR
   ────────────────────────────────────────────────────────────────────────── */

.auth-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    position: relative;
    display: inline-block;
    padding: 0 1rem;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ──────────────────────────────────────────────────────────────────────────
   FORMULAIRE
   ────────────────────────────────────────────────────────────────────────── */

.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group label i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.required {
    color: var(--error-color);
    margin-left: auto;
}

.form-control,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--input-bg);
    color: var(--text-primary);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-col-6 {
    grid-column: span 1;
}

.error-message {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message::before {
    content: '⚠';
}

/* ──────────────────────────────────────────────────────────────────────────
   OPTIONS FORMULAIRE
   ────────────────────────────────────────────────────────────────────────── */

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-check label {
    font-weight: 400;
    margin-bottom: 0;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.forgot-password-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ──────────────────────────────────────────────────────────────────────────
   CARTES DE TYPE D'UTILISATEUR
   ────────────────────────────────────────────────────────────────────────── */

.user-type-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.type-card {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--card-bg);
}

.type-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.type-card.active {
    border-color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.05);
}

.type-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.type-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.type-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ──────────────────────────────────────────────────────────────────────────
   EXIGENCES MOT DE PASSE
   ────────────────────────────────────────────────────────────────────────── */

.password-requirements {
    background: rgba(var(--primary-rgb), 0.05);
    border-left: 3px solid var(--primary-color);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.password-requirements p {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.password-requirements ul {
    margin: 0;
    padding-left: 1.5rem;
}

.password-requirements li {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

/* ──────────────────────────────────────────────────────────────────────────
   BOX D'INFORMATION
   ────────────────────────────────────────────────────────────────────────── */

.reset-info-box {
    background: rgba(var(--success-rgb), 0.05);
    border: 1px solid var(--success-color);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.reset-info-box p {
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.reset-info-box p:last-child {
    margin-bottom: 0;
}

/* ──────────────────────────────────────────────────────────────────────────
   BOUTONS
   ────────────────────────────────────────────────────────────────────────── */

.btn-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* ──────────────────────────────────────────────────────────────────────────
   PIED DE PAGE
   ────────────────────────────────────────────────────────────────────────── */

.auth-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--primary-color);
}

/* ──────────────────────────────────────────────────────────────────────────
   MESSAGES
   ────────────────────────────────────────────────────────────────────────── */

.auth-messages {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(var(--success-rgb), 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-dark);
}

.alert-error,
.alert-danger {
    background: rgba(var(--error-rgb), 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-dark);
}

.alert-info {
    background: rgba(var(--info-rgb), 0.1);
    border: 1px solid var(--info-color);
    color: var(--info-dark);
}

.alert-warning {
    background: rgba(var(--warning-rgb), 0.1);
    border: 1px solid var(--warning-color);
    color: var(--warning-dark);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE - AUTHENTIFICATION
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.5rem;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .user-type-cards {
        grid-template-columns: 1fr;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .social-btn span {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .auth-logo {
        width: 60px;
        height: 60px;
    }

    .auth-header h1 {
        font-size: 1.25rem;
    }

    .success-icon {
        font-size: 3rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   AUTHENTIFICATION - STYLES GLOBAUX
   ═══════════════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────────────────
   CONTENEUR PRINCIPAL
   ────────────────────────────────────────────────────────────────────────── */

.auth-container {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.auth-card {
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    width: 100%;
    max-width: 520px;
    animation: fadeInUp 0.5s ease-out;
}

.auth-card-narrow {
    max-width: 420px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   EN-TÊTE
   ────────────────────────────────────────────────────────────────────────── */

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
}

.auth-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.success-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 1rem;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   AUTHENTIFICATION SOCIALE
   ────────────────────────────────────────────────────────────────────────── */

.social-auth-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BOUTONS SOCIAUX COMPACTS (EN LIGNE)
   ═══════════════════════════════════════════════════════════════════════════ */

.social-auth-inline {
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-btn-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border: 1.5px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-bg);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    min-width: 100px;
    flex: 1;
}

.social-btn-compact i {
    font-size: 1.5rem;
}

.social-btn-compact span {
    font-size: 0.85rem;
    white-space: nowrap;
}

.social-btn-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

/* Couleurs spécifiques par provider */
.social-btn-compact.google-btn {
    border-color: #4285F4;
    color: #4285F4;
}

.social-btn-compact.google-btn:hover {
    background: rgba(66, 133, 244, 0.05);
    color: #4285F4;
}

.social-btn-compact.facebook-btn {
    border-color: #1877F2;
    color: #1877F2;
}

.social-btn-compact.facebook-btn:hover {
    background: rgba(24, 119, 242, 0.05);
    color: #1877F2;
}

.social-btn-compact.apple-btn {
    border-color: #000000;
    color: var(--text-primary);
}

.social-btn-compact.apple-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BOUTONS SOCIAUX STANDARDS (PLEINE LARGEUR)
   ═══════════════════════════════════════════════════════════════════════════ */

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-bg);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: var(--text-primary);
}

.social-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.google-btn:hover {
    border-color: #4285F4;
    background: rgba(66, 133, 244, 0.05);
}

.facebook-btn:hover {
    border-color: #1877F2;
    background: rgba(24, 119, 242, 0.05);
}

.apple-btn:hover {
    border-color: #000000;
    background: rgba(0, 0, 0, 0.05);
}

/* ──────────────────────────────────────────────────────────────────────────
   SÉPARATEUR
   ────────────────────────────────────────────────────────────────────────── */

.auth-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    position: relative;
    display: inline-block;
    padding: 0 1rem;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ──────────────────────────────────────────────────────────────────────────
   FORMULAIRE
   ────────────────────────────────────────────────────────────────────────── */

.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group label i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.required {
    color: var(--error-color);
    margin-left: auto;
}

.form-control,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--input-bg);
    color: var(--text-primary);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-col-6 {
    grid-column: span 1;
}

.error-message {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message::before {
    content: '⚠';
}

/* ──────────────────────────────────────────────────────────────────────────
   OPTIONS FORMULAIRE
   ────────────────────────────────────────────────────────────────────────── */

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-check label {
    font-weight: 400;
    margin-bottom: 0;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.forgot-password-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ──────────────────────────────────────────────────────────────────────────
   CARTES DE TYPE D'UTILISATEUR
   ────────────────────────────────────────────────────────────────────────── */

.user-type-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.type-card {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--card-bg);
}

.type-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.type-card.active {
    border-color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.05);
}

.type-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.type-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.type-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ──────────────────────────────────────────────────────────────────────────
   EXIGENCES MOT DE PASSE
   ────────────────────────────────────────────────────────────────────────── */

.password-requirements {
    background: rgba(var(--primary-rgb), 0.05);
    border-left: 3px solid var(--primary-color);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.password-requirements p {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.password-requirements ul {
    margin: 0;
    padding-left: 1.5rem;
}

.password-requirements li {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

/* ──────────────────────────────────────────────────────────────────────────
   BOX D'INFORMATION
   ────────────────────────────────────────────────────────────────────────── */

.reset-info-box {
    background: rgba(var(--success-rgb), 0.05);
    border: 1px solid var(--success-color);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.reset-info-box p {
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.reset-info-box p:last-child {
    margin-bottom: 0;
}

/* ──────────────────────────────────────────────────────────────────────────
   BOUTONS
   ────────────────────────────────────────────────────────────────────────── */

.btn-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* ──────────────────────────────────────────────────────────────────────────
   PIED DE PAGE
   ────────────────────────────────────────────────────────────────────────── */

.auth-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--primary-color);
}

/* ──────────────────────────────────────────────────────────────────────────
   MESSAGES
   ────────────────────────────────────────────────────────────────────────── */

.auth-messages {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(var(--success-rgb), 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-dark);
}

.alert-error,
.alert-danger {
    background: rgba(var(--error-rgb), 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-dark);
}

.alert-info {
    background: rgba(var(--info-rgb), 0.1);
    border: 1px solid var(--info-color);
    color: var(--info-dark);
}

.alert-warning {
    background: rgba(var(--warning-rgb), 0.1);
    border: 1px solid var(--warning-color);
    color: var(--warning-dark);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE - AUTHENTIFICATION
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.5rem;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .user-type-cards {
        grid-template-columns: 1fr;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .social-btn span {
        font-size: 0.85rem;
    }

    /* Boutons sociaux compacts responsive */
    .social-auth-inline {
        flex-direction: column;
        gap: 0.75rem;
    }

    .social-btn-compact {
        flex-direction: row;
        justify-content: flex-start;
        min-width: auto;
        width: 100%;
    }

    .social-btn-compact i {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .auth-logo {
        width: 60px;
        height: 60px;
    }

    .auth-header h1 {
        font-size: 1.25rem;
    }

    .success-icon {
        font-size: 3rem;
    }

    .social-btn-compact span {
        font-size: 0.8rem;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   INSCRIPTION - LAYOUT 2 COLONNES
   À AJOUTER À LA FIN DE main_core.css
   ═══════════════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────────────────
   CARTE LARGE POUR 2 COLONNES
   ────────────────────────────────────────────────────────────────────────── */

.auth-card-wide {
    max-width: 1000px;
    width: 100%;
}

/* ──────────────────────────────────────────────────────────────────────────
   LAYOUT 2 COLONNES
   ────────────────────────────────────────────────────────────────────────── */

.auth-two-columns {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: start;
}

.auth-column {
    display: flex;
    flex-direction: column;
}

.auth-column-left {
    justify-content: flex-start;
    padding-top: 1rem;
}

.auth-column-right {
    justify-content: flex-start;
}

/* ──────────────────────────────────────────────────────────────────────────
   SÉPARATEUR VERTICAL "OU"
   ────────────────────────────────────────────────────────────────────────── */

.auth-divider-vertical {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-divider-vertical::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border-color);
    transform: translateX(-50%);
}

.auth-divider-vertical span {
    position: relative;
    display: inline-block;
    padding: 1rem 0.75rem;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* ──────────────────────────────────────────────────────────────────────────
   BOUTONS SOCIAUX VERTICAUX (COLONNE GAUCHE)
   ────────────────────────────────────────────────────────────────────────── */

.social-auth-vertical {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 280px;
}

.social-btn-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-bg);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    width: 100%;
}

.social-btn-full i {
    font-size: 1.5rem;
}

.social-btn-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    text-decoration: none;
}

/* Couleurs spécifiques */
.social-btn-full.google-btn {
    border-color: #4285F4;
    color: #4285F4;
}

.social-btn-full.google-btn:hover {
    background: rgba(66, 133, 244, 0.05);
    border-color: #4285F4;
    color: #4285F4;
}

.social-btn-full.facebook-btn {
    border-color: #1877F2;
    color: #1877F2;
}

.social-btn-full.facebook-btn:hover {
    background: rgba(24, 119, 242, 0.05);
    border-color: #1877F2;
    color: #1877F2;
}

.social-btn-full.apple-btn {
    border-color: #000000;
    color: var(--text-primary);
}

.social-btn-full.apple-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Mode sombre pour Apple */
@media (prefers-color-scheme: dark) {
    .social-btn-full.apple-btn {
        border-color: #FFFFFF;
    }
    
    .social-btn-full.apple-btn:hover {
        background: rgba(255, 255, 255, 0.05);
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   FORMULAIRE (COLONNE DROITE)
   ────────────────────────────────────────────────────────────────────────── */

.auth-column-right .auth-form {
    width: 100%;
}

.auth-column-right .form-group {
    margin-bottom: 1rem;
}

.auth-column-right .form-row {
    margin-bottom: 0;
}

.auth-column-right .password-requirements {
    margin-bottom: 1.5rem;
    margin-top: 1rem;
}

/* ──────────────────────────────────────────────────────────────────────────
   CARTES TYPE UTILISATEUR (3 COLONNES)
   ────────────────────────────────────────────────────────────────────────── */

.user-type-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.type-card {
    padding: 1rem 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--card-bg);
}

.type-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.type-card.active {
    border-color: var(--color-primary);
    background: rgba(var(--auth-primary-rgb), 0.05);
}

.type-icon {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.type-card.active .type-icon {
    color: var(--color-primary-dark);
}

.type-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.type-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE - LAYOUT 2 COLONNES
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 992px) {
    /* Passer en 1 colonne sur tablette et mobile */
    .auth-two-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Masquer le séparateur vertical */
    .auth-divider-vertical {
        display: none;
    }
    
    /* Ajouter un séparateur horizontal */
    .auth-column-left::after {
        content: '';
        display: block;
        width: 100%;
        height: 1px;
        background: var(--border-color);
        margin-top: 1.5rem;
        position: relative;
    }
    
    .auth-column-left::before {
        content: 'OU';
        display: block;
        text-align: center;
        width: 3rem;
        height: 3rem;
        margin: 1.5rem auto 0;
        background: var(--card-bg);
        border: 2px solid var(--border-color);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        color: var(--text-secondary);
        position: relative;
        z-index: 2;
        margin-bottom: -1.5rem;
    }
    
    /* Centrer les boutons sociaux */
    .social-auth-vertical {
        max-width: 100%;
        margin: 0 auto;
    }
    
    /* Ordre : Formulaire en premier, puis sociaux */
    .auth-column-right {
        order: 1;
    }
    
    .auth-column-left {
        order: 2;
        padding-top: 2rem;
    }
}

@media (max-width: 768px) {
    .auth-card-wide {
        padding: 1.5rem;
    }
    
    /* Cartes type utilisateur en colonne sur mobile */
    .user-type-cards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .type-card {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 0.875rem;
        gap: 1rem;
    }
    
    .type-icon {
        font-size: 1.75rem;
        margin-bottom: 0;
    }
    
    .type-content {
        flex: 1;
    }
    
    .type-label,
    .type-desc {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .auth-two-columns {
        gap: 1rem;
    }
    
    .social-btn-full {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .social-btn-full i {
        font-size: 1.25rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RTL - SUPPORT POUR LAYOUT 2 COLONNES
   ═══════════════════════════════════════════════════════════════════════════ */

[dir="rtl"] .auth-two-columns {
    direction: rtl;
}

[dir="rtl"] .social-btn-full {
    flex-direction: row-reverse;
}

[dir="rtl"] .type-card {
    text-align: right;
}

[dir="rtl"] .type-label,
[dir="rtl"] .type-desc {
    text-align: right;
}

@media (max-width: 768px) {
    [dir="rtl"] .type-card {
        flex-direction: row-reverse;
        text-align: right;
    }
}


/* ═══════════════════════════════════════════════════════════
   FORMULAIRES - Mode clair et sombre
   ═══════════════════════════════════════════════════════════ */

/* MODE CLAIR */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    /* Fond gris clair (nuancé du background blanc) */
    background-color: #f8f9fa !important;
    
    /* Texte noir visible */
    color: #1a1a1a !important;
    
    /* Bordure */
    border: 1.5px solid #dee2e6 !important;
}

/* Placeholder visible */
input::placeholder,
textarea::placeholder {
    color: #6c757d !important;
    opacity: 1;
}

/* Focus - Fond blanc */
.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    background-color: #ffffff !important;
    border-color: #006633 !important;
    box-shadow: 0 0 0 3px rgba(0, 102, 51, 0.1) !important;
}

/* MODE SOMBRE */
@media (prefers-color-scheme: dark) {
    .form-control,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    select {
        /* Fond gris foncé (nuancé du background #121212) */
        background-color: #2a2a2a !important;
        
        /* Texte blanc cassé VISIBLE ! */
        color: #e0e0e0 !important;
        
        /* Bordure gris foncé */
        border: 1.5px solid #444444 !important;
    }
    
    /* Placeholder visible en mode sombre */
    input::placeholder,
    textarea::placeholder {
        color: #888888 !important;
        opacity: 1;
    }
    
    /* Focus - Fond plus clair */
    .form-control:focus,
    input:focus,
    textarea:focus,
    select:focus {
        background-color: #333333 !important;
        border-color: #4a9 !important;
        box-shadow: 0 0 0 3px rgba(68, 170, 153, 0.2) !important;
    }
    
    /* Labels visibles */
    label,
    .form-label {
        color: #e0e0e0 !important;
    }
}

/* Autofill Chrome (éviter fond jaune) */
input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #f8f9fa inset !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

@media (prefers-color-scheme: dark) {
    input:-webkit-autofill {
        -webkit-box-shadow: 0 0 0 1000px #2a2a2a inset !important;
        -webkit-text-fill-color: #e0e0e0 !important;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   BOUTON D'INSCRIPTION - VERT OFFICIEL ENS-NDJ avec HOVER
   À AJOUTER dans main_core.css
   ═══════════════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────────────────
   BOUTON PRIMARY - VERT ENS-NDJ (comme "Passer en Français")
   ────────────────────────────────────────────────────────────────────────── */

.btn-primary {
    /* Couleur de fond - Vert officiel ENS-NDJ */
    background: linear-gradient(135deg, #006633 0%, #004d26 100%) !important;
    
    /* Texte blanc */
    color: #ffffff !important;
    
    /* Bordure verte */
    border: 2px solid #006633 !important;
    
    /* Coins arrondis */
    border-radius: 0.5rem;
    
    /* Espacement */
    padding: 0.875rem 1.5rem;
    
    /* Police */
    font-weight: 600;
    font-size: 1rem;
    
    /* Transition douce */
    transition: all 0.3s ease;
    
    /* Curseur */
    cursor: pointer;
    
    /* Ombre légère */
    box-shadow: 0 4px 12px rgba(0, 102, 51, 0.2);
    
    /* Centrer le texte */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* ──────────────────────────────────────────────────────────────────────────
   HOVER - Effet au survol (comme "Passer en Français")
   ────────────────────────────────────────────────────────────────────────── */

.btn-primary:hover {
    /* Vert plus foncé */
    background: linear-gradient(135deg, #004d26 0%, #003d1f 100%) !important;
    
    /* Bordure plus foncée */
    border-color: #004d26 !important;
    
    /* Texte reste blanc */
    color: #ffffff !important;
    
    /* Remonter légèrement */
    transform: translateY(-2px);
    
    /* Ombre plus prononcée */
    box-shadow: 0 6px 20px rgba(0, 102, 51, 0.4);
}

/* ──────────────────────────────────────────────────────────────────────────
   ACTIVE - Effet au clic
   ────────────────────────────────────────────────────────────────────────── */

.btn-primary:active {
    /* Vert très foncé */
    background: linear-gradient(135deg, #003d1f 0%, #002d17 100%) !important;
    
    /* Descendre au clic */
    transform: translateY(0);
    
    /* Ombre réduite */
    box-shadow: 0 2px 8px rgba(0, 102, 51, 0.3);
}

/* ──────────────────────────────────────────────────────────────────────────
   FOCUS - Accessibilité
   ────────────────────────────────────────────────────────────────────────── */

.btn-primary:focus {
    /* Contour visible pour accessibilité */
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 51, 0.3), 0 4px 12px rgba(0, 102, 51, 0.2);
}

/* ──────────────────────────────────────────────────────────────────────────
   DISABLED - État désactivé
   ────────────────────────────────────────────────────────────────────────── */

.btn-primary:disabled,
.btn-primary.disabled {
    /* Gris */
    background: #cccccc !important;
    border-color: #cccccc !important;
    color: #666666 !important;
    
    /* Pas de hover */
    cursor: not-allowed;
    opacity: 0.6;
    
    /* Pas de transformation */
    transform: none;
    box-shadow: none;
}

.btn-primary:disabled:hover,
.btn-primary.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* ──────────────────────────────────────────────────────────────────────────
   TAILLES - Large, Block
   ────────────────────────────────────────────────────────────────────────── */

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    display: flex;
}

/* ──────────────────────────────────────────────────────────────────────────
   ICÔNE DANS LE BOUTON
   ────────────────────────────────────────────────────────────────────────── */

.btn-primary i {
    font-size: 1.2em;
    margin-right: 0.5rem;
}

/* RTL - Icône à droite en arabe */
[dir="rtl"] .btn-primary i {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* ──────────────────────────────────────────────────────────────────────────
   ANIMATION AU CHARGEMENT
   ────────────────────────────────────────────────────────────────────────── */

.btn-primary {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   MODE SOMBRE - Adaptation
   ────────────────────────────────────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
    .btn-primary {
        /* Vert plus clair en mode sombre */
        background: linear-gradient(135deg, #4a9 0%, #3a8 100%) !important;
        border-color: #4a9 !important;
    }
    
    .btn-primary:hover {
        background: linear-gradient(135deg, #5ba 0%, #4a9 100%) !important;
        border-color: #5ba !important;
        box-shadow: 0 6px 20px rgba(68, 170, 153, 0.4);
    }
    
    .btn-primary:active {
        background: linear-gradient(135deg, #3a8 0%, #297 100%) !important;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   VARIANTES - BOUTONS SECONDAIRES (si besoin)
   ══════════════════════════════════════════════════════════════════════════ */

/* Bouton outline - Bordure verte, fond transparent */
.btn-outline {
    background: transparent !important;
    color: var(--color-primary) !important;
    border: 2px solid var(--color-primary) !important;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--color-primary) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 51, 0.3);
}

/* Bouton secondaire - Gris */
.btn-secondary {
    background: #6c757d !important;
    color: #ffffff !important;
    border: 2px solid #6c757d !important;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268 !important;
    border-color: #5a6268 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .btn-primary,
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .btn-primary i {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .btn-primary,
    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
}


/* Select type utilisateur - Style personnalisé */
#id_type_utilisateur {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1.5px solid var(--input-border-light, #dee2e6);
    border-radius: 0.5rem;
    background-color: var(--input-bg-light, #f8f9fa);
    color: var(--input-text-light, #1a1a1a);
    cursor: pointer;
    transition: all 0.3s ease;
}

#id_type_utilisateur:hover {
    border-color: var(--color-primary, #006633);
}

#id_type_utilisateur:focus {
    border-color: var(--color-primary, #006633);
    background-color: var(--input-focus-bg-light, #ffffff);
    box-shadow: 0 0 0 3px rgba(0, 102, 51, 0.1);
    outline: none;
}

/* Icône de flèche personnalisée */
#id_type_utilisateur {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23006633' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    #id_type_utilisateur {
        background-color: var(--input-bg-dark, #2a2a2a);
        color: var(--input-text-dark, #e0e0e0);
        border-color: var(--input-border-dark, #444444);
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%234a9' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }
    
    #id_type_utilisateur:focus {
        background-color: var(--input-focus-bg-dark, #333333);
        border-color: #4a9;
        box-shadow: 0 0 0 3px rgba(68, 170, 153, 0.2);
    }
}


/* ═══════════════════════════════════════════════════════════ */
/* BOUTON INSCRIPTION - VERSION GRADIENT MODERNE */
/* ═══════════════════════════════════════════════════════════ */

.mobile-auth-btn-gradient {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mobile-auth-btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.mobile-auth-btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    color: white;
    text-decoration: none;
}

.mobile-auth-btn-gradient:hover::before {
    left: 100%;
}

.mobile-auth-btn-gradient i {
    font-size: 1.1rem;
}

/* RTL */
[dir="rtl"] .mobile-auth-btn-gradient {
    flex-direction: row-reverse;
}



/* ═══════════════════════════════════════════════════════════ */
/* BOUTON INSCRIPTION - VERSION NÉON ANIMÉ */
/* ═══════════════════════════════════════════════════════════ */

.mobile-auth-btn-neon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mobile-auth-btn-neon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #667eea;
    transition: left 0.3s ease;
    z-index: -1;
}

.mobile-auth-btn-neon:hover {
    color: white;
    text-decoration: none;
    box-shadow: 
        0 0 20px rgba(102, 126, 234, 0.6),
        0 0 40px rgba(102, 126, 234, 0.4),
        inset 0 0 20px rgba(102, 126, 234, 0.2);
    transform: scale(1.05);
}

.mobile-auth-btn-neon:hover::before {
    left: 0;
}

.mobile-auth-btn-neon i {
    font-size: 1.1rem;
}

@keyframes neon-pulse {
    0%, 100% {
        box-shadow: 
            0 0 10px rgba(102, 126, 234, 0.4),
            0 0 20px rgba(102, 126, 234, 0.2);
    }
    50% {
        box-shadow: 
            0 0 20px rgba(102, 126, 234, 0.6),
            0 0 40px rgba(102, 126, 234, 0.4);
    }
}

.mobile-auth-btn-neon:hover {
    animation: neon-pulse 2s ease-in-out infinite;
}

/* RTL */
[dir="rtl"] .mobile-auth-btn-neon {
    flex-direction: row-reverse;
}


