/* ============================================================
   Ilvex — Design system
   Thème clair, blanc & bleu, fluide et agréable au quotidien
   ============================================================ */

/* Police hébergée en local (plus de chargement depuis Google Fonts : aucun
   transfert d'IP visiteur vers Google, conformité RGPD, et léger gain de
   perf). Public Sans est une police VARIABLE : un seul fichier couvre toutes
   les graisses 100→900. */
@font-face {
    font-family: "Public Sans";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/public-sans-variable.woff2") format("woff2");
}

:root {
    /* Couleurs */
    --blue-50:  #EEF3F8;
    --blue-100: #D7E4F0;
    --blue-200: #B3CCE3;
    --blue-300: #82ADD0;
    --blue-400: #5389B8;
    --blue-500: #35699C;
    --blue-600: #245080;
    --blue-700: #1A3D63;
    --blue-800: #122C48;

    /* Accent utilisé en TEXTE (liens, libellés, chiffres). Bleu foncé en clair,
       remplacé par une nuance claire en mode nuit (cf. html[data-theme="dark"]).
       Évite d'avoir un accent illisible sur fond sombre. */
    --accent-ink: var(--blue-700);

    --ink-900: #101828;
    --ink-700: #344054;
    --ink-500: #667085;
    --ink-400: #98A2B3;

    --line: #E3E8EF;
    --bg: #F8FAFC;
    --white: #FFFFFF;

    --green-50: #ECFDF3;
    --green-200: #A6F4C5;
    --green-700: #067647;
    --amber-50: #FFFAEB;
    --amber-200: #FEDF89;
    --amber-700: #B54708;
    --red-50: #FEF3F2;
    --red-200: #FECDCA;
    --red-700: #B42318;

    /* Élévation */
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 4px 14px rgba(16, 24, 40, 0.08);
    --shadow-lg: 0 16px 40px rgba(36, 80, 128, 0.14);

    /* Rayons */
    --r-sm: 6px;
    --r-md: 9px;
    --r-lg: 13px;
    --r-xl: 19px;

    --maxw: 1120px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.65;
    color: var(--ink-700);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    /* Les bandeaux pleine largeur (.lp-hero-bg, .lp-cta) font 100vw, ce qui inclut
       la barre de défilement verticale et débordait d'un cran vers la droite (bande
       blanche + glissement horizontal). clip coupe ce débordement sans créer de
       conteneur de défilement, donc la nav collante et le scroll vertical restent intacts. */
    overflow-x: clip;
}

h1, h2, h3, h4 {
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink-900);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

a {
    color: var(--accent-ink);
    text-decoration: none;
    transition: color 0.18s ease;
}

a:hover {
    color: var(--accent-ink);
}

/* ----------------------------------------------------------
   Header
   ---------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Menu ancré de la page d'accueil : liens qui font défiler jusqu'aux sections.
   Masqué sur mobile pour ne pas surcharger l'en-tête (la page défile de toute façon). */
.lp-anchor-nav {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    margin-right: 0.3rem;
    padding-right: 0.5rem;
    border-right: 1px solid var(--line);
}
@media (max-width: 900px) {
    .lp-anchor-nav { display: none; }
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--ink-900);
    font-weight: 700;
}

.brand:hover { color: var(--ink-900); }

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: var(--white);
    background: var(--blue-700);
    box-shadow: 0 4px 10px rgba(36, 80, 128, 0.25);
}

.brand-name {
    font-family: 'Public Sans', sans-serif;
    font-weight: 800;
    font-size: 1.22rem;
    letter-spacing: -0.02em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.main-nav a {
    color: var(--ink-700);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.55rem 0.85rem;
    border-radius: var(--r-sm);
    transition: background 0.18s ease, color 0.18s ease;
}

.main-nav a:hover {
    background: var(--blue-50);
    color: var(--accent-ink);
}

.main-nav .nav-muted { color: var(--ink-500); }

.main-nav .nav-cta {
    background: var(--blue-600);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.main-nav .nav-cta:hover {
    background: var(--blue-700);
    color: var(--white);
}

/* ----------------------------------------------------------
   Layout
   ---------------------------------------------------------- */
.site-main {
    flex: 1;
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

/* ----------------------------------------------------------
   Boutons
   ---------------------------------------------------------- */
.button, button, input[type="submit"] {
    appearance: none;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    color: var(--white);
    background: var(--blue-600);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--r-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.18s ease;
}

.button:hover, button:hover, input[type="submit"]:hover {
    background: var(--blue-700);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.button:active, button:active { transform: translateY(0); }

.button-ghost {
    background: var(--white);
    color: var(--accent-ink);
    border: 1px solid var(--blue-200);
    box-shadow: none;
}

.button-ghost:hover {
    background: var(--blue-50);
    color: var(--accent-ink);
}

.button-lg {
    padding: 1rem 1.9rem;
    font-size: 1.05rem;
    border-radius: var(--r-lg);
}

/* ----------------------------------------------------------
   Hero (accueil)
   ---------------------------------------------------------- */
.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 3rem;
    padding: 2rem 0 3.5rem;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-ink);
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 1.4rem;
}

.hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    font-weight: 800;
    margin-bottom: 1.1rem;
}

.hero h1 .accent {
    color: var(--accent-ink);
}

.hero-lead {
    font-size: 1.15rem;
    color: var(--ink-500);
    max-width: 34rem;
    margin-bottom: 1.9rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
}

.hero-note {
    font-size: 0.9rem;
    color: var(--ink-400);
}

/* Carte aperçu décorative */
.hero-visual {
    position: relative;
}

.preview-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    padding: 1.4rem;
    transform: rotate(0.5deg);
}

.preview-card .pc-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1rem;
}

.pc-doc {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--white);
    font-weight: 700;
    background: var(--blue-700);
}

.pc-title { font-weight: 700; color: var(--ink-900); font-size: 0.98rem; }
.pc-sub { font-size: 0.82rem; color: var(--ink-400); }

.pc-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}
.pc-row span:first-child { color: var(--ink-500); }
.pc-row span:last-child { color: var(--ink-900); font-weight: 600; }

.pc-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.9rem;
}
.pc-tag {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
}
.pc-tag.fav { background: var(--green-50); color: var(--green-700); }
.pc-tag.neu { background: var(--amber-50); color: var(--amber-700); }
.pc-tag.def { background: var(--red-50); color: var(--red-700); }

/* ----------------------------------------------------------
   Section "Comment ça marche"
   ---------------------------------------------------------- */
.section-head {
    text-align: center;
    max-width: 40rem;
    margin: 0 auto 2.2rem;
}
.section-head h2 {
    font-size: 1.9rem;
    margin-bottom: 0.6rem;
}
.section-head p { color: var(--ink-500); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.4rem;
}

.feature {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.8rem 1.6rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--blue-200);
}

.feature-num {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-family: 'Public Sans', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--accent-ink);
    background: var(--blue-50);
    margin-bottom: 1rem;
}

.feature h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }
.feature p { color: var(--ink-500); font-size: 0.97rem; }

/* ----------------------------------------------------------
   Cartes & panneaux génériques
   ---------------------------------------------------------- */
.panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.6rem;
}
.page-head h2 { font-size: 1.8rem; }
.page-head p { color: var(--ink-500); margin-top: 0.2rem; }

/* ----------------------------------------------------------
   Authentification
   ---------------------------------------------------------- */
/* Écran d'authentification scindé : vitrine de marque + formulaire */
.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 2rem;
    align-items: stretch;
    max-width: 1040px;
    margin: 1.5rem auto;
    min-height: 560px;
}

.auth-aside {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.6rem 2.4rem;
    border-radius: var(--r-xl);
    color: #EAF1FB;
    background:
        radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,0.14), transparent 55%),
        linear-gradient(160deg, var(--blue-700), var(--blue-800) 70%);
    box-shadow: var(--shadow-lg);
}
.auth-aside-register {
    background:
        radial-gradient(120% 120% at 0% 100%, rgba(255,255,255,0.16), transparent 55%),
        linear-gradient(150deg, var(--blue-600), var(--blue-800) 75%);
}
.auth-aside::after {
    /* Motif graphique discret évoquant un histogramme */
    content: "";
    position: absolute;
    right: -30px; bottom: -30px;
    width: 220px; height: 220px;
    background:
        linear-gradient(var(--white, #fff), transparent) 0 0/0 0,
        repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 14px, transparent 14px 34px);
    opacity: 0.5;
    transform: skewX(-8deg);
    pointer-events: none;
}
.auth-aside-top {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    z-index: 1;
}
.auth-aside-mark {
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    border-radius: 10px;
    background: rgba(255,255,255,0.16);
    color: #fff;
}
.auth-aside-name { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.auth-aside-body { position: relative; z-index: 1; }
.auth-aside-body h2 {
    font-size: 1.85rem;
    line-height: 1.2;
    margin-bottom: 0.9rem;
    color: #fff;
}
.auth-aside-body > p {
    color: rgba(234,241,251,0.82);
    line-height: 1.55;
    margin-bottom: 1.6rem;
    max-width: 42ch;
}
.auth-aside-list { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.auth-aside-list li { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.95rem; color: #EAF1FB; }
.auth-aside-ico {
    flex: none;
    display: grid; place-items: center;
    width: 22px; height: 22px;
    border-radius: 999px;
    background: rgba(255,255,255,0.18);
    font-size: 0.8rem; font-weight: 700;
}
.auth-aside-foot {
    position: relative; z-index: 1;
    font-size: 0.9rem;
    color: rgba(234,241,251,0.72);
    border-top: 1px solid rgba(255,255,255,0.16);
    padding-top: 1.2rem;
    font-style: italic;
}

.auth-main { display: grid; place-items: center; }

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-md);
    padding: 2.4rem 2.2rem;
}

.auth-head { margin-bottom: 1.6rem; }
.auth-greeting {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-ink);
    margin-bottom: 0.5rem;
}
.auth-card h1 {
    font-size: 1.75rem;
    margin-bottom: 0.3rem;
    letter-spacing: -0.02em;
}

.auth-card .auth-sub {
    color: var(--ink-500);
    margin-bottom: 0;
}

.form-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.field-hint { font-size: 0.78rem; color: var(--ink-400); }
.field-hint.match-ok { color: #15803D; font-weight: 600; }
.field-hint.match-ko { color: #C0362B; font-weight: 600; }
.field-error { font-size: 0.8rem; color: #C0362B; font-weight: 600; }

/* Champ mot de passe avec bouton afficher/masquer */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 2.8rem; }
.password-toggle,
.password-toggle:hover,
.password-toggle:active,
.password-toggle:focus {
    position: absolute;
    right: 0.5rem; top: 50%;
    transform: translateY(-50%);
    display: grid; place-items: center;
    width: 2rem; height: 2rem;
    border: none;
    background: none;   /* neutralise le fond du bouton primaire global */
    box-shadow: none;
    color: var(--ink-400);
    cursor: pointer;
    border-radius: var(--r-sm);
}
.password-toggle:hover { color: var(--ink-700); }
.password-toggle.on { color: var(--accent-ink); }

/* Jauge de robustesse du mot de passe */
.pw-meter { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.5rem; }
.pw-meter-track { flex: 1; height: 6px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.pw-meter-fill { display: block; height: 100%; width: 0; border-radius: 999px; transition: width 0.25s ease, background 0.25s ease; }
.pw-meter-fill.faible { background: #DC2626; }
.pw-meter-fill.moyen { background: #F59E0B; }
.pw-meter-fill.bon { background: #3B82F6; }
.pw-meter-fill.fort { background: #16A34A; }
.pw-meter-label { font-size: 0.78rem; font-weight: 600; min-width: 4.5rem; }
.pw-meter-label.faible { color: #DC2626; }
.pw-meter-label.moyen { color: #B45309; }
.pw-meter-label.bon { color: var(--accent-ink); }
.pw-meter-label.fort { color: #15803D; }

.auth-row { display: flex; align-items: center; justify-content: space-between; }
.auth-remember, .auth-terms {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.9rem; color: var(--ink-700); cursor: pointer;
}
.auth-terms { align-items: flex-start; line-height: 1.45; }
.auth-remember input, .auth-terms input { width: auto; margin: 0; flex: none; }
.auth-terms input { margin-top: 0.15rem; }

.auth-demo {
    margin-top: 1.3rem;
    padding-top: 1.3rem;
    border-top: 1px solid var(--line);
    text-align: center;
}
.auth-demo-lbl { display: block; font-size: 0.85rem; color: var(--ink-500); margin-bottom: 0.6rem; }
.auth-demo .button-ghost { width: 100%; }

.auth-form, .upload-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--ink-700);
}

input[type="text"], input[type="email"], input[type="password"] {
    width: 100%;
    padding: 0.78rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink-900);
    background: var(--white);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus {
    outline: none;
    border-color: var(--blue-400);
    box-shadow: 0 0 0 4px var(--blue-50);
}

.auth-form input[type="submit"], .upload-form button {
    width: 100%;
    margin-top: 0.3rem;
}

.auth-alt {
    text-align: center;
    margin-top: 1.4rem;
    font-size: 0.95rem;
    color: var(--ink-500);
}

/* ----------------------------------------------------------
   Upload
   ---------------------------------------------------------- */
.upload-card {
    max-width: 620px;
    margin: 0 auto;
}

.dropzone {
    position: relative;
    border: 2px dashed var(--blue-200);
    border-radius: var(--r-lg);
    background: var(--blue-50);
    padding: 2.6rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.dropzone:hover {
    border-color: var(--blue-400);
    background: var(--blue-100);
}

.dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.dropzone-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 0.9rem;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--white);
    background: var(--blue-700);
    box-shadow: none;
}

.dropzone-title { font-weight: 700; color: var(--ink-900); }
.dropzone-sub { font-size: 0.9rem; color: var(--ink-500); margin-top: 0.25rem; }
.dropzone-file {
    margin-top: 0.8rem;
    font-weight: 600;
    color: var(--accent-ink);
    font-size: 0.95rem;
    min-height: 1.2em;
}

/* ----------------------------------------------------------
   Dashboard — liste des analyses
   ---------------------------------------------------------- */
/* Barre de recherche */
.search-bar {
    position: relative;
    margin-bottom: 1.6rem;
}
.search-bar .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-400);
    display: grid;
    place-items: center;
}
.search-bar input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.8rem;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink-900);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.search-bar input:focus {
    outline: none;
    border-color: var(--blue-400);
    box-shadow: 0 0 0 4px var(--blue-50);
}

/* Barre de filtres (menus déroulants) */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem;
    margin: -0.4rem 0 1.6rem;
}
/* Coupon : pastille inline à la même hauteur que les filtres */
.coupon-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.42rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}
.coupon-label { font-size: 0.9rem; font-weight: 600; color: var(--ink-700); white-space: nowrap; }
/* Largeur réservée : la valeur qui change (5 → 12,75) ne doit pas décaler le curseur. */
.coupon-label strong { color: var(--accent-ink); display: inline-block; min-width: 3.4ch; text-align: right; }
.coupon-pill input[type="range"] { width: 116px; height: 22px; }
/* Outils (tri + réinitialiser) poussés à droite */
.filter-tools {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}
.sort-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--ink-500);
    white-space: nowrap;
}
.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 170px;
    flex: 1 1 170px;
}
.filter-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-500);
    padding-left: 0.1rem;
}
.filter-select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 0.6rem 2.2rem 0.6rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background-color: var(--white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--ink-900);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.filter-select:hover { border-color: var(--blue-300); }
.filter-select:focus {
    outline: none;
    border-color: var(--blue-400);
    box-shadow: 0 0 0 4px var(--blue-50);
}
.filter-reset {
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--white);
    color: var(--accent-ink);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background 0.16s ease, border-color 0.16s ease;
}
.filter-reset:hover {
    background: var(--blue-50);
    border-color: var(--blue-300);
}
.sort-field { min-width: 160px; flex: 0 1 180px; }

/* Curseur de coupon minimum */
.coupon-field { min-width: 210px; }
.coupon-field .filter-label strong { color: var(--accent-ink); font-weight: 700; }
.coupon-field input[type="range"] {
    width: 100%;
    height: 34px;
    appearance: none;
    background: transparent;
    cursor: pointer;
}
.coupon-field input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 999px;
    background: var(--blue-100);
}
.coupon-field input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: var(--blue-100);
}
.coupon-field input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    margin-top: -6px;
    border-radius: 50%;
    background: var(--blue-600);
    box-shadow: var(--shadow-sm);
}
.coupon-field input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: var(--blue-600);
    box-shadow: var(--shadow-sm);
}

/* Menus déroulants à sélection multiple */
.ms { position: relative; }
.ms-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--white);
    color: var(--ink-700);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.ms-toggle:hover { border-color: var(--blue-300); }
.ms.open .ms-toggle {
    border-color: var(--blue-400);
    box-shadow: 0 0 0 4px var(--blue-50);
}
.ms.active .ms-toggle {
    border-color: var(--blue-300);
    background: var(--blue-50);
    color: var(--accent-ink);
}
.ms-badge {
    display: inline-grid;
    place-items: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--blue-600);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 700;
}
/* Sans ce rappel, `display: inline-grid` ci-dessus l'emporte sur la règle
   navigateur [hidden]{display:none} → la pastille resterait toujours visible
   (vide au chargement, puis « 0 »). On ne l'affiche que quand un filtre est actif. */
.ms-badge[hidden] { display: none; }
.ms-chevron { color: var(--ink-400); transition: transform 0.18s ease; }
.ms.open .ms-chevron { transform: rotate(180deg); }
.ms-panel {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    max-height: 320px;
    overflow-y: auto;
    padding: 0.4rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
}
.ms-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem;
    border-radius: var(--r-sm);
    font-size: 0.9rem;
    color: var(--ink-700);
    cursor: pointer;
    transition: background 0.14s ease;
}
.ms-option:hover { background: var(--blue-50); }
.ms-option input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-ink);
    cursor: pointer;
    flex-shrink: 0;
}

/* Une carte masquée par un filtre doit vraiment disparaître
   (l'attribut [hidden] est sinon neutralisé par display:flex). */
.product-card[hidden] { display: none !important; }
/* Même cas pour une option de menu filtrée et la barre de comparaison :
   sans ça, la barre « Comparer / Vider la sélection » reste visible même
   sans aucune sélection. */
.ms-option[hidden] { display: none !important; }
.compare-bar[hidden] { display: none !important; }

/* Champ de recherche à l'intérieur d'un menu déroulant (ex: sous-jacents). */
.ms-search {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0.4rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-size: 0.9rem;
    color: var(--ink-700);
}
.ms-search:focus { outline: none; border-color: var(--accent-ink); }

.no-results {
    text-align: center;
    color: var(--ink-500);
    padding: 2rem;
}

/* Logos de marque (vrai logo officiel, repli monogramme) */
.brand-badge {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    /* Taille par défaut */
    width: 34px;
    height: 34px;
}
.brand-badge.lg { width: 46px; height: 46px; border-radius: 12px; }
.brand-badge.xl { width: 58px; height: 58px; border-radius: 12px; }
.brand-mono {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: 'Public Sans', sans-serif;
    font-weight: 800;
    letter-spacing: 0.01em;
    font-size: 0.8rem;
    padding: 0 0.2rem;
    text-align: center;
    line-height: 1;
}
.brand-badge.lg .brand-mono { font-size: 0.92rem; }
.brand-badge.xl .brand-mono { font-size: 1.1rem; }
.brand-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
    background: var(--white);
    z-index: 1;
}
.brand-badge.xl .brand-img { padding: 8px; }
.brand-chip {
    display: inline-grid;
    place-items: center;
    min-width: 30px;
    height: 20px;
    padding: 0 0.35rem;
    border-radius: 5px;
    font-family: 'Public Sans', sans-serif;
    font-weight: 700;
    font-size: 0.68rem;
    vertical-align: middle;
    margin-right: 0.15rem;
}

/* Section Favoris */
.favoris-section {
    margin-bottom: 2rem;
    padding-bottom: 1.6rem;
    border-bottom: 1px solid var(--line);
}
.favoris-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    margin-bottom: 1rem;
    color: var(--accent-ink);
}

/* Grille de cartes d'analyses */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.4rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--blue-200);
}

.product-card .card-link {
    display: block;
    color: inherit;
    padding: 1.4rem 1.4rem 1rem;
    flex: 1;
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: var(--blue-700);
    box-shadow: none;
}
.card-ref {
    font-family: 'Public Sans', sans-serif;
    font-weight: 700;
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    color: var(--ink-400);
    background: var(--bg);
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
}

.card-title {
    font-size: 1.08rem;
    margin-bottom: 0.6rem;
    line-height: 1.32;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.card-tag.fam {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent-ink);
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    padding: 0.24rem 0.6rem;
    border-radius: 999px;
}
.card-sri {
    font-size: 0.74rem;
    font-weight: 700;
    padding: 0.24rem 0.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
}
.card-sri.low { color: var(--green-700); background: var(--green-50); border-color: var(--green-200); }
.card-sri.mid { color: var(--amber-700); background: var(--amber-50); border-color: var(--amber-200); }
.card-sri.high { color: var(--red-700); background: var(--red-50); border-color: var(--red-200); }

.card-meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
}
.card-meta li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    font-size: 0.86rem;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--line);
}
.card-meta li:last-child { border-bottom: none; }
.card-meta .meta-label { color: var(--ink-500); flex: none; }
.card-meta .meta-value {
    color: var(--ink-900);
    font-weight: 600;
    text-align: right;
    min-width: 0;
    font-variant-numeric: tabular-nums;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.3rem;
    line-height: 1.4;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    border-top: 1px solid var(--line);
}
.card-date { font-size: 0.8rem; color: var(--ink-400); }
.card-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.card-view {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent-ink);
    padding: 0.2rem 0.4rem;
}

.icon-button {
    appearance: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0.45rem;
    border-radius: var(--r-sm);
    color: var(--ink-400);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
}
.icon-button:hover {
    background: var(--red-50);
    color: var(--red-700);
    transform: none;
}
.icon-button.rename-toggle:hover {
    background: var(--blue-50);
    color: var(--accent-ink);
}

/* Mode présentation client : masque les éléments internes (référence,
   renommer, supprimer) et agrandit légèrement le texte pour une lecture
   confortable à l'écran en rendez-vous. Bascule ponctuelle en JS, ne touche
   pas au contenu (déjà rédigé pour être compréhensible par un client). */
#client-mode-toggle:hover { background: var(--blue-50); color: var(--accent-ink); }
#client-mode-toggle.active { background: var(--blue-600); color: var(--white); }
body.client-mode .no-client { display: none !important; }
body.client-mode .tab-panel { font-size: 1.08em; }

/* Bloc commission CGP : estimation réservée au conseiller (jamais côté client,
   d'où la classe .no-client). Ton neutre-ambré pour signaler « interne ». */
.commission-block {
    background: var(--amber-50);
    border: 1px solid var(--amber-200);
}
.commission-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.commission-head h3 { margin: 0; }
.commission-tag {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--amber-700);
    background: var(--white);
    border: 1px solid var(--amber-200);
    border-radius: var(--r-sm);
    padding: 0.2rem 0.5rem;
}
.commission-range {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ink-900);
    margin: 0.5rem 0 0.25rem;
}
.commission-dash { color: var(--ink-400); margin: 0 0.15rem; }
.commission-note {
    font-size: 0.85rem;
    color: var(--ink-500);
    margin: 0;
}

/* Notes privées du conseiller sur la fiche (autosave, jamais côté client) */
.notes-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.notes-head h3 { margin: 0; }
.notes-tag {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-500);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 0.2rem 0.5rem;
}
.notes-etat {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--accent-ink);
    font-weight: 600;
}
.notes-zone {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.7rem 0.85rem;
    font: inherit;
    font-size: 0.92rem;
    color: var(--ink-900);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    resize: vertical;
    min-height: 96px;
}
.notes-zone:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px var(--blue-100);
}
/* Pastille « Note » sur les cartes du tableau de bord */
.card-note-dot {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.4rem;
    padding: 0.08rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-ink);
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    border-radius: 999px;
    vertical-align: middle;
}

/* Bandeau de contrôles en haut de carte : sélection comparateur + épingle */
.card-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.compare-select {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-500);
    cursor: pointer;
}
.compare-select input {
    width: 15px;
    height: 15px;
    accent-color: var(--accent-ink);
    cursor: pointer;
}
.pin-form { display: contents; }
.pin-btn {
    appearance: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0.3rem;
    border-radius: var(--r-sm);
    color: var(--ink-400);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.16s ease, color 0.16s ease;
}
.pin-btn:hover { background: var(--amber-50); color: var(--amber-700); }
.pin-btn.active { color: var(--amber-700); }

.card-original-name {
    font-size: 0.78rem;
    color: var(--ink-400);
    margin: -0.4rem 0 0.6rem;
    font-style: italic;
}

/* Barre flottante du comparateur */
.compare-bar {
    position: fixed;
    left: 50%;
    bottom: 1.4rem;
    transform: translateX(-50%);
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 0.8rem 1rem 0.8rem 1.4rem;
    background: var(--ink-900);
    color: var(--white);
    border-radius: 999px;
    box-shadow: var(--shadow-md);
}
.compare-bar span { font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
.compare-bar-actions { display: flex; align-items: center; gap: 0.5rem; }
.compare-bar .button-ghost {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.3);
}
.compare-bar .button-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.compare-bar .button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}
.compare-bar .button-ghost:disabled { opacity: 0.45; cursor: not-allowed; }
@media (max-width: 560px) {
    .compare-bar {
        left: 1rem;
        right: 1rem;
        transform: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }
}

/* Fenêtre « Email groupé » */
.egm-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(16, 24, 40, 0.45);
}
.egm-overlay[hidden] { display: none; }
.egm-modal {
    width: 100%;
    max-width: 540px;
    background: var(--white);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    padding: 1.4rem 1.5rem 1.5rem;
    max-height: 90vh;
    overflow-y: auto;
}
.egm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.egm-head h3 { font-size: 1.15rem; margin: 0; }
.egm-close {
    appearance: none; background: none; border: none; box-shadow: none;
    font-size: 1.5rem; line-height: 1; color: var(--ink-400); cursor: pointer; padding: 0 0.3rem;
}
.egm-close:hover { color: var(--ink-900); transform: none; }
.egm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem 1rem; }
.egm-grid label {
    display: flex; flex-direction: column; gap: 0.3rem;
    font-size: 0.8rem; font-weight: 600; color: var(--ink-700);
}
.egm-grid .egm-full { grid-column: 1 / -1; }
.egm-grid input, .egm-grid textarea {
    font-family: inherit; font-size: 0.95rem; padding: 0.5rem 0.6rem;
    border: 1px solid var(--line); border-radius: var(--r-sm);
    color: var(--ink-900); background: var(--white); resize: vertical;
}
.egm-grid input:focus, .egm-grid textarea:focus {
    outline: none; border-color: var(--blue-400); box-shadow: 0 0 0 3px var(--blue-50);
}
.egm-list-wrap { margin: 1.1rem 0; }
.egm-list-label {
    display: block; font-size: 0.76rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--ink-500); margin-bottom: 0.5rem;
}
.egm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.egm-list li {
    font-size: 0.9rem; color: var(--ink-700);
    padding: 0.5rem 0.7rem; background: var(--bg);
    border: 1px solid var(--line); border-radius: var(--r-sm);
}
.egm-actions { display: flex; justify-content: flex-end; gap: 0.7rem; flex-wrap: wrap; }
.egm-list-hint { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink-400); }
.egm-list li, .ec-selected-item { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.egm-list li > span, .ec-selected-item > span { flex: 1; min-width: 8rem; }
.egm-dl, .ec-dl {
    appearance: none; background: none; border: none; box-shadow: none; padding: 0;
    font-family: inherit; font-size: 0.82rem; font-weight: 600; color: var(--accent-ink);
    white-space: nowrap; cursor: pointer; text-decoration: underline;
}
.egm-dl:hover, .ec-dl:hover { color: var(--accent-ink); transform: none; }
@media (max-width: 560px) { .egm-grid { grid-template-columns: 1fr; } }

/* Page « Mon cabinet » */
.cabinet-form { max-width: 620px; display: grid; gap: 1.75rem; margin-top: 1rem; }
.cf-section {
    display: grid; gap: 1.1rem;
    padding: 1.4rem 1.5rem; border: 1px solid var(--line);
    border-radius: var(--r-md); background: var(--white);
}
.cf-section-title {
    font-size: 1.05rem; margin: 0; color: var(--ink-900);
    padding-bottom: 0.7rem; border-bottom: 1px solid var(--line);
}
.cf-section-hint { font-size: 0.86rem; color: var(--ink-500); margin: -0.4rem 0 0; line-height: 1.55; }
.cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 620px) { .cf-grid { grid-template-columns: 1fr; } }
html[data-theme="dark"] .cf-section { background: var(--white); border-color: var(--line); }
html[data-theme="dark"] .cf-section-title { color: #fff; }
.cf-error { font-size: 0.82rem; color: #C1435F; }
.cf-field { display: flex; flex-direction: column; gap: 0.4rem; }
.cf-label { font-size: 0.85rem; font-weight: 700; color: var(--ink-700); }
.cf-input {
    font-family: inherit; font-size: 1rem; padding: 0.6rem 0.7rem;
    border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink-900);
}
.cf-input:focus { outline: none; border-color: var(--blue-400); box-shadow: 0 0 0 3px var(--blue-50); }
.cf-logo-box { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.cf-logo-preview {
    width: 160px; height: 84px; border: 1px dashed var(--line); border-radius: var(--r-sm);
    display: grid; place-items: center; background: var(--white); overflow: hidden;
}
.cf-logo-preview img { max-width: 100%; max-height: 100%; }
.cf-logo-empty { font-size: 0.85rem; color: var(--ink-400); }
.cf-logo-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.cf-hint { font-size: 0.82rem; color: var(--ink-500); margin: 0; }
/* Légende des jetons {prenom}/{produits}/{cabinet} + puces de code inline */
.ec-tokens { display: block; margin-top: 6px; font-size: 0.8rem; color: var(--ink-400); }
.ec-tokens code, .cf-hint code {
    background: var(--blue-50); color: var(--accent-ink);
    padding: 1px 5px; border-radius: 5px; font-size: 0.85em;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Composeur « Email client » */
.ec-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.ec-compose, .ec-picker {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: 1.3rem 1.4rem; box-shadow: var(--shadow-sm);
}
.ec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem 1rem; }
.ec-grid label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.8rem; font-weight: 600; color: var(--ink-700); }
.ec-grid .ec-full { grid-column: 1 / -1; }
.ec-grid input, .ec-grid textarea, .ec-search {
    font-family: inherit; font-size: 0.95rem; padding: 0.5rem 0.6rem;
    border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink-900);
    background: var(--white); resize: vertical;
}
.ec-grid input:focus, .ec-grid textarea:focus, .ec-search:focus {
    outline: none; border-color: var(--blue-400); box-shadow: 0 0 0 3px var(--blue-50);
}
.ec-sub, .ec-list-label {
    display: block; font-size: 0.76rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--ink-500); margin-bottom: 0.5rem;
}
.ec-selected-wrap { margin: 1.2rem 0; }
.ec-selected { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.ec-selected-item {
    padding: 0.5rem 0.7rem; background: var(--bg); border: 1px solid var(--line);
    border-radius: var(--r-sm); font-size: 0.9rem; color: var(--ink-700);
}
.ec-empty { color: var(--ink-400); font-size: 0.9rem; }
.ec-remove {
    appearance: none; background: none; border: none; box-shadow: none;
    font-size: 1.15rem; line-height: 1; color: var(--ink-400); cursor: pointer; padding: 0 0.2rem;
}
.ec-remove:hover { color: var(--red-700); transform: none; }
.ec-buttons { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; }
.ec-search { width: 100%; margin-bottom: 0.9rem; }
.ec-list { display: grid; gap: 0.4rem; max-height: 60vh; overflow-y: auto; }
.ec-item {
    display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
    padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: var(--r-sm);
}
.ec-item[hidden] { display: none; }
.ec-item.is-added { border-color: var(--blue-300); background: var(--blue-50); }
.ec-item-main { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.ec-item-title { font-weight: 600; color: var(--ink-900); font-size: 0.9rem; }
.ec-item-meta { font-size: 0.78rem; color: var(--ink-500); }
.ec-add { flex: none; font-size: 0.82rem; padding: 0.35rem 0.7rem; }
.ec-add.is-added { color: var(--green-700); }
@media (max-width: 800px) { .ec-layout, .ec-grid { grid-template-columns: 1fr; } }

/* Page comparateur */
.compare-wrap {
    overflow-x: auto;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    padding: 0.5rem;
}
.compare-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare-table td {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.92rem;
    color: var(--ink-900);
    text-align: center;
    min-width: 180px;
}
.compare-row-label {
    text-align: left;
    padding: 0.85rem 1.1rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--ink-500);
    white-space: nowrap;
    border-bottom: 1px solid var(--line);
    position: sticky;
    left: 0;
    background: var(--white);
    z-index: 2;
}
.compare-col {
    padding: 1.1rem 1.1rem;
    text-align: center;
    vertical-align: top;
    min-width: 200px;
    border-bottom: 2px solid var(--blue-100);
}
.compare-titre { display: block; font-weight: 700; margin-top: 0.6rem; font-size: 0.95rem; line-height: 1.3; }
.compare-ref { display: block; font-size: 0.76rem; color: var(--ink-400); margin-top: 0.2rem; }
.compare-open { display: inline-block; margin-top: 0.6rem; font-size: 0.82rem; font-weight: 600; color: var(--accent-ink); }
.compare-tag {
    display: inline-block;
    margin-left: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-ink);
    background: var(--blue-50);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    white-space: nowrap;
}
.compare-row-group th {
    background: var(--bg);
    color: var(--ink-500);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
    padding: 0.6rem 1.1rem;
    position: static;
}
.compare-rendement { font-weight: 700; }
.compare-rendement.pos { color: var(--green-700); }
.compare-rendement.neg { color: var(--red-700); }

/* Comparateur — aide à la décision */
.compare-resume {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    margin: 0 0 1.4rem;
    padding: 0.9rem 1.1rem;
    background: var(--blue-50);
    border: 1px solid var(--blue-100, #dbeafe);
    border-radius: var(--r-md);
}
.compare-resume-label {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent-ink);
    padding-top: 0.15rem;
}
.compare-resume p { margin: 0; font-size: 0.92rem; color: var(--ink-700); line-height: 1.5; }
.compare-atout {
    display: inline-block;
    margin: 0 0.3rem 0.3rem 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #7c5e00;
    background: #fdf3d0;
    border: 1px solid #f0dfa0;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}
.compare-list { margin: 0; padding-left: 1.05rem; font-size: 0.85rem; line-height: 1.45; }
.compare-list li { margin-bottom: 0.25rem; }
.compare-list.pos li { color: var(--green-700); }
.compare-list.neg li { color: var(--red-700); }
.compare-muted { color: var(--ink-400, #9ca3af); }

/* ----------------------------------------------------------
   Panneau d'administration
   ---------------------------------------------------------- */
.admin-panel { overflow-x: auto; padding: 0; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.admin-table th {
    text-align: left;
    padding: 0.75rem 1.1rem;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-500);
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.admin-table td {
    padding: 0.75rem 1.1rem;
    font-size: 0.88rem;
    color: var(--ink-900);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-row-inactif td { color: var(--ink-400); }
.admin-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
}
.admin-tag-ok { color: var(--green-700); background: var(--green-50); }
.admin-tag-alert { color: var(--red-700); background: var(--red-50); }
.admin-actions { display: flex; flex-direction: column; gap: 0.4rem; }
.admin-inline-form { display: flex; gap: 0.4rem; align-items: center; }
.admin-inline-select {
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-size: 0.82rem;
    color: var(--ink-900);
    background: var(--white);
}

/* État vide */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--white);
    border: 1px dashed var(--line);
    border-radius: var(--r-lg);
}
.empty-state .empty-icon {
    display: inline-grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 10px;
    color: var(--white);
    background: var(--blue-700);
}
.empty-state h3 { margin: 0.9rem 0 0.3rem; }
.empty-state p { color: var(--ink-500); margin-bottom: 1.3rem; }

/* ----------------------------------------------------------
   Onglets (page d'analyse)
   ---------------------------------------------------------- */
.tab-nav {
    display: flex;
    gap: 0.3rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1.6rem;
    overflow-x: auto;
    position: sticky;
    top: 64px;
    z-index: 40;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
@media (max-width: 640px) {
    .tab-nav { top: 58px; }
}

.tab-btn {
    appearance: none;
    background: transparent;
    border: none;
    box-shadow: none;
    cursor: pointer;
    font-family: 'Public Sans', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--ink-500);
    padding: 0.8rem 1.1rem;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -1px;
    border-radius: 0;
    white-space: nowrap;
    transition: color 0.18s ease, border-color 0.18s ease;
}
.tab-btn:hover {
    background: transparent;
    color: var(--ink-900);
    transform: none;
    box-shadow: none;
}
.tab-btn.active {
    color: var(--accent-ink);
    border-bottom-color: var(--accent-ink);
}

.tab-panel { animation: fade-in 0.25s ease; }
.tab-panel[hidden] { display: none; }

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

/* Callout de synthèse */
.synthese-callout {
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    border-left: 4px solid var(--blue-600);
    border-radius: var(--r-lg);
    padding: 1.5rem 1.7rem;
    margin-bottom: 1.4rem;
}
.callout-label {
    display: block;
    font-family: 'Public Sans', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-ink);
    margin-bottom: 0.4rem;
}
.synthese-callout p { color: var(--ink-900); font-size: 1.05rem; }

/* Liste clé/valeur sur deux colonnes */
.kv-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.2rem 2.4rem;
}
@media (max-width: 640px) {
    .kv-2col { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------
   Résultat d'analyse
   ---------------------------------------------------------- */
.result-header {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.8rem 2rem;
    margin-bottom: 1.4rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.result-header-lead {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    min-width: 0;
}

.result-header-side {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.result-ref {
    font-family: 'Public Sans', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: var(--accent-ink);
    background: var(--blue-50);
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
}

.result-type {
    display: inline-block;
    color: var(--accent-ink);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    background: var(--blue-50);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    margin-bottom: 0.7rem;
}

.result-header h2 { font-size: 1.85rem; }
.result-emetteur {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.9rem;
    color: var(--ink-500);
}
.result-emetteur strong { color: var(--ink-900); }

/* Indicateur de risque SRI (1 à 7) */
.sri-scale {
    display: flex;
    gap: 5px;
    padding: 4px 0;
}
.sri-seg {
    flex: 1;
    display: grid;
    place-items: center;
    height: 30px;
    border-radius: 7px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--ink-400);
    background: var(--bg);
    border: 1px solid var(--line);
    transition: transform 0.16s ease;
}
.sri-seg.active {
    color: var(--white);
    background: var(--blue-700);
    border-color: var(--accent-ink);
    box-shadow: 0 0 0 4px var(--blue-50);
    position: relative;
    z-index: 1;
}
.sri-seg.active.low { background: var(--green-700); border-color: var(--green-700); box-shadow: 0 0 0 4px var(--green-50); }
.sri-seg.active.mid { background: var(--amber-700); border-color: var(--amber-700); box-shadow: 0 0 0 4px var(--amber-50); }
.sri-seg.active.high { background: var(--red-700); border-color: var(--red-700); box-shadow: 0 0 0 4px var(--red-50); }
.sri-ends {
    display: flex;
    justify-content: space-between;
    margin-top: 0.4rem;
    font-size: 0.76rem;
    color: var(--ink-400);
}
.sri-note {
    margin: 0.7rem 0 0;
    font-size: 0.92rem;
    color: var(--ink-700);
    line-height: 1.55;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem;
    align-items: start;
}
/* En mode client, la commission (interne) est masquée : la fiche d'identité
   reprend alors toute la largeur pour ne pas laisser une demi-colonne vide. */
body.client-mode #tab-overview .identity-block { grid-column: 1 / -1; }

.result-block {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.35rem 1.55rem;
}

.result-block.full { grid-column: 1 / -1; }

/* Blocs empilés directement dans un onglet (Sous-jacent, Risques) : ils
   n'ont pas de conteneur .result-grid pour les espacer → sans marge ils se
   touchent. On les espace ici. Les blocs DANS une .result-grid ne sont pas
   des enfants directs du panneau, donc non concernés (le gap s'en charge). */
.tab-panel > .result-block { margin-bottom: 1.4rem; }

.result-block h3 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.12rem;
    margin-bottom: 0.85rem;
    color: var(--ink-900);
}

.result-block h3::before {
    content: "";
    width: 4px;
    height: 18px;
    border-radius: 3px;
    background: var(--blue-600);
}

/* Clé-valeur en LIGNES (fiche d'identité) : allure « spec sheet » plus dense */
.kv-list.kv-rows { gap: 0; }
.kv-list.kv-rows li {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    gap: 1.4rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--line);
}
.kv-list.kv-rows .kv-label {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--ink-500);
    white-space: nowrap;
}
.kv-list.kv-rows .kv-value {
    text-align: right;
    font-weight: 600;
    color: var(--ink-900);
}

.result-block p { color: var(--ink-700); }

.kv-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.4rem;
}

.kv-list li {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px dashed var(--line);
}
.kv-list li:last-child { border-bottom: none; padding-bottom: 0; }

.kv-list .kv-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-400);
}
.kv-list .kv-value { color: var(--ink-900); font-weight: 500; }

.subject-name {
    font-weight: 700;
    color: var(--ink-900);
    margin-bottom: 0.3rem;
}

.mech-desc { margin-bottom: 1rem; }

/* Graphe d'évolution — style terminal financier */
.chart-card {
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 1.2rem 1.3rem 1rem;
}

.rate-svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

/* zones de part et d'autre de la barrière */
.zone-no-coupon { fill: #e0564c; opacity: 0.05; }
.zone-coupon { fill: #1fa463; opacity: 0.07; }

/* grille & axes */
.grid-line { stroke: var(--line); stroke-width: 1; }
.axis-label {
    font-family: 'Public Sans', sans-serif;
    font-size: 11px;
    fill: var(--ink-400);
}
.axis-label.y { text-anchor: end; }
.axis-label.x { text-anchor: middle; }

/* barrière de coupon */
.barriere-line {
    fill: none;
    stroke: var(--ink-700);
    stroke-width: 1.5;
    stroke-dasharray: 5 4;
    opacity: 0.7;
}
.barriere-tag rect { fill: var(--ink-900); }
.barriere-tag text {
    fill: var(--white);
    font-family: 'Public Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-anchor: middle;
}

/* barrière de protection du capital : ligne distincte (rouge), sous la
   barrière de coupon, pour qu'on voie enfin à partir de quel niveau le
   capital n'est plus protégé. */
.protection-line {
    fill: none;
    stroke: var(--red-700);
    stroke-width: 1.5;
    stroke-dasharray: 2 3;
    opacity: 0.75;
}
.protection-tag rect { fill: var(--red-700); }
.protection-tag text {
    fill: var(--white);
    font-family: 'Public Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-anchor: middle;
}
.legend-line.protection { border-top-color: var(--red-700); }

.rappel-line {
    fill: none;
    stroke: var(--amber-700);
    stroke-width: 1.5;
    stroke-dasharray: 6 3;
    opacity: 0.85;
}
.rappel-tag rect { fill: var(--amber-700); }
.rappel-tag text {
    fill: var(--white);
    font-family: 'Public Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-anchor: middle;
}
.legend-line.rappel { border-top-color: var(--amber-700); }

/* courbes des scénarios */
.series-line {
    fill: none;
    stroke-width: 2.4;
    stroke-linejoin: round;
    stroke-linecap: round;
}
.series-fav { stroke: #1fa463; }
.series-int { stroke: #245080; }
.series-def { stroke: #e0564c; }

/* légende */
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
    font-size: 0.88rem;
    color: var(--ink-500);
}
.legend-item { display: inline-flex; align-items: center; gap: 0.5rem; }
.legend-swatch {
    width: 16px;
    height: 3px;
    border-radius: 2px;
    display: inline-block;
}
.legend-swatch.series-fav { background: #1fa463; }
.legend-swatch.series-int { background: #245080; }
.legend-swatch.series-def { background: #e0564c; }
.legend-line {
    width: 18px;
    height: 0;
    border-top: 1.5px dashed var(--ink-700);
    display: inline-block;
}
.legend-zone {
    width: 16px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
    background: rgba(31, 164, 99, 0.18);
    border: 1px solid rgba(31, 164, 99, 0.4);
}

.chart-note {
    font-size: 0.82rem;
    color: var(--ink-400);
    margin-top: 0.9rem;
    font-style: italic;
}

/* Liste des risques (onglet Risques) */
.risk-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}
.risk-item {
    display: flex;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    background: var(--amber-50);
    border: 1px solid var(--amber-200);
    border-radius: var(--r-md);
}
.risk-item:first-child {
    background: var(--red-50);
    border-color: var(--red-200);
}
.risk-icon {
    flex-shrink: 0;
    color: var(--amber-700);
    margin-top: 0.1rem;
}
.risk-item:first-child .risk-icon { color: var(--red-700); }
.risk-titre {
    display: block;
    font-weight: 700;
    color: var(--ink-900);
    margin-bottom: 0.2rem;
}
.risk-body p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--ink-700);
    line-height: 1.55;
}

/* Onglet Sous-jacent */
.sj-head {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.sj-badge {
    display: inline-block;
    margin: 0.15rem 0 0.6rem;
    padding: 0.22rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-ink);
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    border-radius: 999px;
}
.composants {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}
.composants-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-500);
    margin-right: 0.2rem;
}
.composant-chip {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-900);
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
}
.kv-mono {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.9em;
    letter-spacing: 0.01em;
}
.composants-table-wrap { margin: 0.9rem 0; }
.composants-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}
.composants-table th {
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-500);
    font-weight: 700;
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid var(--line);
}
.composants-table td {
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid var(--line);
    color: var(--ink-900);
}
.composants-table td:first-child { font-weight: 600; }
.composition-note {
    margin: 0.9rem 0;
    padding: 0.9rem 1rem;
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    border-radius: var(--r-md);
}
.composition-note p { margin: 0.3rem 0 0; color: var(--ink-700); font-size: 0.92rem; }
.sj-kv { margin-top: 1rem; }
.kv-date {
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--ink-400);
    margin-top: 0.1rem;
}

.sj-repere {
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.7rem 1rem;
    border-radius: var(--r-sm);
    margin-bottom: 1.1rem;
}
.sj-repere.pos { background: var(--green-50); color: var(--green-700); }
.sj-repere.neg { background: var(--amber-50); color: var(--amber-700); }

.gauge-list { display: grid; gap: 1.1rem; }
.gauge-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.35rem;
}
.gauge-titre { font-weight: 600; color: var(--ink-900); font-size: 0.95rem; }
.gauge-valeur { font-weight: 700; font-size: 0.95rem; }
.gauge-valeur.green { color: var(--green-700); }
.gauge-valeur.amber { color: var(--amber-700); }
.gauge-valeur.red { color: var(--red-700); }
.gauge-bar {
    height: 8px;
    background: var(--line);
    border-radius: 999px;
    overflow: hidden;
}
.gauge-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}
.gauge-fill.green { background: linear-gradient(90deg, #34d399, #067647); }
.gauge-fill.amber { background: linear-gradient(90deg, #fcd34d, #b54708); }
.gauge-fill.red { background: linear-gradient(90deg, #f87171, #b42318); }
.gauge-phrase {
    margin: 0.4rem 0 0;
    font-size: 0.88rem;
    color: var(--ink-500);
    line-height: 1.5;
}

.decrement-callout,
.dividende-callout {
    padding: 1.1rem 1.3rem;
    border-radius: var(--r-lg);
    margin-bottom: 1.2rem;
}
.decrement-callout {
    background: var(--amber-50);
    border: 1px solid var(--amber-200);
}
.dividende-callout {
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
}
.particularite-callout {
    padding: 1.1rem 1.3rem;
    border-radius: var(--r-lg);
    margin-bottom: 1.2rem;
    background: var(--white);
    border: 1px solid var(--blue-200);
    border-left: 3px solid var(--blue-500);
}
.particularite-callout .callout-label { color: var(--accent-ink); }
.particularite-callout p {
    margin: 0.5rem 0 0;
    font-size: 0.93rem;
    color: var(--ink-700);
    line-height: 1.6;
}
.decrement-callout .callout-label { color: var(--amber-700); }
.dividende-callout .callout-label { color: var(--accent-ink); }
.decrement-callout p,
.dividende-callout p {
    margin: 0.5rem 0 0;
    font-size: 0.93rem;
    color: var(--ink-700);
    line-height: 1.6;
}
.decrement-comp { padding-top: 0.3rem; }

/* Indice maison / backtest / mécanisme d'indice */
.indice-maison-note {
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    border-left: 3px solid var(--blue-500);
}
.indice-maison-note .callout-label { color: var(--accent-ink); }
.backtest-callout {
    background: var(--amber-50);
    border: 1px solid var(--amber-200);
    border-left: 3px solid var(--amber-500, #DB8500);
}
.backtest-callout .callout-label { color: var(--amber-700); }
.backtest-meta {
    list-style: none;
    margin: 0.6rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.4rem;
    font-size: 0.88rem;
    color: var(--ink-700);
}
.backtest-meta li { margin: 0; }

.niveau-live {
    display: inline-block;
    margin-left: 0.4rem;
    font-size: 0.78rem;
    color: var(--ink-500);
    font-style: italic;
}
.niveau-live a { color: var(--accent-ink); }

.retenir-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.7rem;
}
.retenir-list li {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
}
.retenir-check {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--green-50);
    color: var(--green-700);
    margin-top: 0.05rem;
}
.retenir-list p {
    margin: 0;
    font-size: 0.93rem;
    color: var(--ink-700);
    line-height: 1.55;
}

.scenario-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
}

.scenario-horizon {
    margin: -0.2rem 0 0.7rem;
    font-size: 0.82rem;
    color: var(--ink-500);
}
.scenario-annuel {
    display: inline-block;
    font-weight: 700;
    color: var(--ink-700);
    margin-left: 0.15rem;
}

/* Thèse & profil investisseur (vue d'ensemble) */
.these-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
}
@media (max-width: 720px) {
    .these-grid { grid-template-columns: 1fr; }
}
.these-item {
    padding: 0.9rem 1rem;
    border-radius: var(--r-md);
    border-left: 3px solid var(--ink-400);
    background: var(--bg);
}
.these-item.vue { border-left-color: var(--accent-ink); }
.these-item.ok { border-left-color: var(--green-700); }
.these-item.no { border-left-color: var(--red-700); }
.these-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
    color: var(--ink-500);
}
.these-item.vue .these-label { color: var(--accent-ink); }
.these-item.ok .these-label { color: var(--green-700); }
.these-item.no .these-label { color: var(--red-700); }
.these-item p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--ink-700);
}

.rate-rendement {
    font-family: 'Public Sans', sans-serif;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    white-space: nowrap;
}
.rate-rendement.pos { color: var(--green-700); background: var(--green-50); }
.rate-rendement.neg { color: var(--red-700); background: var(--red-50); }
.rate-rendement.zero { color: var(--ink-500); background: var(--line); }

/* bande de coupons par scénario */
.coupon-strip-wrap { margin: 0.9rem 0; }
.coupon-strip-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-400);
    margin-bottom: 0.4rem;
}
.coupon-count { color: var(--ink-900); }
.coupon-strip {
    display: flex;
    gap: 2px;
}
.coupon-cell {
    flex: 1;
    height: 16px;
    border-radius: 3px;
    min-width: 4px;
}
.coupon-cell.paid { background: #1fa463; }
.coupon-cell.recovered {
    background: repeating-linear-gradient(
        45deg, #7bd3a6, #7bd3a6 3px, #a7e3c5 3px, #a7e3c5 6px
    );
}
.coupon-cell.unpaid { background: var(--line); }

/* Légende de la pastille (états du coupon avec effet mémoire) */
.strip-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin: -0.2rem 0 1.1rem;
    font-size: 0.82rem;
    color: var(--ink-500);
}
.strip-legend .lg-cell {
    display: inline-block;
    width: 26px;
    height: 12px;
    border-radius: 3px;
    margin-right: 0.35rem;
    vertical-align: middle;
}
.strip-legend .lg-cell.paid { background: #1fa463; }
.strip-legend .lg-cell.recovered {
    background: repeating-linear-gradient(
        45deg, #7bd3a6, #7bd3a6 3px, #a7e3c5 3px, #a7e3c5 6px
    );
}
.strip-legend .lg-cell.unpaid { background: var(--line); }

/* Nature du coupon (mémoire / mode de versement) */
.modalite-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
}
.modalite-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--line);
}
.modalite-badge.on {
    background: var(--green-50);
    color: var(--green-700);
    border-color: #b6e6cd;
}
.modalite-badge.off {
    background: var(--bg);
    color: var(--ink-500);
}
.modalite-badge.neutre {
    background: var(--blue-50);
    color: var(--accent-ink);
    border-color: var(--blue-100);
}
.modalite-explication {
    margin: 0;
    color: var(--ink-700);
    line-height: 1.6;
}

/* Scénarios */
.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.1rem;
    margin-top: 0.5rem;
}

.scenario-card {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 1.3rem;
    background: var(--bg);
    border-top: 4px solid var(--blue-400);
}

.scenario-card .scenario-name {
    font-family: 'Public Sans', sans-serif;
    font-weight: 700;
    font-size: 1.08rem;
    color: var(--ink-900);
    margin-bottom: 0.5rem;
}

.scenario-card p { font-size: 0.95rem; color: var(--ink-700); }

.scenario-example {
    margin-top: 0.8rem;
    padding: 0.8rem 0.9rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-size: 0.92rem;
}
.scenario-example .ex-label {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-ink);
    margin-bottom: 0.25rem;
}

/* couleurs sémantiques par position */
.scenario-card:nth-child(3n+1) { border-top-color: var(--green-200); }
.scenario-card:nth-child(3n+2) { border-top-color: var(--amber-200); }
.scenario-card:nth-child(3n+3) { border-top-color: var(--red-200); }

.result-footer {
    margin-top: 1.6rem;
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

/* ----------------------------------------------------------
   Flash messages
   ---------------------------------------------------------- */
.flash-messages { margin-bottom: 1.4rem; display: flex; flex-direction: column; gap: 0.6rem; }

.flash {
    padding: 0.85rem 1.1rem;
    border-radius: var(--r-md);
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.flash-error { background: var(--red-50); color: var(--red-700); border-color: var(--red-200); }
.flash-success { background: var(--green-50); color: var(--green-700); border-color: var(--green-200); }
.flash-info { background: var(--blue-50); color: var(--accent-ink); border-color: var(--blue-100); }

/* ----------------------------------------------------------
   Footer
   ---------------------------------------------------------- */
.site-footer {
    border-top: 1px solid var(--line);
    background: var(--white);
    padding: 1.8rem 1.5rem;
}
.footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.site-footer .brand-name { font-size: 1.05rem; color: var(--ink-900); }
.site-footer p { color: var(--ink-400); font-size: 0.9rem; }

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 880px) {
    .hero { grid-template-columns: 1fr; gap: 2rem; }
    .hero-visual { order: -1; }
    .result-grid { grid-template-columns: 1fr; }
    /* Sur mobile, on masque la vitrine et on centre le formulaire */
    .auth-shell { grid-template-columns: 1fr; min-height: 0; max-width: 460px; }
    .auth-aside { display: none; }
}

@media (max-width: 560px) {
    .header-inner { padding: 0.8rem 1rem; }
    .main-nav a { padding: 0.5rem 0.6rem; font-size: 0.9rem; }
    .site-main { padding: 1.8rem 1rem 3rem; }
    .auth-card, .panel { padding: 1.6rem 1.3rem; }
    .footer-inner { flex-direction: column; text-align: center; }
    .form-duo { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------
   Impression / export client (fiche produit)
   ---------------------------------------------------------- */
@media print {
    .site-header, .site-footer, .tab-nav, .result-footer,
    .no-print, .icon-button, .compare-bar,
    .search-bar, .filter-bar, .card-controls, .card-footer {
        display: none !important;
    }
    /* Tous les onglets sont normalement masqués sauf celui actif : à
       l'impression, on les affiche tous à la suite pour obtenir un rapport
       complet en un seul document. */
    .tab-panel[hidden] {
        display: block !important;
    }
    .tab-panel {
        margin-bottom: 1.8rem;
        page-break-inside: avoid;
    }
    .tab-panel::before {
        content: attr(data-print-title);
        display: block;
        font-family: 'Public Sans', sans-serif;
        font-weight: 800;
        font-size: 1.15rem;
        color: var(--ink-900);
        border-bottom: 2px solid var(--ink-900);
        padding-bottom: 0.4rem;
        margin-bottom: 1rem;
    }
    body { background: var(--white); }
    .result-header, .result-block, .scenario-card, .chart-card {
        box-shadow: none;
        border: 1px solid var(--line);
        page-break-inside: avoid;
    }
    .product-card, a[href]::after { box-shadow: none; }
}

/* ----------------------------------------------------------
   Vue imprimable / présentation client
   Document autonome et linéaire (pas d'onglets, pas de barre collante) :
   chaque section est courte et peut demander à ne pas être coupée sans
   jamais forcer un bloc entier trop grand sur une page, ce qui évitait les
   pages blanches de l'ancien rendu à onglets imprimé tel quel.
   ---------------------------------------------------------- */
.pres-body {
    background: var(--bg);
    min-height: 100vh;
}
.pres-toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

/* Sélecteur de niveau du client (débutant / confirmé) : bascule l'affichage
   entre deux formulations, l'une en langage très simple, l'autre plus
   précise/technique, sans dupliquer les données (mêmes chiffres, mêmes
   textes générés, seuls les titres et quelques explications changent). */
.pres-mode-switch {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}
.pres-mode-btn {
    appearance: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-500);
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}
.pres-mode-btn:hover { color: var(--ink-900); transform: none; }
.pres-mode-btn.active {
    background: var(--blue-600);
    color: var(--white);
    box-shadow: none;
}
body:not(.pres-confirme) .only-confirme { display: none; }
body.pres-confirme .only-debutant { display: none; }
.pres-doc {
    max-width: 760px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}
.pres-header {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    margin-bottom: 1.6rem;
}
.pres-title { font-size: 1.7rem; margin: 0.3rem 0 0.3rem; }
.pres-sub { color: var(--ink-500); font-size: 0.95rem; }
.pres-sub strong { color: var(--ink-900); }

.pres-section {
    margin-bottom: 1.8rem;
}
.pres-section h2 {
    font-size: 1.15rem;
    margin-bottom: 0.7rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--blue-600);
    display: inline-block;
}
.pres-synthese {
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    border-radius: var(--r-lg);
    padding: 1.3rem 1.5rem;
}
.pres-kicker {
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-ink);
    margin-bottom: 0.4rem;
}
.pres-synthese p { font-size: 1.08rem; color: var(--ink-900); margin: 0; }

.pres-lexique {
    background: var(--bg);
    border: 1px dashed var(--line);
    border-radius: var(--r-lg);
    padding: 1.2rem 1.4rem;
}
.pres-lexique h2 { border-bottom: none; padding-bottom: 0; }

.pres-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.7rem;
}
.pres-points li {
    padding-left: 1rem;
    border-left: 3px solid var(--blue-200);
    line-height: 1.55;
}
.pres-points strong { color: var(--ink-900); }

.pres-note {
    font-size: 0.9rem;
    color: var(--ink-500);
    margin-top: 0.7rem;
    font-style: italic;
}
.pres-note-alerte {
    color: var(--amber-700);
    font-style: normal;
    padding: 0.6rem 0.85rem;
    background: var(--amber-50);
    border-left: 3px solid var(--amber-500, #DB8500);
    border-radius: 0 var(--r-md, 6px) var(--r-md, 6px) 0;
}

.pres-scenarios {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.pres-scenario {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 1rem 1.1rem;
    background: var(--white);
}
.pres-scenario-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.pres-scenario p { font-size: 0.92rem; margin-bottom: 0.5rem; }
.pres-example {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: 0 !important;
}

.pres-footer {
    margin-top: 2.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
    color: var(--ink-400);
    font-size: 0.82rem;
    line-height: 1.5;
}
.pres-brand {
    margin-top: 0.6rem;
    font-weight: 800;
    color: var(--ink-500);
    letter-spacing: 0.02em;
}
/* Cartouche cabinet en pied de présentation (coordonnées + mentions CGP) */
.pres-cabinet {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}
.pres-cabinet p { margin: 0; }
.pcab-nom { font-weight: 700; color: var(--ink-700); font-size: 0.9rem; }
.pcab-coord { color: var(--ink-500); margin-top: 0.2rem !important; }
.pcab-mentions { color: var(--ink-400); margin-top: 0.2rem !important; font-size: 0.78rem; }

@media (max-width: 640px) {
    .pres-scenarios { grid-template-columns: 1fr; }
    .pres-header { flex-direction: column; }
}

/* --- Personnalisation client (présentation / PDF) --- */
.pres-perso {
    max-width: 760px;
    margin: 1rem auto 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.2rem 1.4rem;
    box-shadow: var(--shadow-sm);
}
.pp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem 1rem; }
.pp-grid label {
    display: flex; flex-direction: column; gap: 0.3rem;
    font-size: 0.8rem; font-weight: 600; color: var(--ink-700);
}
.pp-grid .pp-full { grid-column: 1 / -1; }
.pp-grid input, .pp-grid textarea {
    font-family: inherit; font-size: 0.95rem; padding: 0.5rem 0.6rem;
    border: 1px solid var(--line); border-radius: var(--r-sm);
    color: var(--ink-900); background: var(--white); resize: vertical;
}
.pp-grid input:focus, .pp-grid textarea:focus {
    outline: none; border-color: var(--blue-400); box-shadow: 0 0 0 3px var(--blue-50);
}
.pp-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.pp-hint { font-size: 0.8rem; color: var(--ink-500); flex: 1; min-width: 12rem; }
.pp-logo-field { display: flex; flex-direction: column; gap: 0.3rem; }
.pp-logo-label { font-size: 0.8rem; font-weight: 600; color: var(--ink-700); }
.pp-logo-row { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.pp-logo-preview { max-height: 40px; max-width: 130px; border: 1px solid var(--line); border-radius: 4px; padding: 2px; background: #fff; }
.pp-logo-clear { padding: 0.3rem 0.7rem; font-size: 0.85rem; }
.pc-logo { max-height: 52px; max-width: 190px; margin-bottom: 0.5rem; display: block; }

/* Page de garde personnalisée : masquée tant qu'aucune info n'est saisie */
.perso-cover {
    display: none;
    margin-bottom: 1.8rem;
    padding-bottom: 1.3rem;
    border-bottom: 2px solid var(--blue-700);
}
body.has-perso .perso-cover,
body.has-cabinet .perso-cover { display: block; }
/* Masquer les lignes de TEXTE vides (covFor/covDate/greeting/message) sans
   toucher au logo : une <img> est toujours :empty (aucun enfant). */
.perso-cover span:empty, .perso-cover p:empty, .perso-cover div:empty { display: none; }
.pc-cabinet { font-size: 1.35rem; font-weight: 800; color: var(--accent-ink); letter-spacing: -0.01em; }
.pc-meta {
    display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap;
    gap: 0.5rem; margin-top: 0.4rem; font-size: 0.85rem; color: var(--ink-500);
}
.pc-for { font-size: 1.02rem; font-weight: 600; color: var(--ink-900); }
.pc-greeting { font-weight: 600; color: var(--ink-900); margin-top: 1.1rem; }
.pc-message { color: var(--ink-700); white-space: pre-wrap; margin-top: 0.35rem; line-height: 1.55; }

@media print {
    @page { margin: 1.5cm 1.6cm; }
    .pres-body { background: #fff; }
    .no-print, .pres-toolbar { display: none !important; }
    /* Forcer l'impression des fonds/couleurs (bandeaux, filets, graphes) */
    .pres-doc, .pres-doc * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .pres-doc { max-width: none; padding: 0; font-size: 10.5pt; color: #1c2733; line-height: 1.5; }

    /* Titres en SERIF : registre « document », distinct de la plateforme */
    .pres-title, .pres-section h2, .pc-cabinet, .pres-brand {
        font-family: Georgia, 'Times New Roman', serif;
    }

    /* En-tête cabinet (page de garde personnalisée) */
    .perso-cover {
        break-inside: avoid;
        margin-bottom: 1.4rem;
        padding: 0 0 0.9rem;
        border-bottom: 3px solid var(--blue-700);
    }
    .pc-logo { max-height: 62px !important; max-width: 220px; margin-bottom: 0.55rem; }
    .pc-cabinet { font-size: 20pt; color: var(--blue-800); }
    .pc-meta { font-size: 8pt; letter-spacing: 0.05em; text-transform: uppercase; color: #7a8794; align-items: baseline; }
    .pc-for { font-size: 12pt; font-weight: 700; color: #14202c; text-transform: none; letter-spacing: 0; }
    /* Le texte type email n'a pas sa place sur le PDF (c'est le corps du mail,
       pas du document) : on ne garde que le bandeau cabinet + « préparé pour ». */
    .pc-greeting, .pc-message { display: none !important; }

    /* Bloc titre produit */
    .pres-header {
        break-inside: avoid;
        gap: 1rem;
        padding-bottom: 0.9rem;
        margin-bottom: 1.4rem;
        border-bottom: 1px solid var(--line);
    }
    .result-type {
        font-size: 8pt; letter-spacing: 0.09em; text-transform: uppercase;
        color: var(--accent-ink); font-weight: 700;
    }
    .pres-title { font-size: 22pt; line-height: 1.12; margin: 0.15rem 0 0.35rem; color: #14202c; }
    .pres-sub { font-size: 9.5pt; }

    /* Sections : titre serif à filet latéral, sans cartes ni ombres */
    .pres-section { margin-bottom: 1.15rem; break-inside: avoid; }
    .pres-section h2 {
        font-size: 13pt; font-weight: 700; color: #14202c;
        display: block; margin-bottom: 0.5rem;
        border-bottom: none; padding: 0 0 0 0.55rem;
        border-left: 3px solid var(--blue-600);
    }
    .pres-kicker { color: var(--accent-ink); font-size: 8pt; letter-spacing: 0.08em; }

    .pres-synthese {
        background: var(--blue-50);
        border: none; border-left: 3px solid var(--blue-600); border-radius: 0;
        padding: 0.8rem 1rem;
    }
    .pres-synthese p { font-size: 11pt; }
    .pres-lexique {
        background: #fff; border: none; border-radius: 0;
        border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
        padding: 0.8rem 0;
    }
    .pres-points li { border-left-color: var(--blue-300); }

    .pres-section, .pres-avoid, .pres-scenario, .chart-card {
        page-break-inside: avoid; break-inside: avoid;
    }
    .chart-card, .pres-scenario, .pres-synthese { box-shadow: none !important; }
    .chart-card { border: 1px solid var(--line); border-radius: 6px; }

    .pres-footer {
        margin-top: 1.5rem; padding-top: 0.7rem; border-top: 1px solid var(--line);
        font-size: 8pt; color: #8a95a1;
    }
    .pres-brand { font-weight: 700; color: var(--accent-ink); }

    a { color: inherit; text-decoration: none; }
}

/* --- Overlay de chargement pendant l'analyse d'un KID ---------------------- */
.analyse-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(248, 250, 252, 0.86);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: fade-in 0.2s ease;
}

.analyse-box {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid var(--blue-100);
    border-radius: 18px;
    box-shadow: 0 24px 60px -20px rgba(18, 44, 72, 0.35);
    padding: 2.4rem 2rem;
    text-align: center;
}

.analyse-spinner {
    width: 52px;
    height: 52px;
    margin: 0 auto 1.4rem;
    border-radius: 50%;
    border: 4px solid var(--blue-100);
    border-top-color: var(--accent-ink);
    animation: analyse-spin 0.85s linear infinite;
}

@keyframes analyse-spin {
    to { transform: rotate(360deg); }
}

.analyse-box h3 {
    margin: 0 0 0.5rem;
    color: var(--ink-900);
    font-size: 1.2rem;
}

.analyse-file {
    display: inline-block;
    max-width: 100%;
    margin-bottom: 1.1rem;
    padding: 0.2rem 0.7rem;
    background: var(--blue-50);
    color: var(--accent-ink);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analyse-step {
    min-height: 1.4em;
    color: var(--ink-500);
    font-size: 0.95rem;
    transition: opacity 0.3s ease;
}

.analyse-progress {
    position: relative;
    height: 6px;
    margin-top: 1.4rem;
    background: var(--blue-50);
    border-radius: 999px;
    overflow: hidden;
}

.analyse-progress-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--blue-500), var(--accent-ink));
    background-size: 200% 100%;
    transition: width 0.9s ease-out;
    animation: analyse-shimmer 2.2s linear infinite;
}

@keyframes analyse-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.analyse-timer {
    margin: 0.7rem 0 0;
    color: var(--accent-ink);
    font-size: 0.82rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.analyse-note {
    margin: 0.6rem 0 0;
    color: var(--ink-400);
    font-size: 0.82rem;
}

/* --- Bandeau interne « à vérifier » sur une fiche --------------------------- */
.verif-banner {
    margin: 0 0 1.4rem;
    padding: 0.9rem 1.1rem;
    background: #FFF8EB;
    border: 1px solid #F5D98B;
    border-left: 4px solid #E0A93B;
    border-radius: 12px;
}

.verif-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    color: #8A5A0B;
}

.verif-icon { font-size: 1rem; }

.verif-tag {
    margin-left: auto;
    padding: 0.1rem 0.55rem;
    background: #F5D98B;
    color: #6B450A;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.verif-list {
    margin: 0.6rem 0 0;
    padding-left: 1.4rem;
    color: #6B450A;
    font-size: 0.9rem;
}

.verif-list li { margin: 0.15rem 0; }

/* ============================================================
   Page de garde (landing) — index.html
   Registre sobre, éditorial
   ============================================================ */

/* ============================================================
   Landing (page de garde)
   ============================================================ */
.lp-kicker {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--accent-ink);
    margin: 0;
}

/* --- Hero --- */
.lp-hero {
    position: relative;
    margin-top: -2.5rem;              /* remonte sous la nav, fond pleine hauteur */
    padding: 4.75rem 0 5.25rem;
}
.lp-hero-bg {
    position: absolute;
    inset: 0;
    width: 100vw;
    left: calc(50% - 50vw);
    z-index: 0;
    background:
        radial-gradient(78% 62% at 88% -18%, rgba(53, 105, 156, 0.13), transparent 58%),
        radial-gradient(52% 60% at -8% 118%, rgba(53, 105, 156, 0.07), transparent 60%),
        linear-gradient(180deg, #FCFDFE 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--line);
}
.lp-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 4rem;
}

.lp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-ink);
    background: var(--white);
    border: 1px solid var(--blue-100);
    padding: 0.4rem 0.85rem 0.4rem 0.65rem;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}
.lp-eyebrow i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--blue-500);
    box-shadow: 0 0 0 3px var(--blue-100);
}

.lp-hero-text h1 {
    font-size: clamp(2.2rem, 4.3vw, 3.35rem);
    line-height: 1.06;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--ink-900);
    margin-bottom: 1.4rem;
}

.lp-lead {
    font-size: 1.12rem;
    line-height: 1.65;
    color: var(--ink-700);
    max-width: 33rem;
    margin-bottom: 2.2rem;
}

.lp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1.35rem;
    align-items: center;
}
.lp-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--accent-ink);
}
.lp-link:hover { color: var(--accent-ink); }

.lp-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1.6rem;
    list-style: none;
    margin-top: 2.3rem;
}
.lp-trust li {
    position: relative;
    padding-left: 1.35rem;
    font-size: 0.87rem;
    font-weight: 500;
    color: var(--ink-500);
}
.lp-trust li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.28em;
    width: 6px;
    height: 10px;
    border: solid var(--blue-500);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* --- Carte produit du hero --- */
.lp-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem 1.55rem;
}
.lp-card-head {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding-bottom: 0.95rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 0.95rem;
}
.lp-card-title { font-weight: 700; color: var(--ink-900); font-size: 0.95rem; }
.lp-card-sub { font-size: 0.8rem; color: var(--ink-400); margin-top: 0.12rem; font-variant-numeric: tabular-nums; }
.lp-card-badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--green-700);
    background: var(--green-50);
    border: 1px solid var(--green-200);
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
}
.lp-card-badge::before {
    content: "";
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--green-700);
}

.lp-card-tabs {
    display: flex;
    gap: 1.15rem;
    padding-bottom: 0.9rem;
    margin-bottom: 1.05rem;
    border-bottom: 1px solid var(--line);
}
.lp-card-tabs span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink-400);
    padding-bottom: 0.2rem;
}
.lp-card-tabs .is-active {
    color: var(--ink-900);
    box-shadow: inset 0 -2px 0 var(--blue-500);
}

.lp-card-chart { margin-bottom: 1.05rem; }
.lp-card-chart svg { width: 100%; height: 96px; display: block; }
.lp-chart-area {
    fill: var(--blue-500);
    opacity: 0.09;
    animation: lp-area-in 1s ease 0.85s both;
}
.lp-chart-line {
    fill: none;
    stroke: var(--blue-500);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: lp-draw 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.25s forwards;
}
.lp-chart-rappel {
    stroke: var(--ink-400);
    stroke-width: 1;
    stroke-dasharray: 3 3;
}
.lp-chart-protection {
    stroke: var(--amber-700);
    stroke-width: 1;
    stroke-dasharray: 3 3;
    opacity: 0.75;
}
.lp-chart-dot { fill: var(--blue-600); opacity: 0; animation: lp-dot-in 0.4s ease 1.5s forwards; }
.lp-chart-ping { fill: var(--blue-500); opacity: 0; animation: lp-ping 2.6s ease-out 1.9s infinite; }
.lp-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.95rem;
    margin-top: 0.65rem;
    font-size: 0.72rem;
    color: var(--ink-500);
}
.lp-chart-legend i {
    display: inline-block;
    width: 14px;
    border-top: 2px solid;
    vertical-align: middle;
    margin-right: 0.35rem;
}
.lp-chart-legend .dot-line { border-color: var(--accent-ink); }
.lp-chart-legend .dot-rappel { border-top-style: dashed; border-color: var(--ink-400); }
.lp-chart-legend .dot-protect { border-top-style: dashed; border-color: var(--amber-700); }

.lp-card-row {
    display: flex;
    justify-content: space-between;
    padding: 0.44rem 0;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--line);
}
.lp-card-row:last-child { border-bottom: none; }
.lp-card-row span { color: var(--ink-500); }
.lp-card-row b { color: var(--ink-900); font-weight: 600; font-variant-numeric: tabular-nums; }

/* --- Sections génériques --- */
.lp-section { padding: 4.75rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: 84px; }
.lp-section-head { max-width: 42rem; margin-bottom: 2.7rem; }
.lp-section-head.lp-subhead { margin-top: 3.75rem; }
.lp-section-head h2,
.lp-split-text h2 {
    font-size: clamp(1.55rem, 2.7vw, 2.05rem);
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: var(--ink-900);
    margin-top: 0.7rem;
}

/* --- Ce que contient une analyse --- */
.lp-contents-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.35rem;
}
.lp-item {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.65rem 1.55rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.lp-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--blue-200);
}
.lp-item-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    color: var(--accent-ink);
    background: var(--blue-50);
    margin-bottom: 1.05rem;
}
.lp-item-icon svg { width: 22px; height: 22px; }
.lp-item h3 { font-size: 1.02rem; font-weight: 700; color: var(--ink-900); margin-bottom: 0.4rem; }
.lp-item p { color: var(--ink-500); font-size: 0.92rem; line-height: 1.6; }

/* --- Familles couvertes --- */
.lp-section-sub { color: var(--ink-500); font-size: 1rem; line-height: 1.6; margin-top: 0.7rem; }
.lp-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.lp-chips span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-ink);
    background: var(--white);
    border: 1px solid var(--blue-100);
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.lp-chips span:hover { transform: translateY(-2px); border-color: var(--blue-300); background: var(--blue-50); }

/* --- Tarifs --- */
.lp-price-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    max-width: 780px;
    margin: 0 auto;
    align-items: stretch;
}
.lp-price-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-sm);
    padding: 2rem 1.9rem;
}
.lp-price-card.featured {
    border: 1.5px solid var(--blue-500);
    box-shadow: 0 18px 44px -22px rgba(37, 99, 235, 0.5);
}
.lp-price-flag {
    position: absolute;
    top: 0; right: 1.7rem;
    transform: translateY(-50%);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    background: var(--blue-600);
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}
.lp-price-name { font-size: 1.2rem; font-weight: 800; color: var(--ink-900); letter-spacing: -0.01em; }
.lp-price-tag { font-size: 0.88rem; color: var(--ink-500); margin: 0.3rem 0 0; line-height: 1.4; min-height: 2.5em; }
.lp-price-amount {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin: 1.2rem 0 0.2rem;
    padding-bottom: 1.3rem;
    border-bottom: 1px solid var(--line);
}
.lp-price-num { font-size: 2.5rem; font-weight: 800; color: var(--ink-900); letter-spacing: -0.03em; }
.lp-price-per { font-size: 0.95rem; color: var(--ink-500); font-weight: 500; }
.lp-price-feats {
    list-style: none;
    margin: 1.3rem 0 1.7rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    flex: 1;
}
.lp-price-feats li {
    position: relative;
    padding-left: 1.7rem;
    font-size: 0.93rem;
    color: var(--ink-700);
    line-height: 1.45;
}
.lp-price-feats li b { color: var(--ink-900); font-weight: 700; }
.lp-price-feats li::before {
    content: "";
    position: absolute;
    left: 0; top: 0.15em;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--blue-50);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 13l4 4L19 7' stroke='%232563EB' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}
.lp-price-btn { width: 100%; text-align: center; }
.lp-price-btn.ghost {
    background: var(--white);
    color: var(--accent-ink);
    border: 1px solid var(--blue-200);
}
.lp-price-btn.ghost:hover { background: var(--blue-50); }
.lp-price-foot { text-align: center; margin-top: 1.6rem; font-size: 0.9rem; color: var(--ink-500); }
.lp-price-foot a { color: var(--accent-ink); font-weight: 600; }

/* --- Aperçu produit (capture dans un cadre navigateur) --- */
.lp-center { margin-left: auto; margin-right: auto; text-align: center; }
.lp-browser {
    max-width: 980px;
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-lg);
}
.lp-browser-bar {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.6rem 0.95rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}
.lp-browser-dots { display: flex; gap: 5px; }
.lp-browser-dots i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--line);
}
.lp-browser-url {
    flex: 1;
    max-width: 300px;
    margin: 0 auto;
    text-align: center;
    font-size: 0.74rem;
    color: var(--ink-500);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.18rem 0.9rem;
}
.lp-browser img { display: block; width: 100%; height: auto; }

/* --- Bande de chiffres --- */
.lp-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 980px;
    margin: 2.4rem auto 0;
}
.lp-stat {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.05rem 1.2rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}
.lp-stat b {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--accent-ink);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.lp-stat span { font-size: 0.82rem; color: var(--ink-500); line-height: 1.35; }

/* --- FAQ --- */
.lp-faq-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3rem;
    align-items: start;
}
.lp-faq-grid .lp-section-head { margin-bottom: 0; }
.lp-faq-list { display: grid; gap: 0.75rem; }
.lp-faq-list details {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 0 1.25rem;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.lp-faq-list details[open] { border-color: var(--blue-200); box-shadow: var(--shadow-sm); }
.lp-faq-list summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.05rem 0;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    font-size: 0.97rem;
    color: var(--ink-900);
}
.lp-faq-list summary::-webkit-details-marker { display: none; }
.lp-faq-plus {
    position: relative;
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--blue-50);
}
.lp-faq-plus::before,
.lp-faq-plus::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 2px;
    border-radius: 2px;
    background: var(--blue-600);
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease;
}
.lp-faq-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.lp-faq-list details[open] .lp-faq-plus::after { transform: translate(-50%, -50%) rotate(0deg); }
.lp-faq-list details p {
    padding: 0 0 1.15rem;
    color: var(--ink-500);
    font-size: 0.93rem;
    line-height: 1.65;
    max-width: 40rem;
}

/* --- Bandeau double lecture --- */
.lp-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
}
.lp-split-text p { color: var(--ink-500); font-size: 1rem; line-height: 1.65; margin-top: 0.85rem; }
.lp-split-visual { display: grid; gap: 1rem; }
.lp-mini {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.25rem 1.35rem;
    box-shadow: var(--shadow-sm);
}
.lp-mini-client { margin-right: 2.4rem; }
.lp-mini-pro { margin-left: 2.4rem; margin-top: -0.3rem; }
.lp-mini-tag {
    display: inline-block;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--accent-ink);
    background: var(--blue-50);
    border-radius: 999px;
    padding: 0.22rem 0.65rem;
    margin-bottom: 0.8rem;
}
.lp-mini-tag.alt { color: var(--ink-700); background: var(--bg); border: 1px solid var(--line); }
.lp-mini-lead { font-size: 1rem; font-weight: 600; color: var(--ink-900); line-height: 1.5; }
.lp-mini-bar {
    margin-top: 1rem;
    height: 8px;
    border-radius: 999px;
    background: var(--blue-50);
    overflow: hidden;
}
.lp-mini-bar i {
    display: block;
    height: 100%;
    width: 78%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--blue-400), var(--blue-600));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.05s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s;
}
.lp-mini-client.is-in .lp-mini-bar i { transform: scaleX(1); }
.lp-mini-pro ul { list-style: none; display: grid; gap: 0.55rem; }
.lp-mini-pro li {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--line);
}
.lp-mini-pro li:last-child { border-bottom: none; padding-bottom: 0; }
.lp-mini-pro li span { color: var(--ink-500); }
.lp-mini-pro li b { color: var(--ink-900); font-variant-numeric: tabular-nums; }

/* --- Méthode (frise reliée) --- */
.lp-flow {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 0.5rem;
}
.lp-flow::before {
    content: "";
    position: absolute;
    top: 21px;
    left: 16.66%;
    right: 16.66%;
    border-top: 1px dashed var(--blue-200);
    z-index: 0;
}
.lp-flow-step { position: relative; z-index: 1; text-align: center; padding: 0 0.5rem; }
.lp-flow-dot {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0 auto 1.05rem;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1rem;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
    box-shadow: 0 0 0 6px var(--bg), var(--shadow-sm);
}
.lp-flow-step h3 { font-size: 1.02rem; margin-bottom: 0.35rem; }
.lp-flow-step p { color: var(--ink-500); font-size: 0.92rem; line-height: 1.55; }

/* --- Note devoir de conseil --- */
.lp-note {
    display: flex;
    gap: 1.15rem;
    align-items: flex-start;
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    border-radius: var(--r-lg);
    padding: 1.6rem 1.8rem;
    max-width: 48rem;
}
.lp-note-mark {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--accent-ink);
    background: var(--white);
    border: 1px solid var(--blue-100);
}
.lp-note-body .lp-kicker { color: var(--accent-ink); margin-bottom: 0.55rem; }
.lp-note-body p { color: var(--ink-700); font-size: 0.95rem; line-height: 1.65; }
.lp-note-body strong { color: var(--ink-900); font-weight: 700; }

/* --- Clôture (bandeau pleine largeur) --- */
.lp-cta {
    position: relative;
    width: 100vw;
    left: calc(50% - 50vw);
    margin: 5rem 0 -4rem;             /* -4rem : absorbe le padding bas de .site-main */
    padding: 5rem 1.5rem;
    background: linear-gradient(135deg, var(--blue-800) 0%, var(--blue-600) 100%);
    text-align: center;
    overflow: hidden;
}
.lp-cta::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(60% 120% at 50% -20%, rgba(255, 255, 255, 0.14), transparent 60%);
    pointer-events: none;
}
.lp-cta-inner { position: relative; z-index: 1; max-width: 42rem; margin: 0 auto; }
.lp-cta h2 {
    color: var(--white);
    font-size: clamp(1.65rem, 2.9vw, 2.15rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
}
.lp-cta p { color: rgba(255, 255, 255, 0.8); margin: 0.65rem 0 1.9rem; }
.lp-cta .lp-actions { justify-content: center; }
.lp-cta-btn {
    background: var(--white);
    color: var(--accent-ink);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.lp-cta-btn:hover { background: rgba(255, 255, 255, 0.92); color: var(--blue-800); }
.lp-link-light { color: rgba(255, 255, 255, 0.88); }
.lp-link-light:hover { color: var(--white); }

/* --- Responsive --- */
@media (max-width: 900px) {
    .lp-hero { margin-top: -1.8rem; padding: 3rem 0 3.5rem; }
    .lp-hero-inner { grid-template-columns: 1fr; gap: 2.6rem; }
    .lp-hero-visual { order: -1; }
    .lp-card { max-width: 460px; }
    .lp-contents-grid { grid-template-columns: repeat(2, 1fr); }
    .lp-split { grid-template-columns: 1fr; gap: 2rem; }
    .lp-mini-client, .lp-mini-pro { margin: 0; }
    .lp-flow { grid-template-columns: 1fr; gap: 1.8rem; }
    .lp-flow::before { display: none; }
    .lp-flow-step { text-align: left; display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; }
    .lp-flow-dot { margin: 0; box-shadow: none; }
    .lp-flow-step h3, .lp-flow-step p { grid-column: 2; }
    .lp-cta { margin-bottom: -4rem; }
    .lp-stats { grid-template-columns: repeat(2, 1fr); }
    .lp-faq-grid { grid-template-columns: 1fr; gap: 1.6rem; }
    .lp-price-grid { grid-template-columns: 1fr; max-width: 420px; }
}
@media (max-width: 560px) {
    .lp-contents-grid { grid-template-columns: 1fr; }
    .lp-actions .button { flex: 1; text-align: center; }
    .lp-section { padding: 3.25rem 0; }
    .lp-stats { grid-template-columns: 1fr; }
    .lp-price-tag { min-height: 0; }
}

/* ============================================================
   Landing — animations (discrètes, esprit outil finance)
   ============================================================ */
@keyframes lp-draw    { to { stroke-dashoffset: 0; } }
@keyframes lp-area-in { from { opacity: 0; } to { opacity: 0.09; } }
@keyframes lp-dot-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes lp-ping    { 0% { opacity: 0.4; r: 3.5; } 70%, 100% { opacity: 0; r: 12; } }
@keyframes lp-up      { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes lp-drift   { from { transform: translate(0, 0) scale(1); } to { transform: translate(-5%, 6%) scale(1.12); } }

/* Halo mouvant très lent dans le fond du hero */
.lp-hero-bg::before {
    content: "";
    position: absolute;
    top: -25%;
    right: -8%;
    width: 46vw;
    height: 130%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(53, 105, 156, 0.13), transparent 62%);
    animation: lp-drift 16s ease-in-out infinite alternate;
    pointer-events: none;
}

/* Entrée en fondu du hero au chargement */
.lp-hero-text > *,
.lp-hero-visual { opacity: 0; animation: lp-up 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.lp-hero-text .lp-eyebrow { animation-delay: 0.05s; }
.lp-hero-text h1          { animation-delay: 0.12s; }
.lp-hero-text .lp-lead    { animation-delay: 0.20s; }
.lp-hero-text .lp-actions { animation-delay: 0.28s; }
.lp-hero-text .lp-trust   { animation-delay: 0.36s; }
.lp-hero-visual           { animation-delay: 0.30s; animation-duration: 0.85s; }

/* Révélation au défilement */
.lp-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.lp-reveal.is-in { opacity: 1; transform: none; }
.lp-contents-grid .lp-item:nth-child(3n+2) { transition-delay: 0.07s; }
.lp-contents-grid .lp-item:nth-child(3n)   { transition-delay: 0.14s; }
.lp-flow .lp-flow-step:nth-child(2) { transition-delay: 0.1s; }
.lp-flow .lp-flow-step:nth-child(3) { transition-delay: 0.2s; }
.lp-mini-pro { transition-delay: 0.12s; }

@media (prefers-reduced-motion: reduce) {
    .lp-hero-text > *,
    .lp-hero-visual,
    .lp-chart-line,
    .lp-chart-dot,
    .lp-chart-ping,
    .lp-hero-bg::before { animation: none !important; opacity: 1 !important; }
    .lp-chart-area { animation: none !important; opacity: 0.09 !important; }
    .lp-chart-ping { display: none; }
    .lp-chart-line { stroke-dashoffset: 0 !important; }
    .lp-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
    .lp-mini-bar i { transform: scaleX(1) !important; transition: none !important; }
}

/* ============================================================
   Micro-interactions (dashboard & fiche d'analyse)
   Rapides et discrètes : c'est un outil de travail quotidien.
   ============================================================ */
@keyframes card-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}
@keyframes panel-pop {
    from { opacity: 0; transform: translateY(-5px) scale(0.985); }
    to   { opacity: 1; transform: none; }
}
@keyframes bar-up {
    from { opacity: 0; transform: translate(-50%, 14px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes gauge-grow { from { width: 0; } }
@keyframes series-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes seg-pop {
    0%   { transform: scale(1); }
    55%  { transform: scale(1.14); }
    100% { transform: scale(1); }
}

/* Dashboard / favoris : entrée en cascade des cartes (au chargement seulement,
   la classe cards-enter est retirée ensuite côté dashboard). */
.cards-enter .product-card { animation: card-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.cards-enter .product-card:nth-child(2) { animation-delay: 0.05s; }
.cards-enter .product-card:nth-child(3) { animation-delay: 0.10s; }
.cards-enter .product-card:nth-child(4) { animation-delay: 0.15s; }
.cards-enter .product-card:nth-child(5) { animation-delay: 0.20s; }
.cards-enter .product-card:nth-child(6) { animation-delay: 0.24s; }
.cards-enter .product-card:nth-child(7) { animation-delay: 0.28s; }
.cards-enter .product-card:nth-child(n+8) { animation-delay: 0.32s; }

/* « Voir → » : petite avancée au survol de la carte */
.card-view { transition: transform 0.16s ease; }
.product-card:hover .card-view { transform: translateX(3px); }

/* Menus de filtres : ouverture en douceur */
.ms.open .ms-panel { animation: panel-pop 0.16s ease; transform-origin: top left; }

/* Barre de comparaison : glisse depuis le bas quand elle apparaît */
.compare-bar:not([hidden]) { animation: bar-up 0.28s cubic-bezier(0.2, 0.7, 0.2, 1); }

/* Fiche : jauges qui se remplissent à l'ouverture de l'onglet */
.gauge-fill { animation: gauge-grow 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both; }

/* Fiche : les courbes de scénarios se tracent (pathLength="1" posé au template) */
.series-line.anim {
    /* Simple fondu à l'apparition — PAS d'animation de tracé (stroke-dashoffset).
       L'onglet Scénarios est masqué (display:none) au chargement : une animation
       de tracé peut y geler à mi-parcours selon le navigateur (Safari notamment)
       et laisser la courbe tronquée. Un fondu d'opacité ne touche jamais à la
       géométrie : au repos la courbe est toujours entièrement tracée. */
    animation: series-fade 0.6s ease 0.15s backwards;
}
.series-line.anim:nth-of-type(2) { animation-delay: 0.3s; }
.series-line.anim:nth-of-type(3) { animation-delay: 0.45s; }

/* Fiche : le segment actif de l'échelle de risque « pope » à l'affichage */
.sri-seg.active { animation: seg-pop 0.45s ease 0.25s backwards; }

/* Fiche : cartes de scénario réactives au survol */
.scenario-card { transition: transform 0.16s ease, box-shadow 0.2s ease; }
.scenario-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* Impression / PDF : tout doit être à l'état final, sans mouvement */
@media print {
    .cards-enter .product-card,
    .gauge-fill,
    .sri-seg.active { animation: none !important; }
    .series-line.anim { animation: none !important; stroke-dasharray: none; stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .cards-enter .product-card,
    .ms.open .ms-panel,
    .compare-bar:not([hidden]),
    .gauge-fill,
    .sri-seg.active { animation: none !important; }
    .series-line.anim { animation: none !important; stroke-dasharray: none; stroke-dashoffset: 0; }
    .product-card:hover .card-view,
    .scenario-card:hover { transform: none; }
}

/* =========================================================================
   MENU COMPTE (en-tête) + ESPACE PROFIL
   ========================================================================= */

/* --- Menu compte dans l'en-tête (avatar + pop-up) --- */
.account-menu { position: relative; display: inline-flex; }
.account-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: 1px solid var(--line); border-radius: 999px;
    padding: 4px 8px 4px 4px; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.account-btn:hover { border-color: var(--blue-300); box-shadow: var(--shadow-sm); }
.account-chevron { color: var(--ink-500); transition: transform .15s; }
.account-btn[aria-expanded="true"] .account-chevron { transform: rotate(180deg); }
.account-avatar {
    display: inline-grid; place-items: center; flex: none;
    width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
    color: #fff; font-weight: 700; font-size: 0.72rem; letter-spacing: .02em;
}
.account-avatar.lg { width: 42px; height: 42px; font-size: 0.95rem; }
.account-pop {
    position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
    width: 264px; background: var(--white); border: 1px solid var(--line);
    border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 14px;
    animation: account-pop-in .14s ease;
}
@keyframes account-pop-in { from { opacity: 0; transform: translateY(-6px); } }
.account-pop-head { display: flex; align-items: center; gap: 11px; }
.account-pop-id { min-width: 0; }
.account-pop-name { display: block; font-weight: 700; color: var(--ink-900); font-size: 0.9rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.account-pop-mail { display: block; color: var(--ink-500); font-size: 0.78rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.account-pop-plan { display: inline-block; margin: 11px 0 4px; padding: 3px 10px;
    border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.account-pop-links { display: flex; flex-direction: column; margin-top: 8px;
    border-top: 1px solid var(--line); padding-top: 8px; }
.account-pop-links a { display: flex; align-items: center; gap: 9px; padding: 8px;
    border-radius: var(--r-sm); color: var(--ink-700); font-size: 0.86rem; text-decoration: none; font-weight: 500; }
.account-pop-links a:hover { background: var(--blue-50); color: var(--accent-ink); }
.account-pop-links a svg { color: var(--ink-400); }
.account-pop-links a:hover svg { color: var(--accent-ink); }
.account-pop-links a.nav-muted { color: var(--ink-500); }

/* --- Badges d'offre --- */
.pf-plan-essai        { background: var(--amber-50); color: var(--amber-700); }
.pf-plan-cabinet      { background: var(--blue-50);  color: var(--accent-ink); }
.pf-plan-cabinet_plus { background: #F1EBFB; color: #6B3FA0; }

/* --- En-tête profil (avec motif décoratif) --- */
.pf-hero { position: relative; overflow: hidden;
    background: linear-gradient(120deg, var(--blue-800), var(--blue-500));
    color: #fff; border-radius: var(--r-xl); padding: 30px 32px; box-shadow: var(--shadow-md);
    margin-bottom: 20px; }
.pf-hero-deco { position: absolute; inset: 0; width: 55%; height: 100%; left: auto; right: 0; pointer-events: none; }
.pf-hero-main { position: relative; display: flex; align-items: center; gap: 20px; }
.pf-avatar { flex: none; display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%;
    background: rgba(255,255,255,.15); border: 2px solid rgba(255,255,255,.4);
    font-size: 1.6rem; font-weight: 800; letter-spacing: .02em; }
.pf-hero-id { min-width: 0; }
.pf-hero-id h1 { margin: 0; font-size: 1.55rem; color: #fff; line-height: 1.15;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-hero-mail { margin: 4px 0 10px; color: rgba(255,255,255,.85); font-size: 0.92rem; }
.pf-hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-chip { display: inline-block; padding: 4px 11px; border-radius: 999px;
    background: rgba(255,255,255,.14); color: #fff; font-size: 0.76rem; font-weight: 600;
    border: 1px solid rgba(255,255,255,.18); }
.pf-chip-plan { background: #fff; border: none; }
.pf-chip-plan.pf-plan-essai        { color: var(--amber-700); }
.pf-chip-plan.pf-plan-cabinet      { color: var(--accent-ink); }
.pf-chip-plan.pf-plan-cabinet_plus { color: #6B3FA0; }

/* --- Tuiles chiffres clés --- */
.pf-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.pf-tile { position: relative; background: var(--white); border: 1px solid var(--line);
    border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-sm);
    transition: transform .16s ease, box-shadow .2s ease; }
.pf-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.pf-tile-ico { position: absolute; top: 16px; right: 16px; display: grid; place-items: center;
    width: 34px; height: 34px; border-radius: 9px; background: var(--blue-50); color: var(--accent-ink); }
.pf-tile-num { display: block; font-size: 2rem; font-weight: 800; color: var(--accent-ink);
    line-height: 1; font-variant-numeric: tabular-nums; }
.pf-tile-num small { font-size: 1rem; font-weight: 700; color: var(--ink-400); }
.pf-tile-lbl { display: block; margin-top: 7px; color: var(--ink-500); font-size: 0.8rem; font-weight: 500; }

/* --- Colonnes --- */
.pf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.pf-col { display: flex; flex-direction: column; gap: 20px; }
.pf-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: 22px 24px; box-shadow: var(--shadow-sm); }
.pf-card h2 { margin: 0 0 18px; font-size: 1.08rem; color: var(--ink-900); }

/* --- Abonnement + anneau --- */
.pf-sub-top { display: flex; align-items: center; gap: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.pf-ring-wrap { position: relative; flex: none; width: 118px; height: 118px; }
.pf-ring { width: 100%; height: 100%; }
.pf-ring-bg { fill: none; stroke: var(--blue-50); stroke-width: 10; }
.pf-ring-fg { fill: none; stroke: var(--blue-500); stroke-width: 10; stroke-linecap: round;
    transition: stroke-dasharray .7s cubic-bezier(.4,0,.2,1); }
.pf-ring-fg.haut { stroke: var(--amber-700); }
.pf-ring-fg.plein { stroke: var(--red-700); }
.pf-ring-fg.illimite { stroke: var(--green-700); }
.pf-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; }
.pf-ring-big { font-size: 1.5rem; font-weight: 800; color: var(--ink-900); font-variant-numeric: tabular-nums; line-height: 1; }
.pf-ring-slash { color: var(--ink-400); font-weight: 700; font-size: 1rem; }
.pf-ring-sub { color: var(--ink-500); font-size: 0.74rem; margin-top: 3px; }
.pf-sub-info { min-width: 0; }
.pf-sub-name { display: block; font-size: 1.2rem; font-weight: 800; color: var(--ink-900); }
.pf-sub-tag { display: block; color: var(--ink-500); font-size: 0.83rem; margin: 2px 0 8px; }
.pf-sub-price { margin-bottom: 8px; }
.pf-price { font-size: 1.35rem; font-weight: 800; color: var(--accent-ink); }
.pf-cadence { color: var(--ink-500); font-size: 0.78rem; margin-left: 5px; }
.pf-quota-note { margin: 0; color: var(--ink-500); font-size: 0.78rem; }
.pf-note-alert { color: var(--red-700); font-weight: 600; }

.pf-features { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.pf-features li { display: flex; align-items: center; gap: 9px; font-size: 0.88rem; color: var(--ink-700); }
.pf-features svg { flex: none; color: var(--green-700); }

.pf-upsell { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.pf-upsell-title { margin: 0 0 12px; font-weight: 700; color: var(--ink-900); font-size: 0.92rem; }
.pf-upsell-cards { display: flex; flex-direction: column; gap: 10px; }
.pf-upsell-card { display: flex; align-items: center; justify-content: space-between; gap: 12px;
    border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 16px; background: var(--bg); }
.pf-upsell-name { display: block; font-weight: 700; color: var(--ink-900); }
.pf-upsell-quota { display: block; color: var(--ink-500); font-size: 0.8rem; }
.pf-upsell-right { display: flex; align-items: center; gap: 14px; }
.pf-upsell-price { font-weight: 700; color: var(--accent-ink); white-space: nowrap; }
.pf-upsell-price small { color: var(--ink-500); font-weight: 500; font-size: 0.74rem; margin-left: 3px; }
.pf-upsell-btn { opacity: .6; cursor: not-allowed; padding: 6px 14px; }

/* --- Donuts --- */
.pf-donuts { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.pf-donut-block { display: flex; flex-direction: column; align-items: center; }
.pf-donut-title { font-weight: 700; color: var(--ink-900); font-size: 0.88rem; margin-bottom: 14px; align-self: flex-start; }
.pf-donut { position: relative; width: 130px; height: 130px; border-radius: 50%; }
.pf-donut-hole { position: absolute; inset: 22px; background: var(--white); border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px var(--line); }
.pf-donut-top { color: var(--ink-500); font-size: 0.72rem; font-weight: 600; }
.pf-donut-pct { color: var(--ink-900); font-size: 1.15rem; font-weight: 800; }
.pf-legend { list-style: none; margin: 16px 0 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 7px; }
.pf-legend li { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; }
.pf-legend-dot { flex: none; width: 10px; height: 10px; border-radius: 3px; }
.pf-legend-lbl { flex: 1; color: var(--ink-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-legend-val { color: var(--ink-900); font-weight: 700; font-variant-numeric: tabular-nums; }

/* --- Activité --- */
.pf-block-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.pf-block-title { font-weight: 700; color: var(--ink-900); font-size: 0.9rem; }
.pf-block-sub { color: var(--ink-400); font-size: 0.78rem; }
.pf-activity { display: flex; align-items: flex-end; gap: 10px; height: 120px; }
.pf-act-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.pf-act-bar-wrap { flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.pf-act-count { font-size: 0.72rem; font-weight: 700; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.pf-act-bar { width: 62%; max-width: 34px; border-radius: 5px 5px 0 0;
    background: linear-gradient(180deg, var(--blue-400), var(--blue-600)); min-height: 3px; transition: height .6s ease; }
.pf-act-bar.vide { background: var(--blue-100); }
.pf-act-lbl { color: var(--ink-500); font-size: 0.74rem; }

.pf-insights { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 22px;
    background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.pf-insight { background: var(--white); padding: 13px 15px; }
.pf-insight-lbl { display: block; color: var(--ink-500); font-size: 0.76rem; }
.pf-insight-val { display: block; color: var(--ink-900); font-weight: 700; font-size: 0.95rem; margin-top: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-insight-sub { display: block; color: var(--accent-ink); font-size: 0.74rem; font-weight: 600; }

/* --- Profil de risque --- */
.pf-risk-lead { margin: 0 0 18px; color: var(--ink-700); font-size: 0.9rem; }
.pf-risk-lead strong { color: var(--ink-900); }
.pf-sri-hist { display: flex; align-items: flex-end; gap: 8px; height: 90px; }
.pf-sri-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; }
.pf-sri-bar-wrap { flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.pf-sri-count { font-size: 0.7rem; font-weight: 700; color: var(--ink-700); }
.pf-sri-bar { width: 70%; max-width: 30px; border-radius: 4px 4px 0 0; min-height: 4px; transition: height .6s ease; }
.pf-sri-bar.sri-low  { background: linear-gradient(180deg, #4CC38A, var(--green-700)); }
.pf-sri-bar.sri-mid  { background: linear-gradient(180deg, var(--amber-200), var(--amber-700)); }
.pf-sri-bar.sri-high { background: linear-gradient(180deg, #FDA29B, var(--red-700)); }
.pf-sri-bar.vide { background: var(--line) !important; }
.pf-sri-lbl { color: var(--ink-500); font-size: 0.74rem; font-weight: 600; }
.pf-sri-scale { position: relative; display: flex; justify-content: space-between; margin-top: 14px;
    padding-top: 12px; border-top: 2px solid var(--line); color: var(--ink-400); font-size: 0.74rem; }
.pf-sri-marker { position: absolute; top: -5px; width: 12px; height: 12px; border-radius: 50%;
    background: var(--blue-600); border: 2px solid #fff; box-shadow: var(--shadow-sm); transform: translateX(-50%); }

.pf-empty-global { text-align: center; color: var(--ink-500); font-size: 0.9rem; margin: 4px 0 20px; }
.pf-empty-global a { color: var(--accent-ink); font-weight: 600; }

/* --- Compte & sécurité --- */
.pf-account { margin-top: 20px; }
.pf-account-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.pf-account-head h2 { margin: 0; }
.pf-export { display: inline-flex; align-items: center; gap: 8px; }
.pf-account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.pf-mini-form { display: flex; flex-direction: column; gap: 12px; }
.pf-mini-title { margin: 0; font-weight: 700; color: var(--ink-900); font-size: 0.92rem; }
.pf-field { display: flex; flex-direction: column; gap: 6px; }
.pf-field > span { color: var(--ink-700); font-size: 0.82rem; font-weight: 500; }
.pf-field-err { color: var(--red-700); font-size: 0.8rem; margin: 0; }
.button-sm { align-self: flex-start; padding: 8px 16px; font-size: 0.85rem; }

.pf-danger { margin-top: 24px; border: 1px solid var(--red-200); border-radius: var(--r-md);
    background: var(--red-50); overflow: hidden; }
.pf-danger summary { cursor: pointer; padding: 15px 18px; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.pf-danger summary::-webkit-details-marker { display: none; }
.pf-danger-title { font-weight: 700; color: var(--red-700); font-size: 0.92rem; }
.pf-danger-hint { color: var(--ink-500); font-size: 0.8rem; }
.pf-danger-form { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.pf-danger-btn { background: var(--red-700); align-self: flex-start; }
.pf-danger-btn:hover { background: #94190f; }
.pf-account-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
    .pf-tiles { grid-template-columns: repeat(2, 1fr); }
    .pf-cols { grid-template-columns: 1fr; }
    .pf-account-grid { grid-template-columns: 1fr; }
    .pf-donuts { grid-template-columns: 1fr; }
    .pf-hero-deco { width: 100%; opacity: .5; }
}

/* --- Personnalisation : avatar photo partout --- */
.account-avatar img, .pf-avatar.has-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pf-avatar.has-photo { padding: 0; overflow: hidden; background: rgba(255,255,255,.15); }
.pf-avatar img { display: block; }

/* --- Personnalisation : bloc photo + nom --- */
.pf-photo-row { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.pf-photo-preview { flex: none; width: 84px; height: 84px; border-radius: 50%; overflow: hidden;
    background: var(--blue-50); display: grid; place-items: center; border: 1px solid var(--line); }
.pf-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.pf-photo-empty { font-size: 1.6rem; font-weight: 800; color: var(--accent-ink); }
.pf-photo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pf-photo-btn { cursor: pointer; margin: 0; }
.pf-photo-remove { background: none; border: none; color: var(--red-700); font-size: 0.82rem;
    font-weight: 600; cursor: pointer; padding: 0; }
.cf-hint { color: var(--ink-400); font-size: 0.78rem; margin: 2px 0 0; }
.cf-hint a { color: var(--accent-ink); font-weight: 600; }

/* --- Préférences : interrupteur + sélecteur --- */
.pf-prefs-form { display: flex; flex-direction: column; gap: 20px; }
.pf-pref-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pf-pref-txt { min-width: 0; }
.pf-pref-lbl { display: block; font-weight: 600; color: var(--ink-900); font-size: 0.9rem; }
.pf-pref-sub { display: block; color: var(--ink-500); font-size: 0.8rem; margin-top: 2px; }
.pf-pref-block { display: flex; flex-direction: column; gap: 4px; }
.pf-pref-block .pf-select { margin-top: 8px; }
.pf-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px; }

.pf-switch { position: relative; flex: none; width: 46px; height: 26px; cursor: pointer; }
.pf-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pf-switch-track { position: absolute; inset: 0; background: var(--ink-400); border-radius: 999px; transition: background .2s; }
.pf-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
    background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: var(--shadow-sm); }
.pf-switch input:checked + .pf-switch-track { background: var(--blue-500); }
.pf-switch input:checked + .pf-switch-track::after { transform: translateX(20px); }
.pf-switch input:focus-visible + .pf-switch-track { outline: 2px solid var(--blue-300); outline-offset: 2px; }

/* --- Activité récente (timeline) --- */
.pf-timeline { list-style: none; margin: 0 0 14px; padding: 0; }
.pf-timeline li { position: relative; }
.pf-tl-item { display: flex; align-items: center; gap: 12px; padding: 11px 8px; border-radius: var(--r-sm);
    text-decoration: none; transition: background .15s; }
.pf-tl-item:hover { background: var(--blue-50); }
.pf-tl-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--blue-400);
    box-shadow: 0 0 0 3px var(--blue-50); }
.pf-tl-body { flex: 1; min-width: 0; }
.pf-tl-titre { display: block; color: var(--ink-900); font-weight: 600; font-size: 0.88rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-tl-meta { display: block; color: var(--ink-500); font-size: 0.78rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-tl-date { flex: none; color: var(--ink-400); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.pf-tl-all { display: inline-block; color: var(--accent-ink); font-weight: 600; font-size: 0.84rem; text-decoration: none; }
.pf-tl-all:hover { text-decoration: underline; }

/* --- Réglages du compte : accordéons --- */
.pf-settings { margin-top: 22px; }
.pf-settings-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.pf-settings-head h2 { margin: 0; font-size: 1.15rem; color: var(--ink-900); }
.pf-settings-actions { display: flex; align-items: center; gap: 18px; }
.pf-export { display: inline-flex; align-items: center; gap: 8px; }
.pf-logout { font-size: 0.86rem; }

.pf-acc { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm); margin-bottom: 12px; overflow: hidden; transition: box-shadow .2s; }
.pf-acc[open] { box-shadow: var(--shadow-md); }
.pf-acc-sum { display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer;
    list-style: none; user-select: none; }
.pf-acc-sum::-webkit-details-marker { display: none; }
.pf-acc-sum:hover { background: var(--blue-50); }
.pf-acc-ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px;
    border-radius: 10px; background: var(--blue-50); color: var(--accent-ink); }
.pf-acc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pf-acc-t { font-weight: 700; color: var(--ink-900); font-size: 0.98rem; }
.pf-acc-d { color: var(--ink-500); font-size: 0.82rem; }
.pf-acc-chev { flex: none; color: var(--ink-400); transition: transform .2s; }
.pf-acc[open] .pf-acc-chev { transform: rotate(180deg); }
.pf-acc-body { padding: 4px 20px 22px; border-top: 1px solid var(--line); }
.pf-acc-body > form { padding-top: 18px; }

/* Variante « danger » (suppression) */
.pf-acc-danger .pf-acc-ico { background: var(--red-50); color: var(--red-700); }
.pf-acc-danger[open] { border-color: var(--red-200); }
.pf-acc-danger .pf-acc-t { color: var(--red-700); }
.pf-acc-danger .pf-danger-form { max-width: 440px; }

/* L'ouverture révèle le contenu en douceur */
.pf-acc[open] .pf-acc-body { animation: pf-acc-in .22s ease; }
@keyframes pf-acc-in { from { opacity: 0; transform: translateY(-4px); } }

/* --- Profil : layout menu latéral + contenu --- */
.pf-layout { display: grid; grid-template-columns: 232px 1fr; gap: 24px; align-items: start; }
.pf-menu { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 4px;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm); padding: 10px; }
.pf-menu-item { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border: none;
    background: none; border-radius: var(--r-md); cursor: pointer; text-align: left; width: 100%;
    color: var(--ink-700); font-size: 0.9rem; font-weight: 600; font-family: inherit;
    text-decoration: none; transition: background .14s, color .14s; }
.pf-menu-item svg { flex: none; color: var(--ink-400); transition: color .14s; }
.pf-menu-item:hover { background: var(--blue-50); color: var(--accent-ink); }
.pf-menu-item:hover svg { color: var(--accent-ink); }
.pf-menu-item.active { background: var(--blue-600); color: #fff; box-shadow: var(--shadow-sm); }
.pf-menu-item.active svg { color: #fff; }
.pf-menu-logout { margin-top: 8px; padding-top: 15px; border-top: 1px solid var(--line);
    border-radius: 0 0 var(--r-md) var(--r-md); color: var(--ink-500); }
.pf-menu-logout:hover { background: var(--red-50); color: var(--red-700); }
.pf-menu-logout:hover svg { color: var(--red-700); }
.pf-content { min-width: 0; }
.pf-panel { animation: pf-panel-in .2s ease; }
@keyframes pf-panel-in { from { opacity: 0; transform: translateY(6px); } }

@media (max-width: 820px) {
    .pf-layout { grid-template-columns: 1fr; }
    .pf-menu { position: static; flex-direction: row; overflow-x: auto; gap: 6px; }
    .pf-menu-item { flex: none; white-space: nowrap; }
    .pf-menu-item span { display: none; }
    .pf-menu-item.active span, .pf-menu-logout span { display: inline; }
    .pf-menu-logout { margin: 0; padding: 11px 13px; border-top: none; border-left: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
    .pf-panel, .pf-acc[open] .pf-acc-body { animation: none; }
}

/* --- Personnalisation : sélecteur de couleur --- */
.pf-color-block { margin: 20px 0 4px; display: flex; flex-direction: column; gap: 4px; }
.pf-swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pf-swatch { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px 7px 9px;
    border: 1.5px solid var(--line); border-radius: 999px; background: var(--white); cursor: pointer;
    font-family: inherit; font-size: 0.83rem; font-weight: 600; color: var(--ink-700); transition: border-color .15s, box-shadow .15s; }
.pf-swatch:hover { border-color: var(--ink-400); }
.pf-swatch.active { border-color: var(--sw); box-shadow: 0 0 0 2px color-mix(in srgb, var(--sw) 22%, transparent); color: var(--ink-900); }
.pf-swatch-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }

/* --- Éditeur de modèle d'email --- */
.pf-textarea { resize: vertical; min-height: 46px; font-family: inherit; line-height: 1.5; }
.pf-email-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.pf-email-preview { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; }
.pf-email-preview-lbl { display: block; color: var(--ink-400); font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; }
.pf-email-paper { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px; font-size: 0.85rem; color: var(--ink-700); line-height: 1.55; }
.pf-email-paper p { margin: 0 0 10px; }
.pf-email-obj { font-weight: 700; color: var(--ink-900); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.pf-email-list { color: var(--ink-900); }
.pf-email-sign { color: var(--accent-ink); font-weight: 600; margin-bottom: 0; }

/* --- Facturation : offre + carte + factures --- */
.pf-bill-plan { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
    padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.pf-bill-plans { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

.pf-card-visual { position: relative; border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 16px;
    background: linear-gradient(120deg, var(--blue-700), var(--blue-500)); color: #fff; box-shadow: var(--shadow-md);
    min-height: 116px; display: flex; flex-direction: column; justify-content: space-between; }
.pf-card-brand { font-weight: 800; letter-spacing: .04em; font-size: 0.9rem; }
.pf-card-num { font-size: 1.15rem; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.pf-card-foot { display: flex; justify-content: space-between; font-size: 0.8rem; color: rgba(255,255,255,.85); text-transform: uppercase; }
.pf-card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.pf-invoices { list-style: none; margin: 0; padding: 0; }
.pf-invoice { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pf-invoice:last-child { border-bottom: none; }
.pf-invoice-main { flex: 1; min-width: 0; }
.pf-invoice-lib { display: block; color: var(--ink-900); font-weight: 600; font-size: 0.88rem; }
.pf-invoice-meta { display: block; color: var(--ink-500); font-size: 0.78rem; }
.pf-invoice-amt { font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.pf-invoice-dl { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
    color: var(--ink-400); background: var(--blue-50); }

@media (max-width: 820px) {
    .pf-email-editor { grid-template-columns: 1fr; }
}

/* =========================================================================
   MODE NUIT
   Redéfinit les neutres (fond, surfaces, texte, bordures) et les teintes.
   La rampe d'accent 300→800 (choisie par l'utilisateur) est conservée ; seules
   les teintes claires 50/100, utilisées comme fonds subtils, deviennent sombres.
   Le sélecteur html[data-theme="dark"] (spécificité > :root) l'emporte sur le
   thème de couleur injecté en <head>.
   ========================================================================= */
html[data-theme="dark"] {
    --bg: #0A0F18;          /* fond profond */
    --white: #1B2637;       /* surface des cartes, nettement détachée du fond */
    --ink-900: #F3F6FB;     /* titres */
    --ink-700: #D5DEEA;     /* texte courant, bien lisible */
    --ink-500: #A4B2C6;     /* labels secondaires éclaircis */
    --ink-400: #8393A9;     /* faible mais lisible (dates) */
    --line: #37455F;        /* bordures visibles = relief des cartes */
    --accent-ink: var(--blue-300);  /* accent en texte : nuance claire lisible */
    --blue-50: #1E2C40;
    --blue-100: #27384F;
    --green-50: #13271D; --green-200: #24503B; --green-700: #4ADE80;
    --amber-50: #2A2011; --amber-200: #52401C; --amber-700: #FBBF24;
    --red-50: #2C1719; --red-200: #532A2E; --red-700: #F87171;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.5);
    --shadow-md: 0 8px 24px rgba(0,0,0,.55);
    --shadow-lg: 0 20px 48px rgba(0,0,0,.65);
}
html[data-theme="dark"] body { background: var(--bg); }
html[data-theme="dark"] .site-header { background: rgba(10,15,24,.85); }
/* Relief des cartes en mode nuit : liseré haut clair + ombre portée (les ombres
   seules ne se voient pas sur fond sombre, la bordure + le liseré font le relief). */
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .pf-card,
html[data-theme="dark"] .pf-tile,
html[data-theme="dark"] .pf-menu,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .account-pop,
html[data-theme="dark"] .comparateur-card {
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 6px 20px rgba(0,0,0,.5);
}
html[data-theme="dark"] .product-card:hover { border-color: var(--blue-400); }
/* Surcouche d'analyse en mode nuit : le voile clair et la boîte blanche
   deviennent sombres pour ne pas éblouir. */
html[data-theme="dark"] .analyse-overlay { background: rgba(6, 10, 18, 0.8); }
html[data-theme="dark"] .analyse-box {
    background: var(--white);
    border-color: var(--blue-100);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 24px 60px -20px rgba(0,0,0,.6);
}
/* Puce famille : texte d'accent clair (le 700 foncé est illisible sur sombre) */
html[data-theme="dark"] .card-tag.fam { color: var(--blue-300); border-color: var(--blue-100); }
html[data-theme="dark"] .pc-tag,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .sj-badge { color: var(--ink-700); }
/* Champs sur fond de page (filtres, recherche) : surface intermédiaire + bordure */
html[data-theme="dark"] .ec-search,
html[data-theme="dark"] .filter-select,
html[data-theme="dark"] .search-bar input,
html[data-theme="dark"] input[type="search"] { background: var(--white); }
html[data-theme="dark"] .cf-input,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .ec-search,
html[data-theme="dark"] .filter-select {
    background: var(--bg); color: var(--ink-900);
}
html[data-theme="dark"] .cf-input::placeholder,
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: var(--ink-400); }
/* Notes privées : halo de focus adapté au fond sombre */
html[data-theme="dark"] .notes-zone:focus { box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25); }
html[data-theme="dark"] .notes-tag { background: var(--white); }
html[data-theme="dark"] .card-note-dot { background: rgba(96, 165, 250, 0.12); border-color: rgba(96, 165, 250, 0.3); }
/* Le badge blanc d'offre reste lisible sur le hero sombre */
html[data-theme="dark"] .pf-chip-plan { background: #E8EDF3; }
/* Aperçu d'email : garder la « feuille » légèrement contrastée */
html[data-theme="dark"] .pf-email-paper { background: var(--bg); }

/* --- Bascule mode nuit dans le menu compte --- */
.account-pop-night { display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 11px 8px 5px; }
.account-night-lbl { display: flex; align-items: center; gap: 9px; color: var(--ink-700);
    font-size: 0.86rem; font-weight: 500; }
.account-night-lbl svg { color: var(--ink-400); }
.pf-switch-btn { border: none; background: none; padding: 0; cursor: pointer; }
.pf-switch-btn[aria-checked="true"] .pf-switch-track { background: var(--blue-500); }
.pf-switch-btn[aria-checked="true"] .pf-switch-track::after { transform: translateX(20px); }

/* Correctifs mode nuit : éléments à couleurs codées en dur */
html[data-theme="dark"] .tab-nav { background: rgba(16,24,36,.92); }
html[data-theme="dark"] .tab-btn.active { color: var(--blue-400); }
html[data-theme="dark"] .verif-banner { background: #2A2011; border-color: #4A3A1A; border-left-color: var(--amber-700); }
html[data-theme="dark"] .verif-head { color: #FBBF24; }
html[data-theme="dark"] .verif-tag { background: #4A3A1A; color: #FDE68A; }
html[data-theme="dark"] .verif-list { color: #E8CB8F; }
html[data-theme="dark"] .commission-tag { background: var(--bg); }

/* Correctifs mode nuit — lisibilité des accents
   1) Texte sur surface d'accent : var(--white) devient sombre en nuit, on force
      une couleur claire fixe (boutons primaires, logo, icônes de carte). */
html[data-theme="dark"] .button,
html[data-theme="dark"] input[type="submit"],
html[data-theme="dark"] .nav-cta,
html[data-theme="dark"] .button-lg,
html[data-theme="dark"] .brand-mark,
html[data-theme="dark"] .card-icon { color: #F5F8FC; }
html[data-theme="dark"] .brand-mark { background: var(--blue-600); }
html[data-theme="dark"] .pf-danger-btn { background: #C0362B; color: #F5F8FC; }

/* 2) Accent utilisé en TEXTE : le 700 est illisible sur sombre → nuance claire. */
html[data-theme="dark"] .button-ghost,
html[data-theme="dark"] .card-view,
html[data-theme="dark"] .callout-label,
html[data-theme="dark"] .these-item.vue .these-label,
html[data-theme="dark"] .particularite-callout .callout-label,
html[data-theme="dark"] .dividende-callout .callout-label,
html[data-theme="dark"] .indice-maison-note .callout-label,
html[data-theme="dark"] .pf-inline-link,
html[data-theme="dark"] .pf-tl-all,
html[data-theme="dark"] .cf-hint a,
html[data-theme="dark"] .pf-empty-global a,
html[data-theme="dark"] .card-original-name { color: var(--blue-300); }
html[data-theme="dark"] .button-ghost { background: transparent; border-color: var(--blue-400); }
html[data-theme="dark"] .button-ghost:hover { background: var(--blue-50); }

/* Divers correctifs mode nuit repérés au passage */
html[data-theme="dark"] .modalite-badge.on { border-color: var(--green-200); }
html[data-theme="dark"] .modalite-badge.off { background: var(--bg); }
html[data-theme="dark"] .brand-badge { background: var(--white); }

/* Pages d'authentification en mode nuit : la vitrine garde son dégradé foncé
   (déjà lisible), on ajuste seulement la piste de la jauge et le focus. */
html[data-theme="dark"] .pw-meter-track { background: #0A0F18; }
html[data-theme="dark"] .auth-greeting { color: var(--blue-300); }
html[data-theme="dark"] .field-hint.match-ok { color: #4ADE80; }
html[data-theme="dark"] .field-hint.match-ko,
html[data-theme="dark"] .field-error { color: #F87171; }

/* Panneau d'administration en mode nuit */
html[data-theme="dark"] .admin-tag-ok { background: rgba(74, 222, 128, 0.14); color: #4ADE80; }
html[data-theme="dark"] .admin-tag-alert { background: rgba(248, 113, 113, 0.14); color: #F87171; }
html[data-theme="dark"] .admin-inline-select { background: var(--bg); }

/* Section tarifs en mode nuit */
html[data-theme="dark"] .lp-price-btn.ghost { background: transparent; border-color: var(--blue-400); }
html[data-theme="dark"] .lp-price-btn.ghost:hover { background: var(--blue-50); }
html[data-theme="dark"] .lp-price-flag { color: #F5F8FC; }
html[data-theme="dark"] .lp-price-feats li::before { background-color: rgba(96, 165, 250, 0.16); }

/* ============================================================
   Pages légales (mentions légales, confidentialité, cookies, CGU, CGV)
   Colonne de lecture sobre, texte long-forme.
   ============================================================ */
.legal-shell {
    max-width: 780px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}
.legal-head {
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--blue-100);
}
.legal-head h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--blue-800);
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}
.legal-head .legal-maj {
    font-size: 0.9rem;
    color: var(--gray-500, #64748B);
}
.legal-body {
    color: var(--gray-700, #334155);
    line-height: 1.7;
    font-size: 1rem;
}
.legal-body h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--blue-800);
    margin: 40px 0 14px;
}
.legal-body h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--blue-700);
    margin: 26px 0 10px;
}
.legal-body p { margin: 0 0 14px; }
.legal-body ul { margin: 0 0 14px; padding-left: 22px; }
.legal-body li { margin-bottom: 7px; }
.legal-body a { color: var(--blue-600); }
.legal-body strong { color: var(--blue-800); font-weight: 600; }
.legal-body .legal-note {
    background: var(--blue-50);
    border-left: 3px solid var(--blue-400);
    border-radius: 8px;
    padding: 14px 18px;
    margin: 20px 0;
    font-size: 0.94rem;
}
/* Mention discrète : plus petite et atténuée, pour les infos requises mais
   qu'on ne souhaite pas mettre en avant. */
.legal-body .legal-fine {
    font-size: 0.82rem;
    color: var(--ink-400, #94a3b8);
    line-height: 1.6;
}
html[data-theme="dark"] .legal-body .legal-fine { color: #7c8ba0; }
.legal-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 20px;
    font-size: 0.94rem;
}
.legal-body th, .legal-body td {
    text-align: left;
    padding: 9px 12px;
    border: 1px solid var(--blue-100);
    vertical-align: top;
}
.legal-body th { background: var(--blue-50); font-weight: 600; color: var(--blue-800); }
.legal-toc {
    background: var(--blue-50);
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 32px;
}
.legal-toc ul { margin: 8px 0 0; padding-left: 20px; }
.legal-toc a { color: var(--blue-700); }

/* Pages légales — mode nuit */
html[data-theme="dark"] .legal-head h1,
html[data-theme="dark"] .legal-body h2 { color: #F5F8FC; }
html[data-theme="dark"] .legal-body h3 { color: var(--blue-300); }
html[data-theme="dark"] .legal-head { border-color: rgba(148, 173, 208, 0.18); }
html[data-theme="dark"] .legal-body { color: #C7D2DE; }
html[data-theme="dark"] .legal-body strong { color: #F5F8FC; }
html[data-theme="dark"] .legal-body a,
html[data-theme="dark"] .legal-toc a { color: var(--blue-300); }
html[data-theme="dark"] .legal-body .legal-note,
html[data-theme="dark"] .legal-toc { background: rgba(96, 165, 250, 0.10); }
html[data-theme="dark"] .legal-body th { background: rgba(96, 165, 250, 0.12); color: #F5F8FC; }
html[data-theme="dark"] .legal-body th,
html[data-theme="dark"] .legal-body td { border-color: rgba(148, 173, 208, 0.18); }

/* Liens légaux dans le pied de page */
.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    justify-content: center;
    margin-top: 10px;
}
.footer-legal a {
    color: var(--blue-600);
    font-size: 0.88rem;
    text-decoration: none;
}
.footer-legal a:hover { text-decoration: underline; }
html[data-theme="dark"] .footer-legal a { color: var(--blue-300); }

/* --- Pages d'erreur (404 / 413 / 500) --- */
.erreur-page {
    max-width: 560px;
    margin: 5rem auto;
    padding: 0 1.5rem;
    text-align: center;
}
.erreur-code {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-ink);
    margin: 0 0 0.75rem;
}
.erreur-page h1 {
    font-size: 1.85rem;
    margin: 0 0 1rem;
    color: var(--ink-900);
}
.erreur-msg {
    color: var(--ink-700);
    line-height: 1.65;
    margin: 0 0 2rem;
}
.erreur-retour {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    border-radius: 10px;
    background: var(--blue-600);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}
.erreur-retour:hover { background: var(--blue-700); }
html[data-theme="dark"] .erreur-page h1 { color: #fff; }
