/* =====================================================
   LA TANOISE — DESIGN SYSTEM v3.0
   Palette officielle extraite du logo :
   Bleu tortue #1B75BC · Ruban bourgogne #641E27
   ===================================================== */

:root {
    /* Primaire — bleu du logo */
    --primary: #1B75BC;
    --primary-dark: #155D96;
    --primary-light: #E8F1F8;
    --primary-050: #F0F7FC;

    /* Secondaire — bourgogne du ruban */
    --secondary: #641E27;
    --secondary-dark: #4A161D;
    --secondary-light: #FDF2F4;
    --secondary-050: #FBF4F5;

    /* Neutres */
    --dark: #0F172A;
    --text: #334155;
    --text-soft: #475569;
    --muted: #64748B;
    --border: #E2E8F0;
    --border-strong: #CBD5E1;
    --light: #F7FAFC;
    --surface: #FFFFFF;

    /* Sémantiques */
    --danger: #DC2626; --danger-bg: #FEF2F2; --danger-border: #FECACA;
    --success: #16A34A; --success-bg: #F0FDF4; --success-border: #BBF7D0;
    --warning: #D97706; --warning-bg: #FFFBEB; --warning-border: #FDE68A;
    --info: #0284C7; --info-bg: #F0F9FF; --info-border: #BAE6FD;

    /* Rayons & ombres */
    --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px; --radius-xl: 20px; --radius-full: 999px;
    --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.06), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-focus: 0 0 0 3px rgba(27, 117, 188, 0.2);

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
}

/* ----- RESET & BASE ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--light);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; width: 100%; }

h1, h2, h3, h4, h5, h6 { color: var(--dark); font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

a { color: var(--primary); text-decoration: none; transition: color var(--duration-fast) var(--ease-in-out); }
a:hover { color: var(--primary-dark); }

::selection { background: rgba(27, 117, 188, 0.18); color: var(--dark); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 2px; }

/* ----- ANIMATIONS ----- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
.reveal.active { opacity: 1; transform: translateY(0); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* =====================================================
   HEADER & NAVIGATION — SOUS-MENUS FIABLES
   ✅ Zone hover étendue + JS avec délai de fermeture
   ===================================================== */
.topbar {
    background: var(--primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--secondary);
    box-shadow: var(--shadow-md);
    min-height: 116px;
}

.topbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 24px;
    min-height: 116px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 24px;
}

/* ----- Marque : logo grand et lisible ----- */
.brand {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    text-decoration: none;
    color: var(--surface);
    z-index: 5;
}
.brand:hover { color: var(--surface); opacity: 0.92; }

.brand-logo {
    width: 104px;
    height: 78px;
    background: var(--surface);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22), 0 0 0 2px rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
    transition: transform var(--duration-normal) var(--ease-out);
}
.brand:hover .brand-logo { transform: scale(1.03); }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }

.brand-text { line-height: 1.2; }
.brand-text strong {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--surface);
    display: block;
}

/* ----- Navigation centrée ----- */
#mainNav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}
#mainNav > a {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) var(--ease-in-out);
    white-space: nowrap;
}
#mainNav > a:hover { color: var(--surface); background: rgba(255, 255, 255, 0.14); }
#mainNav > a.active { color: var(--surface); background: rgba(255, 255, 255, 0.2); font-weight: 600; }
#mainNav > a.btn-light { background: var(--surface); color: var(--primary); border: none; font-weight: 600; }
#mainNav > a.btn-light:hover { background: var(--primary-light); }
#mainNav > a.btn-secondary {
    background: var(--secondary);
    color: var(--surface) !important;
    border: none;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
}
#mainNav > a.btn-secondary:hover { background: var(--secondary-dark); }

.btn-deconnexion { color: #FFD3D8 !important; font-weight: 500 !important; margin-left: 4px; }
.btn-deconnexion:hover { background: rgba(255, 255, 255, 0.14) !important; color: var(--surface) !important; }

/* =====================================================
   DROPDOWNS — ZONE HOVER ÉTENDUE (technique Stripe/GitHub)
   Le padding-bottom invisible couvre l'espace entre bouton et menu.
   Le curseur ne quitte JAMAIS la zone de survol parent.
   ===================================================== */
.nav-dropdown {
    position: relative;
    /* ✅ CRUCIAL : zone de survol étendue vers le bas de 12 px */
    padding-bottom: 12px;
    margin-bottom: -12px;
}
.nav-dropdown .dropdown-toggle {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
    font-size: 15px;
    font-family: inherit;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--duration-fast) var(--ease-in-out);
    white-space: nowrap;
}
.nav-dropdown .dropdown-toggle:hover { color: var(--surface); background: rgba(255, 255, 255, 0.14); }
.nav-dropdown .dropdown-toggle.active,
.nav-dropdown.is-open .dropdown-toggle,
.nav-dropdown.open .dropdown-toggle {
    color: var(--surface);
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}
.nav-dropdown .dropdown-toggle::after {
    content: '';
    width: 0; height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: 2px;
    transition: transform var(--duration-fast) var(--ease-in-out);
}
.nav-dropdown.is-open .dropdown-toggle::after,
.nav-dropdown.open .dropdown-toggle::after { transform: rotate(180deg); }

/* ----- Menu déroulant : collé au parent, sans aucun gap ----- */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;                         /* ✅ collé — plus de gap de 8 px */
    left: 50%;
    transform: translateX(-50%);
    min-width: 260px;
    max-height: 75vh;
    overflow-y: auto;
    background: var(--surface) !important;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    padding: 6px;
    /* ✅ padding-top étendu pour remonter dans la zone de survol parent */
    padding-top: 4px;
    margin-top: -4px;
    z-index: 1200;
}
.dropdown-menu.is-open {
    display: block;
    animation: slideDown var(--duration-normal) var(--ease-out);
}
.dropdown-menu::-webkit-scrollbar { width: 8px; }
.dropdown-menu::-webkit-scrollbar-track { background: transparent; }
.dropdown-menu::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

/* Liens des sous-menus : toujours lisibles */
#mainNav .dropdown-menu a,
.topbar .dropdown-menu a,
.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: #334155 !important;
    background: transparent !important;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all var(--duration-fast) var(--ease-in-out);
}
#mainNav .dropdown-menu a:hover,
#mainNav .dropdown-menu a.active,
.dropdown-menu a:hover,
.dropdown-menu a.active {
    color: #1B75BC !important;
    background: #F0F7FC !important;
}
#mainNav .dropdown-menu a.highlight,
.dropdown-menu a.highlight { color: #1B75BC !important; font-weight: 600; background: #F0F7FC !important; }
#mainNav .dropdown-menu a.highlight:hover,
.dropdown-menu a.highlight:hover { background: #1B75BC !important; color: #FFFFFF !important; }

.dropdown-divider { height: 1px; background: var(--border); margin: 6px 8px; }

.notification-badge {
    position: absolute;
    top: 2px; right: 2px;
    background: var(--danger);
    color: var(--surface);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: var(--radius-full);
    min-width: 16px;
    text-align: center;
    line-height: 1;
    box-shadow: 0 0 0 2px var(--primary);
}

/* ----- Burger (mobile) ----- */
.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--surface);
    padding: 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-in-out);
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}
.menu-toggle:hover { background: rgba(255, 255, 255, 0.12); }
.menu-toggle svg { display: block; }

/* ----- Responsive mobile ----- */
@media (max-width: 1100px) {
    .topbar { min-height: 88px; }
    .topbar-inner { min-height: 88px; justify-content: space-between; padding: 8px 16px; }
    .brand { position: static; transform: none; }
    .brand-logo { width: 68px; height: 52px; border-radius: 12px; padding: 4px; }
    .brand-text strong { font-size: 16px; }
    .nav-dropdown { padding-bottom: 0; margin-bottom: 0; }
    .menu-toggle { position: static; transform: none; display: flex; align-items: center; justify-content: center; }

    #mainNav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: var(--surface);
        flex-direction: column;
        align-items: stretch;
        padding: 8px;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border);
        gap: 2px;
        max-height: calc(100vh - 91px);
        overflow-y: auto;
    }
    #mainNav.open { display: flex; }
    #mainNav > a,
    .nav-dropdown .dropdown-toggle {
        color: var(--text) !important;
        padding: 12px 14px;
        justify-content: space-between;
        border-radius: var(--radius-sm);
    }
    #mainNav > a:hover, #mainNav > a.active,
    .nav-dropdown .dropdown-toggle:hover { background: var(--primary-050); color: var(--primary) !important; }
    .btn-deconnexion { color: var(--danger) !important; }

    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--light) !important;
        margin-top: 4px !important;
        padding: 4px 8px;
        border-radius: var(--radius-sm);
        max-height: none;
    }
    #mainNav .dropdown-menu a, .dropdown-menu a { color: #334155 !important; background: transparent !important; }
    #mainNav .dropdown-menu a:hover, .dropdown-menu a:hover { background: #E8F1F8 !important; color: #1B75BC !important; }
}

/* =====================================================
   LAYOUT & CONTAINERS
   ===================================================== */
.container { max-width: 1280px; margin: 0 auto; padding: 40px 24px; width: 100%; }
.section-full { width: 100%; padding: 64px 0; }

.page-header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.page-header h1 { font-size: 26px; font-weight: 700; color: var(--dark); margin-bottom: 8px; letter-spacing: -0.02em; }
.page-header p { color: var(--muted); font-size: 15px; max-width: 720px; }

/* ----- HERO (bleu du logo) ----- */
.hero, .page-hero {
    background: var(--primary);
    color: var(--surface);
    padding: 96px 24px 120px;
    position: relative;
    overflow: hidden;
}
.hero::before, .page-hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.hero h1, .page-hero h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; margin-bottom: 20px; letter-spacing: -0.03em; position: relative; }
.hero p, .page-hero p { max-width: 640px; font-size: 17px; opacity: 0.95; line-height: 1.6; margin: 0 auto 28px auto; position: relative; }
.hero-actions { margin-top: 20px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ----- GRIDS ----- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ----- CARDS ----- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--duration-normal) var(--ease-in-out), transform var(--duration-normal) var(--ease-in-out), border-color var(--duration-normal) var(--ease-in-out);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-strong); }
.card h2 { font-size: 16px; font-weight: 600; color: var(--dark); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }

/* ----- BUTTONS ----- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 9px 18px;
    font-size: 14px; font-weight: 600; font-family: inherit;
    text-decoration: none; cursor: pointer;
    transition: all var(--duration-fast) var(--ease-in-out);
    line-height: 1.4; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: var(--surface); }
.btn-primary:hover { background: var(--primary-dark); color: var(--surface); }
.btn-primary:disabled { background: var(--border-strong); cursor: not-allowed; transform: none; }
.btn-secondary { background: var(--secondary); color: var(--surface); }
.btn-secondary:hover { background: var(--secondary-dark); color: var(--surface); }
.btn-light { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-light:hover { background: var(--light); border-color: var(--muted); color: var(--dark); }
.btn-ghost { background: transparent; color: var(--text); border-color: transparent; }
.btn-ghost:hover { background: var(--light); color: var(--dark); }
.btn-danger { background: var(--danger); color: var(--surface); }
.btn-danger:hover { background: #B91C1C; color: var(--surface); }
.btn-success { background: var(--success); color: var(--surface); }
.btn-success:hover { background: #15803D; color: var(--surface); }
.btn-warning { background: var(--warning); color: var(--surface); }
.btn-warning:hover { background: #B45309; color: var(--surface); }
.btn-info { background: var(--info); color: var(--surface); }
.btn-info:hover { background: #0369A1; color: var(--surface); }
.btn-large { padding: 12px 24px; font-size: 15px; }
.btn-small { padding: 6px 12px; font-size: 13px; }
.btn-full { width: 100%; }

/* ----- FORMS ----- */
.form-group { margin-bottom: 18px; }
label { display: block; font-weight: 500; font-size: 13px; margin-bottom: 6px; color: var(--dark); }
.required { color: var(--danger); }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="datetime-local"],
input[type="time"], input[type="number"], input[type="month"], input[type="tel"], input[type="url"], select, textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 14px; font-family: inherit;
    color: var(--text);
    background: var(--surface);
    transition: all var(--duration-fast) var(--ease-in-out);
    -webkit-appearance: none; appearance: none;
}
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--shadow-focus); }
input:disabled, select:disabled, textarea:disabled { background: var(--light); color: var(--muted); cursor: not-allowed; }
textarea { min-height: 100px; resize: vertical; }
.form-help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }

/* ----- TABLES ----- */
.table-responsive { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-xs); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 16px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
th { background: var(--light); color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--duration-fast) var(--ease-in-out); }
tbody tr:hover { background: var(--primary-050); }
.num { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--dark); }

/* ----- PASTILLES DE STATUT ----- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-full); font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.pill-success, .pill-ok { background: var(--success-bg); color: #047857; }
.pill-danger, .pill-late { background: var(--danger-bg); color: #B91C1C; }
.pill-warning, .pill-wait { background: var(--warning-bg); color: #B45309; }
.pill-info { background: var(--info-bg); color: #0369A1; }
.pill-muted, .pill-mut { background: var(--light); color: var(--text-soft); }

/* ----- BADGES (compatibilité) ----- */
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-dark { background: var(--light); color: var(--text-soft); }

/* ----- ALERTS ----- */
.alert { padding: 14px 18px; border-radius: var(--radius-md); margin-bottom: 18px; font-size: 14px; border: 1px solid transparent; display: flex; align-items: flex-start; gap: 12px; animation: fadeIn var(--duration-normal) var(--ease-out); box-shadow: var(--shadow-xs); }
.alert-success { background: var(--success-bg); color: #065F46; border-color: var(--success-border); }
.alert-error, .alert-danger { background: var(--danger-bg); color: #991B1B; border-color: var(--danger-border); }
.alert-info { background: var(--info-bg); color: #075985; border-color: var(--info-border); }
.alert-warning { background: var(--warning-bg); color: #92400E; border-color: var(--warning-border); }

/* ----- AUTH ----- */
.auth-container { max-width: 440px; margin: 60px auto; padding: 0 20px; }
.auth-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--border); overflow: hidden; }
.auth-header { background: var(--primary); color: var(--surface); padding: 32px 28px; text-align: center; position: relative; overflow: hidden; }
.auth-header::before { content: ''; position: absolute; top: -50%; right: -30%; width: 300px; height: 300px; background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%); }
.auth-header h1 { font-size: 20px; font-weight: 700; margin-bottom: 6px; position: relative; }
.auth-header p { opacity: 0.95; font-size: 14px; position: relative; }
.auth-form { padding: 28px; }

/* =====================================================
   FOOTER — sombre avec liseré bourgogne (ruban du logo)
   ===================================================== */
.footer {
    width: 100%;
    margin-top: auto;
    background: var(--dark);
    color: rgba(255, 255, 255, 0.9);
    padding: 64px 24px 24px;
    border-top: 4px solid var(--secondary);
}
.footer-content { max-width: 1400px; width: 100%; margin: 0 auto 48px; display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 48px; }
.footer-col h3 { color: var(--surface); font-size: 12px; font-weight: 600; margin-bottom: 18px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.7; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: rgba(255, 255, 255, 0.75); text-decoration: none; font-size: 14px; transition: color var(--duration-fast) var(--ease-in-out); display: inline-block; }
.footer-col ul li a:hover { color: var(--surface); }
.footer-brand { text-align: left; }
.footer-logo { width: 56px; height: 56px; background: var(--surface); border-radius: 50%; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 16px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
.footer-logo img { width: 44px; height: 44px; object-fit: contain; }
.footer-brand h2 { color: var(--surface); font-size: 18px; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.01em; }
.footer-brand p { color: rgba(255, 255, 255, 0.7); font-size: 14px; line-height: 1.6; margin-bottom: 6px; }
.footer-contact-item { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; color: rgba(255, 255, 255, 0.85); font-size: 14px; }
.footer-contact-item svg { width: 18px; height: 18px; flex-shrink: 0; stroke: rgba(255, 255, 255, 0.7); margin-top: 2px; }
.footer-bottom { max-width: 1400px; width: 100%; margin: 0 auto; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.1); text-align: center; color: rgba(255, 255, 255, 0.5); font-size: 13px; }

@media (max-width: 1024px) {
    .footer-content { grid-template-columns: 1fr 1fr; gap: 36px; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
    .footer { padding: 48px 20px 20px; }
    .footer-content { grid-template-columns: 1fr; gap: 32px; }
}

/* =====================================================
   COMPOSANTS SPÉCIFIQUES
   ===================================================== */
.president-grid, .infra-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.president-card, .infra-card { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; transition: all var(--duration-normal) var(--ease-in-out); }
.president-card:hover, .infra-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-strong); }
.president-photo { width: 96px; height: 96px; margin: 0 auto 14px; border-radius: 50%; overflow: hidden; background: var(--primary-light); border: 3px solid var(--surface); box-shadow: var(--shadow-md), 0 0 0 1px var(--border); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; color: var(--primary); }
.president-photo img, .infra-image { width: 100%; height: 100%; object-fit: cover; }
.infra-image { height: 180px; border-radius: var(--radius-md); margin-bottom: 14px; border: 1px solid var(--border); }

.presidents-timeline { position: relative; padding-left: 44px; }
.presidents-timeline::before { content: ""; position: absolute; left: 14px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.president-item { position: relative; margin-bottom: 32px; }
.president-item::before { content: attr(data-order); position: absolute; left: -44px; top: 20px; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: var(--surface); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }
.president-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; display: grid; grid-template-columns: 120px 1fr; gap: 24px; align-items: start; }

.essentiel-title { color: var(--primary) !important; font-size: 16px; margin: 0 0 6px 0; font-weight: 600; letter-spacing: -0.01em; }

.missions-section { background: var(--surface); width: 100%; padding: 80px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.mission-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; transition: all var(--duration-normal) var(--ease-in-out); height: 100%; }
.mission-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.mission-icon { width: 44px; height: 44px; background: var(--primary-050); color: var(--primary); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-bottom: 16px; border: 1px solid var(--primary-light); }
.mission-title { color: var(--dark); font-size: 16px; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.01em; }

.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: 32px; color: var(--dark); margin-bottom: 14px; font-weight: 700; letter-spacing: -0.02em; }
.section-header .divider { width: 48px; height: 3px; background: var(--primary); margin: 0 auto; border-radius: 2px; }
.section-header p { color: var(--muted); max-width: 640px; margin: 18px auto 0; font-size: 16px; line-height: 1.6; }

.whatsapp-float { position: fixed; width: 56px; height: 56px; bottom: 24px; right: 24px; background: #25D366; color: var(--surface); border-radius: 50%; text-align: center; box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35); z-index: 1000; display: flex; align-items: center; justify-content: center; transition: all var(--duration-normal) var(--ease-out); text-decoration: none; }
.whatsapp-float:hover { background: #1DA851; color: var(--surface); transform: translateY(-2px) scale(1.04); box-shadow: 0 10px 24px rgba(37, 211, 102, 0.4); }

/* ----- PANELS & KPI (back-offices) ----- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-xs); }
.panel-head { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.panel-head h2 { font-size: 15px; font-weight: 600; color: var(--dark); margin: 0; }
.panel-body { padding: 20px; }
.panel-note { padding: 12px 20px; background: var(--light); font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 24px; }
.kpi { background: var(--surface); padding: 18px 20px; }
.kpi .label { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.kpi .value { font-size: 24px; font-weight: 700; color: var(--dark); margin-top: 4px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi .value.danger { color: var(--danger); }
.kpi .value.success { color: var(--success); }

.callout { display: flex; gap: 12px; padding: 14px 18px; background: var(--info-bg); border: 1px solid var(--info-border); border-radius: var(--radius-md); margin-bottom: 24px; font-size: 14px; color: #0C4A6E; line-height: 1.6; }
.callout svg { flex-shrink: 0; margin-top: 2px; }

/* Utilitaires */
.muted { color: var(--muted); }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.inline-form { display: inline-block; }

/* ----- RESPONSIVE ----- */
@media (max-width: 1024px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
    .container { padding: 32px 16px; }
    .section-full { padding: 48px 0; }
    .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: 1fr; }
    .hero, .page-hero { padding: 64px 20px 80px; }
    .hero h1, .page-hero h1 { font-size: 1.8rem; }
    .president-panel { grid-template-columns: 1fr; text-align: center; }
    .president-photo { margin: 0 auto 16px auto; }
    .whatsapp-float { width: 50px; height: 50px; bottom: 20px; right: 20px; }
    .page-header h1 { font-size: 22px; }
}