﻿/* ==========================================================================
   MERIDIA FINANCE - Design system « SaaS pro »
   Net, dense et contrasté : typographie Inter, surfaces bordées,
   bleu nuit de marque, accent vert, barre latérale sombre.
   ========================================================================== */

:root {
    /* Marque */
    --navy: #002358;
    --navy-deep: #001540;
    --navy-2: #1A3A80;
    --navy-soft: #E6EDFB;
    --primary: #002358;
    --primary-hover: #001540;
    --primary-soft: #E6EDFB;
    --accent: #FE7801;
    --accent-bright: #FF9220;
    --accent-ink: #C45E00;
    --accent-soft: #FFF2E0;
    --danger: #DC2E45;
    --danger-ink: #B4182C;
    --danger-soft: #FDECEE;
    --amber: #C2650A;
    --amber-soft: #FEF2E2;
    --violet: #6D4AE0;
    --violet-soft: #F0ECFD;
    --green: #16A37F;
    --green-ink: #0E7A5F;
    --green-soft: #E6F7F3;

    /* Neutres */
    --white: #FFFFFF;
    --bg: #F3F5FA;
    --surface: #FFFFFF;
    --surface-2: #FAFBFC;
    --text: #0F172A;
    --text-secondary: #556072;
    --text-tertiary: #8A93A3;
    --border: #E4E7EF;
    --border-strong: #CDD2DB;
    --hover: #F3F5F8;

    /* Sombre (sidebar, hero, footer) */
    --dark: #172042;
    --dark-2: #1F2A52;
    --dark-border: rgba(255, 255, 255, .08);
    --dark-text: #E7EAF3;
    --dark-muted: #A9B2CE;

    --font-body: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-display: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;

    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-pill: 999px;

    --shadow-xs: 0 1px 2px rgba(23, 32, 66, .04), 0 2px 8px -2px rgba(23, 32, 66, .06);
    --shadow-sm: 0 1px 2px rgba(23, 32, 66, .05), 0 6px 16px -6px rgba(23, 32, 66, .12);
    --shadow: 0 2px 4px rgba(23, 32, 66, .05), 0 14px 30px -12px rgba(23, 32, 66, .18);
    --shadow-lg: 0 2px 6px rgba(15, 23, 42, .05), 0 24px 48px -16px rgba(15, 23, 42, .25);

    --ease: cubic-bezier(.32, .72, 0, 1);
    --dur-fast: 140ms;
    --dur: 260ms;

    --focus-ring: 0 0 0 3px rgba(35, 48, 94, .2);

    --header-height: 72px;
    --container: 1200px;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv11", "ss01", "ss03";
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--text);
    margin: 0 0 .5em;
    text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 750; line-height: 1.08; letter-spacing: -.035em; }
h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); font-weight: 700; line-height: 1.15; letter-spacing: -.028em; }
h3 { font-size: 1.0625rem; font-weight: 650; line-height: 1.3; letter-spacing: -.012em; }
h4 { font-size: .9375rem; font-weight: 650; line-height: 1.35; letter-spacing: -.01em; }

p { margin: 0 0 1rem; text-wrap: pretty; }
a { color: var(--primary); text-decoration: none; transition: color var(--dur-fast) ease; }
a:hover { color: var(--primary-hover); }
ul { padding-left: 1.2rem; }

::selection { background: rgba(35, 48, 94, .18); color: var(--text); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

.section { padding: clamp(56px, 7vw, 96px) 0; }
.section-alt { background: var(--bg); border-block: 1px solid var(--border); }

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 200;
    background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

.icon { flex-shrink: 0; vertical-align: -3px; }

/* ---------- Typo utilitaires ---------- */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid rgba(35, 48, 94, .14);
    padding: 5px 11px;
    border-radius: var(--radius-pill);
    margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.lead { font-size: 1.125rem; line-height: 1.55; color: var(--text-secondary); max-width: 60ch; }

.section-head { max-width: 700px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lead { margin-inline: auto; }

.muted { color: var(--text-secondary); }
.small { font-size: .8125rem; }

.hl {
    white-space: nowrap;
    background: linear-gradient(95deg, var(--accent-bright), #7FB4FF);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- Boutons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: var(--font-body);
    font-size: .875rem;
    font-weight: 600;
    line-height: 1;
    padding: 10px 16px;
    min-height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease, color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, transform var(--dur) var(--ease);
}
.btn:active { transform: scale(.98); transition-duration: 80ms; }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn[disabled], .btn.is-loading { opacity: .55; pointer-events: none; }

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 1px 2px rgba(15, 23, 42, .2);
}
.btn-primary:hover { background: var(--primary-hover); color: #fff; }

.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { background: var(--hover); border-color: var(--border-strong); color: var(--text); }

.btn-accent { background: var(--accent); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 1px 2px rgba(15, 23, 42, .2); }
.btn-accent:hover { background: var(--accent-ink); color: #fff; }

.btn-light { background: #fff; color: var(--navy-deep); }
.btn-light:hover { background: #EEF1F8; color: var(--navy-deep); }

.btn-outline-light { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .22); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .4); color: #fff; }

.btn-sm { padding: 7px 12px; min-height: 32px; font-size: .8125rem; }
.btn-lg { padding: 13px 22px; min-height: 48px; font-size: .9375rem; }
.btn-block { width: 100%; }

.link-arrow { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: .875rem; color: var(--primary); }
.link-arrow .icon { transition: transform var(--dur) var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.site-header.is-scrolled { box-shadow: 0 6px 20px -12px rgba(15, 23, 42, .25); }

.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-height); }

.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand-logo { height: 40px; width: auto; }

.main-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-link {
    display: inline-block;
    padding: 8px 12px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.nav-link:hover { color: var(--text); background: var(--hover); }
.nav-link.is-active { color: var(--text); background: var(--hover); font-weight: 600; }

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

.nav-toggle {
    display: none;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}
.nav-toggle .nav-toggle-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-close { display: block; }

@media (min-width: 981px) and (max-width: 1140px) {
    .header-inner { gap: 12px; }
    .nav-link { padding: 8px 8px; font-size: .8125rem; }
}

@media (max-width: 980px) {
    .nav-actions-desktop { display: none; }
    .nav-toggle { display: inline-flex; margin-left: auto; }
    .main-nav {
        position: absolute;
        top: calc(var(--header-height) + 6px);
        left: 12px; right: 12px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
        padding: 8px;
        transform-origin: top right;
        opacity: 0; visibility: hidden;
        transform: translateY(-6px) scale(.98);
        transition: opacity var(--dur-fast) ease, transform var(--dur) var(--ease), visibility 0s linear var(--dur);
    }
    .main-nav.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity var(--dur-fast) ease, transform var(--dur) var(--ease), visibility 0s; }
    .nav-list { flex-direction: column; align-items: stretch; }
    .nav-link { display: block; padding: 12px 14px; font-size: .9375rem; color: var(--text); }
    .nav-actions-mobile { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-top: 8px; padding: 10px 4px 4px; border-top: 1px solid var(--border); }
}

/* ---------- Hero (sombre, contrasté) ---------- */

.hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: clamp(56px, 7vw, 100px) 0 clamp(64px, 8vw, 110px);
    background:
        radial-gradient(50% 60% at 85% 10%, rgba(254, 120, 1, .18), transparent 70%),
        radial-gradient(45% 60% at 0% 100%, rgba(35, 48, 94, .45), transparent 70%),
        var(--dark);
    color: var(--dark-text);
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 48px 48px,
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, #000, transparent 80%);
    mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, #000, transparent 80%);
}
.hero-bg, .hero-curve { display: none; }

.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(36px, 5vw, 72px); align-items: center; }

.hero h1 { color: #fff; margin-bottom: .35em; }
.hero .lead { color: var(--dark-muted); margin-bottom: 24px; }
.hero .eyebrow { color: var(--accent-bright); background: rgba(254, 120, 1, .10); border-color: rgba(254, 120, 1, .20); }

.hero-points { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-points li {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: .8125rem; font-weight: 500;
    color: var(--dark-text);
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--dark-border);
    padding: 6px 12px 6px 9px;
    border-radius: var(--radius-pill);
}
.hero-points .icon { color: var(--accent-bright); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.hero .btn-primary { background: var(--accent); }
.hero .btn-primary:hover { background: var(--accent-ink); }
.hero .btn-secondary { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .2); box-shadow: none; }
.hero .btn-secondary:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.hero-note { display: flex; align-items: flex-start; gap: 8px; font-size: .8125rem; color: var(--dark-muted); max-width: 46ch; margin: 0; }
.hero-note .icon { color: var(--accent-bright); margin-top: 1px; }

.hero-visual { position: relative; }
.hero-card-visual {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 5 / 4.3;
    background: var(--dark-2);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7), 0 0 0 6px rgba(255, 255, 255, .03);
}
.hero-card-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(11, 17, 41, .75)); pointer-events: none; }
.hero-photo { width: 100%; height: 100%; object-fit: cover; }

.hero-badge, .hero-panel, .hero-chip {
    position: absolute;
    z-index: 2;
    background: rgba(255, 255, 255, .96);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, .6);
    box-shadow: var(--shadow-lg);
}
.hero-badge { top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; padding: 6px 11px; border-radius: var(--radius-pill); }
.hero-badge .icon { color: var(--accent); }
.hero-panel { left: 14px; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); }
.hero-panel-icon, .chip-icon { display: grid; place-items: center; flex-shrink: 0; background: var(--accent-soft); color: var(--accent-ink); }
.hero-panel-icon { width: 40px; height: 40px; border-radius: 10px; }
.hero-panel strong { display: block; font-size: .875rem; font-weight: 650; }
.hero-panel span:not(.hero-panel-icon) { display: block; font-size: .75rem; color: var(--text-secondary); line-height: 1.4; }
.hero-chip { z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border-radius: 10px; font-size: .78rem; font-weight: 600; }
.chip-a { top: 9%; left: -34px; }
.chip-b { bottom: 25%; right: -30px; }
.chip-icon { width: 28px; height: 28px; border-radius: 7px; }

@media (max-width: 1260px) { .chip-a { left: -8px; } .chip-b { right: -8px; } }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } .chip-a { left: 10px; } .chip-b { right: 10px; } }
@media (max-width: 640px) { .hero-chip { display: none; } }

/* ---------- Cartes & grilles ---------- */

.cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cards-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cards-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition: border-color var(--dur-fast) ease, box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--text-secondary); font-size: .875rem; margin-bottom: 14px; flex: 1; }
.card-media { position: relative; margin: -20px -20px 18px; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg); border-bottom: 1px solid var(--border); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.04); }
.card-icon {
    position: relative; z-index: 1;
    display: inline-grid; place-items: center;
    width: 42px; height: 42px;
    border-radius: 10px;
    background: var(--navy); color: #fff;
    margin: -40px 0 12px;
    box-shadow: 0 0 0 3px var(--surface);
}
.card:not(:has(.card-media)) .card-icon { margin: 0 0 14px; background: var(--primary-soft); color: var(--primary); box-shadow: none; }

@media (max-width: 980px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards-grid, .cards-grid.cols-2, .cards-grid.cols-3 { grid-template-columns: 1fr; } }

/* ---------- Confiance / Pourquoi ---------- */

.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.trust-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-xs); }
.trust-item h3 { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.trust-item h3 .icon { width: 42px; height: 42px; padding: 10px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); }
.trust-item:nth-child(2) h3 .icon { background: var(--primary-soft); color: var(--primary); }
.trust-item:nth-child(3) h3 .icon { background: var(--violet-soft); color: var(--violet); }
.trust-item p { color: var(--text-secondary); font-size: .875rem; margin: 0; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); }

.why-grid { display: grid; gap: 10px; }
.why-item {
    display: flex; gap: 14px; align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    transition: border-color var(--dur-fast) ease, box-shadow var(--dur) var(--ease);
}
.why-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.why-item .icon { width: 34px; height: 34px; padding: 7px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); }
.why-item strong { display: block; font-size: .9375rem; font-weight: 650; }
.why-item span { font-size: .8125rem; color: var(--text-secondary); }

@media (max-width: 880px) { .two-col, .trust-grid { grid-template-columns: 1fr; } }

/* ---------- Étapes ---------- */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 20px; }
.step-num {
    display: inline-grid; place-items: center;
    width: 36px; height: 36px;
    border-radius: 9px;
    font-family: var(--font-mono);
    font-size: .8125rem; font-weight: 700;
    color: #fff;
    background: var(--navy);
    margin-bottom: 14px;
}
.step:nth-child(even) .step-num { background: var(--accent); }
.step h3 { font-size: .9375rem; }
.step p { font-size: .8125rem; color: var(--text-secondary); margin: 0; }

@media (max-width: 880px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Bandeaux ---------- */

.info-strip {
    display: flex; align-items: flex-start; gap: 10px;
    background: var(--primary-soft);
    border: 1px solid rgba(35, 48, 94, .16);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: .8125rem;
    color: #24346F;
    margin-top: 20px;
}
.info-strip .icon { color: var(--primary); margin-top: 1px; }

.media-frame { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--bg); border: 1px solid var(--border); box-shadow: var(--shadow); }
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.ar-169 { aspect-ratio: 16 / 9; }
.ar-45 { aspect-ratio: 4 / 5; }
.media-badge { position: absolute; bottom: 12px; left: 12px; background: #fff; border-radius: var(--radius-pill); padding: 6px 12px; font-size: .75rem; font-weight: 600; color: var(--text); box-shadow: var(--shadow); }

.cta-band {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: var(--radius-xl);
    color: #fff;
    background:
        radial-gradient(50% 90% at 100% 0%, rgba(254, 120, 1, .22), transparent 70%),
        radial-gradient(50% 90% at 0% 100%, rgba(35, 48, 94, .55), transparent 70%),
        var(--dark);
    border: 1px solid rgba(255, 255, 255, .06);
}
.cta-band::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 40px 40px,
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 40px 40px;
    -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000);
    mask-image: linear-gradient(90deg, transparent 35%, #000);
}
.cta-band-inner { position: relative; padding: clamp(36px, 5vw, 64px); max-width: 660px; }
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--dark-muted); font-size: 1.0625rem; margin-bottom: 24px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Simulateur ---------- */

.simulator {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    max-width: 980px;
    margin-inline: auto;
}
.sim-controls { padding: clamp(24px, 3.5vw, 36px); }
.sim-results {
    padding: clamp(24px, 3.5vw, 36px);
    color: #fff;
    background: radial-gradient(80% 50% at 100% 0%, rgba(254, 120, 1, .20), transparent 70%), var(--dark);
}
.sim-results h3 { color: #fff; font-size: .9375rem; margin-bottom: 16px; }
.sim-main-result { margin-bottom: 18px; padding: 16px 18px; border-radius: var(--radius); background: rgba(255, 255, 255, .05); border: 1px solid var(--dark-border); }
.sim-results .label { display: block; font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dark-muted); margin-bottom: 4px; }
.sim-main-result .value { font-size: clamp(1.9rem, 3.4vw, 2.5rem); font-weight: 750; letter-spacing: -.035em; line-height: 1.1; font-variant-numeric: tabular-nums; color: #fff; }
.sim-main-result .unit { font-size: .9375rem; font-weight: 500; color: var(--accent-bright); }
.sim-detail { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--dark-border); }
.sim-detail .value { font-weight: 650; color: #fff; font-size: 1rem; font-variant-numeric: tabular-nums; }
.sim-disclaimer { display: flex; gap: 8px; align-items: flex-start; font-size: .72rem; color: var(--dark-muted); margin: 20px 0 0; }
.sim-disclaimer .icon { margin-top: 1px; }
.sim-note { font-size: .75rem; color: var(--text-tertiary); margin: 8px 0 0; }

.hypothesis-tag { display: inline-block; background: var(--amber-soft); color: var(--amber); font-size: .625rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: var(--radius-pill); padding: 2px 8px; margin-left: 6px; vertical-align: 1px; }

.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input[type="range"] { flex: 1; }
.range-value { min-width: 108px; text-align: center; background: var(--bg); border: 1px solid var(--border); color: var(--text); font-weight: 650; font-size: .8125rem; font-variant-numeric: tabular-nums; border-radius: var(--radius-sm); padding: 8px 10px; white-space: nowrap; }

input[type="range"] {
    -webkit-appearance: none; appearance: none;
    height: 6px; border-radius: 999px;
    background: linear-gradient(90deg, var(--primary) var(--fill, 0%), #E3E6EC var(--fill, 0%));
    outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px; height: 20px; border-radius: 50%;
    background: #fff; border: 2px solid var(--primary);
    box-shadow: 0 2px 6px rgba(15, 23, 42, .2);
    transition: transform var(--dur) var(--ease);
}
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type="range"]:disabled { opacity: .4; cursor: default; }

@media (max-width: 780px) { .simulator { grid-template-columns: 1fr; } }

/* ---------- Accordéon ---------- */

.accordion { max-width: 820px; margin-inline: auto; }
.accordion-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; transition: border-color var(--dur-fast) ease, box-shadow var(--dur) var(--ease); }
.accordion-item.is-open { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.accordion-heading { margin: 0; }
.accordion-trigger {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    width: 100%; padding: 16px 18px;
    background: none; border: 0;
    font-family: var(--font-body); font-size: .9375rem; font-weight: 600;
    color: var(--text); text-align: left; cursor: pointer;
}
.accordion-trigger:hover { background: var(--surface-2); }
.accordion-trigger .icon { color: var(--text-tertiary); transition: transform var(--dur) var(--ease); }
.accordion-trigger[aria-expanded="true"] .icon { transform: rotate(180deg); color: var(--primary); }
.accordion-panel { overflow: hidden; max-height: 0; transition: max-height var(--dur) var(--ease); }
.accordion-panel-inner { padding: 0 18px 18px; color: var(--text-secondary); font-size: .875rem; }

/* ---------- Bandeau de page (sombre) ---------- */

.page-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: clamp(44px, 6vw, 76px) 0;
    color: var(--dark-text);
    background:
        radial-gradient(45% 90% at 90% 0%, rgba(254, 120, 1, .15), transparent 70%),
        radial-gradient(40% 90% at 0% 100%, rgba(35, 48, 94, .45), transparent 70%),
        var(--dark);
}
.page-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 44px 44px,
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 60% 100% at 80% 30%, #000, transparent 80%);
    mask-image: radial-gradient(ellipse 60% 100% at 80% 30%, #000, transparent 80%);
}
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 3.8vw, 2.8rem); }
.page-hero .lead { color: var(--dark-muted); margin: 0; }
.page-hero .eyebrow { color: var(--accent-bright); background: rgba(254, 120, 1, .10); border-color: rgba(254, 120, 1, .20); }

.section-auth { background: var(--bg); }

/* ---------- Formulaires ---------- */

.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(22px, 3.5vw, 36px); box-shadow: var(--shadow); }

.field { margin-bottom: 16px; }
.field > label, .field > .lbl { display: block; font-size: .8125rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.required { color: var(--danger); }
.optional { font-weight: 400; font-size: .75rem; color: var(--text-tertiary); }

.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="number"],
.field input[type="password"], .field input[type="search"], .field input[type="date"],
.field select, .field textarea, .inline-form input[type="text"], .inline-form select {
    width: 100%;
    font-family: var(--font-body);
    font-size: .875rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    min-height: 40px;
    box-shadow: var(--shadow-xs);
    transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-tertiary); }
.field input:focus, .field select:focus, .field textarea:focus, .inline-form input:focus, .inline-form select:focus {
    outline: none; border-color: var(--primary); box-shadow: var(--focus-ring);
}
.field textarea { min-height: 120px; resize: vertical; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field-hint { font-size: .75rem; color: var(--text-tertiary); margin: 5px 0 0; }
.field-error { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--danger); margin-top: 5px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

.check-field { display: flex; align-items: flex-start; gap: 10px; }
.check-field input[type="checkbox"] { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; }
.check-field label { font-size: .8125rem; color: var(--text-secondary); font-weight: 400; }

.radio-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.radio-cards.cols-4 { grid-template-columns: repeat(4, 1fr); }
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card label {
    display: flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 10px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: .8125rem; font-weight: 500;
    color: var(--text); text-align: center; cursor: pointer;
    background: var(--surface);
    transition: border-color var(--dur-fast) ease, background-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.radio-card label:hover { border-color: var(--text-tertiary); }
.radio-card input:checked + label { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 650; box-shadow: 0 0 0 1px var(--primary); }
.radio-card input:focus-visible + label { box-shadow: var(--focus-ring); }
@media (max-width: 720px) { .radio-cards.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px) { .radio-cards, .radio-cards.cols-4 { grid-template-columns: 1fr; } }

.alert { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--radius); padding: 12px 14px; font-size: .8125rem; margin-bottom: 18px; border: 1px solid transparent; }
.alert ul { margin: 6px 0 0; }
.alert .icon { margin-top: 1px; }
.alert-error { background: var(--danger-soft); color: var(--danger-ink); border-color: #F7C9CF; }
.alert-error ul { color: var(--danger-ink); }
.alert-success { background: var(--accent-soft); color: var(--accent-ink); border-color: #B7E6D6; }

/* Assistant / suivi d'étapes */
.wizard-progress { display: flex; justify-content: space-between; list-style: none; margin: 0 0 28px; padding: 0; position: relative; }
.wizard-progress::before { content: ""; position: absolute; top: 14px; left: 10%; right: 10%; height: 2px; background: var(--border); z-index: 0; }
.wizard-step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; flex: 1; text-align: center; }
.wizard-step .dot {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--surface); border: 2px solid var(--border-strong);
    display: grid; place-items: center;
    font-size: .75rem; font-weight: 700; color: var(--text-tertiary);
}
.wizard-step.done .dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.wizard-step.current .dot { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(35, 48, 94, .18); }
.wizard-step.refused .dot { background: var(--danger); border-color: var(--danger); color: #fff; }
.wizard-step .step-label { font-size: .75rem; font-weight: 500; color: var(--text-tertiary); }
.wizard-step.current .step-label { color: var(--text); font-weight: 650; }
.wizard-step.done .step-label { color: var(--accent-ink); }
.wizard-step.refused .step-label { color: var(--danger); }
@media (max-width: 560px) {
    .wizard-step .step-label { display: none; }
    .wizard-step.current .step-label { display: block; position: absolute; top: 38px; white-space: nowrap; }
    .wizard-progress { padding-bottom: 22px; }
}
.wizard-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }

.recap-list { list-style: none; margin: 18px 0 0; padding: 0; }
.recap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.recap-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.recap-label { display: block; font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 2px; }
.recap-value { font-size: .875rem; font-weight: 600; color: var(--text); word-break: break-word; }
.recap-edit { font-size: .75rem; font-weight: 600; color: var(--primary); margin-left: 8px; }
@media (max-width: 640px) { .recap-grid { grid-template-columns: 1fr; } }

.confirm-box { max-width: 600px; margin: 24px auto; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: clamp(30px, 5vw, 52px); box-shadow: var(--shadow); }
.confirm-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; margin: 0 auto 20px; box-shadow: 0 0 0 8px var(--accent-soft); }
.confirm-ref { display: inline-block; background: var(--bg); border: 1px solid var(--border); color: var(--text); font-family: var(--font-mono); font-weight: 600; font-size: .875rem; border-radius: var(--radius-sm); padding: 8px 16px; margin: 8px 0 18px; }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 46px !important; }
.password-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; background: none; border: 0; border-radius: var(--radius-xs); color: var(--text-tertiary); cursor: pointer; }
.password-toggle:hover { color: var(--text); background: var(--hover); }
.password-toggle .icon-off { display: none; }
.password-wrap.is-visible .icon-eye, .password-toggle.is-visible .icon-eye { display: none; }
.password-wrap.is-visible .icon-off, .password-toggle.is-visible .icon-off { display: block; }

/* ---------- Tom Select ---------- */

.ts-wrapper { width: 100%; }
.ts-control {
    position: relative;
    font-family: var(--font-body); font-size: .875rem; color: var(--text);
    background: var(--surface) !important;
    border: 1px solid var(--border-strong) !important;
    border-radius: var(--radius-sm) !important;
    padding: 9px 36px 9px 12px; min-height: 40px;
    display: flex; align-items: center; gap: 6px;
    box-shadow: var(--shadow-xs) !important;
}
.ts-wrapper.focus .ts-control { border-color: var(--primary) !important; box-shadow: var(--focus-ring) !important; }
.ts-control input { font-family: var(--font-body); font-size: .875rem; border: 0 !important; background: none !important; padding: 0 !important; box-shadow: none !important; }
.ts-control .item { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-wrapper.single.has-items .ts-control input { width: 24px !important; min-width: 24px; flex: 0 0 24px; }
.ts-wrapper.single.has-items .ts-control .item { flex: 1; min-width: 0; }
.ts-control::before { display: none; }
.ts-control::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -5px; border-right: 1.5px solid var(--text-tertiary); border-bottom: 1.5px solid var(--text-tertiary); transform: rotate(45deg); transition: transform var(--dur) var(--ease); pointer-events: none; }
.ts-wrapper.dropdown-active .ts-control::after { transform: rotate(225deg); margin-top: -1px; }
.ts-dropdown { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); margin-top: 4px; padding: 4px; font-family: var(--font-body); font-size: .8125rem; overflow: hidden; }
.ts-dropdown .option { padding: 8px 10px; border-radius: var(--radius-xs); }
.ts-dropdown .active { background: var(--primary-soft); color: var(--primary); }
.ts-dropdown .selected:not(.active) { background: var(--hover); }

/* ---------- Pages erreurs ---------- */

.error-box { max-width: 640px; margin: 0 auto; text-align: center; padding: clamp(32px, 6vw, 64px) 20px; }
.error-code { display: inline-block; font-size: clamp(4.5rem, 14vw, 7.5rem); font-weight: 800; line-height: 1; letter-spacing: -.05em; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 8px; }
.error-links { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); }
.error-links p { margin: 0; font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-tertiary); }
.error-links ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.error-links a { display: inline-block; padding: 6px 12px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface); font-size: .8125rem; font-weight: 500; color: var(--text-secondary); }
.error-links a:hover { border-color: var(--border-strong); color: var(--text); }

.prose { max-width: 760px; }
.prose h2 { font-size: 1.375rem; margin-top: 2em; }
.prose h3 { font-size: 1.0625rem; margin-top: 1.6em; }
.prose p, .prose li { color: var(--text-secondary); font-size: .9375rem; }
.prose ul { margin-bottom: 1rem; }

/* ---------- Footer (sombre) ---------- */

.site-footer { background: var(--dark); color: var(--dark-muted); padding: clamp(44px, 6vw, 64px) 0 0; font-size: .8125rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: clamp(26px, 4vw, 52px); padding-bottom: 38px; }
.footer-brand p { color: var(--dark-muted); font-size: .8125rem; max-width: 34ch; }
.footer-logo-box { display: inline-flex; background: #fff; border-radius: var(--radius-sm); padding: 6px 12px; margin-bottom: 14px; }
.footer-logo-box img { height: 30px; width: auto; }
.footer-title { color: #fff; font-size: .75rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-col a { color: var(--dark-muted); }
.footer-col a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .icon { color: var(--accent-bright); margin-top: 2px; }
.footer-cta { margin-top: 16px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border-top: 1px solid var(--dark-border); padding: 18px 0 20px; font-size: .75rem; }
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; gap: 6px 18px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.footer-legal a { color: var(--dark-muted); }
.footer-legal a:hover { color: #fff; }
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Apparition ---------- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   ESPACE MEMBRE / ADMIN
   ========================================================================== */

.app-body { background: var(--bg); min-height: 100vh; font-size: 14px; }
.app-shell { display: flex; min-height: 100vh; }

.user-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--navy, #002358);
    color: #fff; display: grid; place-items: center;
    font-size: .6875rem; font-weight: 700; flex-shrink: 0;
}
.user-chip { display: inline-flex; align-items: center; gap: 9px; padding: 5px 14px 5px 5px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); font-size: .8125rem; font-weight: 600; color: var(--text); white-space: nowrap; }
.logout-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--text-secondary); cursor: pointer; }
.logout-icon:hover { color: var(--danger); border-color: #F7C9CF; background: var(--danger-soft); }

/* Barre latérale sombre */
.app-sidebar {
    width: 248px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    padding: 14px 12px;
    overflow-y: auto;
    background: var(--dark);
    color: var(--dark-muted);
    border-right: 1px solid rgba(0, 0, 0, .2);
}
.app-side-logo { display: block; padding: 4px 6px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--dark-border); }
.side-logo-box { display: inline-flex; background: #fff; border-radius: var(--radius-sm); padding: 6px 12px; }
.side-logo-box img { height: 38px; width: auto; display: block; }

.side-nav { flex: 1; padding: 4px 0; }
.side-label { font-size: .625rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #5D6888; padding: 0 10px; margin: 18px 0 6px; }
.side-label:first-child { margin-top: 6px; }
.side-link {
    position: relative;
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; margin-bottom: 2px;
    border-radius: var(--radius-sm);
    color: var(--dark-muted);
    font-size: .8125rem; font-weight: 500;
    transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
.side-link .icon { color: #6F7A99; transition: color var(--dur-fast) ease; }
.side-link:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.side-link:hover .icon { color: #fff; }
.side-link.is-active { background: rgba(255, 255, 255, .09); color: #fff; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.side-link.is-active .icon { color: var(--accent-bright); }
.side-link.is-active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-bright); }

.side-user { margin-top: auto; border-top: 1px solid var(--dark-border); padding-top: 10px; }
.side-user form { margin: 0; }
.side-logout {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 8px 10px; border: 0; border-radius: var(--radius-sm);
    background: none; font-family: var(--font-body); font-size: .8125rem; font-weight: 500;
    color: #F29AA6; cursor: pointer;
}
.side-logout:hover { background: rgba(220, 46, 69, .15); color: #fff; }

.app-main { flex: 1; margin-left: 248px; min-width: 0; display: flex; flex-direction: column; }
.app-main main { flex: 1; }
.app-main .container { max-width: none; padding-inline: 28px; }
.app-main .section { padding: 24px 0 40px; }

.side-toggle { display: none; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); cursor: pointer; }
.side-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(11, 17, 41, .5); opacity: 0; visibility: hidden; transition: opacity var(--dur) ease, visibility 0s linear var(--dur); }
.side-backdrop.is-open { opacity: 1; visibility: visible; transition: opacity var(--dur) ease, visibility 0s; }
@media (min-width: 1021px) { .side-backdrop { display: none; } }

.app-footer { padding: 16px 28px; border-top: 1px solid var(--border); text-align: center; color: var(--text-tertiary); }

@media (max-width: 1020px) {
    .app-sidebar { transform: translateX(-100%); transition: transform var(--dur) var(--ease); }
    .app-sidebar.is-open { transform: none; box-shadow: var(--shadow-lg); }
    .side-toggle { display: grid; }
    .app-main { margin-left: 0; }
    .app-main .container { padding-inline: 16px; }
}

/* Barre supérieure */
.app-topbar {
    position: sticky; top: 0; z-index: 45;
    display: flex; align-items: center; gap: 12px;
    min-height: 56px; padding: 8px 28px;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border);
}
.app-topbar-title { font-size: .8125rem; font-weight: 600; color: var(--text-secondary); }

.topbar-user { position: relative; margin-left: auto; }
.topbar-user-btn {
    display: flex; align-items: center; gap: 9px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-pill); padding: 3px 12px 3px 3px;
    font-family: var(--font-body); color: var(--text); cursor: pointer;
    transition: border-color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.topbar-user-btn:hover, .topbar-user.is-open .topbar-user-btn { border-color: var(--border-strong); background: var(--hover); }
.topbar-user-btn .icon { color: var(--text-tertiary); transition: transform var(--dur) var(--ease); }
.topbar-user.is-open .topbar-user-btn .icon:last-child { transform: rotate(180deg); }
.topbar-user-meta { text-align: left; line-height: 1.2; }
.topbar-user-meta strong { display: block; font-size: .8125rem; font-weight: 650; }
.topbar-user-meta .sub { display: block; font-size: .6875rem; color: var(--text-tertiary); }

.topbar-menu {
    position: absolute; right: 0; top: calc(100% + 6px);
    min-width: 210px; padding: 4px; z-index: 70;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    transform-origin: top right;
    opacity: 0; visibility: hidden; transform: scale(.96) translateY(-4px);
    transition: opacity var(--dur-fast) ease, transform var(--dur) var(--ease), visibility 0s linear var(--dur);
}
.topbar-user.is-open .topbar-menu { opacity: 1; visibility: visible; transform: none; transition: opacity var(--dur-fast) ease, transform var(--dur) var(--ease), visibility 0s; }
.topbar-menu a, .topbar-menu button {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 8px 10px; border: 0; background: none; border-radius: var(--radius-xs);
    font-family: var(--font-body); font-size: .8125rem; font-weight: 500;
    color: var(--text); text-decoration: none; cursor: pointer; text-align: left;
}
.topbar-menu a:hover, .topbar-menu button:hover { background: var(--hover); color: var(--text); }
.topbar-menu .icon { color: var(--text-tertiary); }
.topbar-menu form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--border); }
.topbar-menu .is-danger, .topbar-menu .is-danger .icon { color: var(--danger); }
.topbar-menu .is-danger:hover { background: var(--danger-soft); }

@media (max-width: 640px) {
    .app-topbar { padding: 8px 14px; }
    .app-topbar-title, .topbar-user-meta { display: none; }
    .topbar-user-btn { padding: 3px; }
    .topbar-user-btn .icon:last-child { display: none; }
}

/* En-tête de page */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 1.5rem; letter-spacing: -.025em; margin: 0; }
.page-head .crumb { display: block; font-size: .75rem; font-weight: 500; color: var(--text-tertiary); margin-bottom: 4px; }
.page-head .crumb a { color: var(--text-tertiary); }
.page-head .crumb a:hover { color: var(--primary); }
.page-head p.sub { margin: 4px 0 0; font-size: .8125rem; color: var(--text-secondary); }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Panneaux */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; box-shadow: var(--shadow-xs); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); min-height: 52px; }
.panel-head h2, .panel-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .875rem; font-weight: 650; letter-spacing: -.005em; }
.panel-head h2 .count, .panel-head h3 .count { font-size: .6875rem; font-weight: 600; color: var(--text-secondary); background: var(--hover); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 1px 7px; }
.panel-head .panel-sub { font-size: .75rem; color: var(--text-tertiary); }
.panel-pad, .panel > form, .panel > .panel-pad { padding: 18px; }
.panel > .alert { margin: 14px 14px 0; }

.side-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-xs); }
.side-panel h3 { font-size: .9375rem; margin: 16px 0 10px; }
.side-panel h3:first-child { margin-top: 0; }
.side-panel ul { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.side-panel ul li { display: flex; gap: 10px; align-items: flex-start; font-size: .8125rem; }
.side-panel ul .icon { width: 28px; height: 28px; padding: 6px; margin-top: -3px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-ink); }

/* Cartes statistiques (compatibilité) */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card { position: relative; display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; color: inherit; text-decoration: none; box-shadow: var(--shadow-xs); }
a.stat-card { transition: border-color var(--dur-fast) ease, box-shadow var(--dur) var(--ease); }
a.stat-card:hover { color: inherit; border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.stat-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; margin-bottom: 12px; background: var(--primary-soft); color: var(--primary); }
.stat-card:nth-child(4n+2) .stat-icon { background: var(--amber-soft); color: var(--amber); }
.stat-card:nth-child(4n+3) .stat-icon { background: var(--accent-soft); color: var(--accent-ink); }
.stat-card:nth-child(4n+4) .stat-icon { background: var(--violet-soft); color: var(--violet); }
.stat-card .num { display: block; font-size: 1.625rem; font-weight: 750; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-card .lbl { display: block; font-size: .75rem; font-weight: 500; color: var(--text-secondary); margin-top: 3px; }
.stat-card.is-alert { border-color: rgba(35, 48, 94, .35); box-shadow: 0 0 0 3px rgba(35, 48, 94, .08); }
@media (max-width: 980px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Tableau de bord ---------- */

.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.dash-grid > .panel { margin-bottom: 0; }
.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }
@media (max-width: 1180px) {
    .span-3 { grid-column: span 6; }
    .span-8, .span-7, .span-5, .span-4 { grid-column: span 12; }
}
@media (max-width: 640px) { .span-3, .span-6 { grid-column: span 12; } }

/* KPI */
.kpi {
    position: relative;
    display: flex; flex-direction: column; gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    color: inherit;
    text-decoration: none;
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    transition: border-color var(--dur-fast) ease, box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
a.kpi:hover { color: inherit; border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-label { font-size: .75rem; font-weight: 600; color: var(--text-secondary); }
.kpi-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); }
.kpi-icon.is-green { background: var(--accent-soft); color: var(--accent-ink); }
.kpi-icon.is-amber { background: var(--amber-soft); color: var(--amber); }
.kpi-icon.is-violet { background: var(--violet-soft); color: var(--violet); }
.kpi-icon.is-red { background: var(--danger-soft); color: var(--danger); }
.kpi-value { font-size: 1.875rem; font-weight: 750; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); }
.kpi-value small { font-size: .875rem; font-weight: 600; letter-spacing: 0; color: var(--text-tertiary); margin-left: 3px; }
.kpi-foot { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--text-tertiary); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: .6875rem; font-weight: 700; padding: 2px 6px; border-radius: var(--radius-pill); background: var(--hover); color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.delta.is-up { background: var(--accent-soft); color: var(--accent-ink); }
.delta.is-down { background: var(--danger-soft); color: var(--danger-ink); }
.kpi.is-highlight { border-color: transparent; background: linear-gradient(135deg, var(--primary) 0%, var(--navy) 100%); color: #fff; box-shadow: 0 10px 24px -10px rgba(35, 48, 94, .6); }
.kpi.is-highlight .kpi-label, .kpi.is-highlight .kpi-foot { color: rgba(255, 255, 255, .75); }
.kpi.is-highlight .kpi-value { color: #fff; }
.kpi.is-highlight .kpi-icon { background: rgba(255, 255, 255, .16); color: #fff; }
.kpi.is-highlight .delta { background: rgba(255, 255, 255, .16); color: #fff; }
.kpi .bar { height: 6px; border-radius: 999px; background: var(--hover); overflow: hidden; }
.kpi .bar > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

/* Graphiques */
.charts-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 16px; }
.charts-grid .panel { margin-bottom: 0; }
.chart-wrap { padding: 14px 16px 16px; height: 260px; position: relative; }
.chart-wrap canvas { max-height: 100%; }
.chart-donut { height: 260px; }
@media (max-width: 880px) { .charts-grid { grid-template-columns: 1fr; } }

.legend-list { list-style: none; margin: 0; padding: 4px 16px 16px; display: grid; gap: 8px; }
.legend-list li { display: flex; align-items: center; gap: 10px; font-size: .8125rem; }
.legend-list .sw { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend-list .lv { margin-left: auto; font-weight: 650; font-variant-numeric: tabular-nums; }
.legend-list .lp { width: 44px; text-align: right; color: var(--text-tertiary); font-size: .75rem; font-variant-numeric: tabular-nums; }

/* Fil d'activité / liste à traiter */
.feed { list-style: none; margin: 0; padding: 0; }
.feed-item { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--border); color: inherit; transition: background-color var(--dur-fast) ease; }
.feed-item:last-child { border-bottom: 0; }
a.feed-item:hover { background: var(--surface-2); color: inherit; }
.feed-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; background: var(--primary-soft); color: var(--primary); }
.feed-icon.is-green { background: var(--accent-soft); color: var(--accent-ink); }
.feed-icon.is-amber { background: var(--amber-soft); color: var(--amber); }
.feed-icon.is-violet { background: var(--violet-soft); color: var(--violet); }
.feed-body { min-width: 0; flex: 1; }
.feed-title { display: block; font-size: .8125rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-meta { display: block; font-size: .75rem; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-side { text-align: right; flex-shrink: 0; }
.feed-amount { display: block; font-size: .8125rem; font-weight: 650; font-variant-numeric: tabular-nums; }

.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 30px 20px; color: var(--text-secondary); font-size: .8125rem; }
.empty-state .empty-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--hover); color: var(--text-tertiary); margin-bottom: 4px; }
.empty-state strong { color: var(--text); font-size: .875rem; }
.empty-state p { margin: 0 0 6px; max-width: 42ch; }

/* Carte « compte » sombre (espace client) */
.account-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: flex; flex-direction: column; justify-content: space-between; gap: 22px;
    min-height: 220px;
    padding: 22px;
    border-radius: var(--radius-lg);
    color: #fff;
    background:
        radial-gradient(60% 80% at 100% 0%, rgba(254, 120, 1, .22), transparent 70%),
        radial-gradient(60% 80% at 0% 100%, rgba(35, 48, 94, .6), transparent 70%),
        var(--dark);
    box-shadow: 0 16px 40px -18px rgba(11, 17, 41, .7);
}
.account-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 32px 32px;
    -webkit-mask-image: linear-gradient(120deg, transparent 40%, #000);
    mask-image: linear-gradient(120deg, transparent 40%, #000);
}
.account-hero .ah-label { font-size: .6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--dark-muted); }
.account-hero .ah-value { font-size: clamp(1.9rem, 3.2vw, 2.5rem); font-weight: 750; letter-spacing: -.035em; line-height: 1.05; font-variant-numeric: tabular-nums; margin-top: 6px; }
.account-hero .ah-value small { font-size: 1rem; font-weight: 600; color: var(--dark-muted); margin-left: 4px; letter-spacing: 0; }
.account-hero .ah-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.account-hero .ah-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; padding: 5px 10px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .08); border: 1px solid var(--dark-border); color: var(--dark-text); }
.account-hero .ah-pill b { color: #fff; font-variant-numeric: tabular-nums; }
.account-hero .ah-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.account-hero .btn-primary { background: var(--accent); }
.account-hero .btn-primary:hover { background: var(--accent-ink); }

/* Carte bancaire */
.bank-card {
    display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
    height: 100%;
    min-height: 220px;
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(135deg, #FFFFFF 0%, #F2F5FC 100%);
    box-shadow: var(--shadow-xs);
}
.bank-card .bc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bank-card .bc-chip { width: 36px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, #E8C877, #C9A24A); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.bank-card .bc-bank { font-size: .9375rem; font-weight: 700; letter-spacing: -.01em; }
.bank-card .bc-iban { font-family: var(--font-mono); font-size: .9375rem; font-weight: 600; letter-spacing: .04em; color: var(--text); }
.bank-card .bc-holder { font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-tertiary); }
.bank-card.is-empty { align-items: flex-start; justify-content: center; border-style: dashed; background: var(--surface); }

/* Suivi de la dernière demande */
.tracker { padding: 18px 16px 6px; }
.tracker .wizard-progress { margin-bottom: 16px; }
.tracker-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border-top: 1px solid var(--border); }
.tracker-meta > div { background: var(--surface); padding: 12px 16px; }
.tracker-meta .k { font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-tertiary); }
.tracker-meta .v { font-size: .875rem; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .tracker-meta { grid-template-columns: 1fr; } }

/* Actions rapides */
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 14px; }
.quick-action {
    display: flex; flex-direction: column; gap: 10px;
    padding: 14px; border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--text); background: var(--surface);
    transition: border-color var(--dur-fast) ease, box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.quick-action:hover { color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.quick-action strong { font-size: .8125rem; font-weight: 650; }
.quick-action span.qa-sub { font-size: .75rem; color: var(--text-tertiary); margin-top: -6px; }

/* Tableaux */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.data-table th {
    text-align: left;
    font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    color: var(--text-tertiary);
    padding: 9px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; transition: background-color var(--dur-fast) ease; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: var(--surface-2); }
.data-table tr.is-unread td { background: #F7F9FF; font-weight: 600; }
.data-table tr.is-unread td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.data-table .num, .data-table td.amount { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.data-table th.amount { text-align: right; }
.cell-strong { font-weight: 650; color: var(--text); }
.cell-sub { display: block; font-size: .75rem; color: var(--text-tertiary); }
.row-link { font-family: var(--font-mono); font-size: .75rem; font-weight: 600; color: var(--primary); background: var(--primary-soft); padding: 3px 7px; border-radius: var(--radius-xs); white-space: nowrap; }
.row-link:hover { color: var(--primary-hover); background: #DFE5FB; }
.unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px rgba(35, 48, 94, .18); }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .6875rem; font-weight: 650; border-radius: var(--radius-pill); padding: 3px 9px 3px 7px; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-navy { background: var(--primary-soft); color: var(--primary); border-color: rgba(35, 48, 94, .18); }
.badge-green { background: var(--green-soft); color: var(--green-ink); border-color: rgba(22, 163, 127, .22); }
.badge-amber { background: var(--amber-soft); color: var(--amber); border-color: rgba(194, 101, 10, .2); }
.badge-red { background: var(--danger-soft); color: var(--danger-ink); border-color: rgba(220, 46, 69, .2); }
.badge-gray { background: var(--hover); color: var(--text-secondary); border-color: var(--border); }

/* Filtres : contrôle segmenté */
.filters { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; margin: 12px 16px; border-radius: var(--radius-sm); background: var(--hover); border: 1px solid var(--border); }
.filters a { font-size: .75rem; font-weight: 600; padding: 5px 11px; border-radius: 6px; color: var(--text-secondary); }
.filters a:hover { color: var(--text); }
.filters a.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.table-toolbar .filters { margin: 0 0 0 auto; }
.table-search { display: flex; align-items: center; gap: 8px; margin: 0; flex: 1; min-width: 240px; max-width: 420px; }
.table-search .icon { color: var(--text-tertiary); flex-shrink: 0; }
.table-search input[type="search"] { flex: 1; min-width: 0; font-family: var(--font-body); font-size: .8125rem; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 8px 11px; box-shadow: var(--shadow-xs); }
.table-search input[type="search"]:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }
.table-search .btn { flex-shrink: 0; }
@media (max-width: 720px) {
    .table-toolbar { flex-direction: column; align-items: stretch; }
    .table-search { max-width: none; }
    .table-toolbar .filters { margin-left: 0; }
}

.inline-form { display: inline-flex; align-items: center; gap: 8px; }
.inline-form select, .inline-form input[type="text"] { width: auto; min-height: 32px; padding: 6px 10px; font-size: .75rem; }
.inline-form .btn, .inline-form button { min-height: 32px; padding: 6px 12px; font-size: .75rem; }

.pager { padding: 12px 16px; border-top: 1px solid var(--border); }
.pager nav { display: flex; justify-content: center; }
.pager .pagination { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.pager .page-link, .pager span[aria-current] span, .pager a { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 9px; border-radius: var(--radius-xs); font-size: .75rem; font-weight: 600; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.pager a:hover { border-color: var(--border-strong); background: var(--hover); }
.pager [aria-current] span, .pager span.relative.inline-flex { background: var(--primary); border-color: var(--primary); color: #fff; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; padding: 18px; }
.detail-full, .detail-media { grid-column: 1 / -1; }
.detail-grid .k { font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 3px; }
.detail-grid .v { font-size: .875rem; color: var(--text); word-break: break-word; }
@media (max-width: 640px) { .detail-grid { grid-template-columns: 1fr; } }

/* ---------- Accessibilité ---------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
    .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   SITE PUBLIC - style éditorial européen
   Fond crème, grands titres noirs, boutons noirs arrondis, photos réelles,
   une seule couleur d'accent. Limité au site public via .site-body.
   ========================================================================== */

.site-body {
    --ink: #0E0E10;
    --ink-2: #3B3B40;
    --ink-3: #6E6E76;
    --cream: #F5F2EC;
    --cream-2: #EAE5DB;
    --line: #E4DFD5;
    --primary: #0E0E10;
    --primary-hover: #2A2A2F;
    --text: var(--ink);
    --text-secondary: var(--ink-3);
    --border: var(--line);
    --font-display: "Inter Tight", "Inter", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --container: 1240px;
    --header-height: 72px;

    font-family: var(--font-body);
    font-size: 16px;
    color: var(--ink);
    background: #fff;
    letter-spacing: -.005em;
}

.site-body h1, .site-body h2, .site-body h3, .site-body h4 { font-family: var(--font-display); color: var(--ink); }
.site-body h1 { font-size: clamp(2.75rem, 6.2vw, 5.25rem); font-weight: 700; line-height: 1; letter-spacing: -.045em; }
.site-body h2 { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 700; line-height: 1.04; letter-spacing: -.04em; }
.site-body h3 { font-size: 1.25rem; font-weight: 650; letter-spacing: -.02em; }
.site-body .lead { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); color: var(--ink-3); line-height: 1.55; }
.site-body a { color: var(--ink); }
.site-body a:hover { color: var(--ink-2); }

.site-body .section { padding: clamp(72px, 9vw, 136px) 0; }
.site-body .section-alt { background: var(--cream); border: 0; }

/* Sur-titre : simple texte, sans pastille */
.site-body .eyebrow {
    background: none;
    border: 0;
    padding: 0;
    font-family: var(--font-body);
    font-size: .875rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink-3);
    margin-bottom: 18px;
}
.site-body .eyebrow::before { display: none; }

/* Boutons : noir plein, pilule */
.site-body .btn { border-radius: 999px; font-weight: 600; font-size: .9375rem; padding: 12px 22px; min-height: 46px; letter-spacing: -.01em; }
.site-body .btn-sm { min-height: 38px; padding: 8px 16px; font-size: .875rem; }
.site-body .btn-lg { min-height: 54px; padding: 15px 28px; font-size: 1rem; }
.site-body .btn-primary { background: var(--navy); color: #fff; box-shadow: none; }
.site-body .btn-primary:hover { background: var(--navy-deep); color: #fff; }
.site-body .btn-secondary { background: transparent; color: var(--ink); border: 1px solid #CFC9BD; box-shadow: none; }
.site-body .btn-secondary:hover { background: rgba(14, 14, 16, .04); border-color: var(--ink); color: var(--ink); }
.site-body .btn-light { background: #fff; color: var(--ink); }
.site-body .btn-light:hover { background: var(--cream); color: var(--ink); }
.site-body .btn-outline-light { border-color: rgba(255, 255, 255, .35); background: transparent; color: #fff; }
.site-body .btn-outline-light:hover { color: #fff; }
.site-body .link-arrow { color: var(--ink); font-weight: 600; font-size: .9375rem; }
.site-body .link-arrow:hover { color: var(--ink-2); }

/* Header : blanc, minimal */
.site-body .site-header {
    background: rgba(255, 255, 255, .97);
    border-bottom: 2px solid transparent;
    transition: border-color .22s ease, box-shadow .22s ease;
}
.site-body .site-header.is-scrolled {
    border-bottom-color: var(--accent);
    box-shadow: 0 4px 28px -8px rgba(15, 23, 42, .10);
}
.site-body .brand-logo { height: 44px; }
.site-body .nav-link {
    color: var(--ink-2);
    font-size: .9375rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 999px;
    transition: color .15s ease, background .15s ease;
}
.site-body .nav-link:hover { background: var(--navy-soft); color: var(--navy); }
.site-body .nav-link.is-active { background: var(--navy); color: #fff; font-weight: 600; }
.site-body .nav-actions-desktop .btn-secondary { border: 0; color: var(--ink-2); }
.site-body .nav-actions-desktop .btn-secondary:hover { background: var(--navy-soft); color: var(--navy); }

/* Bandeau de page : crème, grand titre noir */
.site-body .page-hero { background: var(--cream); color: var(--ink); padding: clamp(64px, 8vw, 120px) 0 clamp(48px, 6vw, 80px); }
.site-body .page-hero::before { display: none; }
.site-body .page-hero h1 { color: var(--ink); font-size: clamp(2.5rem, 5.4vw, 4.4rem); }
.site-body .page-hero .lead { color: var(--ink-3); }
.site-body .page-hero .eyebrow { color: var(--ink-3); background: none; }
.site-body .section-auth { background: var(--cream); }

/* Blocs génériques des pages internes */
.site-body .card, .site-body .trust-item, .site-body .step, .site-body .why-item, .site-body .side-panel, .site-body .accordion-item {
    border: 0;
    border-radius: 20px;
    box-shadow: none;
    background: #fff;
}
.site-body .section:not(.section-alt) .card,
.site-body .section:not(.section-alt) .trust-item,
.site-body .section:not(.section-alt) .step,
.site-body .section:not(.section-alt) .why-item,
.site-body .section:not(.section-alt) .side-panel,
.site-body .section:not(.section-alt) .accordion-item { background: var(--cream); }
.site-body .card:hover { transform: none; box-shadow: none; }
.site-body .card { padding: 14px 14px 22px; }
.site-body .card-media { margin: 0 0 18px; border-radius: 14px; border: 0; }
.site-body .card > :not(.card-media) { margin-inline: 6px; }
.site-body .card-icon { display: none; }
.site-body .trust-item h3 .icon, .site-body .why-item .icon, .site-body .side-panel ul .icon { background: #fff; color: var(--ink); }
.site-body .section-alt .trust-item h3 .icon, .site-body .section-alt .why-item .icon { background: var(--cream); }
.site-body .step-num, .site-body .step:nth-child(even) .step-num { background: var(--ink); font-family: var(--font-display); }
.site-body .info-strip { background: transparent; border: 1px solid var(--line); color: var(--ink-3); border-radius: 14px; }
.site-body .info-strip .icon { color: var(--ink); }
.site-body .media-frame { border: 0; border-radius: 24px; box-shadow: none; }
.site-body .form-card { border: 0; border-radius: 24px; box-shadow: 0 1px 0 var(--line), 0 30px 60px -40px rgba(14, 14, 16, .3); }
.site-body .field input:focus, .site-body .field select:focus, .site-body .field textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(14, 14, 16, .1); }
.site-body .radio-card input:checked + label { border-color: var(--ink); background: var(--cream); color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.site-body .wizard-step.current .dot { background: var(--ink); border-color: var(--ink); box-shadow: 0 0 0 4px rgba(14, 14, 16, .1); }
.site-body .accordion-trigger { font-family: var(--font-display); font-size: 1.0625rem; padding: 20px 22px; }
.site-body .accordion-trigger:hover { background: transparent; }
.site-body .accordion-trigger[aria-expanded="true"] .icon { color: var(--ink); }
.site-body .accordion-panel-inner { padding: 0 22px 20px; font-size: .9375rem; }
.site-body .confirm-box { border: 0; border-radius: 24px; }
.site-body .confirm-icon { background: var(--navy); box-shadow: 0 0 0 8px var(--navy-soft); }

.site-body .cta-band { background: var(--navy); border: 0; border-radius: 28px; }
.site-body .cta-band::before { display: none; }
.site-body .cta-band p { color: #A9A9B2; }

/* Simulateur : carte blanche, résultat noir */
.site-body .simulator { border: 0; border-radius: 28px; box-shadow: 0 40px 80px -50px rgba(14, 14, 16, .35); }
.site-body .sim-results { background: var(--navy); }
.site-body .sim-main-result .unit { color: #C9C3B5; }
.site-body input[type="range"] { background: linear-gradient(90deg, var(--navy) var(--fill, 0%), #E4DFD5 var(--fill, 0%)); }
.site-body input[type="range"]::-webkit-slider-thumb { border-color: var(--ink); }
.site-body .range-value { background: var(--cream); border: 0; }

/* Footer : navy sombre, typographie claire */
.site-body .site-footer { background: var(--navy); color: var(--dark-muted); border-top: none; }
.site-body .footer-logo-box { background: transparent; padding: 0; }
.site-body .footer-logo-box img { height: 40px; filter: brightness(0) invert(1); }
.site-body .footer-brand p { color: var(--dark-muted); }
.site-body .footer-title { color: #fff; text-transform: none; letter-spacing: -.01em; font-size: .9375rem; font-family: var(--font-display); }
.site-body .footer-col a { color: var(--dark-muted); }
.site-body .footer-col a:hover { color: #fff; }
.site-body .footer-contact .icon { color: var(--accent-bright); }
.site-body .site-footer .btn-light { background: var(--accent); color: #fff; border: none; }
.site-body .site-footer .btn-light:hover { background: var(--accent-bright); color: #fff; }
.site-body .footer-bottom { border-top-color: rgba(255,255,255,.10); color: var(--dark-muted); }
.site-body .footer-legal a { color: var(--dark-muted); }
.site-body .footer-legal a:hover { color: #fff; }

/* ---------- Page d'accueil ---------- */

/* Hero plein écran – image de fond */
.lp-hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: var(--navy-deep);
}

.lp-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.lp-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        108deg,
        rgba(14, 21, 48, .92) 0%,
        rgba(14, 21, 48, .68) 50%,
        rgba(14, 21, 48, .22) 100%
    );
}

.lp-hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
}

.lp-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-top: clamp(100px, 14vw, 160px);
    padding-bottom: clamp(80px, 10vw, 128px);
}

.lp-hero-head { max-width: 620px; }
.lp-hero h1 { color: #fff; margin-bottom: 26px; }
.lp-hero h1 em { font-style: normal; color: rgba(255,255,255,.52); }
.lp-hero .eyebrow { color: var(--accent-bright); }
.lp-hero .lead { color: rgba(255,255,255,.78); max-width: 520px; margin-bottom: 32px; }
.lp-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.lp-hero-note { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 28px 0 0; padding: 0; font-size: .875rem; color: rgba(255,255,255,.55); }
.lp-hero-note li { display: inline-flex; align-items: center; gap: 7px; }
.lp-hero-note .icon { color: var(--accent-bright); }

.lp-float {
    position: absolute;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border-radius: 14px;
    padding: 10px 14px 10px 10px;
    box-shadow: 0 16px 32px -16px rgba(14, 14, 16, .30);
    font-size: .8125rem;
    max-width: 240px;
}
.lp-float strong { display: block; font-family: var(--font-display); font-size: .875rem; letter-spacing: -.01em; }
.lp-float .sub { display: block; color: var(--ink-3); font-size: .75rem; line-height: 1.35; }
.lp-float-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--cream); color: var(--ink); flex-shrink: 0; }
.lp-float-a { left: clamp(16px, 4vw, 48px); bottom: clamp(16px, 4vw, 48px); }
.lp-float-b { right: clamp(16px, 4vw, 48px); bottom: clamp(80px, 12vw, 160px); }
.lp-float .tag-ok { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 3px 9px; }

/* Bandeau d'engagements */
.lp-pillars { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.lp-pillar { padding: 32px 28px 32px 0; }
.lp-pillar + .lp-pillar { padding-left: 28px; border-left: 1px solid var(--line); }
.lp-pillar strong { display: block; font-family: var(--font-display); font-size: 1.125rem; letter-spacing: -.02em; margin-bottom: 6px; }
.lp-pillar span { font-size: .875rem; color: var(--ink-3); }

/* En-tête de section : titre à gauche, texte à droite */
.lp-head { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px 64px; align-items: end; margin-bottom: clamp(40px, 5vw, 64px); }
.lp-head h2 { margin: 0; }
.lp-head p { margin: 0; color: var(--ink-3); font-size: 1.0625rem; max-width: 46ch; }

/* Solutions */
.lp-solutions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.lp-solution { display: flex; flex-direction: column; color: var(--ink); }
.lp-solution:hover { color: var(--ink); }
.lp-solution-media { aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden; background: var(--cream); margin-bottom: 18px; }
.lp-solution-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.lp-solution:hover .lp-solution-media img { transform: scale(1.04); }
.lp-solution h3 { margin-bottom: 6px; }
.lp-solution p { color: var(--ink-3); font-size: .9375rem; margin-bottom: 12px; }
.lp-solution .more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9375rem; }
.lp-solution .more .icon { transition: transform .3s var(--ease); }
.lp-solution:hover .more .icon { transform: translateX(4px); }

/* Bloc image + texte */
.lp-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.lp-split h2 { margin-bottom: 20px; }
.lp-split > div > p { color: var(--ink-3); font-size: 1.0625rem; max-width: 48ch; }
.lp-checks { list-style: none; margin: 28px 0 32px; padding: 0; display: grid; gap: 16px; }
.lp-checks li { display: flex; gap: 12px; align-items: flex-start; }
.lp-checks .icon { color: var(--accent); margin-top: 2px; }
.lp-checks strong { display: block; font-weight: 600; }
.lp-checks span { color: var(--ink-3); font-size: .9375rem; }

.lp-visual { position: relative; border-radius: 28px; overflow: hidden; background: var(--cream); aspect-ratio: 1 / 1; }
.lp-visual > img { width: 100%; height: 100%; object-fit: cover; }

/* Maquette du suivi en ligne */
.lp-app {
    position: absolute;
    left: 7%; right: 7%; bottom: 7%;
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 30px 60px -30px rgba(14, 14, 16, .45);
}
.lp-app-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.lp-app-head strong { font-family: var(--font-display); font-size: 1rem; letter-spacing: -.01em; }
.lp-app-ref { font-family: var(--font-mono); font-size: .75rem; color: var(--ink-3); }
.lp-track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.lp-track span { height: 6px; border-radius: 99px; background: var(--cream-2); }
.lp-track span.on { background: var(--ink); }
.lp-track-labels { display: grid; grid-template-columns: repeat(3, 1fr); font-size: .75rem; color: var(--ink-3); }
.lp-track-labels b { color: var(--ink); font-weight: 600; }

/* Étapes */
.lp-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 28px; }
.lp-step { padding-top: 24px; border-top: 2px solid var(--ink); }
.lp-step .n { display: block; font-family: var(--font-display); font-size: .875rem; font-weight: 700; color: var(--ink-3); margin-bottom: 36px; }
.lp-step h3 { font-size: 1.1875rem; }
.lp-step p { color: var(--ink-3); font-size: .9375rem; margin: 0; }
.lp-disclaimer { margin-top: 48px; font-size: .8125rem; color: var(--ink-3); display: flex; gap: 8px; align-items: flex-start; max-width: 720px; }

/* Engagements 2x2 */
.lp-values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.lp-value { background: var(--cream); border-radius: 22px; padding: 30px; }
.lp-value .icon { width: 44px; height: 44px; padding: 11px; border-radius: 12px; background: var(--cream); color: var(--ink); margin-bottom: 22px; }
.lp-value h3 { margin-bottom: 8px; }
.lp-value p { color: var(--ink-3); font-size: .9375rem; margin: 0; }

/* Appel final */
.lp-cta { background: var(--navy); color: #fff; border-radius: 32px; padding: clamp(44px, 7vw, 96px); display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px 64px; align-items: end; }
.lp-cta h2 { color: #fff; margin: 0; }
.lp-cta p { color: rgba(255,255,255,.65); margin: 0 0 24px; font-size: 1.0625rem; }

@media (max-width: 1080px) {
    .lp-solutions { grid-template-columns: repeat(2, 1fr); }
    .lp-pillars { grid-template-columns: repeat(2, 1fr); }
    .lp-pillar:nth-child(3) { padding-left: 0; border-left: 0; }
    .lp-pillar:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 880px) {
    .lp-head, .lp-split, .lp-cta { grid-template-columns: 1fr; }
    .lp-steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
    .lp-float-b { display: none; }
}
@media (max-width: 560px) {
    .lp-solutions, .lp-values, .lp-steps, .lp-pillars { grid-template-columns: 1fr; }
    .lp-pillar, .lp-pillar + .lp-pillar { padding: 22px 0; border-left: 0; }
    .lp-pillar + .lp-pillar { border-top: 1px solid var(--line); }
    .lp-float-a { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

/* ---------- Animations du site public ---------- */

.site-body {
    --ease-out-expo: cubic-bezier(.16, 1, .3, 1);
}

/* Apparition au défilement : montée douce, en cascade */
.site-body .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .9s var(--ease-out-expo), transform .9s var(--ease-out-expo);
    transition-delay: var(--reveal-delay, 0ms);
}
.site-body .reveal.is-visible { opacity: 1; transform: none; }

/* Intro du hero au chargement */
@keyframes lp-rise {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: none; }
}
@keyframes lp-unveil {
    from { opacity: 0; transform: translateY(40px) scale(.98); clip-path: inset(12% 6% 0 6% round 28px); }
    to { opacity: 1; transform: none; clip-path: inset(0 0 0 0 round 28px 28px 0 0); }
}
@keyframes lp-pop {
    from { opacity: 0; transform: translateY(16px) scale(.94); }
    to { opacity: 1; transform: none; }
}
@keyframes lp-float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -6px; }
}
@keyframes lp-bg-reveal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lp-hero-head > * { animation: lp-rise 1s var(--ease-out-expo) both; }
.lp-hero-head > :nth-child(1) { animation-delay: .05s; }
.lp-hero-head > :nth-child(2) { animation-delay: .15s; }
.lp-hero-head > :nth-child(3) { animation-delay: .3s; }
.lp-hero-head > :nth-child(4) { animation-delay: .42s; }
.lp-hero-head > :nth-child(5) { animation-delay: .54s; }

.lp-hero-bg { animation: lp-bg-reveal 1.6s var(--ease-out-expo) both; }
.lp-hero-bg .lp-hero-photo { will-change: transform; transform: scale(1.06); }

.lp-float { animation: lp-pop .9s var(--ease-out-expo) both, lp-float 6s ease-in-out 2s infinite; }
.lp-float-a { animation-delay: 1s, 2s; }
.lp-float-b { animation-delay: 1.2s, 3.5s; }

.lp-visual > img { will-change: transform; transform: scale(1.08); }

/* Cartes solutions : image qui s'agrandit, flèche qui avance */
.lp-solution-media { transition: border-radius .5s var(--ease-out-expo); }
.lp-solution:hover .lp-solution-media { border-radius: 30px; }

/* Étapes : le trait se dessine */
.lp-step { position: relative; border-top-color: var(--line); }
.lp-step::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -2px;
    height: 2px;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.1s var(--ease-out-expo);
    transition-delay: calc(var(--reveal-delay, 0ms) + 200ms);
}
.lp-step.is-visible::before { transform: scaleX(1); }

/* Maquette du suivi : les barres se remplissent */
.lp-track span { position: relative; overflow: hidden; }
.lp-track span.on::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .9s var(--ease-out-expo);
}
.lp-track span.on { background: var(--cream-2); }
.lp-visual.is-visible .lp-track span.on::after { transform: scaleX(1); }
.lp-visual.is-visible .lp-track span.on:nth-child(2)::after { transition-delay: .7s; }
.lp-app { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease-out-expo) .3s, transform .8s var(--ease-out-expo) .3s; }
.lp-visual.is-visible .lp-app { opacity: 1; transform: none; }

/* Engagements : léger soulèvement au survol */
.lp-value { transition: transform .5s var(--ease-out-expo), background-color .3s ease; }
.lp-value:hover { transform: translateY(-4px); background: var(--cream-2); }

/* Boutons : flèche et pression */
.site-body .btn-primary, .site-body .btn-light { transition: background-color .2s ease, transform .4s var(--ease-out-expo); }
.site-body .btn-primary:hover, .site-body .btn-light:hover { transform: translateY(-2px); }

/* Mouvement réduit : tout s'affiche immédiatement */
@media (prefers-reduced-motion: reduce) {
    .site-body .reveal, .lp-app { opacity: 1; transform: none; transition: none; }
    .lp-hero-head > *, .lp-hero-bg, .lp-float { animation: none; }
    .lp-step::before, .lp-track span.on::after { transform: none; transition: none; }
    .lp-hero-bg .lp-hero-photo, .lp-visual > img { transform: none; }
}

/* ---------- Demande de financement ---------- */

.site-body .fin-section { padding-top: clamp(40px, 5vw, 72px); }
.fin-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(28px, 4vw, 56px); align-items: start; }
.fin-aside { position: sticky; top: calc(var(--header-height) + 24px); }

.site-body .fin-card { padding: clamp(24px, 4vw, 44px); }

/* Progression : barres segmentées, comme le suivi de l'accueil */
.fin-progress { list-style: none; margin: 0 0 clamp(28px, 4vw, 40px); padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fin-progress-step > a, .fin-progress-step > span { display: block; color: var(--ink-3); text-decoration: none; }
.fin-progress-bar { display: block; height: 4px; border-radius: 99px; background: var(--cream-2); margin-bottom: 12px; transition: background-color .3s ease; }
.fin-progress-step.is-done .fin-progress-bar, .fin-progress-step.is-current .fin-progress-bar { background: var(--navy); }
.fin-progress-label { display: flex; align-items: baseline; gap: 8px; font-size: .8125rem; font-weight: 500; color: var(--ink-3); }
.fin-progress-label .n { font-family: var(--font-display); font-size: .75rem; font-weight: 700; color: var(--ink-3); }
.fin-progress-step.is-current .fin-progress-label { color: var(--ink); font-weight: 600; }
.fin-progress-step.is-current .fin-progress-label .n { color: var(--navy); }
.fin-progress-step.is-done .fin-progress-label { color: var(--ink-2); }
.fin-progress-step.is-done a:hover .fin-progress-label { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.fin-card-head { margin-bottom: 28px; }
.fin-step-count { margin: 0 0 10px; font-size: .875rem; font-weight: 600; color: var(--ink-3); }
.site-body .fin-card-head h2 { margin: 0 0 8px; font-size: clamp(1.625rem, 3vw, 2.25rem); }
.fin-card-head p:last-child { margin: 0; color: var(--ink-3); }

/* Champs : plus grands, coins arrondis, sans ombre */
.fin-card .field { margin-bottom: 22px; }
.fin-card .field > label, .fin-card .field > .lbl { font-size: .875rem; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.fin-card .field-row { gap: 0 16px; }
.fin-card .field input[type="text"], .fin-card .field input[type="email"], .fin-card .field input[type="tel"],
.fin-card .field input[type="number"], .fin-card .field textarea {
    min-height: 52px;
    padding: 14px 16px;
    font-size: 1rem;
    border: 1px solid #D9D3C7;
    border-radius: 14px;
    background: #fff;
    box-shadow: none;
}
.fin-card .field textarea { min-height: 140px; line-height: 1.55; }
.fin-card .ts-control { min-height: 52px; padding: 13px 40px 13px 16px; font-size: 1rem; border: 1px solid #D9D3C7 !important; border-radius: 14px !important; box-shadow: none !important; }
.fin-card .ts-wrapper.focus .ts-control { border-color: var(--ink) !important; box-shadow: 0 0 0 3px rgba(14, 14, 16, .1) !important; }
.fin-card .field-hint { font-size: .8125rem; color: var(--ink-3); margin-top: 6px; }
.fin-card .field.has-error input, .fin-card .field.has-error textarea { border-color: var(--danger); }

.fin-input-suffix { position: relative; }
.fin-input-suffix input { padding-right: 64px !important; }
.fin-input-suffix > span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-weight: 600; color: var(--ink-3); pointer-events: none; }

/* Cartes de choix */
.fin-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fin-choice { position: relative; }
.fin-choice input { position: absolute; opacity: 0; pointer-events: none; }
.fin-choice label {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    height: 100%;
    padding: 18px 44px 18px 18px;
    border: 1px solid #D9D3C7;
    border-radius: 18px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.fin-choice label:hover { border-color: var(--ink-3); }
.fin-choice-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--cream); color: var(--ink); flex-shrink: 0; transition: background-color .15s ease, color .15s ease; }
.fin-choice-text strong { display: block; font-family: var(--font-display); font-size: 1rem; font-weight: 650; letter-spacing: -.01em; color: var(--ink); }
.fin-choice-text span { display: block; margin-top: 3px; font-size: .8125rem; line-height: 1.45; color: var(--ink-3); }
.fin-choice-check { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #CFC9BD; color: transparent; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.fin-choice input:checked + label { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); background: #F7F9FC; }
.fin-choice input:checked + label .fin-choice-icon { background: var(--navy); color: #fff; }
.fin-choice input:checked + label .fin-choice-check { background: var(--navy); border-color: var(--navy); color: #fff; }
.fin-choice input:focus-visible + label { box-shadow: 0 0 0 3px rgba(0, 35, 88, .2); }
.fin-choices.is-compact label { align-items: center; }
.field.has-error .fin-choice label { border-color: var(--danger); }

/* Récapitulatif */
.fin-recap { border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; margin-bottom: 14px; }
.fin-recap-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.site-body .fin-recap-head h3 { margin: 0; font-size: 1rem; }
.fin-recap-head a { font-size: .875rem; font-weight: 600; color: var(--navy); }
.fin-recap dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin: 0; }
.fin-recap dt { margin-bottom: 3px; font-size: .75rem; font-weight: 600; color: var(--ink-3); }
.fin-recap dd { margin: 0; font-size: .9375rem; font-weight: 500; color: var(--ink); word-break: break-word; }
.fin-recap .is-wide { grid-column: 1 / -1; }
.fin-recap dd.is-text { white-space: pre-line; font-weight: 400; line-height: 1.55; }
.fin-consent { margin-top: 24px; }
.fin-card .check-field input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--navy); }
.fin-card .check-field label { font-size: .875rem; line-height: 1.5; }
.fin-card .info-strip { margin-top: 8px; }

.fin-card .wizard-nav { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.fin-flip { transform: rotate(180deg); }

/* Sous la carte */
.fin-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; margin-top: 18px; padding: 0 4px; font-size: .8125rem; color: var(--ink-3); }
.fin-footer .icon { vertical-align: -2px; }
.fin-footer form { margin: 0; }
.fin-reset { padding: 0; border: 0; background: none; font: inherit; color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fin-reset:hover { color: var(--ink); }

/* Colonne latérale */
.fin-aside-card { background: var(--cream); border-radius: 24px; padding: 28px; }
.site-body .fin-aside-card h3 { margin: 0 0 20px; font-size: 1.125rem; }
.fin-next { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.fin-next li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.fin-next .n { padding-top: 2px; font-family: var(--font-display); font-size: .8125rem; font-weight: 700; color: var(--ink-3); }
.fin-next strong { display: block; font-size: .9375rem; font-weight: 600; }
.fin-next p { margin: 2px 0 0; font-size: .875rem; line-height: 1.5; color: var(--ink-3); }
.fin-assurances { list-style: none; margin: 24px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: .875rem; color: var(--ink-2); }
.fin-assurances li { display: flex; align-items: flex-start; gap: 8px; }
.fin-assurances .icon { margin-top: 2px; color: var(--accent); flex-shrink: 0; }
.fin-aside-help { margin: 16px 4px 0; font-size: .875rem; color: var(--ink-3); }
.fin-aside-help a { font-weight: 600; }

@media (max-width: 980px) {
    .fin-layout { grid-template-columns: 1fr; }
    .fin-aside { position: static; }
}
@media (max-width: 640px) {
    .fin-progress { gap: 6px; margin-bottom: 24px; }
    .fin-progress-label { display: none; }
    .fin-progress-bar { margin-bottom: 0; }
    .fin-choices { grid-template-columns: 1fr; }
    .fin-recap dl { grid-template-columns: 1fr; }
    .fin-card .wizard-nav { flex-direction: column-reverse; align-items: stretch; }
    .fin-card .wizard-nav .btn { width: 100%; justify-content: center; }
    .fin-card .wizard-nav > div:not(:has(*)) { display: none; }
}

/* ==========================================================================
   ESPACE MEMBRE / ADMIN - palette marque navy/orange
   Surfaces blanc/crème, sidebar navy, boutons navy.
   ========================================================================== */

.app-body {
    --ink: #0E0E10;
    --ink-2: #3B3B40;
    --ink-3: #6E6E76;
    --cream: #F5F2EC;
    --cream-2: #EAE5DB;
    --line: #E4DFD5;
    --primary: #002358;
    --primary-hover: #001540;
    --primary-soft: #E6EDFB;
    --navy: #002358;
    --bg: #F7F5F0;
    --hover: #F3F0EA;
    --surface-2: #FAF8F4;
    --text: var(--ink);
    --text-secondary: var(--ink-3);
    --text-tertiary: #8E8B84;
    --border: var(--line);
    --border-strong: #CFC9BD;
    --dark: #002358;
    --dark-border: rgba(255, 255, 255, .08);
    --dark-muted: #A9B2CE;
    --focus-ring: 0 0 0 3px rgba(14, 14, 16, .12);
    --shadow-xs: 0 1px 2px rgba(14, 14, 16, .04);
    --shadow-sm: 0 1px 2px rgba(14, 14, 16, .04), 0 6px 16px -8px rgba(14, 14, 16, .1);
    --shadow: 0 2px 4px rgba(14, 14, 16, .04), 0 16px 32px -16px rgba(14, 14, 16, .16);
    --font-display: "Inter Tight", "Inter", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
}
.app-body h1, .app-body h2, .app-body h3, .app-body .kpi-value, .app-body .stat-card .num, .app-body .account-hero .ah-value {
    font-family: var(--font-display);
}
.app-body a { color: var(--ink); }
.app-body a:hover { color: var(--ink-2); }

/* Boutons : noir plein, pilule, comme sur le site */
.app-body .btn { border-radius: 999px; }
.app-body .btn-primary { background: var(--navy); color: #fff; box-shadow: none; }
.app-body .btn-primary:hover { background: var(--navy-deep); color: #fff; }
.app-body .btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--ink); box-shadow: none; }
.app-body .btn-secondary:hover { background: var(--hover); border-color: var(--ink); color: var(--ink); }
.app-body .btn-outline-light { color: #fff; }
.app-body .link-arrow { color: var(--ink); }

/* Barre latérale : navy marque */
.app-body .app-sidebar { background: var(--navy); border-right: 0; }
.app-body .side-label { color: rgba(255, 255, 255, .38); }
.app-body .side-link { color: rgba(255, 255, 255, .68); }
.app-body .side-link .icon { color: rgba(255, 255, 255, .45); }
.app-body .side-link:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.app-body .side-link:hover .icon { color: #fff; }
.app-body .side-link.is-active { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: none; }
.app-body .side-link.is-active .icon { color: var(--accent-bright); }
.app-body .side-link.is-active::before { display: block; background: var(--accent-bright); }

/* Barre supérieure */
.app-body .app-topbar { background: rgba(247, 245, 240, .92); border-bottom-color: var(--line); }
.app-body .user-avatar { background: var(--navy); color: #fff; }
.app-body .topbar-user-btn { background: #fff; }

/* Panneaux et cartes : blanc sur crème */
.app-body .panel, .app-body .kpi, .app-body .stat-card, .app-body .side-panel, .app-body .quick-action { border-color: var(--line); box-shadow: none; }
.app-body .panel-head { border-bottom-color: var(--line); }
.app-body .panel-head h2, .app-body .panel-head h3 { font-family: var(--font-display); font-size: .9375rem; }
.app-body .page-head h1 { font-size: 1.875rem; letter-spacing: -.035em; }

/* Icônes des indicateurs : aplats sobres */
.app-body .kpi-icon, .app-body .stat-icon, .app-body .feed-icon { background: var(--cream); color: var(--ink); }
.app-body .kpi-icon.is-green, .app-body .feed-icon.is-green { background: var(--accent-soft); color: var(--accent-ink); }
.app-body .kpi-icon.is-amber, .app-body .feed-icon.is-amber { background: var(--amber-soft); color: var(--amber); }
.app-body .kpi-icon.is-violet, .app-body .feed-icon.is-violet { background: var(--cream); color: var(--ink); }

/* Indicateur mis en avant : navy */
.app-body .kpi.is-highlight { background: var(--navy); border-color: var(--navy); box-shadow: none; }
.app-body .kpi.is-highlight .kpi-icon { background: rgba(255, 255, 255, .12); color: #fff; }
.app-body .kpi .bar { background: var(--cream-2); }
.app-body .kpi .bar > span { background: var(--navy); }

/* Carte de synthèse client : noir plein, sans halo ni grille */
.app-body .account-hero { background: var(--navy); box-shadow: none; }
.app-body .account-hero::before { display: none; }
.app-body .account-hero .btn-primary { background: #fff; color: var(--navy); }
.app-body .account-hero .btn-primary:hover { background: var(--navy-soft); color: var(--navy); }
.app-body .account-hero .ah-pill { background: rgba(255, 255, 255, .08); }

/* Carte bancaire : crème uni */
.app-body .bank-card { background: var(--cream); border-color: var(--line); box-shadow: none; }
.app-body .bank-card.is-empty { background: #fff; }
.app-body .bank-card .bc-chip { background: #D9C48E; box-shadow: none; }

/* Tableaux */
.app-body .data-table th { background: var(--surface-2); color: var(--text-tertiary); }
.app-body .data-table tbody tr:hover td { background: var(--surface-2); }
.app-body .data-table tr.is-unread td { background: #FBF9F5; }
.app-body .data-table tr.is-unread td:first-child { box-shadow: inset 3px 0 0 var(--navy); }
.app-body .row-link { background: var(--cream); color: var(--ink); }
.app-body .row-link:hover { background: var(--cream-2); color: var(--ink); }
.app-body .unread-dot { background: var(--navy); box-shadow: 0 0 0 3px rgba(0, 35, 88, .15); }

/* Statuts : nouvelle = noir, le reste garde sa couleur sémantique */
.app-body .badge-navy { background: var(--cream); color: var(--ink); border-color: var(--line); }

/* Filtres, pagination, formulaires */
.app-body .filters { background: var(--cream); border-color: var(--line); }
.app-body .pager [aria-current] span, .app-body .pager span.relative.inline-flex { background: var(--navy); border-color: var(--navy); }
.app-body .field input:focus, .app-body .field select:focus, .app-body .field textarea:focus,
.app-body .table-search input[type="search"]:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(0, 35, 88, .15); }
.app-body .wizard-step.current .dot { background: var(--navy); border-color: var(--navy); box-shadow: 0 0 0 4px rgba(0, 35, 88, .15); }
.app-body .radio-card input:checked + label { border-color: var(--navy); background: var(--navy-soft); color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.app-body .alert-success { background: var(--accent-soft); }

/* Plus aucun texte en dégradé sur les pages d'erreur */
.error-code { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--ink, #0E0E10); }

/* ---------- Widget « Marchés » (tableaux de bord) ---------- */

.markets { margin-bottom: 16px; }
.markets .panel-head h2 { gap: 8px; }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.live-dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    opacity: 0;
    animation: live-pulse 2s ease-out infinite;
}
@keyframes live-pulse {
    0% { opacity: .6; transform: scale(.5); }
    100% { opacity: 0; transform: scale(1.4); }
}
.markets.is-stale .live-dot { background: var(--amber); }
.markets.is-stale .live-dot::after { display: none; }

.markets-grid { display: grid; grid-template-columns: 1fr 1fr; }
.markets-col { padding: 6px 0 4px; min-width: 0; }
.markets-col + .markets-col { border-left: 1px solid var(--border); }
.markets-col-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px 6px;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}
.markets-list { list-style: none; margin: 0; padding: 0; }
.market-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto 76px;
    align-items: center;
    gap: 12px;
    padding: 9px 16px;
    border-bottom: 1px solid var(--border);
    font-size: .8125rem;
}
.market-row:last-child { border-bottom: 0; }
.market-tag {
    font-family: var(--font-mono);
    font-size: .6875rem;
    font-weight: 600;
    text-align: center;
    padding: 3px 0;
    border-radius: 6px;
    background: var(--cream, var(--hover));
    color: var(--text);
}
.market-name { color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.market-value { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; border-radius: 4px; padding: 1px 4px; transition: background-color .8s ease; }
.market-row .delta { justify-self: end; min-width: 64px; justify-content: center; }
.market-value.flash-up { background: var(--accent-soft); transition: none; }
.market-value.flash-down { background: var(--danger-soft); transition: none; }
.market-empty { padding: 18px 16px; font-size: .8125rem; color: var(--text-tertiary); }
.markets-note { margin: 0; padding: 8px 16px 6px; font-size: .6875rem; color: var(--text-tertiary); }
.markets-source { margin: 0; padding: 10px 16px; border-top: 1px solid var(--border); font-size: .6875rem; color: var(--text-tertiary); }

@media (max-width: 880px) {
    .markets-grid { grid-template-columns: 1fr; }
    .markets-col + .markets-col { border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 480px) {
    .market-name { display: none; }
    .market-row { grid-template-columns: 46px 1fr auto; }
}
@media (prefers-reduced-motion: reduce) {
    .live-dot::after { animation: none; }
}

/* ---------- Widget « Marchés » : graphiques ---------- */

.markets-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; }
.markets-main { padding: 18px 20px 14px; min-width: 0; }
.markets-main-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.markets-main-title { display: flex; align-items: center; gap: 10px; font-size: .875rem; font-weight: 600; color: var(--text-secondary); }
.markets-main-title .market-tag { min-width: 46px; }
.markets-main-value { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; }
.markets-main-value [data-main-value] { font-family: var(--font-display); font-size: 2rem; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1; border-radius: 6px; padding: 2px 4px; margin-left: -4px; transition: background-color .8s ease; }
.markets-main-value [data-main-value].flash-up { background: var(--accent-soft); transition: none; }
.markets-main-value [data-main-value].flash-down { background: var(--danger-soft); transition: none; }
.markets-period { font-size: .75rem; color: var(--text-tertiary); padding-top: 4px; }
.markets-chart { position: relative; height: 300px; }

.markets-side { border-left: 1px solid var(--border); padding-bottom: 6px; max-height: 420px; overflow-y: auto; }
.markets-side .markets-col-head { padding-top: 12px; }
.market-item {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 64px 90px;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 16px;
    border: 0;
    border-left: 3px solid transparent;
    background: none;
    font: inherit;
    font-size: .8125rem;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: background-color .15s ease;
}
.market-item:hover { background: var(--surface-2); }
.market-item.is-active { background: var(--hover); border-left-color: var(--text); }
.market-item:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.market-item .market-tag { padding: 3px 0; }
.market-spark { width: 64px; height: 28px; }
.market-figures { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.market-figures .market-value { padding: 0 3px; }
.market-change { font-size: .6875rem; font-weight: 650; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.market-change.is-up { color: var(--accent-ink); }
.market-change.is-down { color: var(--danger-ink); }

@media (max-width: 1180px) {
    .markets-layout { grid-template-columns: 1fr; }
    .markets-side { border-left: 0; border-top: 1px solid var(--border); max-height: none; }
}
@media (max-width: 480px) {
    .market-item { grid-template-columns: 42px minmax(0, 1fr) 90px; }
    .market-spark { display: none; }
    .markets-chart { height: 220px; }
}

/* ==========================================================================
   Tableaux et pagination : un seul modèle pour toute l'application
   ========================================================================== */

.data-table { font-size: .8125rem; }
.data-table th {
    height: 38px;
    padding: 0 16px;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    vertical-align: middle;
}
.data-table td { height: 56px; padding: 8px 16px; vertical-align: middle; border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table th.amount, .data-table td.amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.data-table td.amount { font-weight: 650; }
.data-table .cell-date { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.data-table .cell-date .cell-sub { margin-top: 1px; }
.data-table .cell-dot { width: 32px; padding-right: 0; }
.data-table .cell-strong { display: block; }
.cell-link { font-weight: 650; color: var(--text); }
.cell-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.data-table td.muted { color: var(--text-secondary); }

/* Ligne vide : pas d'effet de survol */
.data-table .table-empty-row td { height: auto; padding: 0; }
.data-table tbody tr.table-empty-row:hover td { background: transparent; }

/* Pagination */
.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}
.pager-summary { margin: 0; font-size: .8125rem; color: var(--text-secondary); }
.pager-summary strong { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.pager-pages { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.pager .pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    font-size: .8125rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    text-decoration: none;
    box-shadow: none;
    transition: background-color .15s ease, border-color .15s ease;
}
.pager a.pager-btn:hover { background: var(--hover); border-color: var(--border-strong); color: var(--text); }
.pager .pager-btn.is-current { background: var(--text); border-color: var(--text); color: #fff; }
.pager .pager-btn.is-disabled { opacity: .4; cursor: default; }
.pager .pager-btn.is-gap { border-color: transparent; background: transparent; min-width: 20px; padding: 0; color: var(--text-tertiary); }
.pager-prev { transform: rotate(90deg); }
.pager-next { transform: rotate(-90deg); }

/* Barre d'outils au-dessus des tableaux */
.table-toolbar { min-height: 60px; }

@media (max-width: 640px) {
    .pager { justify-content: center; }
    .pager-summary { width: 100%; text-align: center; }
    .data-table td { height: auto; }
}

/* ==========================================================================
   Tableaux : style éditorial, aligné sur le reste de l'application
   Texte lisible, lignes aérées, aucun effet « outil technique ».
   ========================================================================== */

.app-body .data-table { font-size: .90625rem; letter-spacing: -.005em; }

/* En-têtes : texte normal, sans majuscules ni fond */
.app-body .data-table th {
    height: 48px;
    padding: 0 24px;
    background: transparent;
    font-family: var(--font-body);
    font-size: .8125rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink-3);
    border-bottom: 1px solid var(--line);
}

/* Lignes : plus hautes, plus d'air */
.app-body .data-table td {
    height: 68px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}
.app-body .data-table tbody tr { transition: background-color .15s ease; }
.app-body .data-table tbody tr:hover td { background: #FBFAF7; }
.app-body .data-table .cell-strong { font-weight: 600; }
.app-body .data-table .cell-sub { font-size: .8125rem; color: var(--ink-3); margin-top: 2px; }
.app-body .data-table .cell-date { color: var(--ink); }
.app-body .data-table .cell-date .cell-sub { color: var(--ink-3); }
.app-body .data-table td.amount { font-family: var(--font-display); font-size: .9375rem; font-weight: 650; letter-spacing: -.01em; }

/* Références : texte simple, souligné au survol */
.app-body .row-link {
    background: none;
    padding: 0;
    border-radius: 0;
    font-family: var(--font-body);
    font-size: .90625rem;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--ink);
}
.app-body .row-link:hover { background: none; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Messages non lus : point noir, texte en gras, pas de fond */
.app-body .data-table tr.is-unread td { background: transparent; font-weight: 400; }
.app-body .data-table tr.is-unread td:first-child { box-shadow: none; }
.app-body .data-table tr.is-unread .cell-link,
.app-body .data-table tr.is-unread .cell-strong { font-weight: 700; }
.app-body .data-table .cell-dot { width: 40px; padding-right: 0; }

/* Pastilles d'état : plus discrètes */
.app-body .data-table .badge { font-size: .75rem; font-weight: 600; padding: 4px 10px 4px 8px; border: 0; }

/* En-tête des panneaux de liste */
.app-body .panel-head { padding: 18px 24px; min-height: 64px; }
.app-body .panel-head h2, .app-body .panel-head h3 { font-size: 1.0625rem; letter-spacing: -.02em; }

/* ---------- Recherche et filtres ---------- */

.app-body .table-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: transparent;
    border-bottom: 1px solid var(--line);
}
.app-body .table-search { position: relative; flex: 1; max-width: 460px; min-width: 240px; gap: 8px; }
.app-body .table-search .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.app-body .table-search input[type="search"] {
    height: 44px;
    padding: 0 16px 0 44px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--cream);
    font-size: .90625rem;
    color: var(--ink);
    box-shadow: none;
}
.app-body .table-search input[type="search"]::placeholder { color: var(--ink-3); }
.app-body .table-search input[type="search"]:focus { background: #fff; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(0, 35, 88, .12); }
.app-body .table-search .btn { height: 44px; min-height: 44px; padding: 0 20px; }

/* Filtres : pilules, comme la navigation du site */
.app-body .table-toolbar .filters,
.app-body .filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 0 auto;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
}
.app-body .filters a {
    padding: 9px 16px;
    border-radius: 999px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--ink);
    background: transparent;
    box-shadow: none;
    transition: background-color .15s ease, color .15s ease;
}
.app-body .filters a:hover { background: var(--cream); color: var(--ink); }
.app-body .filters a.is-active { background: var(--navy); color: #fff; box-shadow: none; font-weight: 600; }

/* ---------- Pagination ---------- */

.app-body .pager { padding: 16px 24px; border-top: 1px solid var(--line); }
.app-body .pager-summary { font-size: .875rem; color: var(--ink-3); }
.app-body .pager-summary strong { color: var(--ink); font-weight: 600; }
.app-body .pager .pager-btn {
    min-width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font-size: .875rem;
    font-weight: 500;
}
.app-body .pager a.pager-btn:hover { background: var(--cream); border: 0; }
.app-body .pager .pager-btn.is-current { background: var(--navy); color: #fff; font-weight: 600; }

@media (max-width: 720px) {
    .app-body .table-toolbar { flex-direction: column; align-items: stretch; padding: 16px; }
    .app-body .table-search { max-width: none; }
    .app-body .table-toolbar .filters { margin: 0; }
    .app-body .data-table th, .app-body .data-table td { padding-left: 16px; padding-right: 16px; }
}

/* Tableaux compacts : panneaux des tableaux de bord et écrans moyens */
.app-body .dash-grid .data-table th, .app-body .dash-grid .data-table td { padding-left: 16px; padding-right: 16px; }
.app-body .dash-grid .data-table td { height: 60px; }
@media (max-width: 1280px) {
    .app-body .data-table th, .app-body .data-table td { padding-left: 16px; padding-right: 16px; }
    .app-body .table-toolbar, .app-body .pager, .app-body .panel-head { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 1280px) { .app-body .data-table .col-optional { display: none; } }

/* ---------- Liste des utilisateurs ---------- */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.user-cell { display: flex; align-items: center; gap: 14px; }
.user-initials {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--cream, #F5F2EC);
    font-family: var(--font-display);
    font-size: .8125rem;
    font-weight: 700;
    color: var(--ink, #0E0E10);
}
.user-cell .cell-strong { display: flex; align-items: center; gap: 8px; }
.you-tag { font-family: var(--font-body); font-size: .6875rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--navy, #002358); color: #fff; }
.cell-empty { color: var(--text-tertiary); font-size: .875rem; }

/* Liste déroulante compacte en pilule */
.pill-select {
    appearance: none;
    -webkit-appearance: none;
    height: 36px;
    padding: 0 34px 0 14px;
    border: 1px solid var(--line, #E4DFD5);
    border-radius: 999px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236E6E76' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 13px center;
    font-family: var(--font-body);
    font-size: .875rem;
    font-weight: 500;
    color: var(--ink, #0E0E10);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.pill-select:hover { border-color: var(--border-strong, #CFC9BD); }
.pill-select:focus { outline: none; border-color: var(--ink, #0E0E10); box-shadow: 0 0 0 3px rgba(14, 14, 16, .08); }
.app-body .pill-select:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(0, 35, 88, .12); }
.pill-select:disabled { background-color: var(--cream, #F5F2EC); border-color: transparent; cursor: not-allowed; opacity: 1; color: var(--ink-3, #6E6E76); }

/* Interrupteur Actif / Inactif */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
    position: relative;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: #D8D3C8;
    transition: background-color .2s ease;
}
.switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(14, 14, 16, .25);
    transition: transform .25s cubic-bezier(.32, .72, 0, 1);
}
.switch input:checked + .switch-track { background: var(--accent, #FE7801); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px rgba(14, 14, 16, .15); }
.switch-label { font-size: .875rem; font-weight: 500; color: var(--ink, #0E0E10); }
.switch.is-locked { cursor: not-allowed; }
.switch.is-locked .switch-track { opacity: .55; }

/* Ligne d'un compte inactif, ligne en cours d'enregistrement */
.data-table tr.is-inactive .user-initials { background: #EEEBE5; color: var(--ink-3, #6E6E76); }
.data-table tr.is-inactive .cell-strong, .data-table tr.is-inactive .switch-label { color: var(--ink-3, #6E6E76); }
.data-table tr.is-saving { opacity: .55; pointer-events: none; transition: opacity .2s ease; }

/* ---------- Boutons d'action des lignes ---------- */

.data-table th.cell-actions, .data-table td.cell-actions { width: 1%; white-space: nowrap; text-align: right; }
.row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; }

.row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--ink, #0E0E10);
    font-size: .8125rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    transition: background-color .15s ease, border-color .15s ease;
}
.row-action::-webkit-details-marker { display: none; }
.row-action:hover { background: var(--cream, #F5F2EC); color: var(--ink, #0E0E10); }
.row-action:focus-visible { outline: 2px solid var(--ink, #0E0E10); outline-offset: 2px; }
.row-action.is-primary {
    width: auto;
    padding: 0 14px 0 12px;
    border-color: var(--line, #E4DFD5);
    background: #fff;
}
.row-action.is-primary:hover { border-color: var(--ink, #0E0E10); background: #fff; }

/* Menu « … » : changement de statut */
.action-menu { position: relative; display: inline-block; }
.action-menu[open] > .row-action { background: var(--cream, #F5F2EC); }
.action-menu-panel {
    position: fixed;
    z-index: 80;
    min-width: 220px;
    padding: 6px;
    border: 1px solid var(--line, #E4DFD5);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 40px -16px rgba(14, 14, 16, .3);
    text-align: left;
    animation: menu-pop .16s cubic-bezier(.32, .72, 0, 1);
}
@keyframes menu-pop {
    from { opacity: 0; transform: translateY(-4px) scale(.98); }
    to { opacity: 1; transform: none; }
}
.action-menu-title { margin: 4px 10px 6px; font-size: .75rem; font-weight: 600; color: var(--ink-3, #6E6E76); }
.action-menu-panel form { margin: 0; }
.action-menu-panel button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 9px;
    background: none;
    font-family: var(--font-body);
    font-size: .875rem;
    font-weight: 500;
    color: var(--ink, #0E0E10);
    text-align: left;
    cursor: pointer;
}
.action-menu-panel button:hover:not(:disabled) { background: var(--cream, #F5F2EC); }
.action-menu-panel button:disabled { cursor: default; font-weight: 600; }
.action-menu-check { display: inline-flex; width: 14px; justify-content: center; }

@media (prefers-reduced-motion: reduce) { .action-menu-panel { animation: none; } }

/* ---------- Modifier / Supprimer ---------- */

.inline-delete { display: inline-flex; margin: 0; }
.row-action.is-danger { color: var(--danger, #DC2E45); }
.row-action.is-danger:hover { background: var(--danger-soft, #FDECEE); color: var(--danger-ink, #B4182C); }
.row-action.is-danger.is-primary { border-color: #F3C9CF; background: #fff; }
.row-action.is-danger.is-primary:hover { border-color: var(--danger, #DC2E45); background: var(--danger-soft, #FDECEE); }
.row-action.is-disabled { opacity: .35; cursor: not-allowed; }
.row-action.is-disabled:hover { background: transparent; }
.row-actions .row-action + .action-menu, .row-actions .inline-delete + .action-menu { margin-left: 2px; }

/* Liens et séparateur dans le menu « … » */
.action-menu-sep { height: 1px; margin: 6px 4px; background: var(--line, #E4DFD5); }
.action-menu-panel a.action-menu-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 9px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--ink, #0E0E10);
}
.action-menu-panel a.action-menu-link:hover { background: var(--cream, #F5F2EC); color: var(--ink, #0E0E10); }
.action-menu-panel a.action-menu-link .icon { color: var(--ink-3, #6E6E76); }

/* Bouton rouge */
.btn-danger { background: var(--danger, #DC2E45); color: #fff; border-color: transparent; }
.btn-danger:hover { background: var(--danger-ink, #B4182C); color: #fff; }
.app-body .btn-danger { border-radius: 999px; }

/* Barre d'actions en bas des formulaires */
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

/* Fenêtre de confirmation */
.confirm-dialog {
    width: min(420px, calc(100vw - 32px));
    padding: 28px;
    border: 0;
    border-radius: 22px;
    background: #fff;
    color: var(--ink, #0E0E10);
    box-shadow: 0 30px 80px -20px rgba(14, 14, 16, .45);
    text-align: center;
}
.confirm-dialog::backdrop { background: rgba(14, 14, 16, .45); }
.confirm-dialog[open] { animation: dialog-in .22s cubic-bezier(.32, .72, 0, 1); }
@keyframes dialog-in {
    from { opacity: 0; transform: translateY(8px) scale(.97); }
    to { opacity: 1; transform: none; }
}
.confirm-dialog-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--danger-soft, #FDECEE); color: var(--danger, #DC2E45); margin-bottom: 14px; }
.confirm-dialog h2 { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: -.02em; margin: 0 0 8px; }
.confirm-dialog p { margin: 0 0 22px; color: var(--ink-3, #6E6E76); font-size: .9375rem; }
.confirm-dialog-actions { display: flex; gap: 10px; }
.confirm-dialog-actions .btn { flex: 1; }
@media (prefers-reduced-motion: reduce) { .confirm-dialog[open] { animation: none; } }

/* Modales génériques */
.modal {
    width: min(480px, calc(100vw - 32px));
    padding: 0;
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.modal::backdrop { background: rgba(14, 14, 16, .5); backdrop-filter: blur(2px); }
.modal[open] { animation: dialog-in .22s var(--ease); }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}
.modal-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 650;
    letter-spacing: -.01em;
    line-height: 1.3;
}
.modal-close {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color .14s ease, border-color .14s ease, color .14s ease;
    font-size: 0;
}
.modal-close:hover { background: var(--hover); border-color: var(--border-strong); color: var(--text); }

.modal-body {
    padding: 20px 22px;
    font-size: .9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.modal-body p { margin: 0; }
.modal-body p strong { color: var(--text); }
.modal-body .field { margin: 0; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
}

/* ==========================================================================
   Boutons d'action : un seul style pour toute l'application
   Cercle de 36 px dans les tableaux, pilule « icône + texte » en tête de page.
   ========================================================================== */

.row-actions { gap: 6px; }

.row-action,
.row-action.is-primary,
.row-action.is-danger,
.row-action.is-danger.is-primary,
.row-action.is-success,
.row-action.is-success.is-primary,
.action-menu > summary.row-action {
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    gap: 6px;
    border: 1px solid var(--line, #E4DFD5);
    border-radius: 999px;
    background: #fff;
    color: var(--ink, #0E0E10);
    font-family: var(--font-body);
    font-size: .8125rem;
    font-weight: 600;
    line-height: 1;
    box-shadow: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.row-action:hover,
.row-action.is-primary:hover,
.action-menu[open] > summary.row-action {
    border-color: var(--ink, #0E0E10);
    background: var(--cream, #F5F2EC);
    color: var(--ink, #0E0E10);
}

/* Supprimer : même bouton, le rouge n'apparaît qu'au survol */
.row-action.is-danger:hover,
.row-action.is-danger.is-primary:hover {
    border-color: var(--danger, #DC2E45);
    background: var(--danger-soft, #FDECEE);
    color: var(--danger, #DC2E45);
}

/* Approuver / succès : vert au survol */
.row-action.is-success:hover,
.row-action.is-success.is-primary:hover {
    border-color: var(--green, #16A37F);
    background: var(--green-soft, #E6F7F3);
    color: var(--green-ink, #0E7A5F);
}

/* Bouton indisponible : même forme, atténué */
.row-action.is-disabled,
.row-action.is-disabled:hover {
    opacity: .4;
    border-color: var(--line, #E4DFD5);
    background: #fff;
    color: var(--ink, #0E0E10);
    cursor: not-allowed;
}

/* Variante avec texte (en-têtes de page) : même bordure, même couleur */
.row-action.is-primary,
.row-action.is-danger.is-primary,
.row-action.is-success.is-primary {
    width: auto;
    padding: 0 16px 0 13px;
}
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.page-actions .row-action { height: 40px; }

/* ---------- Solde, relevé et paramètres ---------- */

.data-table td.amount.is-credit { color: var(--accent-ink, #C45E00); }
.data-table td.amount.is-debit { color: var(--ink, #0E0E10); }
.data-table .sms-body { max-width: 360px; white-space: normal; font-size: .8125rem; color: var(--ink-2, #3B3B40); }

/* Choix Créditer / Débiter : contrôle segmenté */
.segmented { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--cream, #F5F2EC); }
.segmented-option { position: relative; cursor: pointer; }
.segmented-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented-option span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 999px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--ink-3, #6E6E76);
    transition: background-color .15s ease, color .15s ease;
}
.segmented-option input:checked + span { background: var(--ink, #0E0E10); color: #fff; }
.segmented-option input:focus-visible + span { outline: 2px solid var(--ink, #0E0E10); outline-offset: 2px; }

/* Lignes de réglage : texte à gauche, interrupteur à droite */
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.settings-row strong { display: block; font-size: .9375rem; font-weight: 600; }
.settings-row p { margin: 3px 0 0; font-size: .8125rem; color: var(--ink-3, #6E6E76); }
.settings-list { padding-top: 6px; padding-bottom: 6px; }
.settings-list .settings-row { padding: 14px 0; border-bottom: 1px solid var(--line, #E4DFD5); cursor: pointer; }
.settings-list .settings-row:last-child { border-bottom: 0; }
.settings-row .switch { flex-shrink: 0; }

.test-mail-form { display: flex; align-items: flex-end; gap: 12px; }
@media (max-width: 640px) { .test-mail-form { flex-direction: column; align-items: stretch; } }

/* ---------- Onglets (page profil) ---------- */
.tabs {
    display: flex;
    gap: 4px;
    margin: 0 0 20px;
    border-bottom: 1px solid var(--line, #E4DFD5);
    overflow-x: auto;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs .tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    font-size: .9375rem;
    font-weight: 500;
    color: var(--ink-3, #6E6E76);
    white-space: nowrap;
    text-decoration: none;
    transition: color .15s ease, border-color .15s ease;
}
.tabs .tab:hover { color: var(--ink, #0E0E10); }
.tabs .tab.is-active { color: var(--navy, #002358); border-bottom-color: var(--navy, #002358); font-weight: 600; }
.tabs .tab:focus-visible { outline: none; border-radius: 8px 8px 0 0; box-shadow: inset 0 0 0 2px rgba(0, 35, 88, .25); }
.tab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent, #FE7801); }
.tab-panel[hidden] { display: none; }
.tab-label-short { display: none; }
@media (max-width: 640px) {
    .tabs { gap: 0; }
    .tabs .tab { flex: 1; justify-content: center; gap: 6px; padding: 12px 8px; font-size: .875rem; }
    .tab-label { display: none; }
    .tab-label-short { display: inline; }
}

/* ---------- Sélecteur de langue ---------- */
.locale-switch { position: relative; }
.locale-switch summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: .8125rem; font-weight: 600; color: var(--ink-2, #3B3B40); cursor: pointer; user-select: none; }
.locale-switch summary::-webkit-details-marker { display: none; }
.locale-switch summary:hover, .locale-switch[open] summary { background: var(--navy-soft, #E6EDFB); color: var(--navy, #002358); }
.locale-switch .flag { width: 20px; height: 14px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(14, 14, 16, .12); flex-shrink: 0; }
.locale-switch ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 160px; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line, #E4DFD5); border-radius: 12px; box-shadow: 0 16px 32px -16px rgba(14, 14, 16, .25); }
.locale-switch li a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: .875rem; color: var(--ink, #0E0E10); text-decoration: none; }
.locale-switch li a:hover { background: var(--cream, #F5F2EC); color: var(--ink, #0E0E10); }
.locale-switch li a[aria-current] { font-weight: 600; }
.app-topbar .locale-switch { margin-left: auto; }
.app-topbar .locale-switch + .topbar-user { margin-left: 8px; }
.nav-actions-mobile .locale-switch ul { left: 0; right: auto; }

/* ---------- Tableau : case à cocher + barre groupée ---------- */
.col-check { width: 36px; padding-left: 14px !important; padding-right: 4px !important; }
.check-label { display: flex; align-items: center; justify-content: center; cursor: pointer; }
.check-input { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--border-strong); accent-color: var(--navy, #002358); cursor: pointer; flex-shrink: 0; }
tr.is-selectable:has(.row-check:checked) { background: var(--navy-soft, #E6EDFB); }

.bulk-bar { display: flex; align-items: center; gap: 10px; padding: 2px 0; }
.bulk-count { font-size: .8125rem; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }

/* Widget support : styles dans member.blade.php (Tailwind) */

/* ---------- Champ code OTP (3 cases × 2 chiffres) ---------- */
.code-input-group { display: flex; align-items: center; gap: 6px; }
.code-input-box {
    width: 48px; height: 44px;
    text-align: center;
    font-size: 1.0625rem; font-weight: 650; letter-spacing: .08em;
    font-family: ui-monospace, 'SF Mono', monospace;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--hover); color: var(--text);
    outline: none;
    transition: border-color 120ms ease-out, box-shadow 120ms ease-out, background 120ms ease-out;
    padding: 0;
    -moz-appearance: textfield;
}
.code-input-box:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(0,35,88,.10);
}
.code-input-box:not(:placeholder-shown) { background: var(--surface); }
.has-error .code-input-box { border-color: var(--danger); }
.has-error .code-input-box:focus { box-shadow: 0 0 0 3px rgba(220,38,38,.12); }
.code-input-sep { font-size: .75rem; color: var(--border-strong, var(--border)); user-select: none; line-height: 1; }

/* ---------- Zone de dépôt fichier ---------- */
.file-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 32px 24px;
    border: 2px dashed var(--border-strong, #CDD2DB);
    border-radius: var(--radius-lg, 16px);
    background: var(--surface-2, #FAFBFC);
    cursor: pointer;
    text-align: center;
    transition: border-color var(--dur-fast, 140ms) ease, background var(--dur-fast, 140ms) ease;
    user-select: none;
}
.file-drop:hover,
.file-drop:focus-within { border-color: var(--navy, #002358); background: var(--navy-soft, #E6EDFB); }
.file-drop.is-dragover { border-color: var(--navy, #002358); background: var(--navy-soft, #E6EDFB); }
.file-drop.has-file { border-color: var(--navy, #002358); border-style: solid; background: var(--primary-soft, #E6EDFB); }
.file-drop-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.file-drop-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--navy-soft, #E6EDFB);
    color: var(--navy, #002358);
    transition: background var(--dur-fast, 140ms) ease;
    flex-shrink: 0;
}
.file-drop:hover .file-drop-icon,
.file-drop.is-dragover .file-drop-icon { background: rgba(0,35,88,.15); }
.file-drop.has-file .file-drop-icon { background: var(--navy, #002358); color: #fff; }
.file-drop-text { display: flex; flex-direction: column; gap: 3px; }
.file-drop-text strong { display: block; font-size: .9375rem; font-weight: 600; color: var(--text, #0F172A); }
.file-drop-or { display: block; font-size: .875rem; color: var(--text-secondary, #556072); }
.file-drop-hint { font-size: .8125rem; color: var(--text-tertiary, #8A93A3); }
.file-drop-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    border-radius: var(--radius-pill, 999px);
    background: var(--navy, #002358);
    color: #fff;
    font-size: .875rem;
    font-weight: 500;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.has-error .file-drop { border-color: var(--danger, #DC2E45); background: var(--danger-soft, #FDECEE); }

/* ---------- Échelle compacte ---------- */
html { font-size: 14px; }
.site-body { font-size: 15px; --header-height: 64px; }
.site-body .brand-logo { height: 38px; }
.site-body .section { padding: clamp(52px, 6.5vw, 100px) 0; }
.site-body .page-hero { padding: clamp(44px, 5.5vw, 84px) 0 clamp(32px, 4vw, 56px); }
.site-body .btn { min-height: 40px; padding: 9px 18px; }
.site-body .btn-sm { min-height: 34px; padding: 6px 14px; }
.site-body .btn-lg { min-height: 46px; padding: 12px 22px; }
.site-body .nav-link { padding: 6px 12px; }
.site-body .fin-card .field input[type="text"], .site-body .fin-card .field input[type="email"], .site-body .fin-card .field input[type="tel"],
.site-body .fin-card .field input[type="number"] { min-height: 44px; padding: 10px 14px; border-radius: 12px; }
.site-body .fin-card .field textarea { padding: 12px 14px; border-radius: 12px; min-height: 120px; }
.site-body .fin-card .ts-control { min-height: 44px; padding: 9px 36px 9px 14px; border-radius: 12px !important; }
.site-body .fin-choice label { padding: 14px 40px 14px 14px; border-radius: 14px; }
.site-body .fin-choice-icon { width: 34px; height: 34px; border-radius: 10px; }
.app-body { font-size: 13px; }
.app-body .panel-head { padding: 14px 20px; min-height: 52px; }
.app-body .data-table td { height: 48px; }
.app-body .table-search input[type="search"] { height: 38px; }
.app-body .table-search .btn { height: 38px; min-height: 38px; padding: 0 16px; }
.app-body .filters a { padding: 7px 13px; }
.tabs .tab { padding: 10px 14px; }

/* Sélecteur de langue : aspect de liste déroulante */
.locale-switch summary { gap: 8px; padding: 6px 10px 6px 8px; border: 1px solid #CFC9BD; border-radius: 10px; background: #fff; color: var(--ink, #0E0E10); }
.locale-switch summary:hover, .locale-switch[open] summary { border-color: var(--navy, #002358); background: #fff; color: var(--ink, #0E0E10); }
.locale-switch .locale-code { display: none; }
.locale-switch .locale-chevron { color: var(--ink-3, #6E6E76); transition: transform .2s ease; }
.locale-switch[open] .locale-chevron { transform: rotate(180deg); }
@media (max-width: 640px) {
    .app-topbar .locale-switch .locale-name { display: none; }
    .app-topbar .locale-switch .locale-code { display: inline; }
}
