/* ECURELAY — relais de fichiers de cartographie moteur */

@import url("https://fonts.googleapis.com/css2?family=Saira+Condensed:ital,wght@0,600;0,700;1,700&family=Barlow:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600;700&display=swap");

:root {
  --bg: #0b0b0c;
  --panel: #161617;
  --panel-raised: #1d1d1f;
  --line: #2a2a2c;
  --line-soft: #202022;
  --ink: #f2f0ec;
  --ink-soft: #93939a;
  --ink-dim: #5c5c63;
  --red-1: #ff3b2f;
  --red-2: #a3160f;
  --red-dim: #5c1512;
  --ok: #3ea877;
  --ok-bg: #10261c;
  --warn: #d69a3d;
  --warn-bg: #2a2210;
  --alert: #ff5a4d;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, Menlo, monospace;
  --sans: "Barlow", "Segoe UI", -apple-system, sans-serif;
  --disp: "Saira Condensed", var(--sans);
  --radius: 3px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}

a { color: inherit; }
h1, h2, h3 { font-family: var(--disp); font-weight: 700; letter-spacing: 0.01em; margin: 0 0 .5em; }
h1 { font-size: 2.6rem; font-style: italic; line-height: 1; letter-spacing: -.01em; }
/* Titres de section : étiquettes discrètes, comme sur la planche « Ligne rouge » */
h2 {
  font-family: var(--sans); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .18em;
  color: var(--ink-soft); border-bottom: 1px solid var(--line); padding-bottom: .7rem; margin-bottom: 1.1rem;
}
.muted { color: var(--ink-soft); }
.small { font-size: .82rem; }

/* --- Mot-symbole : ECU plein en degrade, RELAY en contour --- */
.wordmark {
  font-family: var(--disp); font-style: italic; font-weight: 700;
  letter-spacing: -.01em; text-decoration: none; display: inline-flex; line-height: 1;
}
.wordmark .a {
  background: linear-gradient(180deg, var(--red-1), var(--red-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wordmark .b {
  color: transparent; -webkit-text-stroke: 1px var(--red-2);
}

/* --- Bandeau --- */
.top {
  display: flex; align-items: center; gap: 1.5rem;
  padding: .8rem 1.5rem;
  background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.top .brand.wordmark { font-size: 1.3rem; }
.top nav { display: flex; gap: 1.2rem; flex: 1; }
.top nav a { text-decoration: none; color: var(--ink-soft); font-size: .9rem; display: inline-flex; align-items: center; gap: .35rem; }
.top nav a:hover { color: var(--ink); }
.navdot { width: 7px; height: 7px; border-radius: 50%; background: var(--red-1); box-shadow: 0 0 0 2px rgba(255,59,47,.2); }
.who { display: flex; align-items: center; gap: 1rem; font-size: .86rem; }
.who a { text-decoration: none; color: var(--ink); }
.link { background: none; border: 0; color: var(--ink-soft); cursor: pointer; font: inherit; padding: 0; }
.link:hover { color: var(--ink); }

main { max-width: 1080px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

/* --- Flash --- */
.flash { padding: .7rem 1rem; border-radius: var(--radius); margin-bottom: 1.2rem; font-size: .9rem; border: 1px solid; }
.flash.ok { background: var(--ok-bg); border-color: #1f4a35; color: #7fd6ac; }
.flash.error { background: #2a1512; border-color: #5c211c; color: #ff9086; }

.hint { margin-top: 1.5rem; font-size: .85rem; color: var(--ink-soft); }
.hint code { display: inline-block; margin-top: .3rem; background: var(--bg); border: 1px solid var(--line); color: #d7cfc0; padding: .4rem .6rem; border-radius: var(--radius); font-family: var(--mono); font-size: .8rem; }

/* --- Formulaires --- */
label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 1rem; }
.stack.narrow { max-width: 520px; }
input, select, textarea, button { font: inherit; }
input[type=text], input[type=search], input[type=password], input:not([type]), select, textarea {
  display: block; width: 100%; margin-top: .4rem;
  padding: .6rem .7rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel-raised); color: var(--ink); font-size: .95rem;
}
input::placeholder, textarea::placeholder { color: var(--ink-dim); }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--red-1); outline-offset: 1px; border-color: var(--red-1);
}
textarea { resize: vertical; font-family: var(--sans); }
input[type=file] { margin-top: .4rem; font-size: .85rem; color: var(--ink-soft); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
.inline { display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; }
.inline select { display: inline-block; width: auto; margin: 0; }
.inline-form { display: flex; gap: .4rem; align-items: center; }
.inline-form input { margin: 0; width: 190px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .6rem 1.1rem; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--panel-raised); color: var(--ink); text-decoration: none; cursor: pointer;
  font-weight: 600; font-size: .87rem; line-height: 1.2;
}
.btn:hover { border-color: var(--ink-dim); }
.btn.primary {
  background: linear-gradient(180deg, var(--red-1), var(--red-2));
  border-color: var(--red-2); color: #fff;
}
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { background: var(--panel-raised); border-color: #5c211c; color: #ff9086; }
.btn.danger:hover { background: #2a1512; }
.btn.small { padding: .4rem .75rem; font-size: .8rem; }
.actions { display: flex; gap: .7rem; margin-top: .5rem; }

/* --- Panels / mise en page --- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; margin-bottom: 1.4rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.4rem; }
.job-head .crumb { margin: 0 0 .3rem; font-size: .82rem; }
.job-head h1 { margin: 0; display: flex; align-items: center; gap: .6rem; }
.cols { display: grid; grid-template-columns: 1fr 340px; gap: 1.4rem; align-items: start; }

/* --- Listes de dossiers --- */
.filters { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; }
.tabs a { text-decoration: none; padding: .4rem .75rem; border-radius: var(--radius); font-size: .84rem; color: var(--ink-soft); border: 1px solid transparent; }
.tabs a b { font-weight: 700; margin-left: .3rem; }
.tabs a.on { background: var(--panel-raised); color: var(--ink); border-color: var(--line); }
.tabs a:not(.on):hover { border-color: var(--line); }
.search input { width: 240px; margin: 0; }

.board { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.board li + li .row { border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 90px 1fr auto auto 110px; align-items: center; gap: 1rem;
  padding: .85rem 1.2rem; text-decoration: none; color: var(--ink);
}
.row:hover { background: var(--panel-raised); }
.row .ref { font-family: var(--mono); font-size: .78rem; color: var(--ink-dim); }
.row .veh { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.row .veh-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.row .when, .row .nfiles { font-size: .8rem; text-align: right; white-space: nowrap; color: var(--ink-soft); }
.row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red-1); flex: none; box-shadow: 0 0 0 3px rgba(255,59,47,.18); }
.row.unread .veh-name { color: var(--ink); font-weight: 700; }


.plate {
  font-family: var(--mono); font-weight: 700; font-size: .82rem; letter-spacing: .03em;
  background: #f0d43a; color: #1c1c1c; padding: .15rem .45rem; border-radius: 2px; border: 1px solid #cdb62f;
}
.plate.big { font-size: 1rem; padding: .25rem .55rem; }

.pill { display: inline-block; padding: .2rem .6rem; border-radius: 20px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.pill.st-a_traiter { background: #3a1310; color: #ff9086; }
.pill.st-en_cours { background: var(--warn-bg); color: var(--warn); }
.pill.st-livre { background: var(--ok-bg); color: var(--ok); }
.pill.st-clos { background: var(--panel-raised); color: var(--ink-soft); }
.pill.role-admin { background: linear-gradient(180deg, var(--red-1), var(--red-2)); color: #fff; }
.pill.role-garage { background: var(--panel-raised); color: var(--ink-soft); }

.empty { text-align: center; padding: 3.5rem 1rem; color: var(--ink-soft); }
.empty .btn { margin-top: 1rem; }

/* --- Messagerie (liste des garages) --- */
.row.msgrow { grid-template-columns: 1fr 2fr auto; }
.row.msgrow.off { opacity: .55; }
.row.msgrow .preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.msgrow .veh-name { white-space: nowrap; }
.thread-panel { max-width: 640px; }
.thread-msgs { max-height: 55vh; }

/* --- Vehicules supportes --- */
.cols-single { display: block; max-width: 900px; }
.standalone-search { margin-bottom: 1.2rem; }
.standalone-search input { width: 320px; }
table.vehicles { width: 100%; border-collapse: collapse; font-size: .87rem; }
table.vehicles th { text-align: left; padding: .6rem .8rem; background: var(--panel-raised); border-bottom: 1px solid var(--line); font-family: var(--disp); font-style: italic; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; font-size: .76rem; }
table.vehicles td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.vehicles tr:last-child td { border-bottom: 0; }
table.vehicles .notes-cell { color: var(--ink-soft); font-size: .85rem; max-width: 280px; }
.doc-sub { margin: -.4rem 0 1rem; }

/* --- Detail dossier --- */
.facts { margin: 0; }
.facts dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-dim); margin-top: .7rem; }
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 0; font-size: .93rem; }
.facts dd.vin { font-family: var(--mono); font-size: .8rem; letter-spacing: .02em; }
.notes { white-space: pre-wrap; font-size: .9rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }

.files { list-style: none; margin: 0 0 1.4rem; padding: 0; }
.file { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.file-top { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.file .kind { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; padding: .15rem .45rem; border-radius: 2px; background: var(--panel-raised); color: var(--ink-soft); border: 1px solid var(--line); }
.file.k-modifie .kind { background: var(--ok-bg); color: var(--ok); border-color: #1f4a35; }
.file-top form { margin-left: auto; }
.fname { font-weight: 600; flex: 1; min-width: 140px; overflow-wrap: anywhere; }
.hash { font-family: var(--mono); }
.file-comment { margin: .3rem 0 0; font-size: .87rem; color: var(--ink-soft); }

.upload { border-top: 1px dashed var(--line); padding-top: 1.2rem; }
.upload h3 { font-family: var(--disp); font-style: italic; font-size: 1.05rem; margin: 0 0 .8rem; color: var(--ink); text-transform: none; letter-spacing: 0; border: 0; padding: 0; }
.drop { display: block; border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 1.4rem; text-align: center; cursor: pointer; margin-bottom: 1rem; background: var(--panel-raised); }
.drop:hover, .drop.over { border-color: var(--red-1); background: #1d1412; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-text { font-size: .9rem; color: var(--ink-soft); }
progress { width: 100%; margin: .5rem 0; accent-color: var(--red-1); }
.upload-msg { color: var(--ink-soft); }

.activity { list-style: none; margin: 0; padding: 0; font-size: .85rem; }
.activity li { padding: .4rem 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.activity li b { color: var(--ink); }
.activity li:last-child { border-bottom: 0; }

.msgs { list-style: none; margin: 0 0 1rem; padding: .2rem .2rem 0; max-height: 380px; overflow-y: auto; display: flex; flex-direction: column; gap: .55rem; }
.msgs .bubble {
  max-width: 86%; padding: .55rem .75rem; border-radius: 10px; font-size: .88rem;
  background: var(--panel-raised); border: 1px solid var(--line); align-self: flex-start;
  border-bottom-left-radius: 3px;
}
.msgs .bubble.me {
  align-self: flex-end; background: linear-gradient(165deg, #3a0f0c, #2a0c0a);
  border-color: var(--red-dim); border-bottom-left-radius: 10px; border-bottom-right-radius: 3px;
}
.msg-meta { margin: 0 0 .2rem; font-size: .74rem; display: flex; gap: .5rem; }
.msg-meta b { font-size: .78rem; color: var(--ink); }
.msgs .bubble.me .msg-meta b { color: #ff9086; }
.msgs p:last-child { margin: 0; white-space: pre-wrap; word-break: break-word; }
.new-divider { display: flex; align-items: center; gap: .6rem; margin: .3rem 0; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .06em; color: var(--red-1); align-self: stretch; }
.new-divider::before, .new-divider::after { content: ""; flex: 1; height: 1px; background: var(--red-dim); }

/* --- Comptes / journal --- */
.users { list-style: none; margin: 0; padding: 0; }
.users li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.users li.off { opacity: .5; }
.user-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table.audit { width: 100%; border-collapse: collapse; font-size: .84rem; }
table.audit th { text-align: left; padding: .6rem .8rem; background: var(--panel-raised); border-bottom: 1px solid var(--line); font-family: var(--disp); font-style: italic; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; font-size: .78rem; }
table.audit td { padding: .55rem .8rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.audit td:nth-child(5) { white-space: normal; }

/* --- Responsive --- */
@media (max-width: 800px) {
  .cols { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr auto; row-gap: .3rem; }
  .row .ref, .row .when { display: none; }
  main { padding: 1.3rem 1rem 3rem; }
  .top { padding: .75rem 1rem; gap: 1rem; flex-wrap: wrap; }
  .search input { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* --- Mots de passe : Afficher / Masquer --- */
.pw-toggle {
  display: inline-block; margin-top: .35rem; padding: 0; background: none; border: 0;
  color: var(--ink-soft); font-size: .78rem; font-weight: 600; cursor: pointer;
}
.pw-toggle:hover { color: var(--ink); }
.pw-toggle:focus-visible { outline: 2px solid var(--red-1); outline-offset: 2px; }
label .pw-toggle + .small { display: block; }

/* --- Premier lancement --- */
.setup .setup-lead { color: var(--ink-soft); font-size: .92rem; margin: 0 0 1.6rem; text-align: left; }
.setup .setup-lead code { font-family: var(--mono); font-size: .84rem; color: var(--ink); }

/* --- Connexion / inscription --- */
.auth-switch { margin-top: 1.4rem; font-size: .88rem; color: var(--ink-soft); }
.auth-switch a { color: var(--red-1); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* --- Case a cocher administrateur --- */
.check-row { display: flex; align-items: flex-start; gap: .6rem; padding: .75rem .85rem;
  border: 1px solid var(--red-dim); border-radius: var(--radius); background: #1d1412; color: var(--ink); }
.check-row input { margin: .15rem 0 0; accent-color: var(--red-1); width: 16px; height: 16px; flex: none; }

/* --- Boite de dialogue --- */
dialog.modal {
  max-width: 440px; width: calc(100% - 2rem); padding: 1.6rem 1.6rem 1.4rem;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  border-top: 3px solid var(--red-1); border-radius: var(--radius); text-align: left;
}
dialog.modal::backdrop { background: rgba(0, 0, 0, .72); }
dialog.modal h2 { font-size: 1.35rem; text-transform: none; letter-spacing: 0; color: var(--ink);
  border: 0; padding: 0; margin: 0 0 .8rem; font-style: italic; }
dialog.modal p, dialog.modal li { font-size: .9rem; color: var(--ink-soft); }
dialog.modal ul { margin: .4rem 0 1.4rem; padding-left: 1.1rem; }
dialog.modal li { margin-bottom: .25rem; }
.modal-kicker { font-size: .72rem !important; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--red-1) !important; margin: 0 0 .5rem; }
.modal-actions { display: flex; justify-content: flex-end; }

/* --- Demandes d'acces --- */
.requests { border-color: var(--red-dim); }
.requests h2 { display: flex; align-items: center; gap: .5rem; }
.requests .count { background: var(--red-1); color: #fff; border-radius: 20px; font-size: .72rem;
  padding: .05rem .5rem; letter-spacing: 0; }
.req-date { margin: .15rem 0 0; }

/* --- Code de premier lancement --- */
.code-input { font-family: var(--mono) !important; letter-spacing: .18em; text-transform: uppercase; font-size: 1.05rem !important; }

/* --- Cloisonnement par garage --- */
.garage-filter { display: inline-block; width: auto; margin: 0 .5rem 0 0; }
.search { display: flex; align-items: center; }
.garage-tag { font-size: .74rem; color: var(--ink-soft); border: 1px solid var(--line);
  border-radius: 20px; padding: .1rem .55rem; white-space: nowrap; }
.garage-tag.none { color: var(--warn); border-color: #4a3a17; }
.job-controls { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }

/* --- Parametres --- */
.subhead { font-family: var(--disp); font-style: italic; font-size: 1.05rem; margin: 1.2rem 0 .7rem; color: var(--ink); }
.subhead .small { font-style: normal; font-family: var(--sans); font-weight: 400; }
.check-inline { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.check-inline input { accent-color: var(--red-1); }
.test-form { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin: -.4rem 0 1.4rem; }
.backup-help { margin-top: 1rem; }
.panel code { font-family: var(--mono); font-size: .82rem; color: var(--ink); }

/* =====================================================================
   Connexion, demande d'accès, premier lancement : planche « Ligne rouge »
   ===================================================================== */
main.auth-main { max-width: none; padding: 0; }
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(380px, 1fr); }

.auth-hero {
  padding: 56px 64px 0; display: flex; flex-direction: column; gap: 48px;
  background: var(--bg); border-right: 1px solid var(--line); overflow: hidden;
}
/* Le logo occupe l'espace libre et s'y centre verticalement ; l'aperçu reste en bas */
.auth-brand { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.auth-mark { font-size: clamp(4.2rem, 9vw, 7.25rem); line-height: .88; margin: 0; }
.auth-mark .a { padding-right: .06em; }
.auth-mark .b { -webkit-text-stroke: 2px var(--red-2); }
.auth-hero .tagline {
  margin: .9rem 0 0; font-size: .875rem; font-weight: 700; letter-spacing: .34em;
  text-transform: uppercase; color: var(--ink-soft);
}

/* Aperçu décoratif de l'écran Dossiers, fondu vers le bas */
.auth-preview {
  margin-top: auto; border: 1px solid var(--line); border-bottom: 0; border-radius: 4px 4px 0 0;
  background: var(--panel); overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 45%, transparent 100%);
}
.pv-nav { display: flex; align-items: center; gap: 24px; padding: 14px 22px; background: #121213; border-bottom: 1px solid var(--line); }
.pv-mark { font-size: 1.35rem; }
.pv-link { font-size: .9rem; color: var(--ink-soft); }
.pv-link.on { color: var(--ink); }
.pv-row {
  display: grid; grid-template-columns: 110px 112px minmax(0, 1fr) 120px 86px; align-items: center; gap: 14px;
  padding: 15px 22px; border-top: 1px solid var(--line-soft); font-size: .92rem;
}
.pv-row:first-of-type { border-top: 0; }
.pv-ref { font-family: var(--mono); font-size: .78rem; color: var(--ink-dim); }
.pv-veh { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-veh .muted { font-weight: 400; }
.pv-garage { font-size: .82rem; white-space: nowrap; }

.auth-panel { display: flex; padding: 56px clamp(24px, 5vw, 72px); background: var(--panel); }
.auth-inner { width: 100%; max-width: 400px; margin: auto; }
.auth-panel h1 { font-size: 2.8rem; margin: 0 0 .5rem; }
.auth-lead { color: var(--ink-soft); font-size: 1rem; line-height: 1.5; margin: 0 0 2rem; }
.auth-lead code { font-family: var(--mono); font-size: .86rem; color: var(--ink); }
.auth-panel .btn.primary { width: 100%; min-height: 48px; font-size: 1rem; margin-top: .4rem; }
.auth-panel input:not([type=checkbox]) { background: var(--bg); }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-hero { padding: 36px 24px 30px; gap: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-mark { font-size: 3.6rem; }
  .auth-preview { display: none; }
  .auth-panel { padding: 36px 24px 56px; }
}

/* --- Ajustements « Ligne rouge » sur le reste du site --- */
.top .brand.wordmark { font-size: 1.55rem; }
.plate { font-style: normal; }
.page-head h1 .muted { font-style: normal; font-family: var(--sans); }
.btn { font-family: var(--sans); font-weight: 700; }
.row .veh-name .muted { font-weight: 400; }

/* =====================================================================
   Tarifs et statistiques
   ===================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tarif-tabs, .stats-periods { margin-bottom: 1.4rem; }
.mode-choice { border: 0; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: .6rem; }
.radio-row { display: flex; gap: .75rem; align-items: flex-start; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-raised); margin: 0; cursor: pointer; color: var(--ink); }
.radio-row:has(input:checked) { border-color: var(--red-2); background: #1d1412; }
.radio-row input { accent-color: var(--red-1); margin-top: .2rem; }
.radio-row > span { display: flex; flex-direction: column; gap: .15rem; font-weight: 400; }
.input-money { font-family: var(--mono) !important; }
.grid-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.grid-table th { text-align: left; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); padding: .55rem .7rem; border-bottom: 1px solid var(--line); }
.grid-table td { padding: .65rem .7rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.grid-table tr:last-child td { border-bottom: 0; }
.grid-table .num { text-align: right; font-family: var(--mono); font-size: .86rem; white-space: nowrap; }
.grid-table th.num { font-family: var(--sans); font-size: .72rem; }
.big-figure { font-family: var(--disp); font-style: italic; font-weight: 700; font-size: 3.4rem; line-height: 1; margin: .4rem 0; color: var(--red-1); }
.narrow-panel { max-width: 760px; }
/* Tarification sur la fiche dossier */
.money { margin: 0 0 1rem; }
.money dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-dim); margin-top: .7rem; }
.money dt:first-child { margin-top: 0; }
.money dd { margin: 0; }
.money .amount { font-family: var(--mono); font-size: 1.15rem; font-weight: 600; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.money .amount.fs { color: var(--red-1); }
.money .rule { margin-top: .15rem; }
.money-form { display: flex; gap: .5rem; align-items: center; margin-top: .6rem; }
.money-form input { margin: 0; }
.link-btn { background: none; border: 0; padding: 0; margin-top: .7rem; color: var(--ink-soft); font: inherit; font-size: .82rem; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--ink); }
/* Indicateurs */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 1.4rem; }
.kpi { background: var(--panel); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.kpi-label { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.kpi-value { font-family: var(--disp); font-style: italic; font-weight: 700; font-size: 2.1rem; line-height: 1.05; }
.kpi.accent .kpi-value { color: var(--red-1); }
.kpi-sub { font-size: .8rem; color: var(--ink-dim); }
/* Barres mensuelles */
.bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .6rem; align-items: end; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: .35rem; min-width: 0; }
.bar-count { font-family: var(--mono); font-size: .78rem; color: var(--ink); min-height: 1em; }
.bar-track { width: 100%; height: 150px; display: flex; align-items: flex-end; background: var(--panel-raised); border-radius: 2px; }
.bar { width: 100%; background: linear-gradient(180deg, var(--red-1), var(--red-2)); border-radius: 2px 2px 0 0; }
.bar-label { font-size: .74rem; color: var(--ink-soft); white-space: nowrap; }
.bar-fs { font-family: var(--mono); font-size: .68rem; color: var(--ink-dim); white-space: nowrap; min-height: 1em; }
/* Barres horizontales */
.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.hbars li { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) 2.5rem; gap: .8rem; align-items: center; font-size: .9rem; }
.hb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { height: 10px; background: var(--panel-raised); border-radius: 2px; overflow: hidden; }
.hb { display: block; height: 100%; background: var(--red-1); }
.hb-n { text-align: right; font-family: var(--mono); font-size: .82rem; color: var(--ink-soft); }
.stats-cols { margin-bottom: 0; }
.stats-note { margin-top: .4rem; }
@media (max-width: 800px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bars { gap: .25rem; } .bar-label, .bar-fs { font-size: .6rem; } .bar-fs { display: none; } }
/* Hauteurs et largeurs par paliers de 5 % (pas de style en ligne : politique de sécurité) */
.bar.p0 { height: 0%; } .hb.p0 { width: 0%; }
.bar.p5 { height: 5%; } .hb.p5 { width: 5%; }
.bar.p10 { height: 10%; } .hb.p10 { width: 10%; }
.bar.p15 { height: 15%; } .hb.p15 { width: 15%; }
.bar.p20 { height: 20%; } .hb.p20 { width: 20%; }
.bar.p25 { height: 25%; } .hb.p25 { width: 25%; }
.bar.p30 { height: 30%; } .hb.p30 { width: 30%; }
.bar.p35 { height: 35%; } .hb.p35 { width: 35%; }
.bar.p40 { height: 40%; } .hb.p40 { width: 40%; }
.bar.p45 { height: 45%; } .hb.p45 { width: 45%; }
.bar.p50 { height: 50%; } .hb.p50 { width: 50%; }
.bar.p55 { height: 55%; } .hb.p55 { width: 55%; }
.bar.p60 { height: 60%; } .hb.p60 { width: 60%; }
.bar.p65 { height: 65%; } .hb.p65 { width: 65%; }
.bar.p70 { height: 70%; } .hb.p70 { width: 70%; }
.bar.p75 { height: 75%; } .hb.p75 { width: 75%; }
.bar.p80 { height: 80%; } .hb.p80 { width: 80%; }
.bar.p85 { height: 85%; } .hb.p85 { width: 85%; }
.bar.p90 { height: 90%; } .hb.p90 { width: 90%; }
.bar.p95 { height: 95%; } .hb.p95 { width: 95%; }
.bar.p100 { height: 100%; } .hb.p100 { width: 100%; }
.money .amount .pill { font-family: var(--sans); font-size: .72rem; font-weight: 700; }
