/* Couleurs : modifier ces valeurs pour changer l'habillage. */
:root {
  --marine: #0f2740;
  --marine-clair: #1c3f63;
  --ambre: #f6a609;
  --ambre-fonce: #d88e00;
  --fond: #f2f4f8;
  --carte: #ffffff;
  --texte: #14202e;
  --gris: #5a6778;
  --trait: #e3e8ef;
  --vert: #18845a;
  --rouge: #b93426;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

[hidden] { display: none !important; }

/* ---------- En-tete ---------- */
.entete {
  background: var(--marine);
  background: linear-gradient(160deg, var(--marine) 0%, var(--marine-clair) 100%);
  color: #fff;
  text-align: center;
  padding: 26px 16px 62px;
}
.logo {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  border-radius: 16px;
  background: var(--ambre);
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo svg { width: 30px; height: 30px; }
.entete h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.04em;
  font-weight: 800;
}
.entete p {
  margin: 4px 0 0;
  font-size: 14px;
  color: #c9d6e6;
}

/* ---------- Mise en page ---------- */
.page {
  max-width: 480px;
  margin: -44px auto 0;
  padding: 0 14px 28px;
}
.carte {
  background: var(--carte);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 6px 20px rgba(15, 39, 64, 0.10);
}
.carte h2 {
  margin: 0 0 10px;
  font-size: 17px;
}
.titre-section {
  margin: 24px 2px 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--marine);
}

/* ---------- Ticket ---------- */
label {
  display: block;
  font-size: 13px;
  color: var(--gris);
  margin-bottom: 6px;
}
.ligne { display: flex; gap: 8px; }
input[type="text"], input[type="tel"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  padding: 0 12px;
  border: 2px solid var(--trait);
  border-radius: 12px;
  font-size: 18px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  color: var(--texte);
  background: #fff;
}
input[type="text"]:focus, input[type="tel"]:focus {
  outline: none;
  border-color: var(--marine-clair);
}
input::placeholder { color: #9aa6b5; letter-spacing: 0; }

.btn {
  border: 0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.btn:focus-visible { outline: 3px solid #7fb2ff; outline-offset: 2px; }
.btn[disabled] { opacity: 0.6; }
.btn-marine {
  height: 48px;
  padding: 0 18px;
  background: var(--marine);
  color: #fff;
}
.btn-ambre {
  min-height: 40px;
  line-height: 40px;
  padding: 0 16px;
  background: var(--ambre);
  color: #201400;
}
.btn-ambre:active { background: var(--ambre-fonce); }
.btn-large {
  display: block;
  width: 100%;
  height: 50px;
  line-height: 50px;
  padding: 0 16px;
}
.btn-contour {
  background: #fff;
  color: var(--marine);
  box-shadow: inset 0 0 0 2px var(--trait);
}

.alerte {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fdecea;
  color: var(--rouge);
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Offres ---------- */
.offres {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--carte);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(15, 39, 64, 0.08);
  overflow: hidden;
}
.offre {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--trait);
}
.offre:last-child { border-bottom: 0; }
.offre-vedette { background: #fff8e8; }
.offre-infos { flex: 1 1 auto; min-width: 0; }
.offre-nom { display: block; font-size: 16px; }
.offre-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-top: 4px;
  font-size: 13px;
  color: var(--gris);
}
.pastille {
  padding: 1px 8px;
  border-radius: 20px;
  background: var(--marine);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}
.pastille-claire {
  background: #e6edf5;
  color: var(--marine);
}
.offre-achat {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.offre-prix {
  font-size: 16px;
  font-weight: 800;
  color: var(--marine);
  white-space: nowrap;
}

/* ---------- Etapes ---------- */
.etapes {
  list-style: none;
  counter-reset: etape;
  margin: 0;
  padding: 0;
}
.etapes li {
  counter-increment: etape;
  position: relative;
  padding: 6px 0 6px 38px;
  font-size: 14px;
  color: var(--gris);
}
.etapes li::before {
  content: counter(etape);
  position: absolute;
  left: 0;
  top: 5px;
  width: 26px;
  height: 26px;
  line-height: 26px;
  border-radius: 50%;
  text-align: center;
  background: #e6edf5;
  color: var(--marine);
  font-weight: 800;
  font-size: 13px;
}
.etapes strong { color: var(--texte); }

.contact {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: center;
}
.lien {
  color: var(--marine);
  font-weight: 700;
  font-size: 14px;
}
.pied {
  margin: 20px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--gris);
}

/* ---------- Feuille d'information (paiement) ---------- */
.voile {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(10, 22, 36, 0.55);
}
.feuille {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 22px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 30px rgba(10, 22, 36, 0.25);
}
.feuille h2 { margin: 0 0 4px; font-size: 18px; }
.feuille .feuille-offre {
  margin: 0 0 10px;
  font-weight: 800;
  color: var(--marine);
}
.feuille p { margin: 0 0 14px; font-size: 14px; color: var(--gris); }

/* ---------- Pages statut / deconnexion / erreur ---------- */
.etat {
  text-align: center;
  padding-top: 22px;
}
.rond {
  width: 58px;
  height: 58px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2f4ec;
  color: var(--vert);
}
.rond svg { width: 30px; height: 30px; }
.rond-gris { background: #e6edf5; color: var(--marine); }
.rond-rouge { background: #fdecea; color: var(--rouge); }
.etat h2 { font-size: 20px; margin: 0 0 4px; }
.etat .sous { margin: 0 0 16px; color: var(--gris); font-size: 14px; }

.gros {
  margin: 0 0 16px;
  padding: 14px;
  border-radius: 14px;
  background: var(--marine);
  color: #fff;
}
.gros span { display: block; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: #c9d6e6; }
.gros strong { display: block; font-size: 26px; margin-top: 2px; }

.fiche {
  margin: 0 0 16px;
  text-align: left;
}
.fiche div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--trait);
  font-size: 14px;
}
.fiche div:last-child { border-bottom: 0; }
.fiche dt { color: var(--gris); }
.fiche dd { margin: 0; font-weight: 700; text-align: right; word-break: break-all; }
.espace { margin-top: 10px; }

/* ---------- Page de paiement ---------- */
.recap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: #eef2f7;
}
.recap strong { display: block; font-size: 17px; }
.recap span { display: block; font-size: 13px; color: var(--gris); }
.recap b { font-size: 18px; color: var(--marine); white-space: nowrap; }
.indicatif {
  height: 48px;
  line-height: 48px;
  padding: 0 12px;
  border-radius: 12px;
  background: #e6edf5;
  color: var(--marine);
  font-weight: 700;
}
#etape-numero .btn-large { margin-top: 14px; }
#etape-numero .alerte { margin: 12px 0 0; }
.note { margin: 12px 0 0; font-size: 13px; color: var(--gris); text-align: center; }
.code {
  margin: 6px 0 12px;
  padding: 12px;
  border-radius: 12px;
  border: 2px dashed var(--ambre);
  background: #fff8e8;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--marine);
  user-select: all;
}
.roue {
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 5px solid #e6edf5;
  border-top-color: var(--ambre);
  animation: tourne 0.9s linear infinite;
}
@keyframes tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .roue { animation-duration: 4s; } }
.etat .note { margin-bottom: 4px; }
.etat .btn-large { margin-top: 14px; }
