/* ============================================================================
   msqebr — feuille de tokens partagée ("Le programme du ciné-club")
   Refonte du 27/09 : direction visuelle enregistrée dans .impeccable/surfaces/index-html.md
   Chaque page (app, connexion, inscription, compte, paiement, profils) importe ce fichier
   pour les couleurs, les polices et les motifs communs (bord perforé, tampon, focus, etc.),
   puis garde son propre <style> pour ce qui lui est spécifique.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..900;1,6..96,400..900&family=Archivo:ital,wght@0,400..800;1,400..800&family=Fragment+Mono&display=swap');

:root {
  color-scheme: dark;

  /* Fond lie-de-vin engagé : pas un simple accent, la matière de la page (~40-50% de la surface). */
  --wine-950: #1c0b0e;
  --wine-900: #2b0f14;
  --wine-800: #3a151b;
  --wine-700: #4a1b23;

  /* Papier-programme : cartes, panneaux clairs, fiches. */
  --paper-100: #f8f3e6;
  --paper-200: #f3ecd9;
  --paper-300: #e8dcc0;
  --ink-900: #1a1210;
  --ink-700: #3a2e29;

  /* Or antique : numérotation, état actif, filets. */
  --gold-500: #c9a227;
  --gold-400: #d9b74a;
  --gold-300: #e8cf7d;

  /* Rouge venise sourd : pastilles "nouveauté", alertes — dans la famille du fond, jamais en concurrence. */
  --venise-600: #7a2530;
  --venise-500: #93313d;
  --venise-400: #b0454f;

  --text-on-wine: #f3ecd9;
  --text-on-wine-muted: #cbb9a8;
  --text-on-paper: var(--ink-900);
  --text-on-paper-muted: #6b5b4f;

  --border-on-wine: rgba(243, 236, 217, 0.16);
  --border-on-wine-strong: rgba(243, 236, 217, 0.28);
  --border-on-paper: rgba(26, 18, 16, 0.14);

  --shadow-lift: 0 2px 6px rgba(10, 4, 5, 0.35), 0 12px 28px rgba(10, 4, 5, 0.35);
  --shadow-deep: 0 8px 16px rgba(10, 4, 5, 0.4), 0 28px 56px rgba(10, 4, 5, 0.45);

  --radius-card: 3px;   /* le papier a des coins presque droits, pas des coins d'app */
  --radius-pill: 999px;

  --font-display: 'Bodoni Moda', 'Times New Roman', serif;
  --font-ui: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Fragment Mono', ui-monospace, 'SFMono-Regular', monospace;

  --ease-tear: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Réinitialisation minimale, cohérente entre les pages ---------- */
* { box-sizing: border-box; }
/* overflow-x doit être posé sur html ET body : sur iOS Safari, "overflow:hidden" sur
   body seul ne bloque pas le rubber-band scroll horizontal (motifs décoratifs qui
   débordent volontairement, comme le halo des pages de connexion). */
html { overflow-x: hidden; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--wine-900);
  color: var(--text-on-wine);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Surfaces du navigateur : jamais laissées par défaut ---------- */
::selection { background: var(--gold-500); color: var(--wine-950); }
:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 3px; border-radius: 2px; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--wine-950); }
::-webkit-scrollbar-thumb { background: var(--wine-700); border-radius: 999px; border: 3px solid var(--wine-950); }
::-webkit-scrollbar-thumb:hover { background: var(--gold-500); }
* { scrollbar-color: var(--wine-700) var(--wine-950); scrollbar-width: thin; }

/* Numéraux tabulaires partout où on affiche des montants/minutages : jamais les chiffres proportionnels par défaut. */
.tabular, .price, time, .runtime { font-variant-numeric: tabular-nums; }

/* ---------- Motif "ticket" réutilisable : bord perforé + numérotation dorée ---------- */
.ticket-edge {
  position: relative;
}
.ticket-edge::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px; height: 8px;
  background-image: radial-gradient(circle at 6px 0, transparent 3.5px, var(--wine-900) 4px);
  background-size: 12px 8px;
  background-repeat: repeat-x;
}
.ticket-edge.on-paper::after { background-image: radial-gradient(circle at 6px 0, transparent 3.5px, var(--paper-200) 4px); }

/* Tampon encreur, utilisé pour "Vu" / confirmations ponctuelles */
.stamp {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold-400); border: 1.5px solid currentColor; border-radius: 4px; padding: 2px 8px;
  transform: rotate(-3deg);
}

/* ---------- Boutons communs (chaque page peut ajouter ses variantes) ---------- */
.btn {
  font-family: var(--font-ui); font-weight: 700; font-size: 0.95rem;
  border-radius: var(--radius-card); border: 1.5px solid transparent; cursor: pointer;
  padding: 13px 22px; transition: transform .15s var(--ease-tear), background .15s, border-color .15s;
}
.btn:active { transform: scale(0.98); }
.btn-gold { background: var(--gold-500); color: var(--wine-950); }
.btn-gold:hover { background: var(--gold-400); }
.btn-ghost { background: transparent; color: var(--text-on-wine); border-color: var(--border-on-wine-strong); }
.btn-ghost:hover { border-color: var(--gold-400); color: var(--gold-300); }

/* ---------- Champs de formulaire communs ---------- */
.field-label { display: block; font-size: 0.78rem; color: var(--text-on-wine-muted); margin-bottom: 6px; font-weight: 600; letter-spacing: 0.02em; }
.field-input {
  width: 100%; padding: 13px 15px; border-radius: var(--radius-card);
  border: 1.5px solid var(--border-on-wine); background: rgba(0,0,0,0.18); color: var(--text-on-wine);
  font-size: 1rem; font-family: var(--font-ui); transition: border-color .15s;
}
.field-input:focus { outline: none; border-color: var(--gold-400); }
.field-input::placeholder { color: var(--text-on-wine-muted); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
