/* Résa Mian Fan : styles communs à toutes les pages (lot 0).
   Les couleurs d'un resto viennent de /{cle}/theme.css (5.9), chargée APRÈS ce fichier : les valeurs
   ci-dessous ne servent qu'aux pages sans resto (connexion, admin, erreurs génériques).
   Aucun style en ligne (CSP du 9.3). */

/* Polices hébergées par le site (jamais Google Fonts), sous-ensemble latin, licences OFL. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/statique/polices/fraunces-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/statique/polices/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/statique/polices/inter-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/statique/polices/inter-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/statique/polices/poppins-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/statique/polices/poppins-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/statique/polices/poppins-latin-800-normal.woff2") format("woff2");
}

/* Valeurs par défaut (neutres) ; theme.css les remplace pour chaque resto. */
:root {
  --fond: #FAF6EC;
  --surface: #FFFCF6;
  --creme: #F3ECDC;
  --encre: #2F1E18;
  --encre-douce: #6B4D42;
  --accent: #8B2E2E;
  --accent-fonce: #6E2222;
  --nuit: #231613;
  --rose: #E8B6AE;
  --ok: #3F6B4A;
  --filet: rgba(47, 30, 24, 0.14);
  --filet-fort: rgba(47, 30, 24, 0.22);
  --encre-attenue: rgba(47, 30, 24, 0.42);
  --rose-pale: #F7E6E2;
  --accent-voile: rgba(139, 46, 46, 0.12);
  --police-titres: 'Fraunces', Georgia, serif;
  --police-texte: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --police-signe: 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif CJK JP', serif;
  /* Communs, sans lien avec le resto */
  --jaune: #FFE58A;
  --jaune-encre: #4A3A00;
  --rayon-petit: 3px;
  --rayon: 10px;
  --rayon-grand: 14px;
  --ombre-carte: 0 1px 2px rgba(47, 30, 24, 0.06), 0 8px 24px -12px rgba(47, 30, 24, 0.28);
  --cible: 44px;
  color-scheme: light;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: auto; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  background: var(--fond);
  color: var(--encre);
  font-family: var(--police-texte);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 {
  font-family: var(--police-titres);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
p { margin: 0 0 0.75em; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

/* Focus visible (WCAG 2.1 AA, 5.9) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Le signe du resto (雪) : polices du système */
.signe { font-family: var(--police-signe); font-weight: 500; font-style: normal; color: var(--accent); }
.marque { display: inline-flex; align-items: baseline; gap: 7px; font-family: var(--police-titres); font-style: italic; }
.marque-point { font-style: normal; color: var(--encre-douce); }

/* Contenu */
.page { max-width: 560px; margin: 0 auto; padding: 24px 22px 40px; }
.titre { font-size: 28px; letter-spacing: -0.3px; }
.texte { color: var(--encre-douce); }

/* Boutons : majuscules espacées (maquettes v2) */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 22px;
  border: 1px solid var(--accent);
  border-radius: var(--rayon-petit);
  background: var(--accent);
  color: var(--fond);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  text-decoration: none;
}
.bouton:hover { background: var(--accent-fonce); border-color: var(--accent-fonce); }
.bouton--second { background: transparent; color: var(--encre); border-color: var(--filet-fort); }
.bouton--second:hover { background: var(--creme); border-color: var(--filet-fort); }
.bouton[aria-disabled="true"], .bouton:disabled { opacity: 0.45; cursor: not-allowed; }

/* Page « message » (erreurs, pages de fin) */
.carte-message {
  margin-top: 16px;
  padding: 28px 24px;
  border: 1px solid var(--filet);
  border-radius: var(--rayon-grand);
  background: var(--surface);
  box-shadow: var(--ombre-carte);
}
.carte-message-resto { font-size: 19px; margin-bottom: 14px; }
.carte-message-action { margin: 20px 0 0; }

/* Messages d'erreur sous un champ */
.erreur { color: var(--accent); font-size: 14px; font-weight: 500; margin: 6px 0 0; }

/* Bandeau jaune de la simulation (11.3) */
.bandeau-simulation {
  margin: 0;
  padding: 8px 16px;
  background: var(--jaune);
  color: var(--jaune-encre);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.bandeau-simulation--gros { padding: 16px; font-size: 18px; }

/* Lecteurs d'écran seulement */
.visuellement-cache {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Champ piège des formulaires publics (9.4) : hors écran, jamais display:none */
.piege { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Mouvements réduits */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
