:root {
  --noir: #000000;
  --noir-doux: #141311;
  --creme: #f3ecdd;
  --creme-att: #cfc7b4;
  --ambre: #cf9b3f;
  --ambre-clair: #e0b568;
  --erreur: #e07a5f;
  --font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --rayon: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--noir);
  color: var(--creme);
  font-family: var(--font);
  min-height: 100%;
}

body {
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font);
  font-weight: 800;
  margin: 0;
}

p { margin: 0; }

button {
  font-family: var(--font);
  cursor: pointer;
}

a {
  color: var(--ambre-clair);
}

/* ---------- Écrans ---------- */

.screen {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 32px 20px 40px;
}

.screen[hidden] { display: none; }

.screen__inner {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  margin: 0 auto;
}

/* ---------- Filigrane ---------- */

.logo-filigrane {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  object-fit: contain;
  opacity: 0.5;
}

.logo-hero {
  width: 128px;
  height: 128px;
  object-fit: contain;
  margin-top: 8px;
}

/* ---------- Accueil ---------- */

.eyebrow {
  color: var(--ambre-clair);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: -4px 0 0;
}

.titre-accueil {
  font-size: 2.1rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--creme);
}

.sous-titre {
  color: var(--ambre-clair);
  font-size: 1.05rem;
  font-weight: 600;
  font-style: italic;
}

.corps-accueil {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 13px;
  color: var(--creme-att);
  font-size: 0.95rem;
  line-height: 1.65;
  text-align: left;
}

.avant-form {
  font-weight: 700;
  margin-top: 10px;
}

#form-email {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

.champ {
  width: 100%;
  text-align: left;
}

.champ__label {
  display: block;
  font-size: 0.8rem;
  color: var(--creme-att);
  margin-bottom: 6px;
}

.champ__input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--rayon);
  border: 1px solid rgba(243, 236, 221, 0.25);
  background: var(--noir-doux);
  color: var(--creme);
  font-family: var(--font);
  font-size: 1rem;
}

.champ__input:focus {
  outline: none;
  border-color: var(--ambre);
}

.champ-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  font-size: 0.88rem;
  color: var(--creme-att);
  cursor: pointer;
}

.champ-checkbox input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--ambre);
  flex-shrink: 0;
}

.champ-checkbox__note {
  margin: 6px 0 0 28px;
  font-size: 0.76rem;
  color: var(--ambre-clair);
  opacity: 0.85;
}

.honeypot-field {
  position: absolute;
  left: -5000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-hint {
  min-height: 1em;
  font-size: 0.82rem;
  color: var(--creme-att);
}

.form-erreur {
  color: var(--erreur);
  font-size: 0.85rem;
}

.legal-liens {
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--creme-att);
  opacity: 0.75;
}

.legal-liens a {
  color: var(--creme-att);
}

/* ---------- Boutons ---------- */

.bouton {
  border: none;
  border-radius: 999px;
  padding: 16px 28px;
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: opacity 0.15s ease, transform 0.1s ease;
  width: 100%;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}

.bouton--principal {
  background: var(--ambre);
  color: var(--noir);
}

.bouton--principal:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.bouton--principal:not(:disabled):active {
  transform: scale(0.98);
}

.bouton--secondaire {
  background: transparent;
  color: var(--creme);
  border: 1px solid rgba(243, 236, 221, 0.3);
}

.bouton--secondaire:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.bouton--lien {
  margin-top: 4px;
}

.lien-secondaire {
  background: none;
  border: none;
  color: var(--creme-att);
  text-decoration: underline;
  font-size: 0.9rem;
  padding: 8px;
}

.lien-discret {
  background: none;
  border: none;
  color: var(--creme-att);
  font-size: 0.85rem;
  padding: 4px 0;
}

.cta-discret {
  margin-top: auto;
  padding-top: 18px;
  font-size: 0.8rem;
  color: var(--ambre-clair);
  text-decoration: underline;
  opacity: 0.85;
}

/* ---------- Sélection des modes ---------- */

.titre-ecran {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin-top: 28px;
}

.grille-modes {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.carte-mode {
  width: 100%;
  background: var(--noir-doux);
  border: 1px solid rgba(243, 236, 221, 0.12);
  border-radius: var(--rayon);
  padding: 18px 20px;
  text-align: left;
  color: var(--creme);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.carte-mode:active {
  transform: scale(0.99);
}

.carte-mode:hover,
.carte-mode:focus-visible {
  border-color: var(--ambre);
  outline: none;
}

.carte-mode__label {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ambre-clair);
}

.carte-mode__desc {
  font-size: 0.88rem;
  color: var(--creme-att);
}

.regles {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(243, 236, 221, 0.12);
}

.regles p {
  font-size: 0.78rem;
  color: var(--creme-att);
  line-height: 1.5;
}

/* ---------- Cartes (jeu) ---------- */

.screen--cartes {
  padding-top: 72px;
  justify-content: space-between;
}

.screen__inner--cartes {
  flex: 1;
  justify-content: space-between;
  gap: 16px;
}

.cartes-entete {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--creme-att);
}

.mode-label {
  font-weight: 600;
  color: var(--ambre-clair);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
}

.progression {
  font-variant-numeric: tabular-nums;
}

.carte-viewport {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 8px 0;
}

.carte-image {
  max-width: 100%;
  max-height: 58vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  background: var(--noir-doux);
}

.cartes-nav {
  width: 100%;
  display: flex;
  gap: 12px;
}

.cartes-nav .bouton {
  width: auto;
  flex: 1;
  padding: 15px 10px;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ---------- Fin ---------- */

.corps-fin {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 13px;
  color: var(--creme-att);
  font-size: 0.95rem;
  line-height: 1.65;
  text-align: left;
}

/* ---------- Pop-up "pré-shot" (à mi-parcours) ---------- */

.teaser-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  animation: teaser-fondu 0.2s ease;
}

.teaser-overlay[hidden] { display: none; }

@keyframes teaser-fondu {
  from { opacity: 0; }
  to { opacity: 1; }
}

.teaser-carte {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--noir-doux);
  border: 1px solid rgba(207, 155, 63, 0.35);
  border-radius: 18px;
  padding: 26px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin-bottom: env(safe-area-inset-bottom, 0);
}

.teaser-fermer {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: var(--creme-att);
  font-size: 1.4rem;
  line-height: 1;
  padding: 6px;
}

.teaser-eyebrow {
  color: var(--ambre-clair);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.teaser-titre {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.teaser-corps {
  color: var(--creme-att);
  font-size: 0.9rem;
  line-height: 1.55;
}

.teaser-carte .lien-secondaire {
  align-self: center;
}

/* ---------- Pages légales ---------- */

.legal {
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.legal-retour {
  align-self: flex-start;
  color: var(--creme-att);
  font-size: 0.85rem;
  text-decoration: none;
}

.legal-titre {
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  margin-top: 8px;
}

.legal h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ambre-clair);
  margin-top: 8px;
}

.legal p,
.legal li {
  color: var(--creme-att);
  font-size: 0.92rem;
  line-height: 1.6;
}

.legal ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal a {
  color: var(--ambre-clair);
}

.legal-maj {
  margin-top: 12px;
  font-size: 0.78rem;
  opacity: 0.7;
}

/* ---------- Petits écrans très bas ---------- */

@media (max-height: 700px) {
  .carte-image { max-height: 48vh; }
  .logo-hero { width: 96px; height: 96px; }
}

/* ---------- Tablette / desktop : on garde un rendu centré mobile-first ---------- */

@media (min-width: 640px) {
  .screen__inner { max-width: 520px; }
}
