/* Direction A « Rituel » : fond jaune beurre, encre bleu nuit, soleil, cartes cernees d'encre avec ombre decalee,
   badges autocollants. Un seul theme, clair, choisi par Alexandre (2026-10-31). */
:root {
  --fond: #fff6cc;
  --surface: #fffdf3;
  --surface-2: #fff1bf;
  --encre: #1c2340;
  --bord: rgba(28, 35, 64, 0.18);
  --texte: #1c2340;
  --texte-2: #5a6180;
  --soleil: #ffcf33;
  --accent: #2b3fd6;
  --accent-texte: #ffffff;
  --accent-doux: #dfe3ff;
  --alerte: #c8431a;
  --alerte-doux: #ffb98f;
  --ok: #2f9e6e;
  --ok-doux: #c9f0d9;
  --ambre: #8a5a00;
  --ambre-doux: #ffe08a;
  --rayon: 20px;
  --titre: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Figtree", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 16px/1.45 var(--sans);
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
}

button, a.btn { font: inherit; }

svg { width: 20px; height: 20px; flex: none; }

/* ---------- En-tête ---------- */

.entete {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 620px; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px 12px;
  background: color-mix(in srgb, var(--fond) 88%, transparent);
  backdrop-filter: blur(10px);
}

.marque { display: flex; align-items: center; gap: 12px; }

.logo {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-doux);
  color: var(--accent); font: 700 18px var(--mono);
}

h1 { margin: 0; font-size: 18px; letter-spacing: 0.08em; text-transform: uppercase; }

.date { margin: 0; color: var(--texte-2); font-size: 14px; }

.icone-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--bord); background: var(--surface); color: var(--texte-2);
  cursor: pointer;
}
.icone-btn.tourne svg { animation: tourne 0.8s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }

.bandeau {
  max-width: 620px; margin: 0 auto 8px; padding: 8px 16px;
  color: var(--ambre); font-size: 13px; font-family: var(--mono);
}

main { max-width: 620px; margin: 0 auto; padding: 0 16px; display: grid; gap: 14px; }

/* ---------- Cartes ---------- */

.carte {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 16px;
}

.carte h2 {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0 0 12px;
  font: 600 12px var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--texte-2);
}
.carte h2 .compte { color: var(--accent); }

.vide { margin: 0; color: var(--texte-2); font-size: 15px; }

.squelette div { height: 14px; margin: 10px 0; border-radius: 7px; background: var(--surface-2); animation: pulse 1.4s ease-in-out infinite; }
.squelette div:nth-child(2) { width: 70%; }
.squelette div:nth-child(3) { width: 45%; }
@keyframes pulse { 50% { opacity: 0.5; } }

/* ---------- Jauges ---------- */

.jauges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

.jauge {
  display: grid; gap: 2px; justify-items: start;
  padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--bord); background: var(--surface);
  color: var(--texte); text-decoration: none;
}
.jauge strong { font: 600 22px var(--mono); }
.jauge span { font-size: 12px; color: var(--texte-2); }
.jauge.alerte strong { color: var(--alerte); }
.jauge.accent strong { color: var(--accent); }

/* ---------- Brief ---------- */

.brief { display: grid; gap: 12px; background: linear-gradient(160deg, var(--accent-doux), transparent 60%), var(--surface); }

.lecteur { display: flex; align-items: center; gap: 14px; }

.lecture-btn {
  display: grid; place-items: center; flex: none;
  width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: var(--accent); color: var(--accent-texte); cursor: pointer;
  box-shadow: 0 0 0 6px var(--accent-doux);
}
.lecture-btn svg { width: 24px; height: 24px; }
.lecture-btn:disabled { opacity: 0.4; cursor: default; }

.lecteur-infos { flex: 1; min-width: 0; }
.lecteur-infos strong { display: block; }
.lecteur-infos small { color: var(--texte-2); font-family: var(--mono); font-size: 12px; }

.progression { height: 4px; margin-top: 8px; border-radius: 2px; background: var(--surface-2); overflow: hidden; cursor: pointer; }
.progression div { height: 100%; width: 0; background: var(--accent); transition: width 0.25s linear; }

details.texte summary { cursor: pointer; color: var(--texte-2); font-size: 14px; }
details.texte p { margin: 10px 0 0; white-space: pre-line; font-size: 15px; }

/* ---------- Listes ---------- */

.liste { list-style: none; margin: 0; padding: 0; display: grid; }
.liste li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--bord); }
.liste li:first-child { border-top: 0; padding-top: 2px; }

.heure { flex: none; width: 52px; font: 600 14px var(--mono); color: var(--accent); }
.heure.journee { font-size: 11px; color: var(--texte-2); }

.ligne { flex: 1; min-width: 0; }
.ligne .titre { display: block; overflow-wrap: anywhere; }
.ligne .meta { display: block; font-size: 13px; color: var(--texte-2); }

.sous-titre { margin: 14px 0 4px; font: 600 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--texte-2); }
h2 + .sous-titre { margin-top: 0; }
.sous-titre.alerte { color: var(--alerte); }

.pastille { display: inline-block; padding: 1px 8px; border-radius: 999px; font: 600 12px var(--mono); }
.pastille.alerte { background: var(--alerte-doux); color: var(--alerte); }
.pastille.ambre { background: var(--ambre-doux); color: var(--ambre); }
.pastille.ok { background: var(--ok-doux); color: var(--ok); }

.gestes { display: flex; gap: 6px; flex: none; }

.geste {
  display: grid; place-items: center;
  min-width: 40px; height: 40px; padding: 0 10px; border-radius: 12px;
  border: 1px solid var(--bord); background: var(--surface-2); color: var(--texte);
  font: 600 13px var(--mono); cursor: pointer;
}
.geste.fait { color: var(--ok); }
.geste:disabled { opacity: 0.4; }

.faite .titre { text-decoration: line-through; color: var(--texte-2); }

details.plus summary { cursor: pointer; padding-top: 10px; color: var(--texte-2); font-size: 14px; }

/* ---------- Plantes ---------- */

.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--bord); background: var(--surface-2); color: var(--texte);
  cursor: pointer; font-size: 15px;
}
.puce.demain { opacity: 0.6; }
.puce.arrosee { border-color: var(--ok); color: var(--ok); }

.boutons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 14px;
  border: 1px solid var(--bord); background: var(--surface-2); color: var(--texte);
  font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn.primaire { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }
.btn.petit { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn.danger { color: var(--alerte); }
.btn:disabled { opacity: 0.5; }

.barre {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px;
  max-width: 620px; margin: 0 auto;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--fond) 30%);
}
.barre .btn { min-height: 54px; }

/* ---------- Propositions ---------- */

.proposition + .proposition { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--bord); }
.proposition p { margin: 4px 0 0; font-size: 14px; color: var(--texte-2); }

/* ---------- Feuille de capture ---------- */

dialog.feuille {
  width: min(560px, 100vw); max-width: 100vw; margin: auto auto 0; padding: 0;
  border: 1px solid var(--bord); border-radius: 20px 20px 0 0;
  background: var(--surface); color: var(--texte);
}
@media (min-width: 640px) { dialog.feuille { margin: auto; border-radius: 20px; } }
dialog::backdrop { background: rgba(0, 0, 0, 0.55); }

dialog form { display: grid; gap: 14px; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); }
dialog h2 { margin: 0; font-size: 18px; }

.segments, .echeances { display: flex; flex-wrap: wrap; gap: 8px; }
.segments label, .echeances label { position: relative; }
.segments input, .echeances input { position: absolute; opacity: 0; inset: 0; }
.segments span, .echeances span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--bord); background: var(--surface-2);
  font-size: 14px; cursor: pointer;
}
.segments input:checked + span, .echeances input:checked + span { border-color: var(--accent); background: var(--accent-doux); color: var(--accent); }
.segments input:focus-visible + span, .echeances input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

textarea {
  width: 100%; padding: 12px; border-radius: 12px;
  border: 1px solid var(--bord); background: var(--surface-2); color: var(--texte);
  font: 16px/1.4 var(--sans); resize: vertical;
}
textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.aide { margin: 0; font-size: 13px; color: var(--texte-2); }
.pied { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 20;
  max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 12px;
  background: var(--texte); color: var(--fond); font-size: 15px;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast.erreur { background: var(--alerte); color: #fff; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

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

/* ---------- Onglets ---------- */

.onglets {
  position: sticky; top: calc(var(--haut-entete, 80px) + 6px); z-index: 4;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  max-width: 588px; margin: 0 auto 12px; padding: 4px;
  border: 1px solid var(--bord); border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
}
@media (max-width: 620px) { .onglets { margin: 0 16px 12px; } }
.onglets a {
  display: grid; place-items: center; min-height: 40px; border-radius: 10px;
  color: var(--texte-2); text-decoration: none; font-size: 14px; font-weight: 600;
}
.onglets a[aria-current="page"] { background: var(--accent-doux); color: var(--accent); }

.jauge { cursor: pointer; font: inherit; text-align: left; }

/* ---------- Galerie des plantes ---------- */

.galerie { display: grid; gap: 14px; }
@media (min-width: 560px) { .galerie { grid-template-columns: 1fr 1fr; } }

.plante { padding: 0; overflow: hidden; }

.carrousel {
  position: relative; display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  aspect-ratio: 8 / 5; background: var(--surface-2); scrollbar-width: none;
}
.carrousel::-webkit-scrollbar { display: none; }
.carrousel figure { position: relative; flex: 0 0 100%; margin: 0; scroll-snap-align: start; }
.carrousel img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; display: block; }
.carrousel figcaption {
  position: absolute; left: 10px; bottom: 10px; padding: 3px 8px; border-radius: 8px;
  background: rgba(0, 0, 0, 0.55); color: #fff; font: 600 12px var(--mono);
}
.points { position: absolute; right: 10px; bottom: 12px; display: flex; gap: 5px; pointer-events: none; }
.points i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); }
.points i.actif { background: #fff; }

.sans-photo {
  display: grid; place-items: center; align-content: center; gap: 6px; width: 100%;
  color: var(--texte-2); text-align: center; padding: 16px;
}
.sans-photo strong { font: 700 48px var(--mono); color: var(--accent); }

.plante-infos { padding: 14px 16px 16px; display: grid; gap: 6px; }
.plante-infos h3 { margin: 0; font-size: 18px; }
.plante-infos .meta { color: var(--texte-2); font-size: 14px; }
.plante-etat { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.plante-infos .boutons { margin-top: 6px; }

/* ---------- Bibliotheque ---------- */

.entete-vue { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.filtres { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filtres button {
  flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--bord); background: var(--surface); color: var(--texte-2);
  font: 600 13px var(--sans); cursor: pointer;
}
.filtres button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-doux); color: var(--accent); }

.rayon { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px 12px; }

.ouvrage { display: grid; gap: 6px; padding: 0; border: 0; background: none; color: var(--texte); text-align: left; cursor: pointer; font: inherit; }
.couv {
  position: relative; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden;
  background: linear-gradient(150deg, var(--surface-2), var(--accent-doux));
  border: 1px solid var(--bord); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.couv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.couv .repli { position: absolute; inset: 0; display: grid; place-items: center; padding: 10px; text-align: center; font: 600 13px/1.25 var(--sans); color: var(--texte-2); }
.couv .pastille { position: absolute; top: 6px; left: 6px; backdrop-filter: blur(6px); }
.ouvrage .t { font-size: 13px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ouvrage .a { font-size: 12px; color: var(--texte-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pastille.accent { background: var(--accent-doux); color: var(--accent); }

.detail { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: start; }
.detail .couv { width: 110px; }
.detail h2 { margin: 0 0 4px; font-size: 18px; }
.detail p { margin: 0; color: var(--texte-2); }

#feuille-contenu { display: grid; gap: 14px; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); }
#feuille-contenu input[type="text"] {
  width: 100%; min-height: 48px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--bord); background: var(--surface-2); color: var(--texte); font: 16px var(--sans);
}
#feuille-contenu input[type="text"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.icone-btn.ajout { flex: none; background: var(--accent); border-color: var(--accent); color: var(--accent-texte); font: 600 24px/1 var(--sans); }
.entete-vue .filtres { flex: 1; min-width: 0; }
.couv .pastille { background: var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }

.plante-gestes { flex-wrap: nowrap; }
.plante-gestes .btn { flex: 1; gap: 6px; padding: 0 6px; white-space: nowrap; font-size: 13px; }
.plante-gestes svg { width: 16px; height: 16px; }
.case { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; }
.case input { width: 22px; height: 22px; accent-color: var(--accent); }
.reglage { display: flex; align-items: center; justify-content: center; gap: 18px; }
.reglage .geste { width: 52px; height: 52px; font-size: 24px; border-radius: 50%; }
.compteur { min-width: 140px; text-align: center; font: 600 22px var(--mono); }

/* ---------- Carte « À arroser » ---------- */

.arrosage-grille { display: grid; grid-template-columns: 1fr 72px 64px; align-items: center; row-gap: 2px; }
.arrosage-grille .col { font: 600 11px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--texte-2); text-align: center; }
.arrosage-grille .ligne { padding: 10px 0; border-top: 1px solid var(--bord); }
.arrosage-grille .ligne .meta { margin-top: 2px; }
.case-cellule { display: grid; place-items: center; height: 100%; min-height: 48px; border-top: 1px solid var(--bord); cursor: pointer; }
.case-cellule input { width: 26px; height: 26px; margin: 0; accent-color: var(--accent); cursor: pointer; }

.lien-plante {
  padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--bord); text-underline-offset: 3px;
}
.lien-plante:hover { text-decoration-color: var(--accent); }
.carte.plante { scroll-margin-top: calc(var(--haut-entete, 80px) + 76px); transition: box-shadow 0.3s; }
.carte.plante.ciblee { box-shadow: 0 0 0 3px var(--accent); }


/* =================== Direction A « Rituel » =================== */

body { font-variant-numeric: tabular-nums; }
h1 { font: 800 22px/1.1 var(--titre); letter-spacing: 0; text-transform: none; }
.logo { width: 46px; height: 46px; border: 0; box-shadow: none; display: block; }
.logo svg { width: 46px; height: 46px; display: block; }

.carte { border: 2px solid var(--encre); border-radius: var(--rayon); box-shadow: 3px 3px 0 var(--encre); background: var(--surface); }
.carte h2 { font: 800 17px/1.2 var(--titre); letter-spacing: 0; text-transform: none; color: var(--texte); }
.carte h2 .compte { padding: 0 9px; border: 1.5px solid var(--encre); border-radius: 99px; background: var(--soleil); color: var(--encre); font: 700 13px var(--sans); transform: rotate(-3deg); }
.carte h2 .compte:empty { display: none; }

.icone-btn { border: 2px solid var(--encre); background: var(--surface); color: var(--encre); box-shadow: 2px 2px 0 var(--encre); }

.jauge { border: 2px solid var(--encre); border-radius: 16px; background: var(--surface); box-shadow: 2px 2px 0 var(--encre); }
.jauge strong { font: 800 24px var(--titre); color: var(--texte); }
.jauge.alerte strong { color: var(--alerte); }
.jauge.accent strong { color: var(--accent); }

.brief { background: var(--soleil); }
.lecture-btn { background: var(--encre); color: var(--soleil); box-shadow: none; }
.lecteur-infos strong { font: 800 17px var(--titre); }
.lecteur-infos small { color: var(--encre); font-family: var(--sans); font-weight: 600; }
.progression { background: rgba(28, 35, 64, 0.18); }
.progression div { background: var(--encre); }
.brief details.texte summary, .brief .aide { color: var(--encre); }

.heure { font: 700 14px var(--sans); color: var(--accent); }
.sous-titre { font: 700 12px var(--titre); letter-spacing: 0.06em; }
.liste li, .arrosage-grille .ligne, .case-cellule { border-top: 1.5px dashed var(--bord); }

.pastille { border: 1.5px solid var(--encre); color: var(--encre); font: 700 12px var(--sans); transform: rotate(-3deg); background: var(--surface); }
.pastille.alerte { background: var(--alerte-doux); color: var(--encre); }
.pastille.ambre { background: var(--ambre-doux); color: var(--encre); }
.pastille.ok { background: var(--ok-doux); color: var(--encre); }
.pastille.accent { background: var(--accent-doux); color: var(--encre); }

.btn { border: 2px solid var(--encre); border-radius: 99px; background: var(--surface); color: var(--encre); box-shadow: 2px 2px 0 var(--encre); }
.btn.primaire { background: var(--accent); border-color: var(--encre); color: var(--accent-texte); }
.btn.danger { color: var(--alerte); }
.btn:active:not(:disabled), .icone-btn:active, .jauge:active, .geste:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: none; }
.barre { background: linear-gradient(rgba(255, 246, 204, 0), var(--fond) 35%); }
.barre .btn.primaire { background: var(--encre); color: var(--soleil); }

.geste { border: 2px solid var(--encre); border-radius: 12px; background: var(--surface); color: var(--encre); box-shadow: 2px 2px 0 var(--encre); }
.geste.fait { background: var(--ok-doux); color: var(--encre); }

.onglets { border: 2px solid var(--encre); border-radius: 99px; background: var(--surface); box-shadow: 3px 3px 0 var(--encre); backdrop-filter: none; }
.onglets a { border-radius: 99px; color: var(--encre); }
.onglets a[aria-current="page"] { background: var(--soleil); color: var(--encre); box-shadow: inset 0 0 0 1.5px var(--encre); }
.entete { background: color-mix(in srgb, var(--fond) 92%, transparent); }

.case-cellule input, .case input { accent-color: var(--accent); }

dialog.feuille { background: var(--fond); color: var(--texte); border: 2px solid var(--encre); }
dialog::backdrop { background: rgba(28, 35, 64, 0.45); }
textarea, #feuille-contenu input[type="text"] { background: #ffffff; border: 2px solid var(--encre); color: var(--texte); }
.segments span, .echeances span { border: 2px solid var(--encre); background: var(--surface); color: var(--encre); }
.segments input:checked + span, .echeances input:checked + span { background: var(--soleil); border-color: var(--encre); color: var(--encre); }

.toast { background: var(--encre); color: var(--fond); border-radius: 99px; }
.toast.erreur { background: var(--alerte); color: #ffffff; }

.carrousel { background: var(--surface-2); }
.sans-photo strong { color: var(--encre); font-family: var(--titre); }
.plante-infos h3 { font: 800 19px var(--titre); }
.carte.plante.ciblee { box-shadow: 3px 3px 0 var(--encre), 0 0 0 4px var(--soleil); }

.filtres button { border: 2px solid var(--encre); background: var(--surface); color: var(--encre); }
.filtres button[aria-pressed="true"] { background: var(--soleil); border-color: var(--encre); color: var(--encre); }
.icone-btn.ajout { background: var(--accent); border-color: var(--encre); color: #ffffff; }
.couv { border: 2px solid var(--encre); box-shadow: 3px 3px 0 var(--encre); border-radius: 12px; }
.couv .repli { color: var(--encre); font-family: var(--titre); }

.lien-plante { text-decoration-color: var(--soleil); text-decoration-thickness: 3px; }
.bandeau { color: var(--ambre); font-family: var(--sans); font-weight: 600; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Rappel d'arrosage ---------- */
.rappel-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.rappel-ligne input[type="time"] {
  min-height: 44px; padding: 0 12px; border: 2px solid var(--encre); border-radius: 12px;
  background: #ffffff; color: var(--texte); font: 700 18px var(--sans); font-variant-numeric: tabular-nums;
}
#rappel .boutons { margin-top: 10px; }
#rappel .aide { margin-top: 10px; }

/* ---------- Vols ---------- */
.carte.vol { display: grid; gap: 4px; width: 100%; text-align: left; font: inherit; color: var(--texte); cursor: pointer; }
.vol-route { font: 800 20px var(--titre); letter-spacing: 0.02em; }
.vol-pied { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.vol-date { font-weight: 700; margin-right: 4px; }
.liste-vols { display: grid; gap: 12px; margin-top: 12px; }
.vol-titre h2 { margin: 0; font: 800 26px var(--titre); }
.vol-titre p { margin: 2px 0 0; }
.sous-onglets { margin-bottom: 2px; }
.sous-onglets button { flex: 1; }
.champs { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: center; }
.champs input, .champs select, .recherche-terrain {
  min-height: 44px; padding: 0 12px; border: 2px solid var(--encre); border-radius: 12px;
  background: #ffffff; color: var(--texte); font: 600 16px var(--sans); width: 100%; min-width: 0;
}
.terrain-nom { display: block; font: 800 18px var(--titre); }
.pistes { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px 10px; margin-top: 10px; font-variant-numeric: tabular-nums; }
.pistes .col { font: 700 11px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--texte-2); }
.pistes .qfu { font-weight: 800; }
.selecteur { display: grid; gap: 8px; margin-top: 10px; }
.resultats { display: grid; gap: 6px; }
.resultat {
  display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: baseline; text-align: left;
  padding: 10px 12px; border: 2px solid var(--encre); border-radius: 12px; background: var(--surface); color: var(--texte); font: inherit; cursor: pointer;
}
.resultat .meta { grid-column: 2; font-size: 13px; color: var(--texte-2); }
.nouveau-vol { display: grid; gap: 12px; }
.nouveau-vol .sous-titre { margin: 6px 0 0; }
.carte.cdb .boutons { margin-top: 8px; }
.onglets { grid-template-columns: 1.35fr repeat(4, 1fr); gap: 2px; }
.onglets a { font-size: 13.5px; padding: 0 2px; white-space: nowrap; min-width: 0; }

/* ---------- Vols : meteo ---------- */
.meteo { display: grid; gap: 14px; }
.station { display: grid; gap: 6px; padding: 10px 0; border-top: 1.5px dashed var(--bord); }
.station:first-of-type { border-top: 0; padding-top: 0; }
.station-tete { display: flex; align-items: baseline; gap: 10px; }
.station-tete strong { font: 800 17px var(--titre); }
.code-ligne { display: grid; gap: 4px; justify-items: start; }
.code {
  display: block; width: 100%; padding: 8px 10px; border: 1.5px solid var(--encre); border-radius: 10px;
  background: #ffffff; color: var(--texte); font: 500 13px/1.45 ui-monospace, "SF Mono", Menlo, monospace;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.pages { display: grid; gap: 10px; margin-top: 10px; }
.pages img { width: 100%; height: auto; display: block; border: 2px solid var(--encre); border-radius: 12px; background: #ffffff; }
details.notam { border-top: 1.5px dashed var(--bord); padding: 8px 0; }
details.notam summary { cursor: pointer; font-size: 14px; line-height: 1.4; }
.notam-texte { margin: 6px 0 0; white-space: pre-line; font: 500 13px/1.45 ui-monospace, "SF Mono", Menlo, monospace; }
details.depliable summary { cursor: pointer; list-style: none; }
details.depliable summary .h2 { font: 800 17px var(--titre); }
details.depliable[open] summary { margin-bottom: 10px; }
.carte.alertes { background: var(--alerte-doux); }

/* =================== Une couleur par onglet =================== */
/* data-onglet est pose sur <html> par app.js (changerVue). Les formes restent celles de A. */

body { transition: background-color 0.35s ease; }
.barre { background: linear-gradient(color-mix(in srgb, var(--fond) 0%, transparent), var(--fond) 35%); }

:root[data-onglet="plantes"] {
  --fond: #e8f6dc;
  --surface: #fbfff6;
  --surface-2: #d6efc2;
  --encre: #17321f;
  --texte: #17321f;
  --texte-2: #4f6b55;
  --bord: rgba(23, 50, 31, 0.18);
  --soleil: #9fd96f;
  --accent: #1f7a4d;
  --accent-doux: #cdeed8;
}

:root[data-onglet="vols"] {
  --fond: #dcefff;
  --surface: #ffffff;
  --surface-2: #e9f5ff;
  --encre: #14284b;
  --texte: #14284b;
  --texte-2: #4d6383;
  --bord: rgba(20, 40, 75, 0.16);
  --soleil: #9fd3ff;
  --accent: #1d5fd1;
  --accent-doux: #d6e7ff;
}
/* Nuages : quelques ellipses blanches floues, fixes derriere le contenu. */
:root[data-onglet="vols"] body {
  background-color: var(--fond);
  background-image:
    radial-gradient(70px 26px at 12% 14%, rgba(255,255,255,0.95) 60%, transparent 72%),
    radial-gradient(48px 30px at 18% 11%, rgba(255,255,255,0.95) 60%, transparent 72%),
    radial-gradient(90px 30px at 82% 30%, rgba(255,255,255,0.9) 60%, transparent 72%),
    radial-gradient(56px 34px at 88% 26%, rgba(255,255,255,0.9) 60%, transparent 72%),
    radial-gradient(80px 26px at 30% 62%, rgba(255,255,255,0.85) 60%, transparent 72%),
    radial-gradient(50px 30px at 36% 59%, rgba(255,255,255,0.85) 60%, transparent 72%),
    radial-gradient(100px 32px at 74% 86%, rgba(255,255,255,0.9) 60%, transparent 72%),
    radial-gradient(60px 36px at 80% 82%, rgba(255,255,255,0.9) 60%, transparent 72%),
    linear-gradient(180deg, #cfe8ff 0%, var(--fond) 55%, #eef7ff 100%);
  background-attachment: fixed;
}

:root[data-onglet="bibliotheque"] {
  --fond: #fde8ec;
  --surface: #fffafb;
  --surface-2: #f9d3db;
  --encre: #3a1220;
  --texte: #3a1220;
  --texte-2: #7a5160;
  --bord: rgba(58, 18, 32, 0.16);
  --soleil: #f5a3b5;
  --accent: #9b1d3a;
  --accent-doux: #f8d2dc;
}

/* ---------- Vols : navigation ---------- */
.nav { display: grid; gap: 14px; }
.grille-saisie { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px 10px; }
.champ { display: grid; gap: 3px; min-width: 0; }
.champ.large { grid-column: span 2; }
.champ span { font: 700 11px var(--sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--texte-2); }
.champ input, .champ select {
  min-height: 42px; width: 100%; min-width: 0; padding: 0 10px; border: 2px solid var(--encre); border-radius: 10px;
  background: #ffffff; color: var(--texte); font: 700 16px var(--sans); font-variant-numeric: tabular-nums;
}
.resultat-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; padding: 8px 10px;
  border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.branche .sous-titre { margin-top: 14px; }
.revetement { margin-top: 8px; }
.revetement button { flex: 1; }

/* ---------- Vols : carburant et centrage ---------- */
.decision { margin: 4px 0 12px; padding: 12px 14px; border: 2px solid var(--encre); border-radius: 14px; font: 800 22px var(--titre); text-align: center; }
.decision.go { background: var(--ok-doux); }
.decision.nogo { background: var(--alerte-doux); }
.decision.attente { background: var(--surface-2); font: 600 15px var(--sans); }
.tableau-bilan { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 14px; }
.tableau-bilan strong:nth-last-child(-n+2), .tableau-bilan strong { border-top: 1.5px dashed var(--bord); padding-top: 4px; }
.nb { text-align: right; font-variant-numeric: tabular-nums; }
.tableau-centrage { display: grid; grid-template-columns: 1.4fr 1fr 0.8fr 0.9fr; gap: 6px 8px; align-items: center; font-size: 14px; margin: 10px 0; }
.tableau-centrage .col { font: 700 11px var(--sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--texte-2); }
.tableau-centrage .champ input { min-height: 36px; text-align: right; padding: 0 8px; }
.tableau-centrage .champ span:empty { display: none; }
.jauge-centrage { position: relative; height: 66px; margin: 22px 6px 34px; border-bottom: 2px solid var(--encre); }
.jauge-centrage .zone-ok { position: absolute; bottom: 0; height: 18px; background: var(--ok-doux); border: 1.5px solid var(--encre); border-bottom: 0; border-radius: 6px 6px 0 0; }
.jauge-centrage .borne { position: absolute; bottom: -20px; transform: translateX(-50%); font: 700 11px var(--sans); color: var(--texte-2); white-space: nowrap; }
.jauge-centrage .curseur { position: absolute; bottom: 0; width: 3px; height: 34px; transform: translateX(-50%); background: var(--encre); }
.jauge-centrage .curseur.arr { background: var(--accent); height: 52px; }
.jauge-centrage .etiquette { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font: 700 11px var(--sans); white-space: nowrap; }
.jauge-centrage .curseur.arr .etiquette { color: var(--accent); }

/* ---------- Fiche d'un vol : sous-onglets, voyants, validation ---------- */
.sous-onglets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sous-onglets button {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 8px;
  border: 2px solid var(--encre); border-radius: 99px; background: var(--surface); color: var(--encre);
  font: 700 13px var(--sans); cursor: pointer;
}
.sous-onglets button[aria-pressed="true"] { background: var(--soleil); }
.voyant { display: inline-grid; place-items: center; flex: none; font: 800 11px var(--sans); }
.voyant.point { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--encre); background: var(--surface-2); }
.voyant.point.ok { background: var(--ok); }
.voyant.point.alerte { background: var(--alerte); }
.voyant.point.ambre { background: #f0b429; }
.voyant.plein { width: 18px; height: 18px; border-radius: 50%; color: #ffffff; border: 1.5px solid var(--encre); }
.voyant.plein.ok { background: var(--ok); }
.voyant.plein.alerte { background: var(--alerte); }
.voyant.ambre:not(.point) { width: 18px; height: 18px; border-radius: 50%; background: #f0b429; color: var(--encre); border: 1.5px solid var(--encre); }
.carte.validation { padding: 12px 14px; }
.validation-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.validation .aide { margin-top: 6px; }
.validation-boutons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.btn.valide-go { background: var(--ok); color: #ffffff; }
.btn.valide-nogo { background: var(--alerte); color: #ffffff; }

/* Recap : schema du vol */
.schema-vol { display: grid; margin: 4px 0 10px; }
.schema-terrain { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.schema-terrain strong { font: 800 17px var(--titre); }
.schema-terrain .meta { display: block; font-size: 13px; color: var(--texte-2); }
.schema-point { width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; border: 3px solid var(--encre); background: var(--soleil); }
.schema-branche { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.schema-trait { justify-self: center; width: 3px; min-height: 64px; background: repeating-linear-gradient(var(--encre) 0 8px, transparent 8px 12px); }
.schema-infos { display: grid; gap: 2px; padding: 8px 0 10px; font-size: 14px; }
.schema-deg { color: var(--accent); font-weight: 700; }
.etats-liste { display: grid; gap: 6px; margin-top: 10px; }
.etat-ligne { display: grid; grid-template-columns: 22px 64px 1fr; align-items: center; gap: 8px; padding: 8px 10px; text-align: left;
  border: 1.5px solid var(--bord); border-radius: 12px; background: var(--surface); color: var(--texte); font: inherit; cursor: pointer; }
.etat-ligne .meta { font-size: 13px; color: var(--texte-2); }

/* Nav : route et barres de piste */
.route-edit { display: grid; gap: 6px; }
.route-ligne { display: grid; grid-template-columns: 70px auto 1fr auto; align-items: center; gap: 8px; padding: 6px 0; border-top: 1.5px dashed var(--bord); }
.route-ligne:first-child { border-top: 0; }
.route-role { font: 700 11px var(--sans); text-transform: uppercase; letter-spacing: 0.04em; color: var(--texte-2); }
.route-ligne .meta { font-size: 13px; color: var(--texte-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barre-piste { display: grid; gap: 6px; margin-top: 10px; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.barre-titre { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.barre-titre .meta { color: var(--texte-2); font-size: 13px; }
.piste { position: relative; height: 30px; border-radius: 6px; background: var(--surface); }
.piste-dispo { position: absolute; left: 0; top: 0; bottom: 0; border: 2px solid var(--encre); border-radius: 6px; background: repeating-linear-gradient(90deg, transparent 0 18px, rgba(20,40,75,0.08) 18px 22px); }
.piste-dispo span { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font: 700 11px var(--sans); color: var(--texte-2); }
.piste-besoin { position: absolute; left: 0; top: 7px; height: 16px; border-radius: 4px; border: 1.5px solid var(--encre); }
.piste-besoin.ok { background: var(--ok); }
.piste-besoin.ko { background: var(--alerte); }
.piste-repere { position: absolute; top: 2px; bottom: 2px; width: 0; border-left: 2.5px dashed var(--encre); }
.barre-legende { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; font-size: 13px; }

/* Carbu : jauges par branche */
.schema-carbu { display: grid; gap: 12px; }
.carbu-branche { display: grid; gap: 6px; }
.jauge-carbu { position: relative; height: 22px; border: 2px solid var(--encre); border-radius: 6px; background: var(--surface); overflow: hidden; }
.carbu-reste { position: absolute; left: 0; top: 0; bottom: 0; background: var(--soleil); }
.carbu-conso { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, var(--accent-doux) 0 6px, transparent 6px 10px); border-left: 2px solid var(--encre); }
.carbu-reserve { position: absolute; top: -2px; bottom: -2px; width: 0; border-left: 3px solid var(--alerte); }

/* Debrief */
.formulaire { display: grid; gap: 8px; }
.formulaire label { font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: 0.04em; color: var(--texte-2); }
.formulaire label.case { text-transform: none; letter-spacing: 0; font: 500 14px var(--sans); color: var(--texte); }
.formulaire textarea, .formulaire input[type="text"] { width: 100%; padding: 10px 12px; border: 2px solid var(--encre); border-radius: 12px; background: #ffffff; color: var(--texte); font: 16px var(--sans); }

/* ---------- Administration ---------- */
.entete-boutons { display: flex; gap: 8px; }
:root[data-onglet="admin"] {
  --fond: #eceff4; --surface: #ffffff; --surface-2: #e2e7ef; --encre: #1b2333; --texte: #1b2333; --texte-2: #55607a;
  --bord: rgba(27, 35, 51, 0.16); --soleil: #c3cfe2; --accent: #3b4a6b; --accent-doux: #dde3ee;
}
.tableau-import { display: grid; grid-template-columns: 28px 1.6fr 0.8fr 0.8fr; gap: 6px 8px; align-items: center; font-size: 13px; margin: 8px 0; }
.tableau-import .meta { display: block; font-size: 11px; color: var(--texte-2); }
.tableau-import .case { min-height: 0; }
.remarques { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.liste.controles li { align-items: flex-start; }
.champ input.manquant { border-color: var(--alerte); border-style: dashed; }
.abaque { margin-top: 8px; }
.abaque-grille { display: grid; gap: 4px; align-items: center; overflow-x: auto; }
.abaque-grille > .champ:first-of-type, .abaque-grille { grid-auto-columns: minmax(0, 1fr); }
.abaque-grille .champ input { min-height: 36px; padding: 0 6px; font-size: 14px; text-align: right; }
.abaque-grille .champ span:empty { display: none; }
.jauge-centrage.bras { margin-bottom: 30px; }
.barre-enregistrer { position: sticky; bottom: calc(86px + env(safe-area-inset-bottom)); display: flex; justify-content: center; }

/* ---------- Plantes : options ; Biblio : raccourcis ---------- */
.plante-titre { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.icone-btn.mini { width: 36px; height: 36px; box-shadow: 1.5px 1.5px 0 var(--encre); }
.icone-btn.mini svg { width: 18px; height: 18px; }
.choix-photo { display: grid; gap: 10px; }
.choix-photo .btn { gap: 8px; }
.raccourcis { display: grid; gap: 8px; }
#feuille-contenu .carte { box-shadow: none; }

/* Administration des avions : exemple recalcule, enveloppe, tables en lecture */
.tableau-concordance { display: grid; grid-template-columns: 1.6fr 1fr 1fr 20px; gap: 4px 8px; font-size: 13px; margin: 6px 0 10px; }
.tableau-concordance .col { font-size: 11px; color: var(--texte-2); }
.ok-texte { color: var(--ok); font-weight: 700; }
.alerte-texte { color: var(--alerte); font-weight: 700; }
.graphe-enveloppe { margin: 10px 0 0; }
.graphe-enveloppe svg { width: 100%; height: auto; display: block; }
.graphe-enveloppe text { font: 10px var(--mono); fill: var(--texte-2); }
.graphe-enveloppe .env-titre { font: 600 12px var(--sans); fill: var(--texte); }
.graphe-enveloppe .env-legende { font: 10px var(--sans); }
.graphe-enveloppe .axe { stroke: var(--texte); stroke-width: 1.2; }
.graphe-enveloppe .env-zone { fill: var(--ok-doux); opacity: 0.6; }
.graphe-enveloppe .env-contour { stroke: var(--encre); stroke-width: 2.4; fill: none; stroke-linecap: square; }
.graphe-enveloppe .env-att { stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 6 4; fill: none; }
.graphe-enveloppe .env-rappel { stroke: var(--texte-2); stroke-width: 0.8; stroke-dasharray: 4 3; }
.graphe-enveloppe .env-rappel-pt { stroke: var(--encre); stroke-width: 0.8; stroke-dasharray: 2 3; opacity: 0.7; }
.graphe-enveloppe .env-rappel-pt.arr { stroke: var(--accent); }
.graphe-enveloppe .env-rappel-pt.vide { opacity: 0.35; }
.graphe-enveloppe .env-trajet { stroke: var(--accent); stroke-width: 1.5; fill: none; }
.graphe-enveloppe .point { fill: var(--encre); stroke: var(--surface); stroke-width: 1.5; }
.graphe-enveloppe .point.arr { fill: var(--accent); }
.graphe-enveloppe .point.hors { fill: var(--alerte); }
.graphe-enveloppe .point.vide { fill: var(--texte-2); }
.graphe-enveloppe .etiquette { fill: var(--texte); font-weight: 600; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.grille-lecture { display: grid; gap: 2px 6px; font-size: 13px; overflow-x: auto; }
.grille-lecture .col { font-size: 11px; color: var(--texte-2); }

/* Administration : edition des fiches (points, reservoirs, tables par masse) */
.btn.mini { min-height: 36px; min-width: 36px; padding: 0 10px; font-size: 13px; border-radius: 10px; }
.editeur-points { display: grid; gap: 6px; margin: 6px 0 10px; }
.ligne-points { display: grid; grid-template-columns: 1fr 1fr 84px; gap: 6px; align-items: center; }
.ligne-points.entete .col { font-size: 11px; color: var(--texte-2); }
.ligne-points .champ span:empty { display: none; }
.ligne-points .champ input { min-height: 40px; text-align: right; }
.gestes-ligne { display: flex; gap: 4px; justify-content: flex-end; }
.ligne-reservoir { display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; gap: 6px; align-items: end; padding: 8px 0; border-bottom: 1px dashed var(--bord); }
.ligne-reservoir:last-of-type { border-bottom: 0; }
.bloc-masse { margin-top: 12px; padding-top: 10px; border-top: 2px solid var(--bord); }
.entete-masse { display: flex; gap: 8px; align-items: end; }
.entete-masse .champ { flex: 1; }
.case-ligne { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; font-size: 14px; line-height: 1.35; }
.case-ligne input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent); }
.editeur-tables .boutons { flex-wrap: wrap; }
@media (max-width: 380px) { .ligne-reservoir { grid-template-columns: 1fr 1fr; } }
.ligne-points.entete .col { background: none; padding: 0; text-align: center; }

/* =================== Onglet Dops : conversation et appel =================== */
:root[data-onglet="dops"] {
  --fond: #ffe9d9;
  --surface: #fffaf5;
  --surface-2: #ffd5c2;
  --encre: #3b2320;
  --texte: #3b2320;
  --texte-2: #7c5a52;
  --bord: rgba(59, 35, 32, 0.16);
  --soleil: #ffcf33;
  --accent: #ff6b4a;
  --accent-texte: #ffffff;
  --accent-doux: #ffd5c2;
  --specialiste: #b9478f;
}
:root[data-onglet="dops"] .barre { display: none; }
:root[data-onglet="dops"] main { padding-bottom: 110px; }

.entete-dops { flex-wrap: wrap; align-items: end; }
.entete-dops .agent-actuel { flex: 1 1 130px; min-width: 0; }
.entete-dops .agent-actuel select { width: 100%; }
.fil-dops { display: grid; gap: 10px; }
.bulle { max-width: 88%; padding: 10px 14px; border-radius: 18px; border: 2px solid var(--encre); font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.bulle p { margin: 4px 0; }
.bulle ul { margin: 4px 0; padding-left: 20px; }
.bulle li { margin: 2px 0; }
.bulle code { font: 13px var(--mono); background: var(--surface-2); padding: 1px 4px; border-radius: 4px; }
.bulle .md-titre { font-weight: 800; margin-top: 8px; }
.bulle .md-table { font-size: 13px; }
.bulle.moi { justify-self: end; background: linear-gradient(110deg, #ff8a3d, #ff5f6d); color: #fff; border-color: transparent; border-bottom-right-radius: 6px; }
.bulle.agent { justify-self: start; background: var(--surface); box-shadow: 3px 3px 0 var(--encre); border-bottom-left-radius: 6px; }
.bulle.agent.specialiste { box-shadow: 3px 3px 0 var(--specialiste, var(--accent)); border-color: var(--specialiste, var(--accent)); }
.bulle.agent.specialiste .bulle-nom { color: var(--specialiste, var(--accent)); }
.bulle.en-attente { opacity: 0.65; }
.bulle-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bulle-tete .btn.mini { min-height: 30px; min-width: 30px; padding: 0 6px; border-width: 1px; box-shadow: none; }
.bulle-nom { font: 800 11px var(--titre); text-transform: uppercase; letter-spacing: 0.06em; color: #e0532f; }
.bulle .erreur { color: var(--alerte); }
.passage { justify-self: center; margin: 0; padding: 4px 12px; border-radius: 999px; background: var(--surface-2); color: var(--texte-2); font-size: 13px; }
.reflechit { display: flex; align-items: center; }
.points i { display: inline-block; width: 7px; height: 7px; margin-right: 3px; border-radius: 50%; background: var(--accent); animation: rebond 1.2s infinite; }
.points i:nth-child(2) { animation-delay: 0.15s; }
.points i:nth-child(3) { animation-delay: 0.3s; }
@keyframes rebond { 0%, 80%, 100% { transform: translateY(0); opacity: 0.4; } 40% { transform: translateY(-5px); opacity: 1; } }
.accueil-tete { display: flex; gap: 14px; align-items: center; }
.accueil-tete h2 { margin: 0; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.puce { padding: 8px 12px; border: 2px solid var(--encre); border-radius: 999px; background: var(--surface-2); color: var(--texte); font: inherit; font-size: 14px; cursor: pointer; }
.btn.large { width: 100%; }
.liste-conversations { display: grid; gap: 8px; max-height: 60vh; overflow-y: auto; }

.composeur {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; max-width: 640px; margin: 0 auto;
  display: flex; gap: 8px; align-items: flex-end;
  padding: 18px 12px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(color-mix(in srgb, var(--fond) 0%, transparent), var(--fond) 32%);
}
.composeur textarea {
  flex: 1; min-width: 0; min-height: 48px; max-height: 140px; resize: none;
  padding: 12px 14px; border: 2px solid var(--encre); border-radius: 16px;
  background: var(--surface); color: var(--texte); font: inherit; font-size: 16px; line-height: 1.3;
}
.composeur .icone-btn { flex: none; width: 48px; height: 48px; border: 2px solid var(--encre); color: var(--encre); font-size: 20px; }
.composeur .icone-btn.actif { background: var(--alerte-doux); animation: pulse 1s infinite; }
.composeur .envoyer { background: var(--accent); color: #fff; border-color: var(--accent); }
.composeur .appeler { background: var(--soleil); }

.orbe {
  position: relative; flex: none; display: inline-grid; place-items: center;
  width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--encre);
  background: radial-gradient(circle at 35% 30%, #fff6c2, #ffcf33 55%, #f0a500);
  box-shadow: 0 0 0 6px rgba(59, 47, 134, 0.12);
}
.orbe-coeur { font: 900 26px var(--titre); color: #1c2340; }
.orbe.calme { animation: respire 4s ease-in-out infinite; }
@keyframes respire { 50% { box-shadow: 0 0 0 12px rgba(59, 47, 134, 0.08); } }

.appel {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  background: linear-gradient(175deg, #ffb25c, #ff6f61 55%, #c9488b); color: #ffffff; text-align: center;
}
.appel-agent { margin: 0; font: 800 13px var(--titre); letter-spacing: 0.12em; text-transform: uppercase; color: #fff2b0; }
.appel-orbe { padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.appel .orbe { width: 168px; height: 168px; border-width: 3px; border-color: #ffffff; box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.28); }
.appel .orbe-coeur { font-size: 64px; }
.appel[data-etat="ecoute"] .orbe { animation: ecoute 1.4s ease-in-out infinite; }
.appel[data-etat="reflechit"] .orbe { animation: pense 1.2s ease-in-out infinite; }
.appel[data-etat="parle"] .orbe { animation: parle 0.45s ease-in-out infinite alternate; }
.appel[data-etat="pause"] .orbe { filter: saturate(0.4) brightness(0.8); box-shadow: none; }
@keyframes ecoute { 50% { box-shadow: 0 0 0 24px rgba(255, 255, 255, 0.3), 0 0 0 50px rgba(255, 255, 255, 0.12); } }
@keyframes pense { 50% { transform: scale(0.93); filter: brightness(1.2); } }
@keyframes parle { from { transform: scale(1); } to { transform: scale(1.07); } }
.appel-etat { min-height: 1.4em; margin: 0; font: 700 18px var(--titre); }
.appel-texte { max-width: 520px; max-height: 32vh; margin: 0; overflow-y: auto; color: #fff4ec; font-size: 16px; line-height: 1.5; }
.btn.raccrocher { min-width: 180px; background: #e5484d; border-color: #fff; color: #fff; }
@media (prefers-reduced-motion: reduce) { .orbe, .appel .orbe, .points i, .composeur .icone-btn.actif { animation: none !important; } }

/* =================== Onglet Aujourd'hui : Agrume (2026-11-01) =================== */
/* Fond jaune garde ; encre brun chaud au lieu du bleu nuit ; boutons et titre du brief orange. */
:root[data-onglet="jour"] {
  --encre: #3b2a1e;
  --texte: #3b2a1e;
  --texte-2: #7a5d45;
  --bord: rgba(59, 42, 30, 0.2);
  --soleil: #ffd84a;
  --accent: #e0650c;
  --accent-texte: #ffffff;
  --accent-doux: #ffe0c2;
}
:root[data-onglet="jour"] .onglets a[aria-current="page"],
:root[data-onglet="dops"] .onglets a[aria-current="page"] { color: #fff; }
:root[data-onglet="jour"] .onglets a[aria-current="page"] { background: #ff8a1f; }
:root[data-onglet="dops"] .onglets a[aria-current="page"] { background: #ff6b4a; }
:root[data-onglet="jour"] .brief h2,
:root[data-onglet="jour"] .brief .lecteur-infos strong { color: #a8410a; }
:root[data-onglet="jour"] .lecture-btn { background: #ff8a1f; color: #fff; border-color: var(--encre); }
:root[data-onglet="jour"] .progression div { background: #ff8a1f; }
:root[data-onglet="jour"] .barre .btn.primaire { background: linear-gradient(100deg, #ff8a1f, #ff5f3d); color: #fff; }

/* ---------- Partager vers Dops ---------- */
.carte.partage { display: grid; gap: 14px; }
.apercu-partage { display: grid; gap: 6px; padding: 10px 12px; border: 1.5px dashed var(--bord); border-radius: 14px; background: var(--surface-2); overflow-wrap: anywhere; }
.apercu-partage p { margin: 0; font-size: 14px; color: var(--texte-2); }
.apercu-partage a { font-size: 13px; color: var(--accent); }
.vignettes-partage { display: flex; gap: 6px; overflow-x: auto; }
.vignettes-partage img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1.5px solid var(--encre); flex: none; }
.puce[aria-checked="true"] { background: var(--accent); color: var(--accent-texte, #fff); border-color: var(--encre); }
.carte.partage textarea { width: 100%; resize: vertical; padding: 10px 12px; border: 2px solid var(--encre); border-radius: 12px; background: var(--surface); color: var(--texte); font: inherit; }

/* Logo 1.1A (cerveau + D) : en-tete et cercle de l'onglet Dops */
img.logo { width: 46px; height: 46px; object-fit: contain; display: block; }
.orbe { background: #ffffff; }
.orbe-logo { width: 74%; height: 74%; object-fit: contain; }
img.logo { border-radius: 0; }

/* Onglet Dops : reponse qui s'ecrit, boutons de l'ecran d'appel */
.bulle.en-cours p:last-child::after { content: "▍"; margin-left: 2px; animation: pulse 1s infinite; color: var(--accent); }
.appel-boutons { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.btn.brief-appel { background: rgba(255, 255, 255, 0.92); color: #3b2320; border-color: #fff; }
.accueil-dops .btn.large + .btn.large { margin-top: 8px; }

/* Biblio : atelier de lecture et revision espacee */
.atelier-biblio { display: grid; gap: 12px; }
@media (min-width: 560px) { .atelier-biblio { grid-template-columns: 1fr 1fr; } }
.carte.atelier { display: grid; gap: 8px; align-content: start; }
.carte.atelier strong { font: 800 15px var(--titre); }
.carte.atelier .liste li { padding: 6px 0; }
