/* Espace client Franault — feuille de style */
:root {
  --bg: #F3F4F0;
  --surface: #FFFFFF;
  --surface-2: #F8F9F6;
  --ink: #1B2018;
  --muted: #63675F;
  --line: #E0E3DA;
  --line-fort: #CDD2C5;
  --accent: #6B8E23;
  --accent-fonce: #587619;
  --accent-texte: #4E6A15;
  --accent-doux: #EAF0DC;
  --gris: #6D6E71;
  --side: #1D2419;
  --side-2: #283022;
  --side-3: #353F2E;
  --side-ink: #D3D8CB;
  --side-muted: #8C9385;
  --danger: #A8291F;
  --danger-doux: #FBEAE8;
  --attente: #7A5300;
  --attente-doux: #FAF0D9;
  --info-doux: #E9EEF5;
  --info: #2D4A6E;
  --font: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --r-sm: 7px;
  --r: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11140F;
    --surface: #181C15;
    --surface-2: #1D2219;
    --ink: #E4E8DE;
    --muted: #9EA398;
    --line: #2A3025;
    --line-fort: #3A4233;
    --accent: #86AD36;
    --accent-fonce: #9BC14A;
    --accent-texte: #A9CB62;
    --accent-doux: #222C18;
    --side: #0B0E09;
    --side-2: #171C13;
    --side-3: #232A1D;
    --danger: #F08A80;
    --danger-doux: #36191A;
    --attente: #E2B65E;
    --attente-doux: #302610;
    --info-doux: #18212C;
    --info: #9DB8DA;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent-texte); }
h1, h2, h3 { line-height: 1.25; margin: 0; }
small { display: block; }
code { font-size: 14px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ic {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Structure ---------- */
body.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }

.side {
  background: var(--side);
  color: var(--side-ink);
  display: flex; flex-direction: column;
  padding: 22px 14px 18px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}

.marque { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 2px 10px 26px; text-decoration: none; }
.marque img { display: block; width: 160px; height: auto; }
.marque span { font-size: 12.5px; color: var(--side-muted); padding-left: 2px; letter-spacing: .01em; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: var(--r-sm);
  color: var(--side-ink); text-decoration: none; font-size: 14.5px;
  position: relative;
}
.nav a .ic { color: var(--side-muted); }
.nav a:hover { background: var(--side-2); color: #fff; }
.nav a:hover .ic { color: var(--side-ink); }
.nav a.actif { background: var(--side-2); color: #fff; font-weight: 600; }
.nav a.actif .ic { color: var(--accent-fonce); }
.nav a.actif::before {
  content: ""; position: absolute; left: -14px; top: 7px; bottom: 7px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.nav a.inactif { opacity: .38; pointer-events: none; }

.switch { margin: 18px 0 14px; padding: 14px 10px 4px; border-top: 1px solid var(--side-2); }
.switch label { display: block; font-size: 12.5px; color: var(--side-muted); margin-bottom: 7px; }
.switch select {
  width: 100%; appearance: none;
  background: var(--side-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C9385' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 8px center / 18px;
  color: #fff; border: 1px solid var(--side-3); border-radius: var(--r-sm);
  padding: 9px 32px 9px 11px; font: inherit; font-size: 14px;
}

.side-client {
  display: flex; gap: 11px; align-items: center;
  margin: 0 0 16px; padding: 12px; border-radius: 10px; background: var(--side-2);
}
.side-client strong { color: #fff; font-size: 14px; display: block; line-height: 1.3; }
.side-client > span:last-child { min-width: 0; }
.side-client small { color: var(--side-muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-client .init { background: var(--accent); color: #fff; }

.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--side-2); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 36px; min-height: 68px;
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.top h1 { font-size: 20px; font-weight: 650; letter-spacing: -.015em; }
.top-droite { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-droite form { margin: 0; }
.qui { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--muted); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-doux); color: var(--accent-texte);
  display: grid; place-items: center; font-weight: 650; font-size: 13px;
}
.badge-vue {
  font-size: 12.5px; color: var(--accent-texte); background: var(--accent-doux);
  padding: 3px 10px; border-radius: 999px; font-weight: 600;
}
.contenu { padding: 30px 36px 64px; width: 100%; max-width: 1240px; }
.top .menu-btn { display: none; }
.voile { display: none; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px; border-radius: var(--r-sm); border: 1px solid var(--line-fort);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
  white-space: nowrap;
}
.btn .ic { width: 16px; height: 16px; }
.btn:hover { border-color: var(--muted); }
.btn-plein { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-plein:hover { background: var(--accent-fonce); border-color: var(--accent-fonce); }
@media (prefers-color-scheme: dark) { .btn-plein, .init.grand, .side-client .init { color: #10140C; } }
.btn-sec { background: var(--surface); }
.btn-danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn-danger:hover { background: var(--danger-doux); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-lien {
  background: none; border: 0; padding: 6px 4px; font: inherit; font-size: 14px;
  color: var(--accent-texte); cursor: pointer; text-decoration: none; font-weight: 500;
}
.btn-lien:hover { text-decoration: underline; }
.btn-ico {
  width: 38px; height: 38px; display: inline-grid; place-items: center;
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: none; color: var(--muted); cursor: pointer;
}
.btn-ico:hover { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.btn-mini {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line-fort);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer;
}
.btn-mini .ic { width: 14px; height: 14px; }

/* ---------- Messages ---------- */
.flash { padding: 12px 16px; border-radius: 10px; margin: 0 0 20px; font-size: 14.5px; }
.flash p { margin: 0; }
.flash-ok { background: var(--accent-doux); color: var(--accent-texte); }
.flash-erreur { background: var(--danger-doux); color: var(--danger); }
.flash-info { background: var(--info-doux); color: var(--info); }
.secret { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 6px; }
.secret code {
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-fort);
  padding: 7px 12px; border-radius: 7px; font-size: 15px; letter-spacing: .03em; word-break: break-all;
}
.petit { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.flash .petit { color: inherit; opacity: .85; }
.aide { font-size: 14px; color: var(--muted); margin: 4px 0 14px; }
.discret { color: var(--muted); font-size: 14px; }
a.discret { text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
a.discret .ic { width: 14px; height: 14px; }
a.discret:hover { color: var(--accent-texte); }

/* ---------- Panneaux ---------- */
.panneau {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px 24px; margin: 0;
}
.panneau h2 { font-size: 16px; font-weight: 650; margin-bottom: 4px; }
.panneau h3 { font-size: 14.5px; font-weight: 650; margin: 24px 0 2px; padding-top: 18px; border-top: 1px solid var(--line); }
.panneau-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panneau-tete h2 { margin: 0; }

.entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.sous { margin: 0; color: var(--muted); }
.retour { display: inline-block; margin-bottom: 16px; font-size: 14px; text-decoration: none; color: var(--muted); }
.retour:hover { color: var(--accent-texte); }

.resume { display: flex; gap: 0; margin: 0; flex-wrap: wrap; }
.resume div { padding: 0 28px; border-left: 1px solid var(--line-fort); }
.resume div:first-child { padding-left: 0; border-left: 0; }
.resume dt { font-size: 13px; color: var(--muted); }
.resume dd { margin: 2px 0 0; font-size: 28px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.resume dd small { display: inline; font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.liste { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.liste th {
  text-align: left; font-weight: 500; font-size: 13px; color: var(--muted);
  padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2);
  white-space: nowrap;
}
.liste td { padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.liste tr:last-child td { border-bottom: 0; }
.liste tbody tr:hover { background: var(--surface-2); }
.liste .num { text-align: right; }
.liste .actions { text-align: right; white-space: nowrap; }
.liste .actions > * { margin-left: 6px; vertical-align: middle; }
.liste .actions form { display: inline; }
.cl { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; min-width: 220px; }
.cl strong { font-weight: 600; display: block; line-height: 1.3; }
.cl small { color: var(--muted); font-size: 13px; }
a.cl:hover strong { color: var(--accent-texte); }

.init {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: var(--accent-doux); color: var(--accent-texte);
}
.init.rond { border-radius: 50%; }
.init.grand { width: 52px; height: 52px; border-radius: 13px; font-size: 21px; background: var(--accent); color: #fff; }

.etat {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; padding: 3px 10px 3px 8px; border-radius: 999px; white-space: nowrap;
}
.etat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.etat.ok { background: var(--accent-doux); color: var(--accent-texte); }
.etat.attente { background: var(--attente-doux); color: var(--attente); }
.etat.off { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

/* ---------- Formulaires ---------- */
.grille-form { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
.colonne { display: flex; flex-direction: column; gap: 22px; }
.champ { display: block; margin: 14px 0 0; }
.champ > span { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.champ small { color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.champ input, .champ select, .champ textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-fort); border-radius: var(--r-sm);
  padding: 10px 12px;
}
.champ input:focus, .champ select:focus, .champ textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-doux);
}
.champ textarea { resize: vertical; }
.boutons { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.boutons form { margin: 0; }
.espace-haut { margin-top: 24px; }
.suggestion { color: var(--accent-texte); font-weight: 600; }
.zone-danger { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }

.mini-liste { list-style: none; margin: 0; padding: 0; }
.mini-liste li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.mini-liste li:first-child { border-top: 0; }
.mini-liste strong { font-size: 14.5px; font-weight: 600; display: block; }
.mini-liste small { color: var(--muted); font-size: 13px; }

/* ---------- Tableau de bord client ---------- */
.client-tete { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.client-tete h2 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.pousse { margin-left: auto; }

.kpis {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  margin-bottom: 22px;
}
.kpi { padding: 20px 24px; display: flex; flex-direction: column; gap: 3px; border-left: 1px solid var(--line); }
.kpi:first-child { border-left: 0; }
.kpi-l { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.kpi-v { font-size: 32px; font-weight: 650; letter-spacing: -.025em; line-height: 1.2; }
.kpi-s { font-size: 12.5px; color: var(--muted); }

.grille-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 22px; align-items: start; }

.graphe-vide svg { width: 100%; height: 180px; display: block; }
.graphe-vide svg path { stroke: var(--line); stroke-width: 1; fill: none; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; }
.graphe-vide p { width: fit-content; max-width: 90%; margin: -102px auto 72px; padding: 2px 12px; background: var(--surface); text-align: center; color: var(--muted); font-size: 14px; position: relative; }

.sources { list-style: none; margin: 12px 0; padding: 0; }
.sources li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.sources li:first-child { border-top: 0; }
.src-nom strong { display: block; font-size: 14.5px; font-weight: 600; }
.src-nom small { color: var(--muted); font-size: 13px; word-break: break-all; }

/* ---------- États vides ---------- */
.vide {
  text-align: center; padding: 64px 24px;
  background: var(--surface); border: 1px dashed var(--line-fort); border-radius: var(--r);
}
.vide-ic {
  width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-doux); color: var(--accent-texte);
}
.vide-ic .ic { width: 24px; height: 24px; }
.vide h2 { font-size: 18px; font-weight: 650; }
.vide p { color: var(--muted); max-width: 48ch; margin: 8px auto 20px; }

/* ---------- Connexion ---------- */
.page-login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); background: var(--surface); }
.login-art {
  background: var(--side); color: #fff; position: relative; overflow: hidden;
  padding: 44px 56px; display: flex; flex-direction: column; min-height: 100vh;
}
.login-art .marque { padding-left: 0; position: relative; z-index: 1; }
.login-art .marque img { width: 173px; }
.login-texte { margin-top: 18vh; position: relative; z-index: 1; }
.login-art h1 { font-size: clamp(32px, 3.6vw, 50px); line-height: 1.06; letter-spacing: -.03em; font-weight: 650; max-width: 13ch; }
.login-art p { color: var(--side-ink); max-width: 38ch; margin: 18px 0 0; font-size: 16.5px; }
.courbe { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 44%; }
.courbe .grille path { stroke: rgba(255, 255, 255, .07); stroke-width: 1; vector-effect: non-scaling-stroke; }
.courbe .aire { fill: url(#aire); opacity: 0; animation: apparait 1s 1.4s ease forwards; }
.courbe .ligne {
  fill: none; stroke: var(--accent); stroke-width: 3; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1000; stroke-dashoffset: 1000; stroke-linecap: round;
  animation: trace 2.2s .3s cubic-bezier(.3, .7, .2, 1) forwards;
}
@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes apparait { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .courbe .ligne { animation: none; stroke-dashoffset: 0; }
  .courbe .aire { animation: none; opacity: 1; }
}
.login-cote { display: grid; place-items: center; padding: 40px 24px; }
.login-form { width: 100%; max-width: 360px; }
.login-form h2 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 8px; }
.login-form .flash { margin: 14px 0 0; }
.login-form .btn { width: 100%; margin-top: 24px; padding: 12px; font-size: 15px; }
.login-form .petit { margin-top: 18px; }

/* ---------- Installation ---------- */
.page-install { background: var(--bg); }
.install { max-width: 520px; margin: 0 auto; padding: 48px 20px; }
.install h1 { font-size: 26px; margin: 8px 0 18px; }
.install .panneau h2 { margin-top: 20px; }
.install .panneau h2:first-of-type { margin-top: 0; }
.marque-sombre { padding-left: 0; }
.marque-sombre span { color: var(--muted); }

/* ---------- Cellulaire et tablette ---------- */
@media (max-width: 1080px) {
  .grille-form, .grille-2 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  body.app { grid-template-columns: 1fr; }
  .side {
    position: fixed; left: 0; top: 0; bottom: 0; height: auto; width: 272px; z-index: 30;
    transform: translateX(-100%); transition: transform .22s ease;
  }
  .menu-ouvert .side { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
  .menu-ouvert .voile { display: block; position: fixed; inset: 0; background: rgba(10, 14, 8, .45); z-index: 20; }
  .top .menu-btn { display: inline-grid; margin-left: -8px; }
  .top { padding: 12px 16px; min-height: 60px; gap: 8px; }
  .top h1 { font-size: 17px; }
  .qui-nom, .badge-vue { display: none; }
  .contenu { padding: 20px 16px 48px; }
  .panneau { padding: 18px; }
  .resume div { padding: 0 18px; }
  .resume dd { font-size: 24px; }
  .page-login { grid-template-columns: 1fr; }
  .login-art { min-height: 0; padding: 28px 24px 120px; }
  .login-texte { margin-top: 36px; }
  .login-art h1 { font-size: 30px; }
  .login-art p { font-size: 15px; }
  .courbe { height: 110px; }
}
@media (max-width: 640px) {
  .resume { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .resume div { padding: 0 12px; }
  .resume dt { font-size: 12px; line-height: 1.3; }
  .resume dd { font-size: 22px; }
  .liste.repli thead { display: none; }
  .liste.repli, .liste.repli tbody, .liste.repli tr, .liste.repli td { display: block; }
  .liste.repli tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .liste.repli tr:last-child { border-bottom: 0; }
  .liste.repli tbody tr:hover { background: none; }
  .liste.repli td { padding: 0; border: 0; text-align: left; }
  .liste.repli td:first-child { margin-bottom: 10px; }
  .liste.repli td[data-l] { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 0 5px 46px; font-size: 14px; }
  .liste.repli td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: 13px; }
  .liste.repli .actions { text-align: left; padding: 10px 0 0 46px; }
  .liste.repli .actions > * { margin: 0 8px 0 0; }
  .liste.repli .btn-lien { display: inline; }
  .cl { min-width: 0; }
}
@media (max-width: 520px) {
  .kpi { padding: 16px; }
  .kpi-v { font-size: 26px; }
  .entete .btn { width: 100%; }
  .pousse { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }


/* ---------- Données ---------- */
.periodes, .onglets { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; flex-wrap: wrap; }
.periodes a, .onglets a { padding: 6px 12px; border-radius: 6px; font-size: 13.5px; color: var(--muted); text-decoration: none; font-weight: 500; white-space: nowrap; }
.periodes a:hover, .onglets a:hover { color: var(--ink); background: var(--surface-2); }
.periodes a.actif, .onglets a.actif { background: var(--side); color: #fff; }
@media (prefers-color-scheme: dark) { .periodes a.actif, .onglets a.actif { background: var(--accent); color: #10140C; } }
.onglets { background: var(--surface-2); }
.boutons-entete { display: flex; gap: 10px; flex-wrap: wrap; }
.boutons-entete form { margin: 0; }

.bande-titre { font-size: 15px; font-weight: 650; margin: 0 0 10px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bande-titre span { font-size: 13px; color: var(--muted); font-weight: 400; }
.kpis + .bande-titre { margin-top: 4px; }

.ecart { font-size: 13px; font-weight: 600; white-space: nowrap; }
.ecart.bon { color: var(--accent-texte); }
.ecart.mauvais { color: var(--danger); }
.ecart.neutre { color: var(--muted); font-weight: 500; }
.kpi .ecart { margin-top: 2px; }

.graphe-panneau { margin-bottom: 22px; }
.graphe-panneau .panneau-tete { flex-wrap: wrap; }
.graphe-defile { overflow-x: auto; }
.graphe { width: 100%; height: auto; display: block; margin-top: 6px; }
.g-grille { stroke: var(--line); stroke-width: 1; }
.g-txt { fill: var(--muted); font-size: 11.5px; font-family: var(--font); }
.g-ligne { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.g-prec { fill: none; stroke: var(--line-fort); stroke-width: 1.8; stroke-dasharray: 5 4; }
.g-aire { fill: var(--accent); opacity: .1; }
.g-zone { fill: transparent; }
.g-zone:hover { fill: var(--accent); opacity: .08; }
.legende { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.legende span { display: inline-block; width: 18px; height: 0; border-top: 2.4px solid var(--accent); margin-left: 8px; }
.legende .l-prec { border-top: 2px dashed var(--line-fort); }

.grille-2.egal { grid-template-columns: 1fr 1fr; margin-bottom: 22px; }
.espace-bas { margin-bottom: 22px; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mini-table th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted); padding: 6px 0; border-bottom: 1px solid var(--line); }
.mini-table td { padding: 9px 0; border-bottom: 1px solid var(--line); }
.mini-table tr:last-child td { border-bottom: 0; }
.mini-table .num { text-align: right; padding-left: 14px; white-space: nowrap; }
.coupe { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fort { font-weight: 650; }
.lien-page { color: var(--ink); text-decoration: none; }
.lien-page:hover { color: var(--accent-texte); text-decoration: underline; }
.liste.donnees td, .liste.donnees th { padding: 10px 16px; }
.table-wrap.plat { border: 0; border-radius: 0; margin: 8px -24px -22px; border-top: 1px solid var(--line); }
.pos { display: inline-block; min-width: 42px; padding: 2px 8px; border-radius: 6px; text-align: center; }
.pos.top3 { background: var(--accent); color: #fff; font-weight: 650; }
.pos.top10 { background: var(--accent-doux); color: var(--accent-texte); font-weight: 600; }
@media (prefers-color-scheme: dark) { .pos.top3 { color: #10140C; } }

.barres { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.barres li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; }
.b-val { font-weight: 650; text-align: right; }
.b-val small { display: inline; color: var(--muted); font-weight: 400; font-size: 12.5px; margin-left: 4px; }
.b-piste { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.b-piste span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.b-0 { width: 0%; }
.b-5 { width: 5%; }
.b-10 { width: 10%; }
.b-15 { width: 15%; }
.b-20 { width: 20%; }
.b-25 { width: 25%; }
.b-30 { width: 30%; }
.b-35 { width: 35%; }
.b-40 { width: 40%; }
.b-45 { width: 45%; }
.b-50 { width: 50%; }
.b-55 { width: 55%; }
.b-60 { width: 60%; }
.b-65 { width: 65%; }
.b-70 { width: 70%; }
.b-75 { width: 75%; }
.b-80 { width: 80%; }
.b-85 { width: 85%; }
.b-90 { width: 90%; }
.b-95 { width: 95%; }
.b-100 { width: 100%; }
.b-1 { width: 1%; }

.pastilles { display: inline-flex; gap: 4px; }
.pastille { font-size: 11.5px; font-weight: 650; padding: 2px 7px; border-radius: 5px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.pastille.ok { background: var(--accent-doux); color: var(--accent-texte); border-color: transparent; }
.filtre { margin-bottom: 12px; }
.filtre input { width: 100%; max-width: 360px; font: inherit; font-size: 14.5px; padding: 9px 12px; border: 1px solid var(--line-fort); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
.filtre input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-doux); }
.sources-pied { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sources-pied .aide { margin: 0; }
.sources-pied form { margin: 0; }
@media (max-width: 860px) {
  .grille-2.egal { grid-template-columns: 1fr; }
  .client-tete .pousse { margin-left: 0; width: 100%; }
  .graphe { min-width: 640px; }
  .coupe { max-width: 200px; }
  .table-wrap.plat { margin: 8px -18px -18px; }
}


/* ---------- Sites, suivi, notes ---------- */
.barre-sites { margin: -10px 0 22px; overflow-x: auto; }
.barre-sites .periodes { flex-wrap: nowrap; }
.case { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0; font-size: 14.5px; cursor: pointer; }
.case input { margin-top: 4px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.notes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.note { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 6px 4px 10px; border-radius: 999px; background: var(--attente-doux); color: var(--ink); }
.note .ic { width: 14px; height: 14px; color: var(--attente); }
.note form { display: inline; margin: 0; }
.note-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; }
.note-x:hover { color: var(--danger); }
.ajout-note summary { cursor: pointer; font-size: 13.5px; color: var(--accent-texte); font-weight: 600; list-style: none; padding: 4px 0; }
.ajout-note summary::-webkit-details-marker { display: none; }
.ajout-note summary::before { content: "+ "; }
.form-ligne { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.form-ligne input { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line-fort); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
.form-ligne input[type=text], .form-ligne input:not([type]) { flex: 1; min-width: 180px; }
.g-note line { stroke: var(--attente); stroke-width: 1.2; stroke-dasharray: 3 3; }
.g-note circle { fill: var(--attente); }
.etoile { border: 0; background: none; cursor: pointer; color: var(--line-fort); padding: 4px; display: inline-grid; place-items: center; }
.etoile .ic { width: 18px; height: 18px; }
.etoile:hover { color: var(--attente); }
.etoile.suivie { color: var(--attente); cursor: default; }
.etoile.suivie .ic, .etoile:hover .ic { fill: currentColor; }
.liste.donnees .actions form { display: inline; }
.spark { width: 100px; height: 24px; display: block; }
.spark path { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.liste-sites { list-style: none; margin: 4px 0 0; padding: 0; }
.liste-sites li { padding: 12px 0; border-top: 1px solid var(--line); }
.liste-sites li:first-child { border-top: 0; }
.site-form { display: grid; grid-template-columns: 1fr; gap: 6px; }
.site-hote { font-size: 12.5px; color: var(--muted); word-break: break-all; }
.site-form input, .site-form select { font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line-fort); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); width: 100%; }
.site-actions { display: flex; gap: 8px; }
.site-masquer { margin: 4px 0 0; }
.site-masquer .btn-lien { padding: 0; font-size: 13px; color: var(--muted); }


/* ---------- Rapports personnalisés ---------- */
.rapport-barre { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.rapport-actions { display: flex; align-items: center; gap: 12px; }
.rapport-periode { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.mois-form { margin: 0; }
.mois-form select, .form-ligne select { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line-fort); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
.rapport-tete { margin: 6px 0 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.rapport-tete h2 { font-size: 22px; letter-spacing: -.02em; }
.rapport-tete h2 span { font-weight: 400; color: var(--muted); font-size: 16px; margin-left: 6px; letter-spacing: 0; }
.rapport-tete p { margin: 4px 0 0; }
.rapport-blocs > .panneau { margin-bottom: 22px; }
.rapport-blocs > .kpis { margin-bottom: 26px; }
.bloc h2 { margin-bottom: 12px; }
.bloc-legende { margin: 10px 0 0; }
.bloc-note { margin-top: 30px; }
.erreur-txt { color: var(--danger); }
.espace-haut-grand { margin-top: 36px; }
.groupe-blocs { border: 0; padding: 0; margin: 18px 0 0; }
.groupe-blocs legend { font-weight: 650; font-size: 14px; padding: 0; margin-bottom: 2px; }
.groupe-blocs .case { margin-top: 8px; }
.case.en-ligne { margin: 0; align-items: center; }
.case.en-ligne input { margin-top: 0; }

/* ---------- Alertes et performance ---------- */
.alertes-panneau { margin-bottom: 22px; border-color: color-mix(in srgb, var(--attente) 35%, var(--line)); }
.alertes-panneau h2 { display: flex; align-items: center; gap: 8px; }
.alertes-panneau h2 .ic { color: var(--attente); }
.alertes-panneau form { margin: 0; }
.alertes { list-style: none; margin: 0; padding: 0; }
.alertes li { padding: 10px 0 10px 14px; border-top: 1px solid var(--line); font-size: 14px; position: relative; }
.alertes li:first-child { border-top: 0; }
.alertes li::before { content: ""; position: absolute; left: 0; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--attente); }
.alertes li.alerte-panne::before { background: var(--danger); }
.alertes li.alerte-retabli::before { background: var(--accent); }
.alertes li a { color: var(--ink); text-decoration: none; }
.alertes small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.perf-grille { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 10px; }
.perf-case { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; border-left: 1px solid var(--line); align-items: flex-start; }
.perf-case:first-child { border-left: 0; }
.score { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; font-weight: 700; border: 4px solid; }
.score.bon { color: var(--accent-texte); border-color: var(--accent); background: var(--accent-doux); }
.score.moyen { color: var(--attente); border-color: var(--attente); background: var(--attente-doux); }
.score.faible { color: var(--danger); border-color: var(--danger); background: var(--danger-doux); }
.score.vide { color: var(--muted); border-color: var(--line); }
.txt-mauvais { color: var(--danger); }
.mesures { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 24px; margin: 18px 0 0; }
.mesures dt { font-size: 12.5px; color: var(--muted); }
.mesures dd { margin: 2px 0 0; font-weight: 650; font-size: 16px; }
@media (max-width: 860px) {
  .perf-grille { grid-template-columns: 1fr 1fr; }
  .perf-case:nth-child(3) { border-left: 0; }
  .perf-case:nth-child(n+3) { border-top: 1px solid var(--line); }
  .rapport-actions { width: 100%; justify-content: space-between; }
}


/* ---------- WordPress ---------- */
.wp-boutons { margin-top: 18px; }
.wp-progression { margin: 12px 0 0; padding: 10px 14px; border-radius: 8px; background: var(--info-doux); color: var(--info); font-size: 14px; font-weight: 600; }
.wp-liste { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.wp-liste summary { cursor: pointer; font-weight: 650; font-size: 15px; padding: 4px 0; }
.wp-liste[open] summary { margin-bottom: 10px; }
.table-wrap.plat-simple { border-radius: 8px; }
.btn-petit { padding: 6px 11px; font-size: 13px; }
.kpi-petit { font-size: 22px !important; }
.bloc-small { display: block; font-size: 12.5px; font-weight: 400; }
.wp-noyau { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wp-noyau form, .wp-trad, .wp-config form { margin: 0; }
.wp-trad { margin-top: 12px; display: flex; align-items: center; gap: 8px; }
.wp-config .boutons { margin-top: 12px; gap: 18px; }
tr.maj-ok td { background: var(--accent-doux); }
tr.maj-erreur td { background: var(--danger-doux); }
.maj-message { margin-top: 6px; font-size: 13px; color: var(--danger); white-space: normal; font-weight: 500; }


/* ---------- Assistance ---------- */
.etat.info { background: var(--info-doux); color: var(--info); }
.pastille-nb { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
tr.non-lu strong { font-weight: 750; }
tr.non-lu .init { background: var(--accent); color: #fff; }
.deux-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; align-items: end; }
.deux-champs .case { margin-bottom: 12px; }
.ticket-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.ticket-tete h2 { font-size: 22px; letter-spacing: -.02em; }
.ticket-tete p { margin: 4px 0 0; }
.fil { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.msg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 20px; }
.msg-admin { border-left: 4px solid var(--accent); }
.msg-interne { background: var(--attente-doux); border-style: dashed; }
.msg-tete { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.msg-tete small { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.msg-corps { margin-top: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.pj { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pj-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; color: var(--ink); background: var(--surface-2); max-width: 280px; font-size: 13.5px; }
.pj-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-item small { display: block; color: var(--muted); font-size: 12px; }
.pj-image { flex-direction: column; align-items: stretch; padding: 6px; }
.pj-image img { width: 240px; max-width: 100%; height: 150px; object-fit: cover; border-radius: 6px; display: block; }
.champ input[type=file] { padding: 8px; font-size: 14px; }

/* ---------- Aide ---------- */
.aide-hero { background: var(--side); border-radius: var(--r); padding: 32px 36px; color: #fff; margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.aide-hero img { width: 180px; height: auto; display: block; }
.aide-hero h2 { font-size: 26px; letter-spacing: -.02em; margin: 14px 0 6px; }
.aide-hero p { margin: 0; color: var(--side-ink); max-width: 56ch; }
.aide-sommaire { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.aide-sommaire a { padding: 7px 13px; border: 1px solid var(--line-fort); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 14px; background: var(--surface); }
.aide-sommaire a:hover { border-color: var(--accent); color: var(--accent-texte); }
.aide-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 26px 28px; margin-bottom: 22px; scroll-margin-top: 90px; }
.aide-section h2 { font-size: 20px; letter-spacing: -.015em; display: flex; align-items: center; gap: 10px; }
.aide-section h2 .ic { color: var(--accent-texte); width: 22px; height: 22px; }
.aide-section h3 { font-size: 15.5px; margin: 20px 0 6px; }
.aide-section p, .aide-section li { line-height: 1.65; max-width: 75ch; }
.aide-section figure { margin: 18px 0; }
.aide-section figure img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; display: block; }
.aide-section figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.definitions { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 14px 0; }
.definitions div { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--surface-2); }
.definitions dt { font-weight: 700; }
.definitions dd { margin: 4px 0 0; font-size: 14px; color: var(--muted); line-height: 1.55; }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq details:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; font-weight: 650; }
.faq details p { margin: 8px 0 0; color: var(--muted); }
@media (max-width: 860px) {
  .deux-champs { grid-template-columns: 1fr; }
  .aide-hero { padding: 24px; }
  .aide-section { padding: 20px; }
}

/* ---------- Documents ---------- */
.interrupteur { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; padding: 4px 0; font: inherit; color: var(--muted); }
.interrupteur span { width: 40px; height: 22px; border-radius: 11px; background: var(--line-fort); position: relative; transition: background .15s; flex: none; }
.interrupteur span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.interrupteur.on span { background: var(--accent); }
.interrupteur.on span::after { left: 21px; }
.interrupteur em { font-style: normal; font-size: 13px; font-weight: 600; }
.interrupteur.on em { color: var(--accent-texte); }
@media (prefers-reduced-motion: reduce) { .interrupteur span, .interrupteur span::after { transition: none; } }

/* ---------- Pages légales ---------- */
.page-doc { background: var(--bg); }
.doc-tete {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 16px 32px; background: var(--side);
}
.doc-tete img { display: block; width: 150px; height: auto; }
.doc-tete nav { display: flex; gap: 20px; flex-wrap: wrap; }
.doc-tete nav a { color: var(--side-ink); text-decoration: none; font-size: 14px; }
.doc-tete nav a:hover { color: #fff; }
.doc {
  max-width: 760px; margin: 40px auto; padding: 40px 48px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
.doc h1 { font-size: 30px; letter-spacing: -.02em; }
.doc-date { color: var(--muted); font-size: 14px; margin: 6px 0 28px; }
.doc h2 { font-size: 18px; margin: 32px 0 8px; }
.doc p, .doc li { line-height: 1.65; max-width: 68ch; }
.doc ul { padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc .important { background: var(--attente-doux); border-left: 3px solid var(--attente); padding: 14px 18px; border-radius: 0 8px 8px 0; font-weight: 500; }
.doc-pied { text-align: center; color: var(--muted); font-size: 13px; padding: 0 0 40px; }
.login-liens { margin-top: 28px; font-size: 13px; display: flex; gap: 16px; }
.login-liens a { color: var(--muted); }
@media (max-width: 700px) {
  .doc-tete { padding: 14px 18px; }
  .doc { margin: 0; border-radius: 0; border-left: 0; border-right: 0; padding: 28px 20px; }
  .doc h1 { font-size: 24px; }
}
