/* ANC rentcars — direction A, « Comptoir ».
   Les valeurs viennent de la charte et ne se choisissent pas au cas par cas :
   si une couleur manque ici, c'est qu'il faut l'ajouter ici, pas dans un gabarit. */

:root {
  --fond: #F7F5F2;
  --surface: #FFFFFF;
  --filet: #E4DFD8;
  --filet-clair: #F2EFEA;
  --encre: #1C1A18;
  --second: #6E6862;
  --tertiaire: #8A837B;
  --estompe: #A39B92;
  --charbon: #211E1B;
  --or: #A06A1F;
  --or-clair: #C88A3C;
  --bleu: #1E6A9B;
  --vert: #2E7D4F;
  --rouge: #B3402F;
  --violet: #6E5A8E;
  --rayon: 10px;
  --rayon-petit: 7px;
  --barre: 232px;
}

* { box-sizing: border-box; }

/* L'attribut `hidden` ne pose qu'un `display: none` de feuille navigateur : la
   moindre règle d'auteur qui donne un `display` à l'élément le rend à nouveau
   visible. Sans cette ligne, un panneau marqué caché reste à l'écran. */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: Archivo, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--or); text-decoration: none; }
a:hover { color: #7C5116; text-decoration: underline; }

.num {
  font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.app { display: flex; min-height: 100%; }

/* ---------------------------------------------------------------- barre latérale */

.side {
  width: var(--barre);
  flex: none;
  background: var(--charbon);
  color: #EDE9E3;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { padding: 26px 22px 22px; border-bottom: 1px solid #332E29; }
.brand-mark { font-size: 30px; font-weight: 700; letter-spacing: .04em; color: var(--or-clair); line-height: 1; }
.brand-sub { margin-top: 7px; font-size: 9px; font-style: italic; font-weight: 600; letter-spacing: .2em; color: #A49C92; }
.nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 6px;
  font-size: 13.5px; font-weight: 500; color: #B6AEA4; text-decoration: none;
}
.nav a svg { flex: none; }
.nav a:hover { background: #2B2723; color: #EDE9E3; text-decoration: none; }
.nav a.on { background: #2E2924; color: #FFF; box-shadow: inset 2px 0 0 var(--or-clair); }
.nav-sep { margin: 12px 12px 6px; font-size: 9.5px; font-weight: 600; letter-spacing: .16em; color: #6E665D; }
.side-foot { margin-top: auto; padding: 16px; border-top: 1px solid #332E29; font-size: 11px; color: #8A837B; line-height: 1.6; }

/* ------------------------------------------------------------------------ entête */

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top {
  height: 68px; flex: none; background: var(--surface);
  border-bottom: 1px solid var(--filet);
  display: flex; align-items: center; gap: 16px; padding: 0 32px;
  position: sticky; top: 0; z-index: 10;
}
.top h1 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.top .date { font-size: 12.5px; color: var(--tertiaire); }
.pousse { margin-left: auto; }

.seg { display: flex; background: var(--filet-clair); border: 1px solid var(--filet); border-radius: var(--rayon-petit); padding: 2px; gap: 2px; }
.seg a {
  font-size: 12.5px; font-weight: 500; padding: 6px 15px;
  border-radius: 5px; color: var(--second); text-decoration: none;
}
.seg a:hover { color: var(--encre); text-decoration: none; }
.seg a.on { background: var(--surface); color: var(--encre); font-weight: 600; box-shadow: 0 1px 2px rgba(28,26,24,.10); }

.champ-recherche {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  border: 1px solid var(--filet); border-radius: var(--rayon-petit);
  background: var(--surface); width: 240px;
}
.champ-recherche input { border: 0; outline: 0; font: inherit; font-size: 12.5px; width: 100%; background: none; color: var(--encre); }
.champ-recherche svg { color: var(--estompe); flex: none; }

.btn, .btn-sombre, .btn-fant, .btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 16px; border: 0; border-radius: var(--rayon-petit);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn { background: var(--or); color: #FFF; }
.btn:hover { filter: brightness(.92); color: #FFF; text-decoration: none; }
.btn-sombre { background: var(--charbon); color: #FFF; }
.btn-sombre:hover { background: #3A342E; color: #FFF; text-decoration: none; }
.btn-fant { background: var(--surface); color: #4A443E; border: 1px solid var(--filet); font-weight: 500; }
.btn-fant:hover { border-color: #CFC7BC; color: var(--encre); text-decoration: none; }
.btn-danger { background: var(--surface); color: var(--rouge); border: 1px solid var(--filet); font-weight: 500; }
.btn-danger:hover { border-color: var(--rouge); text-decoration: none; }

/* ------------------------------------------------------------------------- corps */

.corps { padding: 24px 32px 40px; display: flex; flex-direction: column; gap: 20px; }
.carte { background: var(--surface); border: 1px solid var(--filet); border-radius: var(--rayon); }
.carte-h { display: flex; align-items: center; gap: 12px; padding: 17px 22px 14px; flex-wrap: wrap; }
.carte-h h2 { margin: 0; font-size: 14.5px; font-weight: 600; }
.carte-h .sub { font-size: 12px; color: var(--tertiaire); }
.grille3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.grille4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.grille2 { display: grid; grid-template-columns: minmax(0, 2.42fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.pile { display: flex; flex-direction: column; gap: 20px; }
.large2 { grid-column: span 2; }

.alerte {
  padding: 13px 18px; border-radius: var(--rayon-petit);
  background: rgba(179,64,47,.08); color: var(--rouge);
  font-size: 13px; font-weight: 500; border: 1px solid rgba(179,64,47,.22);
}
.vide { padding: 34px 22px; text-align: center; color: var(--estompe); font-size: 13px; }

/* ------------------------------------------------------------------------ tuiles */

.tuile { padding: 17px 20px 18px; display: flex; flex-direction: column; gap: 9px; }
.tuile-l { font-size: 11px; font-weight: 600; letter-spacing: .09em; color: var(--tertiaire); text-transform: uppercase; }
/* Les grands nombres restent en Archivo. La chasse fixe sert à ALIGNER des
   colonnes ; sur un chiffre isolé de 27 px elle ne fait qu'ouvrir un trou béant
   à la place du séparateur de milliers. `tabular-nums` suffit ici. */
.tuile-v, .resume .v {
  font-family: Archivo, "Segoe UI", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
.tuile-v { font-size: 27px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.tuile-v .u { font-size: 14px; font-weight: 500; color: var(--tertiaire); margin-left: 4px; }
.tuile-d { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.tuile-d .tag { font-weight: 600; }
.tuile-d .vs { color: var(--estompe); }
.favorable { color: var(--vert); }
.defavorable { color: var(--rouge); }

/* -------------------------------------------------------------------- graphique */

.legende { display: flex; gap: 14px; margin-left: auto; align-items: center; }
.legende span { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #4A443E; }
.pastille-c { width: 9px; height: 9px; border-radius: 2px; flex: none; }

.graphe { display: flex; padding: 20px 22px 18px; height: 232px; }
.axe {
  width: 58px; flex: none; display: flex; flex-direction: column;
  justify-content: space-between; align-items: flex-end;
  padding-right: 10px; font-size: 10px; color: var(--estompe); height: 174px;
}
.zone { flex: 1; min-width: 0; position: relative; }
.lignes { position: absolute; inset: 0 0 20px 0; display: flex; flex-direction: column; justify-content: space-between; }
.lignes i { display: block; height: 1px; background: #EFEBE5; }
.groupes { position: absolute; inset: 0; display: flex; }
.groupe { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.groupe:hover { background: linear-gradient(to bottom, rgba(242,239,234,.55), rgba(242,239,234,0) 88%); }
.barres { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; width: 100%; }
.barre { position: relative; width: 20px; border-radius: 4px 4px 0 0; }
.barre .val { position: absolute; left: 50%; transform: translateX(-50%); top: -15px; font-size: 9.5px; color: var(--tertiaire); white-space: nowrap; }
.bulle {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  background: var(--charbon); color: #FFF; font-size: 11px; line-height: 1.55;
  padding: 8px 11px; border-radius: 6px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 5; text-align: left;
}
.bulle b { display: block; font-size: 11.5px; margin-bottom: 3px; }
.bulle span { display: flex; align-items: center; gap: 7px; }
.groupe:hover .bulle { opacity: 1; }
.etiq { height: 20px; line-height: 20px; font-size: 11px; color: var(--second); }
.etiq.partielle { color: var(--estompe); font-style: italic; }

/* --------------------------------------------------------------------- tableaux */

table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; font-size: 10.5px; font-weight: 600; letter-spacing: .08em;
  color: var(--tertiaire); padding: 8px 16px; border-bottom: 1px solid var(--filet);
  white-space: nowrap;
}
thead th:first-child, tbody td:first-child { padding-left: 22px; }
thead th:last-child, tbody td:last-child { padding-right: 22px; }
th.d, td.d { text-align: right; }
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--filet-clair); font-size: 13px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #FBFAF8; }
td .principal { font-weight: 500; }
td .secondaire { font-size: 11px; color: var(--estompe); margin-top: 2px; }

.pastille {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.point { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.mode { display: inline-flex; padding: 3px 9px; border-radius: 5px; background: var(--filet-clair); font-size: 11.5px; color: var(--second); }

.puces { display: flex; gap: 6px; flex-wrap: wrap; }
.puce {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px;
  border: 1px solid var(--filet); border-radius: 999px; background: var(--surface);
  font-size: 12px; font-weight: 500; color: #4A443E; text-decoration: none;
}
.puce:hover { border-color: #CFC7BC; color: var(--encre); text-decoration: none; }
.puce.on { background: var(--charbon); border-color: var(--charbon); color: #FFF; }
.puce .c { font-size: 11px; opacity: .7; }

.pied {
  display: flex; align-items: center; gap: 12px; padding: 13px 22px;
  font-size: 12.5px; color: var(--tertiaire); border-top: 1px solid var(--filet);
}
.pied .tot { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--encre); }

/* ------------------------------------------------------------------- jauges */

.rail { height: 7px; border-radius: 4px; background: var(--filet-clair); overflow: hidden; }
.rail i { display: block; height: 100%; border-radius: 4px; }
.mini { width: 68px; height: 6px; border-radius: 3px; background: var(--filet-clair); overflow: hidden; display: inline-block; vertical-align: middle; margin-left: 10px; }
.mini i { display: block; height: 100%; border-radius: 3px; }
.liste-jauges { padding: 14px 22px 20px; display: flex; flex-direction: column; gap: 13px; }
.jauge { display: flex; flex-direction: column; gap: 6px; }
.jauge-h { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.jauge-h .m { margin-left: auto; font-weight: 600; }
.jauge-h .p { font-size: 11px; color: var(--estompe); width: 36px; text-align: right; }
.total-ligne {
  margin-top: 3px; padding-top: 13px; border-top: 1px solid var(--filet);
  display: flex; align-items: baseline; font-size: 13px; font-weight: 600;
}

/* --------------------------------------------------------------- échéances */

.echeances { padding: 2px 22px 16px; }
.eche { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--filet-clair); }
.eche:last-child { border-bottom: 0; }
.eche-ic { width: 32px; height: 32px; border-radius: 8px; flex: none; display: flex; align-items: center; justify-content: center; }
.eche-t { font-size: 13px; font-weight: 500; }
.eche-s { font-size: 11.5px; color: var(--estompe); margin-top: 2px; }
.eche-d { margin-left: auto; text-align: right; font-size: 12px; font-weight: 600; white-space: nowrap; }

/* --------------------------------------------------------------- formulaires */

.form { padding: 4px 22px 22px; display: flex; flex-direction: column; gap: 15px; }
.rangee { display: grid; gap: 14px; }
.rangee.deux { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rangee.trois { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.champ label { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; color: var(--tertiaire); text-transform: uppercase; }
.champ input, .champ select, .champ textarea {
  height: 38px; padding: 0 12px; border: 1px solid var(--filet);
  border-radius: var(--rayon-petit); background: var(--surface);
  font: inherit; font-size: 13px; color: var(--encre); width: 100%;
}
.champ textarea { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; }
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: 2px solid var(--or); outline-offset: -1px; border-color: var(--or); }
.champ .aide { font-size: 11.5px; color: var(--estompe); line-height: 1.5; }
.champ input[type="file"] { padding: 7px 10px; height: auto; }
.actions { display: flex; align-items: center; gap: 10px; padding-top: 4px; }
.actions .pousse { margin-left: auto; }
.entete-form { display: flex; align-items: baseline; gap: 12px; padding: 17px 22px 0; }
.entete-form h2 { margin: 0; font-size: 14.5px; font-weight: 600; }

.resume { display: flex; flex-wrap: wrap; gap: 0; padding: 0; }
.resume div { flex: 1; min-width: 150px; padding: 16px 22px; border-right: 1px solid var(--filet); }
.resume div:last-child { border-right: 0; }
.resume .l { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; color: var(--tertiaire); text-transform: uppercase; }
.resume .v { font-size: 20px; font-weight: 600; margin-top: 7px; letter-spacing: -.01em; }

/* ------------------------------------------------------- état des lieux */

.etat-lieux { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 26px; padding: 6px 22px 22px; }
.schema { display: flex; flex-direction: column; gap: 8px; }
/* `width: 100%` et pas seulement `max-width` : dans une colonne centrée, une
   boîte dimensionnée par son contenu ne laisse aucune place à `space-between`,
   et les deux mots se collent. */
.sens { display: flex; justify-content: space-between; width: 100%; max-width: 470px; font-size: 9.5px; font-weight: 700; letter-spacing: .16em; color: var(--estompe); }
.schema .legende-etats { margin-top: 8px; }
/* Le schéma ne grandit pas avec la fenêtre : au-delà d'une certaine taille il
   n'apprend plus rien et vole la place de la liste, qui, elle, se lit. */
.schema svg { max-width: 300px; }
.schema a { cursor: pointer; }
.schema a:hover rect, .schema a:hover path { filter: brightness(1.12); }
.legende-etats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11.5px; color: var(--second); }
.legende-etats span { display: flex; align-items: center; gap: 6px; }

.zones { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.zone-aide { font-size: 12.5px; color: var(--second); line-height: 1.65; padding: 14px 16px; background: var(--filet-clair); border-radius: var(--rayon-petit); }

.zone-form { border: 1px solid var(--filet); border-radius: var(--rayon-petit); padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.zone-form-h { display: flex; align-items: baseline; gap: 10px; font-size: 14px; }
.zone-form-h .sub { font-size: 12px; color: var(--tertiaire); }
.choix-etat { display: flex; flex-wrap: wrap; gap: 8px; }
.choix-etat label {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 7px 13px; border: 1px solid var(--filet); border-radius: 999px;
  font-size: 12.5px; color: #4A443E; background: var(--surface);
}
.choix-etat label:hover { border-color: #CFC7BC; }
/* L'état choisi se teinte de SA couleur : sans cela, cinq pastilles identiques
   obligent à relire le texte pour savoir laquelle est cochée. */
.choix-etat label.on { border-color: var(--teinte); box-shadow: inset 0 0 0 1px var(--teinte); font-weight: 600; color: var(--encre); }
.choix-etat input { position: absolute; opacity: 0; pointer-events: none; }

.zone-titre { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; color: var(--tertiaire); text-transform: uppercase; margin: 12px 0 4px; }
.zone-titre:first-child { margin-top: 0; }
.zone-ligne { display: flex; align-items: center; gap: 11px; padding: 9px 2px; border-bottom: 1px solid var(--filet-clair); color: inherit; text-decoration: none; }
.zone-ligne:last-child { border-bottom: 0; }
.zone-ligne:hover { background: #FBFAF8; color: inherit; text-decoration: none; }
.zl-nom { display: block; font-size: 13px; }
.zl-note { display: block; font-size: 11.5px; color: var(--estompe); margin-top: 2px; }
.zl-date { margin-left: auto; font-size: 11.5px; color: var(--estompe); white-space: nowrap; }
.zone-ligne span:nth-child(2) { min-width: 0; }

.zone-toutes summary { cursor: pointer; font-size: 12.5px; color: var(--second); padding: 8px 0; }
.zone-toutes summary:hover { color: var(--encre); }
.zone-toutes[open] summary { margin-bottom: 6px; }

/* ------------------------------------------------------ fenêtres étroites */

/* Les grilles de l'application sont pensées pour 1440 px de large. En dessous,
   elles ne rétrécissent pas : elles se replient. Une colonne de tableau réduite
   à un mot par ligne est illisible, alors qu'une colonne pleine largeur sous une
   autre se lit très bien. */
@media (max-width: 1240px) {
  .grille4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grille3, .grille2 { grid-template-columns: minmax(0, 1fr); }
  .large2 { grid-column: auto; }
  .etat-lieux { grid-template-columns: minmax(0, 1fr); }
  .schema { align-items: center; }
  .schema svg { max-width: 470px; }
  .legende-etats { justify-content: center; }
  .rangee.trois { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .corps { padding: 18px 18px 32px; }
  .top { padding: 0 18px; gap: 12px; }
  .grille4 { grid-template-columns: minmax(0, 1fr); }
  .rangee.deux, .rangee.trois { grid-template-columns: minmax(0, 1fr); }
  .champ-recherche { width: 150px; }
}

/* Le panneau d'une zone enregistre tout seul : cette mention est la seule preuve
   que le clic a bien été pris, maintenant qu'il n'y a plus de rechargement. */
.sauve { font-size: 11.5px; font-weight: 600; color: var(--vert); }
.zl-texte { min-width: 0; }

/* ------------------------------------------------- contrat : heures, client */

.rangee.quatre { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* La règle de facturation s'affiche à côté des heures, là où elle se décide.
   Reléguée dans une aide sous un champ, personne ne la lit — et c'est la seule
   chose qu'un client conteste au comptoir. */
.regle {
  padding: 11px 14px; border-radius: var(--rayon-petit);
  background: var(--filet-clair); font-size: 12px; color: var(--second); line-height: 1.6;
}
.regle strong { color: var(--encre); }

.sous-v { font-size: 11px; color: var(--estompe); margin-top: 5px; }

.cherche {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
  border: 1px solid var(--filet); border-radius: var(--rayon-petit); background: var(--surface);
}
.cherche svg { color: var(--estompe); flex: none; }
.cherche input { border: 0; outline: 0; font: inherit; font-size: 13px; width: 100%; background: none; }

.resultats { margin-top: 6px; border: 1px solid var(--filet); border-radius: var(--rayon-petit); overflow: hidden; }
.resultat {
  display: block; width: 100%; text-align: left; padding: 9px 12px;
  border: 0; border-bottom: 1px solid var(--filet-clair);
  background: var(--surface); font: inherit; cursor: pointer;
}
.resultat:last-child { border-bottom: 0; }
.resultat:hover { background: #FBFAF8; }
.r-nom { display: block; font-size: 13px; font-weight: 500; }
.r-sous { display: block; font-size: 11.5px; color: var(--estompe); margin-top: 2px; }
.resultat-vide { padding: 12px; font-size: 12.5px; color: var(--estompe); text-align: center; }

.choisi {
  display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 0 12px;
  border: 1px solid var(--vert); border-radius: var(--rayon-petit);
  background: color-mix(in srgb, var(--vert) 6%, transparent); font-size: 13px;
}
.lien { margin-left: auto; border: 0; background: none; font: inherit; font-size: 12px; color: var(--or); cursor: pointer; text-decoration: underline; }

.btn-fant.petit { height: 32px; padding: 0 12px; font-size: 12.5px; margin-top: 8px; }
.client-neuf {
  margin-top: 10px; padding: 14px 16px 16px; border: 1px dashed #D8D1C7;
  border-radius: var(--rayon-petit); background: #FBFAF8;
  display: flex; flex-direction: column; gap: 12px;
}
.erreur-neuf { font-size: 12px; color: var(--rouge); font-weight: 500; }

@media (max-width: 1240px) {
  .rangee.quatre { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .rangee.quatre { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------- retard et geste commercial */

/* Le choix se pose dans un encadré à lui : noyé dans le formulaire, « facturer »
   passerait pour une case par défaut qu'on ne relit pas. */
.retard {
  padding: 13px 15px; border-radius: var(--rayon-petit);
  background: color-mix(in srgb, var(--rouge) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--rouge) 22%, transparent);
  display: flex; flex-direction: column; gap: 11px;
}
.retard-t { font-size: 12.5px; line-height: 1.6; color: #6B3A30; }
.choix-retard { display: flex; gap: 8px; flex-wrap: wrap; }
.choix-retard label {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 8px 14px; border: 1px solid var(--filet); border-radius: 999px;
  background: var(--surface); font-size: 12.5px; color: #4A443E;
}
.choix-retard label:hover { border-color: #CFC7BC; }
.choix-retard label.on { border-color: var(--charbon); box-shadow: inset 0 0 0 1px var(--charbon); font-weight: 600; color: var(--encre); }
.choix-retard input { position: absolute; opacity: 0; pointer-events: none; }

.geste {
  display: flex; align-items: center; gap: 11px; flex-wrap: wrap;
  padding: 13px 18px; border: 1px solid var(--filet); border-radius: var(--rayon);
  background: var(--surface); font-size: 13px; line-height: 1.5;
}
.geste strong { font-weight: 600; }
.geste form { margin-left: auto; }

/* ------------------------------------------------------------- planning */

/* Une ligne par voiture, une colonne par jour. La largeur d'une colonne n'est
   PAS fixée en pixels : le mois fait 28 à 31 jours et la grille doit tomber
   juste à chaque fois, sinon la barre d'un contrat se décale du jour qu'elle
   désigne — une erreur invisible, puisqu'une barre fausse ressemble à une barre
   juste. Tout est donc exprimé en fractions de `--jours`. */
.planning { --nom: 190px; border-top: 1px solid var(--filet); }

.pl-ligne { display: grid; grid-template-columns: var(--nom) minmax(0, 1fr); border-bottom: 1px solid var(--filet-clair); }
.pl-ligne:last-child { border-bottom: 0; }
.pl-ligne:hover .pl-nom { background: #FBFAF8; }

.pl-nom {
  padding: 9px 14px 9px 22px; border-right: 1px solid var(--filet);
  display: flex; flex-direction: column; justify-content: center;
  color: inherit; text-decoration: none; min-width: 0;
}
.pl-nom:hover { color: inherit; text-decoration: none; }
.pl-veh { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-imm { font-size: 10.5px; color: var(--estompe); margin-top: 2px; }

.pl-cases {
  position: relative; display: grid;
  grid-template-columns: repeat(var(--jours), minmax(0, 1fr));
  height: 46px;
}
.pl-atelier { background: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(179,64,47,.06) 5px, rgba(179,64,47,.06) 10px); }

.pl-case { border-right: 1px solid var(--filet-clair); }
.pl-case:last-child { border-right: 0; }
.pl-case.we { background: rgba(28,26,24,.035); }
.pl-case.passe { background: rgba(28,26,24,.02); }
.pl-case.passe.we { background: rgba(28,26,24,.05); }
/* Aujourd'hui : un trait franc, pas un fond — un fond passerait derrière les
   barres et disparaîtrait justement les jours chargés. */
.pl-case.auj { box-shadow: inset 2px 0 0 var(--or), inset -2px 0 0 var(--or); }
.pl-case:hover { background: color-mix(in srgb, var(--or) 14%, transparent); }

/* ---- entête des jours ---- */

.pl-entete { position: sticky; top: 68px; z-index: 6; background: var(--surface); border-bottom: 1px solid var(--filet); }
.pl-entete .pl-nom { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; color: var(--tertiaire); text-transform: uppercase; }
.pl-entete .pl-cases { height: 40px; }
.pl-jour {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; border-right: 1px solid var(--filet-clair);
}
.pl-jour:last-child { border-right: 0; }
.pl-jour.we { background: rgba(28,26,24,.035); }
.pl-lettre { font-size: 9px; color: var(--estompe); text-transform: uppercase; }
.pl-num { font-size: 11px; color: var(--second); }
.pl-jour.auj { background: var(--or); }
.pl-jour.auj .pl-lettre, .pl-jour.auj .pl-num { color: #FFF; font-weight: 700; }

/* ---- les barres de contrat ---- */

.pl-barre {
  position: absolute; top: 7px; bottom: 7px; z-index: 3;
  display: flex; align-items: center; padding: 0 9px;
  border-radius: 6px; font-size: 11.5px; font-weight: 500;
  text-decoration: none; overflow: visible;
  box-shadow: 0 1px 2px rgba(28,26,24,.16);
}
.pl-barre:hover { text-decoration: none; filter: brightness(1.06); z-index: 5; }
/* Un bord droit quand la location déborde du mois ferait croire qu'elle
   commence le 1er : on coupe en biseau pour dire « ça vient d'avant ». */
.pl-barre.coupe-avant { border-top-left-radius: 0; border-bottom-left-radius: 0;
  clip-path: polygon(6px 0, 100% 0, 100% 100%, 6px 100%, 0 50%); padding-left: 13px; }
.pl-barre.coupe-apres { border-top-right-radius: 0; border-bottom-right-radius: 0;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 0 100%); padding-right: 13px; }
.pl-barre.coupe-avant.coupe-apres {
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 6px 100%, 0 50%);
}
.pl-texte { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pl-bulle {
  position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 20;
  background: var(--charbon); color: #FFF; font-size: 11.5px; font-weight: 400;
  line-height: 1.6; padding: 9px 12px; border-radius: 7px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .12s;
  box-shadow: 0 4px 14px rgba(28,26,24,.28);
}
.pl-bulle b { display: block; font-weight: 600; margin-bottom: 3px; }
.pl-barre:hover .pl-bulle { opacity: 1; }
/* Les deux premières lignes du planning n'ont pas de place au-dessus : leur
   infobulle bascule en dessous plutôt que de sortir de la carte. */
.pl-entete + .pl-ligne .pl-bulle,
.pl-entete + .pl-ligne + .pl-ligne .pl-bulle { bottom: auto; top: calc(100% + 8px); }

.nav-mois {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 6px; color: var(--second);
  border: 1px solid var(--filet); background: var(--surface);
}
.nav-mois:hover { border-color: #CFC7BC; color: var(--encre); text-decoration: none; }

/* En dessous de cette largeur, une colonne de jour descend sous 18 px et le
   numéro ne tient plus : le planning défile plutôt que de devenir illisible. */
@media (max-width: 1100px) {
  .planning { overflow-x: auto; }
  .pl-ligne { min-width: 860px; }
}

/* ------------------------------------------------------------- la porte */

.porte { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--fond); }
.porte-carte {
  width: 100%; max-width: 380px; background: var(--surface);
  border: 1px solid var(--filet); border-radius: 14px; padding: 34px 32px 32px;
  box-shadow: 0 2px 20px rgba(28,26,24,.06);
}
.porte-marque { background: var(--charbon); border-radius: 10px; padding: 18px 20px 16px; margin-bottom: 26px; }
.porte-carte h1 { margin: 0 0 6px; font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.porte-texte { margin: 0 0 22px; font-size: 13px; line-height: 1.6; color: var(--second); }
.porte-form { display: flex; flex-direction: column; gap: 16px; }
.porte .alerte { margin-bottom: 18px; }

.qui { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; margin-bottom: 12px; border-bottom: 1px solid #332E29; }
.qui-nom { font-size: 12.5px; font-weight: 600; color: #EDE9E3; }
.qui-role { font-size: 10.5px; color: #8A837B; margin-top: 2px; }
.qui-sortir {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 7px; cursor: pointer;
  border: 1px solid #3B342C; background: transparent; color: #B6AEA4;
}
.qui-sortir:hover { background: #2B2723; color: #EDE9E3; border-color: #4A443C; }

/* ---------------------------------------------------------------- équipe */

.droit { font-size: 12.5px; line-height: 1.5; padding-left: 24px; position: relative; color: var(--second); }
.droit::before {
  position: absolute; left: 0; top: 0; width: 16px; text-align: center;
  font-weight: 700; font-size: 13px;
}
.droit.oui::before { content: "✓"; color: var(--vert); }
.droit.non::before { content: "✕"; color: var(--rouge); }
.droit.non { color: var(--estompe); }

.compte-actions summary { cursor: pointer; font-size: 12px; color: var(--or); }
.compte-panneau {
  margin-top: 10px; padding: 12px; border: 1px solid var(--filet);
  border-radius: var(--rayon-petit); background: #FBFAF8; text-align: left;
  display: flex; flex-direction: column; gap: 12px; min-width: 220px;
}
.compte-form { display: flex; flex-direction: column; gap: 10px; }
