/* Charte Marakush (§6) — fond vert profond, accents or, mobile-first.
   Esprit de la carte physique : sobre, double bordure dorée, 10 cercles. */

:root {
  --vert-fond: #152219;
  --vert-carte: #1c2e22;
  --vert-encre: #101a13;
  /* Dorés accordés au logo (or brossé, échantillonné sur le PNG) */
  --or: #b3a374;
  --or-clair: #cfc59e;
  --or-voile: rgba(179, 163, 116, 0.45);
  --texte: #f2ead3;
  --texte-doux: #a99f7e;
  --erreur: #ffa08c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--vert-fond);
  background-image: radial-gradient(ellipse at 50% -10%, rgba(212, 175, 55, 0.07), transparent 60%);
  color: var(--texte);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 16px 8px;
}

main { width: 100%; max-width: 420px; }

/* --- En-tête de marque : logo + sous-titre italique serif, comme la carte physique --- */
.marque { text-align: center; margin-bottom: 14px; }
.logo-titre { margin: 0; }
.logo {
  display: block;
  width: min(52vw, 200px);
  height: auto;
  margin: 0 auto;
}
.sous-titre {
  margin: 6px 0 10px;
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--or-clair);
}
.filet { display: flex; align-items: center; gap: 10px; color: var(--or-voile); font-size: 0.7rem; }
.filet::before, .filet::after {
  content: '';
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--or-voile), transparent);
}

/* --- Panneau « carte » : double bordure dorée --- */
.carte {
  background: var(--vert-carte);
  border: 2px solid var(--or);
  border-radius: 14px;
  box-shadow: inset 0 0 0 4px var(--vert-carte), inset 0 0 0 5px var(--or-voile);
  padding: 22px 18px;
  margin-bottom: 14px;
}

/* --- QR de la carte (fond clair conservé : contraste de scan) --- */
.qr {
  width: min(64vw, 230px);
  margin: 4px auto 14px;
  background: #fdfbf4;
  border: 2px solid var(--or);
  border-radius: 10px;
  padding: 10px 10px 6px;
  text-align: center;
}
.qr svg { display: block; width: 100%; height: auto; border-radius: 4px; }
.qr-legende {
  margin: 8px 0 4px;
  color: #1b2a20;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
}
.qr-legende small { font-weight: 400; opacity: 0.7; }

/* --- Les 10 cercles façon carte physique --- */
.cercles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px 8px;
  justify-items: center;
  max-width: 300px;
  margin: 16px auto 6px;
}
.cercle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--or-voile);
  display: grid;
  place-items: center;
}
/* Cercle tamponné : fond vert de la charte, feuille au contour or (currentColor) */
.cercle.plein {
  background: var(--vert-encre);
  border-color: var(--or);
  color: var(--or-clair);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}
.cercle.plein svg { width: 78%; height: 78%; display: block; }

.statut { margin: 10px 0 2px; text-align: center; font-size: 0.95rem; color: var(--texte); }
.statut.remise { color: var(--or-clair); font-weight: 700; }

/* --- Boutons --- */
.bouton {
  display: block;
  width: 100%;
  padding: 15px 18px;
  background: linear-gradient(180deg, var(--or-clair), var(--or));
  color: var(--vert-encre);
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.bouton:active { filter: brightness(0.92); }
.bouton:disabled { opacity: 0.4; cursor: default; }
.bouton.secondaire {
  background: transparent;
  color: var(--or-clair);
  border: 1.5px solid var(--or);
  font-weight: 600;
}
/* Liens habillés en bouton (page 404) */
a.bouton { text-align: center; text-decoration: none; }

.consigne {
  margin: 12px 4px 0;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--texte-doux);
}

/* --- Page création (bloc recentré verticalement via body.centre) --- */
body.centre main { margin-top: auto; margin-bottom: auto; }
.accueil .presentation { margin: 2px 6px 16px; text-align: center; font-size: 0.98rem; line-height: 1.55; }
.accueil .presentation strong { color: var(--or-clair); }

/* --- Vue marchande --- */
.compteur { text-align: center; }
.compteur .nombre {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 3.4rem;
  line-height: 1.1;
  color: var(--or);
}
.compteur .legende {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--texte-doux);
}

.formulaire { display: block; }
.champ label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--texte-doux);
}
.montant {
  width: 100%;
  padding: 13px 14px;
  font-size: 1.5rem;
  text-align: right;
  background: var(--vert-encre);
  color: var(--texte);
  border: 1.5px solid var(--or-voile);
  border-radius: 10px;
}
.montant:focus { outline: none; border-color: var(--or); }
.calcul { margin: 8px 2px 2px; text-align: right; font-size: 0.9rem; color: var(--or-clair); min-height: 1.2em; }
.calcul.invalide { color: var(--erreur); }

.bascule {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 2px;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  font-size: 0.98rem;
}
.bascule small { display: block; font-size: 0.75rem; color: var(--texte-doux); }
.bascule input {
  appearance: none;
  -webkit-appearance: none;
  width: 52px;
  height: 30px;
  border-radius: 15px;
  background: var(--vert-encre);
  border: 1.5px solid var(--or-voile);
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.bascule input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--texte-doux);
  transition: left 0.15s, background 0.15s;
}
.bascule input:checked { background: var(--or); border-color: var(--or); }
.bascule input:checked::after { left: 24px; background: var(--vert-encre); }
.bascule input:disabled { opacity: 0.35; cursor: default; }

/* Stepper « tampons offerts » : − / N / + */
.stepper { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.stepper-bouton {
  width: 42px;
  height: 38px;
  border-radius: 10px;
  background: var(--vert-encre);
  color: var(--or-clair);
  border: 1.5px solid var(--or-voile);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.stepper-bouton:active { background: var(--or); color: var(--vert-encre); }
.stepper-bouton:disabled { opacity: 0.35; cursor: default; }
.stepper-valeur {
  min-width: 2ch;
  text-align: center;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  color: var(--texte);
}

.projection {
  margin: 4px 2px 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  text-align: right;
  font-size: 0.92rem;
  color: var(--texte-doux);
}

/* --- Retour succès / erreur --- */
.retour { display: none; margin-top: 14px; padding: 12px 14px; border-radius: 10px; text-align: center; font-size: 0.95rem; line-height: 1.4; }
.retour.ok {
  display: block;
  background: rgba(212, 175, 55, 0.13);
  border: 1px solid var(--or-voile);
  color: var(--or-clair);
}
.retour.ko {
  display: block;
  background: rgba(224, 90, 70, 0.13);
  border: 1px solid rgba(224, 90, 70, 0.5);
  color: var(--erreur);
}

footer {
  margin: 20px auto 10px;
  max-width: 420px;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--texte-doux);
}
