/* Volt — papier calque, encre, et une seule couleur vive : le signal de l'agent. */

:root {
  --papier: #ECEEE7;
  --feuille: #F6F7F2;
  --feuille-haute: #FFFFFF;
  --encre: #1B1E1C;
  --encre-douce: #3D433F;
  --gris: #6C736D;
  --trait: #D3D7CD;
  --trait-fort: #B9BEB2;
  --signal: #3341E8;
  --signal-doux: #3341E81A;
  --sur-signal: #FFFFFF;
  --retard: #D8432A;
  --retard-doux: #D8432A14;
  --proche: #B7791F;
  --fait: #557A5C;
  --ombre: 0 1px 0 #0000000A, 0 8px 24px -12px #1B1E1C33;
  --rayon: 10px;
  --display: "Bricolage Grotesque", "Geist", system-ui, sans-serif;
  --texte: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="clair"]) {
    --papier: #121417;
    --feuille: #1A1D21;
    --feuille-haute: #22262B;
    --encre: #E7E9E2;
    --encre-douce: #BFC4BC;
    --gris: #8C938C;
    --trait: #2A2F35;
    --trait-fort: #3A4047;
    --signal: #8390FF;
    --signal-doux: #8390FF22;
    --sur-signal: #0E1030;
    --retard: #FF7A5E;
    --retard-doux: #FF7A5E1A;
    --proche: #E5B25A;
    --fait: #8DB894;
    --ombre: 0 1px 0 #FFFFFF08, 0 10px 30px -14px #000000AA;
    color-scheme: dark;
  }
}
:root[data-theme="sombre"] {
  --papier: #121417;
  --feuille: #1A1D21;
  --feuille-haute: #22262B;
  --encre: #E7E9E2;
  --encre-douce: #BFC4BC;
  --gris: #8C938C;
  --trait: #2A2F35;
  --trait-fort: #3A4047;
  --signal: #8390FF;
  --signal-doux: #8390FF22;
  --sur-signal: #0E1030;
  --retard: #FF7A5E;
  --retard-doux: #FF7A5E1A;
  --proche: #E5B25A;
  --fait: #8DB894;
  --ombre: 0 1px 0 #FFFFFF08, 0 10px 30px -14px #000000AA;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--papier);
  color: var(--encre);
  font: 400 15px/1.55 var(--texte);
  font-feature-settings: "ss01", "tnum" 0;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── coque ───────────────────────────────────────────────────────────────── */

.coque { display: grid; grid-template-rows: auto 1fr; height: 100dvh; }

.barre {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 14px 24px 0;
}
.marque {
  font: 700 22px/1 var(--display);
  font-variation-settings: "wdth" 85;
  letter-spacing: -0.02em;
  display: flex; align-items: baseline; gap: 8px;
}
.marque small { font: 400 12px/1 var(--texte); color: var(--gris); letter-spacing: 0; }

.onglets { display: flex; gap: 4px; }
.onglets button {
  border: 0; background: none; padding: 8px 12px; border-radius: 8px;
  color: var(--gris); font-weight: 500;
}
.onglets button[aria-current="page"] { color: var(--encre); background: var(--feuille); box-shadow: inset 0 0 0 1px var(--trait); }
.onglets button:hover { color: var(--encre); }

/* La ligne de signal : l'agent, présent partout, en un seul trait. */
.signal { height: 36px; min-width: 120px; position: relative; }
.signal canvas { width: 100%; height: 100%; display: block; }

.parler {
  display: inline-flex; align-items: center; gap: 10px;
  border: 0; border-radius: 999px; padding: 9px 16px 9px 12px;
  background: var(--encre); color: var(--papier); font-weight: 600;
}
.parler svg { width: 18px; height: 18px; }
.parler:hover { background: var(--signal); color: var(--sur-signal); }

.vue { min-height: 0; overflow: hidden; }

/* ── discussion ─────────────────────────────────────────────────────────── */

.discussion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  height: 100%;
  gap: 0;
}
.fil-colonne { display: grid; grid-template-rows: 1fr auto; min-height: 0; border-right: 1px solid var(--trait); }
.fil { overflow-y: auto; padding: 40px 24px 24px; scroll-behavior: smooth; }
.fil-int { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }

.accueil { padding: 8vh 0 0; }
.accueil h1 {
  font: 600 clamp(34px, 4.4vw, 56px)/1.04 var(--display);
  font-variation-settings: "wdth" 80;
  letter-spacing: -0.035em;
  margin: 0 0 18px;
  text-wrap: balance;
}
.accueil p { color: var(--encre-douce); max-width: 52ch; margin: 0 0 28px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
.suggestions button, .pastille-btn {
  border: 1px solid var(--trait-fort); background: var(--feuille);
  border-radius: 999px; padding: 7px 14px; color: var(--encre-douce);
}
.suggestions button:hover, .pastille-btn:hover { border-color: var(--encre); color: var(--encre); }

.msg { display: grid; gap: 6px; }
.msg .qui { font-size: 12px; color: var(--gris); display: flex; gap: 8px; align-items: center; }
.msg .qui .oral { color: var(--signal); }
.msg.vincent { justify-items: end; }
.msg.vincent .corps {
  max-width: 85%; text-align: left; white-space: pre-wrap;
  color: var(--encre); background: var(--feuille-haute);
  padding: 10px 14px; border-radius: 14px 14px 4px 14px; box-shadow: inset 0 0 0 1px var(--trait);
}
.msg.pilote .corps { padding-left: 16px; border-left: 2px solid var(--trait-fort); }
.msg.pilote.vivant .corps { border-left-color: var(--signal); }
.msg.erreur .corps { border-left-color: var(--retard); color: var(--retard); }

.corps > :first-child { margin-top: 0; }
.corps > :last-child { margin-bottom: 0; }
.corps p { margin: 0 0 .8em; }
.corps h3, .corps h4 { font: 600 17px/1.3 var(--display); margin: 1.2em 0 .4em; letter-spacing: -0.01em; }
.corps ul, .corps ol { padding-left: 1.2em; margin: 0 0 .8em; }
.corps li { margin: .2em 0; }
.corps li::marker { color: var(--gris); }
.corps code { font-size: 13px; background: var(--feuille); padding: 1px 5px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--trait); }
.corps pre { background: var(--feuille); padding: 12px; border-radius: 8px; overflow-x: auto; box-shadow: inset 0 0 0 1px var(--trait); }
.corps pre code { background: none; box-shadow: none; padding: 0; }
.corps a { color: var(--signal); text-underline-offset: 2px; }
.corps blockquote { margin: 0 0 .8em; padding-left: 12px; border-left: 2px solid var(--trait); color: var(--encre-douce); }
.corps hr { border: 0; border-top: 1px solid var(--trait); margin: 1.2em 0; }
.corps table { border-collapse: collapse; margin: 0 0 .8em; font-size: 14px; }
.corps th, .corps td { border-bottom: 1px solid var(--trait); padding: 4px 10px 4px 0; text-align: left; }

.activite { font-size: 13px; color: var(--gris); display: flex; align-items: center; gap: 8px; }
.activite::before {
  content: ""; width: 14px; height: 2px; background: var(--signal); border-radius: 2px;
  animation: battement 1.1s ease-in-out infinite;
}
@keyframes battement { 50% { transform: scaleX(.3); opacity: .5; } }

.composeur { padding: 12px 24px 20px; }
.composeur form {
  max-width: 720px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px;
  background: var(--feuille-haute); border-radius: 16px; padding: 8px 8px 8px 16px;
  box-shadow: inset 0 0 0 1px var(--trait-fort), var(--ombre);
}
.composeur textarea {
  border: 0; background: none; resize: none; outline: none;
  padding: 8px 0; max-height: 40vh; line-height: 1.5;
}
.composeur textarea::placeholder { color: var(--gris); }
.envoyer {
  border: 0; background: var(--encre); color: var(--papier);
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
}
.envoyer:disabled { opacity: .35; cursor: default; }
.envoyer svg { width: 18px; height: 18px; }
.sous-composeur { max-width: 720px; margin: 8px auto 0; display: flex; justify-content: space-between; font-size: 12px; color: var(--gris); }
.lien { border: 0; background: none; padding: 0; color: var(--gris); text-decoration: underline; text-underline-offset: 3px; }
.lien:hover { color: var(--encre); }

/* Panneau « maintenant » : ce qui demande de l'attention, tiré du tableau. */
.maintenant { overflow-y: auto; padding: 40px 24px; display: flex; flex-direction: column; gap: 28px; }
.maintenant h2 {
  font: 600 15px/1.2 var(--display); margin: 0 0 10px; letter-spacing: -0.01em;
  display: flex; justify-content: space-between; align-items: baseline;
}
.maintenant h2 span { font: 400 12px var(--texte); color: var(--gris); }
.rappel {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 10px;
  border: 0; background: none; text-align: left; padding: 8px 0; width: 100%;
  border-bottom: 1px solid var(--trait);
}
.rappel:hover .rappel-titre { text-decoration: underline; text-underline-offset: 3px; }
.rappel .quand { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--gris); grid-row: span 2; padding-top: 2px; min-width: 44px; }
.rappel .quand.retard { color: var(--retard); font-weight: 600; }
.rappel .quand.proche { color: var(--proche); font-weight: 600; }
.rappel-titre { font-weight: 550; font-size: 14px; }
.rappel-detail { font-size: 13px; color: var(--encre-douce); }
.vide-doux { color: var(--gris); font-size: 13px; margin: 0; }

/* ── tableau ────────────────────────────────────────────────────────────── */

.tableau { display: grid; grid-template-rows: auto 1fr; height: 100%; }
.tableau-tete {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 28px 24px 18px;
}
.tableau-tete h1 { font: 600 30px/1 var(--display); font-variation-settings: "wdth" 80; letter-spacing: -0.03em; margin: 0; }
.filtres { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.filtres button {
  border: 1px solid transparent; background: none; padding: 5px 10px; border-radius: 999px;
  color: var(--gris); font-size: 13px;
}
.filtres button[aria-pressed="true"] { border-color: var(--encre); color: var(--encre); }
.bouton {
  border: 0; background: var(--encre); color: var(--papier); border-radius: 10px;
  padding: 9px 14px; font-weight: 600; display: inline-flex; gap: 8px; align-items: center;
}
.bouton.second { background: none; color: var(--encre); box-shadow: inset 0 0 0 1px var(--trait-fort); }
.bouton.danger { background: none; color: var(--retard); box-shadow: inset 0 0 0 1px var(--trait-fort); }
.bouton:disabled { opacity: .5; }

.colonnes {
  display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr));
  gap: 0; overflow-x: auto; min-height: 0; padding: 0 12px 0;
}
.colonne { display: grid; grid-template-rows: auto 1fr; min-height: 0; padding: 0 12px; border-left: 1px solid var(--trait); }
.colonne:first-child { border-left: 0; }
.colonne-tete { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 0 14px; }
.colonne-tete h2 { font: 500 20px/1 var(--display); font-variation-settings: "wdth" 85; letter-spacing: -0.02em; margin: 0; }
.colonne-tete h2 span { color: var(--gris); font: 400 14px var(--texte); margin-left: 6px; font-variant-numeric: tabular-nums; }
.ajouter { border: 0; background: none; color: var(--gris); width: 28px; height: 28px; border-radius: 8px; font-size: 20px; line-height: 1; }
.ajouter:hover { background: var(--feuille); color: var(--encre); }
.pile { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 2px 2px 40px; min-height: 120px; }
.pile.survol { background: var(--signal-doux); border-radius: var(--rayon); }

.carte {
  position: relative; text-align: left; width: 100%;
  background: var(--feuille-haute); border: 0; border-radius: var(--rayon);
  padding: 12px 14px 12px 16px; box-shadow: inset 0 0 0 1px var(--trait);
  display: grid; gap: 6px; touch-action: none; user-select: none;
}
.carte::before { /* le trait de catégorie, à gauche */
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--cat, var(--trait-fort));
}
.carte:hover { box-shadow: inset 0 0 0 1px var(--trait-fort), var(--ombre); }
.carte.bloquee { box-shadow: inset 0 0 0 1px var(--retard); }
.carte.fantome { opacity: .3; }
.carte.attrapee { position: fixed; z-index: 50; pointer-events: none; box-shadow: var(--ombre), inset 0 0 0 1px var(--encre); transform: rotate(-1.2deg); }
.carte-titre { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.carte-action { font-size: 13px; color: var(--encre-douce); line-height: 1.4; }
.carte-bas { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--gris); flex-wrap: wrap; }
.carte-bas .ech { font-variant-numeric: tabular-nums; }
.carte-bas .ech.retard { color: var(--retard); font-weight: 600; }
.carte-bas .ech.proche { color: var(--proche); font-weight: 600; }
.carte-bas .haute { color: var(--encre); font-weight: 600; }
.carte-blocage { font-size: 12.5px; color: var(--retard); background: var(--retard-doux); padding: 4px 8px; border-radius: 6px; }
.colonne[data-col="fait"] .carte { opacity: .72; }
.colonne[data-col="fait"] .carte-titre { text-decoration: line-through; text-decoration-color: var(--trait-fort); }

/* couleurs des catégories : sourdes, pour ne pas concurrencer le signal */
[data-cat="client"] { --cat: #2F6B5A; }
[data-cat="piste"] { --cat: #7A5FB0; }
[data-cat="site"] { --cat: #2C6FA3; }
[data-cat="admin"] { --cat: #8C7A55; }
[data-cat="contenu"] { --cat: #B5653E; }
[data-cat="veille"] { --cat: #5E7C8C; }
[data-cat="outil"] { --cat: #4A4F57; }
[data-cat="autre"] { --cat: var(--trait-fort); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="clair"]) [data-cat="client"] { --cat: #5FB39B; }
  :root:not([data-theme="clair"]) [data-cat="piste"] { --cat: #A890DE; }
  :root:not([data-theme="clair"]) [data-cat="site"] { --cat: #6FA8D8; }
  :root:not([data-theme="clair"]) [data-cat="admin"] { --cat: #C2AE82; }
  :root:not([data-theme="clair"]) [data-cat="contenu"] { --cat: #DB8F68; }
  :root:not([data-theme="clair"]) [data-cat="veille"] { --cat: #8FB0C0; }
  :root:not([data-theme="clair"]) [data-cat="outil"] { --cat: #A3A9B2; }
}
.puce-cat { display: inline-flex; align-items: center; gap: 6px; }
.puce-cat::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--cat); }

/* ── panneau latéral (fiche d'une carte) ───────────────────────────────── */

.voile { position: fixed; inset: 0; background: #0000002E; z-index: 40; animation: apparait .15s ease-out; }
.fiche {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); z-index: 41;
  background: var(--feuille); box-shadow: -1px 0 0 var(--trait), -20px 0 60px -30px #00000066;
  display: grid; grid-template-rows: auto 1fr auto; animation: glisse .2s cubic-bezier(.2,.8,.2,1);
}
@keyframes glisse { from { transform: translateX(24px); opacity: 0; } }
@keyframes apparait { from { opacity: 0; } }
.fiche-tete { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--trait); }
.fiche-tete span { color: var(--gris); font-size: 13px; }
.fermer { border: 0; background: none; width: 34px; height: 34px; border-radius: 8px; color: var(--gris); font-size: 22px; line-height: 1; }
.fermer:hover { background: var(--feuille-haute); color: var(--encre); }
.fiche-corps { overflow-y: auto; padding: 20px 24px 28px; display: grid; gap: 18px; align-content: start; }
.fiche-pied { display: flex; justify-content: space-between; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--trait); }
.titre-saisie {
  border: 0; background: none; outline: none; width: 100%;
  font: 600 26px/1.15 var(--display); font-variation-settings: "wdth" 85; letter-spacing: -0.025em; padding: 0;
}
.champ { display: grid; gap: 6px; }
.champ > span { font-size: 12.5px; color: var(--gris); font-weight: 500; }
.champ input, .champ textarea, .champ select {
  border: 0; border-radius: 8px; background: var(--feuille-haute); padding: 9px 11px;
  box-shadow: inset 0 0 0 1px var(--trait); outline: none; width: 100%;
}
.champ input:focus, .champ textarea:focus, .champ select:focus { box-shadow: inset 0 0 0 1.5px var(--encre); }
.champ textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.segments { display: flex; flex-wrap: wrap; gap: 4px; background: var(--feuille-haute); border-radius: 10px; padding: 3px; box-shadow: inset 0 0 0 1px var(--trait); }
.segments button { flex: 1; border: 0; background: none; border-radius: 8px; padding: 6px 8px; font-size: 13px; color: var(--gris); white-space: nowrap; }
.segments button[aria-pressed="true"] { background: var(--encre); color: var(--papier); }
.historique { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 13px; }
.historique li { display: grid; grid-template-columns: 84px 1fr; gap: 10px; color: var(--encre-douce); }
.historique time { color: var(--gris); font-variant-numeric: tabular-nums; }
.historique .agent { color: var(--signal); }
.section-titre { font: 600 14px var(--display); margin: 8px 0 0; }

/* ── carnet ─────────────────────────────────────────────────────────────── */

.carnet { height: 100%; overflow-y: auto; }
.carnet-int { max-width: 760px; margin: 0 auto; padding: 28px 24px 60px; }
.carnet-int h1 { font: 600 30px/1 var(--display); font-variation-settings: "wdth" 80; letter-spacing: -0.03em; margin: 0 0 6px; }
.carnet-int > p { color: var(--encre-douce); margin: 0 0 22px; max-width: 60ch; }
.noter { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; margin-bottom: 26px; }
.noter select, .noter input { border: 0; border-radius: 10px; padding: 10px 12px; background: var(--feuille-haute); box-shadow: inset 0 0 0 1px var(--trait-fort); outline: none; }
.notes { list-style: none; margin: 0; padding: 0; }
.note { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--trait); align-items: start; }
.note-type { font-size: 12.5px; color: var(--gris); padding-top: 2px; }
.note-type b { display: block; color: var(--encre); font-weight: 600; font-size: 13px; }
.note-texte { line-height: 1.5; }
.note-texte small { display: block; color: var(--gris); margin-top: 4px; font-size: 12px; }
.note .retirer { opacity: 0; border: 0; background: none; color: var(--gris); font-size: 13px; }
.note:hover .retirer, .note .retirer:focus { opacity: 1; }
.note .retirer:hover { color: var(--retard); }

/* ── voix plein écran ───────────────────────────────────────────────────── */

.voix {
  position: fixed; inset: 0; z-index: 60; background: var(--papier);
  display: grid; grid-template-rows: auto 1fr auto; animation: apparait .25s ease-out;
}
.voix-tete { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; }
.voix-etat { font: 500 15px var(--texte); color: var(--gris); display: flex; align-items: center; gap: 10px; }
.voix-etat i { width: 8px; height: 8px; border-radius: 50%; background: var(--trait-fort); }
.voix[data-etat="ecoute"] .voix-etat i, .voix[data-etat="entend"] .voix-etat i { background: var(--signal); }
.voix[data-etat="repond"] .voix-etat i { background: var(--encre); }
.voix-scene { display: grid; grid-template-rows: 1fr auto 1fr; min-height: 0; }
.voix-dit {
  align-self: end; justify-self: center; width: min(760px, 100% - 48px); text-align: center;
  font: 400 clamp(17px, 2.2vw, 21px)/1.45 var(--texte); color: var(--gris); padding-bottom: 20px;
}
.voix-trace { height: min(34vh, 260px); }
.voix-trace canvas { width: 100%; height: 100%; display: block; }
.voix-reponse {
  justify-self: center; width: min(760px, 100% - 48px); overflow-y: auto; padding-top: 20px;
  font: 500 clamp(22px, 3.2vw, 34px)/1.25 var(--display); font-variation-settings: "wdth" 90;
  letter-spacing: -0.02em; text-align: center; text-wrap: balance;
}
.voix-outil { display: block; font: 400 14px var(--texte); color: var(--gris); margin-top: 10px; letter-spacing: 0; }
.voix-pied { display: flex; justify-content: center; gap: 12px; padding: 18px 24px calc(22px + env(safe-area-inset-bottom)); }
.voix-pied .bouton { min-width: 132px; justify-content: center; padding: 12px 18px; }

/* ── connexion ──────────────────────────────────────────────────────────── */

.connexion { height: 100dvh; display: grid; place-items: center; padding: 24px; }
.connexion form { width: min(380px, 100%); display: grid; gap: 14px; }
.connexion .marque { font-size: 44px; margin-bottom: 4px; }
.connexion .trace-connexion { height: 48px; margin: 0 0 18px; }
.connexion input {
  border: 0; border-radius: 12px; padding: 13px 14px; background: var(--feuille-haute);
  box-shadow: inset 0 0 0 1px var(--trait-fort); outline: none;
}
.connexion input:focus { box-shadow: inset 0 0 0 1.5px var(--encre); }
.connexion .bouton { justify-content: center; padding: 13px; }
.message-erreur { color: var(--retard); font-size: 14px; margin: 0; min-height: 1.4em; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80;
  background: var(--encre); color: var(--papier); padding: 10px 16px; border-radius: 10px; font-size: 14px;
  box-shadow: var(--ombre); animation: apparait .2s;
}

/* ── actions à valider ───────────────────────────────────────────────────── */

.validations { padding: 0 24px; display: grid; gap: 10px; max-height: 46vh; overflow-y: auto; }
.validations:empty { display: none; }
.validation {
  max-width: 720px; width: 100%; margin: 0 auto; background: var(--feuille-haute); border-radius: 14px;
  padding: 14px 16px; box-shadow: inset 0 0 0 1.5px var(--proche), var(--ombre); display: grid; gap: 10px;
}
.validation header { display: flex; gap: 10px; align-items: baseline; }
.validation header strong { font-weight: 600; line-height: 1.35; }
.point-attente { width: 8px; height: 8px; border-radius: 50%; background: var(--proche); flex: none; transform: translateY(-1px); }
.validation dl { display: grid; grid-template-columns: 64px 1fr; gap: 4px 10px; margin: 0; font-size: 13.5px; }
.validation dt { color: var(--gris); }
.validation dd { margin: 0; overflow-wrap: anywhere; }
.validation .apercu {
  white-space: pre-wrap; font-size: 14px; line-height: 1.5; color: var(--encre-douce); max-height: 180px; overflow-y: auto;
  padding: 10px 12px; border-radius: 8px; background: var(--feuille); box-shadow: inset 0 0 0 1px var(--trait);
}
.validation ul { margin: 0; padding-left: 1.1em; font-size: 14px; }
.validation ul span { color: var(--gris); }
.validation footer { display: flex; justify-content: flex-end; gap: 8px; }

/* messages pris à l'initiative de Volt */
.msg.proactif .corps { border-left-color: var(--signal); }
.initiative { color: var(--signal); font-weight: 600; }

/* ── réglages ───────────────────────────────────────────────────────────── */

.reglages h2 { font: 600 18px/1.2 var(--display); letter-spacing: -0.01em; margin: 34px 0 10px; }
.reglages .aide { color: var(--gris); font-size: 14px; margin: 0 0 14px; max-width: 62ch; }
.connexion-ligne { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--trait); }
.connexion-ligne strong { display: block; font-weight: 600; }
.connexion-ligne span { font-size: 13.5px; color: var(--gris); }
.connexion-ligne span.ok { color: var(--fait); }
.rythme { display: grid; }
.moment { display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--trait); }
.moment strong { display: block; font-weight: 600; font-size: 14.5px; }
.moment span { font-size: 13px; color: var(--gris); }
.moment input[type="time"] { border: 0; border-radius: 8px; padding: 6px 8px; background: var(--feuille-haute); box-shadow: inset 0 0 0 1px var(--trait-fort); font-variant-numeric: tabular-nums; }
.interrupteur { position: relative; width: 38px; height: 22px; flex: none; }
.interrupteur input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.interrupteur span { position: absolute; inset: 0; border-radius: 999px; background: var(--trait-fort); transition: background .15s; pointer-events: none; }
.interrupteur span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--feuille-haute); transition: transform .15s; }
.interrupteur input:checked + span { background: var(--signal); }
.interrupteur input:checked + span::after { transform: translateX(16px); }
.interrupteur input:focus-visible + span { outline: 2px solid var(--signal); outline-offset: 2px; }
.segments.theme { max-width: 420px; }
.engrenage { display: none; border: 0; background: none; color: var(--encre); width: 40px; height: 40px; border-radius: 10px; place-items: center; }
.engrenage svg { width: 22px; height: 22px; }

.voix { grid-template-rows: auto 1fr auto auto; }
.voix-validations { padding: 0 24px 8px; }

/* ── téléphone ──────────────────────────────────────────────────────────── */

.navbas { display: none; }

@media (max-width: 900px) {
  .discussion { grid-template-columns: 1fr; }
  .maintenant { display: none; }
  .fil-colonne { border-right: 0; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .coque { grid-template-rows: auto 1fr auto; }
  .barre .engrenage { display: grid; }
  .validations { padding: 0 12px; }
  .moment { grid-template-columns: auto 1fr auto; }
  .moment .lien { grid-column: 2; justify-self: start; }
  .barre { grid-template-columns: auto 1fr auto; gap: 16px; padding: 12px 16px 0; padding-top: calc(12px + env(safe-area-inset-top)); }
  .barre .onglets, .barre .parler { display: none; }
  .signal { min-width: 0; }
  .fil { padding: 24px 16px 16px; }
  .composeur { padding: 8px 12px 10px; }
  .sous-composeur { display: none; }
  .accueil { padding-top: 4vh; }
  .navbas {
    display: grid; grid-template-columns: 1fr 1fr auto 1fr; align-items: center;
    padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--trait); background: var(--papier);
  }
  .navbas button { border: 0; background: none; padding: 8px 4px; color: var(--gris); font-size: 12px; display: grid; justify-items: center; gap: 3px; }
  .navbas button svg { width: 22px; height: 22px; }
  .navbas button[aria-current="page"] { color: var(--encre); }
  .navbas .micro { width: 56px; height: 56px; border-radius: 18px; background: var(--encre); color: var(--papier); margin: 0 10px; place-items: center; }
  .navbas .micro svg { width: 24px; height: 24px; }
  .tableau-tete { padding: 18px 16px 12px; flex-wrap: wrap; }
  .tableau-tete h1 { font-size: 26px; }
  .filtres { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .colonnes { grid-template-columns: repeat(4, 86vw); scroll-snap-type: x mandatory; padding: 0 4px; }
  .colonne { scroll-snap-align: start; border-left: 0; padding: 0 8px; }
  .carnet-int { padding: 20px 16px 60px; }
  .noter { grid-template-columns: 1fr auto; }
  .noter select { grid-column: 1 / -1; }
  .note { grid-template-columns: 1fr auto; }
  .note-type { grid-column: 1 / -1; padding: 0; }
  .note .retirer { opacity: 1; }
  .deux { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
