/* La tour de contrôle. Même famille que la page de pilotage (sombre et or), sans police ni fichier venus d'ailleurs. */
:root {
  color-scheme: dark;
  --fond: #0E0E10;
  --carte: #151518;
  --creux: #0B0B0D;
  --trait: rgba(255, 255, 255, .09);
  --trait-fort: rgba(255, 255, 255, .16);
  --encre: #ECE8E1;
  --doux: #A8A096;
  --pale: #7A746D;
  --or: #C9A875;
  --or-voile: rgba(201, 168, 117, .13);
  --vert: #7FB98A;
  --rouge: #D98A80;
  --ambre: #D9A05B;
  --bleu: #8AA8C9;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  font: 15px/1.5 var(--sans);
  background: var(--fond);
  color: var(--encre);
  min-height: 100vh;
  padding-bottom: 96px;
  background-image: radial-gradient(circle at 15% -5%, rgba(176, 125, 98, .11), transparent 42%);
  background-repeat: no-repeat;
}
a { color: var(--or); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; border-radius: 4px; }
b { font-weight: 600; }
code { font: 12.5px/1.4 ui-monospace, Consolas, monospace; color: var(--doux); overflow-wrap: anywhere; }
ul { list-style: none; }

/* ---- le haut, les rubriques ---- */
.haut, main, .onglets { max-width: 900px; margin-inline: auto; padding-inline: 16px; }
.haut { display: flex; align-items: baseline; justify-content: space-between; padding-top: 18px; }
.marque { font: 400 1.5rem/1.1 var(--serif); color: var(--encre); letter-spacing: .01em; }
.marque:hover { text-decoration: none; }
.marque em { color: var(--or); font-style: italic; }
.marque.grande { font-size: 2.3rem; display: block; }
.lien { background: none; border: 0; color: var(--pale); font: inherit; font-size: .8rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 0; }
.onglets {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  padding-block: 10px; margin-top: 6px;
  background: linear-gradient(var(--fond) 78%, transparent);
}
.onglets::-webkit-scrollbar, .filtres::-webkit-scrollbar { display: none; }
.onglets a {
  flex: none; padding: 7px 13px; border-radius: 999px; font-size: .86rem; color: var(--doux);
  border: 1px solid transparent;
}
.onglets a:hover { text-decoration: none; color: var(--encre); }
.onglets a.on { color: var(--or); background: var(--or-voile); border-color: rgba(201, 168, 117, .4); }

/* ---- les titres ---- */
main { padding-top: 14px; }
.date { color: var(--pale); font-size: .82rem; letter-spacing: .04em; }
.date::first-letter { text-transform: uppercase; }
.titre { font: 400 clamp(1.75rem, 5.2vw, 2.5rem)/1.12 var(--serif); margin: 2px 0 8px; text-wrap: balance; }
.chapo { color: var(--doux); max-width: 62ch; margin-bottom: 18px; font-size: .92rem; }
.bloc { margin-top: 30px; }
.bloc h2 { font: 500 1.32rem/1.2 var(--serif); margin-bottom: 8px; display: flex; align-items: baseline; gap: 10px; }
.bloc h2 a { color: inherit; }
.compte { font: 500 .72rem/1 var(--sans); color: var(--pale); border: 1px solid var(--trait); border-radius: 999px; padding: 4px 8px; font-variant-numeric: tabular-nums; }
.encart { background: var(--carte); border: 1px solid var(--trait); border-radius: 14px; padding: 14px 16px; margin-top: 18px; }
.encart h2 { font-size: 1.15rem; }

/* ---- les tuiles ---- */
.tuiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0 4px; }
@media (min-width: 640px) { .tuiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tuile {
  display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 13px; min-height: 86px;
  background: var(--carte); border: 1px solid var(--trait); border-radius: 14px; color: var(--encre);
}
a.tuile:hover { text-decoration: none; border-color: var(--trait-fort); }
.tuile .n { font: 500 1.65rem/1.05 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tuile .l { font-size: .74rem; line-height: 1.35; color: var(--doux); }
.tuile.or .n { color: var(--or); }
.tuile.ambre .n { color: var(--ambre); }
.tuile.rouge { border-color: rgba(217, 138, 128, .42); }
.tuile.rouge .n { color: var(--rouge); }
.tuile.vert .n { color: var(--vert); }

/* ---- les lignes ---- */
.lignes { border-top: 1px solid var(--trait); }
.ligne { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 11px 0 11px 12px; border-bottom: 1px solid var(--trait); border-left: 2px solid transparent; }
.ligne.en-retard { border-left-color: var(--rouge); }
.ligne.alerte.rouge { border-left-color: var(--rouge); }
.ligne.alerte.ambre { border-left-color: var(--ambre); }
.lignes.serre .ligne { padding-block: 8px; }
.ligne-corps { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ligne-fin { flex: none; display: flex; gap: 6px; align-items: center; }
.t { font-size: .95rem; overflow-wrap: anywhere; }
.t.fin { color: var(--doux); font-size: .88rem; }
.t.fait { color: var(--pale); text-decoration: line-through; }
.s { font-size: .78rem; color: var(--pale); overflow-wrap: anywhere; }
.s.detail { color: var(--doux); font-size: .83rem; white-space: pre-line; }
.s.reponse { color: var(--doux); font-size: .86rem; white-space: pre-line; border-left: 2px solid rgba(201, 168, 117, .4); padding-left: 10px; margin-top: 4px; }
.texte { white-space: pre-line; overflow-wrap: anywhere; }
.vide { color: var(--pale); font-size: .88rem; padding: 12px 0; }
.vide.bon { color: var(--vert); }
.info { font-size: .84rem; color: var(--doux); margin-top: 10px; }
.suite { margin-top: 10px; font-size: .84rem; }
.quand { font-weight: 500; color: var(--doux); }
.quand.retard { color: var(--rouge); }
.quand.proche { color: var(--ambre); }
.quand.bon { color: var(--vert); }
.maj { color: var(--pale); font-size: .72rem; margin-left: auto; }

/* ---- les puces ---- */
.puce {
  display: inline-block; vertical-align: 1px; font: 500 .62rem/1 var(--sans); letter-spacing: .09em; text-transform: uppercase;
  padding: 4px 7px; border-radius: 6px; border: 1px solid var(--trait-fort); color: var(--doux); white-space: nowrap;
}
a.puce:hover { text-decoration: none; border-color: var(--or); }
.puce.go, .puce.attend_david { color: var(--or); border-color: rgba(201, 168, 117, .55); background: var(--or-voile); }
.puce.decision { color: var(--ambre); border-color: rgba(217, 160, 91, .5); }
.puce.echeance, .puce.relance, .puce.attend_client, .puce.attente { color: var(--bleu); border-color: rgba(138, 168, 201, .45); }
.puce.rdv { color: var(--or); border-color: rgba(201, 168, 117, .55); }
.puce.en_ligne, .puce.faite { color: var(--vert); border-color: rgba(127, 185, 138, .45); }
.puce.en_cours, .puce.prise { color: var(--encre); }
.puce.nouvelle { color: var(--ambre); border-color: rgba(217, 160, 91, .5); }
.puce.pause, .puce.abandonne, .puce.termine, .puce.refusee { color: var(--pale); }

/* ---- les champs et les boutons ---- */
.champ {
  width: 100%; min-width: 0; padding: 10px 12px; border-radius: 10px; font: inherit; font-size: .9rem;
  background: var(--creux); border: 1px solid var(--trait); color: var(--encre); outline: none;
}
textarea.champ { resize: vertical; line-height: 1.45; }
.champ:focus { border-color: rgba(201, 168, 117, .6); }
.champ.fort { border-color: rgba(201, 168, 117, .32); }
.champ.discret { background: transparent; border-color: transparent; padding: 4px 6px; margin-left: -6px; color: var(--doux); font-size: .84rem; }
.champ.discret:hover { border-color: var(--trait); }
.champ.discret:focus { background: var(--creux); border-color: rgba(201, 168, 117, .6); color: var(--encre); }
.champ.petit { width: auto; padding: 7px 9px; font-size: .78rem; }
select.champ { appearance: none; -webkit-appearance: none; padding-right: 26px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23A8A096' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; cursor: pointer; }
select.etat-attend_david { color: var(--or); border-color: rgba(201, 168, 117, .5); }
select.etat-en_ligne { color: var(--vert); }
select.etat-attend_client { color: var(--bleu); }
select.etat-pause, select.etat-abandonne { color: var(--pale); }
.champ.enregistre { border-color: rgba(127, 185, 138, .7); }
.champ.rate { border-color: var(--rouge); }
.etiquette { display: flex; flex-direction: column; gap: 4px; font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--pale); min-width: 0; flex: 1; }
.etiquette .champ { letter-spacing: normal; text-transform: none; }
.coche { display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--doux); }
.rang { display: flex; gap: 8px; flex-wrap: wrap; }
.rang > * { flex: 1 1 150px; }
.rang.trois > * { flex: 1 1 96px; }
.rang > .bouton { flex: 0 0 auto; }
.formulaire { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.formulaire.boite { margin: 0 0 12px; }
.bloc > .etiquette, .bloc > .rang { margin-bottom: 10px; }
.bouton {
  display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; min-height: 40px;
  border-radius: 10px; border: 1px solid var(--or); background: var(--or); color: #1A1510; font: 600 .88rem/1 var(--sans); cursor: pointer;
}
.bouton:hover { text-decoration: none; filter: brightness(1.07); }
.bouton.calme { background: transparent; color: var(--doux); border-color: var(--trait-fort); font-weight: 500; }
.bouton.calme:hover { color: var(--encre); border-color: var(--or); }
.bouton.petit { min-height: 32px; padding: 6px 11px; font-size: .78rem; }
.bouton.large { width: 100%; min-height: 48px; font-size: .98rem; }
.bouton[disabled] { opacity: .5; cursor: wait; }
details.plus { margin-top: 10px; max-width: 100%; }
details.plus > summary { cursor: pointer; color: var(--doux); font-size: .82rem; padding: 6px 0; list-style: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.plus > summary::-webkit-details-marker { display: none; }
details.plus > summary::before { content: "+ "; color: var(--or); }
details.plus[open] > summary::before { content: "− "; }

/* ---- les filtres ---- */
.filtres { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
.filtre { flex: none; padding: 7px 12px; border-radius: 999px; font-size: .82rem; color: var(--doux); border: 1px solid var(--trait); background: var(--carte); white-space: nowrap; }
.filtre:hover { text-decoration: none; border-color: var(--trait-fort); }
.filtre b { color: var(--pale); font-weight: 500; font-variant-numeric: tabular-nums; margin-left: 2px; }
.filtre.on { color: var(--or); border-color: rgba(201, 168, 117, .55); background: var(--or-voile); }
.filtre.on b { color: var(--or); }
.filtres.fins .filtre { font-size: .76rem; padding: 5px 10px; }
.filtre.alerte b { color: var(--rouge); }
#cherche { margin: 10px 0 6px; }

/* ---- les prospects ---- */
.prospects { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.prospect > *, .carte > *, .bloc > * { min-width: 0; }
.prospect { background: var(--carte); border: 1px solid var(--trait); border-left: 3px solid var(--pale); border-radius: 14px; padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 8px; }
.prospect[hidden] { display: none; }
.prospect[data-st="rdv"], .prospect[data-st="rencontre"] { border-left-color: var(--or); }
.prospect[data-st="relance"] { border-left-color: var(--ambre); }
.prospect[data-st="signe"] { border-left-color: var(--vert); }
.prospect[data-st="contacte"] { border-left-color: var(--bleu); }
.prospect[data-st="perdu"] { opacity: .7; }
.p-haut { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.prospect h3 { font: 500 1.22rem/1.15 var(--serif); overflow-wrap: anywhere; }
.p-liens { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .8rem; }
.petit-lien { padding: 5px 10px; border-radius: 8px; border: 1px solid rgba(201, 168, 117, .28); background: var(--creux); color: var(--encre); font-size: .8rem; }
.petit-lien:hover { text-decoration: none; border-color: var(--or); }

/* ---- les fiches ---- */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 10px; }
.carte { background: var(--carte); border: 1px solid var(--trait); border-radius: 14px; padding: 14px 15px 12px; display: flex; flex-direction: column; gap: 8px; }
.carte[data-etat="pause"], .carte[data-etat="termine"] { opacity: .72; }
.carte-haut { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.carte h3 { font: 500 1.25rem/1.15 var(--serif); }
.carte h3 a { color: var(--encre); }
.resume { font-size: .84rem; color: var(--doux); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.suite-ligne { font-size: .84rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.suite-ligne b { color: var(--or); font-weight: 500; }
.carte-pied { margin-top: auto; padding-top: 4px; }
.fiche-haut { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.fiche-haut .etiquette { flex: 0 0 150px; }
.chantier .ligne-corps { gap: 0; }

/* ---- les tableaux, les sondes ---- */
.defile { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; min-width: 420px; border-collapse: collapse; font-size: .84rem; }
.table th { text-align: left; font: 400 .62rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--pale); padding: 0 10px 7px 0; }
.table td { padding: 9px 10px 9px 0; border-top: 1px solid var(--trait); vertical-align: top; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .serre { white-space: nowrap; color: var(--doux); }
.sondes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 4px 14px; font-size: .84rem; color: var(--doux); }
.sondes li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.pastille { width: 8px; height: 8px; border-radius: 50%; background: var(--vert); flex: none; }
.sondes .panne { color: var(--rouge); }
.sondes .panne .pastille { background: var(--rouge); }

/* ---- la porte ---- */
.porte { max-width: 360px; margin: 16vh auto 0; padding-inline: 16px; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.porte .chapo { margin: 0 auto 10px; }
.porte .pied { color: var(--pale); font-size: .78rem; margin-top: 6px; }
.message { border: 1px solid rgba(217, 160, 91, .45); color: var(--ambre); border-radius: 10px; padding: 10px 12px; font-size: .88rem; }
.message.bon { border-color: rgba(127, 185, 138, .5); color: var(--vert); }

/* ---- la note en bas d'écran ---- */
#note {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #1F1F24; border: 1px solid var(--trait-fort); color: var(--encre); padding: 10px 16px; border-radius: 999px;
  font-size: .84rem; max-width: calc(100vw - 32px); transition: opacity .18s, transform .18s; z-index: 20;
}
#note.vue { opacity: 1; transform: translate(-50%, 0); }
#note.erreur { border-color: var(--rouge); color: var(--rouge); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } #note { transition: none; } }
