/* ═══════════════════════════════════════════════════════
   Club Pépites — Charte graphique v3.1
   Fichier CSS partagé entre toutes les pages
   ═══════════════════════════════════════════════════════ */

/* ───────────────────
   Design tokens
   ─────────────────── */
:root {
  /* Couleurs signature */
  --color-rouge: #E2001A;
  --color-rouge-hover: #C8001A;
  --color-or: #C49A6D;
  --color-or-clair: #D9B896;

  /* Fonds */
  --color-bg-primary: #F9F8F3;
  --color-bg-card: #FFFFFF;

  /* Textes */
  --color-text-primary: #0A0A0A;
  --color-text-body: #2A2A2A;
  --color-text-secondary: #6F6A65;
  --color-text-decorative: #8A8580; /* usage décoratif uniquement, échec WCAG AA */

  /* Bordures et séparateurs */
  --color-border-subtle: rgba(10, 10, 10, 0.08);
  --color-border-divider: #E8E5E0;

  /* Familles typographiques */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Tailles (échelle modular, ratio ~1.25) */
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 16px;
  --text-md: 18px;
  --text-lg: 22px;
  --text-xl: 28px;

  /* Graisses */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Hauteurs de ligne */
  --leading-tight: 1.05;
  --leading-snug: 1.3;
  --leading-normal: 1.55;
  --leading-relaxed: 1.65;
  --leading-loose: 1.75;

  /* Interlettrage */
  --tracking-tight: -0.015em;
  --tracking-normal: 0;
  --tracking-wide: 0.12em;
  --tracking-wider: 0.22em;
  --tracking-widest: 0.3em;

  /* Espacement (base 8) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* Élévation */
  --shadow-subtle: 0 4px 12px -4px rgba(10, 10, 10, 0.06);
  --shadow-card: 0 24px 56px -28px rgba(10, 10, 10, 0.14);
  --shadow-card-lifted: 0 32px 72px -32px rgba(10, 10, 10, 0.18);

  /* Bordures */
  --border-subtle: 1px solid rgba(10, 10, 10, 0.08);
  --border-divider: 1px solid #E8E5E0;

  /* Rayons */
  --radius-none: 0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
}

/* ───────────────────
   Reset & base
   ─────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg-primary);
  color: var(--color-text-body);
  line-height: var(--leading-relaxed);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Texture de fond subtile */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(196, 154, 109, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 85% 75%, rgba(226, 0, 26, 0.015) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Focus visible — charte v3.1 */
:focus-visible {
  outline: 2px solid var(--color-rouge);
  outline-offset: 3px;
}

/* ───────────────────
   Layout page
   ─────────────────── */
.page {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-6) var(--space-9);
}

/* ───────────────────
   Logo
   ─────────────────── */
.logo {
  display: inline-block;
  width: 160px;
  line-height: 0;
}

.logo img {
  width: 100%;
  height: auto;
  display: block;
}

.logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-6);
}

/* ───────────────────
   Surtitre (Big Shoulders, CAPITALES, or)
   ─────────────────── */
.surtitre {
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-or);
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}

.surtitre::before,
.surtitre::after {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--color-or);
}

/* ───────────────────
   Titres (Playfair Display)
   ─────────────────── */
h1 {
  font-family: var(--font-serif);
  font-weight: var(--weight-medium);
  font-size: clamp(38px, 5.5vw, 56px);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
  letter-spacing: var(--tracking-tight);
}

h1 em {
  font-style: normal;
  color: var(--color-rouge);
  font-weight: var(--weight-medium);
}

h2 {
  font-family: var(--font-serif);
  font-weight: var(--weight-medium);
  font-size: clamp(28px, 4vw, 36px);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
  letter-spacing: var(--tracking-tight);
}

/* ───────────────────
   Texte intro (corps, Inter)
   ─────────────────── */
.intro {
  max-width: 540px;
  margin: 0 auto;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-body);
}

.intro p + p {
  margin-top: var(--space-4);
}

/* ───────────────────
   Séparateur or fin
   ─────────────────── */
.sep-or {
  display: block;
  width: 48px;
  height: 1px;
  background: var(--color-or);
  margin: var(--space-7) auto;
  border: none;
  opacity: 0.6;
}

/* ───────────────────
   Cartes (fond blanc pur)
   ─────────────────── */
.carte {
  background: var(--color-bg-card);
  border: var(--border-subtle);
  position: relative;
  box-shadow: var(--shadow-card);
}

.carte::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--color-rouge);
}

/* ───────────────────
   CTA primaire
   ─────────────────── */
.cta {
  display: block;
  width: 100%;
  padding: 22px var(--space-5);
  background: var(--color-text-primary);
  color: var(--color-bg-primary);
  text-decoration: none;
  text-align: center;
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 0.35s ease, letter-spacing 0.35s ease, transform 0.2s ease;
  cursor: pointer;
  border: none;
}

.cta:hover {
  background: var(--color-rouge);
  letter-spacing: 0.2em;
}

.cta:active {
  transform: scale(0.985);
}

/* CTA secondaire (inline, bouton Instagram, etc.) */
.cta-inline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--color-text-primary);
  color: var(--color-bg-primary);
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 0.35s ease, letter-spacing 0.35s ease, transform 0.2s ease;
  border: none;
}

.cta-inline:hover {
  background: var(--color-rouge);
  letter-spacing: 0.2em;
}

.cta-inline:active {
  transform: scale(0.98);
}

.cta-inline svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

/* CTA tertiaire (lien textuel) */
.cta-tertiaire {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text-secondary);
  text-decoration: underline;
  text-decoration-color: rgba(111, 106, 101, 0.3);
  text-underline-offset: 3px;
  transition: color 0.3s ease, text-decoration-color 0.3s ease;
  padding: 6px 10px;
}

.cta-tertiaire:hover {
  color: var(--color-rouge);
  text-decoration-color: var(--color-rouge);
}

/* ───────────────────
   Signature
   ─────────────────── */
.signature {
  text-align: center;
}

.signature-texte {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  color: var(--color-text-secondary);
  max-width: 480px;
  margin: 0 auto var(--space-5);
  line-height: var(--leading-relaxed);
}

.signature-nom {
  font-family: var(--font-serif);
  font-weight: var(--weight-medium);
  font-size: 17px;
  color: var(--color-text-primary);
}

.signature-role {
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-or);
  margin-top: var(--space-1);
}

/* ───────────────────
   Badge coche (page merci)
   ─────────────────── */
.badge-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-5);
}

.badge-coche {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-text-primary);
  position: relative;
  animation: pop 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s both;
}

.badge-coche svg {
  width: 32px;
  height: 32px;
  stroke: var(--color-bg-primary);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.badge-coche::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--color-or);
  opacity: 0.5;
}

/* ───────────────────
   Carte titre (page merci)
   ─────────────────── */
.carte-titre {
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-or);
  margin-bottom: var(--space-5);
  text-align: center;
}

.carte-titre::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--color-or);
  margin: 0 auto var(--space-3);
}

.carte-texte {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text-body);
  text-align: center;
}

.carte-texte p + p {
  margin-top: var(--space-4);
}

.carte-texte strong {
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}

/* ───────────────────
   Lien retour
   ─────────────────── */
.retour {
  margin-top: var(--space-7);
  text-align: center;
}

.retour a {
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
  font-size: 12px;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-secondary);
  text-decoration: none;
  border-bottom: 1px solid rgba(111, 106, 101, 0.3);
  padding-bottom: 3px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.retour a:hover {
  color: var(--color-rouge);
  border-color: var(--color-rouge);
}

/* ───────────────────
   GIF bloc
   ─────────────────── */
.gif-bloc {
  text-align: center;
}

.gif-intro {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

.gif-wrap {
  display: inline-block;
  max-width: 380px;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 16px 40px -20px rgba(10, 10, 10, 0.2);
  line-height: 0;
}

.gif-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

/* ───────────────────
   Animations
   ─────────────────── */
@keyframes reveal {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pop {
  0% { opacity: 0; transform: scale(0.3); }
  50% { transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes flash {
  0% { opacity: 1; transform: scale(1); }
  40% { opacity: 0.3; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}

/* ───────────────────
   Accessibilité — prefers-reduced-motion
   ─────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ───────────────────
   Responsive
   ─────────────────── */
@media (max-width: 680px) {
  .page { padding: var(--space-7) 20px var(--space-8); }
  .logo { width: 140px; }
  .intro { font-size: 15px; }
  .carte-texte { font-size: 15px; }
  .cta-inline { padding: 14px 22px; font-size: 13px; }
}

@media (max-width: 420px) {
  h1 { font-size: 34px; }
  .intro { font-size: 15px; }
}
