/* DolyConnection · charte des maquettes validées (seules les couleurs pourront changer) */
:root {
  --prune: #2b0f24;        /* foncé : titres, logo, boutons secondaires */
  --magenta: #a3206f;      /* action principale */
  --magenta-doux: #fbe9f3;
  --fond: #f4edf2;
  --carte: #ffffff;
  --surface: #f7f1f5;
  --trait: #e6dbe2;
  --texte: #2b0f24;
  --texte-2: #6e5d68;
  --vert: #11895a;
  --vert-doux: #e3f5ec;
  --orange: #d97706;
  --orange-doux: #fdf0dc;
  --rouge: #c0392b;
  --rayon: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

.app {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--carte);
  padding: max(16px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
}
@media (min-width: 520px) {
  .app { margin: 24px auto; min-height: auto; border-radius: 28px; box-shadow: 0 12px 40px rgba(43,15,36,.12); }
}

.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.logo {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(145deg, #7a1d5a, var(--prune)); color: #fff; font-size: 15px; font-weight: 800;
}
.top-tag { font-size: 13px; color: var(--texte-2); }

.demo {
  background: var(--orange-doux); color: #8a4b00; font-size: 13px;
  padding: 8px 12px; border-radius: 10px; margin-bottom: 14px; text-align: center;
}

h1 { font-size: 25px; line-height: 1.2; margin: 0 0 6px; font-weight: 800; letter-spacing: -.01em; }
.lead { color: var(--texte-2); margin: 0 0 20px; font-size: 15px; }
.centre { text-align: center; }
section { margin-bottom: 18px; }
.label {
  font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--texte-2); margin: 0 0 10px;
}
.muted { text-transform: none; letter-spacing: 0; font-weight: 400; }

/* Types d'urgence */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip {
  border: 1.5px solid var(--trait); background: var(--carte); color: var(--texte);
  border-radius: 12px; padding: 9px 13px; font: inherit; font-size: 15px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.chip[aria-checked="true"] {
  border-color: var(--magenta); background: var(--magenta-doux); color: var(--magenta); font-weight: 600;
}
.chip:focus-visible, .btn:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(163,32,111,.3); outline-offset: 2px; }

textarea, .field input {
  width: 100%; font: inherit; color: var(--texte); background: var(--carte);
  border: 1.5px solid var(--trait); border-radius: 12px; padding: 12px 14px;
}
textarea { resize: vertical; font-size: 15px; }
textarea:focus, .field input:focus { border-color: var(--magenta); outline: none; }

/* Photos */
.photos { display: flex; flex-wrap: wrap; gap: 10px; }
.photo, .photo-add {
  width: 72px; height: 72px; border-radius: 12px; position: relative; flex: none;
}
.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; }
.photo button {
  position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid #fff; background: var(--prune); color: #fff; font-size: 14px; line-height: 1;
  cursor: pointer; display: grid; place-items: center; padding: 0;
}
.photo-add {
  border: 1.5px dashed #d9b8cc; background: #fdf7fa; color: var(--magenta);
  display: grid; place-items: center; font-size: 28px; cursor: pointer;
}

/* Champs */
.field { position: relative; margin-bottom: 10px; }
.field .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 16px; pointer-events: none; }
.field input { padding-left: 40px; }
.field input.invalide, textarea.invalide { border-color: var(--rouge); }
.suggestions {
  position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 6px;
  list-style: none; background: var(--carte); border: 1px solid var(--trait); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(43,15,36,.14);
}
.suggestions li { padding: 10px 10px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.suggestions li small { display: block; color: var(--texte-2); font-size: 13px; }
.suggestions li[aria-selected="true"], .suggestions li:hover { background: var(--surface); }

/* Prix */
.prix {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
  background: var(--surface); border-radius: var(--rayon); padding: 14px 16px; margin: 6px 0 14px;
}
.prix-lib { font-size: 13px; color: var(--texte-2); }
.prix-val { font-size: 27px; font-weight: 800; letter-spacing: -.01em; }
.prix-maj { font-size: 13px; color: var(--texte-2); text-align: right; max-width: 48%; }
.prix-maj b { color: var(--magenta); font-weight: 600; }

.consent { display: flex; gap: 10px; font-size: 13px; color: var(--texte-2); margin-bottom: 12px; align-items: flex-start; }
.consent input { width: 20px; height: 20px; accent-color: var(--magenta); flex: none; margin: 1px 0 0; }
.consent a, .lien { color: var(--magenta); font-weight: 600; }

.erreur { color: var(--rouge); font-size: 14px; min-height: 0; margin: 0 0 10px; }
.erreur:empty { display: none; }

.btn {
  display: block; width: 100%; border: 0; border-radius: 16px; padding: 16px; font: inherit;
  font-size: 17px; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none;
}
.btn-main { background: var(--magenta); color: #fff; }
.btn-main:disabled { opacity: .55; cursor: wait; }
.btn-sec { background: var(--surface); color: var(--texte); margin-top: 10px; }

/* Code SMS */
.retour { background: none; border: 0; padding: 0; font: inherit; color: var(--texte-2); margin-bottom: 14px; cursor: pointer; }
.code-wrap { position: relative; margin: 6px 0 10px; }
.code-input {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; z-index: 2;
  caret-color: transparent;
}
.code-cases { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.code-cases span {
  height: 58px; border: 1.5px solid var(--trait); border-radius: 12px; display: grid; place-items: center;
  font-size: 26px; font-weight: 700;
}
.code-cases span.plein { border-color: #d9b8cc; }
.code-cases span.actif { border-color: var(--magenta); box-shadow: 0 0 0 3px rgba(163,32,111,.15); }
.renvoi { text-align: center; color: var(--texte-2); font-size: 14px; margin: 0 0 18px; }
.lien { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.lien:disabled { color: var(--magenta); opacity: .8; cursor: default; }

.carte-info { border: 1px solid var(--trait); border-radius: var(--rayon); padding: 14px 16px; margin-bottom: 12px; }
.carte-douce { background: var(--surface); border-color: transparent; }
.ci-titre { font-weight: 700; margin-bottom: 4px; }
.carte-info p { margin: 0; font-size: 14px; color: var(--texte-2); }
.note { text-align: center; font-size: 13px; color: var(--texte-2); margin: 10px 0 0; }

/* Confirmation */
.ok-rond {
  width: 92px; height: 92px; margin: 40px auto 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 40px; background: var(--magenta); box-shadow: 0 0 0 12px var(--magenta-doux), 0 0 0 26px #fdf5f9;
}
.recap { background: var(--surface); border-radius: var(--rayon); padding: 6px 16px; margin: 22px 0 18px; }
.recap-ligne { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; font-size: 15px; }
.recap-ligne + .recap-ligne { border-top: 1px solid var(--trait); }
.recap-ligne span { color: var(--texte-2); }
.recap-ligne b { text-align: right; }

.etapes { list-style: none; padding: 0; margin: 0 0 18px; }
.etapes li {
  position: relative; padding: 0 0 16px 34px; display: flex; justify-content: space-between; gap: 8px;
}
.etapes li::before {
  content: ""; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--trait); background: #fff;
}
.etapes li:not(:last-child)::after {
  content: ""; position: absolute; left: 10px; top: 23px; bottom: 1px; width: 2px; background: var(--trait);
}
.etapes li.fait::before { background: var(--vert); border-color: var(--vert); }
.etapes li.encours::before { background: var(--magenta); border-color: var(--magenta-doux); box-shadow: 0 0 0 3px var(--magenta-doux); }
.etapes li span { color: var(--texte-2); font-size: 14px; }

dialog {
  border: 0; border-radius: 20px; padding: 22px; max-width: 420px; width: calc(100% - 32px); color: var(--texte);
}
dialog::backdrop { background: rgba(43,15,36,.45); }
dialog h3 { margin: 0 0 10px; }
dialog p { font-size: 14px; color: var(--texte-2); }
