/* =====================================================================
   Réservation des repas — FIFP 2027 — partie publique
   Même style que « FIFP 2027 • Mon Parcours » (charte FIFP 2027).
   CSS simple, sans Tailwind ni compilation. Préfixe des classes : .r-
   Polices (à mettre dans le <head>) :
   <link href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Raleway:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Space+Mono:wght@400;700&display=swap" rel="stylesheet">
   ===================================================================== */

:root {
  --bleu: #004f9f;        /* couleur principale : titres, bouton principal, choix sélectionné */
  --bleu-2: #0082ba;      /* bleu ciel : secondaire, liens discrets */
  --jaune: #fff482;       /* jaune vif : pastille « 9e Éd. », focus clavier, jauge, bouton A+ */
  --sable: #f4e897;       /* jaune sable : étiquettes, sous-titre de l'en-tête, encadré déjeuner */
  --rouge: #e9454e;       /* rouge : alerte, complet, « Recommencer » */
  --vert: #5cad70;        /* vert : confirmé, réussi */
  --rose: #f6b8bc;        /* rose : encadré dîner */
  --encre: #0f172a;       /* texte principal (slate-900) */
  --texte-2: #334155;     /* slate-700 */
  --texte-3: #475569;     /* slate-600 : textes secondaires */
  --gris-1: #f8fafc;      /* slate-50 : fond des choix non sélectionnés */
  --gris-2: #f1f5f9;      /* slate-100 */
  --gris-3: #e2e8f0;      /* slate-200 : filets */
  --gris-4: #cbd5e1;      /* slate-300 : bordure des choix non sélectionnés */
  --titre: 'Bebas Neue', 'Raleway', sans-serif;
  --texte: 'Raleway', sans-serif;
  --mono: 'Space Mono', monospace;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: auto; min-height: 100%; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
body {
  background-color: var(--bleu);
  font-family: var(--texte);
  font-size: 16px;
  line-height: 1.5;
  color: var(--encre);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
/* Dégradé officiel « ciel » de la charte, posé sur ::before pour ne pas bloquer le défilement mobile */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(155deg, #004f9f 0%, #006bb3 45%, #0082ba 82%, #7cc4e4 100%);
}
::selection { background: var(--jaune); color: var(--bleu); }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; margin: 0; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [role="button"]:focus-visible, a:focus-visible {
  outline: 3px solid var(--jaune);
  outline-offset: 2px;
}
/* Mode « texte très grand » (bouton A+) */
html.texte-xl { font-size: 18px; }
html.texte-xl body { font-size: 19px; }

.r-titre { font-family: var(--titre); letter-spacing: .04em; text-transform: uppercase; font-weight: 400; line-height: 1; }
.r-mono { font-family: var(--mono); }

/* ---------- En-tête collant ---------- */
.r-entete {
  position: sticky; top: 0; z-index: 40;
  background: rgba(0, 79, 159, .95);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .25);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
}
.r-entete-in { max-width: 48rem; margin: 0 auto; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.r-marque { display: flex; align-items: center; gap: 8px; min-width: 0; }
.r-edition {
  flex-shrink: 0; padding: 4px 8px; border-radius: 8px;
  background: var(--jaune); color: var(--bleu);
  font-family: var(--titre); font-size: 1rem; line-height: 1; letter-spacing: .04em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.r-entete h1 { font-family: var(--titre); color: #fff; font-size: 1.25rem; line-height: 1; letter-spacing: .05em; text-transform: uppercase; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-entete .r-sous { font-family: var(--mono); font-size: 10px; color: var(--sable); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.r-mini { min-height: 44px; min-width: 44px; padding: 6px 10px; border-radius: 12px; font-size: .75rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 4px; transition: transform .15s; }
.r-mini:active { transform: scale(.95); }
.r-mini--jaune { background: var(--jaune); color: var(--bleu); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.r-mini--verre { background: rgba(255, 255, 255, .15); color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.r-mini--rouge { background: var(--rouge); color: #fff; }
/* Jauge d'étapes (parcours en plusieurs écrans) */
.r-jauge { max-width: 48rem; margin: 0 auto; padding: 0 14px 10px; }
.r-jauge-txt { display: flex; justify-content: space-between; font-size: .75rem; font-weight: 700; color: rgba(255, 255, 255, .95); margin-bottom: 6px; }
.r-jauge-txt span:last-child { font-family: var(--mono); color: var(--jaune); }
.r-jauge-fond { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.r-jauge-fond div { height: 100%; border-radius: 999px; background: var(--jaune); transition: width .3s; }

/* ---------- Conteneur et cartes ---------- */
.r-page { max-width: 48rem; margin: 0 auto; padding: 16px 14px 176px; }
.r-carte { background: #fff; border: 1px solid #fff; border-radius: 24px; padding: 16px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1); }
.r-carte + .r-carte { margin-top: 16px; }
.r-carte h2 { font-family: var(--titre); text-transform: uppercase; letter-spacing: .04em; font-weight: 400; color: var(--bleu); font-size: 1.875rem; line-height: 1; }
.r-intro { color: var(--texte-3); font-size: .875rem; margin-top: 6px; }
.r-etiquette { display: inline-block; background: var(--sable); color: var(--bleu); font-family: var(--mono); font-size: .75rem; font-weight: 700; padding: 4px 14px; border-radius: 999px; }
.r-animer { animation: r-entree .25s ease-out; } /* sans « forwards » : ça décrocherait les barres fixes */
@keyframes r-entree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Choix en cartes (comme le choix du pass) ---------- */
.r-choix { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 16px; border-radius: 16px; border: 2px solid var(--gris-4); background: var(--gris-1); transition: transform .15s; cursor: pointer; }
.r-choix:active { transform: scale(.99); }
.r-choix + .r-choix { margin-top: 12px; }
.r-coche { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; border: 2px solid #94a3b8; display: flex; align-items: center; justify-content: center; font-size: .875rem; font-weight: 700; }
.r-choix-nom { display: block; font-family: var(--titre); text-transform: uppercase; letter-spacing: .04em; font-size: 1.5rem; line-height: 1; color: var(--bleu); }
.r-choix-desc { display: block; font-size: .75rem; font-weight: 500; color: var(--texte-2); }
.r-choix[aria-pressed="true"] { border: 4px solid var(--bleu); background: rgba(0, 79, 159, .05); padding: 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.r-choix[aria-pressed="true"] .r-coche { border-color: var(--bleu); background: var(--bleu); color: #fff; }

/* ---------- Petits boutons de choix en grille (jours, formules) ---------- */
.r-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.r-bouton-choix { min-height: 50px; padding: 8px 10px; border-radius: 12px; border: 2px solid rgba(0, 79, 159, .4); background: #fff; color: var(--bleu); font-size: .75rem; font-weight: 700; transition: transform .15s; }
.r-bouton-choix:active { transform: scale(.95); }
.r-bouton-choix[aria-pressed="true"] { background: var(--bleu); border-color: var(--bleu); color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.r-bouton-choix:disabled { opacity: .45; cursor: not-allowed; }
.r-plein-mobile { grid-column: span 2; } /* dernier bouton seul sur sa ligne en mobile (ex. lundi) */

/* ---------- Encadrés ---------- */
.r-encadre { padding: 14px; border-radius: 16px; background: rgba(0, 79, 159, .05); border: 1px solid rgba(0, 79, 159, .15); font-size: .875rem; }
.r-encadre--dejeuner { background: rgba(244, 232, 151, .35); border-color: var(--sable); }
.r-encadre--diner { background: rgba(246, 184, 188, .3); border-color: var(--rose); }
.r-encadre--alerte { background: rgba(233, 69, 78, .05); border: 2px solid rgba(233, 69, 78, .4); }
.r-encadre--ok { background: rgba(92, 173, 112, .1); border-color: rgba(92, 173, 112, .35); }
.r-encadre h3 { font-weight: 700; font-size: 1rem; color: var(--bleu); display: flex; align-items: center; gap: 6px; }
.r-valeur { font-family: var(--mono); font-size: .75rem; font-weight: 700; color: var(--bleu); background: #fff; border: 1px solid rgba(0, 79, 159, .3); border-radius: 12px; padding: 4px 10px; }
.r-complet { display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; background: var(--rouge); color: #fff; padding: 0 5px; border-radius: 4px; vertical-align: 1px; }

/* ---------- Champs de formulaire ---------- */
.r-champ { display: flex; flex-direction: column; gap: 4px; }
.r-champ label { font-size: .75rem; font-weight: 700; color: var(--bleu); text-transform: uppercase; letter-spacing: .05em; }
.r-champ input, .r-champ select, .r-champ textarea { min-height: 50px; padding: 10px 14px; border: 2px solid var(--gris-4); border-radius: 12px; background: #fff; font-weight: 600; font-size: 1rem; }
.r-champ input:focus, .r-champ select:focus, .r-champ textarea:focus { border-color: var(--bleu); outline: none; }

/* ---------- Boutons ---------- */
.r-bouton { min-height: 54px; padding: 12px 28px; border-radius: 16px; background: var(--bleu); color: #fff; font-weight: 700; font-size: 1rem; display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1); transition: transform .15s; text-decoration: none; }
.r-bouton:active { transform: scale(.99); }
.r-bouton--second { background: #fff; color: #1e293b; border: 2px solid var(--gris-4); box-shadow: none; }
.r-bouton--rouge { background: var(--rouge); }
.r-bouton:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Barre d'action en bas (pouce) : fixe sur mobile, dans le flux sur écran large ---------- */
.r-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px; background: rgba(255, 255, 255, .95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--gris-3); box-shadow: 0 -4px 15px rgba(0, 0, 0, .08); }
.r-dock-in { max-width: 48rem; margin: 0 auto; display: flex; justify-content: space-between; gap: 10px; }
.r-dock .r-bouton { flex: 1; }

/* ---------- Message éphémère ---------- */
.r-toast { position: fixed; left: 12px; right: 12px; bottom: 80px; z-index: 50; background: var(--encre); color: #fff; font-size: .875rem; padding: 12px 16px; border-radius: 16px; border: 1px solid var(--jaune); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25); text-align: center; }

/* ---------- Écran large ---------- */
@media (min-width: 640px) {
  .r-entete-in { padding: 10px 20px; }
  .r-entete h1 { font-size: 1.5rem; }
  .r-entete .r-sous { font-size: .75rem; }
  .r-edition { font-size: 1.25rem; }
  .r-mini { font-size: .875rem; }
  .r-jauge { display: none; }
  .r-page { padding: 32px 20px 96px; }
  .r-carte { padding: 32px; }
  .r-carte h2 { font-size: 3rem; }
  .r-intro { font-size: 1rem; }
  .r-choix-nom { font-size: 1.875rem; }
  .r-choix-desc, .r-bouton-choix { font-size: .875rem; }
  .r-grille { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .r-plein-mobile { grid-column: span 1; }
  .r-encadre { padding: 20px; }
  .r-dock { position: static; margin-top: 20px; padding: 0; background: transparent; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .r-dock .r-bouton { flex: initial; }
  .r-toast { left: auto; right: 16px; max-width: 24rem; text-align: left; }
}

/* ---------- Intégration dans FestiCiné ----------
   Comme Mon Parcours, l'outil garde son fond dégradé quand il est intégré (iframe). */

/* ---------- Impression ---------- */
@media print {
  body { background: #fff !important; color: #000 !important; }
  body::before, .r-entete, .r-dock, .r-toast, .no-print { display: none !important; }
  .r-carte { box-shadow: none; border: 0; padding: 0; }
}
