/* Interface terrain : gros boutons, texte lisible, contrastes élevés. */
:root {
  --bleu: #1E3A5F;
  --fond: #F5F7FA;
  --carte: #ffffff;
  --texte: #1a1a1a;
  --gris: #5b6472;
  --vert: #1e7b34;
  --orange: #a35200;
  --rouge: #b3261e;
  --info: #1f5fa8;
  --bordure: #c9d1dc;
}
* { box-sizing: border-box; }
/* L'attribut hidden doit toujours masquer, même si une classe impose display: flex */
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--fond); color: var(--texte);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { padding-bottom: 92px; }

.barre { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  background: var(--bleu); color: #fff; padding: 14px 16px; padding-top: calc(14px + env(safe-area-inset-top)); }
.barre .titre { font-weight: 700; font-size: 19px; flex: 1; }
.pastille { font-size: 14px; padding: 4px 10px; border-radius: 999px; background: #fff; color: var(--bleu); }
.pastille.hors-ligne { background: var(--orange); color: #fff; }

main { padding: 16px; max-width: 720px; margin: 0 auto; }
h1 { font-size: 22px; margin: 8px 0 14px; }
h2 { font-size: 19px; margin: 18px 0 8px; }

.carte { background: var(--carte); border-radius: 14px; padding: 16px; margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); display: block; width: 100%; text-align: left;
  border: 2px solid transparent; font: inherit; color: inherit; cursor: pointer; }
.carte:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--info); outline-offset: 2px; }
.carte .ligne1 { font-weight: 700; font-size: 18px; }
.carte .ligne2 { color: var(--gris); margin-top: 4px; }

/* Badges : toujours un libellé en plus de la couleur */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 14px; font-weight: 700;
  color: #fff; margin-right: 6px; }
.badge.vert { background: var(--vert); }
.badge.orange { background: var(--orange); }
.badge.rouge { background: var(--rouge); }
.badge.bleu { background: var(--info); }
.badge.gris { background: #6b7280; }

.bouton { min-height: 56px; width: 100%; padding: 14px 18px; border: 0; border-radius: 14px;
  background: var(--bleu); color: #fff; font: inherit; font-weight: 700; font-size: 18px; cursor: pointer; }
.bouton.secondaire { background: #fff; color: var(--bleu); border: 2px solid var(--bleu); }
.bouton:disabled { opacity: .5; }
.bouton-discret { min-height: 44px; background: transparent; color: #fff; border: 1px solid #fff;
  border-radius: 10px; padding: 6px 12px; font: inherit; }

label { display: block; font-weight: 700; margin: 14px 0 6px; }
input, textarea { width: 100%; min-height: 52px; padding: 12px; font: inherit; font-size: 17px;
  border: 2px solid var(--bordure); border-radius: 12px; background: #fff; }
textarea { min-height: 96px; }
.aide { color: var(--gris); font-size: 15px; margin-top: 4px; }
.erreur { background: #fdecea; color: var(--rouge); border: 2px solid var(--rouge); border-radius: 12px;
  padding: 12px; margin: 12px 0; font-weight: 600; }
.succes { background: #e8f5e9; color: var(--vert); border: 2px solid var(--vert); border-radius: 12px;
  padding: 12px; margin: 12px 0; font-weight: 600; }

.lignes-reception { display: grid; gap: 10px; }
.ligne-reception { background: #fff; border-radius: 12px; padding: 12px; border: 1px solid var(--bordure); }
.ligne-reception .nom { font-weight: 700; }

.photo-apercu { width: 100%; border-radius: 12px; margin-top: 10px; }
.file-attente { color: var(--orange); font-weight: 600; }

.onglets { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: #fff;
  border-top: 2px solid var(--bordure); padding-bottom: env(safe-area-inset-bottom); }
.onglet { flex: 1; min-height: 64px; border: 0; background: transparent; font: inherit; font-weight: 700;
  color: var(--gris); font-size: 16px; }
.onglet.actif { color: var(--bleu); border-top: 4px solid var(--bleu); }

.vide { text-align: center; color: var(--gris); padding: 40px 12px; }

/* Très large écran : le même contenu, centré */
@media (min-width: 900px) {
  main { max-width: 960px; }
  .onglets { position: static; max-width: 960px; margin: 0 auto; border-top: 0; }
  body { padding-bottom: 24px; }
}

@media (prefers-color-scheme: dark) {
  :root { --fond: #121821; --carte: #1c2430; --texte: #f0f3f7; --gris: #aab4c3; --bordure: #3a4656; }
  .onglets { background: #1c2430; }
  .ligne-reception { background: #1c2430; }
  input, textarea { background: #121821; color: #f0f3f7; }
  .bouton.secondaire { background: transparent; color: #f0f3f7; border-color: #f0f3f7; }
}
