/* ===== Nocturne — style de l'appli First Incendie ===== */
/* La police Inter (complète, hébergée chez nous) est déclarée dans vendor/fonts/inter.css,
   chargée via <link> dans index.html. */
:root {
  --bg: #161826;
  --surface: #232532;
  --surface-2: #2b2e3d;
  --text: #e9e9ed;
  --muted: #9397ab;
  --accent: #998ddc;   /* bilan qualité nov. 2026 : 4,6:1 sur --surface-2 (était #9184d9, 4,2:1) */
  --accent-300: #d2cefd;
  --accent-400: #b5abfc;
  --accent-700: #5d5294;
  --accent-900: #2b2741;
  --neutral-700: #595d6c;
  --neutral-800: #3f424d;
  --danger: #e06a6a;
  --ok: #6ac59a;
  /* Force du mot de passe (jauge de l'écran « Choisis ton mot de passe »).
     🔴 PAS les --etat-* : un état dit où en est une tâche, pas la solidité
     d'un mot de passe. --warn est réservé à cet usage. */
  --warn: #e0b03a;
  /* Code couleur des ÉTATS (partout : tableaux, pastilles des cartes, ronds).
     À traiter=bleu · En attente=orange · rappel arrivé=rouge · Terminée=vert · Archivée=gris. */
  --etat-traiter: #4aa3ff;
  --etat-attente: #e0902f;
  --etat-du: #e37878;   /* bilan qualité nov. 2026 : 4,6:1 sur --surface-2 (était #e06a6a, 4,1:1) */
  --etat-terminee: #6ac59a;
  --etat-archivee: #9397ab;
  /* Les CONSIGNES du bon (étape 2a, Simon 17/09 : « en jaune ») : un fond
     jaune sombre et un texte jaune clair (thème unique). PAS --warn (la jauge
     du mot de passe), PAS les --etat-* (une consigne n'est pas un état). */
  --consigne-fond: #3a3217;
  --consigne-texte: #f3d36b;
  /* Code couleur des URGENCES de « À visiter » — VOLONTAIREMENT plus profondes
     et plus saturées que les --etat-* : un ÉTAT dit où en est une tâche, une
     URGENCE dit à quel point ça presse. On ne les mélange jamais.
     1 trop tôt / en stock · 2 on approche · 3 c'est le mois · 4 en retard toléré
     · 5 hors marge. */
  --urg-1: #2b6cb0;
  --urg-2: #d4b106;
  --urg-3: #dd6b20;
  --urg-4: #c53030;
  --urg-5: #7c3aed;
  --radius: 8px;
  --radius-lg: 14px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --shadow: 0 0 0 1px var(--neutral-800), 0 6px 18px rgba(0,0,0,.55);
  /* Couleurs d'appoint (bilan qualité nov. 2026) : chaque couleur qui était écrite en dur
     hors de :root a ici son nom, avec la MÊME valeur — le rendu ne bouge pas. */
  --blanc: #fff;     /* blanc pur (pastilles, QR code, texte sur couleur vive) */
  --noir: #000;      /* noir pur (ombres, voiles, fond vidéo) */
  --encre: #10131c;  /* texte foncé posé sur une couleur vive */
  --encre-ambre: #2a2313; /* texte foncé posé sur l'ambre */
  --halo: #1b1e30;   /* lueur du dégradé de fond de page */
  --marque: #4aa3ff; /* la flamme du logo */
  --etoile: #f5b301; /* étoiles, trophée */
  --etoile-avis: #f4c542; /* étoiles des avis clients */
  --ambre: #e0b46a;  /* retard, chiffre, archiver */
  --ambre-vif: #e0a83a; /* bandeau avis Google, pastille jaune */
  --ambre-doux: #e0a15a; /* avis Google « à surveiller » */
  --site: #7ab3e6;   /* badge « site » */
  --geo-vert: #2ecc71; /* pastilles de la carte */
  --geo-orange: #e67e22; /* pastilles de la carte */
  --carte-texte: #333; /* texte des fenêtres blanches de la carte */
  --medaille-or: #f5c542;      /* classement : 1er */
  --medaille-argent: #c9ccd4;  /* classement : 2e */
  --medaille-bronze: #cd8b53;  /* classement : 3e */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
/* Fond sombre sur la page entière : évite les bandes blanches quand on « tire »
   au-dessus/au-dessous du contenu (effet rebond de l'iPhone). */
html { background: var(--bg); }
/* Empêche le « rebond » de toute la page (le header reste collé en haut). */
html, body { overscroll-behavior-y: none; }
body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 20% -10%, var(--halo), var(--bg));
  background-color: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
.view { min-height: 100vh; }
[hidden] { display: none !important; }

/* Écran de démarrage (anti-flash de la page de connexion) */
.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--neutral-800); border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* « Tirer pour rafraîchir » : petite roue qui descend, JUSTE SOUS le header */
.ptr {
  position: fixed; top: 66px; left: calc(50% - 20px); z-index: 4;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); box-shadow: var(--shadow);
  display: grid; place-items: center;
  opacity: 0; transform: translateY(0); pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.ptr-spin {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--neutral-800); border-top-color: var(--accent);
}
.ptr.ready .ptr-spin { border-top-color: var(--accent-300); }
.ptr.spin .ptr-spin { animation: spin .7s linear infinite; }

/* ---- Boutons ---- */
.btn {
  font: inherit;
  border-radius: var(--radius);
  padding: 10px 16px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s, opacity .15s;
  color: var(--text);
  background: transparent;
}
.btn-primary { border-color: var(--accent); color: var(--accent-300); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.btn-primary:active { background: color-mix(in srgb, var(--accent) 26%, transparent); }
/* Poids intermédiaire entre primary (accent) et ghost (texte nu) — ex. :
   « Proposer un mot de passe » sur l'écran mdp-view : une vraie action, mais
   pas LA action principale de l'écran (Enregistrer). */
.btn-second { border-color: var(--neutral-800); }
.btn-second:hover { background: color-mix(in srgb, var(--text) 8%, transparent); border-color: var(--muted); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
.btn-block { display: block; width: 100%; }
/* Le bouton retour : une flèche DESSINÉE (couleur du texte), plus le caractère « ← »
   (bilan qualité nov. 2026). Le libellé du bouton ne porte que le mot. */
.btn-retour { display: inline-flex; align-items: center; gap: 6px; }
.btn-retour::before {
  content: ""; flex: none; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='19' y1='12' x2='5' y2='12'/%3E%3Cpolyline points='12 19 5 12 12 5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='19' y1='12' x2='5' y2='12'/%3E%3Cpolyline points='12 19 5 12 12 5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Champs ---- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.input {
  width: 100%;
  font: inherit;
  /* 🔴 16 px MINIMUM, et ce n'est pas un goût : en dessous, Safari sur iPhone
     ZOOME TOUT SEUL dès qu'on clique dans un champ, et la page saute sous le
     doigt. `font: inherit` donne 15 px — d'où cette ligne, qui doit rester
     APRÈS lui (le raccourci `font` écraserait un `font-size` placé avant).
     Même règle que `site/bon.css`, l'écran du technicien.
     🔴 CE QU'ON NE FAIT PAS : `user-scalable=no` dans le viewport. Ça
     bloquerait aussi le zoom VOLONTAIRE — lire une petite référence sur un
     extincteur, à contre-jour, dans une cave. */
  font-size: 16px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--neutral-800);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.input[readonly] { color: var(--muted); cursor: default; }
/* MARQUE, NIVEAU, PIÈCE (Simon, 2026-09-13) : montrés en MAJUSCULES pendant la
   frappe ; c'est l'enregistrement qui les range ainsi — jamais réécrits à la
   touche (lettres en double sur certains claviers Android). */
.input[data-maj] { text-transform: uppercase; }
/* Le zoom est rendu au doigt (bilan qualité nov. 2026) : au téléphone, AUCUN
   champ sous 16 px, même ceux sans la classe `.input` (sinon Safari zoome seul). */
@media (max-width: 719px) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px !important; }
}

.champ-mdp { position: relative; display: block; }
.champ-mdp .input { padding-right: 44px; }
.oeil {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: grid; place-items: center;
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--muted); border-radius: 6px;
}
.oeil:hover { color: var(--text); }
.oeil:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.oeil svg { width: 18px; height: 18px; }

/* ---- Connexion ---- */
/* 🔴 Les DEUX écrans d'authentification, pas seulement le premier.
   Le 2026-09-03, mdp-view est né sans cette règle : la carte s'est collée
   en haut à gauche sur ordinateur, et ça n'a été vu qu'en capture d'écran.
   Tout nouvel écran d'authentification s'ajoute ICI. */
#login-view, #mdp-view { display: grid; place-items: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 380px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
  text-align: center;
}
.brand { font-weight: 500; letter-spacing: .2px; }
.auth-card h1 { font-weight: 500; font-size: 22px; margin: 14px 0 20px; }
.muted { color: var(--muted); font-size: 13px; }
.msg { min-height: 18px; font-size: 13px; margin: 12px 0 0; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--ok); }

/* Jauge de force du mot de passe — trois textes seulement, jamais de phrase. */
/* 🔴 LE REPLI DE `inert` (2026-09-28). Les vieux WebView Android ne connaissent
   pas `inert` : sans cette ligne, le bon reste touchable pendant l'envoi, sur
   le téléphone même où ça compte. Voir `bloquerEcran` (`bon-outils.js`). */
.ecran-bloque { pointer-events: none; }

.jauge { min-height: 16px; font-size: 12px; font-weight: 600; margin: -6px 0 14px; }
.jauge.jauge-faible { color: var(--danger); }
.jauge.jauge-moyen { color: var(--warn); }
.jauge.jauge-fort { color: var(--ok); }

/* ---- Coquille de l'appli (MOBILE FIRST) ---- */
#app-view { position: relative; }
.app-shell { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

/* Barre du haut */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  background: var(--surface); border-bottom: 1px solid var(--neutral-800);
}
.topbar .brand { font-size: 16px; font-weight: 600; }
/* Icône du logo (flamme bleue) — remplace l'emoji 🔥 */
.brand-ic { width: 1.15em; height: 1.15em; color: var(--marque); vertical-align: -0.2em; margin-right: 5px; flex: none; }
.hamburger {
  background: transparent; border: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  /* 44 × 44 px : la taille d'un doigt. Les marges négatives compensent le
     rembourrage pour que le bouton reste visuellement au même endroit. */
  padding: 15px 11px; margin: -15px -11px;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 1px; }
.hamburger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.topbar-avatar {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  background: var(--accent-900); color: var(--accent-300); border: 1px solid var(--accent-700);
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
}

/* Menu coulissant */
.drawer-overlay { position: fixed; inset: 0; background: color-mix(in srgb, var(--noir) 50%, transparent); z-index: 10; }
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 11;
  width: 80%; max-width: 300px;
  background: var(--surface); box-shadow: 6px 0 24px color-mix(in srgb, var(--noir) 50%, transparent);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 4px;
  transform: translateX(-100%); transition: transform .22s ease;
}
#app-view.menu-open .drawer { transform: translateX(0); }
.drawer-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.drawer-brand { padding: 6px 10px 14px; font-size: 16px; font-weight: 600; }
/* Bouton « réduire le menu » (‹) — visible seulement sur ordinateur */
.drawer-collapse {
  display: none; flex: none; width: 30px; height: 30px; margin-bottom: 8px;
  background: transparent; color: var(--muted); border: 1px solid var(--neutral-800);
  border-radius: 8px; font-size: 20px; line-height: 1; cursor: pointer;
}
.drawer-collapse:hover { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); }
.drawer-collapse:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Bouton flottant « afficher le menu » (☰) — caché par défaut, montré sur ordinateur quand le menu est réduit */
.drawer-expand {
  display: none; position: fixed; top: 14px; left: 14px; z-index: 12;
  width: 40px; height: 40px; place-items: center;
  background: var(--surface); color: var(--text); border: 1px solid var(--neutral-800);
  border-radius: 10px; font-size: 18px; cursor: pointer; box-shadow: 0 2px 10px color-mix(in srgb, var(--noir) 40%, transparent);
}
.drawer-expand:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.drawer-expand:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.drawer nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  text-align: left; width: 100%; font: inherit; color: var(--muted);
  background: transparent; border: 0; border-radius: var(--radius);
  padding: 11px 12px; cursor: pointer;
}
.nav-item:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
.nav-item.active { background: var(--accent-900); color: var(--accent-300); }
.nav-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-item.soon { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nav-item:disabled { color: var(--neutral-700); cursor: not-allowed; }
.nav-item:disabled:hover { background: transparent; color: var(--neutral-700); }
.soon-tag {
  font-size: 10px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); border: 1px solid var(--neutral-800);
  border-radius: 999px; padding: 2px 8px; flex: none;
}
.drawer-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--neutral-800); display: flex; flex-direction: column; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.user-avatar {
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  background: var(--accent-900); color: var(--accent-300); border: 1px solid var(--accent-700);
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
}
.user-meta { min-width: 0; }
.user-name { font-size: 14px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.last-sync { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); padding: 0 4px; }
.last-sync .dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.logout-btn {
  font: inherit; font-size: 13px; text-align: center;
  background: transparent; border: 1px solid var(--neutral-800); border-radius: var(--radius);
  color: var(--muted); padding: 9px 12px; cursor: pointer;
}
.logout-btn:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
.logout-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.app-version { text-align: center; font-size: 10px; letter-spacing: .5px; color: var(--neutral-700); }
/* « Signaler un problème » (étape 2a) : le bouton du bas du menu, avec son drapeau. */
.signaler-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.signaler-ic { width: 16px; height: 16px; flex: none; }
.rm-texte { width: 100%; resize: vertical; }
/* 03/11 : « Problème » / « Idée » au-dessus du texte (puces des annonces, sans avatar). */
.rm-genre { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.rm-puce { padding-left: 12px; }
/* 20/11 (suggestion n°11) : la capture jointe, en petit sous le texte, avec sa croix. */
.rm-capture { position: relative; display: inline-block; margin: 12px 0 0; max-width: 100%; }
.rm-capture[hidden] { display: none; }
.rm-capture img { display: block; max-width: 100%; max-height: 140px; border: 1px solid var(--neutral-800); border-radius: var(--radius); background: var(--surface-2); }
.rm-capture-x { position: absolute; top: -10px; right: -10px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border-radius: 50%; border: 1px solid var(--neutral-800); background: var(--surface); color: var(--text); cursor: pointer; }
.rm-capture-x .ic-inline { width: 16px; height: 16px; }

/* ---- « Mes bons » (étape 2a) ---- */
.bons-l, .bons-carte { cursor: pointer; }
.bons-l:hover td { background: color-mix(in srgb, var(--text) 4%, transparent); }
/* Le point : quelque chose a été fait sur ce téléphone. */
.bons-code { font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.bons-point {
  display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%;
  background: var(--accent-400); vertical-align: 2px;
}
.bons-hors-ligne {
  margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius); font-size: 13px; font-weight: 600;
  color: var(--etat-attente); background: color-mix(in srgb, var(--etat-attente) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--etat-attente) 40%, transparent);
}
.bons-retour { margin: 0 0 12px; min-height: 44px; }
.bons-outils { margin-bottom: 12px; }

.content { padding: 20px 16px 96px; }
.content h1 { font-weight: 600; font-size: 21px; margin: 0 0 4px; }
.content .sub { color: var(--muted); margin: 0 0 20px; font-size: 13px; }

/* ---- Carte profil ---- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px;
}
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.avatar {
  width: 52px; height: 52px; flex: none; border-radius: 50%;
  background: var(--accent-900); color: var(--accent-300);
  display: grid; place-items: center; font-size: 18px; font-weight: 600;
  border: 1px solid var(--accent-700);
}
.profile-head .name { font-size: 17px; font-weight: 600; }
.profile-head .role { color: var(--muted); font-size: 13px; }

/* Onglets (glissables horizontalement sur mobile) */
.tabs {
  display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; border-bottom: 1px solid var(--neutral-800);
  margin: 4px -4px 18px; padding: 0 4px 2px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  font: inherit; font-weight: 500; white-space: nowrap; flex: none;
  background: transparent; border: 0; color: var(--muted);
  padding: 9px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent-300); border-bottom-color: var(--accent); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sub-head {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px;
  color: var(--accent-300); margin: 18px 0 10px;
}
.tab-panel > .sub-head:first-child { margin-top: 4px; }
.tab-panel .info-grid + .sub-head { padding-top: 16px; border-top: 1px solid var(--neutral-800); }
.nr { color: var(--neutral-700); font-style: italic; }

/* Infos en UNE colonne (mobile first) */
.info-grid { display: flex; flex-direction: column; gap: 14px; }
.info-grid .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.info-grid .value { font-size: 15px; margin-top: 2px; }

/* =========================================================
   ORDINATEUR (≥ 860px) : menu latéral fixe, pas de barre du haut,
   contenu large, infos sur 2 colonnes.
   ========================================================= */
@media (min-width: 860px) {
  #app-view { display: flex; align-items: stretch; min-height: 100vh; }

  /* Le menu coulissant devient un menu latéral fixe, à gauche.
     position: sticky + top: 0 => il reste toujours visible quand on descend
     dans une longue liste. align-self: flex-start l'empêche de s'étirer avec
     le contenu, et overflow-y: auto fait défiler le menu tout seul s'il est
     plus grand que l'écran. */
  .drawer {
    position: sticky; top: 0; align-self: flex-start; transform: none; order: -1;
    width: 250px; max-width: none; flex: 0 0 250px; height: 100vh; overflow-y: auto;
    box-shadow: none; border-right: 1px solid var(--neutral-800);
  }
  .drawer-overlay { display: none !important; }

  /* Bouton « réduire » visible dans le menu ; quand le menu est réduit,
     on le cache et on affiche le bouton flottant « ☰ » pour le remettre. */
  .drawer-collapse { display: grid; place-items: center; }
  #app-view.menu-collapsed .drawer { display: none; }
  #app-view.menu-collapsed .drawer-expand { display: grid; }

  /* Plus besoin de la barre du haut ni du hamburger sur ordinateur */
  .topbar { display: none; }

  .app-shell { max-width: none; flex: 1 1 auto; margin: 0; min-width: 0; }

  .content { padding: 32px 44px 64px; }
  .content h1 { font-size: 24px; }
  .content .sub { font-size: 14px; }

  .card { padding: 22px 24px; }
  .profile-head { margin-bottom: 18px; }

  /* Infos : autant de colonnes que la largeur le permet */
  .info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px 40px; }
}

/* =========================================================
   TABLEAU DE BORD
   ========================================================= */
.dash-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.dash-head h1 { margin: 0; }

/* Sélecteur de période (menu déroulant) */
.period-dd { position: relative; align-self: flex-start; }
.period-toggle {
  font: inherit; font-size: 14px; background: var(--surface); border: 1px solid var(--neutral-800);
  color: var(--text); border-radius: 999px; padding: 8px 16px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.period-toggle .chev { color: var(--muted); font-size: 11px; }
.period-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.period-menu {
  position: absolute; top: calc(100% + 6px); right: 0; left: auto; z-index: 20;
  background: var(--surface); border: 1px solid var(--neutral-800); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 8px; display: flex; gap: 10px;
}
.pm-presets { display: flex; flex-direction: column; gap: 2px; min-width: 168px; border-right: 1px solid var(--neutral-800); padding-right: 8px; }
.pm-cal { width: 252px; padding: 2px 4px; }
.period-opt {
  text-align: left; font: inherit; font-size: 14px; background: transparent; border: 0;
  color: var(--muted); border-radius: var(--radius); padding: 9px 12px; cursor: pointer;
}
.period-opt:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
.period-opt.active { background: var(--accent-900); color: var(--accent-300); }

/* Calendrier */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { font-size: 14px; font-weight: 500; }
.cal-nav { background: transparent; border: 0; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.cal-nav:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--muted); padding: 2px 0 4px; }
.cal-day { background: transparent; border: 0; color: var(--text); font: inherit; font-size: 13px; padding: 7px 0; border-radius: 6px; cursor: pointer; }
.cal-day:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.cal-day.in-range { background: var(--accent-900); border-radius: 0; }
.cal-day.sel { background: var(--accent); color: var(--bg); }   /* foncé sur violet : 6:1 (blanc : 2,9:1) */
.cal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.cal-hint { font-size: 12px; color: var(--muted); }
.cal-apply { font: inherit; font-size: 13px; background: var(--accent-900); color: var(--accent-300); border: 1px solid var(--accent-700); border-radius: 8px; padding: 7px 14px; cursor: pointer; }
.cal-apply:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.cal-apply:disabled { opacity: .45; cursor: not-allowed; }

/* Sélecteur sur petit écran : empilé, ancré à gauche */
@media (max-width: 640px) {
  .period-menu { flex-direction: column; left: 0; right: auto; max-width: calc(100vw - 32px); max-height: 74vh; overflow: auto; }
  .pm-presets { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--neutral-800); padding-bottom: 8px; }
  .pm-cal { width: auto; min-width: 240px; }
}

/* Groupes de chiffres */
.kpi-block-label { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 0 0 10px; }
.kpi-grid { display: grid; gap: 12px; margin-bottom: 22px; }
.kpi-grid.kpi-2 { grid-template-columns: 1fr 1fr; }
.kpi-grid.kpi-3 { grid-template-columns: 1fr 1fr; }
.kpi-grid.kpi-4 { grid-template-columns: 1fr 1fr; }
.kpi { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 16px; }
/* Cartes de chiffres « jolies » (icône colorée) */
.kpi-fancy { display: flex; align-items: center; gap: 12px; }
.kpi-fancy .kpi-ico { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--surface-2); }
.kpi-fancy .kpi-body { min-width: 0; }
.kpi-fancy .kpi-value { margin-top: 2px; }
.kpi-fancy.gold .kpi-ico { background: color-mix(in srgb, var(--etoile) 20%, transparent); color: var(--etoile); }
.kpi-fancy.accent .kpi-ico { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent-300); }
.kpi-fancy .kpi-ico .ic-inline { width: 22px; height: 22px; vertical-align: 0; }
.avis-select-top { margin-bottom: 18px; }
.kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.kpi-value { font-size: 22px; font-weight: 600; margin-top: 6px; }
.kpi-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.section-title { font-size: 14px; font-weight: 600; margin: 6px 0 12px; }
.rank-you { color: var(--accent-300); font-weight: 400; font-size: 13px; }
.r-nb { font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 1px; }
.rank-pos { font-size: 18px; width: 30px; text-align: center; flex: none; color: var(--muted); }
.rank-ca-sub { font-size: 11px; color: var(--muted); font-weight: 400; }

/* Classement — cartes (téléphone) */
.rank-table { display: none; }
.rank-cards { display: flex; flex-direction: column; gap: 8px; }
.rank-card { background: var(--surface); border-radius: var(--radius); box-shadow: 0 0 0 1px var(--neutral-800); padding: 12px 14px; }
.rank-card.me { box-shadow: 0 0 0 1px var(--accent-700); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.rc-top { display: flex; align-items: center; gap: 12px; }
.rc-name { flex: 1; min-width: 0; font-weight: 500; }
.rc-ht { text-align: right; font-weight: 600; flex: none; }
.rc-meta { font-size: 12px; color: var(--muted); margin-top: 8px; padding-left: 42px; }
.rc-meta.rc-marge { margin-top: 2px; }
/* Marge (responsables) : 3e carte du haut, toute la largeur au téléphone */
.kpi-grid .kpi-plein { grid-column: 1 / -1; }

@media (min-width: 860px) {
  .dash-head { flex-direction: row; align-items: center; justify-content: space-between; }
  .kpi-grid.kpi-2 { grid-template-columns: 1fr 1fr; }
  .kpi-grid.kpi-3 { grid-template-columns: repeat(3, 1fr); }
  .kpi-grid .kpi-plein { grid-column: auto; }
  .kpi-grid.kpi-4 { grid-template-columns: repeat(4, 1fr); }
  .kpi-value { font-size: 24px; }

  /* Classement — tableau (ordinateur) */
  .rank-cards { display: none; }
  .rank-table {
    display: table; width: 100%; border-collapse: collapse;
    background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
  }
  .rank-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 500; padding: 13px 16px; border-bottom: 1px solid var(--neutral-800); }
  .rank-table td { padding: 13px 16px; border-bottom: 1px solid var(--neutral-800); vertical-align: middle; }
  .rank-table tbody tr:last-child td { border-bottom: 0; }
  .rank-table tr.me td { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
  .rank-table .r-pos { font-size: 18px; width: 64px; }
  .rank-table .r-name { font-weight: 500; }
  .rank-table .r-num, .rank-table th.r-num { text-align: right; font-variant-numeric: tabular-nums; }
}

/* ===== Mes avis clients ===== */
.avis-moy-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 8px; }
.avis-moy-card {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 8px;
}
.amc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.amc-crit { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.amc-crit b { color: var(--text); font-variant-numeric: tabular-nums; }
.avis-moy-card .amc-name { font-weight: 600; }
.avis-moy-card .amc-note { color: var(--etoile-avis); letter-spacing: 1px; }
.avis-moy-card .amc-note b { color: var(--text); margin-left: 6px; font-variant-numeric: tabular-nums; }
.avis-moy-card .amc-nb { color: var(--muted); font-size: 13px; }
.avis-select { display: block; max-width: 420px; margin: 18px 0 6px; }
.avis-select > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
select.input { appearance: none; -webkit-appearance: none; cursor: pointer; }
.avis-card {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 14px 16px; margin-bottom: 10px;
}
.avis-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.avis-note { color: var(--etoile-avis); letter-spacing: 1px; }
.avis-note b { color: var(--text); margin-left: 6px; font-variant-numeric: tabular-nums; }
.avis-when { color: var(--muted); font-size: 12.5px; }
.avis-crit { color: var(--muted); font-size: 13px; margin-top: 8px; }
.avis-comment { margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--accent-700); color: var(--text); font-style: italic; }
.avis-who { font-size: 14px; margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.avis-tech-tag { color: var(--muted); font-weight: 500; }
.nom-soc { color: var(--muted); font-weight: 400; }
.avis-badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--neutral-800); }
.avis-badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.avis-count { color: var(--muted); font-weight: 400; font-size: 14px; }
.muted-dash { color: var(--neutral-700); }
.suivi-badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--neutral-800); background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.suivi-badge.b-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.suivi-badge.b-info { color: var(--accent-300); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.suivi-badge.b-wait { color: var(--ambre); border-color: color-mix(in srgb, var(--ambre) 40%, transparent); }
.suivi-badge.b-mut { color: var(--muted); }
.hr-best td { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); font-weight: 600; }
.suivi-th { cursor: pointer; user-select: none; }
.suivi-th:hover { color: var(--text); }
.suivi-th.active { color: var(--accent-300); }
.avis-table th.ctr, .avis-table td.ctr { text-align: center; }
.suivi-ic { font-size: 15px; display: inline-flex; vertical-align: middle; }
.suivi-ic.ok { color: var(--ok); }
.suivi-ic.star { color: var(--etoile); }
.suivi-ic .ic-inline { width: 16px; height: 16px; }
/* Couleurs des petites icônes en ligne (relances, suivi carte) */
.c-ok { color: var(--ok); }
.c-star { color: var(--etoile); }
.c-wait, .c-muted { color: var(--muted); }
.c-rouge { color: var(--danger); }
.c-pin { color: var(--accent-300); }
.rgg-banner-ic { color: var(--ambre-vif); }
.muted-dash2 { color: var(--neutral-700); opacity: .5; }

/* Pagination des tableaux */
.pagin { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.pagin-size { display: flex; align-items: center; gap: 8px; }
.pagin-size .input { width: auto; min-width: auto; padding: 6px 10px; }
.pagin-nav { display: flex; align-items: center; gap: 8px; }
.pagin-nav .btn { width: auto; padding: 7px 12px; }
.pagin-info { font-variant-numeric: tabular-nums; }
.pagin-total { margin-left: auto; }
@media (max-width: 719px) { .pagin-total { margin-left: 0; width: 100%; } }

/* Barre de filtres + tri */
.avis-filtres { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 6px 0 14px; }
.avis-filtres .ff { display: flex; flex-direction: column; gap: 6px; }
.avis-filtres .ff > span { font-size: 12px; color: var(--muted); }
.avis-filtres .input { min-width: 150px; }
.avis-tri-dir { width: auto; padding: 10px 14px; white-space: nowrap; }

/* Tableau des avis (ordinateur) */
.avis-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow); background: var(--surface); }
.avis-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.avis-table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--muted); font-weight: 500; padding: 12px 14px;
  border-bottom: 1px solid var(--neutral-800); white-space: nowrap;
}
.avis-table th.num { text-align: right; }
.avis-th { cursor: pointer; user-select: none; }
.avis-th:hover { color: var(--text); }
.avis-th.active { color: var(--accent-300); }
.avis-table td { padding: 11px 14px; border-bottom: 1px solid var(--neutral-800); vertical-align: top; }
.avis-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.avis-table tbody tr:last-child td { border-bottom: 0; }
.avis-table .avis-com { color: var(--muted); max-width: 320px; }
/* Équipements : les libellés venus de Kizeo montent à 69 caractères sans espace
   (« TERRAINS 1-2 … »). Sans largeur maxi, le tableau devenait deux fois trop
   large et poussait un défilement. La date de visite, elle, reste d'un bloc. */
.eq-table td { max-width: 230px; overflow-wrap: break-word; }   /* break-word : un mot entier ne se coupe plus (« EXTINCTEU R ») */
.eq-table td.eq-nowrap { white-space: nowrap; }
.eq-table .eq-numero { width: 1%; white-space: nowrap; }
/* Équipements : la ligne d'outils + les filtres (2026-11-05, compact : Simon).
   Une ligne : recherche · Filtres · Effacer · Tout · Ranger. Les menus n'ont pas de titre. */
.eq-outils { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; }
.eq-outils .eq-q { flex: 1 1 auto; min-width: 0; height: 38px; padding: 6px 12px; font-size: 14px; }
.eq-mini { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px;
  padding: 0 12px; font-size: 14px; white-space: nowrap; flex: none; width: auto; }
.eq-mini .ic-inline, .eq-mini svg { width: 16px; height: 16px; margin: 0; }
.eq-mini .n { font-size: 11px; font-weight: 600; background: var(--accent-900); color: var(--accent-300);
  border-radius: 999px; padding: 1px 6px; }
.eq-mini.on, .eq-fm.on, .eq-q.on { border-color: var(--accent-700); color: var(--accent-300); }
.eq-filtres { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.eq-filtres .eq-fm { width: auto; min-width: 0; max-width: 220px; height: 36px; padding: 4px 10px; font-size: 14px; }
.eq-an-duo { display: inline-flex; gap: 6px; }
.eq-an-duo .eq-fm { width: 96px; }
.eq-sel { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; padding: 6px 6px 6px 12px;
  border: 1px solid var(--accent-700); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--accent) 8%, transparent); font-size: 14px; }
.eq-sel > b { margin-right: auto; }
.eq-valid-ok { margin: 0 0 8px; }
.eq-coche-carte { display: inline-grid; place-items: center; width: 44px; height: 44px; margin: -10px 0 -10px -10px; flex: none; }
.eq-carte .fc-top b { margin-right: auto; }
@media (max-width: 719px) {
  /* Téléphone : boutons = icône seule, carrés de 44 px (le doigt) ; menus 2 par ligne. */
  .eq-outils .eq-q { height: 44px; font-size: 16px; }
  .eq-mini { height: 44px; min-width: 44px; padding: 0 10px; }
  .eq-outils .eq-mot, .eq-sel .eq-mot { display: none; }
  .eq-sel { flex-wrap: nowrap; }
  .eq-filtres { display: grid; grid-template-columns: 1fr 1fr; }
  .eq-filtres .eq-fm { width: 100%; max-width: none; height: 40px; font-size: 16px; }
  .eq-an-duo { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .eq-an-duo .eq-fm { width: 100%; }
  .eq-coche-carte .cr-coche { width: 22px; height: 22px; }
  /* Le tri du telephone : une seule ligne, sans titre (le menu dit ce qu il trie). */
  .eq-tri { flex-wrap: nowrap; gap: 6px; margin: 0 0 10px; }
  .eq-tri .ff { flex: 1 1 auto; min-width: 0; }
  .eq-tri .ff > span { display: none; }
  .eq-tri .input { height: 44px; }
  .eq-tri .avis-tri-dir { width: auto; flex: none; height: 44px; }
}

/* Cartes (téléphone) vs tableau (ordinateur) */
.avis-cards { display: none; }
@media (max-width: 719px) {
  .avis-table-wrap { display: none; }
  .avis-cards { display: block; }
  .avis-filtres .ff, .avis-filtres .input { width: 100%; }
}
@media (min-width: 720px) {
  .avis-filtres .avis-tri-mob { display: none; }
}
@media (min-width: 720px) {
  .avis-moy-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* ---- Réglages (pages Google) ---- */
.rg-sec { margin-bottom: 28px; }
.rg-sous { border-left: 2px solid var(--neutral-800); padding-left: 14px; margin-top: 8px; }
.rg-sous-titre { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 12px; }
.rg-defaut { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.rg-defaut .input { flex: 1; min-width: 200px; }
.rg-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 10px; }
.rg-form .ff { display: flex; flex-direction: column; gap: 6px; }
.rg-form .ff > span { font-size: 12px; color: var(--muted); }
.rg-form .ff-lien, .rg-form .rg-ff-lien { flex: 1; min-width: 220px; }
.rg-msg { min-height: 18px; font-size: 13px; margin: 2px 0 14px; }
.rg-msg.err { color: var(--danger); }
.rg-msg.ok { color: var(--ok); }

/* Reglages > General : le bouton « Synchroniser maintenant ». */
.rg-sync { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rg-sync-msg { font-size: 13px; color: var(--muted); }
.rg-sync-msg.ok { color: var(--ok); }
.rg-sync-msg.err { color: var(--danger); }

/* ===== Interventions (rubrique « Interventions », plan 2026-08-25 / 2B) =====
   Le tableau, les cartes et la pagination sont ceux des avis clients : on ne
   redefinit ici QUE ce qui est propre aux interventions. */

/* L'adresse sous le nom du site : petite, grise, dans la MEME colonne — sinon
   ca deborde sur telephone. */
.itv-adr { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* La pastille du type. En sous-traitance elle porte le nom du donneur d'ordre,
   qui peut etre long : on la laisse respirer sans casser la ligne. */
.itv-type {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--muted); background: color-mix(in srgb, var(--muted) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--muted) 32%, transparent);
}
.itv-type-vf { color: var(--etat-traiter); background: color-mix(in srgb, var(--etat-traiter) 12%, transparent); border-color: color-mix(in srgb, var(--etat-traiter) 40%, transparent); }
.itv-type-devis { color: var(--etat-attente); background: color-mix(in srgb, var(--etat-attente) 12%, transparent); border-color: color-mix(in srgb, var(--etat-attente) 40%, transparent); }
.itv-type-dev { color: var(--etat-terminee); background: color-mix(in srgb, var(--etat-terminee) 12%, transparent); border-color: color-mix(in srgb, var(--etat-terminee) 40%, transparent); }

/* ===== « À venir » — les filtres (07/09) : période + une puce par technicien =====
   Même recette que le bandeau de « À visiter » : puces allumées/éteintes, et le
   choix de période avec son icône dedans, tout à droite. */
/* Dans le bandeau (`.av-outils`, le même que « À visiter ») : les puces au
   milieu, et à droite l'heure de lecture, la flèche « recharger », la période. */
.itv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.itv-droite { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.itv-maj { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.itv-recharger { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; flex: none;
  border-color: var(--neutral-800); color: var(--muted); }
.itv-recharger:hover { color: var(--text); border-color: var(--neutral-700); }
.itv-recharger svg { width: 18px; height: 18px; }
@keyframes itv-tour { to { transform: rotate(360deg); } }
.itv-recharger.tourne svg { animation: itv-tour .9s linear infinite; }
.itv-recharger.tourne { color: var(--accent-300); border-color: var(--accent-700);
  background: color-mix(in srgb, var(--accent) 14%, transparent); }
.itv-maj-lecture { color: var(--accent-300); }
/* Le tableau s'estompe pendant la relecture, et ne répond plus au clic. */
.itv-corps-lecture { opacity: .45; pointer-events: none; transition: opacity .2s; }
.itv-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--neutral-800); background: transparent; color: var(--muted);
  font: 600 12px/1 Inter, sans-serif; cursor: pointer; min-height: 34px;
  transition: background .15s, border-color .15s, color .15s;
}
.itv-chip:hover { color: var(--text); border-color: var(--neutral-700); }
.itv-chip.active { color: var(--accent-300); border-color: var(--accent-700); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.itv-chip.active .tcount { background: var(--accent-900); color: var(--accent-300); border-color: var(--accent-700); }
.itv-jours { position: relative; display: flex; align-items: center; }
.itv-jours .ic-btn { position: absolute; left: 12px; width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.itv-jours .input { width: auto; min-width: 130px; padding-left: 34px; cursor: pointer; }
a.itv-act { text-decoration: none; }

/* ===== La popup « Nouvelle intervention » (le « + ») =====
   Un en-tête avec sa croix, des sections titrées par une icône, tous les choix
   en PASTILLES (le vrai bouton radio / la vraie case restent dessous, invisibles :
   le clavier et le banc les voient), un « Ajouter » plein. Sur téléphone, une
   feuille qui monte du bas et prend tout l'écran. */
.modal.itv-ajout { width: min(680px, 100%); padding: 0; display: flex; flex-direction: column; max-height: 92vh; }
.itv-aj-tete {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px 14px; border-bottom: 1px solid var(--neutral-800);
}
.itv-aj-tete h3 { margin: 0; display: flex; align-items: center; gap: 10px; }
.itv-aj-tete h3 .ic-btn { width: 20px; height: 20px; color: var(--accent-300); }
.itv-aj-etape { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.itv-aj-x { width: 36px; height: 36px; }
.itv-aj-x svg { width: 16px; height: 16px; }
.itv-aj-corps { padding: 18px 22px 6px; overflow: auto; }
.itv-ajout .plf-bloc { margin-bottom: 18px; }
.itv-ajout .plf-lib { gap: 8px; margin-bottom: 10px; }
.itv-ajout .plf-lib .ic-btn { width: 14px; height: 14px; color: var(--accent-300); }
.itv-ajout .plf-ligne { gap: 10px; margin-bottom: 10px; }
.itv-ajout .plf-ligne .input { flex: 1 1 180px; }
.itv-ajout .plf-ligne .plf-h { flex: 0 1 120px; }
.itv-ajout .plf-radios { gap: 8px; margin-bottom: 10px; }
/* Les pastilles : radio, case ou technicien — le même dessin. */
.itv-ajout .plf-radio {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--neutral-800);
  background: transparent; color: var(--muted); font-size: 13.5px; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.itv-ajout .plf-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.itv-ajout .plf-radio::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--neutral-700); flex: none; transition: background .15s;
}
.itv-ajout .plf-radio:hover { color: var(--text); border-color: var(--neutral-700); }
.itv-ajout .plf-radio:has(input:checked) {
  color: var(--accent-300); border-color: var(--accent-700);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.itv-ajout .plf-radio:has(input:checked)::before { background: var(--accent-300); }
.itv-ajout .plf-radio:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.itv-aj-equipe { display: flex; flex-wrap: wrap; gap: 8px; }
/* Les champs avec une icône dedans (client, adresse). */
.itv-aj-avec-ic > .ic-btn { position: absolute; left: 12px; top: 15px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; z-index: 1; }
.itv-aj-avec-ic > .input { padding-left: 38px; }
.itv-aj-lieu-champ { margin-top: 2px; }
.itv-aj-emails { margin-top: 10px; margin-bottom: 0 !important; }
.itv-aj-tel-champ { margin-top: 10px; }
.itv-ajout .input::placeholder { color: var(--muted); }
.itv-ajout .plf-msg-txt { min-height: 64px; }
.itv-ajout .rg-msg { margin: 0 22px; }
.itv-ajout .rg-msg:empty { display: none; }
.itv-aj-pied { padding: 14px 22px 18px; border-top: 1px solid var(--neutral-800); margin-top: 0; }
.itv-aj-ok { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--bg); border-color: var(--accent); padding: 10px 20px; }
.itv-aj-ok:hover { background: var(--accent-400); border-color: var(--accent-400); color: var(--bg); }
.itv-aj-ok:disabled { opacity: .45; }
.itv-aj-ok-prev { background: transparent; color: var(--accent-300); }
.itv-aj-ok-prev:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-300); border-color: var(--accent); }
.itv-aj-ok svg { width: 16px; height: 16px; }
@media (max-width: 719px) {
  /* 🔴 `.modal-fond.itv-ajout-fond`, pas `.itv-ajout-fond` seul : la règle
     générale `.modal-fond` est écrite plus bas dans le fichier et gagnerait. */
  .modal-fond.itv-ajout-fond { padding: 0; place-items: end center; }
  .modal.itv-ajout { width: 100%; max-height: 100vh; height: 100vh; border-radius: 0; }
  .itv-aj-corps { padding: 14px 16px 6px; }
  .itv-aj-tete, .itv-aj-pied { padding-left: 16px; padding-right: 16px; }
  .itv-ajout .rg-msg { margin: 0 16px; }
  .itv-ajout .input, .itv-ajout .btn { min-height: 44px; }
  .itv-ajout .plf-radio { min-height: 42px; }
  .itv-aj-switch { min-height: 46px; flex: 1 1 100%; }
  .itv-aj-devis-ligne { max-width: none; flex: 1 1 100%; }
  .itv-aj-devis-x { width: 44px; height: 44px; }
  .itv-aj-pj-btn { width: 100%; justify-content: center; }
  .itv-aj-pj-x { width: 40px; height: 40px; }
  .itv-aj-plus { min-height: 44px; }
  /* Les deux boutons sur UNE ligne, deux colonnes (Annuler à gauche, Ajouter à droite). */
  /* 🔴 Plus lourd que `.modal .m-acts` (écrit plus bas dans le fichier), sinon il gagne. */
  /* 3 boutons : « Planifier et prévenir » sur sa ligne, puis Annuler | Planifier. */
  .modal.itv-ajout .itv-aj-pied { flex-direction: row; flex-wrap: wrap; gap: 10px; }
  .modal.itv-ajout .itv-aj-pied .btn { flex: 1 1 0; width: auto; min-height: 48px; padding: 12px 10px; justify-content: center; }
  .modal.itv-ajout .itv-aj-pied .itv-aj-ok-prev { flex: 1 1 100%; order: -1; }
  .itv-aj-ok { display: inline-flex; }
  /* La date sur sa ligne, puis les deux heures en deux colonnes. */
  .itv-ajout #itv-aj-date { flex: 1 1 100%; }
  .itv-ajout .plf-ligne .plf-h { flex: 1 1 calc(50% - 10px); }
  /* Plusieurs jours (2026-10-26) : chaque date sur sa ligne ; avec la poubelle, deux heures + elle. */
  .itv-ajout .itv-aj-jour .itv-aj-jour-date { flex: 1 1 100%; }
  .itv-ajout .plf-ligne.itv-aj-jour .plf-h { flex: 1 1 calc(50% - 32px); }
}
/* Les propositions de l'annuaire, sous le champ « client ». */
.itv-aj-champ { position: relative; flex: 1 1 180px; }
.itv-aj-champ .input { width: 100%; }
.itv-aj-sugg-item.active { color: var(--accent-300); }
/* Les numéros de devis (INT, sous-traitance, autre) : une case, et « + Ajouter » pour en mettre d'autres. */
.itv-aj-devis { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.itv-aj-devis-liste { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto; }
.itv-aj-devis-ligne { display: flex; align-items: center; gap: 6px; flex: 1 1 190px; max-width: 260px; }
.itv-aj-devis-n { flex: 1 1 auto; min-width: 0; }
.itv-aj-devis-x { flex: none; width: 32px; height: 32px; border-color: var(--neutral-800); }
.itv-aj-devis-x svg { width: 14px; height: 14px; }
.itv-aj-devis-x:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
/* Le champ obligatoire laissé vide : marqué en rouge jusqu'à ce qu'on tape. */
.itv-ajout .input.itv-aj-manque { border-color: var(--danger); box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 30%, transparent); }
.itv-aj-plus { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; color: var(--accent-300); border-color: var(--accent-700); white-space: nowrap; }
.itv-aj-plus svg { width: 14px; height: 14px; }
.itv-aj-plus:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
/* ===== Les bandeaux d'avancement d'un ajout (entre les filtres et le tableau) =====
   Orange qui tourne pendant l'écriture, vert avec le lien vers Google Agenda
   quand c'est fini, rouge si ça rate. Couleurs = le code couleur des états. */
.itv-bandeaux { display: flex; flex-direction: column; gap: 8px; margin: -4px 0 14px; }
.itv-bandeau {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 10px; border: 1px solid; font-size: 13.5px; font-weight: 500;
}
.itv-bandeau > svg, .itv-bandeau .itv-tourne svg { width: 18px; height: 18px; flex: none; }
.itv-bandeau-txt { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.itv-bandeau-encours { color: var(--etat-attente); border-color: color-mix(in srgb, var(--etat-attente) 45%, transparent); background: color-mix(in srgb, var(--etat-attente) 12%, transparent); }
.itv-bandeau-ok { color: var(--etat-terminee); border-color: color-mix(in srgb, var(--etat-terminee) 45%, transparent); background: color-mix(in srgb, var(--etat-terminee) 12%, transparent); }
.itv-bandeau-err { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.itv-bandeau-lien { width: 30px; height: 30px; color: inherit; border-color: color-mix(in srgb, currentColor 45%, transparent); flex: none; text-decoration: none; }
.itv-bandeau-lien svg { width: 16px; height: 16px; }
.itv-bandeau-lien:hover { background: color-mix(in srgb, currentColor 14%, transparent); }
.itv-bandeau-x { width: 28px; height: 28px; color: inherit; border-color: transparent; flex: none; }
.itv-bandeau-x svg { width: 13px; height: 13px; }
/* « Recommencer » : la fenêtre revient remplie (bandeau orange ou rouge). */
.itv-bandeau-reprise { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; color: inherit; border-color: color-mix(in srgb, currentColor 45%, transparent); flex: none; font-size: 13px; white-space: nowrap; }
.itv-bandeau-reprise svg { width: 15px; height: 15px; }
.itv-bandeau-reprise:hover { background: color-mix(in srgb, currentColor 14%, transparent); }
.itv-tourne { display: inline-flex; flex: none; }
.itv-tourne svg { animation: itv-tour .9s linear infinite; }
@media (max-width: 719px) {
  .itv-bandeau-lien, .itv-bandeau-x { width: 40px; height: 40px; }
  .itv-bandeau-reprise { height: 40px; }
  .itv-bandeau-verif, .itv-bandeau-err { flex-wrap: wrap; }
  .itv-bandeau-verif .itv-bandeau-txt, .itv-bandeau-err .itv-bandeau-txt { flex-basis: calc(100% - 90px); }
}
/* Les pièces jointes, sous la note. */
.itv-aj-pj { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.itv-aj-pj-liste { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.itv-aj-pj-liste:empty { display: none; }
.itv-aj-pj-ligne { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; border: 1px solid var(--neutral-800); border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.itv-aj-pj-ligne > svg { width: 14px; height: 14px; color: var(--muted); flex: none; }
.itv-aj-pj-nom { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.itv-aj-pj-poids { color: var(--muted); font-size: 12px; white-space: nowrap; }
.itv-aj-pj-x { flex: none; width: 28px; height: 28px; border-color: var(--neutral-800); }
.itv-aj-pj-x svg { width: 13px; height: 13px; }
.itv-aj-pj-x:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
/* Les deux interrupteurs « appeler avant » / « confirmée » : bien en évidence. */
.itv-aj-options { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.itv-aj-switch {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 14px 9px 9px; border-radius: 12px; border: 1px solid var(--neutral-800);
  color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.itv-aj-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.itv-aj-track { position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--neutral-700); flex: none; transition: background .15s; }
.itv-aj-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--blanc); transition: transform .15s; }
.itv-aj-switch .ic-btn { width: 16px; height: 16px; color: var(--muted); }
.itv-aj-switch:hover { border-color: var(--neutral-700); }
.itv-aj-switch:has(input:checked) { border-color: var(--accent-700); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.itv-aj-switch:has(input:checked) .itv-aj-track { background: var(--accent); }
.itv-aj-switch:has(input:checked) .itv-aj-track::after { transform: translateX(18px); }
.itv-aj-switch:has(input:checked) .ic-btn { color: var(--accent-300); }
.itv-aj-switch:has(input:disabled) { cursor: default; opacity: .75; }
.itv-ajout .itv-aj-message { width: 100%; margin-top: 10px; }
.itv-aj-switch:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
/* ===== Étape A : « Créer un bon » — le porteur, la liste VF =====
   Couleurs : seulement les variables de :root. */
.itv-ajout .plf-radio[hidden] { display: none; }
/* Page 2 « Bon » : « Tient le bon », un rond par technicien coché (retouche du 22/09). */
.itv-aj-porteurs { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.itv-aj-porteurs[hidden] { display: none; }
.itv-aj-porteurs .plf-radios { margin-bottom: 0; }
.itv-aj-sous { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.itv-aj-switch:has(input:disabled):not(:has(input:checked)) .itv-aj-track { opacity: .5; }
.itv-aj-app { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.itv-aj-app[hidden] { display: none; }
.itv-aj-app-tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.itv-aj-app-n { margin-right: auto; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.itv-aj-app-gr { border: 1px solid var(--neutral-800); border-radius: 10px; min-width: 0; }
.itv-aj-app-gtete {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px;
  background: transparent; border: 0; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer;
}
.itv-aj-app-gtete .ic-btn { width: 14px; height: 14px; color: var(--muted); flex: none; transition: transform .15s; }
.itv-aj-app-gr[data-ouvert="1"] .itv-aj-app-gtete .ic-btn { transform: rotate(90deg); }
.itv-aj-app-gtete .tcount { margin-left: auto; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
/* La case d'une famille : à gauche du titre, une cible à part (la toucher ne replie rien). */
.itv-aj-app-gl { display: flex; align-items: stretch; min-width: 0; }
.itv-aj-app-gl .itv-aj-app-gtete { flex: 1 1 auto; width: auto; min-width: 0; padding-left: 2px; }
.itv-aj-app-gcase { flex: none; display: flex; align-items: center; justify-content: center; width: 40px; min-height: 40px; cursor: pointer; }
.itv-aj-app-gcase input { margin: 0; width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.itv-aj-app-liste { display: flex; flex-direction: column; border-top: 1px solid var(--neutral-800); }
.itv-aj-app-liste[hidden] { display: none; }
.itv-aj-app-l { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; font-size: 13.5px; cursor: pointer; min-width: 0; }
.itv-aj-app-l input { flex: none; margin: 3px 0 0; accent-color: var(--accent); }
.itv-aj-app-l > span { min-width: 0; overflow-wrap: anywhere; }
.itv-aj-app-l .sub { display: block; font-size: 12px; }
@media (max-width: 719px) {
  .itv-ajout .itv-aj-porteur { min-height: 42px; }
  .itv-aj-app-gtete { min-height: 46px; }
  .itv-aj-app-gcase { width: 46px; min-height: 46px; }
  .itv-aj-app-gcase input { width: 20px; height: 20px; }
  .itv-aj-app-l { min-height: 44px; align-items: center; }
  .itv-aj-app-l input { margin: 0; width: 20px; height: 20px; }
}
/* « À vérifier dans Google. » : orange (le robot a pu écrire avant de tomber), jamais rouge. */
.itv-bandeau-verif { color: var(--etat-attente); border-color: color-mix(in srgb, var(--etat-attente) 45%, transparent); background: color-mix(in srgb, var(--etat-attente) 12%, transparent); }
/* « Annuler cette intervention ? » Oui / Non, dans la ligne. */
.itv-aj-ann-conf { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--text); }
.itv-aj-ann-conf .btn { padding: 6px 12px; }
@media (max-width: 719px) { .itv-aj-ann-conf .btn { min-height: 40px; } }
.itv-aj-sugg {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5;
  background: var(--surface); border: 1px solid var(--neutral-800); border-radius: var(--radius);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--noir) 45%, transparent); max-height: 240px; overflow: auto;
}
.itv-aj-sugg-item {
  display: block; width: 100%; text-align: left; font: inherit; color: var(--text);
  background: transparent; border: 0; border-bottom: 1px solid var(--neutral-800);
  padding: 9px 12px; cursor: pointer;
}
.itv-aj-sugg-item:last-child { border-bottom: 0; }
.itv-aj-sugg-item:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.itv-aj-sugg-item .sub { font-size: 12px; }
@media (max-width: 719px) {
  .itv-chip { min-height: 40px; }
  .itv-chips { width: 100%; }
  .itv-droite { width: 100%; margin-left: 0; }
  .itv-maj { display: none; }
  .itv-maj-lecture { display: inline; }
  .itv-jours { flex: 1; }
  .itv-jours .input { width: 100%; min-height: 44px; }
}

/* L'etat. 🔴 Les couleurs viennent des variables --etat-* : jamais de couleur
   ecrite en dur ici (regle maison du code couleur des etats). */
.itv-etat {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.itv-etat-traiter  { color: var(--etat-traiter);  background: color-mix(in srgb, var(--etat-traiter) 12%, transparent); }
.itv-etat-attente  { color: var(--etat-attente);  background: color-mix(in srgb, var(--etat-attente) 12%, transparent); }
.itv-etat-terminee { color: var(--etat-terminee); background: color-mix(in srgb, var(--etat-terminee) 12%, transparent); }
/* ÉTAPE B (2026-09-24) : un compte rendu SIGNÉ qui attend sur le téléphone
   (« À envoyer », ORANGE comme une attente) et un compte rendu PARTI
   (« Envoyé », VERT comme un état terminé). Les deux reprennent les
   variables du code couleur de la maison : jamais une couleur en dur. */
.itv-etat-envoyer  { color: var(--etat-attente);  background: color-mix(in srgb, var(--etat-attente) 12%, transparent); }
.itv-etat-envoye   { color: var(--etat-terminee); background: color-mix(in srgb, var(--etat-terminee) 12%, transparent); }
/* 2026-10-24 : un compte rendu RENVOYÉ par le bureau au technicien (ROUGE,
   « rappel arrivé »). */
.itv-etat-du       { color: var(--etat-du);       background: color-mix(in srgb, var(--etat-du) 12%, transparent); }
.itv-etat-archivee { color: var(--etat-archivee); background: color-mix(in srgb, var(--etat-archivee) 12%, transparent); }
/* Plusieurs jours (2026-10-26) : la pastille « 3 j » (neutre) et le signe « À vérifier » (orange : en attente). */
.itv-jours, .itv-averif { display: inline-block; font-size: 11px; font-weight: 600; line-height: 1.5; padding: 0 7px; border-radius: 999px; white-space: nowrap; vertical-align: 1px; }
.itv-jours { color: var(--text); background: var(--surface-2); }
.itv-averif { color: var(--etat-attente); background: color-mix(in srgb, var(--etat-attente) 12%, transparent); }
/* « Décaler » étape 4 (16/11) : « Décalé » (gris, un bouton : l'appui ouvre le détail au téléphone), le détail,
   les gestes du filet (icône + un mot) et leur mot de fin. */
.itv-decal { display: inline-block; font: inherit; font-size: 11px; font-weight: 600; line-height: 1.5; padding: 0 7px; border: 0; border-radius: 999px; white-space: nowrap; vertical-align: 1px; cursor: pointer; color: var(--etat-archivee); background: color-mix(in srgb, var(--etat-archivee) 12%, transparent); }
.itv-decal[aria-expanded="true"] { outline: 1px solid color-mix(in srgb, var(--etat-archivee) 50%, transparent); }
.itv-decal-detail { margin-top: 4px; font-size: 12px; line-height: 1.45; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.itv-filet { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 9px; font-size: 13px; white-space: nowrap; flex: none; }
.itv-filet svg { width: 16px; height: 16px; }
.itv-filet-msg { display: block; margin-top: 4px; font-size: 12px; overflow-wrap: anywhere; }
.itv-filet-msg.ok { color: var(--etat-terminee); }
.itv-filet-msg.err { color: var(--etat-du); }
@media (max-width: 719px) {
  .itv-decal { padding: 3px 10px; }
  .itv-filet { height: 40px; }
}
.itv-aj-jour { align-items: center; }
.itv-act.itv-aj-jour-moins { flex: none; width: 40px; height: 40px; }

/* Les boutons d'action (confirmer / annuler) collés à l'état. */
.itv-acts { display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: middle; }
.itv-act {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; border-radius: 8px;
  border: 1px solid var(--neutral-800); background: transparent; color: var(--muted);
  cursor: pointer;
}
.itv-act:hover:not(:disabled) { color: var(--text); border-color: var(--muted); }
.itv-act:disabled { opacity: .45; cursor: default; }

/* 🔴 Une icone de ce projet n'a AUCUNE taille a elle : sans ces deux regles,
   elle remplit toute la colonne. Bug reel du 25/08, attrape par le banc (C10). */
.itv-act svg { width: 16px; height: 16px; }
.itv-tel svg { width: 14px; height: 14px; vertical-align: -2px; }
.itv-tel { color: var(--muted); margin-left: 4px; }

/* Le pied d'une carte (telephone) : l'etat a gauche, les boutons a droite. */
.itv-card-pied { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.itv-card-pied .itv-acts { margin-left: 0; }

/* ===== Planifier une intervention (plan 2026-08-25 / 2B, tache 5) ===== */
.plf-tete { margin-bottom: 18px; }
.plf-bloc { margin-bottom: 18px; }
.plf-lib {
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.plf-radios { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 10px; }
.plf-radio { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

/* Les 3 champs d'horaire : ils s'empilent tout seuls sur telephone (wrap), et
   les heures restent etroites pour tenir a cote de la date. */
.plf-ligne { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.plf-ligne .input { flex: 1 1 150px; min-width: 0; }
.plf-h { flex: 0 1 110px; }

.plf-tech { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; }
.plf-porteur { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; }

/* Le compteur « 10 / 11 » : c'est LE chiffre de l'ecran, il se voit. */
.plf-compte { font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: 0; text-transform: none; }
.plf-alerte {
  color: var(--etat-attente); font-size: 13px; margin-bottom: 10px;
  background: color-mix(in srgb, var(--etat-attente) 10%, transparent);
  border-radius: 8px; padding: 8px 10px;
}
.plf-eqs { display: grid; gap: 2px; }
.plf-eq { display: flex; align-items: center; gap: 8px; padding: 5px 0; flex-wrap: wrap; }
.plf-eq .sub { font-size: 12.5px; }
.plf-age { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.plf-vieux { display: inline-flex; color: var(--danger); }
.plf-date { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.plf-date-vieux { color: var(--danger); font-weight: 600; }

/* Les notes : en LECTURE. `white-space: pre-wrap` garde les retours a la ligne
   ecrits dans Odoo, sans jamais interpreter le texte. */
.plf-note {
  white-space: pre-wrap; background: var(--surface); border-radius: 8px;
  padding: 10px 12px; font-size: 13.5px;
}
.plf-msg-txt { width: 100%; resize: vertical; }

.plf-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

/* Reglages > Interventions : la liste des agendas, EN LECTURE (Odoo est le patron). */
.rg-itv-ags { display: grid; gap: 6px; margin-bottom: 10px; }
.rg-itv-ag { display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.rg-itv-qui { min-width: 160px; font-weight: 600; }
.rg-itv-ag-val { color: var(--muted); font-size: 12.5px; word-break: break-all; }
.rg-itv-vide { color: var(--etat-attente); font-weight: 600; }

/* Le bouton « Reessayer » : le rendez-vous n'est pas dans l'agenda. Il se voit,
   sans hurler — c'est une chose a rattraper, pas une panne. */
.itv-act-alerte { color: var(--etat-attente); border-color: color-mix(in srgb, var(--etat-attente) 45%, transparent); }

/* ===== Le choix de l endroit dans la planification (planifier.js) =====
   Une liste native : sur telephone c est le selecteur du systeme, lisible et
   deja connu. Un client a 77 sites — d ou la largeur libre et le texte coupe
   proprement plutot qu une ligne qui deborde. */
.plf-endroit { display: block; width: 100%; max-width: 420px; margin: 6px 0 2px;
  font-size: 15px; }
@media (max-width: 719px) { .plf-endroit { font-size: 16px; padding: 10px 12px; } }

/* ===== Le bouton « Planifier » sur un devis signé (clients.js) =====
   Une colonne étroite, collée à droite du tableau. Sur téléphone, le bouton
   passe dans la carte : c'est là que Simon le verra. */
.cl-planif-col { width: 1%; white-space: nowrap; text-align: right; }
.cl-planif { padding: 5px 10px; font-size: 13px; }
.fiche-carte .cl-planif { margin-left: 8px; }
@media (max-width: 719px) { .cl-planif { padding: 8px 14px; font-size: 14px; } }

/* ===== Le panneau « Prévenir le client » (interventions.js) =====
   Le texte de l'email est montré tel qu'il partira. 🔴 `pre` garde les retours
   à la ligne mais NE COUPE PAS les longues lignes : sans `pre-wrap`, l'écran
   déborde sur téléphone (le banc C11 le rougit). */
.itv-mail { margin: 12px 0 16px; padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--neutral-800); border-radius: 12px; }
.itv-mail-tete { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px; }
.itv-mail-qui { font-size: 15px; margin-bottom: 10px; overflow-wrap: anywhere; }
.itv-mail-texte { margin: 0 0 10px; padding: 12px 14px; border-radius: 8px;
  background: var(--bg); color: var(--text);
  font: 400 14px/1.55 Inter, system-ui, sans-serif;
  white-space: pre-wrap; overflow-wrap: anywhere; }
.itv-mail-deja { margin: 0 0 10px; padding-left: 18px; font-size: 13px; color: var(--muted); }
.itv-mail #itv-mail-envoi { width: 100%; }
@media (min-width: 720px) { .itv-mail #itv-mail-envoi { width: auto; } }

.itv-act-alerte:hover:not(:disabled) { color: var(--etat-attente); border-color: var(--etat-attente); }

/* La pastille « planifiee le … » de « A visiter ». Discrete : elle informe,
   elle ne crie pas — la ligne reste dans la liste tant que la visite n'est pas
   SIGNEE (plan 2026-08-25, tache 6). */
.av-planif {
  display: inline-block; margin-top: 3px; padding: 1px 7px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  color: var(--etat-traiter);
  background: color-mix(in srgb, var(--etat-traiter) 12%, transparent);
}
.rg-lien a, .rg-card-lien { color: var(--accent-300); text-decoration: none; word-break: break-all; }
.rg-lien a:hover, .rg-card-lien:hover { text-decoration: underline; }
.rg-toggle {
  font: inherit; cursor: pointer; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--neutral-800); background: var(--surface-2); color: var(--text);
  display: inline-flex; align-items: center; gap: 6px;
}
.rg-toggle .ic-btn { width: 15px; height: 15px; }
.rg-toggle.on { border-color: var(--ok); color: var(--ok); }
.rg-toggle.off { color: var(--muted); }
.rg-del {
  font: inherit; cursor: pointer; background: transparent; border: 0; color: var(--blanc);
  padding: 4px 8px; border-radius: 8px; display: inline-flex; align-items: center;
}
.rg-del svg { display: block; }
.rg-del:hover { background: color-mix(in srgb, var(--danger) 26%, transparent); color: var(--blanc); }
.rg-edit {
  font: inherit; cursor: pointer; background: transparent; border: 0; color: var(--text);
  padding: 4px 8px; border-radius: 8px; opacity: .85;
  display: inline-flex; align-items: center; justify-content: center;
}
.rg-edit .ic-btn { width: 18px; height: 18px; display: block; }
.rg-edit:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); opacity: 1; }
.rg-acts { display: inline-flex; gap: 4px; white-space: nowrap; }
/* Icône générique dans un bouton */
.ic-btn { width: 1.05em; height: 1.05em; vertical-align: -0.15em; }
.rgg-link { display: inline-flex; align-items: center; }
.rgg-link .ic-btn { width: 17px; height: 17px; }
.rg-th { cursor: pointer; user-select: none; white-space: nowrap; }
.rg-th:hover { color: var(--text); }
.rggp-th, .rgga-th { cursor: pointer; user-select: none; white-space: nowrap; }
.rggp-th:hover, .rgga-th:hover { color: var(--text); }
.rgg-new { color: var(--accent-300); }
.rgg-nowrap { white-space: nowrap; }
.dash-star { color: var(--etoile); }
.dash-nb { color: var(--muted); font-size: 0.85em; font-weight: 400; }
/* Petite icône alignée dans le texte (ex. « personne » du nombre d'avis) */
.ic-inline { width: 1em; height: 1em; vertical-align: -0.15em; }
/* Médaille du classement (top 3) */
.rank-medal { width: 22px; height: 22px; vertical-align: middle; }
.r-note { white-space: nowrap; }
/* Étoiles à remplissage fractionnaire (jaune sur gris) */
.stars { position: relative; display: inline-block; white-space: nowrap; line-height: 1; letter-spacing: 1px; vertical-align: middle; }
.stars-bg { color: var(--muted); opacity: .5; }
.stars-fg { position: absolute; left: 0; top: 0; overflow: hidden; color: var(--etoile); }
.rgg-link { text-decoration: none; font-size: 13px; opacity: .8; }
.rgg-link:hover { opacity: 1; }
.rgg-etat { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid transparent; white-space: nowrap; }
.rgg-etat.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.rgg-etat.warn { color: var(--ambre-doux); border-color: color-mix(in srgb, var(--ambre-doux) 45%, transparent); background: color-mix(in srgb, var(--ambre-doux) 12%, transparent); }
.rgg-etat.wait { color: var(--muted); border-color: var(--neutral-800); background: var(--surface-2); }
.rgg-assign { max-width: 190px; padding: 7px 10px; }
.avis-table td .rgg-assign { min-width: 150px; }
.rgg-assign-lbl { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.rgg-assign-lbl .rgg-assign { max-width: 100%; }
/* Carte de position locale (Leaflet) */
.geo-layout { display: flex; flex-direction: column; gap: 14px; }
.geo-side { display: flex; flex-direction: column; gap: 12px; }
.geo-main { min-width: 0; }
.geo-cout { color: var(--muted); }
.geo-map { height: 340px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.geo-pop { font-size: 13px; }
.geo-pop-t { font-weight: 600; margin-bottom: 3px; }
.geo-pop-1er { color: var(--carte-texte); }
@media (min-width: 860px) {
  .geo-layout { display: grid; grid-template-columns: 330px 1fr; align-items: start; gap: 22px; }
  .geo-map { height: 600px; }
}
.geo-stats { display: flex; flex-wrap: wrap; gap: 18px; align-items: baseline; margin: 4px 0 8px; }
.geo-stat { display: flex; flex-direction: column; }
.geo-stat b { font-size: 20px; }
.geo-stat span { font-size: 12px; color: var(--muted); }
.geo-when { color: var(--muted); font-size: 12px; margin-left: auto; }
.geo-legende { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.geo-legende .gl { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.gl-vert { background: var(--geo-vert); } .gl-jaune { background: var(--ambre-vif); } .gl-orange { background: var(--geo-orange); } .gl-rouge { background: var(--danger); }
.geo-pin { background: transparent; border: 0; }
.geo-disc { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; color: var(--blanc); font-size: 12px; font-weight: 600; border: 2px solid color-mix(in srgb, var(--blanc) 60%, transparent); box-shadow: 0 1px 3px color-mix(in srgb, var(--noir) 40%, transparent); }
.geo-disc.vert { background: var(--geo-vert); } .geo-disc.jaune { background: var(--ambre-vif); } .geo-disc.orange { background: var(--geo-orange); } .geo-disc.rouge { background: var(--danger); }
.geo-kw { margin-top: 22px; border-top: 1px solid var(--neutral-800); padding-top: 16px; }
.geo-kw-ta { resize: vertical; min-height: 90px; font-family: var(--font); line-height: 1.6; }
.geo-kw-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.geo-kw-msg { font-size: 13px; }
.geo-kw-msg.ok { color: var(--ok); } .geo-kw-msg.err { color: var(--danger); }
@media (max-width: 719px) { .geo-map { height: 340px; } .geo-when { margin-left: 0; width: 100%; } }

.rgg-banner {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  border: 1px solid var(--neutral-800); border-radius: var(--radius-lg);
  padding: 10px 14px; margin-bottom: 16px; font-size: 13px; color: var(--muted);
}
.rg-edit-row .input { width: 100%; min-width: 110px; padding: 7px 10px; }
.rg-edit-row .btn { padding: 7px 12px; }
.rg-card.editing .ff { display: flex; flex-direction: column; gap: 6px; }
.rg-card.editing .ff > span { font-size: 12px; color: var(--muted); }
.rg-edit-actions { display: flex; gap: 8px; margin-top: 4px; }
.rg-edit-actions .btn { flex: 1; }

/* Cartes (téléphone) */
.rg-card {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 14px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 10px;
}
.rg-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.rg-card-tech { font-weight: 600; }
.rg-card-page { color: var(--muted); font-size: 13px; }
.rg-card .rg-toggle { align-self: flex-start; }

@media (max-width: 719px) {
  .rg-defaut .input, .rg-defaut .btn { width: 100%; }
  .rg-form .ff, .rg-form .input, .rg-form .btn { width: 100%; }
}

/* =========================================================
   CLIENTS — l'annuaire en arbre (société mère → sites et personnes)
   ========================================================= */
/* Titre de page + bouton d'action. Sur téléphone le bouton se réduit à un « + »
   collé au titre : un bouton pleine largeur mangeait un tiers de l'écran. */
.page-head {
  display: flex; flex-direction: row; align-items: center;
  justify-content: space-between; gap: 14px; margin-bottom: 18px;
}
.page-head h1 { margin: 0; }
.page-head .sub { margin: 4px 0 0; }
.page-head .btn { flex: none; }
/* Le « + » d'« Interventions » : un carré de 44 px (la taille d'un doigt), tout à droite du titre. */
.itv-plus { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; align-self: center; }
.itv-plus svg { width: 20px; height: 20px; }
.cl-nouveau-court { display: none; }

.cl-filtres { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 6px 0 16px; }
.cl-filtres .ff { display: flex; flex-direction: column; gap: 6px; }
.cl-filtres .ff > span { font-size: 12px; color: var(--muted); }
.cl-filtres .cl-ff-recherche { flex: 1; min-width: 220px; }
.cl-filtres .input { min-width: 150px; }

/* La recherche de l'onglet « Sites » d'un client.
   Classe à part et PAS `.cl-filtres` : sur téléphone, `.cl-filtres` passe en
   DEUX colonnes (voir plus bas) pour mettre « Rechercher » et « Afficher »
   côte à côte. Ici il n'y a qu'un seul champ : il se retrouverait à moitié
   largeur avec du vide à côté. */
.cl-sites-filtres { margin: 6px 0 16px; }
.cl-sites-filtres .ff { display: flex; flex-direction: column; gap: 6px; }
.cl-sites-filtres .ff > span { font-size: 12px; color: var(--muted); }
.cl-sites-filtres .input { width: 100%; max-width: 420px; }

.tree {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.tree-head {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  border-bottom: 1px solid var(--neutral-800);
  font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted);
}
.tr {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  border-bottom: 1px solid var(--neutral-800);
}
.tr:last-child { border-bottom: 0; }
/* Pas de flèche ▸ / ▾ : on gagne de la place, et les pastilles disent déjà
   s'il y a quelque chose à ouvrir. La ligne entière se clique. */
.tr .t-ico { width: 24px; flex: none; text-align: center; font-size: 16px; color: var(--muted); }
/* Les dessins des lignes : société en violet, site en bleu, personne en vert —
   on reconnaît la nature de la ligne sans lire. */
.tr .t-ico .ic-inline { width: 18px; height: 18px; vertical-align: -4px; }
.tr.mother .t-ico { color: var(--accent-300); }
.tr.kid .t-ico { color: var(--muted); }
/* Dans les bandeaux et les panneaux, le dessin se cale sur le texte */
.banner-info .ic-inline, .banner-warn .ic-inline, .banner-ok .ic-inline {
  width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px;
}
.banner-warn .ic-inline { color: var(--ambre); }
.banner-ok .ic-inline { color: var(--ok); }
.tr .t-main { flex: 1; min-width: 0; }
.tr .t-name { font-weight: 600; }
.tr .t-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.tr .t-right { flex: none; display: flex; align-items: center; gap: 10px; }
.tr .t-num { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* La société mère se clique pour ouvrir / fermer sa branche */
.tr.mother { cursor: pointer; }
.tr.mother:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.tr.mother:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tr.mother.ouvert { background: color-mix(in srgb, var(--accent) 7%, transparent); }

/* Les enfants sont décalés vers la droite et sur un fond légèrement plus sombre */
.tr.kid { padding-left: 52px; background: color-mix(in srgb, var(--noir) 12%, var(--surface)); }
.tr.kid .t-name { font-weight: 400; }
.tr.kid.chargement .t-meta { font-style: italic; }

/* Un bouton « Voir » sur chaque ligne : c'est LUI, et lui seul, qui ouvre la fiche.
   Le reste de la ligne d'une société ouvre ou ferme sa branche. */
.btn-voir {
  flex: none; align-self: center; padding: 6px 15px; font-size: 13px;
  border-color: var(--neutral-800); color: var(--muted);
}
.btn-voir:hover { color: var(--accent-300); border-color: var(--accent-700); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.btn-voir:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Les compteurs sont À CÔTÉ du nom, sur la même ligne (ils passent dessous
   seulement si le nom est trop long). L'adresse reste en dessous. */
.t-titre { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
/* Elles se replient : depuis qu'il y a jusqu'à 5 pastilles (sites, personnes,
   appareils, pas rangés, notes), une seule ligne débordait à 375 px — et le
   défilement horizontal est interdit dans ce projet. */
.t-pastilles { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }

/* ---- La fiche d'un client ---- */
.fiche-head { align-items: flex-start; }
.fiche-head .btn-retour { margin-bottom: 8px; padding: 6px 12px; font-size: 13px; }
/* La tâche : « Bon XXXX » (tâche d'un compte rendu renvoyé) et « Modifier », côte à côte. */
.np-o-actes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; flex-shrink: 0; }
.np-o-actes .btn { white-space: nowrap; }
.fiche-2col { display: flex; flex-direction: column; gap: 16px; }
.fiche-chiffres { display: flex; flex-direction: column; gap: 2px; }
.fc-ligne { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--neutral-800); font-size: 14px; }
.fc-ligne:last-child { border-bottom: 0; }
.fc-ligne span { color: var(--muted); }
.fc-ligne b { font-variant-numeric: tabular-nums; }
.fc-ligne.fc-fort b { font-size: 17px; color: var(--accent-300); }
.fc-ligne.fc-du b { color: var(--ambre); }
.banner-info, .banner-warn, .banner-ok {
  margin: 14px 0; padding: 12px 15px; font-size: 13.5px; line-height: 1.5;
  border-radius: var(--radius-lg); border: 1px solid var(--neutral-800);
}
.banner-info { color: var(--muted); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.banner-warn {
  color: var(--text); background: color-mix(in srgb, var(--ambre) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--ambre) 40%, transparent);
}
.banner-ok {
  color: var(--text); background: color-mix(in srgb, var(--ok) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--ok) 38%, transparent);
}

/* ---- Écran « Nouveau client » ---- */
/* Le robot a refusé un SIREN déjà connu : le bouton vers la fiche existante, sur sa ligne */
.rg-msg .nc-ouvrir-doublon { display: block; margin-top: 8px; }
.nc-recherche { margin-bottom: 4px; }
.nc-recherche .ff { display: block; }
.nc-recherche .ff > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
/* La recherche part toute seule : pas de bouton. */
.nc-recherche .input { font-size: 16px; padding: 12px 14px; }

/* Le compteur d'un onglet : une pastille ronde plutôt qu'un chiffre collé */
.tcount {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px;
  font-size: 11px; font-weight: 600; border-radius: 999px; vertical-align: middle;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--neutral-800);
}
.tab.active .tcount { background: var(--accent-900); color: var(--accent-300); border-color: var(--accent-700); }

/* ===== Les états en pastilles rondes =====
   Une seule ligne d'onglets suffit : les états, eux, sont des pastilles.
   Le chiffre reprend la couleur de son état (voir le code couleur, CLAUDE.md). */
.st-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 16px; }
.st-chip {
  font: inherit; font-size: 13px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--neutral-800); background: transparent; color: var(--muted);
  cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
}
.st-chip:hover { color: var(--text); }
.st-chip.active { background: var(--accent-900); color: var(--accent-300); border-color: var(--accent-700); }
.st-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.st-chip .n { font-size: 11px; font-weight: 600; opacity: .85; }
.st-chip[data-onglet="a_traiter"] .n { color: var(--etat-traiter); }
.st-chip[data-onglet="en_attente"] .n { color: var(--etat-attente); }
.st-chip[data-onglet="terminee"] .n { color: var(--etat-terminee); }
.st-chip[data-onglet="sans_suite"] .n { color: var(--etat-archivee); }
/* Téléphone : une seule ligne qui glisse sur le côté (jamais un mot coupé en deux).
   `min-height: 44px` = la taille d'un doigt (règle du projet) ; sans elle les
   pastilles ne faisaient que 41 px. */
@media (max-width: 719px) {
  .st-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px; margin: 2px -4px 16px; padding: 0 4px 2px; }
  .st-chips::-webkit-scrollbar { display: none; }
  .st-chip { flex: none; white-space: nowrap; font-size: 12.5px; padding: 10px 12px; gap: 6px; min-height: 44px; }
  /* « Mes notes » : recherche + tri plus discrets (on masque les libellés au-dessus,
     le champ et le tri restent — ça gagne un étage chacun). */
  .nt-filtres .ff > span, .nt-tribar .ff > span { display: none; }
  .nt-filtres { margin-bottom: 8px; }
  .nt-tribar { margin-bottom: 10px; }
}

/* Barre de recherche Pappers, avec la jauge de crédits */
.nc-pappers { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.nc-pappers .ff { display: block; flex: 1; min-width: 240px; }
.nc-pappers .ff > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.nc-pappers .input { font-size: 16px; padding: 12px 14px; }
.nc-pappers .btn { flex: none; padding: 12px 20px; }
.nc-credit { flex: 1 1 100%; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.nc-credit-bar { flex: 1; max-width: 220px; height: 4px; border-radius: 999px; background: var(--neutral-800); overflow: hidden; }
.nc-credit-bar span { display: block; height: 100%; background: var(--accent); }

/* « Aucun doublon » : une ligne discrète, pas un gros bandeau */
.nc-doublon-ok { color: var(--ok); font-size: 13px; margin: -6px 0 4px; display: flex; align-items: center; gap: 6px; }
.nc-doublon-ok .ic-inline { width: 15px; height: 15px; }

/* Les liens d'ajout en bas de formulaire */
.nc-liens { display: flex; gap: 20px; flex-wrap: wrap; margin: 4px 0 18px; }
.nc-lien {
  color: var(--muted); font-size: 13.5px; text-decoration: none; background: transparent;
  border: 0; font: inherit; cursor: pointer; padding: 0;
}
.nc-lien:hover { color: var(--accent-300); text-decoration: underline; }
.nc-lien:disabled { color: var(--neutral-700); cursor: not-allowed; text-decoration: none; }
.nc-form { margin-top: 14px; }
.nc-grille { gap: 0 40px; }
.nc-grille .field { margin-bottom: 14px; }
.nc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
/* ---- Supprimer ---- */
.acts { display: inline-flex; gap: 6px; flex: none; align-items: center; }
.btn-danger {
  border-color: color-mix(in srgb, var(--danger) 60%, transparent); color: var(--danger);
  display: inline-flex; align-items: center; gap: 7px;
}
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 16%, transparent); }
.btn-poubelle { padding: 6px 10px; color: var(--muted); border-color: var(--neutral-800); }
.btn-poubelle:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.btn-poubelle .ic-inline { width: 16px; height: 16px; vertical-align: -3px; }

/* La fenêtre de confirmation : on ne supprime jamais sans la voir */
.modal-fond {
  position: fixed; inset: 0; z-index: 30; background: color-mix(in srgb, var(--noir) 55%, transparent);
  display: grid; place-items: center; padding: 20px;
}
.modal {
  width: min(560px, 100%); max-height: 90vh; overflow: auto;
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: 0 18px 50px color-mix(in srgb, var(--noir) 60%, transparent), 0 0 0 1px var(--neutral-800); padding: 22px;
}
.modal h3 { margin: 0 0 14px; font-size: 18px; font-weight: 600; }
.modal .recap {
  background: var(--surface-2); border: 1px solid var(--neutral-800);
  border-radius: var(--radius); padding: 10px 14px; font-size: 13.5px;
}
.modal .recap div { display: flex; justify-content: space-between; gap: 14px; padding: 3px 0; }
.modal .recap .k { color: var(--muted); }
.modal .m-acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
@media (max-width: 719px) {
  .modal .m-acts { flex-direction: column-reverse; }
  .modal .m-acts .btn { width: 100%; padding: 13px 16px; }
}

/* ---- La fenêtre « Reconnexion » (site/session.js) ----
   🔴 SON PROPRE ÉTAGE. Les fenêtres de l'appli sont à `z-index: 30` et la
   visionneuse de photos à 40. Celle-ci doit passer AU-DESSUS de tout : à 30,
   elle s'ouvrirait DERRIÈRE le formulaire en cours (« Nouveau client »), donc
   invisible — et l'appli aurait l'air gelée. */
.modal-fond.rec-fond { z-index: 50; }
.modal.rec-modal { width: min(420px, 100%); }
.rec-modal h3 { display: flex; align-items: center; gap: 8px; }
.rec-modal h3 .ic-inline { width: 18px; height: 18px; flex: 0 0 auto; }
.rec-modal .rec-info { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.rec-modal .field:last-of-type { margin-bottom: 4px; }

/* ---- Le bandeau « Session fermée » (étape 2 : prévenir AVANT le clic) ----
   🔴 EN BAS. En haut, il recouvrirait le bouton du menu (téléphone, z-index 12)
   et les titres collants. En bas il ne cache aucune navigation, se voit sur
   toute la largeur, et le pouce l'atteint. Étage 45 : au-dessus de tout, sauf
   de la fenêtre de reconnexion (50) qu'il sert justement à ouvrir. */
.rec-bandeau {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  color: var(--text);
  background: color-mix(in srgb, var(--danger) 22%, var(--surface));
  border-top: 1px solid color-mix(in srgb, var(--danger) 55%, transparent);
  box-shadow: 0 -8px 26px color-mix(in srgb, var(--noir) 45%, transparent);
  font-size: 14px; font-weight: 600;
}
.rec-bandeau .ic-inline { width: 17px; height: 17px; color: var(--danger); vertical-align: -3px; }
.rec-bandeau-txt { display: inline-flex; align-items: center; gap: 8px; }
.rec-bandeau-btn {
  background: var(--danger); border-color: var(--danger); color: var(--encre);
  min-height: 40px; padding: 8px 18px; font-weight: 600;
}
@media (max-width: 719px) {
  /* Téléphone : le bouton prend toute la largeur — gros, impossible à rater. */
  .rec-bandeau { gap: 10px; }
  .rec-bandeau-btn { width: 100%; min-height: 46px; }
}

/* Le bouton d'action d'un onglet (ajouter un site, une personne…) */
.pan-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
@media (max-width: 719px) { .pan-actions .btn { width: 100%; padding: 13px 16px; } }
.nc-note { margin: 12px 0 0; }
@media (max-width: 719px) {
  .nc-actions .btn { width: 100%; padding: 13px 16px; }

  /* TÉLÉPHONE : tout ce qui se clique fait au moins 44 px de haut — la taille
     d'un doigt. Mesuré : la pagination faisait 32 px, le retour 34, les onglets 43. */
  .content .btn,
  .content .tab,
  .content .input,
  .content select.input,
  .content .odoo-lien { min-height: 44px; }
  .content .odoo-lien { min-width: 44px; justify-content: center; }
  .content .tab { padding-top: 11px; padding-bottom: 11px; }
  .pagin-size .input { padding: 8px 10px; }
  .btn-retour { padding: 10px 14px; }
}
/* Pastilles d'état (mêmes couleurs partout : tableaux, cartes, ronds) */
.badge.b-traiter { color: var(--etat-traiter); background: color-mix(in srgb, var(--etat-traiter) 14%, transparent); border-color: color-mix(in srgb, var(--etat-traiter) 45%, transparent); }
.badge.b-attente { color: var(--etat-attente); background: color-mix(in srgb, var(--etat-attente) 14%, transparent); border-color: color-mix(in srgb, var(--etat-attente) 45%, transparent); }
.badge.b-du { color: var(--etat-du); background: color-mix(in srgb, var(--etat-du) 14%, transparent); border-color: color-mix(in srgb, var(--etat-du) 45%, transparent); }
.badge.b-ok { color: var(--etat-terminee); background: color-mix(in srgb, var(--etat-terminee) 14%, transparent); border-color: color-mix(in srgb, var(--etat-terminee) 45%, transparent); }
.badge.b-neutre { color: var(--etat-archivee); background: color-mix(in srgb, var(--etat-archivee) 12%, transparent); border-color: color-mix(in srgb, var(--etat-archivee) 40%, transparent); }

/* Devis et factures : tableau sur ordinateur, cartes sur téléphone (recette « Avis clients ») */
.fiche-cartes { display: none; }
.fiche-carte { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 13px 15px; margin-bottom: 10px; }
.fc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fc-bas { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.fc-montant { margin-top: 6px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fc-liens { margin-top: 10px; }

/* Le lien qui ouvre Odoo : le logo dans un cadre violet + la flèche « ça part ailleurs ».
   Violet officiel d'Odoo (#875A7B) et gris du logo (#8F8F8F) : ce sont ses couleurs,
   pas celles du thème — c'est justement ce qui le rend reconnaissable au premier coup d'œil. */
.odoo-lien {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 8px; border: 1.5px solid #875A7B; border-radius: 8px;
  background: transparent; text-decoration: none; line-height: 0;
  vertical-align: middle; flex: 0 0 auto;
  transition: background .15s ease, border-color .15s ease;
}
.odoo-lien:hover, .odoo-lien:focus-visible { background: color-mix(in srgb, #875A7B 18%, transparent); }
.odoo-mark { height: 12px; width: auto; display: block; }
.odoo-fleche {
  width: 12px; height: 12px; display: block; fill: none;
  stroke: #875A7B; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}
/* Le nom du client et son lien Odoo restent côte à côte. */
.fiche-titre { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* Colonne « Odoo » des tableaux : juste assez large pour le lien. */
th.odoo-col, td.odoo-col { width: 1%; white-space: nowrap; }
@media (max-width: 719px) {
  .fiche-cartes { display: block; }
  .avis-table-wrap { display: none; }
  .fiche-head { flex-direction: row; align-items: flex-start; }
}
@media (min-width: 860px) {
  .fiche-2col { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
}

/* ---------- LE CŒUR GÉO'DAE (2026-09-15 ; les 4 états le 2026-10-20) ----------
   🔴 ICI, ET PAS DANS `bon.css` : l'écran du parc ne charge que ce fichier.
      Les couleurs y vivaient, et les quatre cœurs sortaient du même gris —
      personne ne l'aurait vu sans la relecture.
   Les quatre couleurs sont celles des états de l'appli, jamais en dur. */
.bon-geodae { display: inline-flex; flex: 0 0 auto; align-self: center; }
.bon-geodae[data-geodae="declare"] { color: var(--etat-terminee); }
.bon-geodae[data-geodae="non_declare"] { color: var(--etat-du); }
.bon-geodae[data-geodae="incomplet"] { color: var(--etat-attente); }
.bon-geodae[data-geodae="complet"] { color: var(--etat-archivee); }

/* ---------- L'APERÇU GÉO'DAE (Réglages → Géo'DAE, étape 2b, 2026-10-21) ----------
   Ce qui partirait vers la base nationale, champ par champ. Un champ VIDE est
   mis en évidence : c'est lui qui empêche la déclaration, et c'est tout
   l'intérêt de l'écran. Jamais de couleur en dur. */
.rg-envoi { margin: 10px 0 0; display: grid; gap: 4px; }
.rg-envoi .rg-ligne {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px; padding: 6px 0;
  border-top: 1px solid var(--neutral-800);
}
.rg-envoi dt { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.rg-envoi dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.rg-envoi .rg-cle { display: block; font-size: 11px; opacity: .65; }
.rg-envoi .rg-vide dd { color: var(--etat-attente); }
.rg-manque { color: var(--etat-attente); }
@media (max-width: 520px) {
  .rg-envoi .rg-ligne { grid-template-columns: 1fr; gap: 2px; }
}

/* Pastilles Client / Prospect */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  border: 1px solid var(--neutral-800); background: var(--surface-2); color: var(--muted);
}
.badge.b-client {
  color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent);
  border-color: color-mix(in srgb, var(--ok) 45%, transparent);
}
.badge.b-prospect { color: var(--muted); }

/* Compteurs d'une société : combien de sites (bleu) et de personnes (vert).
   Le petit dessin et le nombre sur la même ligne, bien centrés. */
/* Petites étiquettes discrètes : elles accompagnent le nom, elles ne le concurrencent pas */
.badge.b-site, .badge.b-personne {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; padding: 2px 7px; font-variant-numeric: tabular-nums;
}
.badge.b-site svg, .badge.b-personne svg { width: 9px; height: 9px; flex: none; }
.badge.b-site {
  color: var(--site); background: color-mix(in srgb, var(--site) 12%, transparent);
  border-color: color-mix(in srgb, var(--site) 45%, transparent);
}
.badge.b-personne {
  color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent);
  border-color: color-mix(in srgb, var(--ok) 45%, transparent);
}
/* Compteur d'appareils : gris neutre. Il accompagne le nom, il ne doit pas
   attirer l'œil — c'est un simple état des lieux, pas du travail à faire. */
.badge.b-equip {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; padding: 2px 7px; font-variant-numeric: tabular-nums;
  color: var(--muted); background: color-mix(in srgb, var(--muted) 12%, transparent);
  border-color: color-mix(in srgb, var(--muted) 40%, transparent);
}
.badge.b-equip svg { width: 9px; height: 9px; flex: none; }
/* La NOTE SITE (celle d'Odoo) : gris neutre, comme le compteur d'appareils.
   Elle dit « il y a quelque chose à lire ici », pas « il y a du travail » — donc
   surtout pas la couleur d'un état. Le texte est dans l'info-bulle. */
.badge.b-noteodoo {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; padding: 2px 7px;
  color: var(--muted); background: color-mix(in srgb, var(--muted) 12%, transparent);
  border-color: color-mix(in srgb, var(--muted) 40%, transparent);
}
.badge.b-noteodoo svg { width: 9px; height: 9px; flex: none; }
/* La note de la société, dans l'onglet Infos : ses sauts de ligne se voient,
   comme dans le dépliage d'« À visiter ». */
.cl-note { font-size: 13px; white-space: pre-line; overflow-wrap: anywhere; color: var(--text); }
/* « Pas encore rangé » : la couleur de « à traiter » (--etat-traiter), la même que
   le point bleu de l'écran de rangement. C'est du travail qui attend. Elle, on la
   voit — c'est tout l'intérêt. Jamais de couleur en dur ici. */
.badge.b-eqreste {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; padding: 2px 7px; font-variant-numeric: tabular-nums;
  color: var(--etat-traiter); background: color-mix(in srgb, var(--etat-traiter) 14%, transparent);
  border-color: color-mix(in srgb, var(--etat-traiter) 50%, transparent);
}
.badge.b-eqreste svg { width: 6px; height: 6px; flex: none; }

/* TÉLÉPHONE : la ligne se replie en carte — nom en haut, le reste dessous.
   Jamais de défilement horizontal (règle du projet). */
@media (max-width: 719px) {
  .tree-head { display: none; }
  /* La flèche, l'icône et le nom restent sur la MÊME ligne ; seule l'info de
     droite (ville, SIRET, pastille) passe en dessous. */
  .tr { align-items: flex-start; gap: 10px; padding: 12px 14px; flex-wrap: wrap; }
  .tr .t-ico { font-size: 17px; }
  .tr .t-main { flex: 1 1 0; min-width: 0; }
  .tr .t-right { flex: 1 1 100%; flex-wrap: wrap; gap: 8px; padding-left: 48px; }
  .tr .t-right:empty { display: none; }
  /* Le bouton « Voir » reste TOUJOURS à droite, il ne passe jamais à la ligne */
  .tr .t-main { flex: 1 1 0; min-width: 0; }
  /* 44 px de haut : la taille d'un doigt (règle du projet) */
  .btn-voir { padding: 11px 16px; align-self: flex-start; }
  .tr .t-num { white-space: normal; word-break: break-word; }
  .tr.kid { padding-left: 22px; }
  .tr.kid .t-right { padding-left: 48px; }
  .badge { font-size: 10px; padding: 2px 7px; }

  /* Rechercher et Afficher côte à côte : empilés, ils poussaient la liste trop bas */
  .cl-filtres { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  .cl-filtres .ff, .cl-filtres .input { width: 100%; min-width: 0; }
  .cl-sites-filtres .input { max-width: none; }

  /* Pagination sur DEUX lignes seulement :
       ligne 1 : « Afficher [20] par page »        « 1 – 4 sur 4 sociétés »
       ligne 2 : « ‹ Précédent   1 / 1   Suivant › »                        */
  .pagin { gap: 8px 10px; font-size: 12px; }
  .pagin-size { order: 1; }
  .pagin-total { order: 2; margin-left: auto; width: auto; font-size: 11px; white-space: nowrap; }
  .pagin-nav { order: 3; flex: 1 1 100%; gap: 8px; }
  .pagin-nav .btn { padding: 7px 11px; font-size: 12px; }

  /* Le sous-titre explicatif disparaît : sur un petit écran, la place sert aux clients. */
  .page-head { align-items: center; gap: 10px; margin-bottom: 14px; }
  .page-head .sub { display: none; }
  .cl-nouveau-long { display: none; }
  .cl-nouveau-court { display: block; font-size: 22px; line-height: 1; }
  .cl-nouveau {
    width: 44px; height: 44px; padding: 0;      /* 44 px = la taille d'un doigt */
    display: grid; place-items: center;
  }
}

@media (min-width: 860px) {
  .page-head { align-items: flex-start; gap: 20px; }
}

/* ================= Écran « Mes notes » (étape 2) =================
   Même recette que « Mes avis clients » : tableau triable + pagination sur
   ordinateur, cartes empilées sur téléphone. */
.nt-client { font-weight: 500; }
.nt-site { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.nt-txt { color: var(--muted); max-width: 420px; }
.nt-rappel { white-space: nowrap; }
/* La date de rappel arrivée (ou dépassée) : c'est ce qu'on doit voir en premier */
.nt-du { color: var(--danger); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.nt-du .ic-inline { width: 14px; height: 14px; }
.nt-carte-txt { margin-top: 8px; font-size: 14px; line-height: 1.45; }
.nt-carte-bas { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; align-items: center; }
.nt-carte-bas .ic-inline { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; }
/* Rien à afficher : une page vide, mais pas nue */
.nt-vide { display: flex; align-items: center; gap: 14px; }
.nt-vide-ic { color: var(--neutral-700); line-height: 0; }
.nt-vide-ic .ic-inline { width: 26px; height: 26px; }

/* ---- Une note ouverte (étape 2, tâche 5) ---- */
/* Une ligne du tableau (ou une carte) s'ouvre : ça doit se voir */
.nt-tr { cursor: pointer; }
.nt-tr:hover td { background: var(--surface-2); }
.nt-tr:focus-visible, .nt-carte:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.nt-carte { cursor: pointer; }

.nt-fiche-tete { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.nt-fiche-tete .sub { margin: 0; }
/* Le texte de l'appel : c'est le cœur de la note, on lui laisse de la place */
.nt-fiche-texte { font-size: 16px; line-height: 1.6; white-space: pre-wrap; }
.nt-saisie { width: 100%; font: inherit; line-height: 1.5; resize: vertical; min-height: 120px; }

.nt-titre-carte { margin: 0 0 12px; font-size: 15px; font-weight: 600; }

/* Le site, la personne, le rappel */
.nt-infos { display: grid; gap: 14px; }
.nt-info { display: flex; gap: 11px; align-items: flex-start; }
.nt-info-ic { color: var(--muted); line-height: 0; padding-top: 2px; }
.nt-info-ic .ic-inline { width: 17px; height: 17px; }

/* Nouvelle note : on cherche d'abord le client
   (le bouton « + Nouvelle note » reprend le style de « + Nouveau client ») */
.nn-form { display: grid; gap: 14px; }
.nn-cherche { position: relative; display: block; }
.nn-cherche .ic-inline { position: absolute; left: 11px; top: 50%; margin-top: -9px;
  width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.nn-cherche .input { padding-left: 36px; }

.nn-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px;
  max-height: 320px; overflow-y: auto; }
.nn-choix {
  width: 100%; min-height: 44px; display: flex; gap: 6px 14px; flex-wrap: wrap;
  align-items: baseline; justify-content: space-between; text-align: left; cursor: pointer;
  padding: 10px 12px; border-radius: 10px; color: inherit; font: inherit;
  background: var(--bg); border: 1px solid var(--neutral-800);
}
.nn-choix:hover, .nn-choix:focus-visible { border-color: var(--accent-300); }
.nn-choix-nom { font-weight: 600; font-size: 14px; }
.nn-choix-lieu { color: var(--muted); font-size: 13px; }
.nn-etat { margin: 0; }

.nn-client { display: flex; gap: 12px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--neutral-800); }
.nn-client .value { font-weight: 600; font-size: 15px; }

/* Réglages → onglet « IA » : les deux gros textes et leur pied */
.rg-ia-texte { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.5; resize: vertical; }
.rg-ia-pied { display: flex; gap: 12px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; margin-top: 10px; }
.rg-ia-pied .btn { min-height: 44px; }
@media (max-width: 640px) { .rg-ia-pied .btn { width: 100%; } }
/* Le sujet de l’email, au-dessus de son texte. Une seule ligne, pleine largeur. */
.rg-ia-sujet { display: block; margin-bottom: 12px; }
.rg-ia-sujet > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.rg-ia-sujet > input { width: 100%; }

/* La carte « devis avec l'IA » : avant (le bouton), pendant, après (le résumé) */
.nt-ia { display: grid; gap: 12px; }
.nt-ia-tete { display: flex; gap: 10px; align-items: center; }
.nt-ia-ic { color: var(--accent-300); line-height: 0; }
.nt-ia-ic .ic-inline { width: 20px; height: 20px; }
.nt-ia-t { font-weight: 600; font-size: 14.5px; }
/* Pleine largeur et 44 px de haut : on le vise avec le doigt, dehors, sur le terrain */
.nt-ia-btn { width: 100%; min-height: 44px; }
.nt-ia-msg { margin: 0; }

/* Pendant l'attente : la jauge avance, et le chrono dit la vérité */
.nt-ia-avance { display: grid; gap: 7px; }
.nt-ia-barre { height: 6px; border-radius: 999px; background: var(--neutral-800); overflow: hidden; }
.nt-ia-barre span { display: block; height: 100%; width: 3%; border-radius: 999px;
  background: var(--accent-300); transition: width .5s linear; }
.nt-ia-etape { display: flex; gap: 10px; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--muted); }
.nt-ia-etape span:last-child { font-variant-numeric: tabular-nums; flex: 0 0 auto; }

.nt-ia-devis { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nt-ia-num { font-weight: 600; font-size: 15px; }
.nt-ia-chiffres { color: var(--muted); font-size: 14px; margin-top: -6px; }

/* Ce que l'IA n'a pas su trancher : à lire avant d'envoyer le devis */
.nt-ia-verif { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nt-ia-verif li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.nt-ia-verif .ic-inline { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 2px; color: var(--danger); }

.nt-ia-corr {
  display: grid; gap: 6px; font-size: 13.5px; color: var(--muted);
  border-top: 1px solid var(--neutral-800); padding-top: 12px;
}
.nt-ia-corr textarea { resize: vertical; min-height: 74px; }

/* L'historique : qui a fait quoi, quand */
.nt-histo { list-style: none; margin: 0; padding: 0; }
.nt-histo-l {
  display: flex; gap: 6px 16px; flex-wrap: wrap; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid var(--neutral-800); font-size: 14px;
}
.nt-histo-l:last-child { border-bottom: 0; }
.nt-histo-quand { color: var(--muted); font-size: 13px; min-width: 150px; }
.nt-histo-qui { color: var(--muted); font-size: 13px; margin-left: auto; }
@media (max-width: 719px) {
  .nt-histo-qui { margin-left: 0; }
  .nt-histo-quand { min-width: 0; width: 100%; }
}
/* Sur ordinateur, la colonne de droite garde ses cartes espacées */
.fiche-2col aside > .card + .card,
.nt-grille aside > .card + .card { margin-top: 14px; }

/* Une note revenue toute seule (le jour du rappel est arrivé) */
.nt-revenue { color: var(--ambre); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.nt-revenue .ic-inline { width: 14px; height: 14px; }

/* Le nom du client, dans une note ouverte : il ouvre sa fiche */
.nt-lien-client {
  font: inherit; color: inherit; background: transparent; border: 0; padding: 0;
  cursor: pointer; display: inline-flex; align-items: center; gap: 4px; text-align: left;
}
.nt-lien-client:hover, .nt-lien-client:focus-visible { color: var(--accent-300); }
.nt-lien-client:hover .nt-chev { transform: translateX(2px); }
.nt-chev { color: var(--muted); font-weight: 400; transition: transform .15s ease; }
.nt-lien-client:hover .nt-chev { color: var(--accent-300); }
@media (max-width: 719px) {
  /* Au doigt, la zone du nom doit rester confortable */
  .nt-lien-client { min-height: 44px; }
}

/* ---- Onglet « Notes » de la fiche client (étape 2, tâche 6) ---- */
.cl-note-tr { cursor: pointer; }
tr.cl-note-tr:hover td { background: var(--surface-2); }
.cl-note-tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.nt-form { margin-bottom: 14px; }
.nt-form .nc-grille { margin-top: 4px; }
.nt-form .nc-actions { margin-top: 8px; }
/* La zone de note de l'écran « Nouveau client » */
.nc-note-champ { display: block; margin: 0 0 16px; }
.nc-note-champ > span:first-child { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.nc-note-champ .sub { display: block; margin: 6px 0 0; font-size: 12.5px; }
/* Pastille « notes en cours » (jaune) — à côté des sites et des personnes */
.badge.b-note {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; padding: 2px 7px; font-variant-numeric: tabular-nums;
  color: var(--ambre); background: color-mix(in srgb, var(--ambre) 14%, transparent);
  border-color: color-mix(in srgb, var(--ambre) 50%, transparent);
}
.badge.b-note svg { width: 9px; height: 9px; flex: none; }

/* En-tête de la zone « note » de l'écran Nouveau client : le titre et son bouton Annuler */
.nc-note-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.nc-note-tete > span { font-size: 12px; color: var(--muted); }
.nc-note-annuler { width: auto; padding: 6px 10px; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.nc-note-annuler .ic-inline { width: 14px; height: 14px; }
.nc-note-annuler:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
/* ---- Le rappel du jour (étape 2, tâche 7) ---- */
/* Le chiffre à côté de « Mes notes » dans le menu */
.nav-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; margin-left: 8px;
  font-size: 11.5px; font-weight: 600; border-radius: 999px; vertical-align: middle;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--neutral-800);
}
.nav-item.active .nav-count { background: var(--accent-900); color: var(--accent-300); border-color: var(--accent-700); }
/* Ambre : des notes sont revenues d'elles-mêmes, il y a quelque chose à reprendre */
.nav-count.du {
  color: var(--encre-ambre); background: var(--ambre); border-color: var(--ambre);
}
.nav-item.active .nav-count.du { color: var(--encre-ambre); background: var(--ambre); border-color: var(--ambre); }

/* ---- Disposition d'une note ouverte ----
   Téléphone : tout à la suite (texte → actions → historique).
   Ordinateur : le texte ET l'historique à gauche, les actions à droite sur
   toute la hauteur — sinon la colonne de gauche restait à moitié vide. */
.nt-grille { display: grid; gap: 14px; }
@media (min-width: 860px) {
  .nt-grille {
    grid-template-columns: minmax(0, 1fr) 340px;
    /* La 2ᵉ ligne prend la place qui reste : sinon la hauteur des cartes de
       droite écarterait le texte et l'historique l'un de l'autre. */
    grid-template-rows: auto 1fr;
    gap: 22px 22px; align-items: start;
  }
  .nt-grille > .nt-col-texte { grid-column: 1; grid-row: 1; }
  .nt-grille > aside        { grid-column: 2; grid-row: 1 / span 2; }
  .nt-grille > .nt-histo-zone { grid-column: 1; grid-row: 2; }
  .nt-histo-zone .section-title { margin-top: 0; }
  /* Le texte de l'appel est le cœur de la note : on lui donne de la place */
  .nt-carte-texte { min-height: 200px; }
  .nt-carte-texte .nt-fiche-texte { font-size: 16.5px; }
}

/* Le formulaire « Modifier la note » : les listes déroulantes sur 2 colonnes
   quand il y a la place, les unes sous les autres au téléphone. */
.nt-carte-texte .nc-grille { gap: 0 32px; margin-top: 4px; }
.nt-carte-texte .nc-grille .field { margin-bottom: 14px; }
.nt-carte-texte .nc-actions { margin-top: 4px; }

/* ---- L'annuaire des entreprises de l'État (écran « Nouveau client ») ---- */
.nc-recherche-note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.55; }
.nc-gouv-tete {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 16px 0 8px; font-size: 13.5px; color: var(--text);
}
.nc-gouv-tete .ic-inline { width: 17px; height: 17px; color: var(--accent-300); flex: none; }
.nc-gouv-tete .sub { margin: 0; font-size: 12.5px; }
.nc-gouv-vide { margin: 14px 0 0; }
/* L'annuaire est un plus, pas un passage obligé : le message reste discret */
.nc-gouv-hs {
  display: flex; align-items: center; gap: 8px; margin: 14px 0 0;
  color: var(--ambre); font-size: 13px;
}
.nc-gouv-hs .ic-inline { width: 16px; height: 16px; flex: none; }
.nc-gouv-info { display: flex; align-items: center; gap: 7px; margin: 8px 0 0; font-size: 13px; }
.nc-gouv-info .ic-inline { width: 15px; height: 15px; flex: none; }
/* Le bouton « Remplir » reste à droite de la ligne, même au téléphone */
#nc-gouv .btn-voir { flex: none; }
/* Au doigt, un lien d'ajout doit rester attrapable (44 px, comme un bouton) */
@media (max-width: 719px) {
  .content .nc-lien { min-height: 44px; display: inline-flex; align-items: center; }
}

/* ---- Nouveau client : la barre, les filtres, l'entreprise choisie ---- */
.nc-barre { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.nc-ff-q { flex: 1; min-width: 240px; display: block; }
.nc-ff-q > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.nc-ff-q .input { width: 100%; font-size: 16px; padding: 12px 14px; }
.nc-btn-filtres { width: auto; display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; flex: none; }
.nc-btn-filtres .ic-inline { width: 16px; height: 16px; }
.nc-filtres {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--neutral-800); align-items: end;
}
.nc-filtres .ff { display: block; }
.nc-filtres .ff > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.nc-filtres .input { width: 100%; }
.nc-filtres-raz { width: auto; align-self: end; }
@media (max-width: 719px) {
  .nc-filtres { grid-template-columns: 1fr 1fr; }
  .nc-btn-filtres { width: 100%; justify-content: center; }
}

/* L'appel « rien ne correspond ? crée-le à la main » */
.nc-manuel-appel { margin: 14px 0 0; }
.nc-rien { margin-top: 14px; }

/* L'entreprise retenue */
.nc-choisi { margin-top: 16px; }
.nc-choisi-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.nc-choisi-nom { margin: 0 0 10px; font-size: 20px; font-weight: 600; }
.nc-choisi-tete .btn { width: auto; display: inline-flex; align-items: center; gap: 6px; flex: none; }
.nc-choisi-infos { margin-bottom: 6px; }
.nc-choisi-infos .label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.nc-choisi-infos .value { font-size: 14.5px; }

/* Les cases à cocher : adresses et personnes à créer avec le client */
.nc-coches { display: grid; gap: 8px; margin-bottom: 6px; }
.nc-coche {
  display: flex; align-items: flex-start; gap: 11px; padding: 11px 13px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--neutral-800); border-radius: var(--radius);
  min-height: 44px;
}
.nc-coche:hover { border-color: var(--accent-700); }
.nc-coche input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.nc-coche-ic { color: var(--muted); line-height: 0; padding-top: 2px; }
.nc-coche-ic .ic-inline { width: 16px; height: 16px; }
.nc-coche b { font-weight: 500; }
.nc-coche-bas { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }

.nc-form-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.nc-form-tete .btn { width: auto; display: inline-flex; align-items: center; gap: 6px; }
/* ---- « Nouveau client » en popup : le cadre de « Nouvelle intervention », en plus large ---- */
.modal.nc-modal { width: min(1080px, 100%); padding: 0; display: flex; flex-direction: column; max-height: 92vh; overflow: hidden; }
.nc-modal .itv-aj-corps { padding: 18px 22px 22px; }
.nc-modal .nc-recherche { margin: 0; }
.nc-modal .nc-form { margin: 16px 0 0; }
.nc-parent-champ { max-width: 420px; margin-bottom: 6px; }
@media (max-width: 719px) {
  .modal-fond.nc-fond { padding: 0; place-items: end center; }
  .modal.nc-modal { width: 100%; max-height: 100vh; height: 100vh; border-radius: 0; }
  .nc-modal .itv-aj-corps { padding: 14px 16px 18px; }
  .nc-modal .itv-aj-tete { padding-left: 16px; padding-right: 16px; }
  .nc-modal .btn, .nc-modal .input, .nc-modal select.input { min-height: 44px; }
  .nc-modal .itv-aj-x { width: 44px; height: 44px; }
  .nc-modal .nc-lien { min-height: 44px; display: inline-flex; align-items: center; }
  .nc-parent-champ { max-width: none; }
}
/* ---- Nouveau client : les 2 colonnes de réponses ---- */
.nc-2col { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 900px) {
  .nc-2col { grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
}
.nc-col { min-width: 0; }
.nc-col-titre {
  display: flex; align-items: center; gap: 8px; margin: 0 0 10px;
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
  color: var(--accent-300);
}
.nc-col-titre .ic-inline { width: 16px; height: 16px; flex: none; }
.nc-banniere { margin-top: 0; }
.nc-gouv-compte { margin: 0 0 8px; font-size: 12.5px; }
/* Dans une colonne, la ligne d'un résultat se replie : nom au-dessus, bouton dessous */
@media (min-width: 900px) and (max-width: 1500px) {
  .nc-col .tr { flex-wrap: wrap; }
  .nc-col .tr .btn-voir { margin-left: 44px; }
}

/* Plusieurs emails pour le contact principal */
.nc-emails { display: block; }
.nc-emails > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.nc-email-ligne { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.nc-email-ligne .input { flex: 1; min-width: 0; }
.nc-email-moins { width: auto; flex: none; padding: 8px 10px; color: var(--muted); }
.nc-email-moins:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.nc-email-moins .ic-inline { width: 15px; height: 15px; }

/* Le n° de TVA calculé, et les petites explications du formulaire */
.nc-tva-calc { display: flex; align-items: flex-start; gap: 7px; margin: -4px 0 14px; font-size: 12.5px; }
.nc-tva-calc .ic-inline { width: 15px; height: 15px; color: var(--ok); flex: none; margin-top: 2px; }
.nc-form-note { margin: -4px 0 16px; font-size: 12.5px; }
.nc-pagin-sites { margin-top: 10px; }
/* ---- Listes compactes : adresses et personnes à créer ---- */
.nc-coches { gap: 6px; }
.nc-coche { padding: 8px 11px; gap: 9px; min-height: 0; align-items: center; }
.nc-coche b { font-size: 13.5px; }
.nc-coche-bas { font-size: 11.5px; margin-top: 1px; }
.nc-coche input { width: 17px; height: 17px; margin: 0; }
.nc-coche-ic .ic-inline { width: 15px; height: 15px; }
/* Une ligne ajoutée à la main : pas de case, mais une croix pour la retirer */
.nc-coche-fixe { cursor: default; border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.nc-coche-fixe > span:nth-child(2) { flex: 1; min-width: 0; }
.nc-oter { width: auto; flex: none; padding: 5px 8px; color: var(--muted); margin-left: auto; }
.nc-oter:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.nc-oter .ic-inline { width: 14px; height: 14px; }
.nc-vide { margin: 0 0 8px; font-size: 12.5px; }
.nc-retenues { margin-top: 6px; font-size: 12px; color: var(--muted); }
.nc-pagin-sites { margin-top: 8px; font-size: 12px; }
.nc-pagin-sites .btn { padding: 5px 12px; min-height: 0; }
.nc-pagin-sites .pagin-total { font-size: 12px; }

/* Le petit bouton « + Ajouter une adresse / une personne » */
.nc-ajout-btn {
  display: inline-flex; align-items: center; gap: 7px; margin: 8px 0 18px;
  font: inherit; font-size: 13px; color: var(--accent-300); background: transparent;
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px; padding: 7px 14px; cursor: pointer;
}
.nc-ajout-btn:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.nc-ajout-btn .ic-inline { width: 14px; height: 14px; }
.nc-ajout {
  margin: 10px 0 18px; padding: 14px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--neutral-800);
}
.nc-ajout .nc-grille { gap: 0 28px; }
.nc-ajout .field { margin-bottom: 12px; }
.nc-ajout .nc-actions { margin: 2px 0 0; }

/* Le bouton « Ajouter une note » : visible, mais pas criard */
.nc-note-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 13px; margin: 6px 0 16px; cursor: pointer;
  font: inherit; font-weight: 500; font-size: 14.5px; color: var(--accent-300);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: var(--radius-lg);
}
.nc-note-btn:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); }
.nc-note-btn .ic-inline { width: 17px; height: 17px; }
@media (max-width: 719px) { .nc-ajout-btn, .nc-note-btn { min-height: 44px; } }
/* Une ligne = UNE ligne : l'adresse tient sur un rang, le SIRET à la suite */
.nc-coche-txt { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1; }
.nc-coche-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nc-coche-txt .nc-coche-bas { margin: 0; flex: none; white-space: nowrap; }
.nc-coche-fixe > .nc-coche-txt { flex: 1; }

@media (max-width: 719px) {
  /* Au doigt : même les petites flèches de pagination restent attrapables */
  .nc-pagin-sites .btn { min-height: 44px; min-width: 44px; }
}

/* Le 1er groupe du formulaire « Modifier » colle au titre */
.ed-premier { margin-top: 14px; }

/* Le crayon d'une ligne retenue (il modifie, il ne retire pas : donc pas de rouge) */
.nc-modif { width: auto; flex: none; padding: 5px 8px; color: var(--muted); margin-left: auto; }
.nc-modif:hover { color: var(--accent-300); border-color: var(--accent-700); }
.nc-modif .ic-inline { width: 14px; height: 14px; }
.nc-coche-fixe .nc-oter { margin-left: 0; }
.nc-ajout .nt-saisie { width: 100%; }
.nc-ajout > .field { display: block; margin-bottom: 12px; }
.nc-ajout > .field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }

@media (max-width: 719px) {
  /* Au doigt : le crayon et la croix d'une ligne restent attrapables */
  .nc-modif, .nc-oter { min-width: 44px; justify-content: center; }
}

/* La pagination des réponses de l'annuaire */
.nc-pagin-gouv { margin: 0 0 10px; font-size: 12px; }
.nc-pagin-gouv .btn { padding: 5px 12px; min-height: 0; }
.nc-pagin-gouv .pagin-total { font-size: 12px; }

/* TÉLÉPHONE : une ligne cochée passe sur 2 rangs plutôt que de déborder
   (le nom d'une personne + sa fonction ne tiennent pas sur 375 px). */
@media (max-width: 719px) {
  .nc-coche { align-items: flex-start; }
  .nc-coche-txt { flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; }
  .nc-coche-txt b { max-width: 100%; }
  .nc-coche-txt .nc-coche-bas {
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .nc-pagin-gouv .btn { min-height: 44px; min-width: 44px; }
}

/* Le bouton « Archiver » d'une note : bien visible à côté de « Modifier » */
.nt-archiver {
  width: auto; display: inline-flex; align-items: center; gap: 8px;
  color: var(--ambre); border-color: color-mix(in srgb, var(--ambre) 55%, transparent);
  background: color-mix(in srgb, var(--ambre) 10%, transparent);
}
.nt-archiver:hover { background: color-mix(in srgb, var(--ambre) 20%, transparent); color: var(--text); }
.nt-archiver .ic-inline { width: 16px; height: 16px; }
@media (max-width: 719px) { .nt-archiver { width: 100%; justify-content: center; } }

/* ===== « Mes tâches » : un onglet pas encore branché ===== */
.tt-bientot { text-align: center; padding: 46px 20px; }
.tt-bientot svg { width: 40px; height: 40px; color: var(--neutral-700); margin-bottom: 12px; }
.tt-bientot .t { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.tt-bientot .s { color: var(--muted); font-size: 13.5px; max-width: 460px; margin: 0 auto; line-height: 1.6; }

/* ===== Onglet « Mes notes » — les vraies petites notes ===== */

/* Le rond à cocher : fait / pas fait */
.nn-coche {
  width: 24px; height: 24px; flex: none; padding: 0; border-radius: 50%;
  border: 1.5px solid var(--neutral-700); background: transparent; color: transparent;
  cursor: pointer; display: grid; place-items: center;
}
.nn-coche .ic-inline { width: 13px; height: 13px; }
.nn-coche:hover { border-color: var(--muted); color: var(--muted); }
.nn-coche.faite { border-color: var(--etat-terminee); color: var(--etat-terminee);
  background: color-mix(in srgb, var(--etat-terminee) 16%, transparent); }
.nn-coche:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nn-td-coche { width: 26px; padding-right: 0 !important; }
/* Au doigt : plus gros sur téléphone */
@media (max-width: 859px) { .content .nn-coche { width: 30px; height: 30px; } }

/* Une note faite : barrée, puis effacée de la liste */
.nn-titre { font-weight: 500; }
.nn-faite .nn-titre { text-decoration: line-through; color: var(--muted); }
.nn-faite .nt-txt, .nn-faite .nt-carte-txt { color: var(--neutral-700); }


/* « Pour qui » et le client lié */
.nn-pour { display: inline-flex; align-items: center; gap: 6px; }
.nn-pour .ic-inline { width: 13px; height: 13px; flex: none; color: var(--muted); }

/* Le texte d'une note ouverte garde ses retours à la ligne */
.nn-texte { white-space: pre-wrap; line-height: 1.65; }

/* Choisir les personnes : des ÉTIQUETTES, comme les destinataires d'un e-mail.
   Une liste de cases deviendrait interminable le jour où on est dix. */
.np-pour-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px;
  background: var(--surface-2); border: 1px solid var(--neutral-800);
  border-radius: var(--radius); padding: 7px 8px; min-height: 44px;
}
.np-pour-box:focus-within { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
.np-chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  background: var(--accent-900); color: var(--accent-300); border: 1px solid var(--accent-700);
  border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 13px;
}
.np-chip-x {
  font: inherit; font-size: 16px; line-height: 1; cursor: pointer;
  width: 22px; height: 22px; flex: none; border: 0; border-radius: 50%;
  background: transparent; color: var(--accent-300);
}
.np-chip-x:hover { background: color-mix(in srgb, var(--accent-300) 22%, transparent); color: var(--text); }
.np-pour-q {
  flex: 1; min-width: 130px; font: inherit; font-size: 14px;
  background: transparent; border: 0; color: var(--text); padding: 4px 2px;
}
.np-pour-q:focus { outline: none; }

/* Les personnes proposées, juste en dessous */
.np-res {
  margin-top: 6px; border: 1px solid var(--neutral-800); border-radius: var(--radius);
  background: var(--surface); overflow: hidden; max-height: 260px; overflow-y: auto;
}
.np-res-l {
  display: block; width: 100%; text-align: left; font: inherit; font-size: 14px;
  background: transparent; border: 0; color: var(--text); cursor: pointer;
  padding: 11px 13px; border-bottom: 1px solid var(--neutral-800);
}
.np-res-l:last-child { border-bottom: 0; }
.np-res-l:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.np-res-plus { padding: 9px 13px; font-size: 12px; color: var(--muted); }

/* Téléphone : la croix d'une étiquette doit rester attrapable au doigt */
@media (max-width: 859px) {
  .content .np-chip { font-size: 14px; padding: 6px 6px 6px 13px; }
  .content .np-chip-x { width: 30px; height: 30px; font-size: 18px; }
  .content .np-pour-q { font-size: 16px; }
}

/* Les deux onglets « À faire » / « Terminées » */
.np-onglets { margin-top: 2px; }

/* Le client choisi dans le formulaire */
.np-client-choisi { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }

/* Qui a déjà fait la note (sur une note à plusieurs) */
.np-gens { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13px; color: var(--muted); }
.np-gens li { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.np-gens .ic-inline { width: 13px; height: 13px; flex: none; color: var(--etat-terminee); }

/* ===== Photos et PDF accrochés à une note ===== */
.np-pj { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-top: 10px; }
.np-vignette {
  position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--neutral-800); background: var(--surface-2);
}
.np-voir { display: block; width: 100%; height: 100%; }
.np-img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Le carré gris le temps que l'image arrive */
.np-vide { width: 100%; height: 100%; background: var(--surface-2); }
.np-fichier {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; padding: 8px;
  color: var(--muted); font-size: 10.5px; text-align: center; line-height: 1.3;
  word-break: break-all;
}
.np-fichier .ic-inline { width: 22px; height: 22px; flex: none; }
/* La croix pour enlever : en haut à droite, toujours lisible sur la photo */
.np-oter {
  position: absolute; top: 5px; right: 5px; width: 26px; height: 26px;
  border: 0; border-radius: 50%; cursor: pointer; font: inherit; font-size: 15px; line-height: 1;
  background: color-mix(in srgb, var(--noir) 60%, transparent); color: var(--blanc);
}
.np-oter:hover { background: var(--danger); }
/* Les deux boutons d'ajout, en pointillés */
.np-ajout {
  aspect-ratio: 1; border: 1px dashed var(--neutral-700); border-radius: 10px;
  background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: 11px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 8px; text-align: center; line-height: 1.25;
}
.np-ajout:hover { color: var(--text); border-color: var(--muted); }
.np-ajout .ic-inline { width: 22px; height: 22px; }
@media (max-width: 859px) {
  .content .np-oter { width: 32px; height: 32px; font-size: 18px; }
  .content .np-ajout { font-size: 12px; }
}
/* Une pièce jointe refusée (mauvais format, trop lourde) : bordure rouge */
.np-vignette.np-souci { border-color: var(--danger); }

/* ===== Le formulaire d'une note : 2 colonnes sur ordinateur =====
   Téléphone : tout les uns sous les autres (titre, note, photos, pour).
   Ordinateur (≥ 860 px) : la note à 60 %, les photos à 40 %, côte à côte. */
.np-duo { display: grid; grid-template-columns: 1fr; gap: 0 22px; }
@media (min-width: 860px) {
  .np-duo { grid-template-columns: 60fr 40fr; align-items: start; }
  /* La zone de saisie occupe toute la hauteur de sa colonne */
  .np-duo-note { display: flex; flex-direction: column; }
  .np-duo-note .nt-saisie { flex: 1; min-height: 190px; resize: vertical; }
  /* Sur 40 % de large, les vignettes restent lisibles : 3 par ligne */
  .np-duo-photos .np-pj { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
}

/* ===== Un réglage personnel : le libellé à gauche, l'interrupteur à droite ===== */
.rg-perso { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rg-perso-t { font-size: 15px; font-weight: 500; }
@media (max-width: 719px) {
  .rg-perso { flex-direction: column; align-items: stretch; }
  .rg-perso .rg-toggle { justify-content: center; padding: 12px; }
}

/* ===== Réglages → onglet « Étiquettes QR » (qr-lots.js) =====
   Le tableau réutilise tel quel l'habillage des avis clients
   (.avis-table / .avis-table-wrap / .fiche-cartes / .pagin) : rien n'est
   redéfini ici à part ce qui est propre aux lots. */

/* La barre du haut, quand le formulaire de création est fermé */
.ql-barre { margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ql-creer { display: inline-flex; align-items: center; gap: 8px; }
.ql-creer .ic-btn { width: 16px; height: 16px; }
/* Le raccourci vers l'outil de dessin : discret, mais assez haut pour le doigt. */
.ql-outil { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; }
.ql-outil .ic-btn { width: 16px; height: 16px; }

/* Le petit formulaire « Créer un lot » */
.ql-form .ql-nb { width: 130px; }
.ql-form .ql-note-saisie { width: 230px; }

/* Le numéro de lot et la date ne se coupent jamais en deux lignes */
.ql-table td.ql-nowrap { white-space: nowrap; }

/* La colonne NOTE : bornée, sur une seule ligne, et coupée par « … » si le
   commentaire est long. Le texte entier reste en info-bulle (title=). Sans cette
   borne, un commentaire de 80 signes pousserait le tableau au-delà de 1280 px et
   le ferait défiler de côté. */
.ql-table td.ql-note { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Les boutons d'action d'un lot : fichier de codes · annuler */
.ql-acts { gap: 2px; }
.ql-act { display: inline-flex; align-items: center; gap: 6px; }
.ql-act .ic-btn { width: 17px; height: 17px; display: block; }
.ql-act:disabled { opacity: .45; cursor: not-allowed; }

/* Sur téléphone : les actions passent en bas de la carte, avec leur nom écrit,
   et chaque zone cliquable fait au moins 44 px (règle du doigt). */
.ql-carte .ql-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ql-carte .ql-act {
  min-height: 44px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--neutral-800); background: var(--surface-2); color: var(--text);
}
.ql-carte .rg-del { color: var(--danger); }

/* Le commentaire du lot, sur la carte du téléphone : il peut passer à la ligne
   (pas de largeur à tenir ici), et il se lit d'un coup d'œil. */
.ql-carte-note { color: var(--text); font-weight: 500; }

/* Le petit rappel du lot dans le panneau « Étiquettes » : on doit voir d'un coup
   d'œil de quel lot on est en train de fabriquer les autocollants. */
.ql-form-lot { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; }
.ql-form-lot .ic-inline { width: 16px; height: 16px; }
/* La colonne NOTE se resserre quand il y a 3 boutons par ligne, pour que le
   tableau tienne toujours dans la largeur à 1280 px sans défilement. */
.ql-table td.ql-note { max-width: 170px; }

@media (max-width: 719px) {
  .ql-form .ff, .ql-form .input, .ql-form .btn { width: 100%; }
  .ql-form .ql-nb, .ql-form .ql-note-saisie { width: 100%; }
  .ql-barre .ql-creer { width: 100%; justify-content: center; min-height: 44px; }
  .ql-form .btn { min-height: 44px; }
}

/* ===== Équipements : le scan, la fiche d'un appareil, ses formulaires =====
   (tâche 11 — tout reste dans les variables du thème, aucune couleur en dur
   sauf le QR lui-même, qui DOIT être noir sur blanc pour se laisser lire.) */

/* La barre « Scanner / ou tape le code », en haut de l'onglet et dans la fenêtre */
.eq-scan-barre { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0 0 14px; }
.eq-scan-barre .ff { display: flex; flex-direction: column; gap: 6px; flex: 1 1 200px; }
.eq-scan-barre .ff > span { font-size: 12px; color: var(--muted); }
.eq-scan-barre .btn { white-space: nowrap; }
.eq-scan-barre .btn .ic-inline { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }
@media (max-width: 719px) {
  .eq-scan-barre { flex-direction: column; align-items: stretch; }
  .eq-scan-barre .btn, .eq-scan-barre .input { width: 100%; min-height: 44px; }
  /* ⚠️ En colonne, `flex: 1 1 200px` fait 200 px de HAUT (la base d'un flex
     s'applique à l'axe principal) : le champ « ou tape le code » ouvrait un
     trou de 200 px avant le bouton « Valider ». Mesuré au banc : barre de
     312 px avant, 180 px après (44 + 12 + 68 + 12 + 44, chaque morceau à sa
     taille naturelle). En largeur (ordinateur) la base de 200 px est bien ce
     qu'on veut : on ne la corrige QUE sur téléphone. */
  .eq-scan-barre .ff { width: 100%; flex: 0 0 auto; }
}

/* « Scanner » et « Ajouter » côte à côte, dans UNE sous-rangée.
   🔴 MESURÉ : un 4ᵉ morceau pleine largeur fait passer la barre de 182 à
      238 px au téléphone — au-dessus du seuil de 190 px que garde
      `_verif-hors-ligne` D. Côte à côte, elle reste à 182 px.
   ⚠️ `.eq-scan-barre .btn { width: 100% }` s'applique sous 719 px : les deux
      boutons du duo doivent REPRENDRE leur largeur automatique et se partager
      la rangée. Ce bloc vient APRÈS, donc il gagne. */
.eq-scan-duo { display: flex; gap: 12px; align-items: flex-end; }
@media (max-width: 719px) {
  .eq-scan-duo { width: 100%; }
  .eq-scan-duo .btn { flex: 1 1 0; width: auto; min-height: 44px; }
}

/* Une ligne / une carte d'appareil s'ouvre au clic */
.eq-ligne { cursor: pointer; }
tr.eq-ligne:hover td { background: var(--surface-2); }
.eq-ligne:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Les fenêtres du parc sont un peu plus larges que celle des suppressions */
.modal.modal-eq { width: min(680px, 100%); }

/* L'image de la caméra : cadre discret, jamais plus large que la fenêtre */
.eq-video-cadre {
  background: var(--surface-2); border-radius: var(--radius); overflow: hidden;
  margin: 0 0 12px; display: none;
}
.eq-video-cadre.on { display: block; }   /* classe posée par le JS : pas de :has(), qui manque encore sur de vieux téléphones */
#eq-video { display: block; width: 100%; max-height: 46vh; object-fit: cover; background: var(--noir); }

/* Le code de l'étiquette, écrit gros et bien lisible (on le recopie à la main) */
.eq-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 20px; letter-spacing: 3px; text-align: center;
  background: var(--surface-2); border: 1px solid var(--neutral-800);
  border-radius: var(--radius); padding: 10px; margin: 0 0 14px;
}

/* Le QR en grand : noir sur blanc, c'est ce qui se lit le mieux */
.eq-qr-zone { display: flex; flex-direction: column; align-items: center; margin: 16px 0; }
.eq-qr { width: min(240px, 62vw); aspect-ratio: 1; background: var(--blanc); border-radius: var(--radius); padding: 0; }
.eq-qr svg { display: block; width: 100%; height: 100%; border-radius: var(--radius); }
.eq-qr-zone .eq-code { width: min(240px, 62vw); margin-top: 10px; }
.eq-sans-qr { width: 100%; display: flex; justify-content: center; }
.eq-sans-qr .btn .ic-inline { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }
@media (max-width: 719px) { .eq-sans-qr .btn { width: 100%; min-height: 44px; } }

/* Le nom du client, sous le titre de la fiche */
.eq-client { color: var(--muted); font-size: 13px; margin: -8px 0 14px; }
.eq-dejavu { margin: 0 0 14px; }

/* L'identité de l'appareil et le formulaire : 2 colonnes sur ordinateur */
.eq-info, .eq-form { display: grid; grid-template-columns: 1fr; gap: 12px 24px; }
@media (min-width: 620px) {
  .eq-info, .eq-form { grid-template-columns: 1fr 1fr; }
}
.eq-form .field { margin-bottom: 0; }
@media (max-width: 719px) { .eq-form .input { min-height: 44px; } }

/* L'histoire, la plus récente en haut */
.eq-h { border-top: 1px solid var(--neutral-800); padding: 9px 0; }
.eq-h-haut { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.eq-h-haut span { color: var(--muted); white-space: nowrap; }
.eq-h-bas { color: var(--muted); font-size: 12.5px; margin-top: 3px; overflow-wrap: anywhere; }
.eq-plus { margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; }
.eq-plus .ic-inline { width: 13px; height: 13px; }
@media (max-width: 719px) { .eq-plus { min-height: 44px; } }

/* Les actions de la fiche : elles peuvent être cinq, elles ont le droit de passer
   à la ligne plutôt que de déborder */
.eq-acts { flex-wrap: wrap; }
.eq-acts .btn .ic-inline { width: 15px; height: 15px; vertical-align: -3px; margin-right: 5px; }

/* TÉLÉPHONE : les pastilles de lieu se cliquent au doigt comme le reste.
   Mesuré au banc (_verif-scan.html) : 31 px avant cette règle. Volontairement
   limité aux pastilles des équipements, pour ne rien bouger dans « Mes tâches ». */
@media (max-width: 719px) { .eq-chips .st-chip { min-height: 44px; } }

/* TÉLÉPHONE : la liste « Afficher 25 par page » faisait 43 px de LARGE (mesuré au
   banc). La règle 44 px du projet ne parlait que de la hauteur : ici c'est la
   largeur qui manquait. Limité à la pagination des équipements. */
@media (max-width: 719px) { .eq-pagin .pagin-size .input { min-width: 64px; } }

/* Les fenêtres du parc vivent maintenant dans <body> (voir equipements.js :
   elles doivent survivre au redessin de #content après une écriture). Les
   règles « 44 px au doigt » du projet étaient écrites pour .content : on les
   redonne ici, sinon les boutons de la fiche redescendaient sous la taille
   d'un doigt. Mesuré au banc. */
@media (max-width: 719px) {
  .modal-eq .btn,
  .modal-eq .input,
  .modal-eq select.input { min-height: 44px; }
  .modal-eq .st-chip { min-height: 44px; }
}

/* Une référence ou un n° client de 60 caractères sans espace élargissait la
   fiche et la faisait défiler de côté à 375 px. */
.eq-info .value, .eq-info .label { overflow-wrap: anywhere; }

/* ---- La réserve hors ligne (tâche 12) ----
   Trois bandeaux possibles : la liste vient du téléphone, des corrections
   attendent, des corrections ont été refusées. Ils réutilisent .banner-warn :
   aucune couleur en dur, et le même look que le bandeau « Brouillon ». */
/* Le bandeau porte jusqu'à trois compteurs ET des noms de sites : à 375 px
   un nom d'une seule pièce doit pouvoir se couper plutôt que déborder. */
.eq-banner { margin: 0 0 14px; overflow-wrap: anywhere; }
/* Le « OK » qui range le bandeau des refus : au doigt sur téléphone. */
.eq-refus-ok { margin-top: 10px; padding: 6px 14px; font-size: 13px; }
.eq-refus-ok .ic-inline { width: 14px; height: 14px; vertical-align: -3px; margin-right: 4px; }
@media (max-width: 719px) { .eq-refus-ok { min-height: 44px; width: 100%; justify-content: center; } }

/* ---- Taper un lieu qui n'existe pas encore (tâche 17.4) ----
   Le menu LIEU était fermé : un technicien chez un client dont l'endroit
   n'était pas encore dans le parc ne pouvait rien saisir. Le champ « NOM »
   s'ouvre sous le menu, et l'aide anti-doublon se glisse juste dessous. */

/* L'aide occupe toute la largeur de la grille du formulaire (2 colonnes sur
   ordinateur) : coupée en deux, la phrase « X existe déjà » devenait illisible. */
.eqf-proche {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: -4px 0 0; font-size: 13px; color: var(--muted);
}
/* Vide = rien du tout : sinon elle laisserait un trou dans la grille. */
.eqf-proche:empty { display: none; }
.eqf-proche b { color: var(--text); }
/* Orange = « en attente », le code couleur du projet pour « regarde ça avant
   de continuer ». Jamais une couleur en dur. */
.eqf-proche .ic-inline { width: 16px; height: 16px; color: var(--etat-attente); flex: none; }
.eqf-proche-b { padding: 5px 14px; font-size: 13px; }

/* ---- Ranger les paquets dans un site (tâche 16) ----
   Un « paquet » = tous les appareils qui portent le même texte de lieu tapé
   dans Kizeo. Aucune couleur en dur : les points reprennent les variables
   --etat-* du projet (bleu = à traiter, orange = en attente). */

/* Le point de couleur, sur la pastille de filtre ET dans la liste des paquets */
.eq-pt { display: inline-flex; align-items: center; line-height: 0; margin-right: 6px; flex: none; }
.eq-pt .ic-pt { width: 8px; height: 8px; display: block; }
.eq-pt.sans { color: var(--etat-traiter); }
.eq-pt.partiel { color: var(--etat-attente); }

/* La maison : « c'est l'adresse du client lui-même ». Un repère, pas une
   alerte — donc la couleur discrete du texte secondaire, pas une couleur
   d'etat. Sur la pastille de filtre ET dans la liste des sites. */
.eq-pt-maison { display: inline-flex; align-items: center; line-height: 0; margin-right: 6px; flex: none; }
.eq-pt-maison .ic-inline { width: 13px; height: 13px; display: block; color: var(--muted); }
.eq-rng-maison { display: inline-flex; line-height: 0; color: var(--muted); flex: none; }
.eq-rng-maison .ic-inline { width: 16px; height: 16px; }

/* Le bouton qui ouvre l'écran de rangement */
.eq-rng-barre { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 14px; }
.eq-rng-barre .btn .ic-inline { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }
.eq-rng-refus { margin: -8px 0 14px; }
@media (max-width: 719px) {
  .eq-rng-barre { flex-direction: column; }
  .eq-rng-barre .btn { width: 100%; min-height: 44px; justify-content: center; }
}

/* L'écran lui-même : une colonne sur téléphone, DEUX sur ordinateur (les
   paquets à gauche, les sites à droite) — la largeur d'un écran de bureau ne
   doit pas se perdre en bande étroite au milieu. */
.eq-rng { display: grid; grid-template-columns: 1fr; gap: 0 28px; }
.eq-rng .sub-head { margin-top: 4px; }
@media (min-width: 900px) {
  .eq-rng { grid-template-columns: 1fr 1fr; align-items: start; }
  .eq-rng .eq-rng-bas { grid-column: 1 / -1; }
}

/* Une ligne = un paquet (ou un site). Toute la ligne se clique : au doigt, une
   case à cocher de 16 px toute seule est intouchable. */
.eq-rng-item, .eq-rng-site-l {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; min-height: 44px; cursor: pointer;
  border: 1px solid var(--neutral-800); border-radius: var(--radius);
  margin-bottom: 8px; background: var(--surface-2);
}
.eq-rng-item:hover, .eq-rng-site-l:hover { border-color: var(--neutral-700); }
.eq-rng-item input, .eq-rng-site-l input { width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.eq-rng-nom { flex: 1 1 auto; overflow-wrap: anywhere; font-size: 14px; }

/* Le compteur d'appareils du paquet, comme le « n » des pastilles de filtre */
.eq-rng-n {
  font-size: 12px; font-weight: 600; color: var(--muted); flex: none;
  background: var(--surface); border: 1px solid var(--neutral-800);
  border-radius: 999px; padding: 1px 8px;
}

/* Là où le paquet est DÉJÀ rangé : le nom de son site, avec la punaise */
.eq-rng-site { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; }
.eq-rng-site .ic-inline { width: 13px; height: 13px; flex: none; }

/* Un paquet qui porte déjà un site reste CALME (fond neutre, un peu effacé)
   mais il se coche comme les autres : il peut avoir besoin d'être consolidé,
   par exemple s'il est éclaté entre deux sites. Le griser ET le bloquer
   rendait ce cas-là impossible à réparer. */
.eq-rng-item.est-range { opacity: .7; background: transparent; }
.eq-rng-item.est-range:hover { opacity: 1; border-color: var(--neutral-700); }

/* Le site qui RESSEMBLE au paquet coché : mis en tête, et signalé. Aide à la
   décision seulement — rien n'est jamais choisi à la place de l'humain. */
.eq-rng-site-l.proche { border-color: color-mix(in srgb, var(--etat-attente) 55%, transparent); }
/* Déplacer : l'endroit où tous les cochés sont déjà, grisé. */
.eq-rng-site-l.off { opacity: .45; cursor: default; }
.eq-rng-proche { display: inline-flex; line-height: 0; color: var(--etat-attente); flex: none; }
.eq-rng-proche .ic-inline { width: 16px; height: 16px; }

.eq-rng-plus { margin: 4px 0 0; }
.eq-rng-plus .btn .ic-inline { width: 15px; height: 15px; vertical-align: -3px; margin-right: 5px; }
@media (max-width: 719px) { .eq-rng-plus .btn { width: 100%; min-height: 44px; justify-content: center; } }

/* Ce qu'on s'apprête à faire, dit avant d'écrire */
.eq-rng-conf {
  margin: 18px 0 0; padding: 10px 12px; font-size: 14px;
  border: 1px solid var(--neutral-800); border-radius: var(--radius); background: var(--surface-2);
  overflow-wrap: anywhere;
}
/* L'avertissement « ces appareils quittent un autre site ». Orange = « en
   attente », le code couleur du projet pour « regarde ça avant de continuer ».
   Ranger un paquet à moitié rangé VIDE un autre site : c'est autorisé, mais
   plus jamais en silence. En bloc (pas en flex) pour que la phrase reste une
   phrase et passe à la ligne toute seule à 375 px. */
.eq-rng-quitte { margin-top: 6px; font-size: 13px; color: var(--etat-attente); }
.eq-rng-quitte .ic-inline { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; }
/* `.m-acts` n'est habillé que dans une fenêtre ; ici on est dans le panneau,
   donc on pose nous-mêmes la rangée de boutons. */
.eq-rng-acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.eq-rng-acts .btn .ic-inline { width: 15px; height: 15px; vertical-align: -3px; margin-right: 5px; }
@media (max-width: 719px) {
  .eq-rng-acts { flex-direction: column-reverse; align-items: stretch; }
  .eq-rng-acts .btn { width: 100%; min-height: 44px; justify-content: center; }
}

/* ---- « En faire un site » : un paquet devient un vrai site ----
   48 paquets sur 206 appartiennent à un client qui n'a AUCUN site : il n'y a
   rien à choisir pour eux. Le bouton est discret (il y en a un par paquet)
   mais assez haut pour un doigt. Aucune couleur écrite ici : tout vient des
   variables du thème. */
.eq-rng-faire {
  margin-left: auto; flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 6px 12px; font-size: 13px;
  white-space: nowrap;
}
.eq-rng-faire .ic-inline { width: 15px; height: 15px; flex: none; }

/* Le formulaire du site neuf. Il REMPLACE l'écran de rangement : une chose à
   la fois, et la liste des paquets peut être longue. Les champs reprennent
   .info-grid / .nc-grille comme le formulaire d'adresse de clients.js : une
   colonne sur téléphone, plusieurs sur ordinateur — la largeur ne se perd pas
   en bande étroite au milieu. */
.eq-rng-neuf .sub-head { margin-top: 4px; }
.eq-rng-neuf .nc-grille { margin-top: 4px; }
.eq-rng-neuf .field { margin-bottom: 12px; }
.eq-rng-neuf .nt-saisie { min-height: 62px; resize: vertical; }
/* Au doigt : ni un champ ni un bouton du formulaire ne descend sous 44 px. */
.eq-rng-neuf .input, .eq-rng-neuf .btn { min-height: 44px; }
/* Le champ « Note » est long à écrire : il prend toute la largeur, sous la grille. */
.eq-rng-neuf-note { display: block; margin-top: 4px; }
@media (max-width: 719px) {
  /* Au doigt, un champ de 13 px fait zoomer l'écran tout seul sur iPhone. */
  .eq-rng-neuf .input { font-size: 16px; }
}

/* ===== Réglages → onglet « Équipements » (reglages-equipements.js) =====
   Les tableaux réutilisent tel quel l'habillage des avis clients
   (.avis-table / .avis-table-wrap / .fiche-cartes / .pagin) : rien n'est
   redéfini ici à part ce qui est propre à cet écran. */

/* La deuxième barre d'onglets. `.tabs` défile déjà tout seul de côté quand il y
   a trop d'onglets pour la largeur — c'est un défilement INTERNE à la barre, la
   page, elle, ne bouge pas. */
.re-tabs { margin-bottom: 10px; }

/* 🔴 NEUF SOUS-ONGLETS, ET UN TÉLÉPHONE DE 375 px.
   Mesuré le 2026-08-28 : la barre demande 898 px, l'écran en donne 351. Cinq
   onglets sur neuf sortaient donc de l'écran — et `.tabs` masque son ascenseur
   (`scrollbar-width: none`), donc RIEN ne le disait. « À prévoir »,
   « Consommables », « Retrait », « Règles » et « Page publique » étaient
   invisibles et introuvables.
   Choix retenu : les onglets PASSENT À LA LIGNE sur téléphone. Les neuf se
   voient d'un coup, chacun se touche au pouce, et il n'y a plus rien à
   découvrir en faisant glisser un doigt sur une barre qui n'a pas l'air de
   glisser.
   (Écarté : un dégradé sur le bord droit. Il aurait dit « il y a autre chose »
   sans dire quoi, et il aurait fallu balayer quand même.)
   ⚠️ On ne touche qu'à `.re-tabs` : `.tabs` sert dans toute l'appli, et les
   autres écrans ont deux ou trois onglets, qui tiennent très bien. */
@media (max-width: 719px) {
  .re-tabs { flex-wrap: wrap; overflow-x: visible; gap: 2px 4px; }
  .re-tabs .tab { padding: 9px 10px; }
}
/* Planification (01/11) : « En cours » revient, 4 onglets — même règle que les Réglages au téléphone :
   ils passent à la ligne, jamais de défilement de côté. */
@media (max-width: 719px) {
  .itv-tabs { flex-wrap: wrap; overflow-x: visible; gap: 2px 4px; }
  .itv-tabs .tab { padding: 9px 10px; }
}

/* Le panneau interne. Il ne porte PAS `.tab-panel` (voir le commentaire dans
   reglages-equipements.js) : on recopie donc ici la seule règle utile. */
.re-panel > .sub-head:first-child { margin-top: 4px; }
.re-panel .sub-head { margin-top: 26px; }

/* La barre du haut d'un sous-onglet : « ajouter », le choix de la famille… */
.re-barre { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0 0 12px; }
.re-barre .ff { display: flex; flex-direction: column; gap: 6px; }
.re-barre .ff > span { font-size: 12px; color: var(--muted); }
.re-ajout { width: 260px; }
.re-fam-sel { width: 220px; }
.re-plus { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.re-plus .ic-btn { width: 16px; height: 16px; }

/* La colonne ORDRE : le numéro de la ligne, puis les deux flèches ↑ ↓.
   Le numéro sert quand on trie AUTREMENT que par ORDRE : c'est alors le seul
   endroit où se lit la vraie place de la ligne dans la liste enregistrée.
   Aucune couleur ici : de la mise en page, rien d'autre. */
.re-ordre-td { white-space: nowrap; }
.re-ordre-n {
  display: inline-block; min-width: 1.6em; margin-right: 6px;
  color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px;
}
.re-ordre { gap: 2px; vertical-align: middle; }

/* La couleur d'un état : le rond de la bonne couleur, puis le menu.
   🔴 AUCUNE couleur ici. Les trois pastilles existent déjà (.b-ok / .b-attente
   / .b-du, plus haut), et elles lisent les variables --etat-*. En redéfinir une
   ferait une DEUXIÈME définition du code couleur, et les deux divergeraient.
   Ce bloc ne fait que de la mise en page. */
.re-coul { display: inline-flex; align-items: center; gap: 8px; }
.re-coul-pt { width: 12px; height: 12px; padding: 0; border-radius: 50%; flex: none; }
.re-coul-sel { width: 148px; }
.re-prix { width: 110px; text-align: right; }

/* Les modèles d'un consommable (2026-09-12) : le bouton « Tous » / « 4 / 6 »,
   puis, ouvert, une case par modèle. De la mise en page ; la case prend
   l'accent de l'appli, comme les autres cases à cocher (.nc-coche, .eq-rng-item). */
.re-mod { width: auto; min-height: 36px; padding: 4px 12px; font-variant-numeric: tabular-nums; }
.re-mod-panneau { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; text-align: left; }
.re-mod-choix { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.re-mod-choix input { width: 18px; height: 18px; flex: none; margin: 0; accent-color: var(--accent); }
.re-mod-actes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.re-mod-actes .btn { width: auto; min-height: 40px; padding: 7px 12px; }
@media (max-width: 719px) {
  .re-carte .re-mod { width: 100%; min-height: 44px; }
  .re-carte .re-mod-choix { min-height: 44px; }
  .re-carte .re-mod-actes .btn { flex: 1 1 auto; min-height: 44px; }
}

/* Les boutons d'une ligne : renommer · supprimer */
.re-acts { gap: 2px; }
.re-act { display: inline-flex; align-items: center; gap: 6px; }
.re-act .ic-btn { width: 17px; height: 17px; display: block; }
.re-act:disabled { opacity: .45; cursor: not-allowed; }

/* Les noms peuvent être longs (« DÉPOSE APPAREIL EXISTANT (SANS REMPLACEMENT)
   + VÉRIFICATION ANNUELLE ») : on borne la colonne et on coupe le mot, plutôt
   que de pousser le tableau au-delà de 1280 px et de le faire défiler de côté. */
.re-table td.re-nom { max-width: 520px; overflow-wrap: anywhere; }

/* Réglages → Contrats (2026-10-08). De la mise en page : aucune couleur
   nouvelle, seulement des variables du thème. */
.rc-remises .input { width: 120px; }
/* Les délais d'envoi à signer (3b-3) : même allure que les remises. */
.rc-delais .input { width: 120px; }
/* La TVA (BPU, 27/10) et le menu Vérification / Équipement neuf de chaque prestation. */
.rc-tva .input { width: 120px; }
.rc-section { width: auto; min-height: 32px; padding: 2px 6px; font-size: 13px; }
/* Le message de l'email de signature (Odoo Sign, 17/10) : une zone large, qui grandit vers le bas. */
.rc-message { display: flex; flex-direction: column; gap: 4px; max-width: 720px; margin: 0 0 14px; }
.rc-message textarea { width: 100%; min-height: 180px; resize: vertical; font: inherit; line-height: 1.45; }
.avis-table tr.rc-gris td, .fiche-carte.rc-gris { opacity: .5; }
.rc-cherche .input { width: 360px; }
.rc-trouves { list-style: none; margin: 0 0 14px; padding: 0; max-width: 560px; }
.rc-trouve {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; text-align: left;
  color: var(--text); background: transparent; border: 0;
  border-bottom: 1px solid var(--neutral-800); cursor: pointer;
}
.rc-trouve:hover, .rc-trouve:focus-visible { background: var(--surface-2); }
.rc-trouve-prix { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc-trouve-n { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 10px; white-space: nowrap; }

/* Fiche client → Contrat (3a-1, 2026-10-15). Les couleurs viennent du code couleur
   des états (--etat-du = bloque, --etat-attente = alerte) : aucune couleur nouvelle. */
.ct-manques { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ct-manque { font-size: 13px; padding: 8px 12px; border-radius: 8px; border: 1px solid transparent; }
.ct-manque.ct-bloque {
  color: var(--etat-du); border-color: color-mix(in srgb, var(--etat-du) 45%, transparent);
  background: color-mix(in srgb, var(--etat-du) 10%, transparent);
}
.ct-manque.ct-alerte {
  color: var(--etat-attente); border-color: color-mix(in srgb, var(--etat-attente) 45%, transparent);
  background: color-mix(in srgb, var(--etat-attente) 10%, transparent);
}
.ct-conditions .input { min-width: 170px; }
@media (min-width: 720px) { .ct-conditions .ct-remise .input { min-width: 110px; width: 110px; } }
.ct-note-site { width: 100%; min-width: 160px; }
.fiche-carte .ct-note-site { margin-top: 8px; min-height: 44px; }
.ct-case { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.ct-siege {
  display: inline-block; margin-right: 8px; padding: 1px 6px; border-radius: 6px;
  font-size: 11px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--muted); border: 1px solid var(--neutral-800);
}
.ct-aussi { display: block; font-size: 12px; color: var(--etat-attente); }
.ct-carte-case { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.ct-actes { margin-top: 18px; }
.ct-jauge { flex: 1 1 100%; width: 100%; height: 8px; accent-color: var(--accent); }
.ct-jauge[hidden] { display: none; }
/* Réglages → Contrats : la poignée pour ranger en faisant glisser. */
.rc-poignee {
  display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 6px;
  border: 0; border-radius: var(--radius); background: none; color: var(--muted);
  font: inherit; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.rc-poignee:hover:not(:disabled) { color: var(--text); }
.rc-poignee:disabled { cursor: default; opacity: .45; }
.rc-glisse { opacity: .9; outline: 2px solid var(--accent); outline-offset: -2px; }
.rc-glisse, .rc-glisse * { cursor: grabbing; }
.rc-carte-nom { display: flex; align-items: center; gap: 6px; min-width: 0; }
/* Contrat : le prix propre au client (une case par prestation cochée). */
.ct-prix-case { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; }
.ct-prix { width: 96px; min-height: 36px; padding: 6px 8px; text-align: right; }
.ct-prix:disabled { opacity: .45; }
.ct-prix.ct-prix-modifie { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.ct-prix-retour[hidden] { display: none; }
.ct-prix-carte { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 4px; }
.ct-prix-carte > span { font-size: 12px; color: var(--muted); }
@media (max-width: 719px) {
  .ct-prix-carte .ct-prix-case { display: flex; justify-content: flex-start; }
  .ct-prix { width: 140px; min-height: 44px; }
}
/* Contrat : les 4 petits onglets du brouillon (27/10) — même allure que .tabs / .tab (Planification),
   mais leurs propres classes : app.js branche .tab / data-tab sur tout #content. */
.ct-onglets { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  border-bottom: 1px solid var(--neutral-800); margin: 8px 0 18px; padding: 0 0 2px; }
.ct-onglets::-webkit-scrollbar { display: none; }
.ct-onglet { font: inherit; font-weight: 500; white-space: nowrap; flex: none; background: transparent; border: 0; color: var(--muted);
  padding: 9px 14px; min-height: 44px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ct-onglet:hover { color: var(--text); }
.ct-onglet.active { color: var(--accent-300); border-bottom-color: var(--accent); }
.ct-onglet:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ct-onglet.active .tcount { background: var(--accent-900); color: var(--accent-300); border-color: var(--accent-700); }
.ct-volet[hidden], .ct-bpu[hidden] { display: none; }
.ct-ong-court { display: none; }
@media (max-width: 719px) {
  .ct-onglet { padding: 9px 8px; }
  .ct-ong-long { display: none; }
  .ct-ong-court { display: inline; }
}
/* Contrat : le BPU (27/10) — quantité − [n] +, baisse en rouge, totaux, groupe « Autres » replié. */
.ct-bpu { margin-bottom: 8px; }
.ct-qte { display: inline-flex; align-items: center; gap: 4px; }
.ct-qte-n { width: 56px; min-height: 36px; padding: 6px 4px; text-align: center; font-variant-numeric: tabular-nums; }
.ct-qte-b { min-width: 32px; min-height: 36px; padding: 4px; justify-content: center; }
.ct-baisse { color: var(--danger); font-weight: 600; white-space: nowrap; }
.ct-baisse.ct-baisse-nulle { color: var(--muted); font-weight: 400; }
.ct-montant { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ct-totaux { display: flex; flex-direction: column; align-items: flex-end; margin: 10px 0 14px; }
.ct-tot { display: grid; grid-template-columns: auto auto; gap: 4px 24px; margin: 0; font-variant-numeric: tabular-nums; }
.ct-tot > div { display: contents; }
.ct-tot dt { color: var(--muted); text-align: right; }
.ct-tot dd { margin: 0; text-align: right; font-weight: 600; }
.ct-tot .ct-tot-ttc dt, .ct-tot .ct-tot-ttc dd { color: var(--text); font-size: 1.1em; font-weight: 700; }
.ct-tot-devis { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.ct-autres { margin: 6px 0 14px; }
.ct-autres > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--muted); font-weight: 600; }
.ct-bpu-carte { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 4px; }
@media (max-width: 719px) {
  .ct-qte-n { width: 64px; min-height: 44px; }
  .ct-qte-b { min-width: 44px; min-height: 44px; }
  .ct-totaux { align-items: stretch; }
  .ct-tot { grid-template-columns: 1fr auto; }
  .ct-tot dt { text-align: left; }
}
/* Contrat : la description sous la prestation (Réglages = défaut, onglet Contrat = celle du client). */
/* COMPACT (Simon, 15/10) : un petit lien d'une ligne ; la case ne s'ouvre qu'au clic. */
.desc-zone { display: flex; align-items: center; gap: 4px; min-width: 0; margin-top: 2px; }
.desc-voir {
  display: block; min-width: 0; max-width: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 11.5px; font-style: italic; font-weight: 400; line-height: 1.4; text-align: left;
  color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.desc-voir.desc-vide { font-style: normal; opacity: .55; }
.desc-voir.desc-modifie { color: var(--accent); }
.desc-voir:hover:not(:disabled) { color: var(--text); opacity: 1; }
.desc-voir:disabled { cursor: default; opacity: .3; }
.desc-voir[hidden], .rc-desc[hidden], .ct-desc[hidden] { display: none; }
.rc-desc, .ct-desc {
  display: block; width: 100%; max-width: 420px; min-height: 28px; padding: 2px 8px;
  font-size: 12.5px; font-style: italic; font-weight: 400;
}
.ct-desc-case .ct-desc-retour { padding: 0; min-height: 0; min-width: 0; }
.ct-desc-case .ct-desc-retour .ic-btn { width: 14px; height: 14px; }
.ct-desc:disabled { opacity: .45; }
.ct-desc.ct-desc-modifie { border-color: var(--accent); color: var(--accent); }
.ct-desc-retour[hidden] { display: none; }
@media (max-width: 719px) {
  .rc-desc, .ct-desc { max-width: none; min-height: 40px; }
  .desc-voir { font-size: 12.5px; padding: 4px 0; }
}
/* Contrat : l'envoi à signer (3b-1). */
.ct-envoi-panneau { margin-top: 12px; padding: 12px; border: 1px solid var(--neutral-800); border-radius: var(--radius); }
.ct-envoi-panneau[hidden] { display: none; }
.ct-envoi-panneau .input { min-width: 170px; }
.ct-bandeau {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0 12px; padding: 10px 12px;
  border-radius: var(--radius); border: 1px solid var(--neutral-800);
}
.ct-bandeau.ct-a-verifier { color: var(--etat-du); border-color: color-mix(in srgb, var(--etat-du) 45%, transparent); }
.ct-bandeau.ct-en-cours { color: var(--etat-attente); border-color: color-mix(in srgb, var(--etat-attente) 45%, transparent); }
/* La carte : sobre, sans fond de couleur ; seule la pastille dit l'état (Simon, 16/10). */
.ct-envoye {
  display: grid; gap: 8px; margin: 8px 0 4px; padding: 14px; border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-800);
}
.ct-pastille {
  justify-self: start; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--etat-attente); border: 1px solid currentColor;
  display: inline-flex; align-items: center; gap: 4px;
}
.ct-pastille .ic-btn { width: 14px; height: 14px; }
.ct-info { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 4px 12px; align-items: baseline; }
.ct-info > span { min-width: 90px; font-size: 12px; color: var(--muted); }
.ct-info > b { font-weight: 500; overflow-wrap: anywhere; }
/* 3c : la liste de prix Odoo d'un contrat signé (couleurs = les états) et la fin proche. */
.ct-liste-traiter { color: var(--etat-traiter); }
.ct-liste-attente { color: var(--etat-attente); }
.ct-liste-du      { color: var(--etat-du); }
.ct-fin-proche    { color: var(--etat-attente); }
/* 3c-2 : un contrat résilié — orange tant qu'il court, gris une fois fini (les états, jamais en dur). */
.ct-envoye.ct-signe .ct-pastille.ct-resilie      { color: var(--etat-attente); }
.ct-envoye.ct-signe .ct-pastille.ct-resilie-fini { color: var(--etat-archivee); }
.ct-info > b .ct-reconduction { margin-left: 8px; }
.ct-resil-panneau .input[type="date"] { min-width: 150px; }
.ct-info > b .ct-liste-refaire { margin-left: 8px; min-height: 44px; vertical-align: middle; display: inline-flex; align-items: center; gap: 6px; }
.ct-info > b a { color: var(--accent-300); text-decoration: none; }
.ct-info > b a:hover { text-decoration: underline; }
.ct-commentaire { display: block; margin-top: 8px; }
.ct-commentaire textarea { width: 100%; min-height: 72px; resize: vertical; font: inherit; line-height: 1.45; }
/* Contrat SIGNÉ : la même carte ; la pastille en vert (état « Terminée ») avec sa coche. */
.ct-envoye.ct-signe .ct-pastille { color: var(--etat-terminee); }
/* Contrat REFUSÉ : la pastille en rouge, avec sa croix. */
.ct-envoye.ct-refuse .ct-pastille { color: var(--etat-du); }
/* L'en-tête du contrat : le numéro = un petit menu ; le PDF = un petit lien (Simon, 16/10 : « minimaliste »). */
.ct-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 6px; }
.ct-choix { position: relative; display: inline-flex; align-items: center; min-width: 0; color: var(--accent-300); }
.ct-choix select {
  appearance: none; -webkit-appearance: none; background: transparent; border: 0; color: inherit; font: inherit;
  font-size: 13px; font-weight: 600; letter-spacing: .4px; padding: 10px 24px 10px 0; min-height: 44px;
  max-width: 100%; text-overflow: ellipsis; cursor: pointer;
}
.ct-choix select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ct-choix option { background: var(--surface); color: var(--text); }
.ct-choix .ic-btn { position: absolute; right: 2px; width: 16px; height: 16px; pointer-events: none; }
.ct-lien {
  display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 44px; padding: 10px 4px;
  background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer;
}
.ct-lien:hover, .ct-lien:focus-visible { color: var(--accent-300); }
.ct-lien:disabled { opacity: .5; cursor: progress; }
.ct-lien .ic-btn { width: 16px; height: 16px; }
.ct-liens { display: inline-flex; align-items: center; gap: 4px; flex: none; }
/* Le menu « Documents » (contrat signé) : petit, sous le bouton ; pleine largeur sur téléphone. */
.ct-tete { position: relative; flex-wrap: wrap; }
.ct-menu {
  position: absolute; right: 0; top: 100%; z-index: 30; width: 320px; max-width: calc(100vw - 32px);
  padding: 6px; background: var(--surface); border: 1px solid var(--neutral-800); border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.ct-menu[hidden] { display: none; }
.ct-menu-ligne { display: flex; align-items: center; gap: 2px; }
.ct-menu-ligne > span { flex: 1; padding-left: 6px; font-size: 13px; }
.ct-menu a.ct-lien { text-decoration: none; }
.ct-menu-sep { border-top: 1px solid var(--neutral-800); margin: 4px 0; }
.ct-docs-form { display: grid; gap: 10px; padding: 6px 4px 4px; }
.ct-docs-form[hidden] { display: none; }
.ct-docs-form .ff { display: flex; flex-direction: column; gap: 6px; }
.ct-docs-form .input { width: 100%; min-height: 44px; font-size: 16px; }
.ct-docs-form .re-barre { margin: 0; }
/* La fenêtre d'envoi (À + COPIE) et le bloc COPIE du menu Documents (03/11) */
.ct-fen-envoi { display: grid; gap: 10px; }
.ct-fen-envoi[hidden] { display: none; }
.ct-fen-envoi .ct-info b { overflow-wrap: anywhere; }
.ct-fen-envoi .re-barre { margin: 0; }
.ct-copies { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ct-copies .input { width: 100%; max-width: 460px; min-height: 44px; font-size: 16px; }
.ct-copies-liste { display: flex; flex-wrap: wrap; gap: 2px 18px; }
.ct-copies-liste:empty { display: none; }
.ct-copie { display: flex; align-items: center; gap: 8px; min-height: 40px; min-width: 0; font-size: 14px; cursor: pointer; }
.ct-copie input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.ct-copie > span { min-width: 0; overflow-wrap: anywhere; }
.ct-copie small { color: var(--muted); font-size: 12px; }
@media (max-width: 719px) {
  .ct-copies-liste { flex-direction: column; }
  .ct-copie { min-height: 44px; }
  .ct-copie input { width: 24px; height: 24px; }
}
.ct-case { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 14px; }
.ct-case input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.ct-case > span { white-space: nowrap; }
#ct-docs-msg:empty { display: none; }
@media (max-width: 719px) {
  .ct-menu { position: static; flex: 1 1 100%; width: auto; max-width: none; margin-top: 2px; }
}
/* L'historique : une ligne par événement, la date à gauche. */
.ct-histo { list-style: none; margin: 0; padding: 0; }
.ct-histo li {
  display: grid; grid-template-columns: 130px 1fr; gap: 2px 12px; padding: 8px 0;
  border-bottom: 1px solid var(--neutral-800); font-size: 13px;
}
.ct-histo li > span { overflow-wrap: anywhere; }
.ct-histo time { color: var(--muted); font-variant-numeric: tabular-nums; }
.ct-histo .ct-prevue { color: var(--muted); font-style: italic; }
.ct-histo .ct-ev-signe > span { color: var(--etat-terminee); }
.ct-histo .ct-ev-echec > span { color: var(--etat-du); }
@media (max-width: 719px) { .ct-histo li { grid-template-columns: 1fr; } }
@media (max-width: 719px) {
  .ct-envoi-panneau .ff, .ct-envoi-panneau .input { width: 100%; min-height: 44px; }
}
@media (max-width: 719px) {
  .rc-poignee { min-height: 44px; min-width: 44px; justify-content: center; }
}
@media (max-width: 719px) {
  .ct-conditions .ff, .ct-conditions .input { width: 100%; min-height: 44px; }
  .ct-case { width: 24px; height: 24px; }
}
@media (max-width: 719px) {
  .rc-remises .input, .rc-delais .input, .rc-tva .input, .rc-cherche .input { width: 100%; min-height: 44px; }
  .rc-section { min-height: 44px; }
  .rc-trouves { max-width: none; }
}
.re-val { width: 92px; }
.re-nb { width: 120px; }
.re-url { width: 340px; }
.re-txt { width: 260px; }

/* Le champ de renommage, dans la ligne */
.re-edit-zone { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; width: 100%; }
.re-edit-champ { flex: 1 1 160px; min-width: 120px; padding: 7px 10px; }
.re-edit-zone .btn { width: auto; padding: 7px 12px; min-height: 40px; }

/* Un réglage = une ligne = son propre bouton « Enregistrer » : une valeur
   refusée n'empêche jamais d'enregistrer les autres. */
.re-form-ligne { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0 0 16px; }
.re-form-ligne .ff { display: flex; flex-direction: column; gap: 6px; }
.re-form-ligne .ff > span { font-size: 12px; color: var(--muted); }
.re-form-ligne .btn { min-height: 44px; }

/* Téléphone : tout prend la largeur, et chaque zone touchée fait au moins 44 px. */
@media (max-width: 719px) {
  .re-barre .ff, .re-barre .input, .re-barre .btn { width: 100%; }
  .re-ajout, .re-fam-sel, .re-nb, .re-url, .re-txt { width: 100%; }
  .re-coul, .re-coul-sel, .re-prix { width: 100%; }
  .re-coul-sel, .re-prix { min-height: 44px; }
  .re-coul { gap: 10px; }
  .re-form-ligne .ff, .re-form-ligne .input, .re-form-ligne .btn { width: 100%; }
  .re-barre .input, .re-form-ligne .input { min-height: 44px; }
  .re-carte .re-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
  /* L'interrupteur « note obligatoire » se touche au pouce, comme tout le
     reste. Mesuré le 2026-08-28 : il faisait moins de 44 px dans les cartes. */
  .re-carte .rg-toggle { min-height: 44px; min-width: 44px; justify-content: center; }
  /* Sur téléphone, ranger à la main et les autres boutons vont à la ligne
     ensemble : chaque flèche doit rester touchable au pouce (44 px). */
  .re-carte-actes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .re-carte .re-ordre { display: flex; gap: 8px; margin-top: 12px; }
  .re-carte .re-ordre .re-act {
    min-height: 44px; min-width: 44px; justify-content: center; padding: 0 14px;
    border-radius: 10px; border: 1px solid var(--neutral-800);
    background: var(--surface-2); color: var(--text);
  }
  .re-carte .re-act {
    min-height: 44px; padding: 0 14px; border-radius: 10px;
    border: 1px solid var(--neutral-800); background: var(--surface-2); color: var(--text);
  }
  .re-carte .rg-del { color: var(--danger); }
  .re-carte .re-val-mob { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
  .re-carte .re-val-mob > span { font-size: 12px; color: var(--muted); }
  .re-carte .re-val { width: 100%; min-height: 44px; }
}
/* Sur ordinateur, l'étiquette « Validité (mois) » de la carte ne sert à rien :
   la carte elle-même est cachée. On l'éteint pour ne rien laisser traîner. */
@media (min-width: 720px) {
  .re-carte .re-val-mob { display: none; }
}

/* La pastille « HORS LISTE » : une famille (ou un type) porté par des appareils
   mais absent de la liste des réglages. Rouge, comme tout ce qui demande une
   action (variable --etat-du, via la classe .b-du déjà utilisée partout).
   Elle vit dans une case de tableau : elle ne doit ni se couper en deux lignes,
   ni pousser la colonne. */
.re-hors { white-space: nowrap; font-size: 10.5px; padding: 2px 8px; vertical-align: 1px; }

/* ===== « À visiter » — le rond d'urgence =====
   L'urgence est un ROND PLEIN QUI PORTE SON CHIFFRE ; les états, eux, restent
   des pastilles de texte. La couleur n'est donc jamais le seul signal : même
   sans distinguer les couleurs, on lit 1, 2, 3, 4 ou 5. */
.av-urg {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  font-weight: 700; font-size: 13px; line-height: 1;
  color: var(--blanc); font-variant-numeric: tabular-nums;
}
.av-urg-1 { background: var(--urg-1); }
.av-urg-2 { background: var(--urg-2); }
.av-urg-3 { background: var(--urg-3); }
.av-urg-4 { background: var(--urg-4); }
.av-urg-5 { background: var(--urg-5); }
/* 🔴 MESURÉ, pas supposé (banc `_verif-urgences.html`) : en chiffre BLANC, le rond
   jaune tombe à 2,08 de contraste et le rond orange à 3,39 — très en dessous des
   4,5 exigés. Ces deux ronds-là portent donc leur chiffre en FONCÉ (8,91 et 5,48).
   Les ronds 1, 4 et 5 gardent le blanc (5,42 · 5,47 · 5,70). */
.av-urg-2, .av-urg-3 { color: var(--encre); }

/* ===== « À visiter » — le bandeau du haut (07/09) =====
   UN seul bandeau, sur une carte discrète : la recherche (loupe dedans), les
   cases d'urgence, le statut tout à droite. Il garde la classe `.avis-filtres`
   pour hériter des règles maison (tri mobile caché sur ordinateur, champs
   pleine largeur sur téléphone). */
.av-outils {
  align-items: center; gap: 10px 14px; margin: 2px 0 16px;
  padding: 10px 12px; border: 1px solid var(--neutral-800); border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.av-loupe { position: relative; display: flex; align-items: center; flex: 1 1 240px; max-width: 340px; }
.av-loupe .ic-btn { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.av-loupe .input { padding-left: 36px; }
.av-loupe .input::placeholder { color: var(--muted); }
.av-statut { position: relative; display: flex; align-items: center; margin-left: auto; }
.av-statut .ic-btn { position: absolute; left: 12px; width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.av-statut .input { width: auto; min-width: 150px; padding-left: 34px; cursor: pointer; }

/* Les deux dates du bandeau « Interventions » (« Du » / « Au »). Étroites sur
   ordinateur — elles ne doivent pas pousser la recherche hors du bandeau — et
   côte à côte, à la taille du doigt, sur téléphone : jamais l'une sous l'autre
   sur toute la largeur, ça repousserait le tableau trop bas. */
.itv-ff-date .input { min-width: 0; width: 150px; }
/* 🔴 Le thème est sombre : sans `color-scheme`, le navigateur dessine le petit
   calendrier et son menu en NOIR sur fond noir — invisible. */
.input[type="date"] { color-scheme: dark; }
@media (max-width: 719px) {
  /* `.avis-filtres .ff { width: 100% }` met chaque champ sur sa propre ligne.
     Pour les dates on reprend la main : DEUX PAR LIGNE, sinon le bandeau
     repousse le tableau très bas et il faut faire défiler pour voir la liste.
     `width` ET `flex-basis` : l'un sans l'autre ne suffit pas ici. */
  .itv-outils .itv-ff-date { flex: 0 0 calc(50% - 6px); width: calc(50% - 6px); }
  .itv-outils .itv-ff-date .input { width: 100%; min-height: 44px; }
}

/* Le filtre URGENCE : une case ronde par niveau, qui porte SON CHIFFRE et SON
   COMPTE. Un niveau éteint garde son chiffre lisible mais perd sa couleur : on
   voit d'un coup d'oeil ce qui est allumé, sans avoir à distinguer les teintes. */
.av-urgf-groupe { display: flex; flex-wrap: wrap; gap: 8px; }
.av-urgf {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px 5px 6px; border-radius: 999px;
  border: 1px solid var(--neutral-800); background: transparent; color: var(--muted);
  font: 600 12px/1 Inter, sans-serif; font-variant-numeric: tabular-nums;
  cursor: pointer; min-height: 36px;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.av-urgf:hover { border-color: var(--neutral-700); color: var(--text); }
.av-urgf:active { transform: scale(.97); }
.av-urgf-r {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--neutral-800); color: var(--muted);
  font-weight: 700; font-size: 13px;
}
/* Allumé : la case reprend EXACTEMENT la couleur du rond d'urgence du tableau
   (variables --urg-1..5), jamais une couleur inventée à côté. */
.av-urgf.active { border-color: transparent; color: var(--blanc); }
.av-urgf.active .av-urgf-r { background: color-mix(in srgb, var(--blanc) 24%, transparent); color: inherit; }
.av-urgf-1.active { background: var(--urg-1); }
.av-urgf-2.active { background: var(--urg-2); }
.av-urgf-3.active { background: var(--urg-3); }
.av-urgf-4.active { background: var(--urg-4); }
.av-urgf-5.active { background: var(--urg-5); }
/* Même mesure que pour les ronds : en blanc, le jaune et l'orange ne tiennent
   pas le contraste. Ces deux cases-là s'écrivent en foncé. */
.av-urgf-2.active, .av-urgf-3.active { color: var(--encre); }
.av-urgf-2.active .av-urgf-r, .av-urgf-3.active .av-urgf-r { background: color-mix(in srgb, var(--encre) 20%, transparent); }
@media (max-width: 719px) {
  /* Doigt, pas souris : la recherche sur toute la largeur, le tri et son sens
     côte à côte, les cases qui grandissent et se replient — jamais de
     défilement de côté —, le statut sur toute la largeur. */
  .av-outils { padding: 10px; gap: 10px; }
  .av-loupe { flex: 1 1 100%; max-width: none; }
  .av-outils .ff.avis-tri-mob { width: auto; flex: 1 1 150px; }
  .av-outils .avis-tri-dir { flex: 0 0 auto; align-self: flex-end; min-height: 44px; }
  .av-urgf { min-height: 42px; padding: 6px 10px 6px 6px; gap: 6px; }
  .av-urgf-groupe { width: 100%; gap: 5px; justify-content: space-between; }
  .av-statut { width: 100%; margin-left: 0; }
  .av-statut .input { width: 100%; min-height: 44px; }
}
/* Le nom du client, en dessous du nom du site : présent, mais discret. */
.av-sous { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.av-table td { vertical-align: middle; }
/* Le technicien du dernier passage : vide tant qu'on ne le connaît pas, et
   vide veut dire vide (ni tiret, ni « inconnu »). */
.av-tech { white-space: nowrap; }
/* Sur la carte (téléphone), le nom se glisse SOUS la ligne des dates. */
.av-c-tech { font-size: 11.5px; }
.av-eq { white-space: nowrap; }
/* Les familles d'appareils : une icône + un nombre, jamais un emoji.
   Le détail en toutes lettres reste en info-bulle sur la case. */
.av-fam { display: inline-flex; align-items: center; gap: 3px; margin-right: 10px; white-space: nowrap; }
.av-fam .ic-btn { width: 16px; height: 16px; }
.av-fam-n { font-variant-numeric: tabular-nums; }
/* Sur la carte du téléphone, la rangée d'icônes se replie : jamais de
   défilement de côté. */
.av-carte .av-eq { white-space: normal; display: flex; flex-wrap: wrap; gap: 2px 0; }
.av-th-vide { width: 44px; }
/* « Planifier » (agenda + un mot) et le petit « ⋯ » (statut, mois) côte à côte. */
.av-acts { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.av-planifier { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 13px; white-space: nowrap; }
.av-planifier .ic-btn { width: 15px; height: 15px; }
.av-plus-de { padding: 6px 10px; }
.av-plus-de .ic-btn { width: 16px; height: 16px; }

/* Le DÉPLIAGE d'une ligne : il s'ouvre SOUS elle. 2 colonnes sur ordinateur,
   1 seule au téléphone — on ne perd jamais la largeur du grand écran. */
.av-panel-row > td { padding: 0; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.av-detail { display: grid; gap: 14px 24px; grid-template-columns: 1fr; padding: 14px 16px; }
.av-d-lib { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 3px; }
.av-d-gens, .av-d-app { font-size: 13px; margin-top: 2px; }
/* La note vient d'Odoo : elle a de vrais sauts de ligne, et ils doivent se
   VOIR. Sans ça, « 8h-12h / fermé le mercredi » s'aplatirait en un pavé. */
.av-d-note { font-size: 13px; white-space: pre-line; overflow-wrap: anywhere; }
.av-d-bloc { min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 720px) { .av-detail { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.av-pan-boutons { display: flex; gap: 8px; flex-wrap: wrap; }
.av-st { display: inline-flex; align-items: center; gap: 6px; }
.av-st .ic-btn { width: 15px; height: 15px; }
.av-st.active { color: var(--accent-300); border-color: var(--accent-700);
  background: color-mix(in srgb, var(--accent) 14%, transparent); }
.av-pan-select { min-width: 130px; }

/* Téléphone : une carte par endroit. Le rond d'urgence reste en tête de carte,
   pour qu'on voie d'un coup d'oeil ce qui presse. */
.av-c-titre { display: flex; align-items: center; gap: 10px; min-width: 0; }
.av-c-titre b { overflow-wrap: anywhere; }
.av-carte .fc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
/* Téléphone : « Planifier » prend toute la largeur de la carte (un gros bouton, au doigt). */
.av-carte .av-planifier { display: flex; justify-content: center; width: 100%; min-height: 44px; margin-top: 10px; font-size: 14px; }
.av-carte .av-detail { padding: 12px 0 0; border-top: 1px solid var(--neutral-800); margin-top: 12px; }
@media (max-width: 719px) {
  /* Doigt, pas souris : les boutons du dépliage prennent toute la largeur. */
  .av-detail { gap: 14px; }
  .av-pan-boutons .av-st { flex: 1; justify-content: center; min-height: 44px; }
  .av-pan-select, .av-c-duree .input { min-height: 44px; }
}

/* ===== C-1 (2026-09-26) — LES COMPTES RENDUS REÇUS =====
   🔴 AUCUNE COULEUR EN DUR : tout passe par les variables du thème, et
   seulement par des variables DÉCLARÉES dans `:root` — une variable inconnue
   rend la règle invalide et l'élément disparaît sans un mot. */
/* le tableau : la colonne SUITE (deux icônes, une info-bulle chacune) */
.cr-suite { display: inline-flex; gap: 6px; align-items: center; }
.cr-suite-ic { display: inline-flex; color: var(--accent-300); }
.cr-suite-ic .ic-btn { width: 17px; height: 17px; }
/* une ligne et une carte sont CLIQUABLES — au doigt comme au clavier */
.cr-l { cursor: pointer; }
.cr-l:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.cr-card { cursor: pointer; }
.cr-l:focus-visible, .cr-card:focus-visible { outline: 2px solid var(--accent-400); outline-offset: -2px; }
.cr-card-marques { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
/* « Renvoyer au technicien » (2026-10-24) : sous 1024 px, « Renvoyer » suffit
   (la fenêtre dit le reste) — la barre collante reste sur une rangée. */
@media (max-width: 1023px) { .cr-renv-mot { display: none; } }
/* Les pastilles de la case CODE ne collent pas au code (Annulée, Chez le technicien). */
/* 01/11 : plus « td:first-child » — la case à cocher a pris la première colonne. */
.cr-l b + .itv-etat, .cr-l .itv-etat + .itv-etat { margin-left: 6px; }
.cr-card-pied { color: var(--muted); font-size: 13px; }
/* Archiver depuis la liste (01/11) : la dernière colonne, une icône discrète. */
.cr-th-act, .cr-td-act { width: 44px; text-align: right; }
.cr-l-archiver { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer; }
.cr-l-archiver:hover { color: var(--text); background: color-mix(in srgb, var(--etat-archivee) 22%, transparent); }
.cr-l-archiver:disabled { opacity: .4; cursor: default; }
.cr-l-archiver .ic-btn { width: 18px; height: 18px; }
/* La sélection (01/11) : une case au début de chaque ligne, la barre des actions en haut du cadre. */
.cr-th-coche, .cr-td-coche { width: 36px; padding-right: 0; }
.cr-coche { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.cr-l-coche { background: color-mix(in srgb, var(--accent) 10%, transparent); }
/* Morceau C : une intervention archivée sans compte rendu ne s'ouvre pas. */
.cr-l.cr-l-sans { cursor: default; }
.cr-sel { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px;
  border-bottom: 1px solid var(--neutral-700); background: color-mix(in srgb, var(--accent) 8%, transparent); font-size: 14px; }
.cr-sel > span:first-child { margin-right: auto; font-weight: 600; }
/* une intervention ANNULÉE après la signature : la ligne entière passe en gris */
.cr-annulee, .cr-annulee b { color: var(--etat-archivee); }
/* ---- l'écran de lecture ---- */
.cr-zone { display: flex; flex-direction: column; gap: 14px; }
.cr-zone .ic-btn { width: 18px; height: 18px; }
.cr-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 6px 0; }
/* 🔴 LA BARRE DU HAUT DE L'APPLI EST COLLANTE AUSSI (`.topbar`, `sticky; top: 0`,
   `z-index: 5`, fond opaque) et elle est VISIBLE sous 860 px. Sans ce décalage, la
   barre « Fermer » passe DESSOUS : le doigt touche la barre du haut, pas le bouton
   (mesuré : `elementFromPoint` au milieu du bouton rend HEADER.topbar, sur un bon de
   41 appareils dépliés). 59 px = 12+12 de rembourrage + 34 d'avatar + 1 de trait. */
@media (max-width: 859px) { .cr-tete { top: 59px; } }
.cr-tete-qui { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; flex-wrap: wrap; }
/* ---- C-2a (2026-09-26) : valider ----
   🔴 AUCUNE COULEUR EN DUR : « Validé le … » reprend `--etat-terminee` (le vert
   des états de la maison), et le mot de la base passe par `.msg` / `.msg.err`. */
.cr-tete-actes { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cr-valide { color: var(--etat-terminee); font-size: 13px; }
/* 🎨 LA BARRE DU COMPTE RENDU (Simon, 03/11 : « plus joli, moins de texte ») — retour · code · « ⋯ », puis des
   tuiles (icône + un mot). Les gestes rares vivent dans « ⋯ ». Téléphone : deux rangées ; dès 720 px : une ligne,
   les mots seulement à partir de 1200 px (le menu de gauche mange la place). Seule CETTE barre (`.cr-nb`) :
   celle des comptes rendus Kizeo ne bouge pas. */
.cr-tete.cr-nb { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; grid-template-areas: "ret qui plus" "actes actes actes";
  align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--neutral-800); border-radius: var(--radius-lg); }
.cr-nb > #cr-fermer { grid-area: ret; }
.cr-nb > .cr-tete-qui { grid-area: qui; min-width: 0; gap: 2px 8px; }
.cr-nb.cr-nb-seul > .cr-tete-qui { grid-column: 2 / -1; }
.cr-nb > .cr-nb-plus { grid-area: plus; }
.cr-nb > .cr-tete-actes { grid-area: actes; display: grid; grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); gap: 8px; width: 100%; }
.cr-nb > .msg { grid-column: 1 / -1; }
.cr-nb-rond { width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border-color: var(--neutral-800); }
.cr-nb-plus[aria-expanded="true"] { background: var(--surface-2); border-color: var(--accent-700); }
.cr-nb .cr-valide { flex-basis: 100%; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-nb .cr-valide b { color: var(--etat-terminee); font-weight: 600; }
.cr-nb-a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 56px; padding: 6px 4px;
  border-radius: 12px; border-color: var(--neutral-800); background: var(--surface-2); font-size: 12.5px; font-weight: 600; }
.cr-nb-a.btn-primary { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); }
.cr-nb-a.cr-nb-vedette { border-color: var(--accent-700); background: var(--accent-900); color: var(--accent-300); }
.cr-nb-mot { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-nb .ic-btn { flex: none; width: 20px; height: 20px; }
.cr-nb .cr-pdf-mot { display: none; }
.cr-nb-menu { position: absolute; right: 12px; top: 60px; z-index: 4; min-width: 240px; display: flex; flex-direction: column; padding: 6px;
  background: var(--surface-2); border-radius: 12px; box-shadow: var(--shadow); }
.cr-nb-menu[hidden] { display: none; }
.cr-nb-m { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; min-height: 44px; padding: 10px 12px;
  border: 0; background: transparent; text-align: left; font-size: 15px; }
.cr-nb-m:hover:not(:disabled) { background: color-mix(in srgb, var(--text) 8%, transparent); }
.cr-nb-m .cr-renv-mot { display: inline; }
.cr-nb-m.cr-nb-danger { color: var(--danger); }
/* La liste « PDF » (03/11) : le look de « ⋯ », posée sous sa tuile par `placerMenuPdf()`. */
.cr-nb-menu.cr-pdf-menu { min-width: 220px; }
/* La fenêtre « Envoyer … ? » (03/11). */
.cr-envoi-a { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 8px; }
.cr-envoi-a > span { font-size: 12px; color: var(--muted); padding-top: 14px; }
.cr-envoi-liste { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cr-envoi-ligne { display: flex; align-items: center; gap: 6px; }
.cr-envoi-ligne .input { flex: 1; min-width: 0; min-height: 44px; }
.cr-envoi-x { flex: none; width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.cr-envoi-plus { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px 28px; min-height: 44px; }
#cr-envoi-ok { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.cr-nb-sep { height: 1px; margin: 4px 6px; background: var(--neutral-800); }
@media (min-width: 720px) {
  .cr-tete.cr-nb { grid-template-columns: 40px minmax(0, 1fr) auto 40px; grid-template-areas: "ret qui actes plus"; row-gap: 6px; padding: 6px 12px; }
  .cr-nb > .msg { margin: 0; }
  .cr-nb.cr-nb-seul > .cr-tete-qui { grid-column: auto; }
  .cr-nb.cr-nb-seul > .cr-tete-actes { grid-column: 3 / -1; }
  .cr-nb-rond { width: 40px; height: 40px; }
  .cr-nb > .cr-tete-actes { display: flex; width: auto; }
  .cr-nb-a { flex-direction: row; min-height: 40px; min-width: 40px; padding: 0 10px; font-size: 14px; }
  .cr-nb-a .cr-nb-mot { display: none; }
  .cr-nb-menu { top: 54px; }
}
@media (min-width: 1200px) {
  .cr-nb-a { gap: 8px; padding: 0 14px; }
  .cr-nb-a .cr-nb-mot { display: inline; }
}
/* Devis depuis un compte rendu (03/11) : la carte du devis, TOUTE LA LARGEUR, FERMÉE par défaut (une ligne :
   numéro, état, total, lignes, « à vérifier ») ; un clic déplie les lignes et les points à vérifier
   (2 colonnes dès 900 px) + la correction et « Refaire ». Maquette validée par Simon le 03/11. */
.cr-devis { margin: 8px 0 0; border: 1px solid var(--neutral-800); border-radius: 12px; background: var(--surface); overflow: hidden; }
/* Commande des plans sur incendieplan.fr (21/11) : une ligne sous l'en-tête — « Plans CMD-212 » en vert,
   ou « Plans non commandés » + le motif + Réessayer. */
.cr-cmd { margin: 8px 0 0; padding: 8px 14px; border: 1px solid var(--neutral-800); border-radius: 12px; background: var(--surface);
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; min-height: 48px; box-sizing: border-box; }
.cr-cmd > .ic-btn { width: 18px; height: 18px; color: var(--muted); flex: none; }
.cr-cmd-mot { color: var(--muted); font-size: 13.5px; flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.cr-cmd .btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
/* 22/11 : le devis complémentaire, sur la même ligne que la commande des plans (lien Odoo, total, « Note en tête »). */
.cr-comp-mot { color: var(--muted); font-size: 13.5px; }
/* 22/11 (Simon) : UNE section « DEVIS » — le devis de la visite puis le devis complémentaire, séparés d’un trait. */
.cr-devis-zone { margin: 8px 0 0; border: 1px solid var(--neutral-800); border-radius: 12px; background: var(--surface); overflow: hidden; }
.cr-devis-zone > h3 { margin: 0; padding: 10px 14px 0; font-size: 13px; letter-spacing: .04em; color: var(--muted); }
.cr-devis-zone > .cr-devis, .cr-devis-zone > .cr-cmd { margin: 0; border: 0; border-radius: 0; background: none; }
.cr-devis-zone > .cr-devis + .cr-cmd { border-top: 1px solid var(--neutral-800); }
@media screen and (max-width: 719px) { .cr-devis-zone .cr-devis-n:not(#cr-devis-origine) { display: none; } }
.cr-devis:not(details) { padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.cr-devis .msg { margin: 0; }
.cr-devis-tete { list-style: none; cursor: pointer; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px;
  position: relative; padding: 10px 44px 10px 14px; min-height: 52px; box-sizing: border-box; }
.cr-devis-tete::-webkit-details-marker { display: none; }
.cr-devis-lien { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-400); text-decoration: none; min-height: 32px; }
.cr-devis-lien .ic-btn { width: 18px; height: 18px; }
.cr-devis-lien:hover b { text-decoration: underline; }
.cr-devis-total { font-weight: 700; font-variant-numeric: tabular-nums; }
.cr-devis-n { color: var(--muted); font-size: 13.5px; }
.cr-devis-av { display: inline-flex; align-items: center; gap: 5px; }
.cr-devis-av .ic-btn { width: 14px; height: 14px; }
.cr-devis-chev { position: absolute; right: 12px; top: 16px; color: var(--muted); display: inline-flex; transition: transform .15s; }
.cr-devis-chev .ic-btn { width: 20px; height: 20px; }
.cr-devis[open] .cr-devis-chev { transform: rotate(180deg); }
.cr-devis-corps { border-top: 1px solid var(--neutral-800); padding: 12px 14px 14px; display: grid; gap: 14px; }
@media (min-width: 900px) { .cr-devis-corps { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; } }
.cr-devis-titre { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; font-weight: 600; }
.cr-devis-lignes { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cr-devis-lignes td { padding: 6px 0; border-bottom: 1px solid color-mix(in srgb, var(--neutral-800) 60%, transparent); vertical-align: top; }
.cr-devis-lignes tr:last-child td { border-bottom: 0; }
.cr-devis-q { width: 34px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cr-devis-art { overflow-wrap: anywhere; }
.cr-devis-art small { display: block; color: var(--muted); font-size: 12px; }
.cr-devis-px { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-left: 10px !important; }
.cr-devis-retire .cr-devis-art { color: var(--muted); text-decoration: line-through; }
.cr-devis-retire .cr-devis-art small { text-decoration: none; }
.cr-devis-verif { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.45; }
.cr-devis-verif li { padding: 8px 10px; border-radius: 8px; overflow-wrap: anywhere;
  background: color-mix(in srgb, var(--etat-attente) 8%, transparent); border-left: 3px solid var(--etat-attente); }
.cr-devis-verif b { color: var(--etat-attente); font-weight: 600; }
.cr-devis-corr { display: flex; gap: 8px; margin-top: 12px; align-items: stretch; }
.cr-devis-corr textarea { flex: 1; min-width: 0; min-height: 44px; resize: vertical; box-sizing: border-box; }
.cr-devis-corr .btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; min-height: 44px; }
.cr-devis-corr .ic-btn { width: 16px; height: 16px; }
@media (max-width: 599px) {
  .cr-devis-tete { gap: 4px 10px; padding-right: 34px; }
  .cr-devis-chev { right: 8px; }
  .cr-devis-corr { flex-direction: column; }
}
.cr-ic { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
/* La fenêtre « Supprimer pour toujours ? » : les deux choix de l'intervention. */
.cr-suppr-choix { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-suppr-choix .btn { flex: 1 1 160px; min-height: 44px; }
#cr-suppr-ok { display: inline-flex; align-items: center; gap: 6px; }
/* « Et ensuite ? » (01/11) : 4 cartes (icône, nom, ligne grise, coche) — une colonne au doigt,
   2 × 2 sur ordinateur ; la choisie prend l'accent. Puis « Envoyer au client » (interrupteur). */
.modal.cr-es { max-width: 560px; }
.cr-es-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.cr-es-tete h3 { margin: 0; }
.cr-es-deja { margin: -4px 0 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.cr-es-cartes { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 560px) { .cr-es-cartes { grid-template-columns: 1fr 1fr; } }
.cr-es-carte { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 12px;
  border: 1px solid var(--neutral-800); border-radius: var(--radius-lg); background: var(--surface-2); color: var(--text);
  font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.cr-es-carte:hover:not(:disabled) { border-color: var(--neutral-700); }
.cr-es-carte.oui { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); }
.cr-es-carte:disabled { opacity: .45; cursor: not-allowed; }
.cr-es-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border-radius: 10px; background: var(--surface); color: var(--accent-400); }
.cr-es-carte.oui .cr-es-ic { background: var(--accent); color: var(--bg); }
.cr-es-ic .ic-btn { width: 20px; height: 20px; }
.cr-es-txt { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cr-es-txt b { font-weight: 600; }
.cr-es-sous { font-size: 12px; color: var(--muted); font-weight: 400; overflow-wrap: anywhere; }
.cr-es-coche { flex: none; width: 20px; height: 20px; color: var(--accent-400); }
.cr-es-coche .ic-btn { width: 20px; height: 20px; }
.cr-es-detail { margin-top: 10px; }
.cr-es-cibles { display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow-y: auto; }
.cr-es-cible { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; width: 100%; min-height: 48px; padding: 8px 12px;
  border: 1px solid var(--neutral-800); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.cr-es-cible.oui { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.cr-es-cible .cr-es-sous { flex-basis: 100%; }
#cr-suite-date { width: 100%; min-height: 44px; }
.cr-es-envoi { margin-top: 14px; width: 100%; }
.cr-es-envoi:has(input:disabled) { opacity: .55; }
/* 22/11 : une longue note (devis complémentaire) ne doit ni écraser l’icône ni allonger la fenêtre : 2 lignes, le reste en info-bulle. */
.cr-es-envoi > .ic-btn, .cr-es-envoi > svg { flex: none; }
#cr-suite-comp-note { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
/* 21/11 : « Fin de visite » modifiable au bureau — le crayon du bloc et sa fenêtre. */
.cr-fin-titre { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cr-fin-crayon { min-height: 36px; min-width: 36px; padding: 6px; color: var(--muted); }
.cr-fin-crayon:hover:not(:disabled) { color: var(--accent-300); }
.cr-fin-crayon .ic-btn { width: 18px; height: 18px; }
@media print { .cr-fin-crayon { display: none; } }
.cr-fin h3 { margin: 0 0 4px; }
.cr-fin .cr-fin-bloc { display: grid; gap: 6px; margin-top: 12px; }
.cr-fin-lab { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--muted); }
.cr-fin-choix { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cr-fin-c { min-height: 44px; justify-content: center; border: 1px solid var(--neutral-700); background: var(--surface-2); color: var(--text); }
.cr-fin-c[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); font-weight: 600; }
.cr-fin .cr-fin-devis { margin-top: 14px; }
/* Le mot de la base prend TOUTE la largeur de la barre : il ne se glisse jamais
   entre deux boutons, et il ne pousse rien hors de l'écran. */
.cr-tete .msg { flex-basis: 100%; margin: 4px 0 0; }
@media (max-width: 719px) {
  /* Au doigt : les deux boutons se partagent la ligne, en entier. */
  .cr-tete-actes { width: 100%; }
  .cr-tete-actes .btn { flex: 1 1 0; }
  /* « PDF client » (21/10) : au doigt il devient « PDF » et prend juste sa place —
     les boutons tiennent sur UNE ligne, la barre collante reste basse (L39). */
  .cr-tete-actes #cr-pdf { flex: 0 0 auto; padding-left: 12px; padding-right: 12px; }
  .cr-pdf-mot { display: none; }
}
.cr-entete, .cr-mvt, .cr-bloc {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 12px 14px; }
/* 🎨 L'EN-TÊTE (21/10) : le client en titre, puis des tuiles. */
.cr-entete { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.cr-en-haut { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cr-en-qui { min-width: 0; }
.cr-en-client { font-size: 20px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.cr-en-lieu { color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.cr-en-type { flex: 0 0 auto; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--accent-300); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.cr-tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.cr-tuile { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 9px 12px;
  border-radius: var(--radius); background: var(--surface-2); }
.cr-tuile .cr-val { font-weight: 600; font-variant-numeric: tabular-nums; }
/* Le devis ouvre son OI (14/11), même pastille que sur le bon (`.bon-oi`, bon.css). */
.cr-tuile[data-cr-en="DEVIS"] { grid-column: span 2; }   /* le numéro entier, jamais coupé */
.cr-oi-liste { display: flex; flex-wrap: wrap; gap: 6px; }
.cr-oi { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 9px; border-radius: 999px;
  font: inherit; font-size: 12px; line-height: inherit; white-space: nowrap; cursor: pointer;
  color: var(--accent-300); background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.cr-oi:hover { background: color-mix(in srgb, var(--accent) 26%, transparent); }
.cr-oi:disabled { opacity: .7; cursor: progress; }
.cr-oi svg { flex: none; width: 13px; height: 13px; }
.cr-oi span { overflow: hidden; text-overflow: ellipsis; }
/* 15/11 : la pastille du devis (OI) + son lien Odoo, collés */
.cr-oi-duo { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; min-width: 0; }
.cr-oi-odoo { padding: 3px 7px; text-decoration: none; }
.cr-entete .cr-consignes { margin-top: 0; }
/* 🎨 14/11 (Simon : « fusionne ces trois parties, plus minimaliste ») : la barre collante, l'en-tête et la ligne
   du devis forment UNE carte. Seulement à l'ÉCRAN et seulement le compte rendu de l'appli (`.cr-en-nb`) :
   le papier et l'en-tête Kizeo (`cr-kizeo.js`, mêmes classes) ne bougent pas.
   La barre garde sa place collante ; l'en-tête se colle dessous (le `gap` de 14 px de `.cr-zone` est repris). */
@media screen {
  .cr-tete.cr-nb { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .cr-nb .cr-nb-client { font-size: 18px; font-weight: 600; line-height: 1.25; min-width: 0; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cr-nb .cr-nb-type { padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
    color: var(--accent-300); background: color-mix(in srgb, var(--accent) 14%, transparent); }
  .cr-nb .cr-nb-sous { flex-basis: 100%; min-width: 0; font-size: 12.5px; color: var(--muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cr-nb .cr-nb-sous > b { color: var(--text); font-weight: 600; }
  .cr-nb .cr-nb-sous .cr-valide { display: inline; flex-basis: auto; font-size: inherit; }
  .cr-nb + .cr-ident + .cr-en-nb { margin-top: -14px; border: 1px solid var(--neutral-800); border-top: 0;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg); box-shadow: none; }
  .cr-en-nb { padding: 10px 14px 12px; gap: 10px; }
  .cr-en-nb .cr-en-client, .cr-en-nb .cr-en-type { display: none; }
  .cr-en-nb .cr-en-lieu { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 13.5px; }
  .cr-en-nb .cr-tu-ic { display: inline-flex; flex: none; color: var(--muted); }
  .cr-en-nb .cr-tu-ic .ic-btn { width: 16px; height: 16px; }
  .cr-en-nb .cr-en-lieu .cr-tu-ic { margin-top: 1px; }
  .cr-en-nb .cr-tuiles { display: flex; flex-wrap: wrap; gap: 6px 18px; }
  .cr-en-nb .cr-tuile { flex-direction: row; align-items: center; gap: 6px; padding: 0; background: none; }
  .cr-en-nb .cr-tuile[data-cr-en="DEVIS"] { grid-column: auto; }
  .cr-en-nb .cr-lab { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cr-en-nb .cr-val { font-size: 14px; }
  .cr-en-nb [data-cr-en="APPAREILS"] .cr-val::after { content: ' appareils'; font-weight: 400; color: var(--muted); }
  .cr-en-nb [data-cr-en="SIGNÉ LE"] .cr-val::before { content: 'Signé '; font-weight: 400; color: var(--muted); }
  .cr-en-nb .cr-consignes { font-size: 13px; padding: 6px 10px; }
  /* La ligne du devis ferme la carte. */
  .cr-en-nb.cr-en-nb:has(+ .cr-devis) { border-bottom: 0; border-radius: 0; }   /* doublé : passe devant `.cr-nb + .cr-ident + .cr-en-nb` */
  .cr-en-nb + .cr-devis { margin-top: -14px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
}
@media screen and (max-width: 719px) {
  .cr-nb .cr-nb-type { display: none; }
  .cr-nb .cr-nb-client { font-size: 17px; }
  .cr-en-nb .cr-tuiles { gap: 6px 14px; }
  .cr-en-nb + .cr-devis .cr-devis-n:not(#cr-devis-origine) { display: none; }
}
@media print { .cr-en-nb .cr-tu-ic, .cr-nb-client, .cr-nb-type { display: none; } }
/* 🎨 14/11 (Simon : « client et site beaucoup plus visibles », « cliquer pour voir les coordonnées ») :
   le client en grand dans la barre, le NOM du site en clair dans l'en-tête ; les deux ouvrent « Coordonnées ». */
.cr-coord-lien { font: inherit; color: inherit; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; }
.cr-en-lieu.cr-coord-lien { width: auto; max-width: 100%; }
@media print { .cr-en-lieu.cr-coord-lien { color: var(--muted); } }
@media screen {
  .cr-nb .cr-nb-client { font-size: 21px; font-weight: 700; letter-spacing: -.01em;
    text-decoration: underline dotted color-mix(in srgb, var(--text) 35%, transparent); text-underline-offset: 5px; }
  .cr-nb .cr-nb-client:hover, .cr-nb .cr-nb-client:focus-visible { color: var(--accent-300); text-decoration-color: currentColor; }
  .cr-en-nb .cr-en-lieu { font-size: 15px; color: var(--muted); padding: 2px 0; border-radius: 6px; }
  .cr-en-nb .cr-en-lieu .cr-en-site { color: var(--text); font-weight: 600; font-size: 16px;
    text-decoration: underline dotted color-mix(in srgb, var(--text) 35%, transparent); text-underline-offset: 4px; }
  .cr-en-nb .cr-en-lieu .cr-tu-ic { color: var(--accent-300); }
  .cr-en-nb .cr-en-lieu .cr-tu-ic .ic-btn { width: 18px; height: 18px; }
  .cr-en-nb .cr-en-lieu:hover .cr-en-site, .cr-en-nb .cr-en-lieu:focus-visible .cr-en-site { color: var(--accent-300); text-decoration-color: currentColor; }
}
@media screen and (max-width: 719px) {
  .cr-nb .cr-nb-client { font-size: 19px; }
  .cr-en-nb .cr-en-lieu { font-size: 14px; }
}
.cr-coord { width: min(460px, 100%); }
.cr-co-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cr-co-tete h3 { margin: 0; }
.cr-co-ongs { margin: 10px -4px 12px; }
.cr-co-vue { display: flex; flex-direction: column; gap: 12px; }
.cr-co-l { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cr-co-val { overflow-wrap: anywhere; white-space: pre-line; }
.cr-co-lien { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; max-width: 100%;
  min-height: 44px; padding: 8px 14px; border-radius: var(--radius); font-weight: 600; text-decoration: none;
  color: var(--accent-300); background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.cr-co-lien:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.cr-co-lien span { overflow-wrap: anywhere; }
.cr-co-lien .ic-btn { flex: none; width: 18px; height: 18px; }
.cr-co-sous { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--neutral-800);
  font-size: 11px; font-weight: 600; letter-spacing: .6px; color: var(--accent-300); }
/* 22/11 : corriger les coordonnées (crayon + formulaire dans la fenêtre). */
.cr-coord { max-height: calc(100dvh - 32px); overflow-y: auto; }
.cr-co-vue > .msg { margin: 0; }
.cr-co-actes { display: flex; justify-content: flex-end; margin-bottom: -6px; }
.cr-co-modif { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.cr-co-pers { display: flex; align-items: flex-start; gap: 8px; }
.cr-co-pers + .cr-co-pers { padding-top: 10px; border-top: 1px dashed var(--neutral-800); }
.cr-co-pers-l { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.cr-co-pers .cr-co-modif { flex: none; min-width: 44px; min-height: 44px; justify-content: center; }
.cr-co-sous-0 { margin-top: 0; padding-top: 0; border-top: 0; }
.cr-co-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-top: 10px; }
.cr-co-form .ff { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cr-co-form .ff > span { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.cr-co-form .input { width: 100%; min-width: 0; font-size: 16px; }
.cr-co-form textarea.input { resize: vertical; }
.cr-co-large { grid-column: 1 / -1; }
@media (max-width: 520px) { .cr-co-grille { grid-template-columns: 1fr; } }
.cr-bloc h3 { margin: 0 0 10px; font-size: 13px; letter-spacing: .04em; color: var(--muted); }
.cr-cp { display: grid; grid-template-columns: 160px 1fr; gap: 8px; padding: 3px 0; align-items: start; }
.cr-lab { color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.cr-val { min-width: 0; overflow-wrap: anywhere; }
.cr-pt { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.cr-pt-ok { background: var(--etat-terminee); }
.cr-pt-attente { background: var(--etat-attente); }
.cr-pt-du { background: var(--etat-du); }
.cr-puces { margin: 0; padding-left: 18px; }
.cr-consignes { margin-top: 8px; padding: 8px 10px; border-radius: var(--radius);
  color: var(--consigne-texte); background: var(--consigne-fond); }
.cr-familles { display: flex; flex-direction: column; gap: 10px; }
.cr-fam { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.cr-fam-tete { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px;
  padding: 10px 14px; background: none; border: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.cr-fam-nom { font-weight: 600; flex: 1; }
.cr-chev { display: inline-flex; }
.cr-chev .ic-btn { transition: transform .15s ease; }
.cr-fam.ouvert .cr-chev .ic-btn { transform: rotate(180deg); }
.cr-fam-corps { display: flex; flex-direction: column; gap: 10px; padding: 0 10px 12px; }
.cr-mvt { box-shadow: none; background: var(--surface-2); }
.cr-app-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; margin-bottom: 6px; }
.cr-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cr-photo { display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  width: 104px; height: 104px; border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.cr-photo img { width: 100%; height: 100%; object-fit: cover; }
/* 21/11 (suggestion 13) : les photos du devis, en haut sous « DEVIS » : des vignettes, pas des affiches. */
.cr-entete .cr-photos .cr-photo { width: 76px; height: 76px; }
.cr-photo-non { flex-direction: column; color: var(--muted); font-size: 11px; text-align: center;
  border: 1px dashed var(--neutral-700); }
.cr-sigs { display: flex; gap: 14px; flex-wrap: wrap; }
.cr-sig { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
/* 🔴 LA SIGNATURE ÉTAIT INVISIBLE (Simon, 28/09 : « blanc sur blanc »).
   Le trait vaut `TRAIT` (`bon-signature.js`) = #e9e9ed, et ce fond valait
   `var(--text)` = #e9e9ed : la même couleur, contraste 1:1. L'image était bien
   là — sélectionnable, déplaçable — mais on ne la voyait pas.
   LE REMÈDE : fond NOIR puis INVERSION. Le filtre s'applique AUSSI au fond, donc
   #000 devient blanc et le trait clair devient sombre. On obtient une signature
   sombre sur blanc, À L'ÉCRAN COMME AU PAPIER — alors qu'un simple fond sombre
   marcherait à l'écran et imprimerait un rectangle noir.
   ⚠️ `#000` est une valeur de CALCUL (255 − 0 = 255), pas une couleur de thème :
      une variable casserait l'arithmétique de l'inversion. */
.cr-sig-img { max-width: 220px; background: #000; filter: invert(1); border-radius: var(--radius); }
.cr-sig-non, .cr-sig-abs { color: var(--muted); font-size: 13px; }
/* 22/11 (vitesse) : la place d'une signature encore en route (bon_signatures_lire). */
.cr-sig-attente { display: block; width: 220px; max-width: 100%; height: 80px; background: var(--surface-2); border-radius: var(--radius); }
/* 🔴 L'IDENTITÉ DU COMPTE RENDU, POUR LE PAPIER SEULEMENT. Le code, l'état de
   l'intervention et « Validé le … » ne vivent que dans la barre collante, et
   l'impression supprime la barre : sans ce bloc, une feuille classée ne dit
   même pas de quel compte rendu elle parle.
   ⚠️ CACHÉ PAR UNE CLASSE, JAMAIS PAR L'ATTRIBUT `hidden` : `[hidden]` est
      `display: none !important` (plus haut dans ce fichier), et aucune règle
      d'impression ne peut le défaire — mesuré. */
.cr-ident { display: none; font-size: 13px; margin: 0 0 10px; }
/* LA LISTE SIMPLE ET SA FICHE (Simon, 21/10) : une ligne par appareil, un clic
   ouvre la fiche en pop-up (les classes `.modal` de la maison). */
.cr-liste { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.cr-ligne { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto auto; grid-template-areas: "num quoi etat stat";
  align-items: center; gap: 4px 12px; width: 100%; min-height: 48px; padding: 8px 12px; background: none; border: 0;
  border-top: 1px solid var(--neutral-800); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.cr-ligne:first-child { border-top: 0; }
.cr-ligne:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.cr-ligne:focus-visible { outline: 2px solid var(--accent-400); outline-offset: -2px; }
/* 23/11 : un appareil qui PART du parc sans remplaçant : en retrait, ce qui reste passe devant. */
.cr-ligne-part { opacity: .55; min-height: 40px; }
.cr-ligne-part .cr-li-num, .cr-ligne-part .cr-li-type { font-weight: 400; }
.cr-li-num { grid-area: num; font-weight: 600; font-variant-numeric: tabular-nums; }
.cr-li-sans { color: var(--muted); font-weight: 400; }
.cr-li-quoi { grid-area: quoi; display: flex; flex-direction: column; min-width: 0; }
.cr-li-type { overflow-wrap: anywhere; }
.cr-li-lieu { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.cr-li-danger { display: inline-flex; margin-right: 6px; color: var(--danger); vertical-align: -3px; }
.cr-li-annee { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid var(--neutral-800); border-radius: 999px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; vertical-align: 1px; white-space: nowrap; }
.cr-li-etat { grid-area: etat; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; color: var(--muted); font-size: 13px; }
/* Le point de l'état : la couleur des Réglages, par les variables du thème. */
.cr-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.cr-dot-terminee { background: var(--etat-terminee); }
.cr-dot-attente  { background: var(--etat-attente); }
.cr-dot-du       { background: var(--etat-du); }
.cr-li-photos { display: inline-flex; align-items: center; gap: 2px; font-variant-numeric: tabular-nums; }
.cr-li-photos .ic-btn { width: 15px; height: 15px; }
/* La note interne (27/11) : une bulle violette, sur la ligne et sur l'entête de la famille. */
.cr-li-note { display: inline-flex; color: var(--accent); }
.cr-li-note .ic-btn { width: 19px; height: 19px; }
.cr-fam-note { display: inline-flex; align-items: center; gap: 3px; color: var(--accent); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cr-fam-note .ic-btn { width: 16px; height: 16px; }
.cr-li-stat { grid-area: stat; display: inline-flex; }
/* La pastille de l'opération : longue (« Vérification annuelle, MAA »), elle passe à la ligne. */
.cr-li-op { white-space: normal; max-width: 180px; text-align: center; }
/* Les consommables vendus (14/11) : sous-lignes discrètes, sous l'appareil. */
.cr-ligne:has(.cr-li-conso) { grid-template-areas: "num quoi etat stat" ". conso conso conso"; }
.cr-li-conso { grid-area: conso; display: flex; flex-direction: column; gap: 1px; min-width: 0; margin-top: -2px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.cr-li-co { display: flex; align-items: center; gap: 5px; min-width: 0; }
.cr-li-co .ic-btn { width: 12px; height: 12px; flex: 0 0 auto; color: var(--accent-400); }
.cr-li-co-nom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-li-co-qte { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.modal.cr-fiche { width: min(640px, 100%); padding: 0; display: flex; flex-direction: column; max-height: 92vh; }
.cr-fiche .itv-aj-tete h3 { min-width: 0; font-size: 16px; overflow-wrap: anywhere; }
.cr-fiche .itv-aj-tete .itv-etat { margin-left: auto; }
.cr-fiche-corps { padding-bottom: 18px; }
.cr-fiche .cr-photo { width: 160px; height: 160px; }
/* 🎨 LA FICHE (21/10) : état en gros, échéance en alerte, sections titrées. */
.cr-fi-qui { min-width: 0; }
.cr-fi-lieu { color: var(--muted); font-size: 13px; margin-top: 3px; }
.cr-fiche-corps { display: flex; flex-direction: column; gap: 16px; }
.cr-fi-etat { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cr-fi-etat-val { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; }
.cr-fi-etat-val .cr-dot { width: 12px; height: 12px; }
.cr-fi-alerte { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: var(--radius);
  border-left: 3px solid var(--etat-du); background: color-mix(in srgb, var(--etat-du) 12%, transparent); }
.cr-fi-alerte > span:last-child { font-weight: 600; }
.cr-fi-tuiles { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.cr-fi-sec { display: flex; flex-direction: column; gap: 8px; }
.cr-fi-titre { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.cr-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cr-chips li { padding: 4px 10px; border-radius: 999px; font-size: 13px; background: var(--surface-2); }
.cr-chips-prevoir li { color: var(--etat-attente); background: color-mix(in srgb, var(--etat-attente) 14%, transparent); }
.cr-conso { list-style: none; margin: 0; padding: 0; border-radius: var(--radius); background: var(--surface-2); }
.cr-conso li { display: grid; grid-template-columns: minmax(0, 1fr) auto 64px; gap: 10px; padding: 8px 12px; align-items: center; }
.cr-conso li + li { border-top: 1px solid var(--neutral-800); }
.cr-co-nom { overflow-wrap: anywhere; }
.cr-co-qte { color: var(--muted); font-variant-numeric: tabular-nums; }
.cr-co-prix { text-align: right; font-variant-numeric: tabular-nums; }
/* Les PLANS dans la vue d'un compte rendu — 14/11 : une FAMILLE comme les autres (`cr-fam`), des
   lignes `cr-ligne` ; un plan s'ouvre au clic (sa fiche), comme un extincteur ; MÉTRAGE et
   RELEVÉ ne s'ouvrent pas (lignes `div`). Les NON en rouge. */
div.cr-pl-ligne { cursor: default; }
div.cr-pl-ligne:hover { background: none; }
.cr-pl-non { color: var(--etat-du); font-weight: 600; }
/* Les PRODUITS (14/11) : une famille de plus après PLANS ; le prix à droite ; « Hors liste » /
   « Prix modifié » en petites pastilles orange (bon.css n'est pas chargé au bureau). */
.cr-pr-ligne .cr-li-quoi { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.cr-pr-ligne .bon-cb-hors { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 600;
  color: var(--etat-attente); border: 1px solid var(--etat-attente); }
.cr-pr-prix { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Le RELEVÉ (interne) : la dernière ligne de PLANS, une petite pastille par PDF. */
.cr-rl-pills { min-width: 0; }
.cr-rl-pill { display: inline-flex; align-items: center; gap: 4px; max-width: 160px; min-height: 28px; padding: 2px 9px;
  border: 1px solid var(--neutral-700); border-radius: 999px; background: none; color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.cr-rl-pill:hover { border-color: var(--accent); }
.cr-rl-pill:disabled { opacity: .7; cursor: progress; }
.cr-rl-pill .ic-btn { flex: none; width: 13px; height: 13px; color: var(--accent-400); }
.cr-rl-pill > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-rl-purge { cursor: default; color: var(--muted); }
.cr-fi-note { display: flex; flex-direction: column; gap: 3px; padding: 9px 12px; border-radius: var(--radius); background: var(--surface-2); }
.cr-fi-sec .cr-photos { margin-top: 0; }
@media (max-width: 719px) {
  /* Doigt, pas souris. Et JAMAIS de défilement horizontal : les couples
     passent sur deux lignes au lieu de pousser la page. */
  .cr-cp { grid-template-columns: 1fr; gap: 2px; }
  .cr-tete .btn { min-height: 52px; }
  .cr-fam-tete { min-height: 52px; }
  .cr-photo { width: calc(50% - 4px); height: 128px; }
  .cr-sig-img { max-width: 100%; }
  /* 20/11 : la pastille d'opération à droite du NOM l'écrasait (14 px, une lettre par ligne).
     Le nom prend toute la largeur ; la pastille descend à côté de l'état. */
  .cr-ligne { grid-template-columns: 58px minmax(0, 1fr) auto; grid-template-areas: "num quoi quoi" "num etat stat"; min-height: 56px; }
  .cr-ligne:has(.cr-li-conso) { grid-template-areas: "num quoi quoi" "num etat stat" ". conso conso"; }
  .cr-li-op { max-width: 100%; }
  /* Une LONGUE (« Vérification annuelle, MAA ») descend sur sa propre ligne, à droite. */
  .cr-ligne:has(.cr-li-op-long) { grid-template-areas: "num quoi quoi" "num etat etat" "num stat stat"; }
  .cr-ligne:has(.cr-li-op-long):has(.cr-li-conso) { grid-template-areas: "num quoi quoi" "num etat etat" "num stat stat" ". conso conso"; }
  .cr-ligne:has(.cr-li-op-long) .cr-li-stat { justify-self: end; }
  .cr-li-etat { font-size: 12px; }
  .modal-fond.cr-fiche-fond { padding: 0; place-items: end center; }
  .modal.cr-fiche { width: 100%; max-height: 100vh; height: 100vh; border-radius: 0; }
  .cr-fiche .itv-aj-x { width: 44px; height: 44px; }
  .cr-fiche .cr-photo { width: calc(50% - 4px); height: 160px; }
  .cr-tuiles, .cr-fi-tuiles { grid-template-columns: 1fr 1fr; }
  .cr-en-haut { flex-direction: column; gap: 8px; }
  .cr-en-client { font-size: 18px; }
}
/* Les trois sortes se reconnaissent SANS LIRE : le batiment du siege prend la
   couleur d'accent, la punaise barree du « non range » reste grise et discrete. */
.tr.end-siege .t-ico { color: var(--accent-300); }
.tr.end-non_range .t-ico { color: var(--muted); opacity: .75; }
.tr.end-non_range .t-name { color: var(--muted); }
/* ===== Encart « Entreprise » (fiche client + création) : création, état, procédures ===== */
.ent-procs { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ent-procs li { display: flex; gap: 10px; align-items: baseline; font-size: 13px; }
.ent-procs-date { flex: 0 0 auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.ent-procs-nat { min-width: 0; overflow-wrap: anywhere; }
.ent-alerte:empty { display: none; }
.ent-alerte .badge { display: inline-flex; align-items: center; }
.nc-ent { margin-top: 14px; }
.fiche-ent { margin-bottom: 14px; }
.fiche-chiffres .fc-ligne b .badge { font-size: 12px; }

/* =========================================================
   IMPRIMER LE COMPTE RENDU INTERNE (2026-09-30)
   fiche 2026-09-28-compte-rendu-interne-imprimable-design.md (v5)

   🔴 CE BLOC EST LE DERNIER DU FICHIER, ET IL DOIT LE RESTER.
      Une A4 imprimable fait 688 px (794 − 2 × 14 mm). Le bloc « ordinateur »
      (min-width: 860px) n'est donc JAMAIS atteint, et le bloc « doigt »
      (max-width: 719px) s'applique ENCORE. On reprend l'un et on DÉFAIT
      l'autre — et à spécificité égale, c'est le dernier écrit qui gagne.
      Remonter ce bloc casse quatre règles d'un coup (mesuré).

   🔴 ON N'IMPRIME PAS LES FONDS, donc PAS de `print-color-adjust: exact`
      global : le `body` porte un dégradé avec un #1b1e30 ÉCRIT EN DUR
      qu'aucune variable ne neutralise — on sortirait une page noire et une
      cartouche vide. On redéfinit donc les variables et on assombrit.
      UNE SEULE EXCEPTION, nommée : la signature (voir plus bas).

   📌 CE BLOC EST GLOBAL : tous les écrans s'impriment mieux. Mais seul le
      compte rendu est regardé, mesuré et promis.
   ========================================================= */
@media print {
  @page { size: A4; margin: 14mm; }

  /* LES COULEURS, CALCULÉES — pas choisies à l'œil. Chacune est assombrie
     JUSTE assez pour atteindre 4,5:1 sur blanc, en gardant sa TEINTE : le
     bleu reste bleu, le vert reste vert.
     📌 Rien à faire pour --neutral-700 (6,5:1), --neutral-800 (10,0:1),
        --urg-1 (5,4:1), --urg-4 (5,5:1), --urg-5 (5,7:1) : ils passent déjà. */
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --text: #000000;
    --muted: #707590;
    --accent: #7867d0;
    --accent-300: #6d5ff8;
    --accent-400: #715df9;
    --danger: #d73e3e;
    --ok: #34855f;
    --warn: #957118;
    --etat-traiter: #0073eb;
    --etat-attente: #a86819;
    --etat-du: #d73e3e;
    --etat-terminee: #34855f;
    --etat-archivee: #707590;
    --consigne-texte: #92720c;
    --consigne-fond: #ffffff;
    --urg-2: #8c7504;
    --urg-3: #bc5b1b;
    /* LES OMBRES S'IMPRIMENT, LES FONDS NON (mesuré : retirer une ombre change
       11 262 octets du PDF, retirer les fonds en change 28). Le flou noir
       laisserait un HALO GRIS sous chaque bloc : on le ramène à un filet. */
    --shadow: 0 0 0 1px #999;
  }

  /* Le dégradé du body est écrit en dur : aucune variable ne l'atteint. Il ne
     s'imprime pas tant que les fonds sont coupés — mais il suffit de cocher
     « Graphismes d'arrière-plan » pour obtenir une page sombre. */
  body { background: #fff; background-image: none; }

  /* L'ÉCRAN DE L'APPLI DISPARAÎT. `.page-head` en fait partie : quand un
     compte rendu est ouvert, le titre « Interventions » et son bouton « + »
     sont TOUJOURS là (app.js ne remplace que #itv-zone) — mesuré, le « + »
     sortait en carré vide encadré en haut de la page 1. */
  .topbar, .drawer, .drawer-overlay, .drawer-expand, .page-head, .tabs,
  .cr-tete, .cr-chev, .ptr { display: none !important; }

  /* LA COQUILLE, EN PLEINE LARGEUR. ⚠️ Les 688 px sont la largeur de la VRAIE
     appli : dans le banc on lit 656 px, parce que `#scene` y porte
     `padding: 16px`. Ce chiffre se confirme d'un Ctrl+P sur `index.html`, pas
     depuis un banc. Sans le padding à 0,
     ~2,5 cm de blanc restent collés en fin de document. */
  .app-shell { max-width: none; margin: 0; min-height: auto; }
  .content { padding: 0; }

  /* L'identité du compte rendu ne se voit QU'ICI. */
  .cr-ident { display: block; }

  /* ON DÉFAIT LE BLOC 719 — relevé exhaustif du CSSOM : ce sont ses quatre
     règles qui touchent des éléments visibles à l'impression.
     📌 `160px` FIXE, pas `minmax(160px, max-content)` : le libellé le plus
        long (« DEVIS COMPLÉMENTAIRE ») fait 158,8 px, il tient. Et `minmax`
        serait PIRE : chaque `.cr-cp` est sa PROPRE grille, donc un libellé
        trop long désalignerait sa valeur de toutes les autres lignes. */
  .cr-cp { grid-template-columns: 160px 1fr; gap: 8px; }
  /* Un titre de famille est un `<button>` : à l'impression il doit avoir l'air
     d'un titre. Sans ça, 52 px de papier par famille (mesuré : 30,5 px après).
     📌 `14px` et pas `0` : `.cr-fam-corps` garde `padding: 0 10px 12px`, et à
        `0` le titre sortirait de la colonne, à gauche de ses appareils. */
  .cr-fam-tete { min-height: auto; padding: 4px 14px; }

  /* LA VIGNETTE. 🔴 LA TAILLE VA SUR L'`img`, PAS SUR LE CADRE : `.cr-photo`
     est un `inline-flex`, et en `width: auto` l'img (`width: 100%`) ne peut
     plus résoudre son pourcentage — elle contribue sa taille intrinsèque et on
     obtient une BANDE DE 16 CM avec un timbre-poste au milieu (mesuré).
     Avec la taille sur l'img : 37,3 × 28,0 mm.
     ⚠️ `contain`, jamais `cover` : `cover` ROGNE la photo, et c'est justement
        le défaut qu'on voulait montrer. */
  .cr-photo { width: auto; height: auto; overflow: visible; }
  .cr-photo img { width: auto; height: auto; max-width: 40mm; max-height: 28mm; object-fit: contain; }
  .cr-photo-non { width: 28mm; height: 28mm; }

  /* 🔴 LA SIGNATURE — LA SEULE EXCEPTION DE TOUT LE BLOC.
     `.cr-sig-img` porte `background: #000` + `filter: invert(1)` : à l'écran
     ça donne un trait sombre sur blanc (remède de la 1.116.02). Mais
     l'impression ne peint pas les fonds, et le filtre force une
     RASTÉRISATION : sans son fond, la couche part du noir et l'inversion ne
     rend plus le blanc. MESURÉ TROIS FOIS, dont une sur une vraie page avec ce
     bloc complet : fond vu 16/255 et 97 % de pixels noirs SANS `exact`,
     240/255 AVEC (trait à 22/255). Sans cette ligne, le papier porte un
     RECTANGLE NOIR à la place des deux signatures — c'est-à-dire précisément
     ce qui rend une feuille classable.
     📌 L'exception ne porte que sur `.cr-sig-img`. La propriété est HÉRITÉE,
        mais un `img` n'a pas de descendant : le dégradé du body n'est pas
        concerné.
     📌 La largeur : `:2924` (bloc 719) remplace le `max-width: 220px` par
        `100%`, et cette règle s'applique encore à 688 px. Mesuré ici : 60,0 mm. */
  .cr-sig-img { max-width: 60mm;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* CE QUI SE LIT PAR SON FOND DEVIENT INVISIBLE.
     Les consignes de site sont du texte clair sur fond sombre, et leur règle
     n'a AUCUN `border` : il faut le lui donner, sinon elles flottent. */
  .cr-consignes { border: 1px solid #999; }
  /* Et les cartes d'appareil posent `box-shadow: none` : redéfinir --shadow ne
     les touche pas. Sur 41 appareils, rien ne séparait deux appareils. */
  .cr-mvt { box-shadow: 0 0 0 1px #ccc; }
  .cr-tuile { box-shadow: 0 0 0 1px #ccc; }

  /* RIEN N'EST COUPÉ EN DEUX.
     ⚠️ Leur preuve n'est PAS le nombre de pages (mesuré : 6 avec comme sans) :
        c'est qu'aucun appareil ne soit coupé. Ça se regarde sur le PDF. */
  .cr-entete, .cr-mvt, .cr-bloc, .cr-sigs { break-inside: avoid; }
  .cr-fam-tete { break-after: avoid; }
}

/* ===== Annonces (docs/projet-annonces/design.md) =====
   La fenêtre qui bloque passe AU-DESSUS des fenêtres ordinaires (30) et de la
   visionneuse photo (40), mais SOUS la reconnexion (50). Même forme que .rec-fond.
   Minimaliste : une seule couleur d'accent, des bords fins, de l'air. */
.modal-fond.an-fond { z-index: 45; }
.an-modal { position: relative; padding: 24px; }
.an-ligne { cursor: pointer; }

/* La croix en haut à droite */
.an-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.an-x:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
.an-x .ic-inline { width: 18px; height: 18px; }

/* L'en-tête : pastille, auteur, date, titre */
.an-entete { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding-right: 36px; }
.an-pastille { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%;
  color: var(--accent-300); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.an-pastille .ic-inline { width: 20px; height: 20px; }
.an-de { display: flex; flex-direction: column; line-height: 1.25; }
.an-de b { font-weight: 600; font-size: 14px; }
.an-de span { color: var(--muted); font-size: 12.5px; }
.modal .an-titre { margin: 0 0 8px; font-size: 20px; font-weight: 600; line-height: 1.3; }
.an-texte { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; font-size: 15px; color: var(--text); }
.an-texte ul, .an-texte ol, .an-zone ul, .an-zone ol { margin: 4px 0; padding-left: 22px; white-space: normal; }
.an-texte mark, .an-zone mark { color: inherit; background: color-mix(in srgb, var(--warn) 32%, transparent); border-radius: 3px; padding: 0 2px; }

/* Les photos */
.an-photos { display: grid; gap: 8px; margin-top: 14px; }
.an-photos img { display: block; width: 100%; max-height: 50vh; object-fit: contain; border-radius: var(--radius); background: var(--surface-2); }
.an-photo-ratee { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 96px; border-radius: var(--radius); background: var(--surface-2); color: var(--muted); font-weight: 600; }

/* « J'ai lu » : pleine largeur, une jauge se remplit pendant l'attente */
.an-lu { position: relative; overflow: hidden; width: 100%; margin-top: 20px; padding: 13px 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.an-lu-jauge { position: absolute; inset: 0 auto 0 0; width: 0; background: color-mix(in srgb, var(--accent) 22%, transparent);
  animation: an-jauge linear forwards; }
.an-lu-txt { position: relative; }
.an-lu:not(:disabled) .an-lu-jauge { display: none; }
.an-lu:not(:disabled) { background: color-mix(in srgb, var(--accent) 22%, transparent); }
@keyframes an-jauge { to { width: 100%; } }

/* Les étiquettes d'état (lues, non lue) */
.an-etat { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.an-etat .ic-inline { width: 14px; height: 14px; }
.an-etat-traiter  { color: var(--etat-traiter);  background: color-mix(in srgb, var(--etat-traiter) 12%, transparent); }
.an-etat-attente  { color: var(--etat-attente);  background: color-mix(in srgb, var(--etat-attente) 12%, transparent); }
.an-etat-terminee { color: var(--etat-terminee); background: color-mix(in srgb, var(--etat-terminee) 12%, transparent); }
.an-nb-photos { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 400; vertical-align: middle; }
.an-nb-photos .ic-inline { width: 14px; height: 14px; }

/* Petit titre de section */
.an-section { color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin: 18px 0 8px; }

/* « Lu par » : une ligne par personne, initiales dans un rond */
.an-suivi-tete { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.an-suivi-tete .an-section { margin: 0; }
.an-qui { list-style: none; margin: 8px 0 0; padding: 0; }
.an-qui li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--neutral-800); }
.an-qui li:last-child { border-bottom: 0; }
.an-qui-nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-init { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%;
  font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--surface-2); }
.an-init.lu { color: var(--etat-terminee); background: color-mix(in srgb, var(--etat-terminee) 14%, transparent); }
.an-retirer { margin-right: auto; }
.an-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); }

/* ----- Le formulaire « Nouvelle annonce » ----- */
.an-form { width: min(620px, 100%); }
.modal .an-form-titre { margin: 0 0 16px; padding-right: 36px; font-size: 18px; font-weight: 600; }
.an-champ-titre { width: 100%; box-sizing: border-box; border: 0; border-bottom: 1px solid var(--neutral-800); background: transparent;
  color: var(--text); font: 600 18px/1.4 var(--font); padding: 8px 2px; }
.an-champ-titre:focus { outline: none; border-bottom-color: var(--accent); }
.an-champ-titre::placeholder { color: var(--neutral-700); }

.an-editeur { margin-top: 14px; border: 1px solid var(--neutral-800); border-radius: var(--radius-lg); background: var(--surface-2); }
.an-editeur:focus-within { border-color: var(--accent); }
.an-outils { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--neutral-800); }
.an-outils button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: var(--radius);
  background: transparent; color: var(--muted); cursor: pointer; }
.an-outils button:hover { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.an-outils button.actif { color: var(--accent-300); background: color-mix(in srgb, var(--accent) 20%, transparent); }
.an-outils .ic-inline { width: 18px; height: 18px; }
.an-zone { min-height: 140px; max-height: 40vh; overflow: auto; padding: 12px 14px; outline: none;
  line-height: 1.6; font-size: 15px; color: var(--text); overflow-wrap: anywhere; }
.an-zone:empty::before { content: attr(data-vide); color: var(--neutral-700); }

/* Couleurs du texte (21/11) : le code couleur de l'appli, jamais en dur */
.an-outils { flex-wrap: wrap; }
.an-c-rouge { color: var(--etat-du); }
.an-c-vert { color: var(--etat-terminee); }
.an-c-bleu { color: var(--etat-traiter); }
.an-c-orange { color: var(--etat-attente); }
.an-outils .an-c-trait { stroke: var(--etat-du); }
.an-couleurs { display: flex; gap: 2px; flex-basis: 100%; padding-top: 4px; margin-top: 2px; border-top: 1px dashed var(--neutral-800); }
.an-couleurs[hidden] { display: none; }
.an-pastille-c { width: 18px; height: 18px; border-radius: 50%; background: currentColor; }

/* Photos : tuile « + » et vignettes */
.an-vignettes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.an-vignette { position: relative; width: 76px; height: 76px; }
.an-vignette img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.an-vignette-x { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; display: grid; place-items: center; padding: 0;
  border-radius: 50%; border: 1px solid var(--neutral-800); background: var(--surface); color: var(--text); cursor: pointer; }
.an-vignette-x .ic-inline { width: 14px; height: 14px; }
.an-tuile { min-width: 76px; height: 76px; padding: 0 12px; box-sizing: border-box; display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; border: 1px dashed var(--neutral-700); border-radius: var(--radius);
  color: var(--muted); font-size: 12px; cursor: pointer; }
.an-tuile:hover { color: var(--accent-300); border-color: var(--accent); }
.an-tuile .ic-inline { width: 22px; height: 22px; }
.an-tuile span:empty { display: none; }

/* Pour qui : des pastilles */
.an-pour { display: flex; flex-wrap: wrap; gap: 8px; }
.an-puce { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 14px 4px 5px; border-radius: 999px;
  border: 1px solid var(--neutral-800); background: transparent; color: var(--text); font: 500 14px var(--font); cursor: pointer; }
.an-puce[data-tous] { padding-left: 12px; }
.an-puce .ic-inline { width: 18px; height: 18px; color: var(--muted); }
.an-puce:hover { border-color: var(--neutral-700); }
.an-puce.actif { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-300); }
.an-puce.actif .ic-inline { color: var(--accent-300); }
.an-puce.actif .an-init { color: var(--accent-300); background: color-mix(in srgb, var(--accent) 30%, transparent); }

.an-envoyer { display: inline-flex; align-items: center; gap: 8px; padding-left: 18px; padding-right: 20px; }
.an-envoyer .ic-inline { width: 18px; height: 18px; }
@media (max-width: 719px) {
  .an-modal { padding: 20px 16px; }
  .an-envoyer { justify-content: center; }
}

/* ===== Tâches (docs/projet-annonces/taches-etape2.md) =====
   Urgent / en retard = rouge (--etat-du) ; à faire = bleu ; faite = vert. */
.np-urgent { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--etat-du); background: color-mix(in srgb, var(--etat-du) 14%, transparent); }
.np-date { display: inline-block; font-size: 12.5px; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.np-date.np-retard { color: var(--etat-du); font-weight: 600; }
.np-td-urgence { white-space: nowrap; }

/* Le formulaire : « Urgent » (bouton bascule) + « Pour le » */
.np-urgence { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: -2px 0 14px; }
.np-bascule { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--neutral-800); cursor: pointer; font-weight: 500; user-select: none; }
.np-bascule input { position: absolute; opacity: 0; pointer-events: none; }
.np-bascule::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--neutral-700); }
.np-bascule:has(input:checked) { color: var(--etat-du); border-color: color-mix(in srgb, var(--etat-du) 60%, transparent);
  background: color-mix(in srgb, var(--etat-du) 12%, transparent); }
.np-bascule:has(input:checked)::before { border-color: var(--etat-du); background: var(--etat-du); }
.np-bascule:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.np-pourle { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.np-pourle .input { width: auto; min-width: 160px; }

/* La note ouverte : qui l'a faite, quand */
.np-gens li span:first-of-type { flex: 1; min-width: 0; }
.np-gens li.np-fait { color: var(--text); }
.np-gens .np-quand { margin-left: auto; font-size: 12px; white-space: nowrap; }
.np-gens li.np-fait .np-quand { color: var(--etat-terminee); }
.np-gens li.np-afaire .np-quand { color: var(--etat-traiter); }
.np-qui { color: var(--text); font-size: 14px; }
.nt-info > div:has(> .value > .np-qui) { flex: 1; min-width: 0; }

/* L'encadré du tableau de bord (technicien) */
.tt-resume { margin-bottom: 18px; padding: 16px 18px; }
.tt-resume-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tt-resume-titre { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.tt-resume-titre .ic-inline { width: 20px; height: 20px; color: var(--etat-traiter); }
.tt-resume-nb { color: var(--muted); font-size: 13px; }
.tt-nb-urgent { color: var(--etat-du); font-weight: 600; }
.tt-resume-liste { list-style: none; margin: 12px 0 4px; padding: 0; }
.tt-resume-l { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px 8px 12px; border-radius: var(--radius);
  cursor: pointer; border-left: 3px solid var(--etat-traiter); background: var(--surface-2); margin-bottom: 6px; }
.tt-resume-l.tt-presse { border-left-color: var(--etat-du); }
.tt-resume-l:hover { background: color-mix(in srgb, var(--text) 6%, var(--surface-2)); }
.tt-resume-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.tt-resume-u { display: inline-flex; gap: 6px; flex: none; }
.tt-tout { width: 100%; margin-top: 4px; }

/* La rubrique « Tâches » */
.tt-ligne { cursor: pointer; }
.avis-table tr.tt-presse td:first-child { box-shadow: inset 3px 0 0 var(--etat-du); }
.fiche-carte.tt-presse { box-shadow: inset 3px 0 0 var(--etat-du), var(--shadow); }
.tt-carte-bas { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.tt-pj { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 400; vertical-align: middle; }
.tt-pj .ic-inline { width: 14px; height: 14px; }
@media (max-width: 719px) {
  .tt-resume-l { flex-wrap: wrap; row-gap: 4px; }
  .tt-resume-t { flex-basis: 100%; white-space: normal; }
}

/* ===== Réponses aux tâches (docs/projet-annonces/reponses-etape2b.md) ===== */
.np-nouveau { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  vertical-align: middle; color: var(--accent-300); background: color-mix(in srgb, var(--accent) 22%, transparent); }
.np-fil-carte { margin-top: 14px; }
.np-fil-carte .section-title { margin-top: 0; }
#np-fil { display: flex; flex-direction: column; gap: 10px; }
#np-fil:empty { display: none; }
.np-msg { max-width: 85%; align-self: flex-start; padding: 10px 12px; border-radius: var(--radius-lg);
  background: var(--surface-2); border: 1px solid var(--neutral-800); }
.np-msg.np-moi { align-self: flex-end; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.np-msg-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.np-msg-tete b { color: var(--text); font-weight: 600; }
.np-msg-texte { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; font-size: 14.5px; }
.np-msg .np-pj { margin-top: 8px; }
.np-ecrire { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--neutral-800); }
.np-ecrire textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.np-ecrire .np-pj:empty { display: none; }
.np-ecrire .np-pj { margin-top: 8px; }
.np-r-actes { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.np-r-actes .ic-inline { width: 16px; height: 16px; vertical-align: -3px; }
.np-r-etape { flex: 1; color: var(--muted); font-size: 13px; }
@media (max-width: 719px) {
  .np-msg { max-width: 92%; }
  .np-r-actes #np-r-envoyer { flex: 1 1 100%; padding: 12px 16px; }
}

/* ===== Archiver + messages automatiques (docs/projet-annonces/archiver-etape2c.md) ===== */
.np-evt { align-self: center; max-width: 92%; text-align: center; font-size: 12.5px; color: var(--muted);
  padding: 4px 12px; border-radius: 999px; background: var(--surface-2); }
.tt-faite { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--etat-terminee); background: color-mix(in srgb, var(--etat-terminee) 14%, transparent); }

/* ===== Notifications téléphone (docs/projet-annonces/notifications-etape3a.md) =====
   Le bandeau « Activer » : en bas, non bloquant, SOUS les fenêtres (z-index 30). */
.nf-bandeau { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 25; display: flex; align-items: center; gap: 10px;
  max-width: 560px; margin: 0 auto; padding: 10px 10px 10px 14px; border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.nf-ic { color: var(--accent-300); display: inline-flex; }
.nf-ic .ic-inline { width: 20px; height: 20px; }
.nf-txt { flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; }
.nf-txt .ic-inline { width: 16px; height: 16px; vertical-align: -3px; color: var(--accent-300); }
.nf-bandeau .nf-ok { flex: none; }
.nf-x { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer; }
.nf-x .ic-inline { width: 18px; height: 18px; }
/* L'onglet de Mon profil */
.nf-etat { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 13.5px;
  color: var(--muted); background: var(--surface-2); }
.nf-etat .ic-inline { width: 16px; height: 16px; }
.nf-etat.nf-on { color: var(--etat-terminee); background: color-mix(in srgb, var(--etat-terminee) 14%, transparent); }
.nf-actes { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.nf-ligne { margin: 0; line-height: 1.6; }
.nf-ligne .ic-inline { width: 16px; height: 16px; vertical-align: -3px; color: var(--accent-300); }

/* ===== IA des comptes rendus, étape 1-C (2026-11-01) : les comptes rendus Kizeo =====
   Couleurs : seulement les variables `--etat-*` (À regarder = orange, OK = vert). */
.cr-filtre-regarder { display: inline-flex; align-items: center; gap: 6px; }
.cr-filtre-regarder .ic-btn { width: 16px; height: 16px; }
.cr-filtre-regarder.on { color: var(--etat-attente); border-color: var(--etat-attente);
  background: color-mix(in srgb, var(--etat-attente) 12%, transparent); }
.cr-card-marques .itv-etat + .itv-etat { margin-left: 4px; }
/* La fiche Kizeo : l'encadré « Relecture », bordé à gauche de sa couleur. */
.kz-relecture { border-left: 4px solid var(--etat-terminee); }
.kz-relecture.kz-rel-regarder { border-left-color: var(--etat-attente); }
.kz-rel-tete { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kz-rel-tete h3 { margin: 0; }
.kz-rel-pastille { display: inline-flex; align-items: center; gap: 5px; }
.kz-rel-pastille .ic-btn { width: 14px; height: 14px; }
.kz-constats { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.kz-apps { margin-top: 4px; color: var(--muted); font-size: 13.5px; }
.kz-texte { white-space: pre-wrap; overflow-wrap: anywhere; }
.kz-carte-etat { font-size: 12.5px; color: var(--muted); text-align: right; }
@media (max-width: 719px) {
  .kz-zone .cr-cp { grid-template-columns: 1fr; gap: 2px; }
}
/* Réglages → Relecture : le texte de la règle prend la place, le message dessous. */
.rr-td-texte { min-width: 260px; }
.rr-texte { width: 100%; resize: vertical; min-height: 0; line-height: 1.35; }
.rr-seuil { width: 80px; text-align: center; }
.rr-msg { display: block; font-size: 12.5px; min-height: 0; margin-top: 3px; }
.rr-msg:empty { display: none; }
.rr-msg.ok { color: var(--etat-terminee); }
.rr-msg.err { color: var(--etat-du); }
.rr-carte { display: flex; flex-direction: column; gap: 10px; }
.rr-carte-bas { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rr-carte-seuil { display: flex; flex-direction: column; gap: 4px; }
.rr-carte-seuil > span { font-size: 12px; color: var(--muted); }

/* Réglages → Équipements → « À ranger » (lots Kizeo, 2026-11-02) : une ligne s'ouvre sur son panneau. */
.arg-ligne, .arg-carte { cursor: pointer; }
.arg-ligne.arg-ouvert td { background: var(--accent-900); }
.arg-detail td { background: var(--surface-2); }
.arg-decide { display: flex; flex-direction: column; gap: 10px; padding: 6px 0; cursor: default; }
.arg-decide .ff { max-width: 420px; display: flex; flex-direction: column; gap: 6px; }
.arg-decide .arg-loupe { max-width: none; flex: 0 0 auto; }
.arg-apercu { margin: 0; }
.arg-actes { display: flex; gap: 8px; flex-wrap: wrap; }
.arg-actes .btn { min-height: 44px; }
@media (max-width: 719px) {
  .arg-carte .arg-decide { margin-top: 10px; border-top: 1px solid var(--neutral-800); padding-top: 10px; }
  .arg-actes .btn { flex: 1 1 100%; }
}

/* Zone de toucher ≥ 44 px (bilan qualité nov. 2026) : le DESSIN ne bouge pas,
   seule une zone invisible (::before) déborde autour du bouton pour le doigt. */
.pagin-nav .btn, .itv-chip, .itv-aj-x, .itv-aj-devis-x, .itv-bandeau-lien, .itv-bandeau-x { position: relative; }
.oeil::before, .pagin-nav .btn::before, .itv-chip::before, .itv-aj-x::before,
.itv-aj-devis-x::before, .itv-bandeau-lien::before, .itv-bandeau-x::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%);
}

/* ---- Aperçu d'un PDF dans la page (pdf-vue.js, 12/11 — l'OI du bon) ----
   Téléphone : tout l'écran. Ordinateur : une grande fenêtre centrée. Les pages
   défilent ; la barre du haut reste en place. */
.pdfv-fond {
  position: fixed; inset: 0; z-index: 60; background: color-mix(in srgb, var(--noir) 70%, transparent);
  display: flex; align-items: stretch; justify-content: center;
}
.pdfv {
  display: flex; flex-direction: column; width: 100%; height: 100%;
  background: var(--surface); outline: none;
}
.pdfv-tete {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 16px;
  border-bottom: 1px solid var(--neutral-800); flex: none;
}
.pdfv-titre { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdfv-dl { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.pdfv-x { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; }
.pdfv-pages {
  flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: var(--bg); -webkit-overflow-scrolling: touch;
}
.pdfv-page { display: block; max-width: 100%; height: auto; background: var(--blanc); box-shadow: 0 2px 10px color-mix(in srgb, var(--noir) 40%, transparent); }
@media (min-width: 768px) {
  .pdfv-fond { padding: 3vh 20px; }
  .pdfv { width: min(980px, 100%); height: 94vh; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: 0 18px 50px color-mix(in srgb, var(--noir) 60%, transparent), 0 0 0 1px var(--neutral-800); }
}

/* ---- L'OI à droite du compte rendu (compte-rendu.js, 23/11) ----
   Ordinateur seulement : compte rendu ≈ 60 %, OI ≈ 40 % (Simon, 23/11), le panneau reste en place
   quand on fait défiler le compte rendu. Plus étroit : jamais affiché (fenêtre par-dessus). */
.cr-oi-cote { display: none; }
@media (min-width: 1100px) {
  *:has(> .cr-oi-cote) {
    display: grid; grid-template-columns: minmax(0, 60fr) minmax(0, 40fr); gap: 14px; align-items: start;
  }
  .cr-oi-cote {
    display: flex; flex-direction: column; position: sticky; top: 12px; height: calc(100vh - 24px);
    background: var(--surface); border: 1px solid var(--neutral-800); border-radius: var(--radius-lg); overflow: hidden;
  }
  .cr-oi-cote .pdfv-tete { padding: 6px 6px 6px 12px; }
  .cr-oi-cote .pdfv-dl { min-height: 36px; width: 36px; padding: 0; justify-content: center; }
  .cr-oi-cote .pdfv-dl span { display: none; }
  .cr-oi-cote .pdfv-x { width: 36px; height: 36px; }
}
.cr-oi.cr-oi-on { background: color-mix(in srgb, var(--accent) 34%, transparent); box-shadow: inset 0 0 0 1px var(--accent); }

/* ===== Tâches simples (13/11) — la liste partagée (taches-liste.js) =====
   Filtres en pastilles (Pour / De = petit menu à cases ; Urgent / En retard = bascule),
   une case sur chaque ligne (grisée si on ne peut pas la cocher), cartes au téléphone. */
.tf-barre { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
.tf-boite { position: relative; }
.tf-pastille { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; max-width: 100%;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--neutral-700); background: var(--surface);
  color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.tf-pastille:hover { border-color: var(--muted); }
.tf-pastille.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.tf-pastille .tf-lib { color: var(--muted); }
.tf-pastille .tf-val { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-pastille .ic-inline { width: 14px; height: 14px; }
.tf-pastille:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tf-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 200px; max-width: min(280px, calc(100vw - 32px));
  max-height: 320px; overflow-y: auto; padding: 6px; border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow); border: 1px solid var(--neutral-700); }
.tf-tous { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: var(--radius);
  background: transparent; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; }
.tf-opt { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius); font-size: 14px; cursor: pointer; }
.tf-opt:hover, .tf-tous:hover { background: var(--surface-2); }
.tf-opt input { width: 18px; height: 18px; accent-color: var(--accent); }
.tl-th { cursor: pointer; }
.tl-ligne { cursor: pointer; }
.tl-table tr.tl-ligne:hover td { background: var(--surface-2); }
.tl-ligne:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.nn-coche:disabled { opacity: .35; cursor: not-allowed; }
.nn-coche:disabled:hover { border-color: var(--neutral-700); color: transparent; }
.tl-carte { display: flex; align-items: flex-start; gap: 12px; }
.tl-carte-corps { min-width: 0; flex: 1; }
.tl-carte-corps .nn-titre { overflow-wrap: anywhere; }
.tl-carte-bas { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.tl-point { color: var(--muted); }
/* Au doigt : la case garde 30 px, mais sa zone de toucher fait 44 px (fiche §4). */
@media (max-width: 859px) {
  .tl-carte .nn-coche { position: relative; }
  .tl-carte .nn-coche::after { content: ''; position: absolute; inset: -7px; }
  .tf-pastille { min-height: 40px; }
}

/* 20/11 (suggestion 16) : « OBLIGATOIRE » = rouge doux, partout. Une petite étoile rouge
   derrière le nom du champ, rien de plus (pas de fond, pas de cadre). La même couleur que
   « rappel arrivé » (--etat-du) : aucune couleur nouvelle. */
.oblig { color: var(--etat-du); font-weight: 700; margin-left: 3px; }
/* 21/11 : dans un titre en flex à grand écart (.plf-lib), l'étoile reste collée au mot. */
.plf-lib > .oblig { margin-left: -7px; }
