/* ==========================================================================
   ACADÉMIE JACQUES PRÉVERT — SYSTÈME DE THÈMES (NORMAL & NOËL)
   Ministère de République Prévertienne
   ========================================================================== */

:root {
    /* --- THÈME NORMAL (INSTITUTIONNEL OFFICIEL) PAR DÉFAUT --- */
    --bg-dark: #070f1e;
    --bg-card: rgba(15, 23, 42, 0.85);
    --bg-card-hover: rgba(26, 41, 69, 0.95);
    --bg-glass: rgba(10, 18, 36, 0.88);
    
    --gold-primary: #f1c40f;
    --gold-hover: #f39c12;
    --gold-glow: rgba(241, 196, 15, 0.3);
    
    --accent-primary: #2563eb;
    --accent-light: #38bdf8;
    --accent-glow: rgba(37, 99, 235, 0.35);
    
    --theme-color: #1e3a8a;
    --theme-border: rgba(241, 196, 15, 0.3);
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --border-gold: rgba(241, 196, 15, 0.3);
    --border-light: rgba(255, 255, 255, 0.1);
    
    --shadow-gold: 0 10px 30px -10px rgba(241, 196, 15, 0.25);
    --shadow-card: 0 12px 35px -5px rgba(0, 0, 0, 0.55);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 9999px;
    
    --font-heading: 'Cinzel', 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* THÈME NOËL (ACTIVÉ LORSQUE .theme-noel EST SUR LE BODY) */
body.theme-noel {
    --bg-dark: #070d18;
    --bg-card: rgba(15, 23, 42, 0.78);
    --bg-card-hover: rgba(22, 35, 62, 0.9);
    --bg-glass: rgba(11, 19, 43, 0.75);
    --accent-primary: #b91c1c;
    --accent-light: #ef4444;
    --accent-glow: rgba(239, 68, 68, 0.4);
    --theme-color: #b91c1c;
    --border-gold: rgba(246, 200, 103, 0.28);
}

/* Reset de base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(185, 28, 28, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 85% 20%, rgba(6, 78, 59, 0.18) 0%, transparent 45%),
        radial-gradient(circle at 50% 80%, rgba(56, 189, 248, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, #050b14 0%, #070e1c 50%, #03070f 100%);
    background-attachment: fixed;
}

/* Canvas de neige interactif */
#snowCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99999;
}

/* Guirlande de Noël animée en haut */
.christmas-lights {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 14px;
    display: flex;
    justify-content: space-around;
    z-index: 10001;
    pointer-events: none;
    overflow: hidden;
}

/* Gestion de l'affichage selon le mode actif (Normal vs Noël) */
body:not(.theme-noel) #snowCanvas,
body:not(.theme-noel) .christmas-lights,
body:not(.theme-noel) .noel-only {
    display: none !important;
}

body.theme-noel .normal-only {
    display: none !important;
}

.brand-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    border: 2px solid var(--gold-primary);
    box-shadow: 0 0 12px var(--gold-glow);
    object-fit: cover;
    background: #0d1629;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    overflow: hidden;
    flex-shrink: 0;
}

.light-bulb {
    width: 10px;
    height: 14px;
    border-radius: 50% 50% 40% 40%;
    animation: twinkle 1.8s infinite ease-in-out;
}

.light-bulb:nth-child(4n+1) { background: #ef4444; box-shadow: 0 0 12px #ef4444; animation-delay: 0s; }
.light-bulb:nth-child(4n+2) { background: #ffd700; box-shadow: 0 0 12px #ffd700; animation-delay: 0.4s; }
.light-bulb:nth-child(4n+3) { background: #10b981; box-shadow: 0 0 12px #10b981; animation-delay: 0.8s; }
.light-bulb:nth-child(4n+4) { background: #38bdf8; box-shadow: 0 0 12px #38bdf8; animation-delay: 1.2s; }

@keyframes twinkle {
    0%, 100% { opacity: 0.35; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.15); filter: brightness(1.3); }
}

/* Container */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Liens */
a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--gold-hover);
    text-shadow: 0 0 8px var(--gold-glow);
}

/* Typography */
h1, h2, h3, h4, .font-serif {
    font-family: var(--font-heading);
    letter-spacing: 0.03em;
    font-weight: 700;
}

/* ==========================================================================
   NAVIGATION BAR & ACTIONS (ANTI-DÉBORDEMENT & RESPONSIVE)
   ========================================================================== */
.header-nav {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-gold);
    z-index: 1000;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 8px 0;
    gap: 12px;
}

.brand-logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    border: 2px solid var(--gold-primary);
    box-shadow: 0 0 12px var(--gold-glow);
    object-fit: cover;
    background: #0d1629;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    overflow: hidden;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-heading);
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.brand-title .noel-badge {
    font-size: 0.65rem;
    background: var(--theme-color);
    color: #fff;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255,255,255,0.25);
    text-shadow: none;
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.brand-subtitle {
    font-size: 0.70rem;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 11px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: #fff;
    background: rgba(246, 200, 103, 0.12);
    border: 1px solid var(--border-gold);
    box-shadow: 0 0 10px rgba(246, 200, 103, 0.15);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Boutons universels anti-débordement */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 0.90rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.35;
    text-align: center;
    box-sizing: border-box;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
}

.btn-snow-toggle {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #7dd3fc;
    padding: 6px 12px;
    font-size: 0.80rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    white-space: nowrap;
}
.btn-snow-toggle:hover {
    background: rgba(56, 189, 248, 0.25);
    color: #fff;
}

/* En mode Noël, style doré et rouge festif pour les boutons de bascule */
body.theme-noel .btn-snow-toggle {
    background: rgba(185, 28, 28, 0.2);
    border-color: rgba(246, 200, 103, 0.4);
    color: #f6c867;
}
body.theme-noel .btn-snow-toggle:hover {
    background: rgba(185, 28, 28, 0.4);
    color: #fff;
    box-shadow: 0 0 10px rgba(246, 200, 103, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #f6c867 0%, #e09f2d 100%);
    color: #0b132b;
    border-color: #f7d488;
    box-shadow: 0 4px 18px rgba(246, 200, 103, 0.4);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(246, 200, 103, 0.6);
    color: #050b14;
}

.btn-noel {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: #fff;
    border-color: #f87171;
    box-shadow: 0 4px 18px rgba(220, 38, 38, 0.4);
}
.btn-noel:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.6);
    color: #fff;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.btn-discord {
    background: #5865F2;
    color: #fff;
    box-shadow: 0 4px 18px rgba(88, 101, 242, 0.35);
}
.btn-discord:hover {
    background: #4752c4;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(88, 101, 242, 0.55);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.84rem;
    border-radius: var(--radius-sm);
}

.btn-snow-toggle {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #7dd3fc;
    padding: 7px 12px;
    font-size: 0.82rem;
    border-radius: var(--radius-full);
}
.btn-snow-toggle:hover {
    background: rgba(56, 189, 248, 0.25);
    color: #fff;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
}

/* ==========================================================================
   HERO SECTION (BANNER & VOEUX)
   ========================================================================== */
.hero-section {
    position: relative;
    padding: 60px 0 80px;
    overflow: hidden;
}

.hero-banner-card {
    position: relative;
    background: linear-gradient(145deg, rgba(16, 27, 51, 0.9) 0%, rgba(7, 13, 24, 0.95) 100%);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card), 0 0 40px rgba(185, 28, 28, 0.2);
    overflow: hidden;
    padding: 40px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.hero-banner-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: radial-gradient(circle at 80% 20%, rgba(246, 200, 103, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(185, 28, 28, 0.25);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.04em;
    max-width: 100%;
    box-sizing: border-box;
}

body:not(.theme-noel) .hero-tag {
    background: rgba(37, 99, 235, 0.2);
    border-color: rgba(56, 189, 248, 0.4);
    color: #7dd3fc;
}

.hero-title {
    font-size: 2.8rem;
    line-height: 1.15;
    margin-bottom: 18px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.hero-title span.gold {
    color: var(--gold-primary);
    background: linear-gradient(135deg, #fff7d6 0%, #f6c867 50%, #d89020 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 580px;
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.hero-cta-group .btn {
    flex-grow: 0;
    white-space: normal;
}

.hero-stats {
    display: flex;
    gap: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--gold-primary);
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-image-frame {
    position: relative;
    border-radius: var(--radius-lg);
    border: 2px solid var(--gold-primary);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6), 0 0 30px var(--gold-glow);
    overflow: hidden;
    width: 100%;
    max-width: 440px;
    aspect-ratio: 1/1;
    background: #000;
}

.hero-image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.hero-image-frame:hover img {
    transform: scale(1.03);
}

.hero-badge-float {
    position: absolute;
    bottom: -15px;
    right: 20px;
    background: linear-gradient(135deg, #10b981 0%, #064e3b 100%);
    color: #fff;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   SERVICES GRID & CARDS
   ========================================================================== */
.section {
    padding: 70px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-pretitle {
    color: var(--gold-primary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    font-weight: 700;
    margin-bottom: 8px;
    display: inline-block;
}

.section-title {
    font-size: 2.3rem;
    color: #fff;
    margin-bottom: 14px;
}

.section-desc {
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto;
    font-size: 1.05rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 28px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-gold);
    box-shadow: var(--shadow-card), 0 0 25px rgba(246, 200, 103, 0.15);
    background: var(--bg-card-hover);
}

.service-card.active-service {
    border-top: 3px solid var(--pine-light);
}

.service-card.soon-service {
    border-top: 3px solid var(--gold-primary);
    opacity: 0.92;
}

.service-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.service-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
}

.service-card.active-service .service-icon-box {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.service-card.soon-service .service-icon-box {
    background: rgba(246, 200, 103, 0.12);
    border-color: rgba(246, 200, 103, 0.35);
    color: var(--gold-primary);
}

.service-badge {
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-active {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-soon {
    background: rgba(246, 200, 103, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(246, 200, 103, 0.35);
}

.service-title {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 8px;
}

.service-url {
    font-size: 0.84rem;
    color: var(--frost-blue);
    font-family: monospace;
    margin-bottom: 12px;
    display: inline-block;
}

.service-desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.service-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
}

/* ==========================================================================
   TRACKING STEPPER (SUIVI DE MON ADHÉSION)
   ========================================================================== */
.tracking-search-box {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 34px;
    box-shadow: var(--shadow-card);
    max-width: 760px;
    margin: 0 auto 50px;
    backdrop-filter: blur(10px);
}

.tracking-form {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.form-control {
    width: 100%;
    padding: 13px 18px;
    background: rgba(11, 19, 43, 0.9);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 0.98rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 15px var(--gold-glow);
    background: rgba(15, 23, 42, 1);
}

.stepper-container {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-card);
    margin-bottom: 40px;
    position: relative;
}

.stepper-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 36px;
}

.dossier-ref {
    display: flex;
    flex-direction: column;
}

.dossier-ref-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.dossier-ref-id {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--gold-primary);
    font-family: var(--font-heading);
}

.status-banner {
    padding: 8px 22px;
    border-radius: var(--radius-full);
    font-size: 0.92rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.status-banner.approved {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    border: 1px solid #34d399;
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.4);
}

.status-banner.pending {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #fff;
    border: 1px solid #fbbf24;
}

.stepper-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: relative;
    gap: 20px;
    margin-bottom: 40px;
}

.stepper-steps::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 8%;
    right: 8%;
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    z-index: 1;
}

.step-item {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.step-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #0f172a;
    border: 3px solid rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 14px;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(0,0,0,0.5);
}

.step-item.completed .step-circle {
    background: #059669;
    border-color: #34d399;
    color: #fff;
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.4);
}

.step-item.active .step-circle {
    background: #d97706;
    border-color: #fbbf24;
    color: #fff;
    box-shadow: 0 0 22px rgba(251, 191, 36, 0.5);
    animation: pulseStep 2s infinite;
}

@keyframes pulseStep {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); filter: brightness(1.2); }
}

.step-number {
    font-size: 0.75rem;
    color: var(--gold-primary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.step-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.step-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.step-date {
    font-size: 0.78rem;
    color: var(--frost-blue);
    margin-top: 4px;
    font-family: monospace;
}

/* ==========================================================================
   FORMS (PAGE ADHÉRER & MODAL ADMIN)
   ========================================================================== */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(12px);
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.94rem;
    margin-bottom: 8px;
    color: #fff;
}

.form-label .req {
    color: #ef4444;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* ==========================================================================
   EFFECTIF & ORGANIGRAMME
   ========================================================================== */
.closed-recruitment-banner {
    background: linear-gradient(135deg, rgba(185, 28, 28, 0.25) 0%, rgba(127, 29, 29, 0.35) 100%);
    border: 1px solid #ef4444;
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 20px rgba(185, 28, 28, 0.2);
}

.closed-icon {
    font-size: 2.2rem;
    color: #fca5a5;
}

.pole-section {
    margin-bottom: 50px;
}

.pole-title-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-gold);
    margin-bottom: 24px;
}

.pole-title-bar h3 {
    font-size: 1.5rem;
    color: #fff;
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.staff-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 18px;
}

.staff-card:hover {
    border-color: var(--border-gold);
    background: var(--bg-card-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
}

.staff-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid var(--gold-primary);
    color: var(--gold-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.staff-info {
    flex-grow: 1;
    overflow: hidden;
}

.staff-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.staff-role {
    font-size: 0.82rem;
    color: var(--gold-primary);
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}

.staff-email {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: monospace;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   TABLES & ADMIN DASHBOARD
   ========================================================================== */
.admin-badge {
    background: #ef4444;
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 700;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    scrollbar-width: thin;
    scrollbar-color: var(--gold-primary) rgba(255, 255, 255, 0.05);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    background: rgba(11, 19, 43, 0.95);
    padding: 16px 20px;
    color: var(--gold-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border-gold);
}

.data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
}

/* ==========================================================================
   CHATBOT IA PRÉVERT (WIDGET FLOTTANT)
   ========================================================================== */
.chatbot-bubble-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
    border: 2px solid var(--gold-primary);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 25px var(--noel-red-glow);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: var(--transition);
}

.chatbot-bubble-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 35px rgba(246, 200, 103, 0.5);
}

.chatbot-bubble-toggle::after {
    content: '🎅';
    position: absolute;
    top: -12px;
    right: -4px;
    font-size: 1.3rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 540px;
    max-height: calc(100vh - 130px);
    background: rgba(11, 19, 43, 0.97);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0,0,0,0.7), 0 0 30px rgba(246, 200, 103, 0.2);
    backdrop-filter: blur(16px);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
}

.chatbot-window.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.chatbot-header {
    background: linear-gradient(135deg, #7f1d1d 0%, #1e1b4b 100%);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-gold);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #0f172a;
    border: 1.5px solid var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.chatbot-header-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.chatbot-header-status {
    font-size: 0.72rem;
    color: #86efac;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chatbot-header-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
}

.chatbot-close-btn {
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 1.4rem;
    cursor: pointer;
}
.chatbot-close-btn:hover { color: #fff; }

.chatbot-messages {
    flex-grow: 1;
    padding: 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-msg {
    max-width: 84%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    line-height: 1.45;
    word-break: break-word;
}

.chat-msg.bot {
    align-self: flex-start;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    border-bottom-left-radius: 2px;
}

.chat-msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    color: #fff;
    border-bottom-right-radius: 2px;
}

.chat-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 12px;
}

.quick-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}
.quick-btn:hover {
    background: rgba(246, 200, 103, 0.15);
    border-color: var(--gold-primary);
    color: #fff;
}

.chatbot-input-area {
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 8px;
}

.chatbot-input {
    flex-grow: 1;
    background: rgba(2, 6, 23, 0.7);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    padding: 8px 16px;
    color: #fff;
    font-size: 0.88rem;
    font-family: inherit;
}
.chatbot-input:focus {
    outline: none;
    border-color: var(--gold-primary);
}

.chatbot-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gold-primary);
    color: #0b132b;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: var(--transition);
}
.chatbot-send-btn:hover {
    background: var(--gold-hover);
    transform: scale(1.08);
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: #0b132b;
    border: 1px solid var(--gold-primary);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px var(--gold-glow);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    padding: 34px;
    position: relative;
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-overlay.open .modal-box {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}
.modal-close:hover { color: #fff; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background: #040812;
    border-top: 1px solid var(--border-gold);
    padding: 60px 0 30px;
    margin-top: 80px;
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h4 {
    color: var(--gold-primary);
    font-size: 1.05rem;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.footer-links a:hover {
    color: var(--gold-primary);
    padding-left: 4px;
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ==========================================================================
   RESPONSIVE DESIGN COMPLET (ORDINATEURS, TABLETTES & MOBILES) 📱💻
   ========================================================================== */

/* --- ÉCRANS MOYENS & PETITS PC (jusqu'à 1240px) --- */
@media (max-width: 1240px) {
    .nav-links {
        gap: 2px;
    }
    .nav-link {
        padding: 6px 8px;
        font-size: 0.82rem;
    }
    .brand-title {
        font-size: 1rem;
    }
    .brand-subtitle {
        font-size: 0.65rem;
    }
    .hero-title {
        font-size: 2.3rem;
    }
}

/* --- TABLETTES PAYSAGE & PORTRAIT (jusqu'à 1024px) --- */
@media (max-width: 1024px) {
    .header-nav {
        min-height: 68px;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(7, 13, 24, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 24px 20px;
        gap: 10px;
        overflow-y: auto;
        z-index: 9999;
        border-top: 1px solid var(--border-gold);
        box-shadow: 0 20px 40px rgba(0,0,0,0.8);
    }

    .nav-links.show {
        display: flex;
        animation: mobileMenuFadeIn 0.25s ease-out;
    }

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

    .nav-links .nav-link {
        font-size: 1.05rem;
        padding: 14px 18px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.07);
        width: 100%;
        justify-content: flex-start;
    }

    .nav-links .nav-link:hover,
    .nav-links .nav-link.active {
        background: rgba(246, 200, 103, 0.15);
        border-color: var(--gold-primary);
        color: #fff;
    }

    .mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: var(--radius-sm);
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid var(--border-light);
        color: #fff;
        font-size: 1.4rem;
        cursor: pointer;
        transition: var(--transition);
    }
    .mobile-toggle:hover {
        background: rgba(255, 255, 255, 0.18);
        border-color: var(--gold-primary);
    }

    .hero-banner-card {
        grid-template-columns: 1fr;
        padding: 34px 24px;
        gap: 30px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .stepper-steps {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
    .stepper-steps::before {
        display: none;
    }
}

/* --- TABLETTES & GRANDS MOBILES (jusqu'à 768px) --- */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 1.85rem;
    }

    .section-desc {
        font-size: 0.95rem;
    }

    .hero-banner-card {
        padding: 24px 18px;
        border-radius: var(--radius-md);
    }

    .hero-title {
        font-size: 1.9rem;
    }

    .hero-desc {
        font-size: 0.95rem;
        margin-bottom: 22px;
    }

    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 20px;
    }

    .stat-item {
        flex: 1 1 40%;
    }

    .hero-cta-group {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .hero-cta-group .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 18px;
    }

    .hero-image-frame {
        max-width: 320px;
        margin: 0 auto;
    }

    .hero-badge-float {
        position: static;
        margin-top: 14px;
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* Formulaires responsive */
    .form-card {
        padding: 24px 18px;
        border-radius: var(--radius-md);
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Empêche le zoom automatique forcé sur iOS Safari */
    .form-control,
    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    /* Dashboard admin responsive */
    #adminDashboard > div:first-child {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .admin-tab-btn {
        width: 100%;
        text-align: left;
        justify-content: flex-start;
    }

    div[style*="grid-template-columns: 1.1fr 0.9fr"],
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* --- SMARTPHONES (jusqu'à 640px) --- */
@media (max-width: 640px) {
    .header-nav {
        min-height: 64px;
    }

    .nav-inner {
        min-height: 64px;
    }

    .brand-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 18px;
    }

    .brand-title {
        font-size: 0.95rem;
    }

    .brand-subtitle {
        display: none; /* Allège l'en-tête sur petits écrans pour un alignement parfait */
    }

    .nav-actions {
        gap: 6px;
    }

    .nav-actions .btn-sm {
        padding: 5px 9px;
        font-size: 0.76rem;
    }

    .nav-actions .btn-discord {
        padding: 5px 8px;
        font-size: 0.75rem;
    }

    /* Grille de services en 1 colonne sur smartphone */
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 18px;
    }

    .service-card {
        padding: 20px 18px;
    }

    /* Stepper vertical ultra lisible sur smartphone */
    .stepper-container {
        padding: 24px 16px;
        border-radius: var(--radius-md);
    }

    .stepper-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 24px;
    }

    .dossier-ref-id {
        font-size: 1.45rem;
    }

    .stepper-steps {
        display: flex;
        flex-direction: column;
        gap: 22px;
        position: relative;
        padding-left: 8px;
        margin-bottom: 24px;
    }

    .stepper-steps::before {
        display: block !important;
        position: absolute;
        top: 24px;
        bottom: 24px;
        left: 31px;
        width: 3px;
        height: auto;
        background: rgba(255, 255, 255, 0.15);
        z-index: 1;
    }

    .step-item {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 14px;
        z-index: 2;
    }

    .step-circle {
        width: 46px;
        height: 46px;
        min-width: 46px;
        font-size: 1rem;
        margin-bottom: 0;
    }

    .step-number {
        font-size: 0.72rem;
    }

    .step-title {
        font-size: 0.98rem;
    }

    .step-sub {
        font-size: 0.82rem;
    }

    /* Détails du suivi en 1 colonne */
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Chatbot IA version tiroir mobile bas (Native Bottom Sheet) */
    .chatbot-bubble-toggle {
        bottom: 16px;
        right: 16px;
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
    }

    .chatbot-window {
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        top: auto;
        width: 100% !important;
        max-width: 100% !important;
        height: 82vh !important;
        max-height: 82vh !important;
        border-radius: 20px 20px 0 0 !important;
        border-bottom: none !important;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.8) !important;
    }

    /* Modales adaptées aux écrans mobiles */
    .modal-box {
        width: 95%;
        max-width: 95%;
        padding: 22px 16px;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Annuaire d'établissements & trombinoscope */
    .staff-grid {
        grid-template-columns: 1fr !important;
    }

    .staff-card {
        padding: 16px;
        gap: 14px;
    }

    .staff-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }

    .staff-name {
        font-size: 1rem;
    }
}
