/* Écrans de saisie (lot E) : accueil (acc-), fiche poussée (pou-), journal (jou-), historique (his-),
   réglages (reg-). Couleurs : seulement les variables de css/style.css. iPhone d'abord (390 px), zones à toucher
   de 44 px, champs en 16 px, aucun défilement horizontal. */

/* ========== commun aux formulaires ========== */

.pou-libelle,
.reg-label,
.jou-label {
  display: block;
  margin: 0 0 6px;
  color: var(--encre);
  font-size: 1rem;
  font-weight: 650;
}

.pou-date,
.pou-texte,
.pou-notes,
.pou-nombre,
.jou-note,
.reg-recherche,
.reg-pin {
  display: block;
  width: 100%;
}

/* Safari iOS : un champ date garde sinon une largeur fixe et un texte centré. */
.pou-date {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  text-align: left;
}

.pou-date::-webkit-date-and-time-value {
  text-align: left;
}

[aria-invalid="true"] {
  border-color: var(--moins-bien) !important;
  box-shadow: 0 0 0 1px var(--moins-bien);
}

.reg-section > .aide,
.pou-aide {
  margin: -6px 0 12px;
}

/* ========== accueil ========== */

.acc-poussee > h2,
.acc-entete h2 {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 750;
}

.acc-poussee > h2 {
  margin-bottom: 12px;
}

/* Liseré neutre : le bleu-vert est réservé à ce qui se touche (§ 8.8). */
.acc-en-cours {
  border-left: 4px solid var(--trait-fort);
}

.acc-resume {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
}

.acc-infos {
  flex: 1;
  min-width: 0;
}

.acc-ligne {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 0 6px;
}

.acc-traitement {
  margin: 0;
  color: var(--encre-2);
  font-size: 0.9375rem;
}

.acc-actions > * {
  flex: 1 1 130px;
}

.acc-question {
  padding-top: 12px;
  border-top: 1px solid var(--trait);
}

.acc-question-texte {
  margin: 0 0 12px;
  font-weight: 600;
}

.acc-question .rangee {
  margin-top: 12px;
}

.acc-question .rangee > * {
  flex: 1 1 130px;
}

.acc-depuis {
  margin: 0;
  color: var(--encre-2);
}

.acc-noter {
  min-height: 60px;
  margin: 4px 0 16px;
  font-size: 1.125rem;
}

.acc-icone,
.acc-chevron,
.his-plus,
.his-chevron,
.jou-icone {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.acc-entete {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
  margin: 0 0 12px;
}

.acc-date-hier {
  color: var(--encre-2);
  font-size: 0.9375rem;
}

.acc-journal > .aide {
  margin: -4px 0 12px;
}

.acc-journal-resume {
  margin: 0 0 12px;
}

.acc-journal .jou-formulaire {
  margin-bottom: 12px;
}

.acc-journal .erreur-champ {
  margin: 0 0 12px;
}

.acc-rattraper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  min-height: var(--toucher);
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--accent-doux);
  color: var(--encre);
  text-decoration: none;
}

.acc-rattraper-nombre {
  color: var(--accent);
  font-weight: 700;
}

.acc-rattraper-detail {
  flex: 1;
  color: var(--encre-2);
  font-size: 0.9375rem;
}

.acc-rattraper .acc-chevron {
  color: var(--accent);
}

.acc-tuiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 8px;
}

.acc-tuile {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 2px;
  min-width: 0;
  padding: 10px;
  border-radius: 10px;
  background: var(--fond);
}

.acc-tuile dt {
  color: var(--encre-2);
  font-size: 0.8125rem;
  line-height: 1.25;
}

.acc-tuile dd {
  margin: 0;
  line-height: 1.1;
}

.acc-tuile dd.acc-valeur {
  font-size: 1.625rem;
  font-weight: 800;
}

.acc-annee > .aide {
  margin: 0 0 4px;
}

.acc-comparer {
  padding-left: 0;
}

/* ========== journal ========== */

.jou-jour {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 8px;
}

.jou-date-texte {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  margin: 0;
  text-align: center;
}

.jou-relatif {
  font-size: 1.25rem;
  font-weight: 800;
}

.jou-date-texte span {
  color: var(--encre-2);
  font-size: 0.9375rem;
}

.jou-date-texte span:only-child {
  color: var(--encre);
  font-size: 1.125rem;
  font-weight: 700;
}

.jou-fleche svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.jou-fleche:disabled {
  color: var(--encre-3);
  opacity: 0.45;
}

.jou-etat {
  margin: 0 0 12px;
  text-align: center;
}

.jou-normale-bloc {
  margin: 0 0 16px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--trait);
}

.jou-normale {
  width: 100%;
}

.jou-normale-bloc .aide {
  margin: 6px 0 0;
  font-size: 0.875rem;
}

.jou-annonce:empty {
  display: none;
}

.jou-annonce {
  color: var(--accent) !important;
  font-weight: 600;
}

.jou-questions .nv-groupe {
  margin: 0 0 18px;
}

.jou-champ-note {
  display: block;
  margin: 0;
}

.jou-facultatif {
  color: var(--encre-2);
  font-weight: 400;
}

.jou-note {
  min-height: 72px;
}

.jou-carte {
  margin-bottom: 12px;
}

.jou-contenu > .erreur-champ {
  margin: 0 0 12px;
}

.jou-actions {
  margin-top: 4px;
}

.jou-bouton-effacer {
  align-self: center;
  color: var(--moins-bien);
}

/* ========== fiche poussée ========== */

.pou-entete {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}

.pou-entete h2 {
  font-size: 1.125rem;
  font-weight: 700;
}

/* Étiquette de la météo : « auto » pleine et neutre (ça ne se touche pas), « corrigée » en contour. */
.pou-etiquette {
  border: 1px solid transparent;
  background: var(--trait);
  color: var(--encre-2);
}

.pou-etiquette-corrigee {
  border-color: var(--trait-fort);
  background: var(--surface);
}

.pou-sans-legende > .nv-legende {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.pou-quand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pou-champ {
  display: block;
  min-width: 0;
}

.pou-case-bloc {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--toucher);
}

.pou-case {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
}

.pou-case-bloc label {
  flex: 1;
  padding: 10px 0;
  font-weight: 600;
  cursor: pointer;
}

.pou-duree-bloc {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pou-pas {
  flex: none;
  width: var(--toucher);
  padding: 0;
  font-size: 1.375rem;
  font-weight: 700;
}

input.pou-duree {
  width: 6.5em;
  min-width: 0;
  text-align: center;
}

input.pou-duree:read-only {
  border-style: dashed;
  background: var(--fond);
}

.pou-unite {
  color: var(--encre-2);
}

.pou-champ-large {
  margin-top: 4px;
}

.pou-suite {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--trait);
}

.pou-message-meteo {
  margin: -4px 0 12px;
}

.pou-nombres {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  margin-top: 16px;
}

.pou-nombres .pou-libelle {
  font-size: 0.9375rem;
}

.pou-veille > .aide {
  margin: -6px 0 12px;
}

.pou-veille-resume {
  margin: 0 0 12px;
}

.pou-veille-manque {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.pou-veille .jou-formulaire {
  margin-top: 4px;
}

.pou-notes {
  min-height: 96px;
}

.pou-erreurs:empty {
  display: none;
}

.pou-actions {
  margin-top: 20px;
}

.pou-supprimer {
  border-color: var(--moins-bien);
  color: var(--moins-bien);
}

.pou-supprimer:active {
  background: var(--fond);
}

/* ========== historique ========== */

.his-intro {
  margin: -8px 0 12px;
}

.his-ajouter {
  width: 100%;
  margin: 0 0 20px;
}

.his-annee {
  margin: 0 0 20px;
}

.his-titre-annee {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  font-size: 1.375rem;
  font-weight: 800;
}

.his-compte {
  color: var(--encre-2);
  font-size: 0.9375rem;
  font-weight: 600;
}

.his-liste {
  margin: 0;
  padding: 0;
  list-style: none;
}

.his-fiche {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  padding: 12px 8px 12px 12px;
  color: var(--encre);
  text-decoration: none;
}

.his-fiche:active {
  background: var(--accent-doux);
}

.his-corps {
  flex: 1;
  min-width: 0;
}

.his-ligne {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0 0 4px;
}

.his-dates {
  font-weight: 700;
}

.his-detail {
  margin: 0;
  color: var(--encre-2);
  font-size: 0.9375rem;
  line-height: 1.35;
}

.his-duree {
  color: var(--encre);
  font-weight: 600;
}

.his-chevron {
  color: var(--encre-3);
}

/* ========== réglages ========== */

.reg-section > h2 {
  margin-bottom: 10px;
}

.reg-actuelle {
  margin: 0 0 12px;
}

.reg-ligne-recherche {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.reg-champ-recherche {
  display: block;
  flex: 1;
  min-width: 0;
}

.reg-ligne-recherche .bouton {
  flex: none;
}

/* Le libellé tient sur une ligne : il passe au-dessus du bouton « Chercher », aligné en bas. */
.reg-champ-recherche .reg-label {
  white-space: nowrap;
}

.reg-section .erreur-champ {
  margin: 8px 0 0;
}

.reg-choix:not(:empty) {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.reg-communes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reg-commune {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 6px 12px;
  border: 1.5px solid var(--trait-fort);
  border-radius: 10px;
}

.reg-commune:has(.reg-radio:checked) {
  border-color: var(--accent);
  background: var(--accent-doux);
}

.reg-radio {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
}

.reg-commune label {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  cursor: pointer;
}

/* Toute la ligne se touche. */
.reg-commune label::after {
  content: "";
  position: absolute;
  inset: 0;
}

.reg-commune-nom {
  font-weight: 700;
}

.reg-commune-precision {
  color: var(--encre-2);
  font-size: 0.875rem;
}

.reg-champ {
  display: block;
  min-width: 0;
}

input.reg-pin {
  letter-spacing: 0.3em;
}

.reg-exports {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reg-demo {
  margin: 0;
  color: var(--encre-2);
  font-style: italic;
}

.reg-apropos p:last-child {
  margin: 0;
}
