/* ==========================================================================
   TAMADOUGH — ce qui n'appartient qu'à cette app. Chargé APRÈS workbench.css.

   Accent croûte dorée. Une PAIRE vérifiée dans les deux thèmes :
     python3 lib/workbench/css/check_contrasts.py "#8a4a14" "#ffffff" "#e3a45a" "#0d0d0e"
     clair   blanc sur accent 6,84:1   accent sur fond 6,40:1
     sombre  encre sur accent 9,00:1   accent sur fond 8,67:1
   ========================================================================== */
:root {
  --accent: #8a4a14;
  --accent-tx: #ffffff;
  --accent-soft: #f6eadc;
  --accent-line: #e2c6a4;
  --ring: rgba(138, 74, 20, .30);
  --pate: #edd4a6;
  --pate-bulle: #d8b57a;
  --visage: #3b2716;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #e3a45a;
    --accent-tx: #0d0d0e;
    --accent-soft: #2e2418;
    --accent-line: #4a3822;
    --ring: rgba(227, 164, 90, .32);
    --pate: #d2a569;
    --pate-bulle: #b3854a;
  }
}
:root[data-theme="dark"] {
  --accent: #e3a45a;
  --accent-tx: #0d0d0e;
  --accent-soft: #2e2418;
  --accent-line: #4a3822;
  --ring: rgba(227, 164, 90, .32);
  --pate: #d2a569;
  --pate-bulle: #b3854a;
}

/* --- En cuisine, les mains dans la pâte : de grosses cibles ------------- */
.bouton.gros { min-height: 56px; font-size: 1.1rem; font-weight: 600; }
a.bouton.pleine-largeur { display: flex; justify-content: center; align-items: center; text-align: center; }
.centre { text-align: center; }

/* Le socle style onze formes de saisie ; datetime-local n'en fait pas partie. */
input[type=datetime-local] {
  display: block; width: 100%; min-height: 44px;
  padding: var(--e-2) var(--e-3);
  font: inherit; font-size: 16px; color: var(--tx);
  background: var(--surface);
  border: 1px solid var(--line-controle); border-radius: var(--r-m);
  -webkit-appearance: none; appearance: none;
}
input[type=datetime-local]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }

.stepper { display: grid; grid-template-columns: 56px 1fr 56px; gap: var(--e-2); }
.stepper .bouton { min-height: 56px; padding: 0; font-size: 1.5rem; justify-content: center; }
.stepper input { min-height: 56px; text-align: center; font-size: 1.25rem; font-variant-numeric: tabular-nums; }

/* --- Ratios du rafraîchi ------------------------------------------------ */
.ratios { border: 0; padding: 0; margin: 0; min-width: 0; }
.ratios legend { font-size: var(--t-s); color: var(--tx-2); margin-bottom: var(--e-1); }
.ratios-grille { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--e-2); }
.ratio { position: relative; }
.ratio input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.ratio span {
  display: flex; align-items: center; justify-content: center; min-height: 56px;
  border: 1px solid var(--line-controle); border-radius: var(--r-m);
  background: var(--surface); font-weight: 600; font-variant-numeric: tabular-nums;
}
.ratio input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-tx); }
.ratio input:focus-visible + span { box-shadow: 0 0 0 3px var(--ring); }
@media (max-width: 440px) { .ratios-grille { grid-template-columns: repeat(3, 1fr); } }

/* --- Choix du mode de planification ------------------------------------ */
.choix { border: 0; padding: 0; margin: 0; display: grid; gap: var(--e-2); min-width: 0; }
.choix legend { font-weight: 600; margin-bottom: var(--e-2); }
.choix-carte {
  display: flex; gap: var(--e-3); align-items: flex-start; min-height: 56px;
  padding: var(--e-3); border: 1px solid var(--line); border-radius: var(--r-l); cursor: pointer;
}
.choix-carte input { width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.choix-carte span { display: flex; flex-direction: column; gap: 2px; }
.choix-carte small { color: var(--tx-2); }
.choix-carte:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.formule summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--tx-2); }
.formule[open] summary { margin-bottom: var(--e-3); }

/* --- Le levain en bocal ------------------------------------------------- */
.tamagotchi { display: flex; align-items: center; gap: var(--e-4); }
.tamagotchi-bocal { flex: none; width: 112px; }
.tamagotchi-texte { display: flex; flex-direction: column; gap: var(--e-1); min-width: 0; }
.humeur { font-size: 1.15rem; font-weight: 650; color: var(--accent); }
@media (max-width: 440px) { .tamagotchi-bocal { width: 84px; } }

.bocal { display: block; width: 100%; height: auto; overflow: visible; }
.bocal .verre { fill: var(--surface-2); stroke: var(--tx-2); stroke-width: 3; }
.bocal .couvercle { fill: var(--accent); }
.bocal .pate { fill: var(--pate); }
.bocal .bulle { fill: var(--pate-bulle); }
.bocal .visage { fill: none; stroke: var(--visage); stroke-width: 3; stroke-linecap: round; }
.bocal .oeil { fill: var(--visage); }
.bocal .etincelle { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.bocal .zzz { fill: var(--tx-3); font: 700 14px system-ui, sans-serif; }
.bocal.humeur-pic { animation: sautille 1.8s ease-in-out infinite; }
@keyframes sautille { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .bocal.humeur-pic { animation: none; } }

.connexion { max-width: 420px; margin: var(--e-6) auto 0; }
.connexion-bocal { width: 96px; margin: 0 auto; }
.nom-propose a { font-weight: 600; }
.rafraichi-ligne { display: flex; align-items: center; justify-content: space-between; gap: var(--e-3); }

/* --- Frise des étapes ----------------------------------------------------- */
.frise { list-style: none; }
.frise li {
  display: grid; grid-template-columns: 7.5rem 1fr auto; gap: var(--e-3); align-items: baseline;
  padding: var(--e-2) 0; border-bottom: 1px solid var(--line);
}
.frise li:last-child { border-bottom: 0; }
.frise time { color: var(--tx-2); font-variant-numeric: tabular-nums; }
.frise li.faite { color: var(--tx-3); }
.frise li.courante { color: var(--accent); font-weight: 650; }
.frise li.courante time { color: var(--accent); }
.frise .coche { color: var(--ok-tx); font-weight: 700; }

/* --- L'étape courante ------------------------------------------------------ */
.etape { display: flex; flex-direction: column; gap: var(--e-4); border-color: var(--accent-line); }
.etape h1 { font-size: 1.9rem; }
.etape-quand { font-size: 1.1rem; color: var(--tx-2); font-variant-numeric: tabular-nums; }
.etape-quand time.echu { color: var(--accent); font-weight: 700; }
.consigne { font-size: 1.15rem; line-height: 1.5; }
.protocole { display: grid; gap: var(--e-2); padding-left: 1.4rem; font-size: 1.1rem; }
.pesees { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--e-2); }
.pesees li { padding: var(--e-2) var(--e-3); background: var(--surface-2); border-radius: var(--r-m); }
.pot { display: flex; flex-direction: column; gap: var(--e-3); }
.pousse { font-size: 2rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }

.scenario header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--e-2); }
.scenario-sortie strong { color: var(--accent); }
