/* =========================================================
   BOOM BOOM PARC — Site d'ouverture (direction A « Ciel de fête »)
   ========================================================= */

:root {
  --marine: #1A1C5C;
  --marine-2: #2E3180;
  --texte-doux: #4A4D7A;
  --ciel: #E9F7FE;
  --ciel-2: #BFE6FA;
  --bleu: #2BB5F0;
  --bleu-fonce: #1A8FC4;
  --jaune: #FFD43B;
  --rose: #FF5FB0;
  --framboise: #C2136E;
  --framboise-fonce: #8E0E52;
  --violet: #8B5CF6;
  --blanc: #FFFFFF;
  --bordure: #D8DCEB;
  --erreur: #B3123E;
  --succes: #0F7A4B;

  --f-titre: "Fredoka", "Trebuchet MS", sans-serif;
  --f-texte: "Nunito", "Segoe UI", system-ui, sans-serif;

  --r-pill: 999px;
  --largeur: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--f-texte);
  color: var(--marine);
  background: var(--ciel);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--framboise); }
a:hover { color: var(--framboise-fonce); }

h1, h2, h3 { font-family: var(--f-titre); font-weight: 700; line-height: 1.05; margin: 0; }

.conteneur { max-width: var(--largeur); margin: 0 auto; padding: 0 24px; }

.visuellement-cache {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.lien-evitement {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--marine); color: var(--blanc); padding: 12px 18px; border-radius: 12px;
  font-weight: 800; text-decoration: none;
}
.lien-evitement:focus { top: 16px; color: var(--blanc); }

:focus-visible { outline: 3px solid var(--marine); outline-offset: 3px; }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border: none; border-radius: var(--r-pill);
  background: var(--framboise); color: var(--blanc);
  font-family: var(--f-titre); font-weight: 600; font-size: 18px;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
  box-shadow: 0 5px 0 var(--framboise-fonce);
}
.bouton:hover { background: #D41A7A; color: var(--blanc); transform: translateY(-2px); box-shadow: 0 7px 0 var(--framboise-fonce); }
.bouton:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--framboise-fonce); }
.bouton[disabled] { opacity: .7; cursor: wait; transform: none; }
.bouton--plein { width: 100%; min-height: 60px; font-size: 20px; }
.bouton--marine { background: var(--marine); box-shadow: 0 5px 0 #0C0D33; }
.bouton--marine:hover { background: var(--marine-2); box-shadow: 0 7px 0 #0C0D33; }

/* ---------- En-tête ---------- */
.entete { position: relative; z-index: 5; }
.entete__barre {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 18px; padding-bottom: 18px;
}
.entete__logo img { width: 104px; height: auto; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; font-weight: 800; font-size: 16px; }
.nav a:not(.bouton) { color: var(--marine); text-decoration: none; padding: 10px 0; }
.nav a:not(.bouton):hover { color: var(--framboise); }
.nav .bouton { min-height: 48px; font-size: 16px; padding: 0 22px; }

/* ---------- Héros ---------- */
.heros {
  display: flex; flex-wrap: wrap; align-items: center; gap: 48px;
  padding-top: 24px; padding-bottom: 72px;
}
.heros__texte { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.etiquette {
  align-self: flex-start; background: var(--jaune); color: var(--marine);
  font-weight: 800; font-size: 15px; letter-spacing: .06em; text-transform: uppercase;
  padding: 10px 18px; border-radius: var(--r-pill);
}
.heros h1 { font-size: clamp(42px, 6vw, 68px); line-height: 1.02; }
.heros h1 span { color: var(--framboise); }
.heros__intro { margin: 0; font-size: 20px; line-height: 1.55; max-width: 540px; }

.carte-rapide {
  background: var(--blanc); border-radius: 28px; padding: 22px;
  display: flex; flex-direction: column; gap: 14px; box-shadow: 0 10px 0 var(--ciel-2);
}
.carte-rapide__titre { font-family: var(--f-titre); font-weight: 600; font-size: 20px; line-height: 1.3; }
.carte-rapide__titre span { color: var(--framboise); }
.formulaire-rapide { display: flex; flex-wrap: wrap; gap: 10px; }
.formulaire-rapide input {
  flex: 1 1 260px; min-width: 0; height: 56px; border: 2px solid var(--ciel-2);
  border-radius: var(--r-pill); padding: 0 22px; font: inherit; font-size: 17px; color: var(--marine);
}
.formulaire-rapide input:focus { border-color: var(--bleu-fonce); outline: none; box-shadow: 0 0 0 4px rgba(43,181,240,.25); }

/* Mascotte */
.heros__visuel {
  flex: 1 1 420px; min-width: 0; position: relative; height: 560px;
  display: flex; justify-content: center; align-items: flex-end;
}
.heros__soleil {
  position: absolute; left: 50%; top: 40px; width: 460px; height: 460px; margin-left: -230px;
  border-radius: 50%; background: var(--jaune);
}
.bulle { position: absolute; border-radius: 50%; animation: flotte 6s ease-in-out infinite; }
.bulle--1 { left: 6%; top: 70px; width: 64px; height: 64px; background: var(--rose); }
.bulle--2 { right: 6%; top: 150px; width: 40px; height: 40px; background: var(--bleu); animation-delay: -2s; }
.bulle--3 { right: 12%; bottom: 40px; width: 28px; height: 28px; background: var(--violet); animation-delay: -4s; }
@keyframes flotte { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.mascotte {
  position: relative; height: 540px; aspect-ratio: 444 / 1001;
  /* --penche est piloté par le JavaScript (inclinaison selon la souris) */
  transform: rotate(var(--penche, 0deg)) translateX(var(--glisse, 0px));
  transform-origin: 50% 100%;
}
.mascotte__sautille { width: 100%; height: 100%; animation: sautille 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes sautille {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(-8px) scaleY(1.01); }
}
.mascotte__pivot {
  position: relative; width: 100%; height: 100%;
  transform: scaleX(1);
  transition: transform .42s cubic-bezier(.55,-0.35,.45,1.35);
}
.mascotte__pivot img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  transition: opacity 0s linear .21s; /* échange d'image à mi-rotation */
  user-select: none; -webkit-user-drag: none; pointer-events: none;
}
.mascotte__gauche { opacity: 0; }
.mascotte.regarde-gauche .mascotte__pivot { transform: scaleX(-1); }
.mascotte.regarde-gauche .mascotte__droite { opacity: 0; }
.mascotte.regarde-gauche .mascotte__gauche { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .bulle, .mascotte__sautille { animation: none; }
  .mascotte__pivot, .mascotte__pivot img { transition: none; }
  .mascotte { transform: none; }
}

/* ---------- Concours (accueil) ---------- */
.section-concours { background: var(--bleu); padding: 88px 0; }
.affiche {
  max-width: 1100px; margin: 0 auto; background: var(--jaune); border-radius: 36px;
  padding: 56px 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 40px;
  box-shadow: 0 14px 0 var(--bleu-fonce);
}
.affiche__texte { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.affiche__etiquette {
  align-self: flex-start; background: var(--marine); color: var(--jaune);
  font-weight: 800; font-size: 14px; letter-spacing: .12em; text-transform: uppercase;
  padding: 9px 16px; border-radius: 10px;
}
.affiche h2 { font-size: clamp(36px, 5vw, 58px); line-height: 1.02; }
.affiche h2 span { color: var(--framboise); }
.affiche p { margin: 0; font-size: 20px; line-height: 1.5; font-weight: 600; }
.puces { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.puces li { background: var(--blanc); border-radius: 16px; padding: 14px 20px; font-weight: 800; font-size: 17px; }
.affiche__liens { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-top: 4px; }
.affiche__liens a:not(.bouton) { color: var(--marine); font-weight: 800; }
.affiche__pastille-zone { flex: 0 1 300px; min-width: 0; display: flex; justify-content: center; }
.pastille {
  width: 260px; height: 260px; border-radius: 50%; background: var(--framboise); color: var(--blanc);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  transform: rotate(-6deg);
}
.pastille__chiffre { font-family: var(--f-titre); font-weight: 700; font-size: 120px; line-height: .9; }
.pastille__texte { font-weight: 800; font-size: 18px; letter-spacing: .04em; line-height: 1.2; }

/* ---------- Le parc ---------- */
.section-parc { padding: 88px 0; }
.section-parc__entete { display: flex; flex-direction: column; gap: 12px; max-width: 720px; margin-bottom: 40px; }
.section-parc__entete h2 { font-size: clamp(34px, 4.5vw, 48px); }
.section-parc__entete p { margin: 0; font-size: 19px; line-height: 1.55; }
.parc-grille { display: flex; flex-wrap: wrap; gap: 28px; align-items: stretch; }
.parc-image {
  flex: 1 1 560px; min-width: 0; width: 100%; height: 420px; object-fit: cover;
  border-radius: 32px; background: #DDE3EA;
}
.attraits { flex: 1 1 340px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.attrait { background: var(--blanc); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.attrait h3 { font-family: var(--f-titre); font-weight: 600; font-size: 20px; }
.attrait p { margin: 0; font-size: 15px; line-height: 1.45; }

/* ---------- FAQ ---------- */
.section-faq { padding: 0 0 88px; }
.section-faq h2 { font-size: clamp(32px, 4.5vw, 44px); margin-bottom: 28px; }
.faq { display: flex; flex-direction: column; gap: 12px; max-width: 860px; }
.faq details { background: var(--blanc); border-radius: 20px; padding: 0 24px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 36px 20px 0; position: relative;
  font-family: var(--f-titre); font-weight: 600; font-size: 20px; line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; background: var(--jaune);
  display: flex; align-items: center; justify-content: center; font-size: 20px; line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 20px; font-size: 17px; line-height: 1.6; }

/* ---------- Inscription ---------- */
.section-inscription { background: var(--rose); padding: 88px 0; }
.carte-inscription {
  max-width: 860px; margin: 0 auto; background: var(--blanc); border-radius: 36px; padding: 48px;
  display: flex; flex-direction: column; gap: 24px;
}
.carte-inscription h2 { font-size: clamp(32px, 4.5vw, 44px); text-align: center; }
.carte-inscription__intro { margin: 0; font-size: 18px; line-height: 1.5; text-align: center; }

.formulaire { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.champ { display: flex; flex-direction: column; gap: 6px; }
.champ--large { grid-column: 1 / -1; }
.champ label { font-weight: 800; font-size: 15px; }
.champ input {
  height: 54px; border: 2px solid var(--bordure); border-radius: 16px; padding: 0 16px;
  font: inherit; font-size: 17px; color: var(--marine); background: var(--blanc);
}
.champ input:focus { border-color: var(--bleu-fonce); outline: none; box-shadow: 0 0 0 4px rgba(43,181,240,.25); }
.champ input[aria-invalid="true"] { border-color: var(--erreur); }
.case {
  grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start;
  font-size: 15px; line-height: 1.45; cursor: pointer;
}
.case input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--framboise); cursor: pointer; }
.formulaire .bouton { grid-column: 1 / -1; }
.pot-de-miel { position: absolute; left: -5000px; }

.message {
  grid-column: 1 / -1; margin: 0; padding: 14px 18px; border-radius: 14px; font-weight: 700; font-size: 16px; line-height: 1.45;
}
.message:empty { display: none; }
.message--erreur { background: #FDE8EE; color: var(--erreur); }
.message--succes { background: #E3F7EC; color: var(--succes); }

.petit-texte { margin: 0; font-size: 13px; line-height: 1.5; color: var(--texte-doux); text-align: center; }

/* ---------- Pied de page ---------- */
.pied { background: var(--marine); color: var(--blanc); padding: 40px 0; }
.pied__barre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.pied__logo img { width: 88px; height: auto; }
.pied__info { font-size: 15px; line-height: 1.6; }
.pied__info a { color: var(--jaune); }
.pied__info a:hover { color: #FFE680; }
.reseaux { display: flex; gap: 12px; }
.reseaux a {
  width: 48px; height: 48px; border-radius: 50%; background: var(--marine-2);
  display: flex; align-items: center; justify-content: center; transition: background-color .15s;
}
.reseaux a:hover { background: var(--framboise); }

/* ---------- Bouton « remonter en haut » ---------- */
.remonter {
  position: fixed; right: 20px; bottom: 20px; z-index: 50;
  width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--blanc);
  background: var(--framboise); color: var(--blanc); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(26,28,92,.28);
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s, background-color .15s;
}
.remonter.est-visible { opacity: 1; visibility: visible; transform: translateY(0); transition: opacity .25s ease, transform .25s ease, visibility 0s, background-color .15s; }
.remonter:hover { background: var(--framboise-fonce); }

/* ---------- Page concours ---------- */
.page-concours .heros-concours { padding: 24px 0 72px; }
.heros-concours__grille { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.heros-concours__texte { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.heros-concours h1 { font-size: clamp(38px, 5.5vw, 62px); }
.heros-concours h1 span { color: var(--framboise); }
.heros-concours__intro { margin: 0; font-size: 20px; line-height: 1.55; max-width: 620px; }
.heros-concours__boutons { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.heros-concours__boutons a:not(.bouton) { font-weight: 800; color: var(--marine); }

.resume { padding: 0 0 72px; }
.resume__grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.resume__carte { background: var(--blanc); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.resume__carte--jaune { background: var(--jaune); }
.resume__etiquette { font-weight: 800; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--texte-doux); }
.resume__carte--jaune .resume__etiquette { color: var(--marine); }
.resume__valeur { font-family: var(--f-titre); font-weight: 700; font-size: 26px; line-height: 1.15; }
.resume__note { font-size: 15px; line-height: 1.45; margin: 0; }

.etapes { background: var(--bleu); padding: 80px 0; }
.etapes h2 { font-size: clamp(32px, 4.5vw, 44px); color: var(--marine); margin-bottom: 32px; }
.etapes__liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; counter-reset: etape; }
.etapes__liste li { background: var(--blanc); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; gap: 10px; counter-increment: etape; }
.etapes__liste li::before {
  content: counter(etape); width: 48px; height: 48px; border-radius: 50%; background: var(--jaune);
  font-family: var(--f-titre); font-weight: 700; font-size: 24px; display: flex; align-items: center; justify-content: center;
}
.etapes__liste h3 { font-size: 21px; font-weight: 600; }
.etapes__liste p { margin: 0; font-size: 16px; line-height: 1.5; }

.reglement { padding: 80px 0; }
.reglement__grille { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.sommaire {
  flex: 1 1 260px; min-width: 0; position: sticky; top: 24px;
  background: var(--blanc); border-radius: 24px; padding: 24px;
}
.sommaire h2 { font-size: 22px; margin-bottom: 12px; }
.sommaire ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.sommaire a { color: var(--marine); text-decoration: none; }
.sommaire a:hover { color: var(--framboise); text-decoration: underline; }
.reglement__texte {
  flex: 999 1 560px; min-width: 0; background: var(--blanc); border-radius: 32px; padding: 48px;
  font-size: 17px; line-height: 1.65;
}
.reglement__texte > h2 { font-size: clamp(30px, 4vw, 40px); margin-bottom: 8px; }
.reglement__maj { margin: 0 0 28px; color: var(--texte-doux); font-size: 15px; }
.article { padding: 24px 0; border-top: 2px solid var(--ciel); scroll-margin-top: 24px; }
.article h3 { font-size: 22px; font-weight: 600; margin-bottom: 10px; }
.article p { margin: 0 0 12px; }
.article ul, .article ol { margin: 0 0 12px; padding-left: 24px; }
.article li { margin-bottom: 6px; }
.a-completer { background: #FFF3BF; padding: 0 4px; border-radius: 4px; font-weight: 700; }
.encadre {
  background: var(--ciel); border-radius: 18px; padding: 18px 20px; margin: 4px 0 12px;
}

@media (max-width: 900px) {
  .sommaire { position: static; }
}

/* ---------- Adaptation mobile ---------- */
@media (max-width: 720px) {
  .entete__logo img { width: 80px; }
  .nav { gap: 4px 18px; font-size: 15px; }
  .heros { gap: 24px; padding-bottom: 56px; }
  .heros__visuel { height: 420px; }
  .heros__soleil { width: 340px; height: 340px; margin-left: -170px; top: 30px; }
  .mascotte { height: 400px; }
  .section-concours, .section-parc, .section-inscription { padding: 64px 0; }
  .affiche { padding: 36px 24px; border-radius: 28px; }
  .pastille { width: 200px; height: 200px; }
  .pastille__chiffre { font-size: 90px; }
  .parc-image { height: 260px; }
  .attraits { grid-template-columns: minmax(0, 1fr); }
  .carte-inscription { padding: 32px 22px; border-radius: 28px; }
  .formulaire { grid-template-columns: minmax(0, 1fr); }
  .reglement__texte { padding: 28px 22px; }
}
