/*
 * Dashboard EW — feuille de style unique, sans build.
 * Charte reprise d'exclusifweb.com : Raleway (titres, navigation, libellés),
 * Lato (texte), bleu marine #1a4462 / #102d42, gris anthracite #363637.
 * Règle : sobre. Aucune ombre, aucun dégradé, aucune transition ni animation.
 * Polices servies localement : aucune requête vers Google à l'affichage.
 */

@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('../fonts/lato-300-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('../fonts/lato-300-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/lato-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/lato-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/lato-700-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/lato-700-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/raleway-300-700-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/raleway-300-700-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --navy: #1a4462;
    --navy-deep: #102d42;
    --bg: #f4f6f8;
    --panel: #ffffff;
    --text: #363637;
    --muted: #7b8691;
    --line: #e1e6ea;
    --line-strong: #c5ced6;
    --row-hover: #f8fafb;
    --ok: #1f6b45;
    --warn: #a15c00;
    --error: #b3261e;
    --error-bg: #fcefed;

    --font-title: 'Raleway', 'Helvetica Neue', Arial, sans-serif;
    --font-text: 'Lato', 'Helvetica Neue', Arial, sans-serif;
}

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

[hidden] { display: none !important; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 14.5px/1.5 var(--font-text);
}

a { color: var(--navy); text-underline-offset: 3px; }

h1, h2, h3 { margin: 0; font-family: var(--font-title); color: var(--navy-deep); line-height: 1.25; }
h1 { font-size: 22px; font-weight: 600; }
h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; }

p { margin: 0 0 10px; }

:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* ---------- Logo ---------- */

.logo {
    font-family: var(--font-title);
    font-size: 17px;
    font-weight: 300;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--navy);
    text-decoration: none;
    white-space: nowrap;
}

.logo strong { font-weight: 700; }

.logo .product {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    color: var(--muted);
}

/* ---------- Structure ---------- */

/* Le menu en colonne : les sections s'ajoutent sans que la barre ne sature. */

.shell { display: flex; align-items: flex-start; min-height: 100vh; }

.sidebar {
    position: sticky;
    top: 0;
    flex: 0 0 236px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100vh;
    padding: 18px 0 14px;
    background: var(--panel);
    border-right: 1px solid var(--line);
}

.sidebar .logo { padding: 0 22px; white-space: normal; }

.nav { display: flex; flex-direction: column; flex: 1; gap: 1px; }

.nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 20px;
    border-left: 2px solid transparent;
    font-family: var(--font-title);
    font-size: 12.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
}

.nav a:hover { color: var(--navy); background: var(--row-hover); }
.nav a[aria-current="page"] { color: var(--navy); font-weight: 600; border-left-color: var(--navy); background: var(--row-hover); }

.sidebar-foot {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 20px 0;
    border-top: 1px solid var(--line);
}

.account { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 13px; color: var(--muted); }
.account .email { overflow-wrap: anywhere; }

.content { flex: 1; min-width: 0; }

main {
    max-width: 1360px;
    margin: 0 auto;
    padding: 20px 24px 48px;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.page-head .sub { margin: 2px 0 0; color: var(--muted); }

.back {
    display: inline-block;
    margin-bottom: 4px;
    font-family: var(--font-title);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
}

.back:hover { color: var(--navy); }

section + section { margin-top: 22px; }
section > h2 { margin-bottom: 8px; }

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 4px;
}

.panel-body { padding: 14px 18px; }

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

.btn {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--navy);
    border-radius: 4px;
    background: var(--navy);
    color: #fff;
    font-family: var(--font-title);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
.btn:disabled, .btn:disabled:hover { opacity: .4; cursor: not-allowed; background: var(--navy); border-color: var(--navy); }

.btn-secondary { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn-secondary:hover { background: transparent; color: var(--navy-deep); border-color: var(--navy); }

.btn-link {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.btn-link:hover { color: var(--navy); }

/* ---------- Tableaux ---------- */

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

th, td {
    padding: 7px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    font-family: var(--font-title);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}

th:first-child, td:first-child { padding-left: 18px; }
th:last-child, td:last-child { padding-right: 18px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--row-hover); }

td a { font-weight: 700; text-decoration: none; }
td a:hover { text-decoration: underline; }

td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.empty { padding: 20px 18px; color: var(--muted); text-align: center; }

/* ---------- Fiches ---------- */

.placeholder { padding: 14px 18px; color: var(--muted); }

.notes { padding: 14px 18px; }
.notes p:last-child { margin-bottom: 0; }

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

form.stack { max-width: 640px; }

.field { margin-bottom: 12px; }

.field label {
    display: block;
    margin-bottom: 4px;
    font-family: var(--font-title);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--navy-deep);
}

.field .optional { font-weight: 400; letter-spacing: .04em; text-transform: none; color: var(--muted); }
.field .hint { margin: 3px 0 0; font-size: 13px; color: var(--muted); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

input[type="text"], input[type="email"], input[type="url"], input[type="date"], textarea, select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

input::placeholder, textarea::placeholder { color: #a3adb6; }

input:focus, textarea:focus, select:focus { outline: 1px solid var(--navy); border-color: var(--navy); }

textarea { min-height: 90px; resize: vertical; }

.field.has-error input, .field.has-error textarea { border-color: var(--error); }
.field .error { margin: 5px 0 0; font-size: 13px; color: var(--error); }

.actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.actions a:not(.btn) { color: var(--muted); }

/* ---------- Messages ---------- */

.flash {
    margin-bottom: 14px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--navy);
    border-radius: 4px;
    background: var(--panel);
}

.muted { color: var(--muted); }
.warn { color: var(--warn); font-weight: 700; }

/* ---------- Connexion ---------- */

.auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--navy-deep);
}

.auth-box { width: 100%; max-width: 400px; }

.auth-box .logo { display: block; margin-bottom: 28px; color: #fff; text-align: center; font-size: 20px; }
.auth-box .logo .product { color: rgba(255, 255, 255, .55); border-left-color: rgba(255, 255, 255, .25); }

.auth-box .panel-body { padding: 32px; }
.auth-box h1 { margin-bottom: 6px; font-size: 20px; }
.auth-box .sub { margin-bottom: 24px; color: var(--muted); }
.auth-box .btn { width: 100%; }

/* ---------- Écrans moyens ---------- */

/* Sous cette largeur, la colonne ne vaut plus la place qu'elle prend : elle
   reprend sa forme de barre, en haut, sur toute la largeur. */
@media (max-width: 900px) {
    .shell { flex-direction: column; }

    .sidebar {
        position: static;
        flex: none;
        width: 100%;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px 24px;
        padding: 14px 20px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .sidebar .logo { padding: 0; }
    .logo .product { display: none; }

    .nav { order: 3; flex-direction: row; flex-wrap: wrap; flex-basis: 100%; gap: 20px; }
    .nav a { padding: 6px 0; border-left: 0; border-bottom: 2px solid transparent; background: none; }
    .nav a:hover, .nav a[aria-current="page"] { background: none; }
    .nav a[aria-current="page"] { border-bottom-color: var(--navy); }

    .sidebar-foot { flex-direction: row; align-items: center; gap: 16px; margin-left: auto; padding: 0; border-top: 0; }
    .account { flex-direction: row; align-items: center; gap: 14px; }

    .activity-panel { width: 100%; }
}

/* ---------- Petits écrans ---------- */

@media (max-width: 760px) {
    .sidebar { gap: 10px 16px; padding: 12px 16px; }
    .nav { gap: 12px 18px; }
    .nav a { font-size: 11.5px; letter-spacing: .1em; }
    .account .email { display: none; }
    main { padding: 16px 12px 40px; }
    .page-head { flex-direction: column; align-items: flex-start; }
    .panel-body { padding: 12px 14px; }
    th:first-child, td:first-child { padding-left: 12px; }
    th:last-child, td:last-child { padding-right: 12px; }
    .field-row { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- Alertes, paramètres ---------- */

.count {
    padding: 1px 7px;
    border-radius: 10px;
    background: var(--error);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
}

/* Un travail en cours n'est pas une anomalie : il ne se signale pas en rouge. */
.count-neutral { background: var(--navy); }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid currentColor;
    border-radius: 3px;
    font-family: var(--font-title);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-critical { color: var(--error); background: var(--error-bg); }
.badge-warning { color: var(--warn); }
.badge-info, .badge-ok { color: var(--ok); }

.detail { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.nowrap { white-space: nowrap; }
.note { margin-top: 12px; font-size: 13px; color: var(--muted); }
code { font-size: 13px; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.group-head { margin: 18px 0 10px; font-size: 15px; font-weight: 600; }
.group-head:first-of-type { margin-top: 0; }

.account-panel + .account-panel { margin-top: 16px; }
.account-head { display: flex; justify-content: space-between; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.account-head strong { margin-right: 8px; }
.account-actions { display: flex; align-items: flex-start; gap: 20px; font-size: 13px; }
tr.is-off td { color: var(--muted); }

.btn-danger { background: var(--error); border-color: var(--error); }
.btn-danger:hover { background: #8c1d17; border-color: #8c1d17; }

select optgroup { font-weight: 700; }

/* ---------- Crawl et historique des pages ---------- */

input[type="number"], input[type="search"] {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.tabs { display: flex; gap: 24px; margin: -4px 0 16px; border-bottom: 1px solid var(--line); }

.tabs a, .filters a {
    padding: 0 0 10px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-family: var(--font-title);
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
}

.tabs a[aria-current="page"], .filters a[aria-current="page"] { color: var(--navy); font-weight: 600; border-bottom-color: var(--navy); }

.filters { display: flex; gap: 20px; }
.filters a { padding-bottom: 4px; font-size: 11px; }

.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.toolbar input { flex: 1; }
.toolbar select { width: auto; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; font-size: 13px; }

td.url { max-width: 420px; overflow-wrap: anywhere; }
td.url .badge { margin-left: 6px; }
.title-cell { color: var(--muted); overflow-wrap: anywhere; }

.status { font-variant-numeric: tabular-nums; font-weight: 700; }
.status-2 { color: var(--ok); }
.status-3 { color: var(--warn); }
.status-4, .status-5 { color: var(--error); }

.kv { display: grid; grid-template-columns: 180px 1fr; margin: 0; }
.kv dt, .kv dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.kv dt {
    padding-left: 18px;
    font-family: var(--font-title);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}
.kv dd { padding-right: 18px; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li { padding: 10px 18px; }
.timeline > li + li { margin-top: 12px; }
.timeline-head { display: flex; justify-content: space-between; gap: 16px; }

.change { padding: 12px 0; border-top: 1px solid var(--line); }
.timeline .change:first-of-type, .panel-body > .change:first-child, .page-changes h3 + .change { border-top: 0; }
.change-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; font-size: 14px; }

del, ins { text-decoration: none; padding: 1px 3px; border-radius: 2px; }
del { background: var(--error-bg); color: var(--error); }
ins { background: #e8f3ec; color: var(--ok); }

.diff-inline { margin: 8px 0 0; overflow-wrap: anywhere; }
.diff-inline .arrow { margin: 0 6px; color: var(--muted); }
.diff-list { margin: 8px 0 0; padding: 0; list-style: none; font-size: 14px; }
.diff-list li { margin: 3px 0; overflow-wrap: anywhere; }
.diff-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }

pre.code {
    margin: 0;
    padding: 12px 14px;
    max-height: 480px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--bg);
    font-size: 12.5px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.page-changes + .page-changes { margin-top: 12px; }
.page-changes h3 { margin-bottom: 8px; font-size: 15px; }

.version-nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.version-nav > span { display: flex; gap: 16px; align-items: center; }
.version-nav .back { margin: 0; }

.heading { margin: 0 0 6px; }
.heading code { color: var(--muted); margin-right: 6px; }
.heading.h-3 { padding-left: 20px; }
.heading.h-4 { padding-left: 40px; }
.heading.h-5, .heading.h-6 { padding-left: 60px; }

.text-blocks { max-height: 520px; overflow: auto; }

@media (max-width: 760px) {
    .kv { grid-template-columns: 1fr; }
    .kv dt { padding: 12px 20px 0; border-bottom: 0; }
    .kv dd { padding: 4px 20px 12px; }
    .timeline > li { padding: 16px 20px; }
    .timeline-head, .toolbar { flex-direction: column; align-items: stretch; }
    .diff-cols { grid-template-columns: 1fr; }
    .tabs { gap: 18px; overflow-x: auto; }
    .tabs a { white-space: nowrap; }
}

fieldset.schedule { margin: 0 0 20px; padding: 0; border: 0; }
fieldset.schedule legend {
    margin-bottom: 4px;
    font-family: var(--font-title);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--navy-deep);
}
.field .choice, .choice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
    font-family: var(--font-text);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text);
}
.choice strong { color: var(--navy-deep); }
.choice select { width: auto; padding: 6px 10px; }
.schedule-options { margin-left: 26px; padding-left: 14px; border-left: 2px solid var(--line); }

/* ---------- Services branchés (fiche client) ---------- */

.page-head-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }

.services { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

.service {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--panel);
    color: var(--muted);
    font-family: var(--font-title);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}

.service svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service.is-off { color: #a9b2ba; background: var(--bg); }
.service.is-off svg { opacity: .7; }
.service:hover { border-color: var(--navy); color: var(--navy); }

.service.is-on { color: var(--ok); border-color: #b5d6c3; background: #eff7f2; }
.service.is-broken { color: var(--warn); border-color: #e6c89c; background: #fdf6ec; }
.service-note { font-size: .75em; opacity: .8; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Focus de visibilité ---------- */

.assign-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 13px; }
.assign-bar select, .assign-bar input { width: auto; min-width: 200px; }
.assign-bar + .error, .assign-bar ~ .error { margin: -4px 0 12px; font-size: 13px; color: var(--error); }
th.check, td.check { width: 1%; padding-right: 0; }
td.check input { margin: 0; }
.badge-focus { color: var(--navy); text-decoration: none; text-transform: none; letter-spacing: .02em; }
.badge-focus:hover { background: var(--row-hover); }
.result-count { margin: -4px 0 12px; font-size: 13px; color: var(--muted); }
#pages-results.is-loading { opacity: .55; }
th.check input { margin: 0; }

.search-help { margin: -8px 0 16px; font-size: 12.5px; color: var(--muted); }
.search-help code, .assign-bar code { padding: 0 4px; border-radius: 3px; background: var(--panel); border: 1px solid var(--line); font-size: 12px; color: var(--text); }
.result-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: -4px 0 12px; }
.result-head .result-count { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chip { display: flex; align-items: center; gap: 6px; padding: 3px 4px 3px 8px; border: 1px solid #b5d6c3; border-radius: 4px; background: #eff7f2; font-size: 13px; }
.chip.is-exclude { border-color: #efc2bd; background: var(--error-bg); }
.chip.is-exclude .chip-term { text-decoration: line-through; text-decoration-color: var(--error); }
.chip-mode { font-family: var(--font-title); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--ok); }
.chip.is-exclude .chip-mode { color: var(--error); }
.chip-mode:hover { text-decoration: underline; }
.chip-term { color: var(--text); word-break: break-all; }
.chip-remove { padding: 0 5px; color: var(--muted); text-decoration: none; font-size: 15px; line-height: 1; }
.chip-remove:hover { color: var(--text); }

.files-toggle { margin: 0; white-space: nowrap; font-size: 13px; }
.search-help summary { cursor: pointer; }
.search-help dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); }
.search-help dt { white-space: nowrap; }
.search-help dd { margin: 0; }
.chip-field { font-size: 11px; color: var(--muted); }
.chip-or { font-size: 11px; color: var(--muted); font-style: italic; }
.all-matching { flex-basis: 100%; margin: 0; font-size: 13px; }
th.sortable a { color: inherit; text-decoration: none; white-space: nowrap; }
th.sortable a:hover { color: var(--navy); }
.sort-mark { margin-left: 4px; color: var(--line-strong); }
th.is-sorted .sort-mark, th.sortable a:hover .sort-mark { color: var(--navy); }
fieldset.rule { margin: 8px 0 20px; padding: 16px 20px 0; border: 1px solid var(--line); border-radius: 4px; }
fieldset.rule legend { padding: 0 6px; font-family: var(--font-title); font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--navy-deep); }
fieldset.rule > .hint { margin: 0 0 16px; font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .search-help dl { grid-template-columns: 1fr; } }

/* ---------- Pages à travailler ---------- */

.bar-label { min-width: 150px; color: var(--muted); }
.badge-work { color: var(--warn); text-decoration: none; text-transform: none; letter-spacing: .02em; }
.tab-count { margin-left: 6px; padding: 0 6px; border-radius: 9px; background: var(--warn); color: #fff; font-size: 10.5px; letter-spacing: 0; }
table.work td { vertical-align: top; }
.note-cell { max-width: 280px; font-size: 13.5px; }
.work-status { font-family: var(--font-title); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.work-status.is-todo { color: var(--navy); }
.work-status.is-doing { color: var(--warn); }
.work-status.is-verified { color: var(--ok); }
.status-actions { display: flex; gap: 12px; margin: 0; }
.status-actions .btn-link { font-size: 13px; color: var(--muted); }
.status-actions .btn-link:hover { color: var(--navy); }
.inline-add { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline-add select, .inline-add input[type="text"] { width: auto; flex: 1; min-width: 200px; }

/* Visibilité Search Console d'un focus */
:root { --chart-impressions: #a9c4dc; --chart-position: #c77a12; }
.period-note { margin: -4px 0 12px; font-size: 13px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.kpi { padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.kpi-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.kpi-value { font-family: var(--font-title); font-size: 26px; font-weight: 600; color: var(--navy-deep); font-variant-numeric: tabular-nums; }
.delta { font-size: 12px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
td .delta { margin-left: 6px; }
.delta-up { color: var(--ok); }
.delta-down { color: var(--error); }
.delta-flat { color: var(--muted); }
.chart-panel { padding: 12px 16px; }
.chart-box { position: relative; }
.chart-box-main { height: 300px; }
.chart-box-position { height: 180px; margin-top: 20px; }
table.keywords td.query { max-width: 420px; overflow-wrap: anywhere; }
.spark-cell { width: 110px; }
.spark { display: block; overflow: visible; }
.spark polyline { fill: none; stroke: var(--navy); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
#keywords-results.is-loading { opacity: .55; }
@media (max-width: 760px) {
    .kpis { grid-template-columns: repeat(2, 1fr); }
    .chart-box-main { height: 240px; }
}
.ranking-pages > div + div { margin-top: 4px; }
.ranking-pages .muted { font-size: 12px; margin-left: 4px; }
table.tracked td { vertical-align: top; }

/* Inspection d'URL (Search Console) */
.badge-muted { color: var(--muted); }
.google-summary { margin: 4px 0 14px; font-size: 13px; line-height: 1.7; }
.google-summary a { text-decoration: none; }
.google-summary-label { margin-right: 6px; font-family: var(--font-title); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.google-cell { max-width: 220px; }
.index-state { display: inline-block; padding: 0 4px; border-radius: 3px; font-size: 12.5px; line-height: 1.45; }
.inspect-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.inspect-actions form { margin: 0; }
table.inspections td { vertical-align: top; }
.referring { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }

/* Journal */
table.journal td { vertical-align: top; }
table.journal tr.is-error td { background: var(--error-bg); }
.journal-detail { max-width: 560px; overflow-wrap: anywhere; }
.journal-detail pre { max-height: 240px; overflow: auto; margin: 6px 0 0; font-size: 12px; white-space: pre-wrap; }
.error-text { margin: 4px 0 0; font-size: 13px; color: var(--error); }

/* Captures : vignettes des pages stratégiques (docs/non-regression-visuelle.md). */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.shot { margin: 0; background: var(--panel, #fff); border: 1px solid var(--border, #e2e2e2); border-radius: 6px; overflow: hidden; }
.shot img { display: block; width: 100%; height: 240px; object-fit: cover; object-position: top; background: #f4f4f4; }
.shot-failed { display: flex; align-items: center; justify-content: center; height: 240px; background: var(--error-bg, #fdecec); color: var(--error, #b00020); font-weight: 600; }
.shot figcaption { padding: 10px 12px; font-size: 13px; }
.shot figcaption .detail { margin: 4px 0 0; }
.shot .kv { margin: 8px 0 0; font-size: 12px; }

/* Où l'écart se voit : la phrase qui dit s'il faut ouvrir les captures. */
.scope-label {
    margin: 0;
    font-family: var(--font-title);
    font-size: 16px;
    font-weight: 600;
    padding-left: 12px;
    border-left: 3px solid var(--line-strong);
}
.scope-label[data-scope="code"] { border-left-color: var(--ok); }
.scope-label[data-scope="screen"], .scope-label[data-scope="both"] { border-left-color: var(--warn); }
.scope-label[data-scope="unknown"] { border-left-color: var(--muted); }
.scope-detail { margin: 6px 0 0 15px; color: var(--muted); }
.scope-reasons { margin-left: 15px; }
.scope-reasons p { margin: 8px 0 0; }
.scope-reasons:empty { display: none; }
.scope-where { font-size: 12px; color: var(--muted); }

/* Revue d'un écart : avant, après, différences, chacun défilant de son côté. */
.shots-diff { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.shots-diff .shot a { display: block; max-height: 70vh; overflow: auto; }
.shots-diff .shot img { height: auto; object-fit: unset; }
.steps { display: flex; flex-wrap: wrap; gap: 24px; margin: 0; padding: 0; list-style: none; }
.steps li { flex: 1 1 180px; padding-left: 14px; border-left: 3px solid var(--border, #e2e2e2); }
.steps li .detail { margin: 2px 0 4px; }

/* Un focus cadre un élément, souvent large et bas : le montrer en entier, pas recadré. */
.shot-focus img { object-fit: contain; background: #fafafa; }
.focus-table td { vertical-align: top; }
.focus-table input[type="text"], .focus-table input:not([type]) { width: 100%; min-width: 110px; }
.focus-table select { min-width: 150px; }
.focus-table .trigger { display: flex; flex-wrap: wrap; gap: 6px; }
.focus-table .trigger select { flex: 0 0 120px; min-width: 120px; }
.focus-table .trigger input[name="trigger_selector"] { flex: 1 1 130px; }
.focus-table .trigger input[name="trigger_wait_ms"] { flex: 0 0 84px; min-width: 84px; }


/* ---------- Activité : ce qui tourne en ce moment ---------- */

.activity-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    font-family: var(--font-title);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--navy);
}

.activity-toggle:hover { border-color: var(--navy); background: var(--row-hover); }

.activity-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 30;
    width: 420px;
    max-width: 100%;
    height: 100vh;
    overflow-y: auto;
    background: var(--panel);
    border-left: 1px solid var(--line);
    box-shadow: -10px 0 30px rgba(16, 45, 66, .10);
}

.activity-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.activity-body { padding: 8px 22px 40px; }
.activity-page .activity-body { padding: 0; }

.activity-body h2 { margin: 24px 0 10px; }
.activity-body h2:first-child { margin-top: 14px; }
.activity-page .activity-body h2:first-child { margin-top: 0; }

.activity-alert { margin: 16px 0 0; font-size: 13px; color: var(--error); }
.activity-alert .badge { margin-right: 6px; }
.activity-empty { margin: 0; font-size: 13px; color: var(--muted); }
.activity-note { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

.run { padding: 12px 0; border-bottom: 1px solid var(--line); }
.run:last-of-type { border-bottom: 0; }

.run-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    margin: 0;
    font-family: var(--font-title);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--navy-deep);
}

.run-site { font-weight: 400; color: var(--muted); overflow-wrap: anywhere; }
.run-detail { margin: 7px 0 0; font-size: 13px; color: var(--muted); }

/* La jauge n'apparaît que là où un dénominateur existe vraiment. */
.meter {
    height: 6px;
    margin-top: 8px;
    border-radius: 3px;
    background: var(--line);
    overflow: hidden;
}

.meter span { display: block; height: 100%; background: var(--navy); }

/* ---------- Aide ---------- */

/* Le texte d'aide se lit en colonne étroite : au-delà, l'œil perd la ligne. */
.prose { max-width: 68ch; line-height: 1.65; }
.prose h2 {
    margin: 32px 0 12px;
    font-family: var(--font-title);
    font-size: 19px;
    font-weight: 600;
    color: var(--navy-deep);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 24px 0 8px; font-family: var(--font-title); font-size: 16px; font-weight: 600; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.prose code { padding: 1px 4px; background: var(--bg); border-radius: 3px; font-size: 13px; }
.prose table { width: 100%; margin: 0 0 16px; border-collapse: collapse; }
.prose th, .prose td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { font-family: var(--font-title); font-size: 13px; color: var(--muted); }

.help-toc { margin: -4px 0 16px; font-size: 13px; color: var(--muted); line-height: 1.9; }
.help-toc a { color: var(--muted); }
.help-toc a:hover { color: var(--navy); }

.help-context p { margin: 0; }
.help-context .muted { margin-bottom: 4px; font-size: 13px; }

.help-pages, .help-hits { margin: 0; padding: 0; list-style: none; }
.help-pages > li, .help-hits > li { padding: 10px 18px; border-bottom: 1px solid var(--line); }
.help-pages > li:last-child, .help-hits > li:last-child { border-bottom: 0; }
.help-pages p, .help-hits p { margin: 4px 0 0; }
.help-excerpt { font-size: 14px; color: var(--muted); }

/* Le mot cherché se repère sans couleur criarde : la sobriété vaut aussi ici. */
.help-excerpt mark { background: #fdf2d0; color: inherit; }

.help-log { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.help-log li { margin-bottom: 4px; }

/* Repères d'événements : symbole (forme + couleur) dans les listes et les légendes de graphiques. */
.event-marker { vertical-align: -2px; margin-right: 4px; }
.event-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 12px 0 0; font-size: 13px; }
.event-legend-item { white-space: nowrap; }

/* ---------- Pastilles d'état : franches, une couleur = un sens ---------- */

.state {
    display: inline-block; padding: 2px 9px; border-radius: 3px; border: 1px solid transparent;
    font-family: var(--font-title); font-size: 11px; font-weight: 700; letter-spacing: .05em;
    text-transform: uppercase; white-space: nowrap; color: #fff; line-height: 1.6;
}
.state-run { background: var(--warn); }          /* ça tourne */
.state-decide { background: var(--error); }      /* une décision attend */
.state-ok { background: var(--ok); }             /* fait, validé */
.state-info { background: transparent; color: var(--muted); border-color: var(--line-strong); }

.error-text { color: var(--error); }

/* Alerte bloquante : rouge plein, impossible à manquer. */
.alert-block {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin: 0 0 12px; padding: 12px 16px; background: var(--error); color: #fff;
}
.alert-block strong { font-family: var(--font-title); font-size: 14px; }
.alert-block p { margin: 2px 0 0; font-size: 13px; }
.alert-block .btn { background: #fff; color: var(--error); border-color: #fff; }
.alert-block .btn:hover { background: var(--error-bg); color: var(--error); }

/* ---------- Contrôle de mise à jour : en-tête et étapes compactes ---------- */

.check-head { margin-bottom: 16px; }
.check-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.check-top .back { margin: 0; }
.check-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.check-title h1 { font-size: 22px; }
.check-title .muted { font-size: 13px; }

.btn-sm { padding: 6px 12px; font-size: 11px; }

.steps-v { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.step { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); padding: 9px 14px; }
.step.tone-todo { border-left-color: var(--navy); }
.step.tone-run { border-left-color: var(--warn); }
.step.tone-decide { border-left-color: var(--error); }
.step.tone-ok { border-left-color: var(--ok); }
.step.tone-wait { background: transparent; }
.step.tone-wait .step-name, .step.tone-wait .step-sum { color: var(--muted); }
.step.tone-void { background: transparent; }
.step-row { display: flex; align-items: center; gap: 10px; min-height: 30px; flex-wrap: wrap; }
.step-name { width: 120px; flex-shrink: 0; font-family: var(--font-title); font-size: 13px; font-weight: 600; color: var(--navy-deep); }
.step-sum { flex: 1; min-width: 0; font-size: 13.5px; }
.step-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.step-body { margin: 8px 0 0 130px; }
.step-body .field { margin-bottom: 8px; }
.step-decide { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.step-decide form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.step-more { margin: 6px 0 0 130px; }
.step-decide .step-more { margin-left: 0; }
.step-more summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.step-more form { margin-top: 8px; }
.step .progress-box { margin: 10px 0 2px 130px; }

.progress-box { padding: 14px 16px; background: var(--bg); border: 1px solid var(--line); }
.progress-head { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.progress-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--navy); animation: progress-pulse 1.2s ease-in-out infinite; }
@keyframes progress-pulse { 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .progress-pulse { animation: none; } }
.progress-bar { height: 6px; background: var(--line); overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--navy); transition: width .4s; }
.progress-feed { list-style: none; margin: 10px 0 0; padding: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.progress-feed li { padding: 2px 0; }
.progress-feed .is-failed { color: var(--error); }

@media (max-width: 760px) {
    .step-name { width: auto; }
    .step-body, .step-more, .step .progress-box { margin-left: 0; }
    .step-actions { margin-left: 0; width: 100%; }
}

/* ---------- Audit (docs/audit.md) : thèmes repliables, un critère par ligne ---------- */

.audit-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 10px; font-size: 13px; }
.audit-pick { display: flex; align-items: center; gap: 8px; }
.audit-pick label { font-family: var(--font-title); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--navy-deep); }
.audit-pick select { width: auto; padding: 5px 8px; font-size: 13px; }
.audit-bar-end { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.seg.seg-links { display: inline-flex; align-items: stretch; }
.seg-links a { display: inline-flex; align-items: center; gap: 4px; padding: 5px 11px; font-size: 13px; text-decoration: none; color: var(--text); }
.seg-links a + a { border-left: 1px solid var(--line-strong); }
.seg-links a[aria-current="page"] { background: var(--navy); color: #fff; }
.seg-links a[aria-current="page"] .seg-count { color: rgba(255, 255, 255, .7); }
.seg-links button { padding: 5px 11px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; }
.seg-links button + button { border-left: 1px solid var(--line-strong); }
.seg-links a:hover:not([aria-current]), .seg-links button:hover { background: var(--row-hover); }
.audit-tools { display: inline-flex; gap: 8px; }
.only-errors .audit-row[data-ok] { display: none; }
.only-errors .audit-row:nth-child(1 of :not([data-ok])) { border-top: 0; }
.only-errors:not([data-show]):not(:has(.audit-row:not([data-ok]))) .audit-cols { display: none; }
.audit-row-none { display: none; padding: 6px 14px; font-size: 13px; }
.only-errors .audit-row-none { display: block; }
/* Filtre propre à un thème (clic sur un compteur de son en-tête) : il remplace celui de la barre. */
.audit-theme[data-show] .audit-row-none { display: none; }
.audit-theme[data-show]:not([data-show="all"]) .audit-row { display: none; }
.audit-theme[data-show="all"] .audit-row,
.audit-theme[data-show="pass"] .audit-row[data-state="pass"],
.audit-theme[data-show="partial"] .audit-row[data-state="partial"],
.audit-theme[data-show="fail"] .audit-row[data-state="fail"],
.audit-theme[data-show="unknown"] .audit-row[data-state="unknown"],
.audit-theme[data-show="info"] .audit-row[data-state="info"] { display: block; }
.audit-show { display: inline-flex; align-items: center; gap: 6px; }
button.audit-count { border: 1px solid transparent; font-family: inherit; line-height: 1.45; cursor: pointer; }
button.audit-count:hover { filter: brightness(.92); }
button.audit-count[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--navy); }
button.audit-count.audit-unknown { border-color: var(--line-strong); }
.audit-count.audit-all { background: #fff; border-color: var(--line-strong); color: var(--text); font-weight: 600; }

.audit-theme { margin-bottom: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.audit-theme-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 8px 14px; font-size: 13px; list-style: none; cursor: pointer; }
.audit-theme-head::-webkit-details-marker { display: none; }
.audit-theme[open] > .audit-theme-head { border-bottom: 1px solid var(--line); }
.audit-theme-name { font-family: var(--font-title); font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--navy-deep); }
.audit-theme-right { margin-left: auto; font-size: 13px; }
.audit-chevron { width: 0; height: 0; border-left: 5px solid var(--navy); border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.audit-theme[open] > summary .audit-chevron { transform: rotate(90deg); }
.audit-trends { font-size: 12.5px; display: inline-flex; gap: 8px; }

/* Réglages en lignes : libellé | valeur | explication, une ligne par réglage. */
.set-form { padding: 0; }
.set-group { padding: 6px 14px; border-bottom: 1px solid var(--line); background: var(--row-hover); font-family: var(--font-title); font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--navy-deep); }
.set-row { display: grid; grid-template-columns: minmax(200px, 260px) auto minmax(0, 1fr); gap: 4px 16px; align-items: center; padding: 6px 14px; font-size: 13px; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-label { font-weight: 600; color: var(--text); }
.set-control { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.set-control input { width: 64px; padding: 3px 6px; font-size: 13px; text-align: right; }
.set-hint { font-size: 12px; color: var(--muted); }
.set-error { grid-column: 2 / -1; font-size: 12px; color: var(--error); }
.set-row.has-error input { border-color: var(--error); }
.set-actions { display: flex; justify-content: flex-end; padding: 6px 14px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .set-row { grid-template-columns: 1fr; } .set-error { grid-column: auto; } }

.audit-count { padding: 1px 7px; border-radius: 3px; font-size: 12px; font-weight: 700; color: #fff; }
.audit-state { display: inline-block; width: 84px; padding: 2px 0; border: 1px solid transparent; border-radius: 3px; text-align: center; font-family: var(--font-title); font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #fff; }
.audit-pass { background: var(--ok); }
.audit-partial { background: var(--warn); }
.audit-fail { background: var(--error); }
.audit-unknown { background: transparent; color: var(--muted); border: 1px solid var(--line-strong); }
.audit-info { background: var(--muted); }

.audit-rows { list-style: none; margin: 0; padding: 0; }
.audit-row + .audit-row { border-top: 1px solid var(--line); }
.audit-cols, .audit-row-line { display: grid; grid-template-columns: 84px minmax(200px, 1.1fr) minmax(0, 2fr) 48px 96px 64px 24px; gap: 12px; align-items: center; padding: 5px 14px; }
.audit-cols { padding-top: 4px; padding-bottom: 4px; border-bottom: 1px solid var(--line); font-family: var(--font-title); font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.audit-row-line { font-size: 13.5px; list-style: none; }
.audit-row-line.is-progress { grid-template-columns: 84px minmax(200px, 1.1fr) minmax(0, 2fr) 64px; }
summary.audit-row-line { cursor: pointer; }
summary.audit-row-line::-webkit-details-marker { display: none; }
summary.audit-row-line:hover { background: var(--row-hover); }
.audit-cols .num, .audit-row-line .num { text-align: right; font-variant-numeric: tabular-nums; }
.audit-label { font-weight: 700; color: var(--navy-deep); }
.audit-summary { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
details[open] > .audit-row-line .audit-summary { white-space: normal; }
.audit-urls { display: inline-block; min-width: 26px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 3px; text-align: center; font-weight: 700; color: var(--navy); }
.audit-sev { font-size: 11.5px; color: var(--muted); text-align: right; }
/* ↻ : actualiser un critère seul ; pendant l'actualisation, le constat dit l'étape et tourne. */
.audit-refresh { width: 22px; height: 22px; padding: 0; border: 1px solid var(--line-strong); border-radius: 3px; background: #fff; color: var(--navy); font-size: 13px; line-height: 1; cursor: pointer; }
.audit-refresh:hover { border-color: var(--navy); background: var(--navy); color: #fff; }
.audit-refresh > span { display: inline-block; }
.audit-refresh[data-running] { border-color: var(--warn); color: var(--warn); background: #fff; cursor: progress; }
.audit-refresh[data-running] > span { animation: audit-spin 1s linear infinite; }
@keyframes audit-spin { to { transform: rotate(360deg); } }
.audit-summary.is-refreshing { color: var(--warn); }
.audit-summary.is-refresh-error { color: var(--error); }
.audit-refreshed { color: var(--muted); font-style: italic; }
.trend { font-size: 12px; white-space: nowrap; }
.trend-better { color: var(--ok); }
.trend-worse { color: var(--error); font-weight: 700; }
.trend-stable { color: var(--muted); }

.info-tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 4px; border: 1px solid var(--line-strong); border-radius: 50%; font-family: Georgia, serif; font-size: 10.5px; font-style: italic; font-weight: 700; color: var(--muted); vertical-align: 1px; cursor: help; }
.info-tip:hover, .info-tip:focus { color: var(--navy); border-color: var(--navy); outline: none; }
.info-tip:hover::after, .info-tip:focus::after {
    content: attr(data-tip); position: absolute; z-index: 20; left: 50%; top: calc(100% + 6px); transform: translateX(-30%);
    width: 300px; padding: 7px 10px; border-radius: 4px; background: var(--navy-deep); color: #fff;
    font-family: var(--font-text); font-size: 12.5px; font-style: normal; font-weight: 400; line-height: 1.45; white-space: normal; text-align: left;
}

.audit-detail { padding: 2px 14px 10px 110px; font-size: 13px; }
.audit-detail p { margin: 0 0 4px; }
.audit-examples { margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; }
.audit-examples li { margin: 1px 0; }
.audit-lines { margin: 2px 0 4px; padding: 4px 8px; list-style: none; background: var(--row-hover); border-radius: 3px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.audit-lines .is-added { color: var(--ok); }
.audit-lines .is-removed { color: var(--error); }
.audit-action { margin-left: 8px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 3px; font-size: 12px; white-space: nowrap; }
.audit-action.is-copied::after { content: ' · adresse copiée'; color: var(--ok); }
.audit-examples .url, .audit-page-line .url { overflow-wrap: anywhere; }
a.url { font-weight: 700; }

.audit-cols-pages, .audit-page-line { grid-template-columns: minmax(240px, 1.4fr) 70px minmax(0, 2fr); }
.audit-page-line .url { font-weight: 700; color: var(--navy-deep); }
.audit-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.audit-chip { padding: 1px 6px; border-radius: 3px; font-size: 11.5px; color: #fff; }
.audit-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: 0; }

/* En cours : attente grise, en cours orange, fait vert. */
.audit-progress-inline { display: inline-block; width: 120px; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.audit-progress-inline span { display: block; height: 100%; background: var(--warn); }
.audit-row[data-state="waiting"] .audit-state { background: transparent; color: var(--muted); border-color: var(--line-strong); }
.audit-row[data-state="waiting"] .audit-label { color: var(--muted); font-weight: 400; }
.audit-row[data-state="current"] .audit-state { background: var(--warn); }
.audit-row[data-state="done"] .audit-state { background: var(--ok); }
.audit-row[data-state="waiting"] .audit-state::after { content: 'En attente'; }
.audit-row[data-state="current"] .audit-state::after { content: 'En cours'; }
.audit-row[data-state="done"] .audit-state::after { content: 'Analysé'; }

@media (max-width: 760px) {
    .audit-cols { display: none; }
    .audit-row-line, .audit-row-line.is-progress, .audit-page-line { grid-template-columns: 84px 1fr; }
    .audit-row-line > :nth-child(n+3) { grid-column: 2; text-align: left; }
    .audit-detail { padding-left: 14px; }
}

/* ---------- Liste des clients : filtres et CMS ---------- */

.seg { display: inline-flex; margin: 0; padding: 0; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; }
.seg label { display: flex; align-items: center; gap: 5px; padding: 6px 11px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.seg label + label { border-left: 1px solid var(--line-strong); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--navy); color: #fff; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--navy); outline-offset: 1px; }
.seg-count { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.seg label:has(input:checked) .seg-count { color: rgba(255, 255, 255, .7); }

.result-line { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
#clients-results.is-loading { opacity: .55; }
mark { background: #fbe7b5; color: inherit; padding: 0 1px; }

.cms { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.cms-logo { width: 18px; height: 18px; flex-shrink: 0; }
.cms-mono { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; background: var(--muted); font-family: var(--font-title); font-size: 8.5px; font-weight: 700; letter-spacing: .02em; }
.cms-wordpress .cms-logo { color: #21759b; }
.cms-prestashop .cms-mono { background: #df0067; }
.cms-shopify .cms-mono { background: #5e8e3e; }
.cms-other .cms-logo { color: var(--navy); }

/* ---------- Mots-clés et pages cibles ---------- */

.flash-error { border-left-color: var(--error); color: var(--error); }
form.inline { display: inline; }
.kw-table td { vertical-align: top; }
.kw-table td.url { max-width: 320px; }
.kw-edit { display: inline-block; }
.kw-edit summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.kw-edit[open] summary { color: var(--navy); }
.kw-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.kw-form select, .kw-form input[type="text"] { width: auto; min-width: 140px; padding: 3px 6px; font-size: 13px; }
.kw-form .btn { padding: 3px 10px; font-size: 13px; }
.kw-block { display: grid; gap: 0; }
.kw-block table { margin: 0; }
.kw-block .panel-body { padding: 6px 14px; }
.kw-table td.num, .kw-table th { white-space: nowrap; }
.kw-table td:nth-child(2) { min-width: 140px; }

/* ==========================================================================
   Charte V2 — densité (CLAUDE.md, « Règles d'ergonomie » › Charte V2).
   Tout écran créé ou repris s'en sert : tableau .v2, fenêtre .dlg, pastilles,
   interrupteurs. Valeurs resserrées : texte 13 px, lignes de 4 px, en-têtes 10 px.
   ========================================================================== */

/* Tableau dense */
table.v2 th { padding: 6px 8px 4px; font-size: 10px; }
table.v2 td { padding: 4px 8px; font-size: 13px; vertical-align: middle; }
table.v2 th:first-child, table.v2 td:first-child { padding-left: 14px; }
table.v2 th:last-child, table.v2 td:last-child { padding-right: 14px; }
table.v2 .badge { font-size: 10px; }
th.sortable a { color: inherit; text-decoration: none; white-space: nowrap; }
th.sortable a:hover { color: var(--navy); }
th.is-sorted a { color: var(--navy-deep); }

/* Pastille de position : vert, orange, gris (même code que l'audit) */
.pos-pill { display: inline-block; min-width: 32px; padding: 0 5px; border-radius: 3px; font: 700 11px/1.6 var(--font-title); text-align: center; font-variant-numeric: tabular-nums; }
.pos-pass { color: var(--ok); background: #e8f2ec; }
.pos-partial { color: var(--warn); background: #fbf1e3; }
.pos-info { color: var(--muted); background: #eef1f4; }

/* Barre d'impressions, proportionnelle à la plus forte de la liste */
.imp-bar { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.imp-bar i { position: relative; display: block; width: 44px; height: 3px; border-radius: 2px; background: var(--line); }
.imp-bar b { position: absolute; left: 0; top: 0; height: 100%; border-radius: 2px; background: var(--navy); }

/* Interrupteur arrondi (radios) : ★ Principal / Secondaire / — */
.switch { display: inline-flex; gap: 1px; padding: 2px; border-radius: 999px; background: #eef1f4; }
.switch label { padding: 1px 9px; border-radius: 999px; font: 600 11px/1.7 var(--font-title); color: var(--muted); cursor: pointer; white-space: nowrap; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch label:has(input:focus-visible) { outline: 2px solid var(--navy); outline-offset: 1px; }
.switch label:has(input[value="main"]:checked) { background: var(--navy); color: #fff; }
.switch label:has(input[value="secondary"]:checked) { background: #fff; color: var(--navy); outline: 1px solid var(--navy); outline-offset: -1px; }
.switch label:has(input[value=""]:checked) { background: #fff; color: var(--text); }

/* Pastille arrondie (synthèse, filtres actifs) */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; font: 600 11px/1.6 var(--font-title); color: var(--navy-deep); white-space: nowrap; }
.pill-main { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Fenêtre (élément <dialog>) : en-tête marine, corps qui défile, pied fixe */
dialog.dlg { width: min(700px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 6px; color: var(--text); overflow: hidden; }
dialog.dlg[open] { display: flex; flex-direction: column; }
dialog.dlg::backdrop { background: rgba(16, 45, 66, .55); }
.dlg > form, .dlg-inner { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.dlg-head { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; padding: 9px 14px; background: var(--navy-deep); color: #fff; }
.dlg-eyebrow { margin: 0; font: 600 9.5px var(--font-title); letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.dlg-title { margin: 1px 0 0; font: 700 15px/1.3 var(--font-title); color: #fff; overflow-wrap: anywhere; }
.dlg-sub { margin: 1px 0 0; font-size: 12px; color: rgba(255, 255, 255, .7); }
.dlg-kpis { display: flex; gap: 16px; }
.dlg-kpis b { display: block; font: 700 14px/1.2 var(--font-title); font-variant-numeric: tabular-nums; }
.dlg-kpis span { font: 600 9px var(--font-title); letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.dlg-close { align-self: start; width: 24px; height: 24px; padding: 0; border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%; background: none; color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }
.dlg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 5px 14px; border-bottom: 1px solid var(--line); background: #f7f9fb; font-size: 12.5px; }
.dlg-bar .grow { flex: 1; }
.dlg-search { width: 180px; padding: 3px 8px 3px 24px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 12.5px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%237b8691' stroke-width='2'%3E%3Ccircle cx='5' cy='5' r='3.8'/%3E%3Cpath d='m8 8 3 3'/%3E%3C/svg%3E") no-repeat 9px center; }
.dlg-body { flex: 1; min-height: 0; overflow: auto; }
.dlg-body table.v2 thead th { position: sticky; top: 0; background: #fff; z-index: 1; }
.dlg-body tr.is-main td { background: #f1f5f8; }
.dlg-body tr.is-main td:first-child { box-shadow: inset 3px 0 0 var(--navy); }
.dlg-body tr.is-none .dlg-term { font-weight: 400; color: var(--text); }
.dlg-term { font-weight: 700; color: var(--navy-deep); }
.dlg-term small { display: block; font-weight: 400; font-size: 11.5px; color: var(--warn); }
.dlg-add { display: flex; gap: 6px; padding: 5px 14px; border-top: 1px solid var(--line); }
.dlg-add input { flex: 1; padding: 3px 8px; border: 1px dashed var(--line-strong); border-radius: 4px; font-size: 12.5px; }
.dlg-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 14px; border-top: 1px solid var(--line); }
.dlg-nav { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.dlg-nav button { width: 22px; height: 22px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: #fff; color: var(--navy); font-size: 12px; line-height: 1; cursor: pointer; }
.dlg-nav button:disabled { opacity: .35; cursor: default; }
.dlg-foot .acts { display: flex; align-items: center; gap: 6px; }
.dlg-status { margin: 0; font-size: 12px; color: var(--ok); white-space: nowrap; }
.dlg-error { margin: 0; padding: 5px 14px; font-size: 12.5px; color: var(--error); background: var(--error-bg); }
.dlg-section { padding: 6px 14px; }
.dlg-section + .dlg-section { border-top: 1px solid var(--line); }
.dlg-label { margin: 0 0 3px; font: 600 10px var(--font-title); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dlg-choice { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 13px; cursor: pointer; }
.dlg-choice .muted { margin-left: auto; font-size: 12px; }
.dlg-choice input[type="text"] { flex: 1; padding: 3px 8px; font-size: 12.5px; }
.dlg.is-loading .dlg-inner { opacity: .55; }

/* Cellule « Mot-clé principal » de la liste des pages : ouvre la fenêtre de ciblage */
.kw-cell { display: inline-flex; align-items: center; gap: 5px; max-width: 220px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--navy-deep); font-weight: 700; text-align: left; cursor: pointer; }
.kw-cell span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kw-cell .more { font-weight: 400; font-size: 11.5px; color: var(--muted); }
.kw-cell.is-empty { padding: 0 8px; border: 1px dashed var(--line-strong); border-radius: 999px; font: 600 11px/1.7 var(--font-title); color: var(--muted); }
.kw-cell:hover .t, .kw-cell.is-empty:hover { color: var(--navy); }

/* Analyse mots-clés : page exclue, suggestion Search Console, règles d'exclusion */
.kw-cell.is-excluded { padding: 0 8px; border-radius: 999px; background: #eef1f4; font: 600 11px/1.7 var(--font-title); color: var(--muted); }
.kw-cell.is-excluded code { font: inherit; color: var(--text); }
.kw-td { max-width: 230px; }
.kw-sugg { display: block; max-width: 230px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--muted); }
.kw-sugg b { font-weight: 600; color: var(--navy); }
tr.is-excluded td, tr.is-excluded td.url a { color: var(--muted); }
.pill-off { background: #eef1f4; color: var(--muted); }
.rule { font: 600 12px ui-monospace, Menlo, monospace; color: var(--navy-deep); overflow-wrap: anywhere; }
.rule-x { width: 20px; height: 20px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 14px; cursor: pointer; }
.rule-x:hover { color: var(--error); }
tr.rule-group td { padding-top: 8px; font: 600 10px var(--font-title); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
tr.is-sugg td { background: #fbfcfd; }
.tag-warn { font-size: 11.5px; color: var(--warn); }
.rule-preview { margin: 0; padding: 0 14px 5px; font-size: 12px; color: var(--muted); }
.rule-preview b { color: var(--navy-deep); }
.rule-preview .warn { color: var(--warn); }

/* Filtres chiffrés : [Impr. > 1200] */
.num-filter { display: inline-flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; font-size: 12.5px; }
.num-filter span { display: flex; align-items: center; padding: 0 6px; font: 600 10.5px var(--font-title); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.num-filter select { width: auto; padding: 0 2px; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: none; font-size: 12.5px; }
.num-filter input { width: 64px; padding: 4px 6px; border: 0; border-left: 1px solid var(--line); border-radius: 0 4px 4px 0; font-size: 12.5px; }
.num-filter:has(input:not(:placeholder-shown)) { border-color: var(--navy); }
.toolbar.v2 { flex-wrap: wrap; gap: 6px; }
.toolbar.v2 input[type="search"] { flex: 1 1 220px; }

/* Barre d'actions des cases cochées : n'apparaît qu'avec une sélection */
.selection-bars[data-empty] { display: none; }
