:root {
  --bg: #131414;          /* fond quasi-noir (sections sombres de la marque) */
  --bg-soft: #1e2020;
  --card: #ffffff;
  --ink: #131414;
  --ink-soft: #5b564d;
  --accent: #946A00;      /* or lisible sur blanc (focus, boutons pleins) */
  --accent-ink: #ffffff;
  --teal: #FEC618;        /* jaune AcciZen — toujours utilisé sur fond sombre */
  --line: #e6e0d2;
  --ok: #946A00;          /* coches/validations sur cartes blanches → or lisible */
  --done-bg: #FBF3D6;     /* fond d'item validé (teinte jaune douce) */
  --danger: #b4451f;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---- Layout d'un écran ---- */
.screen {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: max(20px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--teal);
  font-size: 14px;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.topbar-tools { display: flex; align-items: center; gap: 8px; }
.gearbtn {
  -webkit-appearance: none; appearance: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--teal);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  width: 34px; height: 31px;
  font-size: 16px; line-height: 1; cursor: pointer;
  font-family: inherit;
}
.gearbtn:active { transform: scale(0.96); }

.moreinfo { margin-top: 2px; }
.moreinfo > summary {
  list-style: none; cursor: pointer;
  color: var(--teal); font-weight: 600; font-size: 15px; padding: 12px 2px;
}
.moreinfo > summary::-webkit-details-marker { display: none; }
.moreinfo > summary::before { content: "＋ "; }
.moreinfo[open] > summary::before { content: "－ "; }

select.lang {
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--teal);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.06em;
}

.progress {
  display: flex;
  gap: 6px;
  margin: 14px 0 26px;
}
.progress span {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}
.progress span.on { background: var(--teal); }

.kicker {
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

h1.title {
  color: #fff;
  font-size: clamp(26px, 7vw, 34px);
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

p.lede {
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.5;
  margin: 0 0 22px;
}

.spacer { flex: 1; }

/* ---- Cartes / contenu sur fond clair ---- */
.card {
  background: var(--card);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.list { display: flex; flex-direction: column; gap: 10px; }

/* ---- Élément de checklist cliquable ---- */
.check {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 16px 16px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.06s ease, border-color 0.15s ease, background 0.15s ease;
  user-select: none;
}
.check:active { transform: scale(0.99); }
.check .box {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  color: transparent;
  font-size: 18px;
  font-weight: 800;
}
.check .sub { display: block; font-weight: 500; font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.check.done {
  border-color: var(--ok);
  background: var(--done-bg);
}
.check.done .box { background: var(--ok); border-color: var(--ok); color: #fff; }
.check .lbl { flex: 1; }

/* Lignes avec grande icône (checklist sécurité) : icône, puis texte, coche à droite */
.check.withicon { padding: 14px 16px; gap: 16px; }
.ico-lg {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
}
.ico-lg svg { width: 46px; height: 46px; display: block; }
.check.withicon .tick {
  flex: 0 0 auto;
  color: var(--ok);
  font-size: 24px;
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.check.withicon.done .tick { opacity: 1; }

/* Chevron des cartes du hub optionnel */
.check .chev { flex: 0 0 auto; color: var(--ink-soft); font-weight: 700; font-size: 15px; }
.check.done .chev { color: var(--ok); }

/* Ligne de proche (répertoire) dans la config */
.famrow { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }

/* Encadré « à quoi j'ai droit » (garanties), affiché au moment du dépannage */
.coverage {
  background: rgba(254, 198, 24, 0.12);
  border: 1px solid rgba(254, 198, 24, 0.45);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #fff;
  font-size: 15px;
}
.coverage b {
  color: var(--teal);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

/* Bandeau d'information neutre (ex. dépannage autoroute) */
.note {
  background: rgba(245, 130, 31, 0.14);
  border: 1px solid rgba(245, 130, 31, 0.5);
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 16px;
}

/* Avertissement légal discret */
.disclaimer {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  margin-top: 18px;
}

/* ---- Élément photo ---- */
.shot {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  cursor: pointer;
}
.shot.done { border-color: var(--ok); background: var(--done-bg); }
.shot .thumb {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border-radius: 12px;
  background: #f1ece1 center/cover no-repeat;
  display: grid;
  place-items: center;
  font-size: 24px;
  color: var(--ink-soft);
  overflow: hidden;
}
.shot .thumb img { width: 100%; height: 100%; object-fit: cover; }
.shot .label { flex: 1; font-size: 16px; font-weight: 600; }
.shot .label .sub { display: block; font-weight: 500; font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.shot .tick { color: var(--ok); font-size: 22px; font-weight: 800; opacity: 0; }
.shot.done .tick { opacity: 1; }

input[type="file"] { display: none; }

/* ---- Champs texte ---- */
label.field { display: block; margin-bottom: 14px; }
label.field span { display: block; font-size: 14px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
input.text, textarea.text {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  font-size: 17px;
  font-family: inherit;
  color: var(--ink);
  background: #fdfcf9;
}
textarea.text { min-height: 120px; resize: vertical; }
input.text:focus, textarea.text:focus { outline: none; border-color: var(--accent); }

/* ---- Boutons ---- */
.actions { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }

button.btn {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  border-radius: 16px;
  padding: 18px 20px;
  font-size: 18px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.06s ease, opacity 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
button.btn:active { transform: scale(0.985); }
button.btn.primary { background: var(--teal); color: #131414; }
button.btn.ghost { background: rgba(255, 255, 255, 0.1); color: #fff; }
button.btn.solid { background: var(--accent); color: #fff; }
button.btn.danger { background: var(--danger); color: #fff; }
button.btn.emergency {
  background: #c1121f;
  color: #ffffff;
  text-transform: uppercase;
  font-family: Georgia, "Times New Roman", "Iowan Old Style", serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.03em;
  padding: 24px 20px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  box-shadow: 0 6px 20px rgba(193, 18, 31, 0.45);
}
button.btn.link { background: none; color: var(--teal); padding: 8px; font-size: 16px; }
button.btn:disabled { opacity: 0.4; }

/* ---- Écran de tri : deux grandes tuiles ---- */
.choices { display: flex; flex-direction: column; gap: 14px; }
button.btn.choice {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 6px;
  padding: 22px 20px;
  font-size: 19px;
  line-height: 1.2;
}
.choice-sub { font-weight: 500; font-size: 14px; opacity: 0.85; }
button.btn.choice-danger {
  background: rgba(193, 18, 31, 0.16);
  border: 2px solid #c1121f;
  color: #fff;
}
button.btn.choice-safe { background: var(--teal); color: #131414; }

/* ---- Bandeau d'avertissement (photos en mode danger) ---- */
.warn {
  background: rgba(193, 18, 31, 0.16);
  border: 1px solid #c1121f;
  color: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.45;
  margin: 0 0 16px;
}

.backlink {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 15px;
  font-family: inherit;
  padding: 8px 0;
  cursor: pointer;
  align-self: flex-start;
}

/* ---- Bandeau d'info silencieuse (GPS/heure) ---- */
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  background: rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.meta div { color: #fff; font-size: 14px; }
.meta b { display: block; color: var(--teal); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 2px; }

.count {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  margin: 0 0 12px;
}

/* ---- Écran d'accueil / urgence ---- */
.hero-emergency {
  margin-bottom: 18px;
}
.hero-emergency button { width: 100%; }

/* ---- Récap / dossier ---- */
.recap-section { margin-bottom: 18px; }
.recap-section h2 {
  color: var(--teal);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
}
.recap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.recap-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.recap-line { color: #fff; font-size: 15px; padding: 4px 0; display: flex; gap: 8px; }
.recap-line .ok { color: var(--teal); }
.recap-line .miss { color: #f0a98e; }

/* Santé & vos droits (écran dossier) */
.recap-section.rights { margin-top: 24px; }
.rights-med { margin: 2px 0 14px; padding-left: 18px; color: rgba(255, 255, 255, 0.82); font-size: 14.5px; line-height: 1.5; }
.rights-med li { margin: 4px 0; }
.rights-sub { color: var(--teal); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin: 6px 0 8px; }
.rights-links { list-style: none; margin: 0; padding: 0; }
.rights-links li { margin: 7px 0; }
.rights-links a { color: var(--teal); text-decoration: none; font-weight: 600; font-size: 15px; }
.rights-links a:active { opacity: 0.7; }
.rights-generic { color: rgba(255, 255, 255, 0.78); font-size: 15px; line-height: 1.5; margin: 4px 0 0; }

.reassure {
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  margin-top: 18px;
  line-height: 1.5;
}
