/* TerraShift, journal de terrain. Lisibilite en plein soleil, une main, gants possibles :
   contrastes forts, cibles de 48 px au moins, une seule famille de caracteres. */
:root {
  --craie: #f2f3ef;
  --encre: #141a1f;
  --pierre: #cbcec4;
  --bleu: #22406b;
  --bleu-clair: #e4eaf3;
  --rouille: #96380f;
  --vert: #2c5233;
  --rayon: 4px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --craie: #10151a; --encre: #eef0ea; --pierre: #3a4149; --bleu: #a8c2e8;
          --bleu-clair: #1b2733; --rouille: #e0895f; --vert: #93c49b; }
}
* { box-sizing: border-box; }
body {
  margin: 0; padding: 0 0 5.5rem;
  background: var(--craie); color: var(--encre);
  font: 1.0625rem/1.45 "Atkinson Hyperlegible", ui-sans-serif, system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}
.bandeau {
  display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap;
  padding: max(1rem, env(safe-area-inset-top)) 1rem .75rem;
  border-bottom: 2px solid var(--encre);
}
.bandeau h1 { margin: 0; font-size: 1.375rem; letter-spacing: -.015em; }
.etat { margin: 0; font-size: .9375rem; color: var(--bleu); }
main { max-width: 34rem; margin: 0 auto; padding: 1rem; }
h2 { font-size: 1.125rem; margin: .5rem 0 1rem; font-weight: 700; }
label { display: block; margin: 1rem 0 .25rem; font-size: .9375rem; }
input, select, textarea {
  width: 100%; min-height: 3rem; padding: .625rem .75rem;
  font: inherit; color: inherit; background: transparent;
  border: 2px solid var(--pierre); border-radius: var(--rayon);
}
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 3px solid var(--bleu); outline-offset: 2px;
}
textarea { min-height: 4rem; }
.duo { display: flex; gap: .75rem; }
.duo > div { flex: 1; }
details { margin-top: 1rem; border-top: 1px solid var(--pierre); padding-top: .5rem; }
summary { min-height: 3rem; display: flex; align-items: center; cursor: pointer; }
button { font: inherit; min-height: 3rem; border-radius: var(--rayon); cursor: pointer; }
.principal {
  width: 100%; margin-top: 1.5rem; padding: .875rem;
  background: var(--bleu); color: var(--craie); border: 2px solid var(--bleu); font-weight: 700;
}
@media (prefers-color-scheme: dark) { .principal { color: #10151a; } }
.principal[disabled] { opacity: .5; cursor: progress; }
#retour { margin-top: 1.25rem; border-left: 6px solid var(--pierre); padding: .75rem .875rem; }
#retour.conforme { border-color: var(--vert); }
#retour.alerte { border-color: var(--rouille); }
#retour.impossible { border-color: var(--bleu); }
#retour h3 { margin: 0 0 .25rem; font-size: 1rem; }
#retour p { margin: .25rem 0; }
#retour .source { font-size: .875rem; color: var(--bleu); }
.alerte { color: var(--rouille); }
.vide { color: var(--bleu); }
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { padding: .75rem 0; border-bottom: 1px solid var(--pierre); }
.liste .quoi { font-weight: 700; }
.liste .ou { color: var(--bleu); }
.onglets {
  position: fixed; inset: auto 0 0 0; display: flex;
  background: var(--craie); border-top: 2px solid var(--encre);
  padding-bottom: env(safe-area-inset-bottom);
}
.onglets button {
  flex: 1; min-height: 3.5rem; border: 0; background: transparent; color: var(--encre);
}
.onglets button.actif { background: var(--bleu-clair); font-weight: 700; box-shadow: inset 0 3px 0 var(--bleu); }
.aide { margin: 1.25rem 0 .25rem; font-size: .9375rem; }
.choix { list-style: none; margin: .25rem 0 0; padding: 0; }
.choix li { display: flex; align-items: center; gap: .5rem; padding: .375rem 0; }
.choix label { margin: 0; flex: 1; }
.choix input[type="checkbox"] { width: 1.5rem; height: 1.5rem; min-height: 0; flex: none; }
.choix .part { max-width: 5.5rem; }
.choix select { max-width: 9rem; }
.onglets button { font-size: .9375rem; }
#retour-lot { margin-top: 1.25rem; border-left: 6px solid var(--pierre); padding: .75rem .875rem; }
#retour-lot.conforme { border-color: var(--vert); }
#retour-lot.alerte { border-color: var(--rouille); }
#retour-lot.impossible { border-color: var(--bleu); }
#retour-lot .source, #retour .source { font-size: .875rem; color: var(--bleu); }
#ajouter-composant { width: 100%; margin-top: .5rem; background: transparent; color: inherit;
                     border: 2px dashed var(--pierre); }
.liste .statut { color: var(--bleu); }
