/* Plateforme audits Ewill : style C (menu marine, frise verticale, Outfit). */
:root {
    --navy: #0f1c26;
    --navy-2: #18293a;
    --navy-text: #b8c6ce;
    --mint: #6fd8cf;
    --cyan: #08b5aa;
    --ink: #13202a;
    --ink-2: #3a4a54;
    --muted: #5c6b75;
    --line: #e6ebee;
    --line-soft: #f0f3f5;
    --border: #d3dbdf;
    --soft: #f6f8f9;
    --accent: #0a6f69;
    --accent-dark: #07524e;
    --warn-bg: #fbf4e6;
    --warn-ink: #4a3200;
    --ok-bg: #e3f2e8;
    --ok-ink: #17663a;
    --p1-bg: #fbe9e7; --p1: #b3261e;
    --p2-bg: #fbf0dc; --p2: #8a5300;
    --p3-bg: #eef2f4; --p3: #36454f;
    --rgaa-bg: #e3f4f2; --rgaa: #0a6f69;
    --seo-bg: #e6ebf7; --seo: #24408e;
    --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: #ffffff;
    color: var(--ink);
    font-family: "Outfit", "Segoe UI", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.55;
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
code, .mono { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: .9em; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
}

/* ---- Gabarit ---- */
.shell { min-height: 100vh; display: flex; flex-wrap: wrap; }
.side {
    flex: 1 1 250px; max-width: 100%;
    background: var(--navy); padding: 30px 16px;
    display: flex; flex-direction: column; gap: 28px;
}
.side .logo { width: 104px; height: auto; margin-left: 16px; }
.side-group { display: flex; flex-direction: column; gap: 4px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.sec {
    font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
    color: var(--mint); padding: 0 16px 6px;
}
.nav {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 46px; padding: 0 16px; border-radius: var(--radius);
    color: var(--navy-text); text-decoration: none; font-weight: 500;
    background: none; border: 0; font: inherit; cursor: pointer; text-align: left; width: 100%;
}
.nav:hover { background: var(--navy-2); color: #ffffff; }
.nav.on { background: var(--navy-2); color: #ffffff; box-shadow: inset 3px 0 0 var(--cyan); }
.nav .count { color: #f2b860; font-weight: 700; }
.me { padding: 0 16px; color: var(--navy-text); font-size: 14px; }
.me strong { color: #ffffff; display: block; font-weight: 600; }
.main {
    flex: 999 1 560px; min-width: 0;
    padding: 48px max(16px, 3.5vw) 64px;
    display: flex; flex-direction: column; gap: 36px;
}

/* ---- Typographie ---- */
.k { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.k a { color: var(--muted); text-decoration: none; }
.k a:hover { color: var(--ink); text-decoration: underline; }
.title { font-size: 50px; font-weight: 700; line-height: 1.02; letter-spacing: -0.03em; text-wrap: balance; }
.lead { color: var(--muted); font-size: 18px; }
.h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.note { font-size: 14px; color: var(--muted); max-width: 80ch; }
.num { font-variant-numeric: tabular-nums; }
.page-head { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: flex-end; justify-content: space-between; }
.page-head > div:first-child { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-lg { display: flex; flex-direction: column; gap: 22px; }
.cluster { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.split > * { flex: 1 1 380px; min-width: 0; }

/* ---- Boutons et pastilles ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 18px; border-radius: var(--radius);
    font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
    border: 1px solid transparent; white-space: nowrap;
}
.btn-primary { background: var(--navy); color: #ffffff; }
.btn-primary:hover { background: var(--accent); color: #ffffff; }
.btn-accent { background: var(--accent); color: #ffffff; }
.btn-accent:hover { background: var(--accent-dark); color: #ffffff; }
.btn-line { background: #ffffff; color: var(--ink); border-color: var(--border); }
.btn-line:hover { border-color: var(--ink); color: var(--ink); }
.btn-danger { background: #ffffff; color: var(--p1); border-color: #e9c4c0; }
.btn-danger:hover { border-color: var(--p1); color: var(--p1); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; text-decoration: underline; }
.inline-form { display: inline; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
    display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px;
    border-radius: 999px; border: 1px solid var(--border); background: #ffffff;
    font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; cursor: pointer;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"], .chip[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #ffffff; }
.seg { display: flex; }
.seg .chip { border-radius: 0; }
.seg .chip:first-child { border-radius: 999px 0 0 999px; }
.seg .chip:last-child { border-radius: 0 999px 999px 0; }
.seg .chip + .chip { margin-left: -1px; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.prio-1 { background: var(--p1-bg); color: var(--p1); }
.prio-2 { background: var(--p2-bg); color: var(--p2); }
.prio-3 { background: var(--p3-bg); color: var(--p3); }
.cat-RGAA { background: var(--rgaa-bg); color: var(--rgaa); }
.cat-SEO { background: var(--seo-bg); color: var(--seo); }
.b-quick, .b-ok { background: var(--ok-bg); color: var(--ok-ink); }
.b-warn { background: var(--warn-bg); color: #8a5300; }
.b-off { background: var(--p3-bg); color: var(--muted); }
.b-bad { background: var(--p1-bg); color: var(--p1); }

/* ---- Messages ---- */
.flash { padding: 14px 18px; border-radius: 12px; background: var(--ok-bg); color: var(--ok-ink); font-weight: 500; }
.flash-error { background: var(--p1-bg); color: var(--p1); }
.flash-warning, .notice { background: var(--warn-bg); color: var(--warn-ink); }
.notice { padding: 14px 18px; border-radius: 12px; }
.secret {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    padding: 14px 18px; border-radius: 12px; background: var(--navy); color: #ffffff;
}
.secret code { font-size: 15px; word-break: break-all; color: var(--mint); }
.empty { padding: 28px; border: 1px dashed var(--border); border-radius: 12px; color: var(--muted); }

/* ---- Liste des audits ---- */
.audit-row {
    display: grid; grid-template-columns: minmax(0, 2fr) 150px 110px minmax(0, 1.6fr) 150px;
    gap: 18px; align-items: center; padding: 18px 0;
}
.audit-head { padding: 10px 0; border-bottom: 1px solid var(--ink); }
.group-title { font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 22px 0 4px; }
.audit-list { list-style: none; }
.audit-list > li { border-bottom: 1px solid var(--line); }
.site { font-weight: 600; font-size: 18px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.site:hover { text-decoration: underline; color: var(--ink); }
.score-cell { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.toggle-btn {
    min-height: 40px; padding: 0 12px; border-radius: var(--radius); border: 1px solid var(--border);
    background: #ffffff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink);
}
.toggle-btn:hover { border-color: var(--ink); }
.top-actions { list-style: none; display: flex; flex-direction: column; }
.top-actions li {
    display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 14px; align-items: baseline;
    padding: 10px 0; border-top: 1px solid var(--line-soft);
}
.scroll-x { overflow-x: auto; }

/* ---- Identifiants Board ---- */
.board-ref { display: flex; flex-direction: column; gap: 8px; }
.board-ref .linkish { font-size: 14px; margin-left: 6px; }

/* ---- Clients ---- */
.client-row {
    display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.6fr) 170px 120px minmax(0, 1fr);
    gap: 18px; align-items: center; padding: 18px 0;
}
.audit-list > li.client-row { padding: 20px 0; }
/* toute la ligne mène au client : le lien du nom couvre la ligne */
.row-link { position: relative; }
.row-link .site::after { content: ""; position: absolute; inset: 0; }
.row-link:hover { background: var(--soft); }
.row-link:focus-within { background: var(--soft); }
.row-arrow { margin-left: auto; font-size: 20px; color: var(--muted); }
.row-link:hover .row-arrow { color: var(--accent); }
.wide { min-width: 900px; }

/* ---- Accueil d’un audit ---- */
.hero-score {
    display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center;
    padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.big { font-size: 72px; font-weight: 700; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.bar-wrap { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.bar { position: relative; height: 12px; border-radius: 6px; background: var(--p3-bg); }
.bar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--accent); }
.bar .tick { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--ink); }
.bar-legend { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.delta-up { color: var(--ok-ink); font-weight: 600; }
.delta-down { color: var(--p1); font-weight: 600; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.tile {
    display: flex; flex-direction: column; gap: 4px; padding: 18px 20px;
    border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--ink);
}
.tile:hover { border-color: var(--ink); color: var(--ink); }
.tile strong { font-weight: 600; font-size: 18px; }
.tile span { font-size: 14px; color: var(--muted); }
.tile.off { border-style: dashed; color: var(--muted); }

.timeline {
    list-style: none; margin: 0 0 0 7px; padding: 0 0 0 32px;
    border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 26px;
}
.timeline > li { position: relative; display: flex; flex-wrap: wrap; gap: 4px 20px; justify-content: space-between; }
.timeline .dot {
    position: absolute; left: -41px; top: 4px; width: 16px; height: 16px; border-radius: 50%;
    background: var(--navy); border: 3px solid #ffffff; box-shadow: 0 0 0 1px var(--navy);
}
.timeline .dot.live { background: var(--cyan); border-color: var(--navy); box-shadow: none; }
.timeline .dot.future { background: #ffffff; border: 2px dashed #9aa8b0; box-shadow: none; }
.timeline .body { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.timeline h3 { font-size: 19px; font-weight: 600; }
.timeline .rate { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.timeline .live-k { color: var(--accent); }
.timeline a.h3link { color: var(--ink); text-decoration: none; }
.timeline a.h3link:hover { text-decoration: underline; }

.numbered { list-style: none; border-top: 1px solid var(--ink); }
.numbered li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.numbered .n { font-weight: 700; }
.numbered .n.p1 { color: var(--p1); }
.numbered .n.p2 { color: var(--p2); }
.numbered .n.p3 { color: var(--p3); }

/* ---- Améliorer le score ---- */
.target-box {
    display: flex; flex-wrap: wrap; gap: 24px 56px; align-items: center;
    padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.target-box .scores { display: flex; gap: 28px; align-items: flex-end; flex-wrap: wrap; }
.target-box .arrow { font-size: 34px; color: var(--navy-text); padding-bottom: 8px; }
.big-64 { font-size: 64px; font-weight: 700; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.goal { color: var(--accent); }
.slider { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.slider input[type=range] { width: 100%; height: 28px; accent-color: var(--accent); cursor: pointer; margin: 0; }
.sim-list { list-style: none; border-top: 1px solid var(--ink); }
.sim-item { padding: 18px 0; border-bottom: 1px solid var(--line); }
.sim-item.skip { opacity: .55; }
.sim-grid { display: grid; grid-template-columns: 44px minmax(0, 1fr) 120px; gap: 16px; align-items: start; }
.sim-num {
    width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
    font-weight: 700; font-size: 14px; background: var(--navy); color: #ffffff;
}
.sim-item.skip .sim-num { background: var(--p3-bg); color: var(--muted); }
.sim-title { font-size: 17px; font-weight: 600; }
.sim-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sim-score { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.sim-score strong { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sim-score span { font-size: 13px; color: var(--muted); }
.more {
    min-height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border);
    background: #ffffff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink);
}
.more:hover { border-color: var(--ink); }
.details { margin: 14px 0 0 60px; display: flex; flex-direction: column; gap: 14px; }
.why-how {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 12px 24px; padding: 14px 18px; background: var(--soft); border-radius: 12px;
}
.why-how .ref { grid-column: 1 / -1; font-weight: 600; font-size: 15px; }
.why-how p { font-size: 15px; }
.why-how .why p:last-child { color: var(--ink-2); }
.why-how .how { padding-left: 14px; box-shadow: inset 3px 0 0 var(--accent); }
.why-how .how .k { color: var(--accent); }
.why-how > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }

/* ---- Tableaux ---- */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; min-width: 760px; }
table.list th {
    text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
    color: var(--muted); padding: 10px 12px 10px 0; border-bottom: 1px solid var(--ink); white-space: nowrap;
}
table.list td { padding: 16px 12px 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list td .sub { display: block; font-size: 14px; color: var(--muted); }
table.list .actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

/* ---- Formulaires ---- */
.card { border: 1px solid var(--border); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px 20px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-weight: 600; font-size: 15px; }
.field .help { font-size: 13px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=date], select, textarea {
    width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius);
    font: inherit; color: var(--ink); background: #ffffff;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--cyan); outline-offset: 0; border-color: var(--navy); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.otp { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 28px; letter-spacing: .4em; text-align: center; max-width: 260px; }

/* ---- Connexion et pages publiques ---- */
.public { min-height: 100vh; background: var(--navy); display: grid; place-items: center; padding: 32px max(16px, 4vw); }
.public-card {
    width: min(100%, 460px); background: #ffffff; border-radius: 18px; padding: 36px clamp(20px, 5vw, 40px);
    display: flex; flex-direction: column; gap: 22px;
}
.public-card .logo { width: 110px; height: auto; }
.public-card h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }

/* ---- Portail client ---- */
.client-top {
    background: var(--navy); color: #ffffff;
    padding: 22px max(16px, 3.5vw); display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
}
.client-top .logo { width: 96px; height: auto; }
.client-top p { color: var(--navy-text); font-size: 14px; }
.client-main { max-width: 1180px; margin: 0 auto; padding: 44px max(16px, 3.5vw) 64px; display: flex; flex-direction: column; gap: 36px; }

/* ---- Documentation ---- */
.doc pre {
    background: var(--navy); color: #e8f1f4; padding: 16px 18px; border-radius: 12px;
    overflow-x: auto; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; line-height: 1.6;
}
.doc dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; }
.doc dt { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 14px; }

@media (max-width: 720px) {
    .title { font-size: 38px; }
    .big { font-size: 56px; }
    .big-64 { font-size: 48px; }
    .sim-grid { grid-template-columns: 36px minmax(0, 1fr); }
    .sim-score { grid-column: 2; text-align: left; flex-direction: row; gap: 10px; align-items: baseline; }
    .details { margin-left: 0; }
    .side { flex-basis: 100%; padding: 18px 12px; gap: 14px; }
    .side-foot { margin-top: 0; }
}
