/* ==========================================================================
   Carte de fidélité Academy Dance — thème "carte postale de La Havane"
   Palette dérivée du visuel BnF 2026 : parchemin doré, terracotta, violet
   signature du logo, vert-bleu végétal.
   ========================================================================== */

:root {
  --parchemin:        #f4e3ba;
  --parchemin-clair:  #fbf3dd;
  --or-fonce:         #c9932f;
  --terracotta:       #b5451c;
  --terracotta-clair: #e07a45;
  --violet-logo:      #5c2d84;
  --teal-vegetal:     #2f6e69;
  --encre:            #3a2413;
  --ombre:            rgba(58, 36, 19, 0.35);

  --police-affiche: 'Fraunces', serif;
  --police-signature: 'Dancing Script', cursive;
  --police-donnees: 'Space Mono', monospace;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--police-donnees);
  color: var(--encre);
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.12), transparent 45%),
    linear-gradient(160deg, #f7e6bd 0%, #eccf8f 35%, #dba851 70%, #c68a3d 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.scene {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Décor végétal discret, en clin d'œil au visuel, sans surcharger l'écran */
.feuilles {
  position: absolute;
  width: 220px;
  height: 220px;
  opacity: 0.18;
  background: radial-gradient(ellipse at center, var(--teal-vegetal) 0%, transparent 70%);
  filter: blur(2px);
  pointer-events: none;
}
.feuilles-haut-gauche { top: -60px; left: -60px; }
.feuilles-haut-droite { top: -60px; right: -60px; }

.conteneur {
  position: relative;
  width: 100%;
  max-width: 460px;
  z-index: 1;
}

/* ------------------------------- En-tête -------------------------------- */

.entete {
  text-align: center;
  margin-bottom: 24px;
}

.logo {
  width: 92px;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 6px 18px var(--ombre);
  margin-bottom: 12px;
}

.eyebrow {
  font-family: var(--police-donnees);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-vegetal);
  margin: 0 0 6px;
}

.titre {
  font-family: var(--police-signature);
  font-size: 42px;
  font-weight: 700;
  color: var(--violet-logo);
  margin: 0;
  line-height: 1;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.35);
}

/* -------------------------------- Panneau -------------------------------- */

.panneau {
  background: var(--parchemin-clair);
  border: 2px solid var(--terracotta);
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: 0 14px 34px var(--ombre);
}

.panneau-vide {
  text-align: center;
}

/* -------------------------------- Formulaire ------------------------------ */

.formulaire {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.champ {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--encre);
}

.champ em {
  font-style: normal;
  font-size: 11px;
  color: var(--terracotta);
  opacity: 0.85;
}

.champ input {
  font-family: var(--police-donnees);
  font-size: 15px;
  padding: 12px 14px;
  border: 1.5px solid var(--or-fonce);
  border-radius: 10px;
  background: #fffaf0;
  color: var(--encre);
}

.champ input:focus {
  outline: 3px solid var(--teal-vegetal);
  outline-offset: 1px;
}

.aide {
  font-size: 12px;
  color: #6b5636;
  text-align: center;
  margin: 14px 0 0;
}

.bouton {
  font-family: var(--police-donnees);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: none;
  border-radius: 10px;
  padding: 13px 20px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}

.bouton-principal {
  background: var(--terracotta);
  color: #fff8ec;
  box-shadow: 0 6px 0 #7f2f11;
}
.bouton-principal:active { transform: translateY(3px); box-shadow: 0 3px 0 #7f2f11; }

.bouton-secondaire {
  background: transparent;
  color: var(--violet-logo);
  border: 2px solid var(--violet-logo);
}

.message {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  margin: 0 0 16px;
  text-align: center;
}

.message-erreur {
  background: #fbe4dc;
  color: var(--terracotta);
  border: 1px solid var(--terracotta-clair);
}

.message-info {
  background: #f1e6cf;
  color: var(--encre);
  border: 1px solid var(--or-fonce);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* -------------------------- Question "valider un cours" ------------------- */

.question-cours {
  margin-top: 22px;
  text-align: center;
  border-top: 2px dashed var(--or-fonce);
  padding-top: 20px;
}

.question {
  font-family: var(--police-affiche);
  font-size: 18px;
  font-weight: 600;
  color: var(--encre);
  margin: 0 0 14px;
}

.formulaire-inline {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.formulaire-inline .bouton { flex: 1; max-width: 140px; }

.lien-retour {
  display: block;
  margin-top: 20px;
  text-align: center;
}

/* -------------------------------- La carte -------------------------------- */

.carte-fidelite {
  position: relative;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 6px),
    linear-gradient(160deg, var(--parchemin) 0%, #e8caa0 100%);
  border: 2px solid var(--encre);
  border-radius: 14px;
  padding: 20px 18px 16px;
  transform: rotate(-1.2deg);
  box-shadow: 0 10px 24px var(--ombre);
}

.carte-fidelite::before,
.carte-fidelite::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  background: var(--parchemin-clair);
  border: 2px solid var(--encre);
  border-radius: 50%;
  transform: translateY(-50%);
}
.carte-fidelite::before { left: -13px; }
.carte-fidelite::after { right: -13px; }

.carte-entete {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 12px;
}

.carte-marque {
  font-family: var(--police-signature);
  font-size: 26px;
  font-weight: 700;
  color: var(--violet-logo);
  line-height: 1.1;
}

.carte-sous-titre {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-vegetal);
}

.carte-titulaire {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px dashed var(--or-fonce);
  border-bottom: 1px dashed var(--or-fonce);
  padding: 8px 2px;
  margin-bottom: 16px;
}

.carte-titulaire-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b5636;
}

.carte-titulaire-valeur {
  font-family: var(--police-affiche);
  font-size: 16px;
  font-weight: 600;
  color: var(--encre);
}

.carte-cases {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.case {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
}

.case-vide {
  border: 2px dashed var(--or-fonce);
  color: var(--or-fonce);
  background: rgba(255,255,255,0.25);
}

.case-grillee {
  border: 2px solid var(--terracotta);
  background: var(--terracotta);
  color: #fff8ec;
  box-shadow: 0 3px 8px rgba(181, 69, 28, 0.45);
}

.carte-pied {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--violet-logo);
}

/* -------------------------------- Pied de page ----------------------------- */

.pied {
  position: absolute;
  bottom: -44px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: #6b5636;
}

.pied-marque {
  display: block;
  margin-bottom: 6px;
}

.note-conservation {
  font-size: 11px;
  color: #6b5636;
  text-align: center;
  margin: 10px 0 0;
  font-style: italic;
}

.mentions-rgpd {
  display: none;
  text-align: left;
  max-width: 380px;
  color: #6b5636;
}

.mentions-rgpd summary {
  cursor: pointer;
  text-align: center;
  color: var(--teal-vegetal);
  font-weight: 700;
  letter-spacing: 0.02em;
  list-style: none;
}

.mentions-rgpd summary::-webkit-details-marker {
  display: none;
}

.mentions-rgpd summary::after {
  content: " ▾";
}

.mentions-rgpd[open] summary::after {
  content: " ▴";
}

.mentions-contenu {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--or-fonce);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.5;
}

.mentions-contenu p {
  margin: 0 0 8px;
}

.mentions-contenu p:last-child {
  margin-bottom: 0;
}

.mentions-contenu a {
  color: var(--terracotta);
}

/* -------------------------------- Responsive ------------------------------- */

@media (max-width: 400px) {
  .titre { font-size: 34px; }
  .panneau { padding: 22px 16px; }
  .case { font-size: 11px; }
}
