/* Portail BRIDGES · couleurs reprises du thème de l'app (css/theme.css). Mobile d'abord. */
:root {
  --fond: #F7F7F5;
  --panneau: #FFFFFF;
  --bordure: #E3E3DF;
  --texte: #1D1D1F;
  --secondaire: #5E5E63;
  --accent: #0E5E5A;
  --sur-accent: #FFFFFF;
  --doux: #E4EFEE;
  --alerte: #A84800;
  --alerte-doux: #FBEDE3;
  --champ: #FFFFFF;
  --champ-bordure: #8A8A8F;
  --erreur: #B3261E;
  --focus: #0E5E5A;
  --rayon: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #1C1C1E; --panneau: #2A2A2D; --bordure: #3A3A3E; --texte: #F2F2F4; --secondaire: #B5B5BA;
    --accent: #6CC2B8; --sur-accent: #0B2B28; --doux: #1E3836; --alerte: #F2A65A; --alerte-doux: #3A2716;
    --champ: #26262A; --champ-bordure: #8A8A90; --erreur: #FF8A80; --focus: #8FD6CD;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fond: #1C1C1E; --panneau: #2A2A2D; --bordure: #3A3A3E; --texte: #F2F2F4; --secondaire: #B5B5BA;
  --accent: #6CC2B8; --sur-accent: #0B2B28; --doux: #1E3836; --alerte: #F2A65A; --alerte-doux: #3A2716;
  --champ: #26262A; --champ-bordure: #8A8A90; --erreur: #FF8A80; --focus: #8FD6CD;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
main, .entete, .pied { max-width: 680px; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }
main { padding-bottom: 32px; outline: none; }

.evitement { position: absolute; left: -9999px; }
.evitement:focus { left: 16px; top: 8px; background: var(--panneau); padding: 8px 12px; border-radius: 6px; z-index: 10; }

.entete { padding-top: 20px; padding-bottom: 8px; }
.marque { font-weight: 700; letter-spacing: 0.08em; color: var(--accent); font-size: 18px; }
.marque-sous { color: var(--secondaire); font-size: 14px; }

.etat { margin: 12px 0; color: var(--secondaire); }
.etat:empty { display: none; }

.carte {
  background: var(--panneau);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 18px 16px;
  margin: 0 0 16px;
}
h1 { font-size: 24px; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 19px; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.aide { color: var(--secondaire); font-size: 15px; margin-top: 2px; }
.consignes { white-space: pre-line; }
.court p { font-size: 12.5px; }

.question { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.question > legend, .question > label.libelle { display: block; font-weight: 600; margin-bottom: 6px; padding: 0; }
.obligatoire { color: var(--erreur); font-weight: 400; }

input[type="text"], input[type="date"], input[type="number"], input[inputmode="numeric"], textarea {
  width: 100%;
  font: inherit;
  color: var(--texte);
  background: var(--champ);
  border: 1px solid var(--champ-bordure);
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 46px;
}
textarea { min-height: 120px; resize: vertical; }

.option {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; margin: 0 0 6px;
  border: 1px solid var(--bordure); border-radius: 8px;
  background: var(--champ);
  cursor: pointer;
  min-height: 46px;
}
.option input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.option:has(input:checked) { border-color: var(--accent); background: var(--doux); }

.echelle-item { margin: 0 0 18px; padding: 0 0 14px; border: 0; border-bottom: 1px solid var(--bordure); min-width: 0; }
.echelle-item:last-child { border-bottom: 0; }
.echelle-item > legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
@media (min-width: 620px) {
  .echelle-item .options { display: grid; grid-template-columns: repeat(var(--nb, 4), 1fr); gap: 6px; }
  .echelle-item .option { margin: 0; flex-direction: column; align-items: center; text-align: center; font-size: 15px; }
}

.signature-zone { border: 1px dashed var(--champ-bordure); border-radius: 8px; background: #FFFFFF; touch-action: none; }
.signature-zone canvas { display: block; width: 100%; height: 180px; touch-action: none; }
.rangee { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }

button {
  font: inherit; font-weight: 600;
  border-radius: 8px; border: 1px solid transparent;
  padding: 12px 18px; min-height: 48px;
  cursor: pointer;
}
.principal { background: var(--accent); color: var(--sur-accent); width: 100%; }
.secondaire { background: transparent; color: var(--accent); border-color: var(--accent); }
button:disabled { opacity: 0.55; cursor: default; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.depot-liste { list-style: none; padding: 0; margin: 10px 0 0; }
.depot-liste li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--bordure); overflow-wrap: anywhere; }
.depot-liste button { min-height: 40px; padding: 6px 12px; }
.choisir { display: block; }
.choisir input[type="file"] { width: 100%; font: inherit; padding: 10px 0; }

a { color: var(--accent); }
.erreur { color: var(--erreur); font-size: 15px; margin-top: 6px; }
.erreur:empty { display: none; }
.resume-erreurs { border-left: 4px solid var(--erreur); }
.progres { width: 100%; height: 10px; accent-color: var(--accent); }
.merci h1 { color: var(--accent); }

.pied { color: var(--secondaire); font-size: 14px; padding-bottom: 32px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.etape-tete .aide { margin: 0 0 4px; }
.navigation { margin-top: 0; }
.navigation .principal { width: auto; flex: 1; }
.navigation .secondaire { flex: none; }
.rdv-quand { font-size: 20px; font-weight: 600; line-height: 1.3; }
.calendrier { margin: 4px 0 18px; }
.calendrier a { font-weight: 600; padding: 12px 6px; }
