/* Papomamo, page de réglage de la famille : un écran, une colonne, gros caractères, gros boutons. */
:root {
  --fond: #f4efe6;
  --carte: #ffffff;
  --encre: #1f2a27;
  --doux: #55625e;
  --vert: #2f5d50;
  --vert-clair: #e3ede9;
  --orange: #b5541a;
  --orange-clair: #fbe9dc;
  --rouge: #a3271f;
  --rouge-clair: #f8e1de;
  --trait: #d9d1c4;
  --rayon: 14px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.45;
}

.entete { padding: 1.1rem 1rem 0.4rem; max-width: 40rem; margin: 0 auto; }
.marque { margin: 0; color: var(--vert); font-weight: 700; letter-spacing: 0.02em; font-size: 0.95rem; }
h1 { margin: 0.1rem 0 0; font-size: 1.6rem; line-height: 1.2; }
h2 { font-size: 1.2rem; margin: 0 0 0.6rem; line-height: 1.25; }

main { max-width: 40rem; margin: 0 auto; padding: 0.4rem 1rem 3rem; }

.bandeau-essai {
  max-width: 40rem; margin: 0.4rem auto 0; padding: 0.8rem 1rem;
  background: var(--orange-clair); color: #6b2e0b; border-left: 6px solid var(--orange); font-weight: 600;
}

.annonce {
  position: sticky; top: 0; z-index: 2; max-width: 40rem; margin: 0.4rem auto 0; padding: 0.8rem 1rem;
  background: var(--vert); color: #fff; font-weight: 600;
}
.annonce.erreur { background: var(--rouge); }

.carte {
  background: var(--carte); border-radius: var(--rayon); padding: 1rem; margin: 0 0 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
section.carte { margin-top: 1rem; }

.proche { border-top: 1px solid var(--trait); padding: 0.9rem 0; }
.proche:first-of-type { border-top: 0; padding-top: 0.2rem; }
.proche .nom { font-size: 1.15rem; font-weight: 700; }
.proche .lien, .proche .surnoms, .aide, .vide { color: var(--doux); }
.numero { font-size: 1.25rem; font-variant-numeric: tabular-nums; letter-spacing: 0.03em; margin: 0.2rem 0; }
.sans-numero { color: var(--orange); }
.statut { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--rouge-clair);
          color: var(--rouge); font-size: 0.9rem; font-weight: 600; margin-left: 0.3rem; }

.interrupteur { display: flex; align-items: center; gap: 0.6rem; margin: 0.5rem 0; min-height: 48px; }
.interrupteur input { width: 1.6rem; height: 1.6rem; accent-color: var(--vert); }
.interrupteur.grise { color: var(--doux); }

.boutons { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }

button {
  font: inherit; font-weight: 600; min-height: 52px; padding: 0.55rem 1.1rem; border-radius: 12px;
  border: 2px solid var(--vert); background: var(--carte); color: var(--vert); cursor: pointer;
}
button.principal { background: var(--vert); color: #fff; }
button.danger { border-color: var(--rouge); color: var(--rouge); }
button.danger.principal { background: var(--rouge); color: #fff; }
button.petit { min-height: 48px; min-width: 52px; padding: 0.4rem 0.8rem; }
button:disabled { opacity: 0.45; cursor: default; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.confirmer { background: var(--rouge-clair); border-radius: 10px; padding: 0.8rem; margin-top: 0.6rem; }

form label, .champ > label { display: block; font-weight: 600; margin: 0.7rem 0 0.25rem; }
input[type="text"], input[type="tel"], input[type="number"] {
  font: inherit; width: 100%; min-height: 52px; padding: 0.5rem 0.7rem; border-radius: 10px;
  border: 2px solid var(--trait); background: #fff; color: var(--encre);
}
input.invalide { border-color: var(--rouge); }
.erreur-champ { color: var(--rouge); font-weight: 600; margin: 0.3rem 0 0; }
.avertissement { color: var(--orange); font-weight: 600; margin: 0.4rem 0 0; }

fieldset { border: 0; padding: 0; margin: 0.6rem 0 0; }
legend { font-weight: 600; padding: 0; margin-bottom: 0.25rem; }
.choix { display: flex; align-items: center; gap: 0.6rem; min-height: 48px; }
.choix input { width: 1.4rem; height: 1.4rem; accent-color: var(--vert); }

ol.alerte { padding-left: 0; list-style: none; margin: 0; counter-reset: rang; }
ol.alerte li { display: flex; align-items: center; gap: 0.5rem; border-top: 1px solid var(--trait); padding: 0.6rem 0;
               counter-increment: rang; }
ol.alerte li:first-child { border-top: 0; }
ol.alerte li::before { content: counter(rang) "."; font-weight: 700; min-width: 1.6rem; }
ol.alerte .qui { flex: 1; font-weight: 600; }

.rouge { color: var(--rouge); font-weight: 700; }

ul.trace { list-style: none; padding: 0; margin: 0; }
ul.trace li { border-top: 1px solid var(--trait); padding: 0.45rem 0; }
ul.trace li:first-child { border-top: 0; }
ul.trace .quand { color: var(--doux); font-size: 0.9rem; display: block; }

.attente { color: var(--doux); }
