/* ════════════════════════════════════════════════════════
   NEXUS · main.css — Single Source of Truth
   §1 Design Tokens & Base  §2 Layout & Grid
   §3 Components            §4 Responsive
   ════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────
   §1  DESIGN TOKENS & BASE
   ───────────────────────────────────────────────────────── */
/* fonts loaded via <link> in HTML */

/* ════════════════════════════════════════════════════════
   NEXUS · Design System
   Base = C (Ivoire · Graphite · Miel)
   Hybridé B (Violet doux pour interactions)
   ════════════════════════════════════════════════════════ */

/* ── Breakpoints de référence (les media queries réelles sont dans responsive.css) ──
   ──xs  360px  ·  iPhone SE
   ──sm  480px  ·  iPhone standard
   ──md  640px  ·  Grands téléphones / mini-tablettes
   ──ml  800px  ·  Tablettes portrait / paysage étroit
   ──lg  900px  ·  iPad portrait
   ──xl  1060px ·  Laptops compacts
   ──xxl 1200px ·  Desktop standard
   ──retina  min-resolution: 2dppx
   ── */

:root {
    /* ── Fond ivoire · papier ── */
    --bg:        #F7F4EE;
    --bg-1:      #FDFAF5;
    --bg-2:      #F1EDE5;
    --bg-3:      #E9E4D8;
    --bg-4:      #DDD6C8;

    /* ── Bordures ── */
    --border:        rgba(60,50,30,0.08);
    --border-md:     rgba(60,50,30,0.14);
    --border-strong: rgba(60,50,30,0.26);

    /* ── Accent principal : Miel chaud ── */
    --honey:        #C4891F;
    --honey-bright: #E0A030;
    --honey-dim:    rgba(196,137,31,0.14);
    --honey-faint:  rgba(196,137,31,0.07);

    /* ── Accent secondaire : Violet B (hover, pills, interactions) ── */
    --violet:       #6B63E8;
    --violet-dim:   rgba(107,99,232,0.12);
    --violet-faint: rgba(107,99,232,0.06);
    --violet-text:  #4A43BF;

    /* ── Texte ── */
    --text:   #231D11;
    --text-2: #6B6355;
    --text-3: #A89E8D;
    --text-4: #C8C1B4;

    /* ── Sémantique ── */
    --ok:   #1F7A4A;
    --ok-bg: rgba(31,122,74,0.08);
    --warn:  #A06020;
    --warn-bg: rgba(160,96,32,0.10);
    --err:   #A03020;
    --err-bg: rgba(160,48,32,0.08);

    /* ── Typographie ── */
    --display: "Fraunces", Georgia, serif;   /* grands titres + italic */
    --sans:    "Figtree", system-ui, sans-serif; /* UI, labels, body */
    --mono:    "DM Mono", "Courier New", monospace;

    /* ─═ Échelle Typographique Fluide (clamp) ═─ */
    --fs-xs:   clamp(0.65rem, 0.62rem + 0.15vw, 0.75rem);   /* 10.4–12px   */
    --fs-sm:   clamp(0.72rem, 0.69rem + 0.15vw, 0.82rem);   /* 11.5–13.1px */
    --fs-base: clamp(0.88rem, 0.84rem + 0.20vw, 1.00rem);   /* 14–16px     */
    --fs-md:   clamp(0.94rem, 0.89rem + 0.25vw, 1.09rem);   /* 15–17.4px   */
    --fs-lg:   clamp(1.05rem, 0.97rem + 0.40vw, 1.30rem);   /* 16.8–20.8px */
    --fs-xl:   clamp(1.20rem, 1.08rem + 0.60vw, 1.55rem);   /* 19.2–24.8px */
    --fs-2xl:  clamp(1.40rem, 1.20rem + 1.00vw, 2.00rem);   /* 22.4–32px   */
    --fs-3xl:  clamp(1.60rem, 1.30rem + 1.50vw, 2.50rem);   /* 25.6–40px   */
    --fs-4xl:  clamp(1.80rem, 1.30rem + 2.50vw, 3.20rem);   /* 28.8–51.2px */
    --fs-5xl:  clamp(2.00rem, 1.30rem + 3.50vw, 4.00rem);   /* 32–64px     */

    /* ─═ Échelle d'Espacement Fluide (clamp) ═─ */
    --space-3xs: clamp(0.20rem, 0.18rem + 0.10vw, 0.25rem);  /* 3.2–4px     */
    --space-2xs: clamp(0.35rem, 0.30rem + 0.25vw, 0.50rem);  /* 5.6–8px     */
    --space-xs:  clamp(0.50rem, 0.45rem + 0.25vw, 0.65rem);  /* 8–10.4px    */
    --space-sm:  clamp(0.65rem, 0.58rem + 0.35vw, 0.85rem);  /* 10.4–13.6px */
    --space-md:  clamp(0.85rem, 0.75rem + 0.50vw, 1.15rem);  /* 13.6–18.4px */
    --space-lg:  clamp(1.15rem, 1.00rem + 0.75vw, 1.60rem);  /* 18.4–25.6px */
    --space-xl:  clamp(1.50rem, 1.25rem + 1.25vw, 2.25rem);  /* 24–36px     */
    --space-2xl: clamp(1.80rem, 1.50rem + 1.50vw, 2.75rem);  /* 28.8–44px   */
    --space-3xl: clamp(2.20rem, 1.80rem + 2.00vw, 3.50rem);  /* 35.2–56px   */
    --space-4xl: clamp(2.80rem, 2.20rem + 3.00vw, 4.50rem);  /* 44.8–72px   */

    /* ── Anciens tokens d'espace (rétrocompatibles) ── */
    --r-xs: var(--space-2xs);
    --r-sm: var(--space-xs);
    --r-md: var(--space-sm);
    --r-lg: var(--space-md);
    --r-xl: var(--space-lg);
    --r-2xl: var(--space-xl);

    /* ── Conteneurs ── */
    --max-w: 1100px;
    --max-w-sm: 720px;

    /* ── Safe Areas (iOS) ── */
    --sa-top:    env(safe-area-inset-top, 0px);
    --sa-bottom: env(safe-area-inset-bottom, 0px);
    --sa-left:   env(safe-area-inset-left, 0px);
    --sa-right:  env(safe-area-inset-right, 0px);

    /* ── Ombres légères (fond clair = ombres subtiles) ── */
    --shadow-xs: 0 1px 4px rgba(60,50,30,0.07);
    --shadow-sm: 0 2px 10px rgba(60,50,30,0.08);
    --shadow-md: 0 4px 24px rgba(60,50,30,0.10);

    /* ── Rayons de bordure ── */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 999px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: var(--fs-base);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Padding safe area globale : bottom pour home indicator iPhone X+ */
    padding-top: var(--sa-top);
    padding-bottom: var(--sa-bottom);
}

/* Grain papier — très subtil, marque de fabrique */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.016;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
    background-size: 220px 220px;
}

main, section, header, footer, nav { position: relative; z-index: 1; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
input, select, textarea { font-size: max(16px, 1em); }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
strong { color: var(--text); font-weight: 700; }

::selection { background: var(--violet-dim); color: var(--text); }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { border-radius: 99px; background: var(--bg-4); }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ── Toast ── */
#toast-root {
    position: fixed;
    inset: auto var(--space-md) var(--space-md) auto;
    display: grid; gap: var(--space-2xs); z-index: 9000;
}
.toast {
    min-width: 220px; max-width: 320px;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-1);
    color: var(--text-2);
    font-family: var(--mono);
    font-size: var(--fs-xs);
    box-shadow: var(--shadow-md);
    animation: toast-in 200ms cubic-bezier(0.22,1,0.36,1);
}
.toast[data-tone="success"] { border-color: rgba(31,122,74,0.25); color: var(--ok); }
.toast[data-tone="warning"]  { border-color: rgba(160,96,32,0.25); color: var(--warn); }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.noscript-card {
    position: fixed; inset: auto var(--space-sm) var(--space-sm);
    z-index: 100;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    background: var(--bg-1);
    border: 1px solid var(--border-md);
    font-family: var(--mono);
    font-size: var(--fs-xs);
    box-shadow: var(--shadow-sm);
}
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0; }
body.has-overlay, body.has-info-modal { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration:0.01ms !important; transition-duration:0.01ms !important; }
}

/* ════════════════════════════════════════════════════════
   DARK MODE
   Activé par : [data-theme="dark"] sur <html>
   OU prefers-color-scheme: dark (si pas de préférence stockée)
   ════════════════════════════════════════════════════════ */

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
    --bg:        #141210;
    --bg-1:      #1C1916;
    --bg-2:      #231F1B;
    --bg-3:      #2C2720;
    --bg-4:      #38322A;
    --border:        rgba(255,240,210,0.09);
    --border-md:     rgba(255,240,210,0.15);
    --border-strong: rgba(255,240,210,0.28);
    --honey:        #D4973A;
    --honey-bright: #EBB050;
    --honey-dim:    rgba(212,151,58,0.18);
    --honey-faint:  rgba(212,151,58,0.09);
    --violet:       #8880F0;
    --violet-dim:   rgba(136,128,240,0.16);
    --violet-faint: rgba(136,128,240,0.08);
    --violet-text:  #A9A4F5;
    --text:   #F0EBE0;
    --text-2: #B8AF9E;
    --text-3: #756D60;
    --text-4: #4A4438;
    --ok:     #3DAA6A;
    --ok-bg:  rgba(61,170,106,0.10);
    --warn:   #C8822A;
    --warn-bg: rgba(200,130,42,0.12);
    --err:    #C8503A;
    --err-bg: rgba(200,80,58,0.10);
    --shadow-xs: 0 1px 4px rgba(0,0,0,0.28);
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.34);
    --shadow-md: 0 4px 24px rgba(0,0,0,0.44);
}}

/* Appliqué via JS avec data-theme="dark" sur <html> */
[data-theme="dark"] {
    --bg:        #141210;
    --bg-1:      #1C1916;
    --bg-2:      #231F1B;
    --bg-3:      #2C2720;
    --bg-4:      #38322A;
    --border:        rgba(255,240,210,0.09);
    --border-md:     rgba(255,240,210,0.15);
    --border-strong: rgba(255,240,210,0.28);
    --honey:        #D4973A;
    --honey-bright: #EBB050;
    --honey-dim:    rgba(212,151,58,0.18);
    --honey-faint:  rgba(212,151,58,0.09);
    --violet:       #8880F0;
    --violet-dim:   rgba(136,128,240,0.16);
    --violet-faint: rgba(136,128,240,0.08);
    --violet-text:  #A9A4F5;
    --text:   #F0EBE0;
    --text-2: #B8AF9E;
    --text-3: #756D60;
    --text-4: #4A4438;
    --ok:     #3DAA6A;
    --ok-bg:  rgba(61,170,106,0.10);
    --warn:   #C8822A;
    --warn-bg: rgba(200,130,42,0.12);
    --err:    #C8503A;
    --err-bg: rgba(200,80,58,0.10);
    --shadow-xs: 0 1px 4px rgba(0,0,0,0.28);
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.34);
    --shadow-md: 0 4px 24px rgba(0,0,0,0.44);
}

/* Grain plus subtil en dark */
[data-theme="dark"] body::after { opacity: 0.014; }

/* Chrome blur en dark */
[data-theme="dark"] .site-chrome {
    background: rgba(20,18,16,0.88);
}

/* Intro halo dark */
[data-theme="dark"] .intro-frame::after {
    background: radial-gradient(ellipse at center, rgba(212,151,58,0.09), transparent 70%);
}

/* Option buttons dark — plus de fond blanc aveuglant */
[data-theme="dark"] .option-btn { background: var(--bg-2); }
[data-theme="dark"] .option-btn:hover { background: var(--violet-faint); }
[data-theme="dark"] .option-btn.is-selected { background: var(--violet-faint); }

/* Input dark */
[data-theme="dark"] .input,
[data-theme="dark"] .select,
[data-theme="dark"] .textarea { background: var(--bg-2); }

/* Select arrow dark */
[data-theme="dark"] .select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23756D60' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Theme toggle button */
.theme-toggle {
    display: inline-grid; place-items: center;
    width: 32px; height: 32px; border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text-3);
    transition: border-color 150ms, color 150ms, box-shadow 150ms;
}
.theme-toggle:hover {
    border-color: var(--border-md);
    color: var(--text);
    box-shadow: var(--shadow-xs);
}
.theme-toggle svg { width: 15px; height: 15px; }

/* traj-card primary gradient en dark */
[data-theme="dark"] .traj-card--primary {
    background: linear-gradient(180deg, rgba(212,151,58,0.06) 0%, var(--bg-1) 70px);
}

/* Panel card subtle shadow en dark */
[data-theme="dark"] .panel-card,
[data-theme="dark"] .traj-card,
[data-theme="dark"] .prog-card,
[data-theme="dark"] .explain-card {
    box-shadow: none;
}

/* Chrome dark mode */
[data-theme="dark"] .site-chrome {
    background: rgba(20,18,16,0.90);
    border-bottom-color: rgba(255,240,210,0.07);
}

/* Analyzing frame dark */
[data-theme="dark"] .analyzing-frame { box-shadow: none; }

/* Outreach/modal backdrop en dark */
[data-theme="dark"] .outreach-prompt__backdrop,
[data-theme="dark"] .info-modal__backdrop {
    background: rgba(10,8,6,0.65);
}

/* ── Promo announce banner (bottom of page — ne cache pas le header) ── */
.promo-announce {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9500;
    background: #1a5c35;
    color: rgba(255,255,255,0.92);
    text-align: center;
    font-family: var(--mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.02em;
    padding: 0 var(--space-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 28px;
    line-height: 28px;
}

.promo-announce strong { color: #7DFFB0; font-weight: 600; }

/* Mobile : texte abrégé via pseudo-elements swap */
.promo-long  { display: inline; }
.promo-short { display: none; }

/* Language switching */
html[lang="en"] .promo-fr { display: none; }
html[lang="en"] .promo-en { display: inline !important; }

@media (max-width: 520px) {
    .promo-long  { display: none; }
    .promo-short { display: inline; }
    .promo-announce { font-size: var(--fs-xs); }
}


/* ─────────────────────────────────────────────────────────
   §2  LAYOUT & GRID
   ───────────────────────────────────────────────────────── */
/* ════════════════════════════════════════════════════════
   NEXUS · Layout v2
   Système de grille fluide avec safe areas iOS
   ════════════════════════════════════════════════════════ */

/* ── Chrome (barre de navigation supérieure) ── */
.site-chrome {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
    padding:
        calc(var(--space-sm) + var(--sa-top, 0px))
        clamp(var(--space-md), 4vw, var(--space-2xl))
        var(--space-sm);
    padding-bottom: var(--space-sm);
    background: rgba(248,245,239,0.88);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid var(--border);
    /* Mobile : force GPU layer → stoppe le jitter/bounce sur iOS Safari */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Intro : chrome transparent, fixe */
body[data-view="intro"] .site-chrome {
    position: fixed;
    width: 100%;
    top: 0;
    padding-top: calc(var(--space-sm) + var(--sa-top, 0px));
    justify-content: flex-end;
    background: transparent;
    border-bottom: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
body[data-view="intro"] .brand-block {
    opacity: 0;
    pointer-events: none;
}

.brand-block {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
}
.brand-mark {
    font-family: var(--mono);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.42em;
    color: var(--text);
}
.brand-subtitle {
    font-family: var(--mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.06em;
    color: var(--text-3);
}
.chrome-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2xs);
}

/* ── App Shell (conteneur principal) ── */
.app-shell {
    width: min(100%, calc(var(--max-w) + 80px));
    margin: 0 auto;
    padding:
        0
        clamp(var(--space-sm), 3vw, var(--space-2xl))
        calc(var(--space-3xl) + var(--sa-bottom, 0px));
}

.phase {
    display: none;
    min-height: calc(100vh - 56px);
    min-height: calc(100dvh - 56px);
}
.phase.is-active { display: block; }

.view-shell {
    padding:
        clamp(var(--space-lg), 4vw, var(--space-3xl))
        0;
}
.phase.is-entering .view-shell {
    animation: view-enter 300ms cubic-bezier(0.22,1,0.36,1);
}

.view-shell.is-centered {
    min-height: calc(100vh - 56px);
    min-height: calc(100dvh - 56px);
    display: grid;
    place-items: center;
}
body[data-view="intro"] .view-shell.is-centered { min-height: 100dvh; }

.view-container {
    width: min(100%, var(--max-w));
    margin: 0 auto;
}
.view-container.is-narrow {
    width: min(100%, var(--max-w-sm));
}

/* ── Stacks (empilements verticaux) ── */
.stack-4xl { display: grid; gap: var(--space-4xl); }
.stack-3xl { display: grid; gap: var(--space-3xl); }
.stack-2xl { display: grid; gap: var(--space-2xl); }
.stack-xl  { display: grid; gap: var(--space-xl); }
.stack-lg  { display: grid; gap: var(--space-lg); }
.stack-md  { display: grid; gap: var(--space-md); }
.stack-sm  { display: grid; gap: var(--space-sm); }
.stack-xs  { display: grid; gap: var(--space-xs); }
.stack-2xs { display: grid; gap: var(--space-2xs); }

/* ── Grilles Fluides ── */
/* Auto-fill pour adaptation automatique sans media queries */
.grid-auto-2 {
    display: grid;
    gap: var(--space-sm);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.grid-auto-3 {
    display: grid;
    gap: var(--space-sm);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
}
.grid-auto-4 {
    display: grid;
    gap: var(--space-sm);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
}

/* Grilles fixes (rétrocompatibles) */
.panel-grid {
    display: grid;
    gap: var(--space-sm);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.cluster-grid {
    display: grid;
    gap: var(--space-xs);
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.program-grid {
    display: grid;
    gap: var(--space-xs);
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.form-grid {
    display: grid;
    gap: var(--space-sm);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-grid.is-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.profile-grid {
    display: grid;
    gap: var(--space-sm);
    grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.8fr);
    align-items: start;
}

/* Trajectories grid */
.trajectory-grid--dominant {
    display: grid;
    gap: var(--space-sm);
    grid-template-columns: minmax(0, 1.12fr) minmax(270px, 0.88fr);
    align-items: start;
}
.trajectory-grid--cluster {
    display: grid;
    gap: var(--space-sm);
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Trio premium (radar + signal + dimensions) */
.nexus-profile-trio {
    display: grid;
    gap: var(--space-sm);
    grid-template-columns: 1.5fr 1fr;
    grid-template-rows: auto 1fr;
    align-items: stretch;
}

/* Explain row */
.explain-row {
    display: grid;
    gap: var(--space-sm);
    grid-template-columns: 1.2fr 0.8fr 1fr;
}

/* ── Button Rows ── */
.button-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2xs);
}
.button-row.is-spread { justify-content: space-between; }
.button-row.is-centered { justify-content: center; }

/* ── Section Heads ── */
.section-head {
    display: grid;
    gap: var(--space-2xs);
    margin-bottom: var(--space-md);
}
.section-head--compact { margin-bottom: var(--space-2xs); }
.section-head--with-action {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: var(--space-sm);
}
.section-head__content { display: grid; gap: var(--space-2xs); }

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--honey);
    font-weight: 400;
}

.section-title {
    margin: 0;
    font-family: var(--display);
    font-size: var(--fs-4xl);
    font-weight: 600;
    line-height: 0.96;
    letter-spacing: -0.025em;
    color: var(--text);
}
.section-title--mid {
    font-size: var(--fs-2xl);
    line-height: 1.05;
}
.section-title--sm {
    font-size: var(--fs-lg);
    font-weight: 600;
    line-height: 1.15;
}

.section-copy {
    margin: 0;
    font-size: var(--fs-md);
    line-height: 1.68;
    color: var(--text-2);
    max-width: 58ch;
}

/* ── Quiz specific ── */
.question-shell { width: min(100%, 780px); margin: 0 auto; }
.option-grid    { display: grid; gap: var(--space-2xs); }
.progress-shell { display: grid; gap: var(--space-2xs); }
.analyzing-shell { width: min(100%, 620px); }

/* Compact vertical padding so the question card appears high on all screens */
.quiz-shell { padding: clamp(8px, 1.5vw, 20px) 0; }

/* Quiz phase: reduce view-shell top padding (question must be near top) */
body[data-view="quiz"] .view-shell {
    padding-top: var(--space-sm);
}

/* ── Intro specific ── */
.intro-stage {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl) var(--space-md);
}
.intro-inner-wrap {
    width: min(100%, 840px);
    margin: 0 auto;
}

/* ── Animations ── */
@keyframes view-enter {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Tab panels ── */


/* ─────────────────────────────────────────────────────────
   §3  COMPONENTS
   ───────────────────────────────────────────────────────── */
/* ════════════════════════════════════════════════════════
   NEXUS · Components
   Palette : Ivoire · Miel (accent) · Violet (interactions)
   ════════════════════════════════════════════════════════ */

/* ── Hidden attribute (higher priority than inline styles) ── */
[hidden] { display: none !important; }

/* ── Results : Pills (badges réutilisables, externalisés du JS) ── */
.pill-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    border-radius: var(--radius-full);
    font-family: var(--mono);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.01em;
}
.pill-tag--recommend {
    background: var(--ok-bg);
    color: var(--ok);
    border: 1px solid rgba(31,122,74,0.2);
}
.pill-tag--keep {
    background: var(--ok-bg);
    color: var(--ok);
    border: 1px solid rgba(31,122,74,0.2);
}
.pill-tag--drop {
    background: var(--err-bg);
    color: var(--err);
    border: 1px solid rgba(160,48,32,0.2);
}
.pill-tag--stmg {
    background: var(--violet-faint);
    color: var(--violet-text);
    border: 1px solid var(--violet);
}
.pill-tag--default {
    background: var(--bg-2);
    color: var(--text-2);
    border: 1px solid var(--border);
}

/* ── Trust badge (micro assurances) ── */
.trust-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-2);
    border: 1px solid var(--border);
}
.trust-badge__text {
    font-family: var(--mono);
    font-size: var(--fs-xs);
    color: var(--text-3);
}

/* ── Section card générique ── */
.section-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-2);
}
.section-card--honey {
    border: 1px solid var(--honey);
    background: var(--bg-2);
}
.section-card--violet {
    border: 1px solid var(--violet);
    background: var(--bg-2);
}
.section-card__header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-card__header--violet {
    background: var(--violet-faint);
    border-bottom: 1px solid var(--violet);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.section-card__header--honey {
    background: rgba(212,151,58,0.06);
    border-bottom: 1px solid rgba(212,151,58,0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px 20px;
}
.section-card__headline {
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-card__body {
    padding: 20px 24px;
    display: grid;
    gap: 16px;
}
.section-card__body--lg {
    padding: 22px 24px;
    display: grid;
    gap: 18px;
}
.section-card__body--clean {
    padding: 20px 24px;
}
.section-card__title {
    font-weight: 600;
    font-size: var(--fs-base);
    color: var(--text);
}
.section-card__title--sm {
    font-weight: 600;
    font-size: var(--fs-lg);
    color: var(--text);
}
.section-card__note {
    font-family: var(--mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-2);
}
.section-card__eyebrow {
    font-family: var(--mono);
    font-size: 0.69rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 10px;
}
.section-card__eyebrow--ok { color: var(--ok); }
.section-card__eyebrow--warn { color: var(--warn); }
.section-card__eyebrow--honey { color: var(--honey); }
.section-card__icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: rgba(212,151,58,0.12);
    color: var(--honey);
    flex-shrink: 0;
}
.section-card__tag {
    font-family: var(--mono);
    font-size: 0.71rem;
    color: var(--text-3);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg);
    white-space: nowrap;
}

/* ── Ranked options cards ── */
.ranked-card {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 18px;
    border-radius: 12px;
    background: var(--bg-2);
    border: 1px solid var(--border);
}
.ranked-card--gold {
    border-color: var(--honey);
    box-shadow: 0 0 0 1px rgba(212,151,58,0.12) inset;
}
.ranked-card__medal {
    font-size: 1.25rem;
    text-align: center;
    line-height: 1;
}
.ranked-card__num {
    font-family: var(--mono);
    font-size: var(--fs-xs);
    color: var(--text-3);
}
.ranked-card__label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}
.ranked-card__desc {
    font-size: 0.78rem;
    color: var(--text-3);
    line-height: 1.4;
}
.ranked-card__pct {
    font-family: var(--mono);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-align: right;
}
.ranked-card__pct--gold { color: var(--honey); }
.ranked-card__pct--silver { color: var(--text-2); }
.ranked-card__pct--bronze { color: var(--warn); }

/* ── Institution card ── */
.institution-card {
    padding: 18px 20px;
    border-radius: 12px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    display: grid;
    gap: 6px;
}
.institution-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.institution-card__name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}
.institution-card__country {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--text-3);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
}
.institution-card__meta {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--text-3);
    margin: 0;
}
.institution-card__link {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--honey);
    text-decoration: none;
}
}

/* ── Program Parcoursup link ── */
.prog-parcoursup-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--honey);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid rgba(196,137,31,0.2);
    background: rgba(196,137,31,0.06);
    transition: background 0.15s;
}
.prog-parcoursup-link:hover {
    background: rgba(196,137,31,0.12);
}

/* ── Resource link (pill external link) ── */
.resource-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--mono);
    font-size: 0.73rem;
    color: var(--text-3);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg-2);
    text-decoration: none;
    transition: color 0.15s, border-color 0.15s;
}
.resource-link:hover {
    color: var(--honey);
    border-color: rgba(196,137,31,0.35);
}

/* ── Switch block ── */
.switch-block {
    padding: 16px 20px;
    border-radius: 12px;
    background: var(--violet-faint);
    border: 1px solid var(--violet);
    display: grid;
    gap: 10px;
}
.switch-block__head {
    display: flex;
    align-items: center;
    gap: 8px;
}
.switch-block__label {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--violet-text);
    font-weight: 600;
}
.switch-block__body {
    font-size: 0.85rem;
    color: var(--text-2);
    margin: 0;
    line-height: 1.5;
}
.switch-block__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ── Extend banner ── */
.extend-banner {
    padding: 16px 20px;
    border-radius: 12px;
    background: rgba(107,99,232,0.07);
    border: 1px solid var(--violet);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.extend-banner__text {
    font-size: 0.88rem;
    color: var(--text-2);
    margin: 0;
    line-height: 1.5;
    flex: 1;
}

/* ── Comparison table ── */
.cmp-row--dynamic {
    display: grid;
    gap: 6px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    align-items: center;
}
.cmp-row--head--dynamic {
    display: grid;
    gap: 6px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

/* ── Premium : grid helpers ── */
.premium-grid-left {
    display: grid;
    gap: 18px;
}
.premium-grid-right {
    display: grid;
    gap: 14px;
    align-content: start;
}

/* ── Results view-shell inner container ── */
.results-container {
    display: grid;
    gap: 24px;
}

/* ── Score bar dynamic (width only in JS, rest in class) ── */
.score-bar__fill--dynamic {
    height: 100%;
    border-radius: 999px;
    background: var(--honey);
}

/* ── Empty state ── */
.empty-state {
    color: var(--text-3);
    font-family: var(--mono);
    font-size: var(--fs-xs);
}

/* ── Result Tabs ── */
.result-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 8px;
    margin-bottom: 8px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    position: relative;
    z-index: 2;
}
.result-tabs::-webkit-scrollbar { display: none; }

@media (min-width: 640px) {
    .result-tabs { gap: 12px; }
}

.result-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: var(--space-2xs) var(--space-md);
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text-3);
    font-family: var(--mono);
    font-size: var(--fs-xs);
    font-weight: 400;
    cursor: pointer;
    letter-spacing: 0.05em;
    white-space: nowrap;
    flex-shrink: 0;
    transition: border-color 0.2s ease, color 0.2s ease,
                background 0.2s ease, box-shadow 0.2s ease;
}

.result-tab-btn:hover {
    border-color: rgba(196,137,31,0.50);
    color: var(--text);
    background: rgba(212, 151, 58, 0.06);
    box-shadow: 0 0 0 3px rgba(196,137,31,0.10);
}

.result-tab-btn.is-active {
    border-color: var(--honey);
    background: rgba(212, 151, 58, 0.11);
    color: var(--honey);
    font-weight: 600;
    box-shadow: 0 0 0 1px rgba(212, 151, 58, 0.22), 0 2px 8px rgba(196,137,31,0.14);
}

/* ── Result Tab Panels ── */
.result-tab-panel {
    display: none !important;
    grid-template-columns: 1fr;
    gap: 20px;
}

.result-tab-panel.is-active {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    animation: fadeIn 0.25s ease-out;
}

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

/* ── CTA Actions ── */
.cta-action-link,
.cta-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
    border: 1px solid var(--border);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cta-action-num {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-3);
}

.cta-action-link:hover,
.cta-action-btn:hover {
    border-color: var(--honey);
    background: rgba(212, 151, 58, 0.05);
    color: var(--honey);
    transform: translateX(2px);
}

.cta-action-link--highlight {
    background: var(--honey);
    color: #1a1710;
    border-color: var(--honey);
    font-weight: 600;
}

.cta-action-link--highlight .cta-action-num {
    color: #1a171099;
}

.cta-action-link--highlight:hover {
    background: #d99b2b;
    border-color: #d99b2b;
    transform: translateY(-2px);
}

.cta-action-btn--highlight {
    background: var(--honey);
    color: #1a1710;
    border-color: var(--honey);
    font-weight: 600;
}

.cta-action-btn--highlight .cta-action-num {
    color: #1a171099;
}

.cta-action-btn--highlight:hover {
    background: #d99b2b;
    border-color: #d99b2b;
    transform: translateY(-2px);
}

/* ── Chrome Controls ── */
.lang-switch {
    display: inline-flex; padding: 3px;
    border-radius: 999px;
    background: var(--bg-2); border: 1px solid var(--border);
}
.lang-btn {
    border: 0; border-radius: 999px; background: transparent;
    color: var(--text-3); padding: 5px 12px;
    font-family: var(--mono); font-size: 0.70rem; letter-spacing: 0.10em;
    transition: background 140ms, color 140ms;
}
.lang-btn:hover { color: var(--text-2); }
.lang-btn.is-active { background: var(--bg-1); color: var(--text); box-shadow: var(--shadow-xs); }

.chrome-info-btn {
    display: inline-grid; place-items: center;
    width: 32px; height: 32px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--bg-2);
    color: var(--text-3); font-family: var(--mono); font-size: 0.76rem;
    transition: border-color 150ms, color 150ms, box-shadow 150ms;
}
.chrome-info-btn:hover { border-color: var(--border-md); color: var(--text); box-shadow: var(--shadow-xs); }
.chrome-info-btn.is-hidden { opacity: 0; pointer-events: none; }

/* ── Base card ── */
.panel-card {
    position: relative; border-radius: var(--r-xl);
    border: 1px solid var(--border); background: var(--bg-1);
    padding: clamp(18px, 2.2vw, 28px);
    box-shadow: var(--shadow-xs);
}
.panel-card--ruled { border-top: 2px solid var(--honey); }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 26px; border-radius: var(--r-md); border: 0;
    background: var(--text); color: var(--bg);
    font-family: var(--sans); font-size: 0.88rem; font-weight: 700;
    letter-spacing: 0.01em;
    transition: background 150ms, transform 140ms, box-shadow 150ms;
    white-space: nowrap;
}
.btn:hover { background: #2c2820; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn:disabled { opacity: 0.38; cursor: not-allowed; transform: none; box-shadow: none; }

/* Accent: Honey CTA (for primary intro action) */
.btn--honey {
    background: var(--honey); color: #fff;
}
.btn--honey:hover { background: var(--honey-bright); }

.btn-ghost {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 20px; border-radius: var(--r-md);
    border: 1px solid var(--border-md); background: transparent;
    color: var(--text-2); font-family: var(--sans); font-size: 0.88rem; font-weight: 500;
    transition: border-color 150ms, color 150ms, transform 150ms;
}
.btn-ghost:hover { border-color: var(--border-strong); color: var(--text); transform: translateY(-1px); }
.btn-ghost:disabled { opacity: 0.38; cursor: not-allowed; transform: none; }

.btn-secondary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-radius: var(--r-md);
    border: 1px solid var(--border); background: var(--bg-2);
    color: var(--text-2); font-family: var(--sans); font-size: 0.86rem; font-weight: 500;
    transition: border-color 150ms, color 150ms, background 150ms;
}
.btn-secondary:hover { border-color: var(--violet); color: var(--violet-text); background: var(--violet-faint); }
/* Active state uses violet (B hybridation) */
.btn-secondary.is-active, .btn-secondary.btn {
    border-color: var(--violet); color: var(--violet-text); background: var(--violet-dim);
}

.text-link-btn {
    border: 0; background: transparent; color: var(--text-3);
    font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.04em;
    padding: 0; transition: color 140ms;
}
.text-link-btn:hover { color: var(--text-2); }

/* ── Intro Frame ── */
.intro-frame {
    position: relative;
    padding: clamp(48px, 7vw, 88px) clamp(28px, 6vw, 72px);
    text-align: center;
    border-radius: var(--r-2xl);
    border: 1px solid var(--border);
    background: var(--bg-1);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
/* Ligne miel en haut */
.intro-frame::before {
    content: "";
    position: absolute; top: 0; left: 10%; right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--honey), transparent);
    border-radius: 0 0 999px 999px;
}
/* Tache de lumière chaude centrée */
.intro-frame::after {
    content: "";
    position: absolute; top: -120px; left: 50%; transform: translateX(-50%);
    width: 600px; height: 320px;
    background: radial-gradient(ellipse at center, rgba(196,137,31,0.07) 0%, transparent 70%);
    pointer-events: none;
}
.intro-inner {
    position: relative; z-index: 1;
    display: grid; gap: 28px; justify-items: center;
}
.intro-kicker {
    font-family: var(--mono); font-size: 0.68rem;
    letter-spacing: 0.24em; text-transform: uppercase;
    color: var(--honey);
}
.hero-wordmark {
    margin: 0;
    font-family: var(--mono); font-size: clamp(3.2rem, 10vw, 6.2rem);
    font-weight: 400; letter-spacing: 0.54em; line-height: 0.94;
    color: var(--text);
}
.intro-tagline {
    margin: 0;
    font-family: var(--display); font-style: italic;
    font-size: clamp(1.35rem, 2.8vw, 2.1rem);
    font-weight: 300; line-height: 1.3;
    color: var(--text-2); max-width: 26ch;
}
.intro-tagline strong {
    font-weight: 600; font-style: normal;
    color: var(--text);
}
.intro-note {
    font-family: var(--mono); font-size: 0.68rem;
    color: var(--text-4); text-align: center;
    letter-spacing: 0.06em; margin: 0;
}

/* ── Progress Bar ── */
.progress-bar {
    width: 100%; height: 2px;
    background: var(--bg-3); border-radius: 999px; overflow: hidden;
}
.progress-bar__fill {
    height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, var(--honey), var(--honey-bright));
    transition: width 320ms cubic-bezier(0.22,1,0.36,1);
}
.progress-meta {
    display: flex; justify-content: space-between; align-items: center;
    font-family: var(--mono); font-size: 0.70rem; color: var(--text-3);
}

/* ── Form ── */
.field { display: grid; gap: 7px; }
.field-label {
    font-family: var(--mono); font-size: 0.70rem;
    letter-spacing: 0.10em; text-transform: uppercase; color: var(--text-3);
}
.input, .select, .textarea {
    width: 100%; padding: 11px 14px;
    border-radius: var(--r-md); border: 1px solid var(--border);
    background: var(--bg-1); color: var(--text); font-size: 0.92rem;
    transition: border-color 150ms, box-shadow 150ms;
    outline: none; appearance: none; -webkit-appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.input:focus, .select:focus, .textarea:focus {
    border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-faint);
}
.select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23A49A89' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 13px center;
    padding-right: 38px; cursor: pointer;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.6; }

.choice-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: var(--r-sm);
    border: 1px solid var(--border); background: var(--bg-2);
    color: var(--text-2); font-size: 0.84rem; font-weight: 500;
    transition: all 150ms; white-space: nowrap; cursor: pointer;
}
.choice-chip:hover { border-color: var(--violet); color: var(--violet-text); background: var(--violet-faint); }
.choice-chip.is-selected { border-color: var(--violet); color: var(--violet-text); background: var(--violet-dim); }
.chip-grid { display: flex; flex-wrap: wrap; gap: 7px; }

/* ── Quiz option buttons ── */
.option-btn {
    display: flex; align-items: flex-start; gap: 13px;
    width: 100%; padding: 14px 16px;
    border-radius: var(--r-md);
    border: 1px solid var(--border); background: var(--bg-1);
    color: var(--text-2); font-size: 0.9rem; line-height: 1.55;
    text-align: left;
    transition: border-color 160ms, background 160ms, color 160ms, box-shadow 160ms;
    box-shadow: var(--shadow-xs);
}
.option-btn:hover { border-color: var(--violet); color: var(--text); background: var(--violet-faint); box-shadow: var(--shadow-sm); }
.option-btn.is-selected {
    border-color: var(--violet); color: var(--text);
    background: var(--violet-faint); box-shadow: 0 0 0 3px var(--violet-faint), var(--shadow-xs);
}
.option-btn__letter {
    flex-shrink: 0; width: 22px; height: 22px; border-radius: var(--r-xs);
    border: 1px solid var(--border-md);
    display: grid; place-items: center;
    font-family: var(--mono); font-size: 0.68rem; color: var(--text-3);
    transition: all 160ms; margin-top: 1px;
}
.option-btn.is-selected .option-btn__letter {
    background: var(--violet); border-color: var(--violet); color: #fff;
}
.question-label {
    font-family: var(--display); font-style: italic;
    font-size: clamp(1.15rem, 2.2vw, 1.6rem); font-weight: 400;
    line-height: 1.38; color: var(--text); margin: 0;
}
.hesitate-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px; border-radius: 999px;
    border: 1px solid var(--border); background: transparent;
    color: var(--text-3); font-family: var(--mono); font-size: 0.73rem; letter-spacing: 0.06em;
    transition: all 150ms;
}
.hesitate-toggle:hover { border-color: var(--warn); color: var(--warn); }
.hesitate-toggle.is-on { border-color: var(--warn); color: var(--warn); background: var(--warn-bg); }
.hesitate-toggle__dot { width: 5px; height: 5px; border-radius: 999px; background: currentColor; }
.quiz-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ── Analyzing ── */
.analyzing-frame {
    border-radius: var(--r-xl); border: 1px solid var(--border);
    background: var(--bg-1); padding: 36px;
    box-shadow: var(--shadow-sm); display: grid; gap: 22px;
}
.analyzing-step {
    display: flex; align-items: center; gap: 12px;
    font-family: var(--mono); font-size: 0.80rem; color: var(--text-3);
    transition: color 280ms;
}
.analyzing-step.is-active { color: var(--text); }
.analyzing-step.is-done { color: var(--ok); }
.analyzing-step__icon { width: 18px; height: 18px; flex-shrink: 0; display: grid; place-items: center; }
.analyzing-spinner {
    width: 14px; height: 14px;
    border: 1.5px solid var(--border-md);
    border-top-color: var(--honey);
    border-radius: 999px;
    animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.results-meta-row { display: flex; flex-wrap: wrap; gap: 6px; }
.meta-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--bg-2);
    font-family: var(--mono); font-size: 0.68rem; color: var(--text-2); letter-spacing: 0.04em;
}
.meta-chip svg { width: 10px; height: 10px; opacity: 0.55; }
.results-feature-name {
    font-family: var(--display); font-style: italic;
    font-size: clamp(1.5rem, 3vw, 2.4rem); font-weight: 400;
    line-height: 1.1; color: var(--text); margin: 0;
}

/* ── Trajectory Cards ── */
.traj-card {
    position: relative; border-radius: var(--r-lg);
    border: 1px solid var(--border); background: var(--bg-1);
    padding: clamp(16px, 2vw, 22px);
    display: grid; gap: 14px; align-content: start;
    box-shadow: var(--shadow-xs);
    transition: border-color 200ms, box-shadow 200ms, transform 200ms;
}
.traj-card:hover { border-color: var(--border-md); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.traj-card--primary {
    border-top: 2px solid var(--honey);
    background: linear-gradient(180deg, rgba(196,137,31,0.025) 0%, var(--bg-1) 60px);
}
.traj-card--primary:hover {
    border-color: rgba(196,137,31,0.35);
    box-shadow: 0 6px 28px rgba(196,137,31,0.12), var(--shadow-sm);
}
.traj-rank {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--mono); font-size: 0.67rem;
    letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3);
}
.traj-rank__num {
    display: inline-grid; place-items: center;
    width: 19px; height: 19px; border-radius: var(--r-xs);
    border: 1px solid var(--border-md);
    font-size: 0.62rem; color: var(--text-2);
}
.traj-card--primary .traj-rank__num { border-color: var(--honey); color: var(--honey); }
.traj-title {
    font-family: var(--display); font-size: 1.25rem; font-weight: 600;
    line-height: 1.15; color: var(--text); margin: 0;
}
.traj-summary {
    font-size: 0.88rem; line-height: 1.62; color: var(--text-2); margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Score bars — miel pour primaire, neutre pour secondaire */
.traj-scores { display: grid; gap: 8px; }
.score-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; }
.score-label {
    font-family: var(--mono); font-size: 0.67rem;
    color: var(--text-3); letter-spacing: 0.06em;
    display: flex; align-items: center; gap: 5px;
}
.score-label svg { width: 10px; height: 10px; }
.score-bar-wrap { grid-column: 1/-1; }
.score-bar { height: 3px; background: var(--bg-3); border-radius: 999px; overflow: hidden; }
.score-bar__fill { height: 100%; border-radius: 999px; background: var(--bg-4); }
.traj-card--primary .score-bar__fill { background: var(--honey); }
.score-val { font-family: var(--mono); font-size: 0.70rem; color: var(--text-3); text-align: right; }

/* Tags reasons/watchouts */
.traj-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.traj-tag {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: var(--r-xs);
    font-family: var(--mono); font-size: 0.66rem;
    color: var(--text-3); background: var(--bg-2); border: 1px solid var(--border);
}
.traj-tag--ok   { color: var(--ok);   border-color: rgba(31,122,74,0.2);  background: var(--ok-bg); }
.traj-tag--warn { color: var(--warn); border-color: rgba(160,96,32,0.2);  background: var(--warn-bg); }
.traj-tag svg { width: 8px; height: 8px; }

/* ── Program Cards ── */
.prog-card {
    border-radius: var(--r-md); border: 1px solid var(--border);
    background: var(--bg-1); padding: 16px 18px;
    display: grid; gap: 10px; align-content: start;
    box-shadow: var(--shadow-xs);
    transition: border-color 160ms, box-shadow 160ms, transform 160ms;
}
.prog-card:hover { border-color: var(--border-md); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.prog-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.prog-title { font-size: 0.91rem; font-weight: 700; color: var(--text); margin: 0; line-height: 1.3; }
.prog-institution { font-family: var(--mono); font-size: 0.70rem; color: var(--text-3); }
.prog-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.prog-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 8px; border-radius: var(--r-xs);
    border: 1px solid var(--border); font-family: var(--mono); font-size: 0.67rem; color: var(--text-3);
}
.prog-tag svg { width: 9px; height: 9px; }

/* Badges */
.badge {
    display: inline-flex; align-items: center;
    padding: 2px 8px; border-radius: var(--r-xs);
    font-family: var(--mono); font-size: 0.64rem; font-weight: 500;
    letter-spacing: 0.06em; text-transform: uppercase; flex-shrink: 0;
}
.badge[data-tone="success"] { background: var(--ok-bg);   color: var(--ok);   border: 1px solid rgba(31,122,74,0.2); }
.badge[data-tone="warning"] { background: var(--warn-bg); color: var(--warn); border: 1px solid rgba(160,96,32,0.2); }
.badge[data-tone="danger"]  { background: var(--err-bg);  color: var(--err);  border: 1px solid rgba(160,48,32,0.2); }

/* ── Explain card ── */
.explain-card {
    border-radius: var(--r-lg); border: 1px solid var(--border);
    background: var(--bg-1); padding: clamp(16px, 2vw, 24px);
    box-shadow: var(--shadow-xs);
}
.explain-rows { display: grid; }
.explain-row {
    display: grid; grid-template-columns: 130px 1fr;
    gap: 12px; align-items: baseline;
    padding: 11px 0; border-bottom: 1px solid var(--border);
}
.explain-row:last-child { border-bottom: 0; }
.explain-row__key {
    font-family: var(--mono); font-size: 0.70rem;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3);
}
.explain-row__val { font-size: 0.88rem; color: var(--text-2); line-height: 1.5; }

/* Details/summary */
.details-panel { margin-top: 4px; }
.details-panel summary {
    cursor: pointer; list-style: none;
    display: flex; align-items: center; gap: 6px;
    font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--text-3);
    padding: 10px 0; border-top: 1px solid var(--border);
    width: 100%; margin-top: 10px; transition: color 140ms;
}
.details-panel summary:hover { color: var(--text-2); }
.details-panel summary::after { content: "›"; margin-left: auto; transform: rotate(90deg); display: inline-block; transition: transform 200ms; }
.details-panel[open] summary::after { transform: rotate(-90deg); }
.details-panel__body { padding-top: 16px; display: grid; gap: 16px; }

/* Dimension bars */
.dim-row { display: grid; grid-template-columns: 1fr 40px; gap: 6px; align-items: center; padding: 4px 0; }
.dim-label { font-size: 0.83rem; color: var(--text-2); }
.dim-bar-wrap { grid-column: 1/-1; }
.dim-bar { height: 2px; background: var(--bg-3); border-radius: 999px; overflow: hidden; }
.dim-bar__fill { height: 100%; background: var(--border-strong); border-radius: 999px; }
.dim-val { font-family: var(--mono); font-size: 0.68rem; color: var(--text-3); text-align: right; }

/* Comparison table */
.cmp-table { display: grid; }
.cmp-row { display: grid; gap: 6px; padding: 9px 0; border-bottom: 1px solid var(--border); align-items: center; }
.cmp-row:last-child { border-bottom: 0; }
.cmp-row--head span { font-family: var(--mono); font-size: 0.68rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.cmp-label { font-family: var(--mono); font-size: 0.70rem; color: var(--text-2); }
.cmp-val { font-family: var(--mono); font-size: 0.76rem; color: var(--text); text-align: right; }

/* ── Feedback ── */
.feedback-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Share section ── */
.share-section {
    border-radius: var(--r-lg); border: 1px dashed var(--border-md);
    padding: clamp(16px, 2vw, 24px); display: grid; gap: 14px;
}

/* ── Why list ── */
.why-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.why-list li {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 0.85rem; color: var(--text-2); line-height: 1.5;
}
.why-list li::before {
    content: ""; width: 4px; height: 4px; border-radius: 999px;
    background: var(--text-4); margin-top: 7px; flex-shrink: 0;
}

/* ── Warning block ── */
.warning-note {
    border-radius: var(--r-md); border: 1px solid rgba(160,96,32,0.2);
    background: var(--warn-bg); padding: 12px 14px; display: grid; gap: 6px;
}
.warning-note strong { color: var(--warn); font-size: 0.80rem; font-family: var(--mono); letter-spacing: 0.06em; }
.note-list { margin: 0; padding-left: 14px; display: grid; gap: 4px; }
.note-list li { font-size: 0.82rem; color: var(--text-3); }

/* ── Newsletter popup ── */
.outreach-prompt {
    position: fixed; inset: 0; z-index: 9100;
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.outreach-prompt.is-open { display: flex; }
.outreach-prompt__backdrop {
    position: absolute; inset: 0;
    background: rgba(26,23,16,0.45); backdrop-filter: blur(6px);
}
.outreach-prompt__panel {
    position: relative; z-index: 1;
    width: min(100%, 440px);
    border-radius: var(--r-xl); border: 1px solid var(--border-md);
    background: var(--bg-1); padding: clamp(22px, 3vw, 36px);
    box-shadow: var(--shadow-md);
    animation: modal-in 280ms cubic-bezier(0.22,1,0.36,1);
}
.outreach-prompt__close {
    position: absolute; top: 14px; right: 14px;
    width: 28px; height: 28px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--bg-2);
    color: var(--text-3); display: grid; place-items: center; font-size: 1rem;
}
.outreach-prompt__close:hover { color: var(--text); border-color: var(--border-md); }

/* ── Institution panel ── */
#institution-panel {
    position: fixed; inset: 0; z-index: 9100;
    display: flex; align-items: center; justify-content: center;
    background: rgba(26,23,16,0.45); backdrop-filter: blur(6px); padding: 20px;
}
#institution-panel[hidden] { display: none; }
.institution-panel__inner {
    position: relative;
    width: min(100%, 560px); border-radius: var(--r-xl);
    border: 1px solid var(--border-md); background: var(--bg-1);
    padding: clamp(22px, 3vw, 36px);
    max-height: 88vh; overflow-y: auto;
    box-shadow: var(--shadow-md);
    animation: modal-in 280ms cubic-bezier(0.22,1,0.36,1);
}
.institution-panel__inner-body { display: grid; gap: 16px; }
.institution-panel__close {
    position: absolute; top: 14px; right: 14px;
    width: 28px; height: 28px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--bg-2);
    color: var(--text-3); display: grid; place-items: center; font-size: 1rem;
}
.institution-panel__close:hover { color: var(--text); }

/* ── Info modal ── */
.info-modal {
    position: fixed; inset: 0; z-index: 9050;
    display: none; align-items: flex-start; justify-content: flex-end;
    padding: 72px 20px 20px;
}
body.has-info-modal .info-modal { display: flex; }
.info-modal__backdrop {
    position: absolute; inset: 0;
    background: rgba(26,23,16,0.35); backdrop-filter: blur(4px);
}
.info-modal__panel {
    position: relative; z-index: 1;
    width: min(100%, 420px); border-radius: var(--r-xl);
    border: 1px solid var(--border-md); background: var(--bg-1);
    padding: clamp(20px, 3vw, 30px);
    max-height: calc(100vh - 100px); overflow-y: auto;
    box-shadow: var(--shadow-md);
    animation: modal-in 240ms cubic-bezier(0.22,1,0.36,1);
}
.info-modal__close {
    position: absolute; top: 14px; right: 14px;
    width: 28px; height: 28px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--bg-2);
    color: var(--text-3); display: grid; place-items: center; font-size: 0.9rem;
}
.info-modal__close:hover { color: var(--text); }
.info-modal__title { font-family: var(--display); font-size: 1.15rem; font-weight: 600; color: var(--text); margin: 0; }
.info-modal__lead { font-size: 0.88rem; color: var(--text-2); line-height: 1.65; margin: 0; }
.info-modal__bullets { margin: 0; padding-left: 16px; display: grid; gap: 6px; }
.info-modal__bullets li { font-size: 0.86rem; color: var(--text-2); line-height: 1.55; }
.info-modal.is-open { display: flex; }

@keyframes modal-in {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Quick actions ── */
.results-quick-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Loading ── */
.loading-note {
    font-family: var(--mono); font-size: 0.78rem;
    color: var(--text-3); letter-spacing: 0.10em; padding: 20px 0;
}

/* ── Phase 1 additions ── */

/* Session restore overlay */
.session-restore-overlay {
    position: fixed; inset: 0; z-index: 900;
    display: flex; align-items: flex-end; justify-content: center;
    padding: 0 16px 24px;
    background: rgba(0,0,0,0.45);
    animation: fadeIn 220ms ease;
}
@media (min-width: 480px) {
    .session-restore-overlay { align-items: center; }
}
.session-restore-card {
    width: 100%; max-width: 440px;
    background: var(--bg-1); border: 1px solid var(--border);
    border-radius: var(--r-xl); padding: 24px 28px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    display: grid; gap: 12px;
    animation: slideUp 250ms cubic-bezier(0.22,1,0.36,1);
}
.session-restore-title {
    font-family: var(--mono); font-size: 0.72rem;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--honey); margin: 0;
}
.session-restore-body {
    font-size: 0.92rem; color: var(--text-2);
    line-height: 1.55; margin: 0;
}
.session-restore-actions {
    display: flex; gap: 10px; flex-wrap: wrap; padding-top: 4px;
}

/* Last results link */
.last-results-link {
    display: inline-flex; align-items: center;
    font-family: var(--mono); font-size: 0.74rem;
    color: var(--text-3); letter-spacing: 0.04em;
    border: 0; background: transparent; cursor: pointer;
    padding: 4px 0; text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 140ms;
    margin-top: 8px;
}
.last-results-link:hover { color: var(--honey); }

/* Tooltip trigger / text */
.tooltip-trigger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--bg-2);
    color: var(--text-3); font-family: var(--mono); font-size: 0.65rem;
    cursor: pointer; margin-left: 6px; flex-shrink: 0;
    transition: border-color 140ms, color 140ms;
}
.tooltip-trigger:hover { border-color: var(--honey); color: var(--honey); }

/* Slide-up keyframe (reused by session card) */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

#share-export-root { display: none; }

/* ═══════════════════════════════════════════════════════════
   NEXUS · Ultra-Premium Results Layer
   3D cards · Canvas radar · Glassmorphism CTA
   ═══════════════════════════════════════════════════════════ */

/* ── 3D Trajectory Cards ── */
.traj-card {
    transform-style: preserve-3d;
    backface-visibility: hidden;
    /* Spring return with slight bounce */
    transition: border-color 220ms ease,
                box-shadow 0.40s cubic-bezier(0.23,1,0.32,1),
                transform   0.40s cubic-bezier(0.23,1,0.32,1);
    cursor: default;
    /* Subtle ambient glow base (amplified on hover by JS) */
    box-shadow: var(--shadow-xs);
}
.traj-card--primary {
    box-shadow: 0 2px 18px rgba(196,137,31,0.09), var(--shadow-xs);
}
.trajectory-grid--cluster .traj-card {
    transition: border-color 220ms ease,
                box-shadow 0.40s cubic-bezier(0.23,1,0.32,1),
                transform   0.40s cubic-bezier(0.23,1,0.32,1);
}

/* ── Dimensional Radar ── */
.nexus-radar-wrap {
    position: relative;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    background: var(--bg-1);
    padding: 24px 12px 4px;   /* SVG handles label padding via viewBox; legend adds bottom */
    box-shadow: var(--shadow-xs);
    overflow: visible;         /* labels via padded viewBox — must NOT clip */
    text-align: center;
    max-width: 560px;          /* wider — radar is more imposing */
    margin: 0 auto;            /* always centred in its column */
    transition: transform 0.45s cubic-bezier(0.23,1,0.32,1),
                box-shadow 0.40s cubic-bezier(0.23,1,0.32,1);
    /* Note: no backface-visibility:hidden — it forces GPU rasterisation
       that blurs SVG text at small sizes on some browsers. */
}
/* Inside the trio layout: lift the max-width/margin constraints */
.nexus-radar-card {
    max-width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    grid-column: 1;
    grid-row: 1 / 3;
}
/* Dimensions card — mirrors radar card visually */
.nexus-dims-card {
    position: relative;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    background: var(--bg-1);
    padding: 24px 20px 20px;
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    grid-column: 2;
    grid-row: 2;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.nexus-dims-card:hover {
    border-color: rgba(196,137,31,0.22);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}
.nexus-dims-card::before {
    content: "";
    position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(196,137,31,0.35), transparent);
}
/* Scale up the legend when inside the dims card */
.nexus-dims-card .nexus-radar-legend {
    border-top: none;
    padding: 12px 0 0;
    gap: 12px;
    flex: 1;
}
.nexus-dims-card .nexus-radar-legend-row {
    grid-template-columns: 1fr 100px 36px;
    gap: 10px;
    align-items: center;
}
.nexus-dims-card .nexus-radar-legend-name {
    font-size: 0.80rem;
    color: var(--text-2);
    font-weight: 500;
}
.nexus-dims-card .nexus-radar-legend-bar {
    height: 5px;
}
.nexus-dims-card .nexus-radar-legend-pct {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-2);
}
/* ── Signal card ── */
.nexus-signal-card {
    position: relative;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    background: var(--bg-1);
    padding: 22px 20px 18px;
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0;
    grid-column: 2;
    grid-row: 1;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.nexus-signal-card:hover {
    border-color: rgba(196,137,31,0.22);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}
.nexus-signal-card::before {
    content: "";
    position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(196,137,31,0.35), transparent);
}
.nexus-signal-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 14px 0 12px;
    padding: 9px 14px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid color-mix(in srgb, var(--signal-color) 30%, transparent);
    width: fit-content;
}
.nexus-signal-badge__dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--signal-color);
    box-shadow: 0 0 8px var(--signal-color);
    flex-shrink: 0;
}
.nexus-signal-badge__label {
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--signal-color);
    letter-spacing: 0.02em;
}
.nexus-signal-desc {
    font-size: 0.82rem;
    color: var(--text-3);
    line-height: 1.6;
    margin: 0 0 20px;
    flex: 1;
}
.nexus-signal-metrics {
    display: grid;
    gap: 14px;
    margin-bottom: 20px;
}
.nexus-signal-metric__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}
.nexus-signal-metric__name {
    font-family: var(--mono);
    font-size: 0.67rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
}
.nexus-signal-metric__pct {
    font-family: var(--mono);
    font-size: 0.76rem;
    font-weight: 700;
}
.nexus-signal-metric__track {
    height: 5px;
    border-radius: 999px;
    background: var(--bg-3);
    overflow: hidden;
}
.nexus-signal-metric__fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.8s cubic-bezier(0.22,1,0.36,1) 0.2s;
}
.nexus-signal-note {
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--text-3);
    letter-spacing: 0.06em;
    opacity: 0.6;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}
/* ── Arc gauge ── */
.nexus-score-arc-wrap {
    margin: 10px auto 12px;
    width: min(100%, 140px);
}
.nexus-score-arc {
    display: block;
    width: 100%;
    overflow: visible;
}
.nexus-score-arc__fill {
    transition: stroke-dasharray 1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s;
}
.nexus-score-arc__num {
    font-family: var(--display, 'Fraunces', serif);
    font-size: 26px;
    font-weight: 700;
}
.nexus-score-arc__sublabel {
    font-family: var(--mono, 'DM Mono', monospace);
    font-size: 8.5px;
    fill: rgba(100,92,78,0.45);
}
.nexus-radar-wrap::before {
    content: "";
    position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(196,137,31,0.35), transparent);
}
/* Subtle outer glow ring on hover (CSS-only, complements JS tilt) */
.nexus-radar-wrap:hover {
    border-color: rgba(196,137,31,0.20);
}
.nexus-radar-eyebrow {
    font-family: var(--mono);
    font-size: 0.67rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-3);
    margin: 0 0 8px;
}

/* SVG radar — DPR-free, always sharp.
   max-width matches the wrap width so labels have full space.
   text-rendering is set on the SVG element itself via JS/HTML for max sharpness. */
.nexus-radar-svg {
    display: block;
    width: 100%;
    max-width: 540px;
    height: auto;
    margin: 0 auto;
    cursor: default;
    overflow: visible;
}

/* Data polygon glow (always rendered, but at 0 opacity until .is-loaded) */
.radar-data-glow {
    opacity: 0;
    transition: opacity 0.6s ease 0.15s;
}
.nexus-radar-svg.is-loaded .radar-data-glow {
    opacity: 1;
}

/* Data polygon: entrance animation via .is-loaded class added by JS */
.radar-data-poly {
    opacity: 0;
    transition: opacity 0.55s ease 0.08s;
}
.nexus-radar-svg.is-loaded .radar-data-poly {
    opacity: 1;
}

/* Radar axis labels — fill matches --text-2 tone, sharp on all DPR */
.radar-label {
    fill: rgba(70,62,48,0.88);
    pointer-events: none;
    user-select: none;
    /* Ensure crisp rendering on GPU-composited parents */
    paint-order: stroke fill;
}

/* Interactive dots */
.radar-dot {
    transition: r 0.16s ease;
    cursor: pointer;
}
.radar-dot-halo {
    transition: r 0.20s ease, fill 0.16s ease;
}
.radar-dot-g {
    cursor: pointer;
    outline: none;
}

/* ── Premium CTA Section (glassmorphism) ── */
.nexus-premium-cta {
    position: relative;
    border-radius: var(--r-xl);
    overflow: hidden;
    border: 1px solid rgba(196,137,31,0.22);
    background: var(--bg-1);
    padding: clamp(28px, 4vw, 44px) clamp(22px, 4vw, 40px);
    box-shadow: 0 0 0 1px rgba(196,137,31,0.06) inset, var(--shadow-md);
}
/* Lumière chaude + violet doux */
.nexus-premium-cta::before {
    content: "";
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 20% 0%, rgba(196,137,31,0.1) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 80% 100%, rgba(107,99,232,0.06) 0%, transparent 70%);
    pointer-events: none;
}
/* Ligne miel en haut */
.nexus-premium-cta::after {
    content: "";
    position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(196,137,31,0.55), transparent);
    pointer-events: none;
}
.nexus-premium-cta__inner {
    position: relative; z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}
.nexus-premium-hook {
    font-size: 1rem;
    color: var(--text-2);
    line-height: 1.55;
    margin: 0;
    max-width: 34ch;
}
.nexus-premium-eyebrow {
    font-family: var(--mono);
    font-size: 0.67rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--honey);
    margin: 0;
}
.nexus-premium-headline {
    font-family: var(--display);
    font-style: italic;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 400;
    line-height: 1.25;
    color: var(--text);
    margin: 0;
    max-width: 26ch;
}
.nexus-premium-benefits {
    list-style: none;
    margin: 0; padding: 0;
    display: grid;
    gap: 9px;
    width: 100%;
    max-width: 360px;
    text-align: left;
}
.nexus-premium-benefit {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 0.86rem;
    color: var(--text-2);
    line-height: 1.4;
}
.nexus-premium-benefit__icon {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: rgba(196,137,31,0.11);
    color: var(--honey);
    display: grid; place-items: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.2s;
}
.nexus-premium-benefit:hover .nexus-premium-benefit__icon {
    background: rgba(196,137,31,0.2);
    transform: scale(1.1);
}
.nexus-premium-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 17px 28px;
    border-radius: var(--r-md);
    background: var(--honey);
    color: #1a1710;
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 22px rgba(196,137,31,0.32), 0 1px 0 rgba(255,255,255,0.15) inset;
    transition: background 0.2s, transform 0.15s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s;
}
.nexus-premium-cta-btn::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
    pointer-events: none;
}
.nexus-premium-cta-btn:hover {
    background: var(--honey-bright);
    transform: translateY(-3px);
    box-shadow: 0 8px 36px rgba(196,137,31,0.45), 0 1px 0 rgba(255,255,255,0.2) inset;
}
.nexus-premium-cta-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(196,137,31,0.3);
}
.nexus-premium-promo-note {
    font-family: var(--mono);
    font-size: 0.69rem;
    color: var(--text-3);
    text-align: center;
    margin: 0;
    letter-spacing: 0.03em;
}
.nexus-premium-prices {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.nexus-premium-price-chip {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--text-3);
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    letter-spacing: 0.04em;
}
.nexus-premium-price-chip--active {
    color: var(--honey);
    border-color: rgba(196,137,31,0.35);
    background: rgba(196,137,31,0.07);
    font-weight: 600;
}

/* Glow pulse animation for main CTA */
@keyframes nexus-glow-pulse {
    0%, 100% { box-shadow: 0 4px 22px rgba(196,137,31,0.32), 0 1px 0 rgba(255,255,255,0.15) inset; }
    50%       { box-shadow: 0 4px 32px rgba(196,137,31,0.52), 0 1px 0 rgba(255,255,255,0.2) inset; }
}
.nexus-premium-cta-btn.nexus-pulse {
    animation: nexus-glow-pulse 2.4s ease-in-out infinite;
}

/* Micro-parallax indicator strip */
.nexus-premium-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-md), transparent);
    margin: 0;
    border: none;
}

/* ── Dark mode overrides ── */
@media (prefers-color-scheme: dark) {
    .nexus-premium-cta {
        background: var(--bg-1);
        border-color: rgba(196,137,31,0.18);
    }
    .nexus-premium-cta-btn {
        color: #0d0c08;
    }
}
[data-theme="dark"] .nexus-premium-cta {
    background: var(--bg-1);
    border-color: rgba(196,137,31,0.18);
}
[data-theme="dark"] .nexus-premium-cta-btn {
    color: #0d0c08;
}

/* ══════════════════════════════════════════════════════════════
   NEXUS · Results actions bar (header buttons)
   ══════════════════════════════════════════════════════════════ */

.nexus-results-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}
@media (min-width: 540px) {
    .nexus-results-actions {
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }
}

/* Share button — solid honey CTA style */
.results-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 14px 32px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #d4962a 0%, #c4891f 55%, #b07818 100%);
    color: #fff;
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 18px rgba(196,137,31,0.40), 0 1px 0 rgba(255,255,255,0.16) inset;
    transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}
.results-share-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(196,137,31,0.52), 0 1px 0 rgba(255,255,255,0.18) inset;
}
.results-share-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(196,137,31,0.30);
}

.nexus-report-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 999px;
    border: 1.5px solid var(--honey);
    background: linear-gradient(135deg, rgba(196,137,31,0.10) 0%, rgba(196,137,31,0.03) 100%);
    color: var(--honey);
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.nexus-report-btn:hover {
    background: linear-gradient(135deg, rgba(196,137,31,0.20) 0%, rgba(196,137,31,0.10) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(196,137,31,0.22);
}
.nexus-report-btn__badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--honey);
    color: #fff;
    font-family: var(--mono);
    font-size: 0.60rem;
    font-weight: 700;
    letter-spacing: 0.09em;
}

/* ══════════════════════════════════════════════════════════════
   NEXUS · Blur zone + unlock overlay
   ══════════════════════════════════════════════════════════════ */

.nexus-blur-wrapper {
    position: relative;
}

.nexus-blur-zone {
    /* filter + pointer-events applied via JS (devtools-resistant) */
}

.nexus-unlock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 20px;
    background: rgba(247,244,238,0.62);
    pointer-events: auto;
}

.nexus-unlock-card {
    max-width: 420px;
    width: 100%;
    text-align: center;
    padding: 40px 32px 36px;
    border-radius: 22px;
    background: var(--bg-1);
    border: 1.5px solid rgba(196,137,31,0.28);
    box-shadow: 0 12px 56px rgba(196,137,31,0.13), 0 2px 12px rgba(60,50,30,0.08);
    display: grid;
    gap: 14px;
}

.nexus-unlock-badge {
    display: inline-flex;
    align-self: center;
    justify-self: center;
    padding: 4px 14px;
    border-radius: 999px;
    background: rgba(196,137,31,0.10);
    border: 1px solid rgba(196,137,31,0.28);
    font-family: var(--mono);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--honey);
    text-transform: uppercase;
}

.nexus-unlock-title {
    font-family: var(--display);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.22;
}

.nexus-unlock-sub {
    font-size: 0.79rem;
    color: var(--text-3);
    margin: 0;
    line-height: 1.5;
    font-family: var(--mono);
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.nexus-unlock-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 28px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #E0A030 0%, #C4891F 100%);
    color: #fff;
    font-family: var(--sans);
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 22px rgba(196,137,31,0.38);
    transition: transform 0.15s, box-shadow 0.2s;
    width: 100%;
    animation: nexus-pulse-glow 2.4s ease-in-out infinite;
}
.nexus-unlock-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(196,137,31,0.50);
}

@keyframes nexus-pulse-glow {
    0%, 100% { box-shadow: 0 4px 22px rgba(196,137,31,0.38); }
    50%       { box-shadow: 0 4px 32px rgba(196,137,31,0.58); }
}

.nexus-unlock-price {
    font-family: var(--mono);
    font-size: 0.73rem;
    color: var(--text-4);
    margin: 0;
}

/* Dark mode overrides for blur zone */
[data-theme="dark"] .nexus-unlock-overlay {
    background: rgba(20,18,16,0.62);
}
[data-theme="dark"] .nexus-unlock-card {
    background: var(--bg-2);
    border-color: rgba(196,137,31,0.22);
    box-shadow: 0 12px 56px rgba(0,0,0,0.3), 0 2px 12px rgba(0,0,0,0.2);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .nexus-unlock-overlay {
        background: rgba(20,18,16,0.62);
    }
    :root:not([data-theme="light"]) .nexus-unlock-card {
        background: var(--bg-2);
        border-color: rgba(196,137,31,0.22);
        box-shadow: 0 12px 56px rgba(0,0,0,0.3), 0 2px 12px rgba(0,0,0,0.2);
    }
}

/* ══════════════════════════════════════════════════════════════
   NEXUS · Premium Panel — Redesign (fully functional)
   Shell + product card + generating + success screens
   ══════════════════════════════════════════════════════════════ */

/* ── Overlay ── */
.premium-overlay {
    position: fixed; inset: 0; z-index: 9200;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    background: rgba(16,13,8,0.60);
    backdrop-filter: blur(6px) saturate(1.2);
    -webkit-backdrop-filter: blur(6px) saturate(1.2);
    animation: fadeIn 220ms ease;
}

/* ── Card ── */
.premium-card {
    position: relative;
    width: 100%; max-width: 500px;
    max-height: 92dvh; overflow-y: auto;
    border-radius: 22px;
    border: 1px solid rgba(196,137,31,0.22);
    background: var(--bg-1);
    box-shadow:
        0 32px 80px rgba(0,0,0,0.36),
        0 0 0 1px rgba(196,137,31,0.08) inset;
    animation: modal-in 300ms cubic-bezier(0.22,1,0.36,1);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.premium-card::-webkit-scrollbar { width: 5px; }
.premium-card::-webkit-scrollbar-track { background: transparent; }
.premium-card::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }

/* Decorative glow header */
.premium-card__glow {
    position: absolute; top: 0; left: 0; right: 0; height: 180px;
    background: radial-gradient(ellipse 80% 100% at 50% -10%, rgba(196,137,31,0.12) 0%, transparent 75%);
    pointer-events: none; border-radius: 22px 22px 0 0;
}
/* Top accent line */
.premium-card__accent {
    position: absolute; top: 0; left: 14%; right: 14%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(196,137,31,0.6), transparent);
    pointer-events: none;
}

/* Close button */
.premium-card__close {
    position: absolute; top: 14px; right: 14px; z-index: 3;
    width: 34px; height: 34px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--bg-2);
    color: var(--text-3);
    display: grid; place-items: center;
    cursor: pointer;
    transition: border-color 140ms, color 140ms, background 140ms;
}
.premium-card__close:hover {
    border-color: var(--border-md); color: var(--text); background: var(--bg-3);
}

/* Card body */
.premium-card__body {
    position: relative; z-index: 1;
    display: grid; gap: 20px;
    padding: 22px 24px 28px;
}

/* ── Sticky header ── */
.premium-header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
    padding-right: 44px; /* room for close btn */
}
.premium-header__title {
    font-family: var(--display); font-style: italic;
    font-size: 1.2rem; font-weight: 400; line-height: 1.2;
    color: var(--text); margin: 0;
}

/* ── Shared eyebrow ── */
.premium-eyebrow {
    display: block;
    font-family: var(--mono); font-size: 0.63rem;
    letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--honey); margin-bottom: 4px;
}

/* ── Product card ── */
.premium-product-card {
    position: relative; overflow: hidden;
    border-radius: 14px; border: 1.5px solid rgba(196,137,31,0.35);
    background: linear-gradient(160deg, rgba(196,137,31,0.06) 0%, var(--bg-2) 60%);
    padding: 18px 18px 16px;
}
.premium-product-card .premium-card__accent { left: 10%; right: 10%; }
.premium-product-card__head {
    display: flex; align-items: flex-start;
    justify-content: space-between; gap: 12px;
    margin-bottom: 14px; flex-wrap: wrap;
}
.premium-product-name {
    font-family: var(--display); font-style: italic;
    font-size: 1.1rem; font-weight: 400; color: var(--text); display: block;
}
.premium-product-price { text-align: right; flex-shrink: 0; }
.premium-price-amount {
    font-family: var(--mono); font-size: 1.6rem; font-weight: 700;
    color: var(--honey); line-height: 1; display: block;
}
.premium-price-period {
    font-family: var(--mono); font-size: 0.62rem;
    color: var(--text-3); display: block; margin-top: 2px;
}
.premium-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.premium-feature {
    display: flex; align-items: center; gap: 9px;
    font-size: 0.83rem; color: var(--text-2); line-height: 1.4;
}
.premium-feature__icon {
    width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
    background: rgba(196,137,31,0.12); color: var(--honey);
    display: grid; place-items: center;
}

/* ── Fields ── */
.premium-field { display: grid; gap: 7px; }
.premium-label {
    font-family: var(--mono); font-size: 0.67rem;
    letter-spacing: 0.10em; text-transform: uppercase; color: var(--text-3);
}
.premium-input {
    width: 100%; padding: 11px 14px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--bg-2);
    color: var(--text); font-family: var(--mono); font-size: 0.86rem;
    outline: none; transition: border-color 150ms, box-shadow 150ms;
    box-sizing: border-box;
}
.premium-input:focus {
    border-color: var(--honey);
    box-shadow: 0 0 0 3px rgba(196,137,31,0.12);
}

/* Currency row */
.premium-currency-row { display: flex; gap: 6px; }
.premium-currency-btn {
    flex: 1; padding: 9px 6px; border-radius: 9px;
    font-family: var(--mono); font-size: 0.80rem; font-weight: 600;
    border: 1.5px solid var(--border);
    background: transparent; color: var(--text-3);
    cursor: pointer; transition: all 0.14s;
}
.premium-currency-btn:hover { border-color: var(--honey); color: var(--honey); }
.premium-currency-btn.is-active {
    border-color: var(--honey); background: rgba(196,137,31,0.09); color: var(--honey);
}

/* Promo row */
.premium-promo-row { display: flex; gap: 8px; }
.premium-promo-row .premium-input { flex: 1; min-width: 0; }
.premium-promo-status { min-height: 18px; }
.premium-promo-ok {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.80rem; color: var(--ok); font-weight: 600;
}
.premium-promo-err { font-size: 0.80rem; color: var(--err); }

/* Spinner */
.premium-spinner {
    display: inline-block; width: 14px; height: 14px;
    border: 1.5px solid rgba(255,255,255,0.3);
    border-top-color: currentColor; border-radius: 50%;
    animation: spin 0.7s linear infinite; vertical-align: middle;
}

/* Error */
.premium-error-msg {
    font-size: 0.83rem; color: var(--err); margin: 0;
    padding: 10px 14px; border-radius: 10px;
    background: var(--err-bg); border: 1px solid rgba(160,48,32,0.2);
}

/* ── Price summary row ── */
.premium-price-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-radius: 10px;
    background: rgba(196,137,31,0.07);
    border: 1px solid rgba(196,137,31,0.20);
}
.premium-price-summary__label {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.premium-price-summary__amount {
    font-family: var(--mono);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--honey);
}

/* ── CTA buttons ── */
.premium-btn-primary {
    display: flex; align-items: center; justify-content: center; gap: 9px;
    width: 100%; padding: 16px 24px; border-radius: 13px; border: none;
    background: var(--honey); color: #1a1710;
    font-family: var(--sans); font-size: 1rem; font-weight: 700;
    letter-spacing: 0.01em; cursor: pointer; position: relative; overflow: hidden;
    box-shadow: 0 4px 22px rgba(196,137,31,0.34), 0 1px 0 rgba(255,255,255,0.16) inset;
    transition: background 0.2s, transform 0.15s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s;
}
.premium-btn-primary::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.14) 0%, transparent 55%);
    pointer-events: none;
}
.premium-btn-primary:hover:not(:disabled) {
    background: var(--honey-bright);
    transform: translateY(-2px);
    box-shadow: 0 8px 36px rgba(196,137,31,0.46), 0 1px 0 rgba(255,255,255,0.22) inset;
}
.premium-btn-primary:active:not(:disabled) { transform: translateY(0); }
.premium-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
.premium-btn-primary--cta { padding: 18px 28px; font-size: 1.02rem; }
.premium-btn-primary.is-free {
    background: var(--ok);
    box-shadow: 0 4px 20px rgba(31,122,74,0.3), 0 1px 0 rgba(255,255,255,0.14) inset;
}
.premium-btn-primary.is-free:hover:not(:disabled) {
    background: #1f7a4a;
    box-shadow: 0 8px 32px rgba(31,122,74,0.42);
}

.premium-btn-secondary {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 13px 20px; border-radius: 11px;
    border: 1px solid var(--border-md); background: var(--bg-2);
    color: var(--text-2); font-family: var(--sans); font-size: 0.9rem; font-weight: 500;
    cursor: pointer; text-decoration: none;
    transition: border-color 150ms, color 150ms, background 150ms;
}
.premium-btn-secondary:hover {
    border-color: var(--honey); color: var(--honey); background: rgba(196,137,31,0.06);
}

.premium-btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 16px; border-radius: 9px;
    border: 1px solid var(--border); background: transparent;
    color: var(--text-2); font-family: var(--sans); font-size: 0.86rem; font-weight: 500;
    cursor: pointer; transition: border-color 150ms, color 150ms;
}
.premium-btn-ghost:hover { border-color: var(--border-md); color: var(--text); }

/* Pulse animation */
.premium-btn-primary.nexus-pulse {
    animation: nexus-glow-pulse 2.4s ease-in-out infinite;
}


/* Trust badge */
.premium-trust {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 14px; border-radius: 10px;
    background: var(--bg-2); border: 1px solid var(--border);
}
.premium-trust__icon { color: var(--ok); flex-shrink: 0; }
.premium-trust__text {
    font-size: 0.68rem; color: var(--text-3);
    font-family: var(--mono); margin: 0; line-height: 1.4;
}

/* ── Generating screen ── */
.premium-generating {
    display: grid; gap: 22px; text-align: center;
    padding: 12px 0 8px;
}
.premium-generating__icon {
    display: flex; align-items: center; justify-content: center;
}
@keyframes nexus-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.premium-generating__title {
    font-family: var(--display); font-style: italic;
    font-size: clamp(1.1rem, 2.5vw, 1.45rem); font-weight: 400;
    line-height: 1.3; color: var(--text); margin: 0;
}
.premium-generating__note {
    font-family: var(--mono); font-size: 0.72rem;
    color: var(--text-3); line-height: 1.55; margin: 0;
    max-width: 38ch; margin-inline: auto;
}

/* Progress track */
.premium-progress-track {
    width: 100%; height: 4px;
    background: var(--bg-3); border-radius: 999px; overflow: hidden;
}
.premium-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--honey), var(--honey-bright, #d99b2b));
    border-radius: 999px;
    animation: premium-progress 3.8s cubic-bezier(0.4,0,0.2,1) forwards;
    width: 0%;
}
@keyframes premium-progress {
    0%   { width: 0%; }
    12%  { width: 22%; }
    35%  { width: 48%; }
    60%  { width: 68%; }
    82%  { width: 82%; }
    100% { width: 92%; }  /* never quite 100% — worker does the rest */
}

/* Generating steps */
.premium-gen-steps { display: grid; gap: 10px; text-align: left; }
.premium-gen-step {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--mono); font-size: 0.75rem; color: var(--text-4);
    opacity: 0; transform: translateY(5px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s;
}
.premium-gen-step.is-active {
    opacity: 1; transform: translateY(0); color: var(--text-2);
}
.premium-gen-step.is-done {
    opacity: 0.55; transform: translateY(0); color: var(--ok);
}
.premium-gen-step__dot {
    width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
    background: currentColor;
}
.premium-gen-step.is-active .premium-gen-step__dot {
    background: var(--honey);
    box-shadow: 0 0 6px rgba(196,137,31,0.55);
    animation: dot-pulse 1s ease-in-out infinite;
}
@keyframes dot-pulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(1.4); }
}

/* ── Success screen ── */
.premium-success {
    display: grid; gap: 22px; text-align: center;
    padding: 12px 0 8px;
}
.premium-success__mark {
    font-size: 2.6rem; line-height: 1;
    color: var(--honey);
    animation: mark-pop 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes mark-pop {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
.premium-success__title {
    font-family: var(--display); font-style: italic;
    font-size: clamp(1.2rem, 2.8vw, 1.6rem); font-weight: 400;
    line-height: 1.2; color: var(--text); margin: 0 0 8px;
}
.premium-success__body {
    font-size: 0.87rem; color: var(--text-2);
    line-height: 1.6; margin: 0; max-width: 38ch; margin-inline: auto;
}
.premium-success__actions {
    display: grid; gap: 10px;
    text-align: left;
}

/* ── Premium plan toggle ── */
.premium-plan-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.premium-plan-btn {
    display: grid;
    gap: 4px;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--text-2);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.14s, background 0.14s, color 0.14s;
}
.premium-plan-btn:hover {
    border-color: rgba(196,137,31,0.5);
    color: var(--text);
}
.premium-plan-btn.is-active {
    border-color: var(--honey);
    background: rgba(196,137,31,0.09);
    color: var(--text);
}
.premium-plan-name {
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    display: block;
}
.premium-plan-price {
    font-family: var(--mono);
    font-size: 0.80rem;
    color: var(--text-3);
    display: block;
}
.premium-plan-btn.is-active .premium-plan-price {
    color: var(--honey);
    font-weight: 600;
}

/* ── Premium panel — mobile & tablet responsive ── */
@media (max-width: 540px) {
    .premium-overlay {
        padding: 0;
        align-items: flex-end;
    }
    .premium-card {
        max-width: 100%;
        width: 100%;
        border-radius: 22px 22px 0 0;
        max-height: 94dvh;
        border-bottom: none;
    }
    .premium-card__body {
        padding: 18px 16px 32px;
        gap: 16px;
    }
    .premium-card__glow { height: 120px; }
    .premium-header { padding-bottom: 14px; }
    .premium-header__title { font-size: 1.05rem; }
    .premium-plan-row { grid-template-columns: 1fr; gap: 6px; }
    .premium-plan-btn { padding: 11px 12px; }
    .premium-currency-row { gap: 5px; }
    .premium-currency-btn { padding: 9px 4px; font-size: 0.76rem; }
    .premium-promo-row { flex-wrap: wrap; gap: 6px; }
    .premium-promo-row .premium-input { min-width: 0; flex: 1 1 140px; }
    .premium-price-amount { font-size: 1.35rem; }
    .premium-product-card { padding: 14px; }
    .premium-product-card__head { flex-direction: column; gap: 8px; }
    .premium-product-price { text-align: left; }
    .premium-features { gap: 8px; }
    .premium-feature { font-size: 0.80rem; }
    .premium-btn-primary { padding: 15px 20px; font-size: 0.95rem; }
    .premium-btn-primary--cta { padding: 16px 22px; }
    .premium-price-summary { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 14px; }
    .premium-success__title { font-size: 1.1rem; }
    .premium-generating__title { font-size: 1.05rem; }
    .premium-success__body, .premium-generating__note { max-width: 100%; }
}

@media (min-width: 541px) and (max-width: 768px) {
    .premium-overlay { padding: 12px; }
    .premium-card { max-width: 480px; }
    .premium-card__body { padding: 20px 20px 26px; }
    .premium-plan-row { gap: 7px; }
    .premium-product-card__head { flex-wrap: wrap; }
}

/* ── Radar tooltip ── */
.radar-tooltip {
    position: absolute; z-index: 10;
    padding: 4px 10px; border-radius: 7px;
    background: var(--text); color: var(--bg);
    font-family: var(--mono); font-size: 0.72rem; font-weight: 600;
    pointer-events: none; white-space: nowrap;
    transform: translateX(-50%);
    opacity: 0; transition: opacity 0.15s;
}
.radar-tooltip.is-visible { opacity: 1; }
.radar-tooltip::after {
    content: "";
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    border: 4px solid transparent; border-top-color: var(--text);
}

/* ── Radar legend — compact dimension scorecard below SVG ── */
.nexus-radar-legend {
    display: grid;
    gap: 6px;
    padding: 12px 18px 14px;
    border-top: 1px solid var(--border);
    margin-top: 0;
    text-align: left;
}
.nexus-radar-legend-row {
    display: grid;
    grid-template-columns: 1fr 80px 30px;
    gap: 8px;
    align-items: center;
}
.nexus-radar-legend-name {
    font-family: var(--mono);
    font-size: 0.67rem;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
}
.nexus-radar-legend-bar {
    height: 3px;
    background: var(--bg-3);
    border-radius: 999px;
    overflow: hidden;
}
.nexus-radar-legend-fill {
    height: 100%;
    width: calc(var(--pct) * 1%);
    background: linear-gradient(90deg, var(--honey), rgba(196,137,31,0.45));
    border-radius: 999px;
    transition: width 0.8s cubic-bezier(0.22,1,0.36,1) 0.1s;
}
.nexus-radar-legend-pct {
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--text-2);
    font-weight: 600;
    text-align: right;
    letter-spacing: 0.02em;
}

/* ── Dev Shortcut Palette (Cmd+B) ── */
.dev-palette-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: clamp(80px, 15vh, 180px);
    background: rgba(14, 11, 8, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: dev-palette-in 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.dev-palette-overlay.is-closing {
    animation: dev-palette-out 140ms cubic-bezier(0.4, 0, 1, 1) forwards;
}
@keyframes dev-palette-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes dev-palette-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}
.dev-palette-card {
    width: min(92%, 520px);
    background: #1a1510;
    border: 1px solid rgba(212, 162, 68, 0.35);
    border-radius: 16px;
    box-shadow:
        0 0 0 1px rgba(212, 162, 68, 0.08),
        0 24px 64px rgba(0, 0, 0, 0.7),
        0 0 80px rgba(212, 162, 68, 0.06);
    overflow: hidden;
    animation: dev-card-in 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes dev-card-in {
    from { opacity: 0; transform: translateY(-12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.dev-palette-inner {
    padding: 6px 6px 10px;
}
.dev-palette-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    border: 1px solid rgba(212, 162, 68, 0.18);
}
.dev-palette-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    opacity: 0.55;
    color: var(--honey, #d4a244);
}
.dev-palette-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--mono, 'DM Mono', monospace);
    font-size: 1rem;
    letter-spacing: 0.08em;
    color: #f5f0e8;
    caret-color: var(--honey, #d4a244);
}
.dev-palette-input::placeholder {
    color: rgba(245, 240, 232, 0.25);
    letter-spacing: 0.04em;
}
.dev-palette-hint {
    padding: 8px 14px 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dev-palette-hint-label {
    font-family: var(--mono, 'DM Mono', monospace);
    font-size: 0.66rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(212, 162, 68, 0.5);
}
.dev-palette-hint-key {
    font-family: var(--mono, 'DM Mono', monospace);
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    color: rgba(245, 240, 232, 0.25);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 1px 6px;
}
.dev-palette-error {
    margin: 6px 6px 0;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(220, 60, 60, 0.12);
    border: 1px solid rgba(220, 60, 60, 0.25);
    font-family: var(--mono, 'DM Mono', monospace);
    font-size: 0.72rem;
    color: #f08080;
    letter-spacing: 0.04em;
    animation: dev-error-shake 300ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes dev-error-shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}
.dev-palette-success {
    margin: 6px 6px 0;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(212, 162, 68, 0.1);
    border: 1px solid rgba(212, 162, 68, 0.3);
    font-family: var(--mono, 'DM Mono', monospace);
    font-size: 0.72rem;
    color: var(--honey, #d4a244);
    letter-spacing: 0.04em;
}


/* ─────────────────────────────────────────────────────────
   §4  RESPONSIVE
   ───────────────────────────────────────────────────────── */
/* ════════════════════════════════════════════════════════
   NEXUS · Responsive v2
   8 breakpoints : 360 · 480 · 640 · 800 · 900 · 1060 · 1200 · 1400
   Ordre : large → étroit (mobile-first overrides)
   ════════════════════════════════════════════════════════ */

/* ── ≥1201px : XL Desktop ── */
/* Rien à override — c'est le baseline full-width */

/* ── ≤1200px : Desktop standard / petits écrans ── */
@media (max-width: 1200px) {
    .intro-inner-wrap { width: min(100%, 720px); }
}

/* ── ≤1060px : Laptops compacts / iPad Pro ── */
@media (max-width: 1060px) {
    .profile-grid,
    .trajectory-grid--dominant {
        grid-template-columns: 1fr;
    }
    .trajectory-grid--cluster,
    .program-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    /* Centre la 3ème carte seule sur une ligne */
    .trajectory-grid--cluster .traj-card:nth-child(3):last-child,
    .program-grid .prog-card:nth-child(3):last-child {
        grid-column: span 2;
        max-width: calc(50% - var(--space-xs));
        margin-inline: auto;
        width: 100%;
    }
    .nexus-profile-trio {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto 1fr;
    }
    .section-title {
        font-size: var(--fs-3xl);
    }
    .section-title--mid {
        font-size: var(--fs-xl);
    }
}

/* ── ≤900px : iPad portrait / petits laptops ── */
@media (max-width: 900px) {
    .question-shell { width: min(100%, 640px); }
    .analyzing-shell { width: min(100%, 500px); }
    .explain-row {
        grid-template-columns: 1fr 1fr;
    }
    .app-shell {
        padding-inline: clamp(var(--space-sm), 4vw, var(--space-lg));
    }
    .site-chrome {
        padding-inline: clamp(var(--space-sm), 4vw, var(--space-lg));
    }
}

/* ── ≤800px : Tablettes étroites / grands téléphones paysage ── */
@media (max-width: 800px) {
    .panel-grid,
    .cluster-grid,
    .program-grid,
    .nexus-profile-trio,
    .trajectory-grid--cluster,
    .form-grid,
    .form-grid.is-three,
    .explain-row {
        grid-template-columns: 1fr;
    }
    /* Reset 3rd-card centering at 1-col breakpoint */
    .trajectory-grid--cluster .traj-card:nth-child(3):last-child,
    .program-grid .prog-card:nth-child(3):last-child {
        grid-column: auto;
        max-width: 100%;
        margin-inline: 0;
    }
    /* Trio: full single column */
    .nexus-profile-trio { grid-template-rows: auto; }
    .nexus-profile-trio > .nexus-radar-card,
    .nexus-profile-trio > .nexus-signal-card,
    .nexus-profile-trio > .nexus-dims-card {
        grid-column: auto;
        grid-row: auto;
    }
    .section-head--with-action {
        grid-template-columns: 1fr;
    }
    .cmp-table { overflow-x: auto; }
    .institution-panel__inner {
        width: min(100%, 560px);
        padding: var(--space-lg) var(--space-md);
    }
    .outreach-prompt__panel {
        padding: var(--space-lg) var(--space-md);
    }
    .site-chrome {
        top: 0; /* pas de promo banner sur mobile */
    }
    body[data-view="intro"] .site-chrome {
        top: 0;
    }
    .section-title {
        font-size: var(--fs-2xl);
        line-height: 1.0;
    }
    .section-title--mid {
        font-size: var(--fs-lg);
    }
}

/* ── ≤640px : Grands téléphones / mini-tablettes ── */
@media (max-width: 640px) {
    .site-chrome {
        flex-wrap: wrap;
        gap: var(--space-2xs);
        padding-top: calc(var(--space-xs) + var(--sa-top, 0px));
        padding-bottom: var(--space-xs);
    }
    .app-shell {
        padding-inline: var(--space-sm);
        padding-bottom: calc(var(--space-2xl) + var(--sa-bottom, 0px));
    }
    .results-quick-actions .btn,
    .results-quick-actions .btn-ghost {
        width: 100%;
        justify-content: center;
    }
    .feedback-actions { flex-direction: column; }
    .feedback-actions .btn-secondary { width: 100%; justify-content: center; }
    .intro-frame { padding-inline: var(--space-lg); }
    .quiz-nav { gap: var(--space-2xs); }
    .quiz-nav .btn,
    .quiz-nav .btn-ghost {
        flex: 1;
        justify-content: center;
    }
    .traj-card { padding: var(--space-md) var(--space-sm); }
    .prog-card { padding: var(--space-sm); }
    .button-row.is-spread {
        flex-direction: column-reverse;
        gap: var(--space-2xs);
    }
    .button-row.is-spread > * {
        width: 100%;
        justify-content: center;
    }
    .section-head--with-action { gap: var(--space-2xs); }
    #institution-panel { padding: var(--space-xs); }
    .institution-panel__inner { max-height: 94dvh; }

    /* ── Radar: full width ── */
    .nexus-radar-wrap {
        max-width: 100%;
        padding: var(--space-md) var(--space-2xs) 0;
    }
    .nexus-radar-svg  { max-width: 100%; }
    .nexus-radar-legend {
        padding: var(--space-2xs) var(--space-xs) var(--space-xs);
    }
    .nexus-radar-legend-row {
        grid-template-columns: 1fr 60px 26px;
        gap: var(--space-2xs);
    }

    /* ── Premium CTA ── */
    .nexus-premium-cta {
        padding: var(--space-lg) var(--space-md);
    }
    .nexus-premium-headline {
        font-size: var(--fs-xl);
    }
    .nexus-premium-prices {
        justify-content: center;
    }

    /* ── Premium panel: bottom sheet ── */
    .premium-card {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-height: 96dvh;
    }
    .premium-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .premium-card__body {
        padding: var(--space-md) var(--space-md) var(--space-xl);
    }

    /* ── Results tab bar ── */
    .result-tab-bar {
        gap: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .result-tab-bar::-webkit-scrollbar { display: none; }
    .result-tab-btn {
        white-space: nowrap;
        font-size: var(--fs-sm);
        padding: var(--space-xs) var(--space-sm);
    }

    .nexus-score-arc { max-width: 140px; }

    /* ── Intro ── */
    .intro-stage {
        padding: var(--space-lg) var(--space-sm);
    }
}

/* ── ≤480px : Téléphones standards ── */
@media (max-width: 480px) {
    .app-shell {
        padding-inline: var(--space-xs);
    }
    .site-chrome {
        padding-inline: var(--space-xs);
        gap: var(--space-xs);
    }
    .view-shell {
        padding-top: var(--space-sm);
        padding-bottom: var(--space-sm);
    }
    .brand-mark {
        font-size: 0.68rem;
        letter-spacing: 0.30em;
    }
    .section-title {
        font-size: var(--fs-xl);
        letter-spacing: -0.02em;
    }
    .section-title--mid {
        font-size: var(--fs-lg);
    }
    .section-copy {
        font-size: var(--fs-sm);
    }
    .option-btn {
        padding: var(--space-xs) var(--space-sm);
        font-size: var(--fs-sm);
    }
    .chip-grid { gap: var(--space-2xs); }

    .nexus-premium-cta {
        padding: var(--space-md) var(--space-sm);
    }
    .nexus-premium-headline {
        font-size: var(--fs-lg);
    }
    .nexus-premium-prices {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .quiz-nav .btn,
    .quiz-nav .btn-ghost {
        padding: var(--space-xs) var(--space-sm);
        font-size: var(--fs-sm);
    }

    .traj-card {
        padding: var(--space-sm);
    }
    .prog-card {
        padding: var(--space-xs);
    }

    /* Premium panel full width */
    .premium-card {
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        max-height: 98dvh;
    }
    .premium-card__body {
        padding: var(--space-sm) var(--space-sm) var(--space-lg);
    }
}

/* ── ≤360px : iPhone SE / très petits écrans ── */
@media (max-width: 360px) {
    .app-shell {
        padding-inline: var(--space-2xs);
    }
    .site-chrome {
        padding: var(--space-2xs);
        gap: var(--space-2xs);
    }
    .chrome-actions { gap: var(--space-2xs); }
    .section-title {
        font-size: var(--fs-lg);
    }
    .section-copy {
        font-size: var(--fs-sm);
    }
    .option-btn {
        padding: var(--space-2xs) var(--space-xs);
        font-size: var(--fs-sm);
    }
    .nexus-radar-wrap {
        padding: var(--space-sm) 0 0;
    }
    .nexus-radar-legend-row {
        grid-template-columns: 1fr 40px 20px;
        gap: 4px;
    }
    .nexus-profile-trio {
        gap: var(--space-xs);
    }

    /* Trajectory cards — pas d'espace superflu */
    .traj-card {
        padding: var(--space-xs);
    }
    .nexus-premium-cta {
        padding: var(--space-sm);
    }
    .premium-card__body {
        padding: var(--space-sm);
    }
}


/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .phase.is-entering .view-shell {
        animation: none;
    }
}


/* ─────────────────────────────────────────────────────────
   §5  PRINT FAB — bouton d'impression discret
   ───────────────────────────────────────────────────────── */

#print-fab {
    position: fixed;
    bottom: calc(28px + var(--space-lg) + var(--sa-bottom, 0px));
    right: var(--space-lg);
    z-index: 8000;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-md);
    background: var(--bg-1);
    color: var(--text-3);
    display: grid;
    place-items: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms, border-color 150ms, color 150ms, box-shadow 150ms, transform 150ms;
    box-shadow: var(--shadow-sm);
}

/* Visible uniquement sur la phase results */
body[data-view="results"] #print-fab {
    opacity: 1;
    pointer-events: auto;
}

#print-fab:hover {
    border-color: var(--border-strong);
    color: var(--text);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

#print-fab:active {
    transform: translateY(0);
    box-shadow: var(--shadow-xs);
}

/* Dark mode */
[data-theme="dark"] #print-fab {
    background: var(--bg-2);
}

/* ═══════════════════════════════════════════════════════
   CAREER EXPLORER CTA (bouton "ce que j'aimerais faire")
════════════════════════════════════════════════════════ */
.career-explorer-cta {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
}
.career-explorer-cta__label {
    margin: 0;
    font-size: var(--fs-sm);
    color: var(--text-2);
    line-height: 1.5;
}
.career-explorer-cta__label strong {
    display: block;
    font-size: var(--fs-base);
    color: var(--text);
    margin-bottom: 2px;
}
@media (max-width: 600px) {
    .career-explorer-cta {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: var(--space-md);
    }
    .career-explorer-cta .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════
   CAREER BROWSER PANEL
════════════════════════════════════════════════════════ */
.career-browser-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.48);
    /* Au-dessus du header (100) ET de la promo-bar (9500) */
    z-index: 9600;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}
.career-browser-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}
.career-browser-card {
    background: var(--bg-1);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-height: 92dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(32px);
    transition: transform 0.26s cubic-bezier(0.32,0.72,0,1);
}
.career-browser-overlay.is-open .career-browser-card {
    transform: translateY(0);
}
/* Mobile : éviter que le panneau passe sous la promo-bar (bas) ou le header (haut) */
@media (max-width: 639px) {
    .career-browser-overlay {
        /* S'arrête au-dessus de la promo-bar fixe (28px) */
        bottom: 28px;
    }
    .career-browser-card {
        /* Hauteur max = écran entier − promo-bar (28px) − header approximatif (56px) − safe-area top */
        max-height: calc(100dvh - 28px - 56px - var(--sa-top, 0px));
    }
}

@media (min-width: 640px) {
    .career-browser-overlay {
        align-items: center;
        padding: var(--space-xl);
    }
    .career-browser-card {
        border-radius: 18px;
        max-width: 560px;
        max-height: 84dvh;
        margin: auto;
        transform: translateY(16px) scale(0.98);
    }
    .career-browser-overlay.is-open .career-browser-card {
        transform: translateY(0) scale(1);
    }
}

/* iOS drag handle */
.cb-drag-handle {
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: 99px;
    margin: 10px auto 4px;
    flex-shrink: 0;
}
@media (min-width: 640px) { .cb-drag-handle { display: none; } }

/* Header */
.career-browser-header {
    padding: 4px var(--space-lg) var(--space-sm);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.cb-header-top {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}
.cb-title {
    flex: 1;
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--text);
    margin: 0;
    font-family: var(--font-serif);
}
.cb-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-2);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.cb-close:hover { background: var(--bg-2); color: var(--text); }
.cb-back {
    font-size: var(--fs-sm);
    color: var(--text-2);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    transition: color 0.15s;
}
.cb-back:hover { color: var(--text); }
.cb-search-wrap {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}
.cb-search {
    flex: 1;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 var(--space-sm);
    font-size: var(--fs-sm);
    color: var(--text);
    background: var(--bg-2);
    outline: none;
    transition: border-color 0.15s;
}
.cb-search:focus { border-color: var(--accent); }
.cb-counter {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-3);
    white-space: nowrap;
    letter-spacing: 0.03em;
}

/* Body — scrollable */
.cb-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: var(--space-sm) var(--space-lg) var(--space-md);
}
.cb-hint {
    font-size: var(--fs-xs);
    color: var(--text-3);
    margin: 0 0 var(--space-md);
    letter-spacing: 0.02em;
}

/* Family groups */
.cb-family {
    margin-bottom: var(--space-md);
}
.cb-family__name {
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-3);
    margin-bottom: var(--space-2xs);
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}
.cb-family__careers {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Career item button */
.cb-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: 9px var(--space-sm);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s, border-color 0.12s;
    width: 100%;
}
.cb-item:hover:not(:disabled) {
    background: var(--bg-2);
    border-color: var(--border);
}
.cb-item.is-selected {
    background: rgba(107,99,232,0.08);
    border-color: var(--violet);
}
.cb-item.is-selected .cb-item__name {
    color: var(--violet);
    font-weight: 600;
}
.cb-item:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.cb-item__name {
    font-size: var(--fs-sm);
    color: var(--text);
    line-height: 1.4;
}
.cb-item__score {
    font-size: var(--fs-xs);
    font-weight: 700;
    font-family: var(--mono);
    flex-shrink: 0;
}

/* Footer */
.career-browser-footer {
    padding: var(--space-sm) var(--space-lg);
    padding-bottom: calc(var(--space-sm) + var(--sa-bottom, 0px));
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.career-browser-footer .btn {
    width: 100%;
    justify-content: center;
}

/* Results cards — iOS clean style */
.cb-result-card {
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 10px;
    background: var(--bg-2);
}
.cb-result-card:last-child { margin-bottom: 0; }
.cb-result-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: 12px;
}
.cb-result-card__family {
    font-size: 0.68rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 3px;
}
.cb-result-card__name {
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--text);
    font-family: var(--font-serif);
    line-height: 1.25;
}
.cb-result-score {
    font-size: 1.75rem;
    font-weight: 800;
    font-family: var(--mono);
    flex-shrink: 0;
    line-height: 1;
}
/* Inline stats row instead of bar charts */
.cb-result-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.cb-result-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-3);
    border-radius: 10px;
    padding: 6px 12px;
    flex: 1;
    min-width: 0;
}
.cb-result-stat__val {
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--mono);
    color: var(--text);
    line-height: 1.2;
}
.cb-result-stat__label {
    font-size: 0.62rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-top: 2px;
}
