/* AlwaysView : système de design */

:root {
    --brand: #0b4f3f;
    --brand-hover: #093f33;
    --brand-deep: #072f26;
    --brand-50: #eef5f2;
    --brand-100: #dce9e4;
    --brand-200: #b9d4c9;
    --brand-400: #5e9784;

    --ink: #0f1d19;
    --text: #33423d;
    --muted: #66756f;
    --line: #e1e7e4;
    --line-strong: #c9d3cf;
    --bg: #f5f7f6;
    --surface: #ffffff;

    --ok: #0b6b4f;
    --ok-bg: #e5f3ec;
    --warn: #8a5a00;
    --warn-bg: #fcf1dc;
    --danger: #b42318;
    --danger-bg: #fdecea;

    --r-sm: 6px;
    --r: 10px;
    --r-lg: 14px;

    --shadow-sm: 0 1px 2px rgba(15, 29, 25, .06);
    --shadow: 0 1px 2px rgba(15, 29, 25, .05), 0 10px 28px -16px rgba(15, 29, 25, .22);

    --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --header-h: 64px;
    color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
    margin: 0;
    background: var(--surface);
    color: var(--text);
    font: 16px/1.6 var(--font);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.tinted { background: var(--bg); }

h1, h2, h3, h4 { color: var(--ink); margin: 0; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--brand); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.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;
}

.container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding-inline: 20px;
}

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.xs { font-size: 13px; }

/* ---------------- en-tête du site ---------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
    padding-top: env(safe-area-inset-top, 0px);
}

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

.brand-link { display: inline-flex; align-items: center; flex: none; }
.brand-link img { height: 28px; width: auto; }

.main-nav { display: none; gap: 4px; }

.main-nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--r-sm);
}

.main-nav a:hover { background: var(--bg); color: var(--ink); }
.main-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-50); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.header-actions .btn-secondary { display: none; }

.nav-toggle {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface);
    cursor: pointer;
}

.nav-toggle svg { width: 20px; height: 20px; }

.mobile-nav {
    border-top: 1px solid var(--line);
    background: var(--surface);
    padding: 8px 20px 16px;
}

.mobile-nav a {
    display: block;
    padding: 12px 4px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid var(--line);
}

.mobile-nav a:last-of-type { border-bottom: 0; }
.mobile-nav .btn { margin-top: 12px; }

/* ---------------- boutons ---------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: var(--r-sm);
    border: 1px solid var(--brand);
    background: var(--brand);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
    white-space: nowrap;
}

.btn:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--bg); border-color: var(--line-strong); }

.btn-ghost { background: transparent; color: var(--brand); border-color: transparent; }
.btn-ghost:hover { background: var(--brand-50); border-color: transparent; }

.btn-danger { background: var(--surface); color: var(--danger); border-color: #f1c4bf; }
.btn-danger:hover { background: var(--danger-bg); border-color: #f1c4bf; }

.btn-light { background: #fff; color: var(--brand); border-color: #fff; }
.btn-light:hover { background: var(--brand-50); border-color: var(--brand-50); }

.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .08); border-color: #fff; }

.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 14px; }
.btn-lg { min-height: 50px; padding: 12px 22px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------------- éléments communs ---------------- */

.tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: var(--r-sm);
    background: var(--brand-50);
    color: var(--brand);
    font-size: 13px;
    font-weight: 600;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg);
    color: var(--muted);
    border: 1px solid var(--line);
    white-space: nowrap;
}

.badge::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.badge.plain::before { display: none; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: #c4e3d3; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: #f0dcb3; }
.badge.danger { background: var(--danger-bg); color: var(--danger); border-color: #f5c9c4; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 20px;
    min-width: 0;
}

.card-title { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-title h2, .card-title h3 { font-size: 17px; }
.card-title .end { margin-left: auto; }

.icon-box {
    width: 40px; height: 40px;
    flex: none;
    display: grid; place-items: center;
    border-radius: var(--r-sm);
    background: var(--brand-50);
    color: var(--brand);
}

.icon-box svg { width: 20px; height: 20px; }
.icon-box.solid { background: var(--brand); color: #fff; }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

/* Pas de flex ici : un span (comme .kbd) au milieu du texte forcerait chaque
   segment de texte dans sa propre colonne flex et casserait l'ordre des mots
   à l'affichage. Une pastille positionnée en absolu laisse le texte s'écouler
   normalement, y compris sur plusieurs lignes. */
.check-list li { position: relative; padding-left: 28px; }

.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 18px; height: 18px;
    border-radius: 4px;
    background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.kbd {
    font-family: var(--mono);
    font-weight: 600;
    font-size: .92em;
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--brand-50);
    color: var(--brand);
    border: 1px solid var(--brand-100);
    white-space: nowrap;
}

.divider { height: 1px; background: var(--line); border: 0; margin: 20px 0; }

/* ---------------- formulaires ---------------- */

.field { display: grid; gap: 6px; }
.field + .field { margin-top: 14px; }

.label { font-size: 14px; font-weight: 600; color: var(--ink); }
.hint { font-size: 13px; color: var(--muted); }

.input {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line-strong);
    background: var(--surface);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.input::placeholder { color: #9aa6a1; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.input.key { font-family: var(--mono); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
/* Champ compact pour une cellule de tableau (édition en ligne) */
.input.input-sm { min-height: 34px; padding: 6px 10px; font-size: 13px; }

.form-error {
    display: none;
    gap: 8px;
    align-items: flex-start;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    background: var(--danger-bg);
    color: var(--danger);
    font-size: 14px;
}

.form-error.show { display: flex; }

.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form .input { flex: 1 1 220px; }

/* ---------------- accueil : hero ---------------- */

.hero { padding: 48px 0 56px; border-bottom: 1px solid var(--line); }

.hero-grid { display: grid; gap: 48px; align-items: center; }

.hero h1 {
    font-size: clamp(34px, 7vw, 56px);
    line-height: 1.08;
    letter-spacing: -.025em;
    margin: 18px 0 18px;
    font-weight: 600;
}

.hero h1 span { color: var(--brand); }

.hero .lead { font-size: 18px; color: var(--text); max-width: 34em; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-assurances {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 28px;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: var(--muted);
}

.hero-assurances li { display: inline-flex; align-items: center; gap: 8px; }
.hero-assurances svg { width: 16px; height: 16px; color: var(--brand); }

/* maquette de téléphone */

.showcase {
    position: relative;
    background: var(--brand-50);
    border: 1px solid var(--brand-100);
    border-radius: var(--r-lg);
    padding: 32px 16px;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.phone {
    width: 100%;
    max-width: 300px;
    background: #0f1d19;
    border-radius: 34px;
    padding: 10px;
    box-shadow: 0 24px 48px -24px rgba(7, 47, 38, .55);
}

.phone-screen {
    border-radius: 26px;
    overflow: hidden;
    background: #efeae2;
    font-size: 13px;
}

.chat-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #0b4f3f;
    color: #fff;
}

.chat-head .avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #5e9784;
    display: grid; place-items: center;
    font-weight: 600;
    font-size: 13px;
}

.chat-head .name { font-weight: 600; line-height: 1.2; }
.chat-head .status { font-size: 11px; opacity: .8; }

.chat-body { padding: 14px 12px 16px; display: grid; gap: 8px; }

.bubble {
    max-width: 82%;
    padding: 6px 8px 4px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
    color: #111b21;
    line-height: 1.35;
}

.bubble.me { justify-self: end; background: #d9fdd3; }

.bubble .time { display: block; text-align: right; font-size: 10px; color: #667781; margin-top: 2px; }

.bubble .photo {
    width: 190px;
    max-width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    display: block;
}

.bubble .quote {
    border-left: 3px solid #0b4f3f;
    background: rgba(11, 79, 63, .07);
    border-radius: 4px;
    padding: 4px 8px;
    margin-bottom: 4px;
    font-size: 12px;
    color: #54656f;
}

.bubble .quote b { color: #0b4f3f; display: block; font-size: 11px; }

.chat-body .day {
    justify-self: center;
    font-size: 11px;
    background: #fff;
    color: #54656f;
    padding: 3px 8px;
    border-radius: 6px;
}

.showcase-note {
    position: absolute;
    right: 12px;
    bottom: 14px;
    max-width: 230px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow);
    padding: 12px;
    display: flex;
    gap: 10px;
    font-size: 13px;
    line-height: 1.4;
}

.showcase-note .icon-box { width: 32px; height: 32px; }
.showcase-note .icon-box svg { width: 16px; height: 16px; }
.showcase-note b { color: var(--ink); display: block; }

/* ---------------- sections ---------------- */

.section { padding: 64px 0; }
.section.alt { background: var(--bg); border-block: 1px solid var(--line); }

.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(26px, 5vw, 36px); letter-spacing: -.02em; margin-top: 12px; }
.section-head p { margin-top: 12px; color: var(--muted); font-size: 17px; }
.section-head.center { margin-inline: auto; text-align: center; }

.steps { display: grid; gap: 16px; counter-reset: step; }

.step { position: relative; }

.step .num {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border-radius: var(--r-sm);
    background: var(--brand);
    color: #fff;
    font-family: var(--mono);
    font-weight: 600;
    margin-bottom: 16px;
}

.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--muted); }

.features { display: grid; gap: 16px; }

.feature h3 { font-size: 17px; margin: 16px 0 6px; }
.feature p { color: var(--muted); font-size: 15px; }

.trust-block {
    background: var(--brand);
    color: #d9e8e2;
    border-radius: var(--r-lg);
    padding: 36px 24px;
    display: grid;
    gap: 32px;
}

.trust-block h2 { color: #fff; font-size: clamp(24px, 4.5vw, 32px); letter-spacing: -.02em; margin-top: 12px; }
.trust-block .tag { background: rgba(255, 255, 255, .1); color: #fff; }
.trust-block p { color: #c3d9d1; }

.trust-items { display: grid; gap: 14px; }

.trust-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-radius: var(--r);
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
}

.trust-item svg { width: 22px; height: 22px; flex: none; color: #9fd1bd; margin-top: 2px; }
.trust-item b { display: block; color: #fff; margin-bottom: 2px; }
.trust-item span { font-size: 14px; color: #c3d9d1; }

/* tarifs */

.pricing { display: grid; gap: 16px; }

.price-card { display: flex; flex-direction: column; gap: 16px; position: relative; }
.price-card.featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }

.price-card .ribbon {
    position: absolute;
    top: -11px;
    left: 20px;
    background: var(--brand);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.price-card .period { font-size: 15px; font-weight: 600; color: var(--muted); }
.price-card .amount { font-size: 34px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; line-height: 1.1; }
.price-card .amount small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price-card .check-list { font-size: 14px; }
.price-card .btn { margin-top: auto; }

/* FAQ */

.faq { display: grid; gap: 10px; max-width: 820px; margin: 0 auto; }

.faq details {
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--surface);
}

.faq summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 52px 18px 20px;
    font-weight: 600;
    color: var(--ink);
    position: relative;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
    content: "";
    position: absolute;
    right: 20px;
    top: 50%;
    width: 10px; height: 10px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: translateY(-70%) rotate(45deg);
    transition: transform .2s;
}

.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > div { padding: 0 20px 18px; color: var(--muted); }
.faq details > div p + p { margin-top: 10px; }

.cta-band {
    background: var(--ink);
    color: #fff;
    border-radius: var(--r-lg);
    padding: 36px 24px;
    display: grid;
    gap: 20px;
    align-items: center;
}

.cta-band h2 { color: #fff; font-size: clamp(22px, 4vw, 30px); }
.cta-band p { color: #b9c5c1; margin-top: 8px; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* pied de page */

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--surface);
    padding: 40px 0 calc(28px + env(safe-area-inset-bottom, 0px));
    font-size: 14px;
}

.footer-grid { display: grid; gap: 28px; }
.footer-grid img { height: 26px; width: auto; margin-bottom: 12px; }
.footer-grid h4 { font-size: 14px; margin-bottom: 10px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--brand); }

.footer-legal {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    justify-content: space-between;
}

/* ---------------- pages de contenu (guide, confidentialité) ---------------- */

.page-head { padding: 40px 0 32px; border-bottom: 1px solid var(--line); background: var(--bg); }
.page-head h1 { font-size: clamp(30px, 6vw, 44px); letter-spacing: -.02em; margin-top: 14px; }
.page-head p { margin-top: 12px; color: var(--muted); font-size: 17px; max-width: 40em; }

.breadcrumb { font-size: 14px; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); }

.doc { display: grid; gap: 32px; padding: 40px 0 64px; }

.toc {
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 16px;
    background: var(--surface);
    align-self: start;
}

.toc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; counter-reset: toc; }

.toc a {
    display: flex;
    gap: 10px;
    padding: 7px 8px;
    border-radius: var(--r-sm);
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
}

.toc a::before { counter-increment: toc; content: counter(toc, decimal-leading-zero); font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 1px; }
.toc a:hover, .toc a.active { background: var(--brand-50); color: var(--brand); }

.prose { min-width: 0; max-width: 760px; }
.prose section + section { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line); }
.prose h2 { font-size: 26px; letter-spacing: -.015em; display: flex; align-items: center; gap: 12px; }
.prose h2 .num { font-family: var(--mono); font-size: 14px; color: var(--brand); background: var(--brand-50); padding: 3px 8px; border-radius: 4px; font-weight: 600; }
.prose h3 { font-size: 18px; margin: 28px 0 10px; }
.prose p { margin-top: 12px; }
.prose ul, .prose ol { padding-left: 22px; margin: 12px 0 0; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--brand); font-weight: 600; }

.callout {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: var(--r);
    border: 1px solid var(--brand-100);
    background: var(--brand-50);
    font-size: 15px;
}

.callout svg { width: 20px; height: 20px; flex: none; color: var(--brand); margin-top: 2px; }
.callout.warn { background: var(--warn-bg); border-color: #f0dcb3; }
.callout.warn svg { color: var(--warn); }
.callout b { color: var(--ink); }

.table-wrap { overflow-x: auto; margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r); }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: var(--bg); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.nowrap { white-space: nowrap; }

/* ---------------- page de connexion ---------------- */

.auth { min-height: calc(100vh - var(--header-h)); display: grid; align-items: center; padding: 40px 0 64px; background: var(--bg); }
.auth-grid { display: grid; gap: 24px; align-items: start; }
.auth-card { padding: 28px 24px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 26px; letter-spacing: -.015em; margin-top: 14px; }
.auth-card > p { color: var(--muted); margin-top: 8px; margin-bottom: 24px; }
.auth-aside h2 { font-size: 18px; margin-bottom: 14px; }
.auth-aside .check-list { color: var(--text); }

/* ---------------- espace client & admin ---------------- */

.app-main { padding: 28px 0 64px; }

.app-top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; margin-bottom: 24px; }
.app-top h1 { font-size: clamp(24px, 5vw, 30px); letter-spacing: -.02em; }
.app-top p { color: var(--muted); margin-top: 4px; }
.app-top .end { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* Bandeau d'accueil du tableau de bord : identité, statut, compte à rebours */
.status-hero {
    position: relative;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 22px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
}

.status-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 160% at -10% -20%, var(--brand-50), transparent 60%);
    z-index: 0;
}

.status-hero > * { position: relative; z-index: 1; }

.status-hero .avatar {
    width: 52px; height: 52px;
    flex: none;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: grid;
    place-items: center;
}

.status-hero .avatar svg { width: 24px; height: 24px; }

.status-hero .info { flex: 1 1 200px; min-width: 0; }
.status-hero .info h2 { font-size: 21px; letter-spacing: -.01em; }
.status-hero .info .row { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }

.status-hero .stat-block { flex: none; text-align: right; margin-left: auto; }

/* Ligne de réglage simple (bascule + description), plus claire qu'un KPI cliquable */
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.setting-row .txt b { display: block; font-size: 14px; color: var(--ink); }
.setting-row .txt span { font-size: 13px; color: var(--muted); }
.status-hero .stat-block .big { font-size: 32px; font-weight: 700; color: var(--ink); line-height: 1; letter-spacing: -.02em; }
.status-hero .stat-block .big small { font-size: 16px; font-weight: 500; color: var(--muted); }
.status-hero .stat-block .lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }
.status-hero .stat-block .progress { width: 150px; height: 7px; margin-top: 8px; }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }

.kpi { padding: 16px; }
.kpi .k { font-size: 13px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.kpi .k svg { width: 16px; height: 16px; color: var(--brand); }
.kpi .v { font-size: 28px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; margin-top: 6px; line-height: 1.15; }
.kpi .v small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.kpi .s { font-size: 13px; color: var(--muted); margin-top: 4px; }
.kpi .v.text { font-size: 18px; margin-top: 10px; }

.progress { height: 6px; border-radius: 3px; background: var(--brand-50); overflow: hidden; margin-top: 10px; }
.progress span { display: block; height: 100%; background: var(--brand); border-radius: 3px; }

.app-grid { display: grid; gap: 16px; }
.stack { display: grid; gap: 16px; align-content: start; }
.charts-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.chart-box { position: relative; height: 220px; }

.connect-box { display: grid; gap: 16px; justify-items: center; text-align: center; padding: 8px 0; }

.qr-frame {
    width: min(264px, 100%);
    aspect-ratio: 1;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: #fff;
    display: grid;
    place-items: center;
}

.qr-frame img { width: 100%; height: 100%; }

.pair-code {
    font-family: var(--mono);
    font-size: clamp(26px, 8vw, 34px);
    font-weight: 600;
    letter-spacing: .14em;
    padding: 14px 20px;
    border-radius: var(--r);
    border: 1px dashed var(--brand-200);
    background: var(--brand-50);
    color: var(--brand);
}

.num-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; text-align: left; width: 100%; max-width: 380px; counter-reset: s; font-size: 14px; }
/* Pas de flex sur le li : un élément inline (comme <b>) au milieu du texte
   forcerait chaque segment dans sa propre colonne flex et casserait l'ordre
   des mots à l'affichage. Le numéro est une pastille positionnée en absolu. */
.num-steps li { position: relative; min-height: 24px; padding-left: 36px; }
.num-steps li::before {
    counter-increment: s;
    content: counter(s);
    position: absolute;
    left: 0;
    top: 0;
    width: 24px; height: 24px;
    display: grid; place-items: center;
    border-radius: 4px;
    background: var(--brand-50);
    color: var(--brand);
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 600;
}

.num-steps b { color: var(--ink); }

.segmented {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 4px;
    padding: 4px;
    border-radius: var(--r-sm);
    background: var(--bg);
    border: 1px solid var(--line);
    width: 100%;
    margin-bottom: 18px;
}

.segmented button {
    border: 0;
    background: transparent;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
}

.segmented button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.spinner {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 3px solid var(--brand-100);
    border-top-color: var(--brand);
    animation: spin .8s linear infinite;
}

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

.shortcut { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.shortcut:first-of-type { border-top: 0; padding-top: 0; }
.shortcut .kbd { flex: none; min-width: 78px; text-align: center; padding: 4px 8px; align-self: flex-start; }
.shortcut p { font-size: 14px; color: var(--muted); }
.shortcut b { color: var(--ink); font-weight: 600; display: block; }

/* grille d'activité */

.heat-wrap { overflow-x: auto; padding-bottom: 4px; }

.heat {
    display: grid;
    grid-template-rows: repeat(7, 12px);
    grid-auto-flow: column;
    grid-auto-columns: 12px;
    gap: 3px;
    width: max-content;
}

.heat span { border-radius: 2px; background: #ebefed; }
.heat span[data-l="1"] { background: #b9d4c9; }
.heat span[data-l="2"] { background: #7fae9c; }
.heat span[data-l="3"] { background: #3a7a66; }
.heat span[data-l="4"] { background: #0b4f3f; }
.heat span.future { background: transparent; }

.heat-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin-top: 12px; font-size: 13px; color: var(--muted); }
.heat-legend { display: flex; align-items: center; gap: 3px; }
.heat-legend i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }

/* admin */

.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tabs button {
    border: 0;
    background: none;
    padding: 12px 14px;
    font-weight: 600;
    font-size: 15px;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    white-space: nowrap;
}

.tabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }

.plan-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }

.plan-pick button {
    text-align: left;
    padding: 12px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line-strong);
    background: var(--surface);
    cursor: pointer;
}

.plan-pick button b { display: block; color: var(--ink); font-size: 16px; }
.plan-pick button span { font-size: 13px; color: var(--muted); }
.plan-pick button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 1px var(--brand); }

.generated {
    margin-top: 16px;
    border: 1px solid var(--brand-100);
    background: var(--brand-50);
    border-radius: var(--r);
    padding: 14px;
}

.generated pre { margin: 8px 0 12px; font-family: var(--mono); font-size: 14px; white-space: pre-wrap; color: var(--ink); }

.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }

.filters button {
    padding: 6px 12px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line-strong);
    background: var(--surface);
    font-size: 14px;
    cursor: pointer;
}

.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.empty-state { text-align: center; padding: 32px 16px; color: var(--muted); }
.empty-state b { display: block; color: var(--ink); margin-bottom: 4px; }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.switch input { width: 16px; height: 16px; accent-color: var(--brand); }

/* notifications */

.toast {
    position: fixed;
    left: 50%;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    transform: translate(-50%, 16px);
    background: var(--ink);
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--r-sm);
    font-size: 14px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    z-index: 50;
    max-width: calc(100% - 32px);
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

.loading { display: grid; place-items: center; padding: 64px 0; }

/* page 404 */

.not-found { text-align: center; padding: 96px 0; }
.not-found .code { font-family: var(--mono); color: var(--brand); font-weight: 600; }
.not-found h1 { font-size: clamp(28px, 6vw, 40px); margin: 12px 0; }
.not-found p { color: var(--muted); margin-bottom: 24px; }

/* ---------------- écrans larges ---------------- */

@media (min-width: 640px) {
    .container { padding-inline: 28px; }
    .kpis { grid-template-columns: repeat(2, 1fr); }
    .plan-pick { grid-template-columns: repeat(4, 1fr); }
    .steps { grid-template-columns: repeat(3, 1fr); }
    .features { grid-template-columns: repeat(2, 1fr); }
    .pricing { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
    .showcase { padding: 48px 24px; }
    .showcase-note { right: 20px; bottom: 24px; }
}

@media (min-width: 900px) {
    :root { --header-h: 72px; }
    .main-nav { display: flex; }
    .nav-toggle { display: none; }
    .mobile-nav { display: none !important; }
    .header-actions .btn-secondary { display: inline-flex; }

    .hero { padding: 72px 0 80px; }
    .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 56px; }
    .section { padding: 88px 0; }
    .features { grid-template-columns: repeat(3, 1fr); }
    .pricing { grid-template-columns: repeat(4, 1fr); }
    .trust-block { grid-template-columns: 1fr 1.2fr; padding: 48px; align-items: center; }
    .trust-items { grid-template-columns: 1fr 1fr; }
    .cta-band { grid-template-columns: 1fr auto; padding: 40px 48px; }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }

    .doc { grid-template-columns: 240px 1fr; gap: 56px; }
    .toc { position: sticky; top: calc(var(--header-h) + 24px); }

    .auth-grid { grid-template-columns: 440px 1fr; gap: 56px; }
    .auth-aside { padding-top: 24px; }

    .kpis { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
    .app-grid { grid-template-columns: 1.15fr 1fr; }
    .app-grid .span-2 { grid-column: 1 / -1; }
    .card { padding: 24px; }
    .charts-grid { grid-template-columns: 1fr 1fr; }
}

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