/* ============================================================
   Axorun Fidélité — système de design
   Concept : la carte est l'objet-héros. Pages claires & chaleureuses,
   cartes sombres comme des bijoux. Signature = le tampon qui se pose.
   ============================================================ */

:root {
  /* Couleurs */
  --ink: #1c1410;          /* encre espresso (texte) */
  --ink-soft: #7a6a5d;     /* texte secondaire */
  --paper: #fbf7f0;        /* fond papier chaud */
  --paper-2: #f3ebdf;      /* panneaux */
  --line: rgba(28, 20, 16, 0.12);
  --sun: #ee6c12;          /* accent principal */
  --sun-2: #ffa53d;        /* éclat mangue */
  --ember: #c63d2f;        /* braise (profondeur du dégradé) */
  --card-bg: #171210;      /* surface des cartes (bijou) */
  --ok: #2c8a5a;

  --lava: linear-gradient(135deg, var(--sun-2) 0%, var(--sun) 45%, var(--ember) 100%);

  /* Rayons & ombres */
  --r-lg: 26px;
  --r-md: 16px;
  --r-sm: 11px;
  --shadow-card: 0 30px 60px -20px rgba(60, 20, 0, 0.45), 0 8px 20px -10px rgba(0, 0, 0, 0.3);
  --shadow-soft: 0 14px 40px -22px rgba(60, 30, 0, 0.35);

  --maxw: 980px;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* halo de lave en haut de page, discret */
body::before {
  content: '';
  position: fixed;
  inset: -30% 0 auto 0;
  height: 60vh;
  background: radial-gradient(60% 60% at 50% 0%, rgba(238, 108, 18, 0.16), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; position: relative; z-index: 1; }

/* ---------- Typographie ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.02; margin: 0; }
.eyebrow {
  font-family: var(--font-body); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--sun);
}
.sub { color: var(--ink-soft); margin: 0; }

/* ---------- En-tête ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; position: relative; z-index: 2;
}
.brand { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; text-decoration: none; }
.brand .spark { color: var(--sun); }
.brand-link { font-size: 0.85rem; color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.brand-link:hover { color: var(--ink); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  padding: 15px 22px; border-radius: 999px; border: 0; cursor: pointer;
  text-decoration: none; transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active { transform: translateY(1px) scale(0.992); }
.btn--primary { background: var(--lava); color: #fff; box-shadow: 0 12px 26px -10px rgba(238, 108, 18, 0.6), inset 0 1px 0 rgba(255,255,255,0.28); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 20px 38px -12px rgba(238, 108, 18, 0.72), inset 0 1px 0 rgba(255,255,255,0.34); }
.btn--ghost { background: var(--paper-2); color: var(--ink); border: 1.5px solid var(--line); box-shadow: 0 5px 16px -10px rgba(28,20,16,0.35); }
.btn--ghost:hover { border-color: var(--sun); background: #fff; transform: translateY(-1px); box-shadow: 0 10px 22px -12px rgba(28,20,16,0.28); }
.btn--dark { background: linear-gradient(135deg, #2a211b, #060402); color: #fff; box-shadow: 0 12px 24px -12px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.12); }
.btn--dark:hover { transform: translateY(-1px); }
.btn--block { display: flex; width: 100%; }
.btn:focus-visible { outline: 3px solid var(--sun-2); outline-offset: 2px; }

/* ---------- Hero ---------- */
.hero { padding: 26px 0 40px; }
.hero-grid { display: grid; gap: 34px; }
.hero-title { font-size: clamp(2.3rem, 8.5vw, 3.6rem); margin: 14px 0 16px; }
.hero-title em { font-style: normal; background: var(--lava); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 1.08rem; max-width: 32ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Scène de la carte (objet-héros) */
.stage { position: relative; display: grid; place-items: center; padding: 30px 0 10px; }
.stage::before {
  content: ''; position: absolute; width: 78%; height: 70%;
  background: var(--lava); filter: blur(60px); opacity: 0.35; border-radius: 50%;
}
.stage .wallet-card { transform: rotate(-4deg); box-shadow: var(--shadow-card); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: rotate(-4deg) translateY(-12px); } }

/* ---------- Étapes (vraie séquence : rejoindre → cumuler → récompense) ---------- */
.section { padding: 44px 0; }
.section-head { max-width: 30ch; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(1.6rem, 5vw, 2.2rem); margin-top: 8px; }
.steps { display: grid; gap: 16px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; box-shadow: var(--shadow-soft); }
.step-num { font-family: var(--font-display); font-weight: 800; font-size: 1rem; color: var(--sun); letter-spacing: 0.04em; }
.step h3 { font-size: 1.18rem; margin: 8px 0 6px; }
.step p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }

/* ---------- Bénéfices commerçant ---------- */
.benefits { display: grid; gap: 14px; }
.benefit { display: flex; gap: 13px; align-items: flex-start; }
.benefit .ico { font-size: 1.3rem; line-height: 1.4; }
.benefit b { display: block; font-family: var(--font-display); }
.benefit span { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Pages internes ---------- */
.page { max-width: 460px; margin: 0 auto; padding: 8px 0 60px; }
.back { display: inline-block; margin: 8px 0 18px; color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.back:hover { color: var(--ink); }
.page h1 { font-size: clamp(1.8rem, 6vw, 2.3rem); margin-bottom: 6px; }

/* ---------- Formulaires ---------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: 15px; margin-top: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-weight: 600; font-size: 0.85rem; color: var(--ink-soft); }
.field input, .field select {
  font-family: inherit; font-size: 1rem; padding: 13px 14px;
  border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--paper);
  color: var(--ink); transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--sun); background: #fff; box-shadow: 0 0 0 3px rgba(238,108,18,0.14); }
.field select {
  -webkit-appearance: none; appearance: none; cursor: pointer; font-weight: 600;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237a6a5d' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
/* Téléversement d'image stylé (remplace l'input file natif moche) */
.filedrop {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; cursor: pointer;
  border: 1.5px dashed var(--line); border-radius: var(--r-sm); background: var(--paper);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.filedrop:hover { border-color: var(--sun); background: #fff; }
.filedrop__icon { font-size: 1.3rem; flex: none; }
.filedrop__txt { flex: 1; color: var(--ink-soft); font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filedrop__txt.has { color: var(--ink); font-weight: 600; }
.filedrop__btn { flex: none; font-weight: 700; font-size: 0.85rem; color: #fff; background: var(--lava); padding: 8px 14px; border-radius: 999px; box-shadow: 0 8px 18px -10px rgba(238,108,18,0.6); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; color: var(--ink-soft); cursor: pointer; }
.check input[type="checkbox"] { accent-color: var(--sun); width: 19px; height: 19px; flex: none; margin-top: 1px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--sun); margin-top: 2px; }

/* ---------- Résultats / divers ---------- */
.result { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-soft); margin-top: 18px; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.result h2 { font-family: var(--font-display); }
.qr { width: 210px; background: #fff; padding: 10px; border-radius: var(--r-md); border: 1px solid var(--line); }
.serial { font-size: 0.7rem; color: var(--ink-soft); word-break: break-all; font-family: ui-monospace, monospace; }
.hint { color: var(--ink-soft); font-size: 0.88rem; margin: 0; }
.big { font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; margin: 4px 0; }
.reward { color: var(--sun); font-weight: 700; }

/* ---------- Hub (espace commerçant) ---------- */
.hub-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--ink-soft); font-size: 0.85rem; text-align: center; }
.footer .spark { color: var(--sun); font-weight: 700; }

.hidden { display: none !important; }

/* ---------- Vidéo scanner ---------- */
video { width: 100%; border-radius: var(--r-lg); margin-top: 16px; background: #000; aspect-ratio: 3/4; object-fit: cover; box-shadow: var(--shadow-soft); }

/* ---------- Desktop ---------- */
@media (min-width: 760px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 20px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .benefits { grid-template-columns: repeat(2, 1fr); gap: 20px 28px; }
}

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