/* =====================================================
   IMD HOLOGRAPHIC DESIGN SYSTEM v1.0
   Cerebrus SARL — Future SIS, 2026+
   =====================================================

   Principles:
   1. Iridescence (gradient shift)
   2. Multi-layer depth
   3. Neon glow accents
   4. Glassmorphism 2.0
   5. Holographic shimmer
   6. Geometric typography
   7. Deep space backgrounds
*/

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    /* === Background depth layers === */
    --holo-bg-deep: #020617;
    --holo-bg-mid: #0a1530;
    --holo-bg-surface: rgba(15, 23, 42, 0.65);
    --holo-bg-card: rgba(30, 41, 59, 0.45);
    --holo-bg-elevated: rgba(51, 65, 85, 0.55);

    /* === Iridescent palette === */
    --holo-cyan: #06B6D4;
    --holo-cyan-glow: #22D3EE;
    --holo-purple: #8B5CF6;
    --holo-purple-glow: #A78BFA;
    --holo-pink: #EC4899;
    --holo-pink-glow: #F472B6;
    --holo-lime: #84CC16;
    --holo-lime-glow: #A3E635;
    --holo-amber: #F59E0B;
    --holo-amber-glow: #FCD34D;

    /* === Holographic gradients === */
    --holo-gradient-iris: linear-gradient(135deg, #06B6D4 0%, #8B5CF6 50%, #EC4899 100%);
    --holo-gradient-aurora: linear-gradient(135deg, #06B6D4 0%, #84CC16 35%, #F59E0B 70%, #EC4899 100%);
    --holo-gradient-cyber: linear-gradient(135deg, #8B5CF6 0%, #06B6D4 50%, #84CC16 100%);
    --holo-gradient-sunset: linear-gradient(135deg, #F59E0B 0%, #EC4899 50%, #8B5CF6 100%);

    /* === Per-module dominant colors === */
    --module-pedagogie: #6366F1;       /* Indigo - cours, notes, formations */
    --module-finance: #F59E0B;          /* Amber - paiements */
    --module-people: #14B8A6;           /* Teal - etudiants, agents, parents */
    --module-comm: #EC4899;             /* Hibiscus - communications */
    --module-system: #64748B;           /* Slate - parametres, logs */
    --module-future: #8B5CF6;           /* Purple - IA, predictif */

    /* === Borders === */
    --holo-border-subtle: 1px solid rgba(148, 163, 184, 0.12);
    --holo-border-bright: 1px solid rgba(34, 211, 238, 0.4);
    --holo-border-glow: 1px solid rgba(139, 92, 246, 0.6);

    /* === Glows / shadows === */
    --holo-glow-cyan: 0 0 20px rgba(34, 211, 238, 0.4), 0 0 40px rgba(34, 211, 238, 0.2);
    --holo-glow-purple: 0 0 20px rgba(167, 139, 250, 0.4), 0 0 40px rgba(167, 139, 250, 0.2);
    --holo-glow-pink: 0 0 20px rgba(244, 114, 182, 0.4), 0 0 40px rgba(244, 114, 182, 0.2);
    --holo-shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.05) inset;
    --holo-shadow-elevated: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;

    /* === Typography === */
    --holo-font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --holo-font-body: 'Inter', system-ui, sans-serif;
    --holo-font-mono: 'JetBrains Mono', 'Geist Mono', ui-monospace, monospace;

    /* === Spacing / radii === */
    --holo-radius-sm: 8px;
    --holo-radius-md: 14px;
    --holo-radius-lg: 22px;
    --holo-radius-xl: 32px;
    --holo-radius-pill: 999px;
}

/* meshCanvas (noeuds neuronaux) reste actif sur l'accueil — l'utilisateur le veut.
   Il forme dynamiquement IMD puis Inscription, Recouvrement, etc. */
body.holo-mode .floating-particle { display: none !important; }

/* ==================================================
   CORE BACKGROUND — multi-layer holographic depth
   ================================================== */
body.holo-mode {
    background: var(--holo-bg-deep) !important;
    color: #E2E8F0;
    font-family: var(--holo-font-body);
    position: relative;
    min-height: 100vh;
}

/* ============================================
   LIGHT MODE DESIGNER pour la page admin
   Inspiration : Linear, Notion, Vercel admin
   ============================================ */
[data-theme="light"] body.holo-mode,
html[data-theme="light"] body.holo-mode {
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(14, 165, 233, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 100% 100%, rgba(99, 102, 241, 0.04) 0%, transparent 60%),
        linear-gradient(180deg, #F8FAFC 0%, #EEF2F7 100%) !important;
    color: #0F172A !important;
}
[data-theme="light"] body.holo-mode::before {
    background:
        radial-gradient(ellipse at 20% 0%, rgba(14, 165, 233, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(34, 211, 238, 0.03) 0%, transparent 60%);
    opacity: 0.7;
}
[data-theme="light"] body.holo-mode::after {
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
    background-size: 56px 56px;
    opacity: 0.5;
}

/* Sidebar mode clair : BLANC PUR, sans tint bleu */
[data-theme="light"] body.holo-mode .left-nav,
[data-theme="light"] body.holo-mode #adminLeftNav,
[data-theme="light"] body.holo-mode nav.left-nav {
    background: #FFFFFF !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-right: 1px solid #E2E8F0 !important;
    box-shadow: 1px 0 16px rgba(15, 23, 42, 0.03);
}
/* Pas de gradient bleu vertical sur le bord */
[data-theme="light"] body.holo-mode .left-nav::after,
[data-theme="light"] body.holo-mode #adminLeftNav::after {
    display: none !important;
}

/* Sections de menu (headers : Scolarite, Finance...) */
[data-theme="light"] body.holo-mode .nav-section,
[data-theme="light"] body.holo-mode .role-menu.nav-section,
[data-theme="light"] body.holo-mode .left-nav .nav-section {
    color: #94A3B8 !important;
    font-weight: 700 !important;
    letter-spacing: 0.12em !important;
    transition: color 0.15s ease;
}
[data-theme="light"] body.holo-mode .left-nav .nav-section:hover {
    color: #475569 !important;
}
/* Chevron ::after des sections en mode clair */
[data-theme="light"] body.holo-mode .left-nav .nav-section::after {
    border-top-color: #94A3B8 !important;
    opacity: 0.7;
}
[data-theme="light"] body.holo-mode .left-nav .nav-section:hover::after {
    opacity: 1;
}

/* Bloc utilisateur en bas de nav (override le dark card de holographic.css ligne 1015) */
[data-theme="light"] body.holo-mode .nav-user,
[data-theme="light"] body.holo-mode #adminNavUser,
[data-theme="light"] body.holo-mode .left-nav .nav-user {
    background: #F8FAFC !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 12px !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    margin: 14px 8px !important;
    padding: 10px 14px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
[data-theme="light"] body.holo-mode .nav-user-name,
[data-theme="light"] body.holo-mode .left-nav .nav-user-name {
    color: #0F172A !important;
}
[data-theme="light"] body.holo-mode .nav-user-role,
[data-theme="light"] body.holo-mode .left-nav .nav-user-role {
    color: #64748B !important;
}
[data-theme="light"] body.holo-mode .nav-avatar,
[data-theme="light"] body.holo-mode #adminNavAvatar {
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.25);
}

/* Logo nav (petite version) */
[data-theme="light"] body.holo-mode .left-nav .nav-logo,
[data-theme="light"] body.holo-mode .left-nav .nav-logo-text {
    color: #0F172A !important;
}
[data-theme="light"] body.holo-mode .left-nav .nav-logo-text span {
    color: #64748B !important;
}

/* Items de menu : neutre gris, hover slate, active subtil cyan */
[data-theme="light"] body.holo-mode .left-nav .nav-item {
    color: #475569 !important;
    border-radius: 8px;
    margin: 1px 8px;
    transition: all 0.15s ease;
}
[data-theme="light"] body.holo-mode .left-nav .nav-item:hover {
    background: #F1F5F9 !important;
    color: #0F172A !important;
}
[data-theme="light"] body.holo-mode .left-nav .nav-item.active {
    background: #F1F5F9 !important;
    color: #0F172A !important;
    border-left: none !important;
    margin-left: 8px;
    font-weight: 600 !important;
    box-shadow: none !important;
    position: relative;
}
[data-theme="light"] body.holo-mode .left-nav .nav-item.active::before {
    content: '';
    position: absolute;
    left: -8px; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 18px;
    background: #0EA5E9;
    border-radius: 0 2px 2px 0;
}
[data-theme="light"] body.holo-mode .left-nav .nav-item.active svg {
    color: #0EA5E9 !important;
}

/* Top-bar #topFixedBar (X + annee selector) en mode clair */
[data-theme="light"] body.holo-mode .menu-toggle-btn {
    border-color: #E2E8F0 !important;
    background: #FFFFFF !important;
    color: #64748B !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
[data-theme="light"] body.holo-mode .menu-toggle-btn:hover {
    background: #F1F5F9 !important;
    color: #0F172A !important;
}
[data-theme="light"] body.holo-mode #anneeWrap {
    background: #FFFFFF !important;
    border-color: #E2E8F0 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
}
[data-theme="light"] body.holo-mode #anneeWrap button {
    color: #64748B !important;
    border-color: #E2E8F0 !important;
}
[data-theme="light"] body.holo-mode #anneeWrap button:hover {
    background: #F1F5F9 !important;
    color: #0EA5E9 !important;
}
[data-theme="light"] body.holo-mode #adminAnnee {
    color: #0F172A !important;
}
[data-theme="light"] body.holo-mode .left-nav .nav-item .nav-label {
    color: inherit !important;
    font-weight: 500;
}
[data-theme="light"] body.holo-mode .left-nav .nav-item.active .nav-label {
    font-weight: 600;
}

/* Logo nav */
[data-theme="light"] body.holo-mode .left-nav .nav-logo {
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    padding-bottom: 16px;
}

/* Top bar : accent boutons */
[data-theme="light"] body.holo-mode #topFixedBar,
[data-theme="light"] body.holo-mode #topBarButtons {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

/* Boutons header (notif, theme, refresh, quitter) */
[data-theme="light"] body.holo-mode #topBarButtons button {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #475569 !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    transition: all 0.15s ease;
}
[data-theme="light"] body.holo-mode #topBarButtons button:hover {
    background: rgba(14, 165, 233, 0.08) !important;
    color: #0EA5E9 !important;
    border-color: rgba(14, 165, 233, 0.3) !important;
    transform: translateY(-1px);
}

/* Titres et sous-titres */
[data-theme="light"] body.holo-mode #adminTitle,
[data-theme="light"] body.holo-mode h1,
[data-theme="light"] body.holo-mode h2 {
    color: #0F172A !important;
    letter-spacing: -0.02em;
}
[data-theme="light"] body.holo-mode #adminSubtitle {
    color: #64748B !important;
}

/* Cartes de contenu neutres (statistiques, listes simples) - PAS les cartes colorees */
[data-theme="light"] body.holo-mode .info-card,
[data-theme="light"] body.holo-mode .dash-row {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.03);
    color: #0F172A;
    transition: all 0.2s ease;
}
[data-theme="light"] body.holo-mode .info-card:hover,
[data-theme="light"] body.holo-mode .dash-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(14, 165, 233, 0.08);
    border-color: rgba(14, 165, 233, 0.2);
}

/* Cartes colorees (services, agents) : ombre coloree assortie au gradient */
[data-theme="light"] body.holo-mode [onclick*="openServiceWindow"],
[data-theme="light"] body.holo-mode [onclick*="openAgentWindowHFSQL"] {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04) !important;
    transition: all 0.2s ease;
}
[data-theme="light"] body.holo-mode [onclick*="openServiceWindow"]:hover,
[data-theme="light"] body.holo-mode [onclick*="openAgentWindowHFSQL"]:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06) !important;
}

/* Cartes admission, evenement, biblio : fond clair quand pas de gradient inline */
[data-theme="light"] body.holo-mode [onclick*="openAdmissionDrawer"],
[data-theme="light"] body.holo-mode [onclick*="openEventWindow"],
[data-theme="light"] body.holo-mode [onclick*="openBookWindow"],
[data-theme="light"] body.holo-mode [onclick*="openCourseWindow"] {
    transition: all 0.2s ease;
}
[data-theme="light"] body.holo-mode [onclick*="openAdmissionDrawer"]:hover,
[data-theme="light"] body.holo-mode [onclick*="openEventWindow"]:hover,
[data-theme="light"] body.holo-mode [onclick*="openBookWindow"]:hover,
[data-theme="light"] body.holo-mode [onclick*="openCourseWindow"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.12);
}

/* KPI cards (Concours, Plans paiement, etc) */
[data-theme="light"] body.holo-mode [style*="grid-template-columns:repeat"] > div[style*="border-radius"] {
    /* Garde le gradient/couleur d'origine pour les KPI mais ajoute ombre legere */
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

/* Boutons CTA principaux (+ Nouveau...) */
[data-theme="light"] body.holo-mode button[onclick*="newServiceWindow"],
[data-theme="light"] body.holo-mode button[onclick*="newAgentWindow"],
[data-theme="light"] body.holo-mode button[onclick*="newEventWindow"],
[data-theme="light"] body.holo-mode button[onclick*="new"][onclick*="Window"] {
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.25), 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* Tables */
[data-theme="light"] body.holo-mode table {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
[data-theme="light"] body.holo-mode table thead {
    background: linear-gradient(180deg, rgba(241, 245, 249, 1) 0%, rgba(241, 245, 249, 0.7) 100%);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
[data-theme="light"] body.holo-mode table thead th {
    color: #475569 !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
[data-theme="light"] body.holo-mode table tbody tr {
    border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}
[data-theme="light"] body.holo-mode table tbody tr:hover {
    background: rgba(14, 165, 233, 0.04);
}
[data-theme="light"] body.holo-mode table tbody td {
    color: #334155 !important;
}

/* Footer */
[data-theme="light"] body.holo-mode footer,
[data-theme="light"] body.holo-mode .landing-footer {
    color: #94A3B8 !important;
}

/* Mesh / canvas : moins visible en mode clair */
[data-theme="light"] body.holo-mode #meshCanvas {
    opacity: 0.3;
    mix-blend-mode: multiply;
}

/* Floating action buttons (chat, video, ...) */
[data-theme="light"] body.holo-mode [style*="position:fixed"][style*="bottom"][style*="border-radius:50%"] {
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.25), 0 2px 6px rgba(15, 23, 42, 0.08);
}

/* CONTENU DYNAMIQUE : forcer texte lisible sur les inline-styles blanc */
[data-theme="light"] body.holo-mode .dash-content h1,
[data-theme="light"] body.holo-mode .dash-content h2,
[data-theme="light"] body.holo-mode .dash-content h3,
[data-theme="light"] body.holo-mode #adminContent h1,
[data-theme="light"] body.holo-mode #adminContent h2,
[data-theme="light"] body.holo-mode #adminContent h3 {
    color: #0F172A !important;
}
/* Tous les textes blancs inline → noir/gris */
[data-theme="light"] body.holo-mode .dash-content [style*="color:white"],
[data-theme="light"] body.holo-mode #adminContent [style*="color:white"] {
    color: #0F172A !important;
}
[data-theme="light"] body.holo-mode .dash-content [style*="color:rgba(255,255,255,0.9)"],
[data-theme="light"] body.holo-mode .dash-content [style*="color:rgba(255,255,255,0.8)"],
[data-theme="light"] body.holo-mode .dash-content [style*="color:rgba(255,255,255,0.75)"],
[data-theme="light"] body.holo-mode #adminContent [style*="color:rgba(255,255,255,0.9)"],
[data-theme="light"] body.holo-mode #adminContent [style*="color:rgba(255,255,255,0.75)"] {
    color: #1E293B !important;
}
[data-theme="light"] body.holo-mode .dash-content [style*="color:rgba(255,255,255,0.7)"],
[data-theme="light"] body.holo-mode .dash-content [style*="color:rgba(255,255,255,0.6)"],
[data-theme="light"] body.holo-mode .dash-content [style*="color:rgba(255,255,255,0.5)"],
[data-theme="light"] body.holo-mode .dash-content [style*="color:rgba(255,255,255,0.55)"],
[data-theme="light"] body.holo-mode #adminContent [style*="color:rgba(255,255,255,0.7)"],
[data-theme="light"] body.holo-mode #adminContent [style*="color:rgba(255,255,255,0.5)"],
[data-theme="light"] body.holo-mode #adminContent [style*="color:rgba(255,255,255,0.55)"] {
    color: #475569 !important;
}
[data-theme="light"] body.holo-mode .dash-content [style*="color:rgba(255,255,255,0.4)"],
[data-theme="light"] body.holo-mode .dash-content [style*="color:rgba(255,255,255,0.3)"],
[data-theme="light"] body.holo-mode #adminContent [style*="color:rgba(255,255,255,0.4)"],
[data-theme="light"] body.holo-mode #adminContent [style*="color:rgba(255,255,255,0.3)"] {
    color: #94A3B8 !important;
}
/* Backgrounds legers blancs (rgba(255,255,255,0.0X)) → fond plus clair en mode light */
[data-theme="light"] body.holo-mode .dash-content [style*="background:rgba(255,255,255,0.04)"],
[data-theme="light"] body.holo-mode .dash-content [style*="background:rgba(255,255,255,0.03)"],
[data-theme="light"] body.holo-mode .dash-content [style*="background:rgba(255,255,255,0.05)"],
[data-theme="light"] body.holo-mode #adminContent [style*="background:rgba(255,255,255,0.04)"] {
    background: rgba(15,23,42,0.03) !important;
}
[data-theme="light"] body.holo-mode .dash-content [style*="background:rgba(255,255,255,0.06)"],
[data-theme="light"] body.holo-mode .dash-content [style*="background:rgba(255,255,255,0.08)"] {
    background: rgba(15,23,42,0.05) !important;
}
[data-theme="light"] body.holo-mode .dash-content [style*="border-color:rgba(255,255,255"],
[data-theme="light"] body.holo-mode .dash-content [style*="border:1px solid rgba(255,255,255"] {
    border-color: rgba(15,23,42,0.08) !important;
}

/* Recherche / search inputs */
[data-theme="light"] body.holo-mode .search-input,
[data-theme="light"] body.holo-mode #adminSearchInput {
    background: #FFFFFF !important;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    color: #0F172A !important;
    transition: all 0.15s ease;
}
[data-theme="light"] body.holo-mode .search-input:focus,
[data-theme="light"] body.holo-mode #adminSearchInput:focus {
    border-color: #0EA5E9 !important;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}
[data-theme="light"] body.holo-mode .search-input::placeholder {
    color: #94A3B8 !important;
}

body.holo-mode::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(236, 72, 153, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(34, 211, 238, 0.1) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    animation: holoBgShift 20s ease-in-out infinite alternate;
}

body.holo-mode::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(34, 211, 238, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

@keyframes holoBgShift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-2%, 1%) scale(1.05); }
    100% { transform: translate(2%, -1%) scale(1); }
}

/* ==================================================
   GLASSMORPHISM 2.0 — cards, panels, drawers
   ================================================== */
.holo-card {
    background: var(--holo-bg-card);
    border: var(--holo-border-subtle);
    border-radius: var(--holo-radius-lg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    box-shadow: var(--holo-shadow-card);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.holo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 50%);
    pointer-events: none;
    border-radius: inherit;
}

.holo-card:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 211, 238, 0.3);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(34, 211, 238, 0.15) inset,
        0 0 30px rgba(34, 211, 238, 0.1);
}

/* Card with holo gradient border */
.holo-card-gradient {
    position: relative;
    background: var(--holo-bg-card);
    border-radius: var(--holo-radius-lg);
    backdrop-filter: blur(16px) saturate(180%);
    padding: 24px;
}

.holo-card-gradient::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: var(--holo-gradient-iris);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.6;
    animation: holoBorderShift 8s linear infinite;
}

@keyframes holoBorderShift {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* ==================================================
   HOLOGRAPHIC SHIMMER — animated gradient sweep
   ================================================== */
.holo-shimmer {
    position: relative;
    overflow: hidden;
}

.holo-shimmer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        transparent 0%,
        transparent 40%,
        rgba(255, 255, 255, 0.06) 50%,
        transparent 60%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: holoShimmerSweep 3.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes holoShimmerSweep {
    0% { background-position: 200% 0; }
    50% { background-position: -50% 0; }
    100% { background-position: -50% 0; }
}

/* ==================================================
   BUTTONS — holo iris with glow
   ================================================== */
.holo-btn {
    position: relative;
    padding: 12px 28px;
    background: var(--holo-gradient-iris);
    background-size: 200% 200%;
    border: none;
    border-radius: var(--holo-radius-md);
    color: white;
    font-family: var(--holo-font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
    overflow: hidden;
}

.holo-btn:hover {
    background-position: 100% 100%;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.5), var(--holo-glow-cyan);
}

.holo-btn:active {
    transform: translateY(0);
}

.holo-btn-ghost {
    background: transparent;
    border: 1.5px solid rgba(34, 211, 238, 0.4);
    color: var(--holo-cyan-glow);
    backdrop-filter: blur(10px);
}

.holo-btn-ghost:hover {
    background: rgba(34, 211, 238, 0.1);
    border-color: var(--holo-cyan-glow);
    box-shadow: var(--holo-glow-cyan);
}

/* ==================================================
   INPUTS — minimal glass with focus glow
   ================================================== */
.holo-input,
.holo-input-wrap input,
.holo-input-wrap select,
.holo-input-wrap textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: var(--holo-radius-md);
    color: white;
    font-family: var(--holo-font-body);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.holo-input:focus,
.holo-input-wrap input:focus,
.holo-input-wrap select:focus,
.holo-input-wrap textarea:focus {
    border-color: var(--holo-cyan-glow);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15), 0 0 20px rgba(34, 211, 238, 0.1);
}

.holo-label {
    display: block;
    font-family: var(--holo-font-display);
    font-size: 11px;
    font-weight: 500;
    color: rgba(148, 163, 184, 0.8);
    margin-bottom: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ==================================================
   TYPOGRAPHY — display + numeric
   ================================================== */
.holo-h1, .holo-h2, .holo-h3 {
    font-family: var(--holo-font-display);
    font-weight: 700;
    color: white;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.holo-h1 { font-size: clamp(28px, 4vw, 44px); }
.holo-h2 { font-size: clamp(22px, 3vw, 32px); }
.holo-h3 { font-size: clamp(16px, 2vw, 20px); }

.holo-num {
    font-family: var(--holo-font-mono);
    font-weight: 600;
    font-feature-settings: 'tnum';
}

/* Holographic text — gradient with shift */
.holo-text-iris {
    background: var(--holo-gradient-iris);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: holoTextShift 6s ease-in-out infinite;
}

@keyframes holoTextShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ==================================================
   KPI CARDS — hero stat with glow
   ================================================== */
.holo-kpi {
    background: var(--holo-bg-card);
    border: var(--holo-border-subtle);
    border-radius: var(--holo-radius-lg);
    padding: 24px;
    backdrop-filter: blur(16px) saturate(180%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.holo-kpi::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--holo-gradient-iris);
    opacity: 0.6;
}

.holo-kpi-label {
    font-family: var(--holo-font-display);
    font-size: 11px;
    font-weight: 500;
    color: rgba(148, 163, 184, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.holo-kpi-value {
    font-family: var(--holo-font-mono);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 4px;
}

.holo-kpi-trend {
    font-size: 12px;
    color: var(--holo-lime-glow);
    font-weight: 600;
}

.holo-kpi-trend.down { color: var(--holo-pink-glow); }

/* ==================================================
   BADGES — neon pills
   ================================================== */
.holo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: var(--holo-radius-pill);
    font-family: var(--holo-font-display);
    font-size: 11px;
    font-weight: 600;
    color: var(--holo-cyan-glow);
    letter-spacing: 0.02em;
}

.holo-badge.success {
    background: rgba(132, 204, 22, 0.12);
    border-color: rgba(132, 204, 22, 0.3);
    color: var(--holo-lime-glow);
}

.holo-badge.warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--holo-amber-glow);
}

.holo-badge.danger {
    background: rgba(236, 72, 153, 0.12);
    border-color: rgba(236, 72, 153, 0.3);
    color: var(--holo-pink-glow);
}

/* ==================================================
   SIDEBAR — futuristic minimal
   ================================================== */
.holo-sidebar {
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-right: var(--holo-border-subtle);
    position: relative;
}

.holo-sidebar::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(34, 211, 238, 0.3) 30%, rgba(139, 92, 246, 0.3) 70%, transparent);
}

.holo-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    margin: 2px 8px;
    border-radius: var(--holo-radius-md);
    color: rgba(203, 213, 225, 0.7);
    font-family: var(--holo-font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.holo-nav-item:hover {
    background: rgba(148, 163, 184, 0.06);
    color: white;
    transform: translateX(2px);
}

.holo-nav-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(139, 92, 246, 0.12));
    color: white;
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.3) inset, 0 4px 12px rgba(99, 102, 241, 0.15);
}

.holo-nav-item.active::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--holo-gradient-iris);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.8);
}

.holo-nav-section {
    font-family: var(--holo-font-display);
    font-size: 10px;
    font-weight: 600;
    color: rgba(100, 116, 139, 0.6);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 16px 16px 8px;
    margin-top: 8px;
}

/* ==================================================
   ANIMATIONS — floating, pulsing, breathing
   ================================================== */
@keyframes holoFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(0.5deg); }
}

@keyframes holoPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.02); }
}

@keyframes holoSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

.holo-float { animation: holoFloat 6s ease-in-out infinite; }
.holo-pulse { animation: holoPulse 3s ease-in-out infinite; }
.holo-spin { animation: holoSpin 12s linear infinite; }
.holo-fade-in { animation: holoFadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards; }

/* ==================================================
   SCROLLBAR — minimal holo
   ================================================== */
body.holo-mode ::-webkit-scrollbar { width: 8px; height: 8px; }
body.holo-mode ::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.4); }
body.holo-mode ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.4), rgba(139, 92, 246, 0.4));
    border-radius: 4px;
}
body.holo-mode ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.7), rgba(139, 92, 246, 0.7));
}

/* ==================================================
   UTILITY — depth blur layers
   ================================================== */
.holo-blur-bg { backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); }
.holo-blur-sm { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.holo-blur-md { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.holo-blur-lg { backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }

/* ==================================================
   ADMIN SIDEBAR OVERRIDES — when holo-mode active
   ================================================== */
body.holo-mode .left-nav,
body.holo-mode #adminLeftNav,
body.holo-mode nav.left-nav {
    background: rgba(2, 6, 23, 0.65) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border-right: 1px solid rgba(148, 163, 184, 0.08) !important;
    /* GARDE position:fixed (defini par .left-nav de base) pour ne pas pousser le contenu */
    z-index: 50;
}

body.holo-mode .left-nav::after,
body.holo-mode #adminLeftNav::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(34, 211, 238, 0.4) 30%, rgba(139, 92, 246, 0.4) 70%, transparent 100%);
    pointer-events: none;
}

body.holo-mode .nav-section,
body.holo-mode .role-menu.nav-section {
    font-family: var(--holo-font-display) !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    color: rgba(100, 116, 139, 0.65) !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
    padding: 18px 18px 8px !important;
    margin-top: 6px !important;
}

body.holo-mode .nav-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 14px !important;
    margin: 1px 8px !important;
    border-radius: 10px !important;
    color: rgba(203, 213, 225, 0.75) !important;
    font-family: var(--holo-font-body) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    background: transparent !important;
    border: none !important;
}

body.holo-mode .nav-item svg {
    flex-shrink: 0;
    transition: all 0.2s ease;
    opacity: 0.85;
}

body.holo-mode .nav-item:hover {
    background: rgba(148, 163, 184, 0.06) !important;
    color: white !important;
    transform: translateX(2px);
}

body.holo-mode .nav-item:hover svg {
    opacity: 1;
    transform: scale(1.05);
}

body.holo-mode .nav-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(139, 92, 246, 0.14)) !important;
    color: white !important;
    box-shadow:
        inset 0 0 0 1px rgba(139, 92, 246, 0.35),
        0 4px 16px rgba(99, 102, 241, 0.15) !important;
}

body.holo-mode .nav-item.active::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: linear-gradient(180deg, var(--holo-cyan-glow), var(--holo-purple-glow));
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.8);
}

body.holo-mode .nav-item.active svg {
    color: var(--holo-cyan-glow) !important;
    stroke: var(--holo-cyan-glow) !important;
    filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.5));
    opacity: 1;
}

body.holo-mode .nav-spacer {
    flex: 1;
}

body.holo-mode .nav-user,
body.holo-mode #adminNavUser {
    margin: 14px 8px !important;
    padding: 10px 14px !important;
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(148, 163, 184, 0.1) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(8px);
}

/* ==================================================
   ADMIN TOPBAR — annee scolaire + buttons
   ================================================== */
body.holo-mode #topFixedBar {
    z-index: 60;
}

body.holo-mode #anneeWrap {
    background: rgba(2, 6, 23, 0.6) !important;
    border: 1px solid rgba(34, 211, 238, 0.25) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.08);
}

body.holo-mode #anneeWrap input {
    color: var(--holo-cyan-glow) !important;
    font-family: var(--holo-font-mono) !important;
}

body.holo-mode #anneeWrap button {
    color: var(--holo-cyan-glow) !important;
}

body.holo-mode #anneeWrap button:hover {
    background: rgba(34, 211, 238, 0.12) !important;
}

body.holo-mode .menu-toggle-btn {
    background: rgba(2, 6, 23, 0.6) !important;
    border: 1px solid rgba(34, 211, 238, 0.25) !important;
    backdrop-filter: blur(12px);
    color: var(--holo-cyan-glow) !important;
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.08);
}

/* Top right buttons */
body.holo-mode #topBarButtons button,
body.holo-mode #topBarButtons .btn {
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.15) !important;
    transition: all 0.2s ease;
}

body.holo-mode #topBarButtons button:hover {
    border-color: rgba(34, 211, 238, 0.4) !important;
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.15);
    transform: translateY(-1px);
}

/* ==================================================
   ADMIN DASHBOARD CONTENT — cards, KPIs
   ================================================== */
body.holo-mode .dash-content,
body.holo-mode #page-dashboard .dash-content {
    position: relative;
    z-index: 1;
}

body.holo-mode .dash-content h1 {
    font-family: var(--holo-font-display) !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    color: white !important;
}

/* Existing white cards / panels in dash become glass */
body.holo-mode .dash-content > div[style*="background:rgba(255,255,255,0.03)"],
body.holo-mode .dash-content > div[style*="background:rgba(255,255,255,0.04)"],
body.holo-mode .dash-content > div[style*="background:rgba(255,255,255,0.06)"] {
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
}

/* All buttons get hover glow */
body.holo-mode button {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Drawers - genDrawer uses light theme like etuDrawer (defined in admin.html) */

/* Float windows */
body.holo-mode .float-win {
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(148, 163, 184, 0.15) !important;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset !important;
}

/* ==================================================
   FORM INPUTS — globally enhanced
   ================================================== */
body.holo-mode input[type="text"]:focus,
body.holo-mode input[type="email"]:focus,
body.holo-mode input[type="tel"]:focus,
body.holo-mode input[type="password"]:focus,
body.holo-mode input[type="number"]:focus,
body.holo-mode input[type="date"]:focus,
body.holo-mode input[type="search"]:focus,
body.holo-mode select:focus,
body.holo-mode textarea:focus {
    border-color: rgba(34, 211, 238, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12), 0 0 20px rgba(34, 211, 238, 0.1) !important;
}

/* ==================================================
   LOGIN OVERLAYS — holographic immersion
   ================================================== */
body.holo-mode .login-overlay,
body.holo-mode #loginOverlay,
body.holo-mode #win-login,
body.holo-mode .login-card {
    background: rgba(2, 6, 23, 0.55) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border: 1px solid rgba(148, 163, 184, 0.12) !important;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(34, 211, 238, 0.08) inset,
        0 0 80px rgba(139, 92, 246, 0.15) !important;
    position: relative;
}

body.holo-mode .login-overlay::before,
body.holo-mode .login-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.4), rgba(139, 92, 246, 0.4), rgba(236, 72, 153, 0.3));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.4;
}

/* ==================================================
   HOMEPAGE — index.html holographic emergence
   Boutons qui jaillissent de la profondeur de l'univers
   ================================================== */

/* Boutons : flottent dans le fond puis se posent doucement (pas de cercles, pas de flash) */
body.holo-mode .spaces-grid {
    transform-style: flat;
}

body.holo-mode .space-btn {
    background: rgba(15, 23, 42, 0.5) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    border: 1px solid rgba(148, 163, 184, 0.12) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
    position: relative;
    overflow: hidden;
    animation: holoZoomFromDepth 1.2s cubic-bezier(0.22, 1, 0.36, 1) both !important;
    transform-origin: center center;
    will-change: transform, opacity, filter;
}

/* Zoom propre depuis la profondeur — aucune luminosite/flash, juste scale + blur */
/* Boutons : flottent en arriere-plan flous puis se posent — pas de zoom dramatique, pas de cercles */
@keyframes holoZoomFromDepth {
    0% {
        opacity: 0;
        transform: translate3d(0, 18px, 0) scale(0.97);
        filter: blur(12px);
    }
    60% {
        opacity: 0.65;
        transform: translate3d(0, 6px, 0) scale(0.99);
        filter: blur(3px);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
        filter: blur(0);
    }
}

/* Stagger orchestre — boutons apparaissent en cascade depuis le centre */
body.holo-mode .space-btn:nth-child(1) { animation-delay: 0.6s !important; }
body.holo-mode .space-btn:nth-child(2) { animation-delay: 0.75s !important; }
body.holo-mode .space-btn:nth-child(3) { animation-delay: 0.9s !important; }
body.holo-mode .space-btn:nth-child(4) { animation-delay: 1.1s !important; }
body.holo-mode .space-btn:nth-child(5) { animation-delay: 1.25s !important; }
body.holo-mode .space-btn:nth-child(6) { animation-delay: 1.4s !important; }
body.holo-mode .space-btn:nth-child(7) { animation-delay: 1.55s !important; }

/* (Pseudo-elements de bordure/halo desactives — l'utilisateur ne veut pas de cercles
   au moment ou les boutons prennent place. Conserves seulement pour le hover via .space-btn:hover ci-dessous.) */

body.holo-mode .space-btn:hover {
    transform: translateY(-4px) !important;
    border-color: rgba(34, 211, 238, 0.35) !important;
    background: rgba(15, 23, 42, 0.65) !important;
    box-shadow:
        0 14px 36px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(34, 211, 238, 0.18) inset !important;
}

/* Icone interieur — leve subtilement au hover */
body.holo-mode .space-btn .icon-wrap {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.holo-mode .space-btn:hover .icon-wrap {
    transform: translateY(-4px) scale(1.1) !important;
    filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.6));
}

/* Hero title : entree holographique */
body.holo-mode .hero-title {
    animation: holoTitleEmerge 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
    font-family: var(--holo-font-display) !important;
}

@keyframes holoTitleEmerge {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.92);
        filter: blur(12px);
        letter-spacing: 0.3em;
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
        letter-spacing: -0.02em;
    }
}

body.holo-mode .hero-subtitle {
    animation: holoSubEmerge 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

@keyframes holoSubEmerge {
    0% { opacity: 0; transform: translateY(-15px); filter: blur(8px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* Phone mockup : flotte plus subtilement */
body.holo-mode #phoneZone {
    animation: holoPhoneEmerge 1.8s cubic-bezier(0.16, 1, 0.3, 1) both !important;
}

@keyframes holoPhoneEmerge {
    0% {
        opacity: 0;
        transform: translateZ(-500px) scale(0.5);
        filter: blur(20px) brightness(1.5);
    }
    100% {
        opacity: 0.7;
        transform: translateZ(0) scale(1);
        filter: blur(0) brightness(1);
    }
}

/* (Big-bang flash supprime — l'utilisateur a demande sans flash) */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    body.holo-mode .space-btn,
    body.holo-mode .hero-title,
    body.holo-mode .hero-subtitle,
    body.holo-mode #phoneZone {
        animation: none !important;
    }
    body.holo-mode .landing-content::before {
        display: none;
    }
}

/* Mobile : adoucir l'effet 3D */
@media (max-width: 768px) {
    body.holo-mode .spaces-grid { perspective: 800px; }
    body.holo-mode .space-btn {
        animation-duration: 1.1s !important;
    }
    body.holo-mode .landing-content::before { display: none; }
}

/* ==================================================
   SPACE DRAWER — clic bouton accueil = drawer lateral droit
   ================================================== */
.space-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.5);
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.space-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.space-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 480px;
    max-width: 100vw;
    z-index: 1001;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border-left: 1px solid rgba(148, 163, 184, 0.18);
    color: white;
    box-shadow:
        -20px 0 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        -10px 0 80px var(--sp-color, rgba(34, 211, 238, 0.18));
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    display: flex;
    flex-direction: column;
}

.space-drawer.open {
    transform: translateX(0);
}

/* Bordure gradient holographique sur le bord gauche du drawer */
.space-drawer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: var(--sp-grad, linear-gradient(180deg, #22D3EE, #38BDF8));
    box-shadow: 0 0 16px var(--sp-color, rgba(34, 211, 238, 0.5));
    pointer-events: none;
}

.space-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 56px 32px 28px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s 0.2s ease, transform 0.4s 0.2s ease;
}

.space-drawer.open .space-drawer-content {
    opacity: 1;
    transform: translateY(0);
}

.sp-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 2;
}
.sp-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: scale(1.05);
}

.sp-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
    padding-right: 60px;
}

.sp-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 30px var(--sp-color, rgba(34, 211, 238, 0.4));
}

.sp-icon svg { width: 36px; height: 36px; stroke-width: 2; }

.sp-title-block { flex: 1; min-width: 0; }

.sp-title {
    font-family: var(--holo-font-display, 'Space Grotesk');
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
    line-height: 1.05;
}

.sp-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.sp-desc {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(226, 232, 240, 0.85);
    margin-bottom: 24px;
}

.sp-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}

.sp-feat {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.sp-feat-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.sp-feat-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
}

.sp-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
}

.sp-btn-primary, .sp-btn-secondary {
    flex: 1;
    padding: 14px 24px;
    border-radius: 12px;
    border: none;
    font-family: var(--holo-font-display, 'Space Grotesk');
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.02em;
}

.sp-btn-primary {
    background: var(--sp-grad, linear-gradient(135deg, #06B6D4, #0EA5E9));
    color: white;
    box-shadow: 0 6px 20px var(--sp-color, rgba(14, 165, 233, 0.35));
}

.sp-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px var(--sp-color, rgba(14, 165, 233, 0.5));
}

.sp-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sp-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

@media (max-width: 720px) {
    .space-drawer { width: 100vw; }
    .space-drawer-content { padding: 56px 20px 20px; }
    .sp-title { font-size: 22px; }
    .sp-icon { width: 50px; height: 50px; border-radius: 14px; }
    .sp-icon svg { width: 26px; height: 26px; }
    .sp-features { grid-template-columns: 1fr; }
    .sp-actions { flex-direction: column; }
}

/* ==================================================
   HERO HOLOGRAPHIQUE accueil — emblem + cartes UI flottantes
   ================================================== */
.holo-hero {
    position: relative;
    width: 520px;
    max-width: 95vw;
    height: 360px;
    margin: 0 auto 28px;
    perspective: 1400px;
    transform-style: preserve-3d;
    z-index: 1;
}

/* Anneaux orbitaux qui tournent doucement */
.hh-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    border: 1.2px dashed rgba(34, 211, 238, 0.18);
}
.hh-ring-1 { width: 180px; height: 180px; animation: hhRingSpin 24s linear infinite; }
.hh-ring-2 { width: 280px; height: 280px; border-style: dotted; border-color: rgba(167, 139, 250, 0.16); animation: hhRingSpin 38s linear infinite reverse; }
.hh-ring-3 { width: 380px; height: 380px; border-color: rgba(244, 114, 182, 0.12); animation: hhRingSpin 52s linear infinite; }
@keyframes hhRingSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* Grille radar SVG en fond */
.hh-grid {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 420px;
    height: 420px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0.55;
}

/* Emblem central — gradient bleu clair */
.hh-emblem {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130px;
    height: 130px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.95), rgba(56, 189, 248, 0.9), rgba(96, 165, 250, 0.8));
    backdrop-filter: blur(8px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.18) inset,
        0 0 40px rgba(56, 189, 248, 0.5),
        0 0 90px rgba(34, 211, 238, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: hhEmblemFloat 6s ease-in-out infinite;
    z-index: 5;
}

.hh-emblem-glow {
    position: absolute;
    inset: -20px;
    border-radius: inherit;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.4) 0%, rgba(56, 189, 248, 0.22) 40%, transparent 70%);
    filter: blur(20px);
    z-index: -1;
    animation: hhEmblemPulse 3s ease-in-out infinite;
}

.hh-emblem-core {
    text-align: center;
    line-height: 1;
}

.hh-emblem-logo {
    width: 76px;
    height: 76px;
    object-fit: contain;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.4));
    display: block;
    margin: 0 auto 6px;
}

.hh-emblem-text {
    font-family: var(--holo-font-display, 'Space Grotesk');
    font-size: 38px;
    font-weight: 800;
    color: white;
    letter-spacing: 2px;
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.5);
}

.hh-emblem-sub {
    font-size: 8px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 4px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
}

@keyframes hhEmblemFloat {
    0%, 100% { transform: translate(-50%, -50%) translateY(0) rotate(0deg); }
    50% { transform: translate(-50%, -50%) translateY(-6px) rotate(2deg); }
}

@keyframes hhEmblemPulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

/* Formes geometriques flottantes */
.hh-shape {
    position: absolute;
    width: 32px;
    height: 32px;
    pointer-events: none;
    opacity: 0.85;
}
.hh-shape-tri { top: 8%; left: 18%; animation: hhFloat1 7s ease-in-out infinite; }
.hh-shape-circ { top: 14%; right: 16%; width: 28px; height: 28px; animation: hhFloat2 9s ease-in-out infinite; }
.hh-shape-pent { bottom: 22%; left: 12%; animation: hhFloat3 8s ease-in-out infinite; }
.hh-shape-square { bottom: 14%; right: 10%; animation: hhFloat1 11s ease-in-out infinite reverse; }
.hh-shape-cross { top: 50%; right: 4%; width: 22px; height: 22px; animation: hhFloat2 6s ease-in-out infinite; }

@keyframes hhFloat1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(8px, -12px) rotate(20deg); }
}
@keyframes hhFloat2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-10px, 8px) rotate(-15deg); }
}
@keyframes hhFloat3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(6px, -8px) rotate(10deg); }
    66% { transform: translate(-4px, 6px) rotate(-8deg); }
}

/* Cartes UI flottantes */
.hh-card {
    position: absolute;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    color: white;
    font-size: 11px;
    font-family: var(--holo-font-body, Inter);
    min-width: 150px;
    pointer-events: none;
    z-index: 4;
}

/* Positions et flottement individuel */
.hh-card-1 { top: 4%; left: 0; animation: hhCardFloat 6s ease-in-out infinite; transform: rotate(-3deg); }
.hh-card-2 { top: 14%; right: 0; animation: hhCardFloat 7s ease-in-out 0.5s infinite; transform: rotate(2deg); }
.hh-card-3 { bottom: 8%; left: 4%; animation: hhCardFloat 8s ease-in-out 1s infinite; transform: rotate(2deg); }
.hh-card-4 { bottom: 4%; right: 4%; animation: hhCardFloat 7.5s ease-in-out 1.5s infinite; transform: rotate(-2deg); }

@keyframes hhCardFloat {
    0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
    50% { transform: translateY(-6px) rotate(var(--r, 0deg)); }
}

.hh-card-1 { --r: -3deg; }
.hh-card-2 { --r: 2deg; }
.hh-card-3 { --r: 2deg; }
.hh-card-4 { --r: -2deg; }

.hh-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.hh-card-icon {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.hh-card-title {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    flex: 1;
    letter-spacing: 0.02em;
}

.hh-card-trend {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
}

.hh-card-trend.up {
    background: rgba(132, 204, 22, 0.18);
    color: #A3E635;
    border: 1px solid rgba(132, 204, 22, 0.3);
}

/* Cartes contenu */
.hh-card-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 32px;
}

.hh-card-bars span {
    flex: 1;
    background: linear-gradient(180deg, #22D3EE, #0EA5E9);
    border-radius: 2px;
    box-shadow: 0 0 6px rgba(34, 211, 238, 0.4);
    animation: hhBarPulse 2s ease-in-out infinite;
}

.hh-card-bars span:nth-child(2) { animation-delay: 0.2s; }
.hh-card-bars span:nth-child(3) { animation-delay: 0.4s; }
.hh-card-bars span:nth-child(4) { animation-delay: 0.6s; }
.hh-card-bars span:nth-child(5) { animation-delay: 0.8s; }
.hh-card-bars span:nth-child(6) { animation-delay: 1s; }

@keyframes hhBarPulse {
    0%, 100% { opacity: 0.7; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.08); transform-origin: bottom; }
}

/* Donut chart */
.hh-donut {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 4px auto 0;
}

.hh-donut svg {
    width: 100%;
    height: 100%;
}

.hh-donut-val {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--holo-font-mono, monospace);
    font-size: 14px;
    font-weight: 700;
    color: #C4B5FD;
}

/* Online dot */
.hh-online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #84CC16;
    box-shadow: 0 0 8px #84CC16;
    animation: hhOnlinePulse 1.5s ease-in-out infinite;
}

@keyframes hhOnlinePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.15); }
}

/* Avatars list */
.hh-avatars {
    display: flex;
    align-items: center;
    gap: -8px;
    margin-top: 4px;
}

.hh-avatars > span {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid rgba(15, 23, 42, 0.9);
    margin-left: -8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 700;
    color: white;
}

.hh-avatars > span:first-child { margin-left: 0; }

.hh-avatars .hh-more {
    background: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.7);
    font-size: 8px;
}

/* Sparkline */
.hh-spark {
    width: 100%;
    height: 30px;
    margin-top: 4px;
}

/* Mobile : reduire la scene */
@media (max-width: 720px) {
    .holo-hero { width: 360px; height: 280px; }
    .hh-emblem { width: 100px; height: 100px; border-radius: 22px; }
    .hh-emblem-text { font-size: 28px; }
    .hh-emblem-sub { font-size: 6px; }
    .hh-card { min-width: 110px; padding: 8px 10px; font-size: 9px; }
    .hh-card-icon { width: 18px; height: 18px; font-size: 10px; }
    .hh-card-title { font-size: 9px; }
    .hh-shape { width: 24px; height: 24px; }
    .hh-ring-3 { width: 280px; height: 280px; }
    .hh-grid { width: 320px; height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
    .hh-ring, .hh-emblem, .hh-emblem-glow, .hh-shape, .hh-card, .hh-card-bars span, .hh-online-dot {
        animation: none !important;
    }
}

/* ==================================================
   MOBILE — reduce effects on low-end Android
   ================================================== */
@media (max-width: 768px) {
    body.holo-mode::before { animation: none; opacity: 0.6; }
    body.holo-mode::after { background-size: 30px 30px; }
    .holo-card-gradient::after { animation: none; }
    .holo-shimmer::before { animation-duration: 5s; }
}

@media (prefers-reduced-motion: reduce) {
    body.holo-mode::before,
    .holo-card-gradient::after,
    .holo-shimmer::before,
    .holo-text-iris,
    .holo-float,
    .holo-pulse,
    .holo-spin {
        animation: none !important;
    }
}
