/* =========================================================================
   VIZINOV CLOUD - Système de design « maison » (aucun framework).
   Direction : « Console souveraine » - épuré, aéré, dynamique.
   Palette « indigo nuage » (indigo profond + bleu ciel). Thème CLAIR par
   défaut, SOMBRE sur bascule.

   Repère technique conservé du projet : on NE met PAS light-dark() dans les
   variables (pas réévalué de façon fiable). On définit les valeurs CLAIRES
   dans :root, puis on les surcharge en sombre via :root[data-theme="dark"].
   ========================================================================= */

/* -------------------------------------------------------------------------
   1) JETONS DE DESIGN - THÈME CLAIR (par défaut)
   ------------------------------------------------------------------------- */
:root {
    color-scheme: light;

    /* Surfaces (du fond vers le premier plan) */
    --canvas:        oklch(0.984 0.006 260);
    --surface:       oklch(1 0 0);
    --surface-sunk:  oklch(0.968 0.008 260);
    --surface-veil:  oklch(1 0 0 / 0.7);
    --border:        oklch(0.912 0.011 262);
    --border-strong: oklch(0.83 0.02 262);

    /* Texte (contrastes verifies AA sur nos surfaces claires) */
    --ink:       oklch(0.245 0.03 264);
    --ink-soft:  oklch(0.48 0.026 264);
    --ink-faint: oklch(0.53 0.022 264);

    /* Marque : indigo + ciel (le brand porte du petit texte sur teinte : AA) */
    --brand:        oklch(0.52 0.19 264);
    --brand-strong: oklch(0.47 0.2 266);
    --brand-tint:   oklch(0.955 0.028 264);
    --sky:          oklch(0.7 0.13 236);
    --on-brand:     oklch(0.99 0 0);
    /* Remplissage des boutons pleins : decouple du brand pour rester lisible
       dans les deux themes (blanc dessus). Surcharge en sombre plus bas. */
    --brand-btn:       var(--brand);
    --brand-btn-hover: var(--brand-strong);
    --grad-a: oklch(0.56 0.2 266);
    --grad-b: oklch(0.68 0.13 236);
    --brand-gradient: linear-gradient(135deg, var(--grad-a), var(--grad-b));

    /* États */
    --ok-ink:    oklch(0.5 0.12 156);
    --ok-bg:     oklch(0.955 0.045 156);
    --ok-border: oklch(0.82 0.09 156);
    --ok-ring:   oklch(0.72 0.15 156 / 0.18);

    --danger-ink:    oklch(0.47 0.16 25);
    --danger-bg:     oklch(0.962 0.03 25);
    --danger-border: oklch(0.85 0.09 25);

    /* Jauge de robustesse du mot de passe (4 paliers, du faible au fort). */
    --pw-1: oklch(0.6 0.2 25);    /* faible */
    --pw-2: oklch(0.72 0.16 65);  /* moyen */
    --pw-3: oklch(0.66 0.16 140); /* bon */
    --pw-4: oklch(0.58 0.14 155); /* fort */

    /* Halos décoratifs du fond */
    --halo-1: oklch(0.93 0.05 266);
    --halo-2: oklch(0.94 0.04 236);
    --halo-op: 0.9;

    /* Ombres douces + anneau de focus */
    --shadow-xs: 0 1px 2px oklch(0.35 0.04 264 / 0.06);
    --shadow-sm: 0 2px 6px oklch(0.35 0.04 264 / 0.07);
    --shadow-md: 0 14px 34px -14px oklch(0.35 0.06 264 / 0.24);
    --shadow-lg: 0 34px 70px -28px oklch(0.3 0.08 264 / 0.32);
    --ring: 0 0 0 3px oklch(0.58 0.2 264 / 0.22);

    /* Rayons */
    --r-xs: 8px; --r-sm: 11px; --r-md: 15px; --r-lg: 22px; --r-xl: 30px; --r-full: 999px;

    /* Espacements */
    --sp-1: 0.5rem; --sp-2: 0.75rem; --sp-3: 1rem; --sp-4: 1.5rem;
    --sp-5: 2rem;   --sp-6: 3rem;    --sp-7: 4.5rem; --sp-8: 6.5rem;

    /* Typographie (100 % polices système : zéro dépendance) */
    --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Segoe UI Mono", Menlo, Consolas, monospace;

    /* Échelle de tailles (ratio ~1.2). Une seule source de vérité pour tous
       les titres, accroches, libellés et légendes du site. */
    --fs-xs:   0.75rem;   /* mentions les plus discrètes */
    --fs-sm:   0.875rem;  /* légendes, libellés de champ, notes */
    --fs-base: 1rem;      /* corps */
    --fs-md:   1.125rem;  /* accroche sous un titre */
    --fs-lg:   1.375rem;
    --fs-xl:   1.75rem;
    --fs-2xl:  2.25rem;   /* titre de page standard (plafond) */
    --fs-title:   clamp(1.75rem, 3vw, 2.25rem);   /* H1 des formulaires */
    --fs-display: clamp(2.4rem, 7vw, 4.4rem);     /* titre éditorial du hero */

    /* Interlignes + serrage optique par palier de taille. */
    --lh-tight:   1.12;   /* titres */
    --lh-body:    1.6;    /* accroches et corps */
    --tracking-tight:   -0.03em;   /* titres < 2.5rem */
    --tracking-tighter: -0.045em;  /* display */

    --wrap: 1160px;
}

/* -------------------------------------------------------------------------
   1 bis) SURCHARGE - THÈME SOMBRE
   ------------------------------------------------------------------------- */
:root[data-theme="dark"] {
    color-scheme: dark;

    --canvas:        oklch(0.172 0.022 266);
    --surface:       oklch(0.216 0.026 266);
    --surface-sunk:  oklch(0.152 0.02 266);
    --surface-veil:  oklch(0.216 0.026 266 / 0.72);
    --border:        oklch(0.31 0.03 266);
    --border-strong: oklch(0.43 0.035 266);

    --ink:       oklch(0.968 0.008 260);
    --ink-soft:  oklch(0.76 0.02 260);
    --ink-faint: oklch(0.6 0.02 260);

    --brand:        oklch(0.74 0.15 266);
    --brand-strong: oklch(0.78 0.15 266);
    --brand-tint:   oklch(0.3 0.06 266);
    --sky:          oklch(0.76 0.11 236);
    /* En sombre, le brand clair sert d'accent/texte ; les boutons pleins gardent
       un indigo profond pour rester lisibles sous le blanc (AA). */
    --brand-btn:       oklch(0.55 0.19 264);
    --brand-btn-hover: oklch(0.5 0.19 264);

    --ok-ink:    oklch(0.85 0.15 158);
    --ok-bg:     oklch(0.29 0.07 158);
    --ok-border: oklch(0.46 0.1 158);
    --ok-ring:   oklch(0.78 0.16 158 / 0.22);

    --danger-ink:    oklch(0.85 0.11 25);
    --danger-bg:     oklch(0.3 0.08 25);
    --danger-border: oklch(0.47 0.12 25);

    /* Jauge de mot de passe : paliers un peu plus clairs sur fond sombre. */
    --pw-1: oklch(0.68 0.19 25);
    --pw-2: oklch(0.78 0.15 65);
    --pw-3: oklch(0.75 0.15 140);
    --pw-4: oklch(0.72 0.15 155);

    --halo-1: oklch(0.4 0.12 266);
    --halo-2: oklch(0.42 0.1 236);
    --halo-op: 0.42;

    --shadow-xs: 0 1px 2px oklch(0 0 0 / 0.4);
    --shadow-sm: 0 2px 8px oklch(0 0 0 / 0.45);
    --shadow-md: 0 16px 36px -14px oklch(0 0 0 / 0.6);
    --shadow-lg: 0 36px 74px -28px oklch(0 0 0 / 0.66);
    --ring: 0 0 0 3px oklch(0.74 0.15 266 / 0.35);
}

/* -------------------------------------------------------------------------
   2) RESET minimal
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    min-height: 100dvh;
    font-family: var(--font-sans);
    font-size: 16px; line-height: 1.6;
    color: var(--ink); background: var(--canvas);
    display: flex; flex-direction: column;
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
    transition: background-color .4s ease, color .4s ease;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
h1, h2, h3 { line-height: 1.12; font-weight: 800; letter-spacing: -0.028em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* Fond décoratif : voile de « nuages » indigo/ciel, très doux, fixé derrière. */
body::before {
    content: ""; position: fixed; inset: -20% 0 0; z-index: -2; pointer-events: none;
    background:
        radial-gradient(46rem 30rem at 82% -6%, var(--halo-1), transparent 62%),
        radial-gradient(40rem 28rem at 4% 2%, var(--halo-2), transparent 58%);
    opacity: var(--halo-op);
    transition: opacity .4s ease;
    animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translate3d(0,0,0); } to { transform: translate3d(0,-2.2%,0) scale(1.05); } }

/* Icônes : taille par défaut, alignées au texte. Le trait suit currentColor. */
.ic { width: 20px; height: 20px; flex: none; }

/* -------------------------------------------------------------------------
   3) STRUCTURE (en-tête flottant, contenu, pied)
   ------------------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--sp-4); }

.site-header { position: sticky; top: 0; z-index: 50; padding-inline: var(--sp-4); }
.site-header__inner {
    width: 100%; max-width: var(--wrap); margin: var(--sp-3) auto 0;
    padding: 0.6rem 0.7rem 0.6rem var(--sp-4);
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
    background: var(--surface-veil);
    -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
    border: 1px solid var(--border); border-radius: var(--r-full); box-shadow: var(--shadow-sm);
}

.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; }
.brand__mark {
    display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px;
    background: var(--brand-gradient); color: var(--on-brand);
    box-shadow: var(--shadow-sm), inset 0 1px 0 oklch(1 0 0 / 0.35);
}
.brand__mark .ic { width: 21px; height: 21px; }
.brand__name { font-size: 1.08rem; text-transform: uppercase; letter-spacing: 0.03em; font-weight: 700; }
.brand__name b { color: var(--brand); font-weight: 800; }

.nav { display: flex; align-items: center; gap: 0.4rem; }
.nav__link { color: var(--ink-soft); font-weight: 500; padding: 0.45rem 0.7rem; border-radius: var(--r-sm); transition: color .15s, background .15s; }
.nav__link:hover { color: var(--ink); background: var(--surface-sunk); }
.nav__user { color: var(--ink-faint); font-size: 0.9rem; padding-inline: 0.4rem; }

.main { flex: 1; width: 100%; }
.site-footer { margin-top: var(--sp-8); padding: var(--sp-5) var(--sp-4); border-top: 1px solid var(--border); color: var(--ink-faint); font-size: 0.9rem; }
.site-footer__inner { max-width: var(--wrap); margin-inline: auto; display: flex; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.site-footer a:hover { color: var(--brand); }

/* -------------------------------------------------------------------------
   4) BOUTONS + bascule de thème
   ------------------------------------------------------------------------- */
.btn {
    --pad: 0.7rem 1.2rem;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: var(--pad); border: 1px solid transparent; border-radius: var(--r-sm);
    font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; cursor: pointer;
    transition: transform .1s ease, box-shadow .2s ease, background .18s ease, border-color .18s ease, color .18s;
}
.btn .ic { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
/* Primaire : indigo PLEIN (pas de dégradé), net et moderne. */
.btn--primary { color: var(--on-brand); background: var(--brand-btn); box-shadow: var(--shadow-xs); }
.btn--primary:hover { background: var(--brand-btn-hover); box-shadow: var(--shadow-sm); }
.btn--primary:focus-visible { outline: none; box-shadow: var(--ring); }
/* Secondaire : contour discret. */
.btn--ghost { color: var(--ink); background: var(--surface); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--border-strong); background: var(--surface-sunk); }
/* Doux : teinté. */
.btn--soft { color: var(--brand); background: var(--brand-tint); }
.btn--soft:hover { filter: brightness(0.97); }
.btn--lg { --pad: 0.92rem 1.6rem; font-size: 1.02rem; border-radius: 12px; }
.btn--block { width: 100%; }

.icon-btn {
    display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--r-full);
    border: 1px solid var(--border); background: var(--surface); color: var(--ink-soft);
    box-shadow: var(--shadow-xs); transition: transform .25s ease, color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--brand); border-color: var(--border-strong); transform: rotate(-12deg); }
.icon-btn .ic { width: 18px; height: 18px; }
/* En clair, on propose de passer au sombre (lune) ; en sombre, au clair (soleil). */
.th-sun  { display: none; }
.th-moon { display: grid; place-items: center; }
:root[data-theme="dark"] .th-sun  { display: grid; place-items: center; }
:root[data-theme="dark"] .th-moon { display: none; }

/* -------------------------------------------------------------------------
   5) TUILE D'ICÔNE (petit carré teinté réutilisé partout)
   ------------------------------------------------------------------------- */
.icon-tile {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px;
    background: var(--brand-tint); color: var(--brand); flex: none;
}
.icon-tile .ic { width: 24px; height: 24px; }
.icon-tile--lg { width: 54px; height: 54px; border-radius: 15px; }
.icon-tile--lg .ic { width: 27px; height: 27px; }

/* -------------------------------------------------------------------------
   6) HERO + FENÊTRE « NAVIGATEUR »
   ------------------------------------------------------------------------- */
.hero { display: grid; grid-template-columns: 1.02fr 0.98fr; align-items: center; gap: var(--sp-6); padding: var(--sp-7) 0 var(--sp-6); }
.hero__eyebrow {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.16em;
    color: var(--brand); background: var(--brand-tint); padding: 0.35rem 0.8rem; border-radius: var(--r-full);
}
.hero__eyebrow .ic { width: 15px; height: 15px; }
.hero__title { font-size: clamp(2.5rem, 6vw, 4.3rem); margin: var(--sp-3) 0; letter-spacing: -0.042em; }
.hero__lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--ink-soft); max-width: 36ch; }
.hero__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-4); }
.hero__meta { display: flex; gap: var(--sp-5); margin-top: var(--sp-5); flex-wrap: wrap; }
.hero__meta div { display: flex; flex-direction: column; }
.hero__meta b { font-size: 1.5rem; letter-spacing: -0.03em; }
.hero__meta span { font-size: 0.82rem; color: var(--ink-faint); }

.u-grad { background: linear-gradient(115deg, var(--grad-a), var(--grad-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hero__visual { position: relative; display: grid; place-items: center; }
/* Lueur douce derrière la fenêtre */
.hero__visual::before {
    content: ""; position: absolute; inset: 8% -4% -8%; z-index: -1; border-radius: 40%;
    background: radial-gradient(closest-side, var(--halo-1), transparent 72%);
    filter: blur(14px); opacity: 0.9;
}

/* La « fenêtre de navigateur » (chrome + mini-console) */
.window {
    width: min(100%, 500px); background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg); overflow: hidden;
    animation: float 7s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.window__bar {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); background: var(--surface-sunk);
}
.window__dot { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); }
.window__dot:nth-child(1) { background: oklch(0.72 0.17 25); }
.window__dot:nth-child(2) { background: oklch(0.82 0.15 85); }
.window__dot:nth-child(3) { background: oklch(0.75 0.15 150); }
.window__addr {
    flex: 1; display: inline-flex; align-items: center; gap: 0.4rem; justify-content: center;
    margin: 0 0.4rem; padding: 0.3rem 0.8rem; border-radius: var(--r-full);
    background: var(--surface); border: 1px solid var(--border);
    color: var(--ink-faint); font-family: var(--font-mono); font-size: 0.78rem;
}
.window__addr .ic { width: 13px; height: 13px; color: var(--ok-ink); }
.window__live { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; color: var(--ink-faint); }
.window__live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok-ink); box-shadow: 0 0 0 0 var(--ok-ring); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--ok-ring); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.window__body { display: grid; grid-template-columns: 58px 1fr; min-height: 260px; }
.mini-nav { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 0.9rem 0; border-right: 1px solid var(--border); background: var(--surface-sunk); }
.mini-nav__brand { width: 26px; height: 26px; border-radius: 8px; background: var(--brand-gradient); margin-bottom: 0.4rem; }
.mini-nav__item { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--ink-faint); }
.mini-nav__item .ic { width: 18px; height: 18px; }
.mini-nav__item.is-active { background: var(--brand-tint); color: var(--brand); }

.mini-main { padding: 1rem 1.1rem; }
.mini-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; }
.mini-title { width: 96px; height: 11px; border-radius: 6px; background: var(--border-strong); opacity: 0.55; }
.mini-chip { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.68rem; font-weight: 600; color: var(--ok-ink); background: var(--ok-bg); border: 1px solid var(--ok-border); padding: 0.2rem 0.55rem; border-radius: var(--r-full); }
.mini-chip .ic { width: 12px; height: 12px; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.mini-card { padding: 0.7rem; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); }
.mini-card .icon-tile { width: 30px; height: 30px; border-radius: 9px; margin-bottom: 0.5rem; }
.mini-card .icon-tile .ic { width: 16px; height: 16px; }
.mini-card b { display: block; width: 62%; height: 8px; border-radius: 5px; background: var(--border-strong); opacity: 0.6; margin-bottom: 0.35rem; }
.mini-card i { display: block; width: 42%; height: 7px; border-radius: 5px; background: var(--border); }
.mini-card:nth-child(2) { animation: floatCard 5s ease-in-out infinite .4s; }
.mini-card:nth-child(3) { animation: floatCard 5s ease-in-out infinite .8s; }
@keyframes floatCard { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* -------------------------------------------------------------------------
   7) SECTIONS + FONCTIONNALITÉS
   ------------------------------------------------------------------------- */
.section { padding: var(--sp-6) 0; }
.section__head { max-width: 46ch; margin-bottom: var(--sp-5); }
.section-eyebrow { font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--brand); }
.section-title { font-size: clamp(1.7rem, 3.3vw, 2.4rem); margin-top: var(--sp-1); letter-spacing: -0.035em; }
.section-lead { color: var(--ink-soft); margin-top: var(--sp-2); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.feature { position: relative; padding: var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-xs); overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.feature::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--brand-gradient); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.feature:hover::after { transform: scaleX(1); }
.feature .icon-tile { margin-bottom: var(--sp-3); }
.feature__title { font-size: 1.16rem; margin-bottom: 0.4rem; }
.feature__text { color: var(--ink-soft); }

/* -------------------------------------------------------------------------
   8) SCHÉMA SSO « un seul identifiant » (radial, responsive)
   ------------------------------------------------------------------------- */
.sso { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); align-items: center; }
.sso__points { list-style: none; padding: 0; display: grid; gap: 0.9rem; margin-top: var(--sp-4); }
.sso__points li { display: flex; align-items: flex-start; gap: 0.7rem; color: var(--ink-soft); }
.sso__points .icon-tile { width: 34px; height: 34px; border-radius: 10px; }
.sso__points .icon-tile .ic { width: 18px; height: 18px; }
.sso__points b { color: var(--ink); font-weight: 700; }

.sso-diagram { position: relative; width: min(100%, 380px); aspect-ratio: 1; margin-inline: auto; }
.sso-diagram__links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sso-diagram__links line { stroke: var(--brand); stroke-width: 0.6; opacity: 0.4; stroke-dasharray: 3 3; animation: flow 3s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -12; } }

.sso-node, .sso-core { position: absolute; transform: translate(-50%, -50%); }
.sso-node {
    display: grid; place-items: center; width: 17%; aspect-ratio: 1; border-radius: 28%;
    background: var(--surface); border: 1px solid var(--border); color: var(--brand);
    box-shadow: var(--shadow-sm); animation: float 6s ease-in-out infinite;
}
.sso-node .ic { width: 46%; height: 46%; }
.sso-node--2 { animation-delay: .9s; } .sso-node--3 { animation-delay: 1.6s; } .sso-node--4 { animation-delay: 2.3s; } .sso-node--5 { animation-delay: 3s; }
/* Position des satellites (en CSS : la CSP interdit le style= inline dans le HTML). */
.sso-node--1 { left: 50%;   top: 12%; }
.sso-node--2 { left: 86.1%; top: 38.3%; }
.sso-node--3 { left: 72.3%; top: 80.7%; }
.sso-node--4 { left: 27.7%; top: 80.7%; }
.sso-node--5 { left: 13.9%; top: 38.3%; }
.sso-core {
    left: 50%; top: 50%; width: 30%; aspect-ratio: 1; border-radius: 50%;
    display: grid; place-items: center; gap: 0.1rem; text-align: center;
    background: var(--brand-gradient); color: var(--on-brand);
    box-shadow: var(--shadow-md), inset 0 1px 0 oklch(1 0 0 / 0.3);
}
.sso-core .ic { width: 30%; height: 30%; }
.sso-core span { font-size: 0.62rem; font-weight: 700; letter-spacing: -0.01em; }
.sso-core::after { content: ""; position: absolute; inset: -14%; border-radius: 50%; border: 1px dashed var(--brand); opacity: 0.3; animation: spin 34s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------------------
   9) BANDEAU CTA
   ------------------------------------------------------------------------- */
.cta { position: relative; overflow: hidden; text-align: center; padding: var(--sp-7) var(--sp-4); border-radius: var(--r-xl); background: var(--brand-gradient); color: var(--on-brand); box-shadow: var(--shadow-lg); }
.cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(42rem 22rem at 50% -40%, oklch(1 0 0 / 0.28), transparent 60%); }
.cta > * { position: relative; }
.cta__title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); letter-spacing: -0.035em; }
.cta__text { margin: var(--sp-2) auto var(--sp-4); max-width: 48ch; opacity: 0.92; }
.cta .btn--ghost { background: oklch(1 0 0 / 0.16); border-color: oklch(1 0 0 / 0.38); color: var(--on-brand); box-shadow: none; }
.cta .btn--ghost:hover { background: oklch(1 0 0 / 0.26); }

/* -------------------------------------------------------------------------
   10) AUTHENTIFICATION (connexion / inscription)
   Mise en page « deux panneaux » : marque (gauche) + formulaire (droite).
   Sobre et pro : surfaces nettes, aucune animation de fond, pas de flottement.
   ------------------------------------------------------------------------- */
body.auth2-body::before { display: none; } /* pas de halo de fond : on veut du net */
.auth2 { flex: 1; display: grid; grid-template-columns: 0.85fr 1fr; min-height: 100dvh; }

/* Panneau de marque (gauche) : contenu, valeur, confiance. */
.auth2__brand {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; gap: var(--sp-5);
    padding: clamp(2rem, 4vw, 3.5rem);
    background: var(--brand-gradient); color: var(--on-brand);
}
/* Texture STATIQUE très discrète (points), pas d'animation. */
.auth2__brand::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
    background-image: radial-gradient(circle, oklch(1 0 0 / 0.09) 1px, transparent 1.5px);
    background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(160deg, #000, transparent 78%);
    mask-image: linear-gradient(160deg, #000, transparent 78%);
}
.auth2__brand > * { position: relative; z-index: 1; }
.brand--light .brand__mark { background: oklch(1 0 0 / 0.16); box-shadow: none; }
.brand--light .brand__name, .brand--light .brand__name b { color: var(--on-brand); }

.auth2__pitch { margin-block: auto; }
.auth2__headline { font-size: clamp(1.7rem, 2.6vw, 2.5rem); letter-spacing: -0.03em; }
.auth2__lead { opacity: 0.9; margin-top: var(--sp-2); max-width: 34ch; }
.auth2__points { list-style: none; padding: 0; display: grid; gap: var(--sp-3); margin-top: var(--sp-5); }
.auth2__points li { display: flex; align-items: flex-start; gap: 0.7rem; }
.auth2__points li .ic { width: 20px; height: 20px; flex: none; margin-top: 2px; opacity: 0.95; }
.auth2__points b { font-weight: 700; }
.auth2__products { margin-top: var(--sp-5); }
.auth2__products-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; opacity: 0.72; }
.auth2__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.75rem; border-radius: var(--r-full);
    background: oklch(1 0 0 / 0.14); font-size: 0.85rem; font-weight: 600; }
.chip .ic { width: 15px; height: 15px; }
.auth2__brand-foot { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.82rem; opacity: 0.82; }
.auth2__brand-foot a:hover { text-decoration: underline; }

/* Panneau formulaire (droite). */
.auth2__panel { display: flex; flex-direction: column; background: var(--canvas); }
.auth2__panel-top { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-3) var(--sp-4); min-height: 60px; }
.auth2__mobile-brand { display: none; }
.auth2__content { flex: 1; display: grid; place-items: center; padding: var(--sp-4) clamp(1.2rem, 5vw, 3rem) var(--sp-6); }

.auth2-form { width: 100%; max-width: 400px; }
.auth2-form--wide { max-width: 540px; }
.auth2-form__head { margin-bottom: var(--sp-4); }
.auth2-title { font-size: var(--fs-title); letter-spacing: var(--tracking-tight); }
.auth2-sub { color: var(--ink-soft); margin-top: var(--sp-1); font-size: var(--fs-md); line-height: var(--lh-body); }
/* Rappel de l'email (flux « email d'abord ») + lien pour le changer. */
.auth2-ident { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-3);
    border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-sunk); font-size: var(--fs-sm); }
.auth2-ident__mail { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth2-ident a { color: var(--brand); font-weight: 600; flex: none; }
.auth2-secure { display: flex; align-items: center; gap: 0.4rem; margin-top: var(--sp-4); color: var(--ink-faint); font-size: var(--fs-sm); }
.auth2-secure .ic { width: 16px; height: 16px; color: var(--brand); }
.pass-switch { margin-top: var(--sp-3); color: var(--ink-soft); }
.pass-switch a { color: var(--brand); font-weight: 600; }

@media (max-width: 900px) {
    .auth2 { grid-template-columns: 1fr; }
    .auth2__brand { display: none; }
    .auth2__mobile-brand { display: inline-flex; }
    .auth2__content { place-items: start center; padding-top: var(--sp-3); }
}

/* ===========================================================================
   VIZINOV IDENTITE - Inscription immersive « VIZINOV IDENTITE ».
   Habillage final : « cartes raffinées », aéré + propre + haut de gamme.
   Base retenue : wzr (le plus équilibré air/propreté/conformité).
   Greffes : mesure unique partagée (bords alignés) tout en gardant l'entonnoir
   de largeurs ; champs plus hauts posés sur --surface net ; consentements en
   lignes-panneaux avec état :checked ; text-wrap:balance ; nav mobile empilée ;
   reduced-motion universel ; focus clavier explicite ; aria-hidden sur la piste.
   Tout est scopé sous .wzr : aucune autre page n'est touchée. Palette 100 %
   jetons (color-mix opère sur var(--brand), jamais de couleur en dur). Aucun
   dégradé sur un bouton (--brand-gradient réservé barre + pastille d'icône).
   =========================================================================== */

/* Colonne centrée + mesures partagées. Entonnoir calme : piste < champs <
   cartes < colonne, tous centrés sur le même axe pour des bords propres. */
.wzr {
    --wzr-col: 620px;   /* largeur maximale de la colonne */
    --wzr-cards: 560px; /* grille de choix (étape 1) */
    --wzr-field: 480px; /* champs, consentements, alertes, nav */
    --wzr-track: 420px; /* piste de progression */
    width: 100%;
    max-width: var(--wzr-col);
    margin-inline: auto;
    text-align: center;
}

/* ---- En-tête de progression : pilule discrète + piste fine + compteur ---- */
.wzr-head {
    display: flex; flex-direction: column; align-items: center;
    gap: var(--sp-3); margin-bottom: var(--sp-6);
}
.wzr-pill {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase;
    letter-spacing: 0.18em; color: var(--brand); background: var(--brand-tint);
    padding: 0.42rem 0.9rem; border-radius: var(--r-full);
}
.wzr-pill .ic { width: 14px; height: 14px; }

.wzr-track {
    width: min(100%, var(--wzr-track)); height: 6px; border-radius: var(--r-full);
    background: var(--surface-sunk); border: 1px solid var(--border); overflow: hidden;
}
.wzr-track__fill {
    display: block; height: 100%; width: 25%; border-radius: inherit;
    background: var(--brand-gradient);
    box-shadow: 0 0 12px color-mix(in oklch, var(--brand) 45%, transparent);
    transition: width .5s cubic-bezier(.4, .8, .3, 1);
}
.wzr-step { font-size: 0.82rem; color: var(--ink-faint); letter-spacing: 0.01em; }
.wzr-step b { color: var(--brand); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---- Titre d'étape + accroche : hiérarchie nette, large respiration. ---- */
.wzr .wizard__q {
    margin: 0; color: var(--ink); font-weight: 800;
    font-size: var(--fs-title); line-height: var(--lh-tight);
    letter-spacing: var(--tracking-tight); text-align: center; text-wrap: balance;
}
.wzr .wizard__hint {
    max-width: 46ch; margin: var(--sp-2) auto var(--sp-5);
    color: var(--ink-soft); font-size: var(--fs-md); line-height: var(--lh-body);
    text-align: center; text-wrap: balance;
}

/* Alerte serveur (erreur d'inscription) : alignée sur la colonne des champs. */
.wzr .alert { max-width: var(--wzr-field); margin: 0 auto var(--sp-4); text-align: left; }

/* =====================================================================
   Étape 3 : grille de cartes de choix du type de compte (la pièce maîtresse).
   Grille aérée, cartes plus grandes, indicateur de sélection sobre.
   ===================================================================== */
.wzr .choice-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3); max-width: var(--wzr-cards); margin-inline: auto; text-align: left;
}
.wzr .choice {
    position: relative; display: flex; flex-direction: column; gap: 0.3rem;
    padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-lg);
    background: var(--surface); box-shadow: var(--shadow-xs); cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .16s ease, background .18s ease;
}
/* Radio natif : déjà masqué par app.css (position:absolute; opacity:0). */

/* Indicateur de sélection en coin : anneau discret + point plein. */
.wzr .choice::before {
    content: ""; position: absolute; top: var(--sp-3); right: var(--sp-3);
    width: 20px; height: 20px; border-radius: var(--r-full);
    border: 1.5px solid var(--border); background: var(--surface);
    transition: border-color .18s ease;
}
.wzr .choice::after {
    content: ""; position: absolute;
    top: calc(var(--sp-3) + 6px); right: calc(var(--sp-3) + 6px);
    width: 8px; height: 8px; border-radius: var(--r-full);
    background: transparent; transition: background .18s ease;
}

/* Pastille d'icône : plus grande, teinte de marque, coins nets. */
.wzr .choice__ic {
    display: grid; place-items: center; width: 46px; height: 46px;
    border-radius: var(--r-md); background: var(--brand-tint); color: var(--brand);
    margin-bottom: 0.55rem; transition: background .18s ease, color .18s ease;
}
.wzr .choice__ic .ic { width: 22px; height: 22px; }
.wzr .choice__name { font-weight: 700; font-size: 1.02rem; color: var(--ink); letter-spacing: -0.01em; }
.wzr .choice__desc { font-size: 0.86rem; line-height: 1.45; color: var(--ink-soft); }

/* Survol : léger soulèvement, bord plus marqué. */
.wzr .choice:hover {
    border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: translateY(-2px);
}
/* Focus clavier : contour net, sans décaler la mise en page (radio masqué). */
.wzr .choice:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Sélectionnée : état discret et élégant (bord marqué, voile léger, point plein). */
.wzr .choice:has(input:checked) {
    border-color: var(--brand);
    background: color-mix(in oklch, var(--brand-tint) 60%, var(--surface));
    box-shadow: 0 0 0 1px var(--brand), var(--shadow-sm); transform: none;
}
.wzr .choice:has(input:checked)::before { border-color: var(--brand); }
.wzr .choice:has(input:checked)::after { background: var(--brand); }
.wzr .choice:has(input:checked) .choice__ic { background: var(--brand-gradient); color: var(--on-brand); }

/* =====================================================================
   Étapes 2 & 3 : champs de saisie, même rythme aéré, posés sur --surface net.
   ===================================================================== */
.wzr .form-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3);
    max-width: var(--wzr-field); margin-inline: auto; text-align: left;
}
/* Les champs internes d'une grille remplissent leur cellule sans marge propre. */
.wzr .form-grid > .field { max-width: none; margin-inline: 0; margin-top: 0; }

.wzr .field {
    display: flex; flex-direction: column; gap: var(--sp-1);
    max-width: var(--wzr-field); margin-inline: auto; text-align: left;
}
.wzr .field__label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft); }

/* Champ : blanc net sur le fond immersif, plus haut, coins doux, focus indigo. */
.wzr .input {
    width: 100%; padding: var(--sp-3) var(--sp-3); border-radius: var(--r-md);
    background: var(--surface); border: 1px solid var(--border);
}
.wzr .input::placeholder { color: var(--ink-faint); }
.wzr .input:focus { outline: none; background: var(--surface); border-color: var(--brand); box-shadow: var(--ring); }
/* Place pour le bouton afficher/masquer le mot de passe. */
.wzr .field__control .input { padding-right: 3rem; }

/* Jauge + indice du mot de passe : espacement propre, sans double marge. */
.wzr .pw-meter { margin-top: 0.7rem; }
.wzr .field__hint { margin-top: var(--sp-1); font-size: var(--fs-sm); }

/* Rythme vertical entre les blocs directs de chaque étape (air régulier). */
.wzr .wizard__step > .field,
.wzr .wizard__step > .form-grid,
.wzr .wizard__step > .check-row,
.wzr .wizard__step > .form-note { margin-top: var(--sp-4); }
/* Le premier bloc après l'accroche n'ajoute pas de marge (l'accroche aère déjà). */
.wzr .wizard__hint + .field,
.wzr .wizard__hint + .form-grid,
.wzr .wizard__hint + .check-row,
.wzr .wizard__hint + .choice-grid,
.wzr .wizard__hint + .form-note { margin-top: 0; }

/* =====================================================================
   Étape 4 : consentements en lignes-panneaux calmes et cliquables.
   ===================================================================== */
.wzr .check-row {
    max-width: var(--wzr-field); margin-inline: auto; text-align: left;
    align-items: flex-start; gap: var(--sp-2); padding: var(--sp-3) var(--sp-3);
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
    font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.5;
    transition: border-color .18s ease, background .18s ease;
}
.wzr .check-row:has(input:checked) {
    border-color: color-mix(in oklch, var(--brand) 45%, var(--border));
    background: color-mix(in oklch, var(--brand-tint) 55%, var(--surface));
}
.wzr .check-row input { margin-top: 0.15rem; width: 18px; height: 18px; accent-color: var(--brand); flex-shrink: 0; }
.wzr .check-row:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Mention légale : posée sous la colonne des champs, ton discret.
   (On ne cible que le paragraphe direct : le « (facultatif) » inline reste intact.) */
.wzr .wizard__step > .form-note {
    max-width: var(--wzr-field); margin-inline: auto; text-align: left;
    font-size: var(--fs-sm); line-height: 1.5; color: var(--ink-faint);
}

/* =====================================================================
   Navigation : boutons centrés, grande respiration au-dessus.
   Boutons indigo PLATS (hérités de .btn--primary / .btn--ghost).
   ===================================================================== */
.wzr .wizard__nav {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
    gap: var(--sp-2); margin-top: var(--sp-6);
    max-width: var(--wzr-field); margin-inline: auto;
}
.wzr [data-wizard-prev] { margin: 0; } /* neutralise un éventuel margin-right:auto global */
.wzr [data-wizard-next], .wzr [data-wizard-submit] { min-width: 200px; }

.wzr .wizard__error {
    min-height: 1.2em; margin: var(--sp-4) auto 0; max-width: var(--wzr-field);
    text-align: center; font-size: 0.9rem; color: var(--danger-ink);
}

/* ---- Étape 1 : vérification de l'email (visuel soigné) ---- */
.wzr .wzr-verify__badge { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto var(--sp-3);
    border-radius: var(--r-lg); background: var(--brand-tint); color: var(--brand); }
.wzr .wzr-verify__badge .ic { width: 28px; height: 28px; }
.wzr .wzr-code .input { text-align: center; letter-spacing: 0.35em; font-size: 1.2rem; font-weight: 700; }
.wzr .wzr-verify__resend { display: inline-block; margin-top: var(--sp-2); background: none; border: none;
    color: var(--brand); font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; }
.wzr .wzr-verify__resend:hover { text-decoration: underline; }
.wzr .wzr-verify__msg { text-align: center; min-height: 1.2em; margin-top: var(--sp-2); }
.wzr .wzr-verify__exists { max-width: var(--wzr-field); margin: var(--sp-3) auto 0; padding: var(--sp-3);
    border: 1px solid var(--brand); border-radius: var(--r-md); background: var(--brand-tint); text-align: center; }
.wzr .wzr-verify__exists-txt { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0 0 var(--sp-2); color: var(--ink); font-weight: 600; }
.wzr .wzr-verify__exists-txt .ic { width: 16px; height: 16px; color: var(--brand); }

/* ---- Recherche d'organisations existantes (étape organisation) ---- */
.wzr .org-found { max-width: var(--wzr-field); margin: var(--sp-2) auto; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-veil); text-align: left; }
.wzr .org-found__title { margin: 0 0 var(--sp-1); font-size: var(--fs-sm); color: var(--ink-soft); }
.wzr .org-found__list { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.wzr .org-found__list li { display: flex; flex-direction: column; }
.wzr .org-found__list b { font-size: 0.92rem; color: var(--ink); }
.wzr .org-found__list span { font-size: 0.8rem; color: var(--ink-faint); }
.wzr .org-found__item { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.wzr .org-found__item .btn { flex: none; }
/* Confirmation « rejoindre » (l'org visée est choisie). */
.wzr .org-join-confirm { max-width: var(--wzr-field); margin: var(--sp-2) auto; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--brand); border-radius: var(--r-md); background: var(--brand-tint); text-align: left; }
.wzr .org-join-confirm__txt { display: flex; align-items: center; gap: 0.4rem; margin: 0 0 var(--sp-2); color: var(--ink); }
.wzr .org-join-confirm__txt .ic { width: 16px; height: 16px; color: var(--brand); flex: none; }
/* Bloc « organisation » de l'étape 3 : espacement net entre les sections. */
.wzr .wzr-org-block { margin-top: var(--sp-4); max-width: var(--wzr-field); margin-inline: auto; }
.wzr .wzr-org-block > .field:first-child { margin-top: 0; }

/* Champ téléphone : indicatif (sélecteur) + numéro. */
.phone-field { display: flex; gap: var(--sp-2); }
.phone-field__cc { flex: 0 0 44%; min-width: 0; }
.phone-field__num { flex: 1; min-width: 0; }
/* Sur mobile, l'indicatif passe au-dessus du numéro (même seuil que le reste). */
@media (max-width: 600px) { .phone-field { flex-direction: column; } .phone-field__cc { flex: none; } }

/* ---- Responsive : une colonne, cartes toujours aérées, nav empilée. ---- */
@media (max-width: 600px) {
    .wzr .choice-grid { grid-template-columns: 1fr; }
    .wzr .form-grid { grid-template-columns: 1fr; }
    .wzr .choice { padding: var(--sp-3); }
    .wzr .wizard__nav { flex-direction: column-reverse; }
    .wzr .wizard__nav .btn { width: 100%; }
    .wzr [data-wizard-next], .wzr [data-wizard-submit],
    .wzr [data-wizard-prev] { width: 100%; min-width: 0; }
}

/* ---- Accessibilité : on respecte la réduction d'animations (universel). ---- */
@media (prefers-reduced-motion: reduce) {
    .wzr, .wzr *, .wzr *::before, .wzr *::after {
        transition: none !important; animation: none !important;
    }
    .wzr .choice:hover { transform: none; }
    .wzr .wizard.js-active .wizard__step.is-current { animation: none; }
}

/* Champs de formulaire (réutilisés partout dans le site). */
.form { display: flex; flex-direction: column; gap: var(--sp-3); }
.field { display: flex; flex-direction: column; gap: var(--sp-1); }
.field__label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft); }
.input, select.input {
    width: 100%; min-height: 44px; padding: var(--sp-2) var(--sp-3); font: inherit; color: var(--ink);
    background: var(--surface-sunk); border: 1px solid var(--border); border-radius: var(--r-sm);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.input::placeholder { color: var(--ink-faint); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); background: var(--surface); }

/* Champ mot de passe : bouton afficher/masquer + jauge de robustesse + indice. */
.field__control { position: relative; display: flex; }
.field__control .input { padding-right: 3rem; }
.pw-toggle { position: absolute; right: 0.4rem; top: 50%; transform: translateY(-50%);
    display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--r-sm); color: var(--ink-faint); transition: color .15s, background .15s; }
.pw-toggle:hover { color: var(--brand); background: var(--surface-sunk); }
.pw-toggle .ic { width: 18px; height: 18px; }
.pw-eye-off { display: none; }
.pw-toggle.is-visible .pw-eye { display: none; }
.pw-toggle.is-visible .pw-eye-off { display: block; }

.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.35rem; margin-top: 0.55rem; }
.pw-meter span { height: 5px; border-radius: 3px; background: var(--surface-sunk); border: 1px solid var(--border); transition: background .25s, border-color .25s; }
.pw-meter[data-score="1"] span:nth-child(-n+1) { background: var(--pw-1); border-color: transparent; }
.pw-meter[data-score="2"] span:nth-child(-n+2) { background: var(--pw-2); border-color: transparent; }
.pw-meter[data-score="3"] span:nth-child(-n+3) { background: var(--pw-3); border-color: transparent; }
.pw-meter[data-score="4"] span:nth-child(-n+4) { background: var(--pw-4); border-color: transparent; }
.field__hint { display: block; min-height: 1.15em; font-size: var(--fs-sm); color: var(--ink-faint); margin-top: var(--sp-1); }
.field__hint.is-ok { color: var(--ok-ink); }
.field__hint.is-bad { color: var(--danger-ink); }

.alert { display: flex; align-items: flex-start; gap: 0.55rem; padding: 0.8rem 1rem; border-radius: var(--r-sm); margin-bottom: var(--sp-3); font-size: 0.94rem; }
.alert .ic { width: 18px; height: 18px; margin-top: 1px; flex: none; }
.alert--error { color: var(--danger-ink); background: var(--danger-bg); border: 1px solid var(--danger-border); }
.alert--ok { color: var(--ok-ink); background: var(--ok-bg); border: 1px solid var(--ok-border); }

/* Sélecteur type de compte (particulier / professionnel) - page facturation. */
.acct-toggle { display: flex; gap: 0.6rem; }
.acct-toggle label {
    flex: 1; display: flex; align-items: center; gap: 0.55rem; padding: 0.75rem 0.9rem;
    border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-sunk);
    cursor: pointer; font-weight: 500; transition: border-color .15s, background .15s;
}
.acct-toggle input { accent-color: var(--brand); }
.acct-toggle label:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); color: var(--ink); }

/* Lignes de case à cocher (CGU, marketing). */
.check-row { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.92rem; color: var(--ink-soft); }
.check-row input { margin-top: 0.15rem; accent-color: var(--brand); width: 16px; height: 16px; flex-shrink: 0; }
.check-row a { color: var(--brand); font-weight: 600; }
.form-note { font-size: var(--fs-sm); color: var(--ink-faint); }
.form-note a { color: var(--brand); }

/* -------------------------------------------------------------------------
   11) ASSISTANT D'INSCRIPTION (wizard) : étapes + cartes de choix (base partagée)
   ------------------------------------------------------------------------- */
/* Le wizard n'est pas une carte : il vit dans le panneau formulaire (.auth2-form). */
.wizard__q { font-size: 1.2rem; letter-spacing: -0.02em; }
.wizard__hint { color: var(--ink-soft); font-size: 0.92rem; margin: 0.25rem 0 var(--sp-3); }
.wizard__step .field, .wizard__step .check-row { margin-top: var(--sp-3); }
.wizard.js-active .wizard__step { display: none; }
.wizard.js-active .wizard__step.is-current { display: block; animation: stepIn .4s cubic-bezier(.2,.7,.2,1); }
@keyframes stepIn { from { opacity: 0; transform: translateY(16px) scale(.99); } to { opacity: 1; transform: none; } }
.wizard__error { min-height: 1.2em; margin-top: var(--sp-2); font-size: 0.88rem; color: var(--danger-ink); }
.wizard__nav { display: flex; gap: 0.6rem; margin-top: var(--sp-4); }
[data-wizard-prev] { margin-right: auto; }

/* Cartes de choix (avec descriptif) : type de compte, dans l'assistant d'inscription. */
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
.choice { position: relative; display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem 1rem 1.1rem; cursor: pointer;
    border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface);
    transition: border-color .15s, box-shadow .15s, transform .12s, background .15s; }
.choice:hover { border-color: var(--border-strong); background: var(--surface-sunk); }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice__ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--brand-tint); color: var(--brand); margin-bottom: 0.35rem; transition: background .15s, color .15s; }
.choice__ic .ic { width: 20px; height: 20px; }
.choice__name { font-weight: 700; }
.choice__desc { font-size: 0.82rem; color: var(--ink-soft); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); box-shadow: var(--ring); }
.choice:has(input:checked) .choice__ic { background: var(--brand-gradient); color: var(--on-brand); }

/* Cartes de type SIMPLES (sans descriptif) - page « nouvelle organisation ». */
.type-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
.type-card {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    padding: 1.15rem 0.8rem; text-align: center; cursor: pointer;
    border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-sunk);
    color: var(--ink-soft); transition: border-color .15s, background .15s, box-shadow .15s, color .15s;
}
.type-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.type-card .ic { width: 26px; height: 26px; }
.type-card__name { font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.type-card:hover { border-color: var(--border-strong); }
.type-card:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); color: var(--brand); box-shadow: var(--ring); }

@media (max-width: 520px) {
    .choice-grid { grid-template-columns: 1fr; }
    .auth2-form, .auth2-form--wide { max-width: 100%; }
}

/* -------------------------------------------------------------------------
   12) VÉRIFICATION D'EMAIL + PAGES LÉGALES
   ------------------------------------------------------------------------- */
.verify {
    max-width: 540px; margin: var(--sp-7) auto; text-align: center;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: var(--sp-6); box-shadow: var(--shadow-md);
}
.verify__badge { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto var(--sp-3); border-radius: var(--r-full); }
.verify__badge .ic { width: 34px; height: 34px; }
.verify__badge.is-ok { color: var(--ok-ink); background: var(--ok-bg); }
.verify__badge.is-no { color: var(--danger-ink); background: var(--danger-bg); }
.verify__title { font-size: 1.6rem; letter-spacing: -0.03em; }
.verify p { color: var(--ink-soft); margin-top: var(--sp-2); }
.verify .btn { margin-top: var(--sp-4); }

.legal { max-width: 74ch; margin-inline: auto; padding: var(--sp-6) 0; }
.legal h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); letter-spacing: -0.03em; margin-bottom: var(--sp-3); }
.legal h2 { font-size: 1.2rem; margin: var(--sp-4) 0 var(--sp-1); }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { padding-left: 1.2rem; }
.legal a { color: var(--brand); font-weight: 500; }
.legal-draft {
    display: flex; align-items: flex-start; gap: 0.6rem;
    background: var(--brand-tint); border: 1px solid var(--border); border-radius: var(--r-md);
    padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4); color: var(--ink);
}
.legal-draft .ic { width: 20px; height: 20px; color: var(--brand); flex: none; margin-top: 2px; }

/* -------------------------------------------------------------------------
   13) COQUILLE D'APPLICATION (espace client) : barre + menu vertical
   ------------------------------------------------------------------------- */
.app-header {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
    padding: 0.65rem var(--sp-4);
    background: var(--surface-veil);
    -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid var(--border);
}
.app-header__right { display: flex; align-items: center; gap: var(--sp-2); }

.app { flex: 1; display: flex; align-items: flex-start; }

.sidebar {
    position: sticky; top: 55px; align-self: flex-start;
    height: calc(100dvh - 55px); overflow-y: auto;
    width: 244px; flex: none;
    border-right: 1px solid var(--border);
    padding: var(--sp-4) var(--sp-3);
    display: flex; flex-direction: column; gap: 2px;
}
/* Sous-menu : SECONDE colonne verticale, juste à côté du rail principal. */
.subnav {
    position: sticky; top: 55px; align-self: flex-start;
    height: calc(100dvh - 55px); overflow-y: auto;
    width: 236px; flex: none;
    border-right: 1px solid var(--border); background: var(--surface-sunk);
    padding: var(--sp-4) var(--sp-3);
    display: flex; flex-direction: column; gap: 2px;
}
.subnav .nav-link { font-size: 0.95rem; }
.sidebar__label {
    font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.15em;
    text-transform: uppercase; color: var(--ink-faint);
    padding: 0.6rem 0.8rem 0.35rem;
}

.nav-link {
    position: relative; display: flex; align-items: center; gap: 0.7rem;
    padding: 0.6rem 0.8rem; border-radius: var(--r-sm);
    color: var(--ink-soft); font-weight: 500;
    transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--surface-sunk); color: var(--ink); }
.nav-link.is-active { background: var(--brand-tint); color: var(--brand); font-weight: 600; }
.nav-link.is-active::before { content: ""; position: absolute; left: -3px; top: 50%; transform: translateY(-50%); width: 3px; height: 60%; border-radius: 3px; background: var(--brand); }
.nav-link__icon { display: grid; place-items: center; width: 20px; color: inherit; flex: none; }
.nav-link__icon .ic { width: 19px; height: 19px; }

.app-main { flex: 1; min-width: 0; padding: var(--sp-5) clamp(1rem, 4vw, var(--sp-6)); max-width: 1000px; }

/* Contexte d'organisation (puce dans l'en-tête) */
.org-context { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.75rem; border-radius: var(--r-full); background: var(--brand-tint); color: var(--brand); font-size: 0.85rem; font-weight: 600; }
.org-context .ic { width: 15px; height: 15px; }

/* -------------------------------------------------------------------------
   14) BLOCS DE CONTENU (pages de l'espace client)
   ------------------------------------------------------------------------- */
.page-head { margin-bottom: var(--sp-4); }
.page-title { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.03em; display: flex; align-items: center; gap: 0.5rem; }
.page-title .ic { width: 26px; height: 26px; color: var(--brand); }
.page-sub { color: var(--ink-soft); margin-top: 0.25rem; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-4); box-shadow: var(--shadow-xs); }
.panel + .panel { margin-top: var(--sp-3); }
.panel__title { font-size: 1.05rem; margin-bottom: var(--sp-2); display: flex; align-items: center; gap: 0.5rem; }
.panel__title .ic { width: 20px; height: 20px; color: var(--brand); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--sp-3); }
/* Carte cliquable (tableau de bord, aperçu compta) */
a.panel { display: flex; flex-direction: column; gap: 0.5rem; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
a.panel:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.panel__arrow { margin-top: auto; display: inline-flex; align-items: center; gap: 0.3rem; color: var(--brand); font-weight: 600; font-size: 0.9rem; }
.panel__arrow .ic { width: 16px; height: 16px; transition: transform .2s ease; }
a.panel:hover .panel__arrow .ic { transform: translateX(3px); }

.empty-state {
    text-align: center; padding: var(--sp-7) var(--sp-4);
    background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--r-md);
    color: var(--ink-soft);
}
.empty-state .icon-tile { margin: 0 auto var(--sp-3); }
.empty-state__title { font-size: 1.2rem; color: var(--ink); margin-bottom: 0.3rem; }

.info-list { display: flex; flex-direction: column; }
.info-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: 0; }
.info-row dt { color: var(--ink-faint); margin: 0; }
.info-row dd { font-weight: 600; margin: 0; text-align: right; }

.badge-verified { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; font-weight: 600; padding: 0.25rem 0.6rem; border-radius: var(--r-full); }
.badge-verified .ic { width: 14px; height: 14px; }
.badge-verified.is-ok { color: var(--ok-ink); background: var(--ok-bg); }
.badge-verified.is-no { color: var(--ink-faint); background: var(--surface-sunk); border: 1px solid var(--border); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.form-grid .field.full { grid-column: 1 / -1; }

.flash { display: flex; align-items: center; gap: 0.55rem; padding: 0.8rem 1rem; border-radius: var(--r-sm); margin-bottom: var(--sp-3); font-size: 0.94rem;
    color: var(--ok-ink); background: var(--ok-bg); border: 1px solid var(--ok-border); }
.flash .ic { width: 18px; height: 18px; flex: none; }

/* -------------------------------------------------------------------------
   15) ORGANISATIONS (liste + membres)
   ------------------------------------------------------------------------- */
.account { padding-block: var(--sp-5); }

.org-list { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: var(--sp-4); }
/* Barre de recherche « rejoindre une organisation ». */
.org-search { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.org-search .input { flex: 1; }
.org-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
@media (max-width: 520px) { .org-search { flex-direction: column; } }
.org-card { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-xs); transition: border-color .2s, box-shadow .2s; }
.org-card.is-active { border-color: var(--brand); box-shadow: var(--shadow-sm), 0 0 0 1px var(--brand); }
.org-card__body { flex: 1; min-width: 0; }
.org-card__name { font-size: 1.1rem; }
.org-card__meta { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; color: var(--ink-soft); font-size: 0.9rem; margin-top: 0.15rem; }
.org-card__meta .ic { width: 14px; height: 14px; }
.org-card__actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.member-table { width: 100%; border-collapse: collapse; }
.member-table td { padding: 0.85rem 0.4rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.member-table tr:last-child td { border-bottom: 0; }
.member-table__action { text-align: right; }
.member-actions { display: flex; gap: 0.4rem; justify-content: flex-end; flex-wrap: wrap; }
.form-inline { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.form-inline .input { flex: 1; min-width: 220px; }
.role-pill { display: inline-flex; align-items: center; gap: 0.35rem; }
.role-pill .ic { width: 15px; height: 15px; }

/* -------------------------------------------------------------------------
   16) ANIMATIONS D'ENTRÉE + RÉVÉLATION AU SCROLL
   ------------------------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.rise-1 { animation-delay: .04s; } .rise-2 { animation-delay: .12s; } .rise-3 { animation-delay: .2s; } .rise-4 { animation-delay: .28s; }

@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 5% cover 22%; }
    }
}

/* -------------------------------------------------------------------------
   17) RESPONSIVE
   ------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; gap: var(--sp-5); padding-top: var(--sp-5); }
    .hero__visual { order: -1; }
    .window { width: min(92%, 440px); }
    .features { grid-template-columns: 1fr; }
    .sso { grid-template-columns: 1fr; gap: var(--sp-5); }
    .sso__visual { order: -1; }
    .auth { grid-template-columns: 1fr; }
    .auth__aside { display: none; }
}
@media (max-width: 820px) {
    /* Sur mobile : tout s'empile (rail, sous-menu, contenu) et les menus passent
       en rangées horizontales défilables. */
    .app { flex-direction: column; }
    .sidebar, .subnav {
        position: static; height: auto; width: 100%;
        border-right: 0; border-bottom: 1px solid var(--border);
        flex-direction: row; flex-wrap: wrap; overflow-x: auto;
    }
    .sidebar__label { width: 100%; }
    .nav-link.is-active::before { display: none; }
    .form-grid { grid-template-columns: 1fr; }
    .app-main { padding: var(--sp-4); }
}
@media (max-width: 520px) {
    .site-header__inner { padding: 0.5rem 0.6rem 0.5rem 0.9rem; }
    .nav { gap: 0.3rem; }
    .nav__link { display: none; }
    .brand__name { font-size: 1rem; }
    .type-cards { grid-template-columns: 1fr; }
    .org-card { flex-wrap: wrap; }
    .hero__meta { gap: var(--sp-4); }
}

/* -------------------------------------------------------------------------
   18) ACCESSIBILITÉ : réduire les animations si l'utilisateur le demande
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
    .rise, .reveal { opacity: 1 !important; transform: none !important; }
    html { scroll-behavior: auto; }
}

/* -------------------------------------------------------------------------
   19) PAGE « BIENVENUE » - Vizinov Identité (une seule vue, fond animé)
   Tient sur un écran, pas de défilement. Le fond porte la richesse visuelle.
   ------------------------------------------------------------------------- */
.wxb { min-height: 100dvh; display: flex; flex-direction: column; }
body.wxb::before { display: none; } /* le fond animé remplace le halo global */

/* Fond animé : aurores + anneaux + grille + étoiles (100 % CSS). */
.wx-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
/* Halo tournant plein écran : donne le mouvement d'ensemble. */
.wx-bg__sheen { position: absolute; inset: -25%; opacity: 0.16; filter: blur(70px);
    background: conic-gradient(from 0deg at 50% 50%, transparent, var(--halo-1) 18%, transparent 38%, var(--halo-2) 62%, transparent 82%, var(--halo-1));
    animation: wxSpin 34s linear infinite; }
/* Aurores : couvrent toute la page (5 coins/centre) et dérivent nettement. */
.wx-bg__aurora { position: absolute; border-radius: 50%; filter: blur(70px); }
.wx-bg__aurora--1 { width: 52rem; height: 52rem; left: -14rem; top: -16rem; opacity: 0.6;
    background: radial-gradient(closest-side, var(--halo-1), transparent 70%); animation: wxDrift1 22s ease-in-out infinite alternate; }
.wx-bg__aurora--2 { width: 48rem; height: 48rem; right: -14rem; bottom: -16rem; opacity: 0.55;
    background: radial-gradient(closest-side, var(--halo-2), transparent 70%); animation: wxDrift2 26s ease-in-out infinite alternate; }
.wx-bg__aurora--3 { width: 40rem; height: 40rem; left: 50%; top: 46%; opacity: 0.32;
    background: radial-gradient(closest-side, var(--brand-tint), transparent 70%); animation: wxDrift3 30s ease-in-out infinite alternate; }
.wx-bg__aurora--4 { width: 40rem; height: 40rem; right: -12rem; top: -14rem; opacity: 0.45;
    background: radial-gradient(closest-side, var(--halo-2), transparent 70%); animation: wxDrift4 24s ease-in-out infinite alternate; }
.wx-bg__aurora--5 { width: 44rem; height: 44rem; left: -14rem; bottom: -16rem; opacity: 0.45;
    background: radial-gradient(closest-side, var(--halo-1), transparent 70%); animation: wxDrift5 28s ease-in-out infinite alternate; }
/* Courbes lumineuses sur les côtés (façon croquis) : elles s'allument et s'éteignent. */
.wx-curves { position: fixed; top: 0; bottom: 0; width: clamp(110px, 20vw, 320px); z-index: -1; pointer-events: none; }
.wx-curves--left { left: 0; }
.wx-curves--right { right: 0; transform: scaleX(-1); }
.wx-curve { fill: none; stroke: var(--brand); stroke-width: 1.6px; vector-effect: non-scaling-stroke;
    stroke-linecap: round; opacity: 0.1; filter: drop-shadow(0 0 6px var(--brand));
    animation: wxGlow 7s ease-in-out infinite; }
.wx-curve--2 { animation-delay: -2.3s; stroke-width: 1.2px; }
.wx-curve--3 { animation-delay: -4.6s; }
.wx-bg__stars span { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--brand); opacity: 0.3; animation: wxTwinkle 5s ease-in-out infinite; }
.wx-bg__stars span:nth-child(2n) { animation-delay: 1.1s; width: 3px; height: 3px; }
.wx-bg__stars span:nth-child(3n) { animation-delay: 2.3s; }
.wx-bg__stars span:nth-child(4n) { animation-delay: 3.5s; width: 5px; height: 5px; }
/* Position de chaque étoile (en CSS : la CSP interdit le style= dans le HTML). */
.wx-bg__stars span:nth-child(1)  { top: 10%; left: 8%; }
.wx-bg__stars span:nth-child(2)  { top: 16%; left: 78%; }
.wx-bg__stars span:nth-child(3)  { top: 24%; left: 28%; }
.wx-bg__stars span:nth-child(4)  { top: 20%; left: 60%; }
.wx-bg__stars span:nth-child(5)  { top: 38%; left: 14%; }
.wx-bg__stars span:nth-child(6)  { top: 34%; left: 90%; }
.wx-bg__stars span:nth-child(7)  { top: 54%; left: 5%; }
.wx-bg__stars span:nth-child(8)  { top: 58%; left: 94%; }
.wx-bg__stars span:nth-child(9)  { top: 68%; left: 22%; }
.wx-bg__stars span:nth-child(10) { top: 74%; left: 68%; }
.wx-bg__stars span:nth-child(11) { top: 82%; left: 42%; }
.wx-bg__stars span:nth-child(12) { top: 80%; left: 12%; }
.wx-bg__stars span:nth-child(13) { top: 12%; left: 44%; }
.wx-bg__stars span:nth-child(14) { top: 64%; left: 50%; }
.wx-bg__stars span:nth-child(15) { top: 30%; left: 72%; }
.wx-bg__stars span:nth-child(16) { top: 86%; left: 84%; }
@keyframes wxDrift1 { to { transform: translate3d(9rem, 7rem, 0) scale(1.15); } }
@keyframes wxDrift2 { to { transform: translate3d(-8rem, -6rem, 0) scale(1.18); } }
@keyframes wxDrift3 { from { transform: translate(-50%, -50%) scale(1); } to { transform: translate(-42%, -58%) scale(1.2); } }
@keyframes wxDrift4 { to { transform: translate3d(-7rem, 8rem, 0) scale(1.16); } }
@keyframes wxDrift5 { to { transform: translate3d(8rem, -7rem, 0) scale(1.14); } }
@keyframes wxSpin { to { transform: rotate(360deg); } }
@keyframes wxTwinkle { 0%, 100% { opacity: 0.12; transform: scale(0.6); } 50% { opacity: 0.6; transform: scale(1.4); } }
@keyframes wxGlow { 0%, 100% { opacity: 0.06; } 50% { opacity: 0.42; } }

/* Structure : barre (haut), contenu centré, pied (bas). Une seule vue. */
.wx-top { position: absolute; top: 0; left: 0; right: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
    padding: 0.7rem clamp(1rem, 3vw, 2.2rem);
    border-bottom: 1px solid var(--border); background: var(--surface-veil);
    -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4); }
.wx-top__right { display: flex; align-items: center; gap: 0.6rem; }
/* Sélecteur de langue (emplacement prêt pour l'i18n). */
.wx-lang { display: inline-flex; align-items: center; gap: 0.35rem; height: 40px; padding: 0 var(--sp-2);
    border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); color: var(--ink-soft);
    font-size: var(--fs-sm); font-weight: 600; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.wx-lang:hover { border-color: var(--border-strong); color: var(--ink); background: var(--surface-sunk); }
.wx-lang .ic { width: 15px; height: 15px; }
.wx-lang .ic:last-child { width: 13px; height: 13px; opacity: 0.6; }
/* Interrupteur clair / sombre (pouce qui glisse). */
.theme-switch { width: 54px; height: 30px; padding: 3px; border-radius: var(--r-full);
    border: 1px solid var(--border); background: var(--surface-sunk); cursor: pointer; transition: background .2s, border-color .2s; }
.theme-switch:hover { border-color: var(--border-strong); }
.theme-switch__thumb { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
    background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink-soft);
    transition: transform .28s cubic-bezier(.4, 1.3, .5, 1), color .2s; }
.theme-switch .ic { width: 15px; height: 15px; }
:root[data-theme="dark"] .theme-switch { background: var(--brand-tint); }
:root[data-theme="dark"] .theme-switch__thumb { transform: translateX(24px); color: var(--brand); }
/* Centrage « sûr » : si le contenu dépasse (ex. inscription, étape 3), il s'aligne
   en haut au lieu d'être coupé, et la page peut défiler. */
.wx-main { flex: 1; display: grid; justify-items: center; align-items: safe center; padding: var(--sp-7) var(--sp-4) var(--sp-5); }
.wx-foot { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; text-align: center;
    border-top: 1px solid var(--border); background: var(--surface-veil);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding: var(--sp-5) var(--sp-4); }
.wx-sig { display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.45rem; }
.wx-sig__ic { display: inline-flex; color: var(--brand); }
.wx-sig__ic .ic { width: 20px; height: 20px; }
.wx-sig__name { text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; font-size: var(--fs-base); color: var(--brand); }
.wx-sig__by { color: var(--ink-faint); font-size: var(--fs-sm); }
.wx-foot__links { display: flex; align-items: center; gap: 0.6rem; font-size: var(--fs-sm); }
.wx-foot__links a { color: var(--ink-faint); }
.wx-foot__links a:hover { color: var(--brand); }
.wx-foot__dot { color: var(--ink-faint); }

/* =======================================================================
   HERO « BIENVENUE » (refonte editoriale). Les trois arguments de valeur ne
   sont plus des boites : ils sont fondus dans une seule phrase, chaque
   promesse surlignee au feutre indigo qui se dessine a l'ouverture. Le champ
   email devient un module de saisie soigne dont la pastille d'icone s'allume
   au focus. Un fin filet courbe pulse en echo aux courbes lumineuses des cotes.
   Classes prefixees « hx- ». Aucune couleur en dur : uniquement les jetons.
   ======================================================================= */
.hx-hero { width: 100%; max-width: 640px; margin-inline: auto; text-align: center;
    display: flex; flex-direction: column; align-items: center; }

/* Bandeau de tete : deux filets courts encadrent la marque, en mono, capitales. */
.hx-masthead { display: flex; align-items: center; justify-content: center; gap: var(--sp-3); margin: 0 0 var(--sp-4); }
.hx-masthead__rule { height: 1px; width: clamp(1.4rem, 6vw, 3rem); background: var(--border-strong); }
.hx-masthead__label { display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap;
    font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.24em; color: var(--brand); }
.hx-masthead__label .ic { width: 14px; height: 14px; }

/* Titre editorial : grand, tres serre. La 2e ligne (degrade de texte) plus grande. */
.hx-title { margin: 0; max-width: 16ch; font-size: var(--fs-display); line-height: 1.03; letter-spacing: var(--tracking-tighter); font-weight: 800; }
.hx-title__accent { display: block; font-size: 1.05em; font-weight: 800; }

/* La phrase qui porte les trois promesses (remplace le paragraphe ET les 3 cartes). */
.hx-say { max-width: 34ch; margin: var(--sp-4) auto 0; color: var(--ink-soft);
    font-size: clamp(1.12rem, 2vw, 1.42rem); line-height: var(--lh-body); text-wrap: balance; }

/* Surlignage « feutre » : fond brand-tint, texte brand ; suit les retours a la ligne. */
.hx-mark { color: var(--brand); font-weight: 600; padding: 0.02em 0.18em; border-radius: var(--r-xs);
    background-image: linear-gradient(var(--brand-tint), var(--brand-tint)); background-repeat: no-repeat;
    background-position: left center; background-size: 100% 76%;
    -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* ---- Module de saisie : la piece maitresse ---- */
.hx-bar { position: relative; display: flex; align-items: center; gap: 0.5rem;
    width: min(100%, 500px); margin: var(--sp-5) auto 0; padding: 0.5rem 0.5rem 0.5rem 0.55rem; text-align: left;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm); transition: border-color .2s ease, box-shadow .2s ease; }
/* Pastille d'icone qui se remplit d'indigo et grossit au focus. */
.hx-bar__lead { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md);
    background: var(--brand-tint); color: var(--brand); transition: transform .2s ease, background .2s ease, color .2s ease; }
.hx-bar__lead .ic { width: 21px; height: 21px; }
.hx-bar__field { flex: 1 1 auto; min-width: 0; padding: 0.6rem 0.2rem; font: inherit;
    font-size: clamp(1rem, 1.5vw, 1.12rem); letter-spacing: -0.01em; color: var(--ink); background: none; border: none; outline: none; }
.hx-bar__field::placeholder { color: var(--ink-faint); }
.hx-bar__go { flex: none; }
/* Focus : tout le module s'illumine (bordure marque + anneau), pastille indigo. */
.hx-bar:focus-within { border-color: var(--brand); box-shadow: var(--shadow-md), var(--ring); }
.hx-bar:focus-within .hx-bar__lead { background: var(--brand); color: var(--on-brand); transform: scale(1.05); }

/* Note rassurante : « on verifie si tu as deja un compte ». */
.hx-note { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    margin: var(--sp-4) auto 0; max-width: 48ch; color: var(--ink-faint); font-size: var(--fs-sm); line-height: 1.5; }
.hx-note .ic { width: 16px; height: 16px; color: var(--brand); flex: none; }
.hx-error { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: var(--sp-3); color: var(--danger-ink); font-size: 0.92rem; }
.hx-error .ic { width: 16px; height: 16px; flex: none; }

/* Ouverture du surlignage en cascade (gauche vers droite). */
@media (prefers-reduced-motion: no-preference) {
    .hx-mark { animation: hxSwipe 0.8s cubic-bezier(.2,.7,.2,1) both; }
    .hx-mark--1 { animation-delay: 0.45s; }
    .hx-mark--2 { animation-delay: 0.65s; }
    .hx-mark--3 { animation-delay: 0.85s; }
}
@keyframes hxSwipe { from { background-size: 0% 76%; } to { background-size: 100% 76%; } }

/* =======================================================================
   PAGE « CONTENT DE TE REVOIR » (`.wb`) : affichée quand l'email saisi a
   deja un compte. Message sympathique + compte a rebours (anneau) qui
   redirige vers la connexion. Meme fond/menu/pied que « bienvenue ».
   ======================================================================= */
.wb { width: 100%; max-width: 460px; margin-inline: auto; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); }
.wb__badge { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--r-lg);
    background: var(--brand-tint); color: var(--brand); }
.wb__badge .ic { width: 28px; height: 28px; }
.wb__title { font-size: var(--fs-title); letter-spacing: var(--tracking-tight); line-height: var(--lh-tight); }
.wb__lead { color: var(--ink-soft); font-size: var(--fs-md); line-height: var(--lh-body); }
.wb__lead b { color: var(--ink); }
/* Anneau de compte a rebours : le trait se vide en 3 s, le chiffre au centre. */
.wb__count { position: relative; width: 96px; height: 96px; margin: var(--sp-1) 0; }
.wb__ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.wb__ring circle { fill: none; stroke-width: 6; }
.wb__ring-bg { stroke: var(--border); }
.wb__ring-fg { stroke: var(--brand); stroke-linecap: round; stroke-dasharray: 283; stroke-dashoffset: 0;
    filter: drop-shadow(0 0 4px var(--brand)); animation: wbCount 3s linear forwards; }
.wb__num { position: absolute; inset: 0; display: grid; place-items: center;
    font-size: 2.2rem; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
@keyframes wbCount { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 283; } }
.wb__alt { font-size: var(--fs-sm); margin: 0; }
.wb__alt a { color: var(--brand); font-weight: 600; }
.wb__alt a:hover { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .wb__ring-fg { animation: none; stroke-dashoffset: 0; } }

@media (max-width: 600px) {
    .wxb { overflow: auto; }              /* petits écrans : scroll autorisé si besoin */
    .wx-main { padding: var(--sp-7) var(--sp-3) var(--sp-5); }
    .hx-say { font-size: var(--fs-md); max-width: 100%; }
    .hx-bar { flex-wrap: wrap; padding: 0.55rem; border-radius: var(--r-md); }
    .hx-bar__field { padding-block: 0.55rem; }
    .hx-bar__go { flex: 1 1 100%; }       /* bouton pleine largeur, sous le champ */
}
@media (max-width: 400px) {
    .wx-lang span { display: none; }      /* garde juste le globe + la flèche */
}
/* Mouvement réduit : on fige le surlignage, le filet et la pastille. */
@media (prefers-reduced-motion: reduce) {
    .hx-mark { animation: none; background-size: 100% 76%; }
    .hx-bar__lead { transition: none; }
}

/* =======================================================================
   COMPTABILITÉ : régime de TVA + document de facture (spécimen conforme).
   ======================================================================= */
.regime-panel__label { font-size: var(--fs-md); font-weight: 700; color: var(--brand); margin: 0.2rem 0; }
.regime-panel__mention { color: var(--ink-soft); font-size: var(--fs-sm); margin-bottom: var(--sp-2); }
.regime-panel .panel__arrow { margin-top: var(--sp-3); }
.vies-status { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-top: var(--sp-2); }

/* Document de facture. */
.invoice {
    position: relative; overflow: hidden;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm); padding: clamp(1.2rem, 4vw, 2.4rem);
}
/* Tampon « SPÉCIMEN » en diagonale dans le coin. */
.invoice__stamp {
    position: absolute; top: 1.5rem; right: -3.4rem; transform: rotate(38deg);
    background: var(--brand-tint); color: var(--brand); font-weight: 800; letter-spacing: 0.22em;
    font-size: 0.78rem; padding: 0.3rem 3.6rem; pointer-events: none;
}
.invoice__head { display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap;
    padding-bottom: var(--sp-4); border-bottom: 1px solid var(--border); }
.invoice__seller { display: flex; align-items: center; gap: 0.7rem; }
.invoice__logo { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--r-md);
    background: var(--brand-gradient); color: var(--on-brand); flex: none; }
.invoice__logo .ic { width: 22px; height: 22px; }
.invoice__seller-name { font-weight: 800; font-size: 1.1rem; }
.invoice__seller-form { color: var(--ink-faint); font-size: var(--fs-sm); }
.invoice__meta { text-align: right; min-width: 200px; }
.invoice__doctitle { font-size: 1.4rem; font-weight: 800; letter-spacing: 0.05em; color: var(--brand); }
.invoice__meta-list { margin-top: var(--sp-2); display: grid; gap: 0.15rem; }
.invoice__meta-list > div { display: flex; justify-content: flex-end; gap: 0.6rem; font-size: var(--fs-sm); }
.invoice__meta-list dt { color: var(--ink-faint); margin: 0; }
.invoice__meta-list dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.invoice__parties { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); padding: var(--sp-4) 0; }
.invoice__party { color: var(--ink-soft); font-size: var(--fs-sm); }
.invoice__party p { margin: 0.25rem 0; line-height: 1.5; }
.invoice__party-label { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint); }
.invoice__party-name { font-weight: 700; color: var(--ink); font-size: 1rem; }
.invoice__party-legal { color: var(--ink-faint); font-size: 0.78rem; }
.invoice__party-todo { color: var(--danger-ink); }
.invoice__table { width: 100%; border-collapse: collapse; margin: var(--sp-3) 0; font-size: var(--fs-sm); }
.invoice__table th { text-align: left; padding: 0.6rem 0.8rem; background: var(--surface-sunk);
    border-bottom: 1px solid var(--border); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-faint); }
.invoice__table td { padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--border); }
.invoice__table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.invoice__totals { display: flex; justify-content: flex-end; margin-top: var(--sp-3); }
.invoice__totals-box { width: min(100%, 320px); display: flex; flex-direction: column; gap: 0.3rem; }
.invoice__total-row { display: flex; justify-content: space-between; gap: 1rem; font-variant-numeric: tabular-nums; }
.invoice__total-row > span:first-child { color: var(--ink-soft); }
.invoice__total-row--ttc { margin-top: 0.3rem; padding-top: 0.5rem; border-top: 2px solid var(--border-strong); font-weight: 800; font-size: 1.1rem; }
.invoice__legal { margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--border);
    color: var(--ink-faint); font-size: 0.78rem; line-height: 1.5; display: grid; gap: 0.4rem; }
.invoice__legal p { margin: 0; }
.invoice__mention { color: var(--brand); font-weight: 600; }
.invoice__actions { margin-top: var(--sp-3); }
@media (max-width: 640px) {
    .invoice__parties { grid-template-columns: 1fr; }
    .invoice__head { flex-direction: column; }
    .invoice__meta { text-align: left; min-width: 0; }
    .invoice__meta-list > div { justify-content: flex-start; }
}

/* =======================================================================
   DOUBLE AUTHENTIFICATION (2FA) : 2e étape de connexion + page de sécurité.
   ======================================================================= */
/* Pastille (page de connexion 2 étapes, sur base_pass, donc classe globale). */
.tfa-badge { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto var(--sp-3);
    border-radius: var(--r-lg); background: var(--brand-tint); color: var(--brand); }
.tfa-badge .ic { width: 28px; height: 28px; }
/* Champ de code : centré, chiffres espacés, lisible. */
.tfa-code { text-align: center; letter-spacing: 0.3em; font-size: 1.15rem; font-weight: 700; }
.tfa-code::placeholder { letter-spacing: 0.3em; }

/* Carte de réglage sur la page /securite. */
.tfa-card { max-width: 620px; margin: var(--sp-4) 0 0; padding: var(--sp-4);
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.tfa-card__title { font-size: var(--fs-lg); letter-spacing: var(--tracking-tight); display: flex; align-items: center; gap: 0.5rem; }
.tfa-card__title .ic { width: 20px; height: 20px; color: var(--brand); }
.tfa-card--codes { border-color: var(--brand); background: var(--brand-tint); }
.tfa-state { display: flex; align-items: center; gap: 0.5rem; font-size: var(--fs-md); color: var(--ink); }
.tfa-state .ic { width: 20px; height: 20px; }
.tfa-state--on .ic { color: var(--ok-ink); }
.tfa-steps { margin: var(--sp-3) 0; padding-left: 1.3rem; display: grid; gap: 0.4rem; color: var(--ink-soft); line-height: 1.5; }
/* La clé secrète : encadré monospace, sélectionnable, qui ne déborde pas. */
.tfa-secret { margin: var(--sp-3) 0; text-align: center; }
.tfa-secret code { display: inline-block; padding: 0.7rem 1rem; border-radius: var(--r-md);
    background: var(--surface-sunk); border: 1px solid var(--border);
    font-family: var(--font-mono); font-size: 1.05rem; letter-spacing: 0.12em; word-break: break-all; }
.tfa-uri { color: var(--brand); font-family: var(--font-mono); font-size: var(--fs-sm); word-break: break-all; }
.tfa-form { margin-top: var(--sp-3); }
/* Codes de secours : grille monospace, faciles à recopier. */
.reco-codes { list-style: none; margin: var(--sp-3) 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.reco-codes li { padding: 0.6rem 0.8rem; text-align: center; border-radius: var(--r-sm);
    background: var(--surface); border: 1px solid var(--border);
    font-family: var(--font-mono); font-size: 1rem; letter-spacing: 0.06em; }
@media (max-width: 520px) { .reco-codes { grid-template-columns: 1fr; } }
