/* Le casse de Noël : feuille de styles de la page d'accueil */

@font-face {
  font-family: "TT Ramillas";
  src: url("fonts/tt-ramillas-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --creme: #F3E4CF;
  --creme-fonce: #EBD8BE;
  --encre: #0A0E20;
  --encre-douce: #2A2E44;
  --parme: #9B75C4;
  --parme-fonce: #6E4A99;
  --lavande: #E6D6EE;
  --erreur: #9A2A2A;
  --succes: #2F5E3A;
  --titre: "TT Ramillas", Georgia, "Times New Roman", serif;
  --texte: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gouttiere: clamp(16px, 4vw, 48px);
  --rayon: 6px;
}

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

body {
  margin: 0;
  background: var(--creme);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--titre); font-weight: 700; line-height: 1.05; letter-spacing: -0.01em; }
p { margin: 0; }

.conteneur { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gouttiere); }
.conteneur--etroit { max-width: 780px; }
.centre { text-align: center; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--encre); color: var(--creme); padding: 10px 14px; border-radius: var(--rayon);
}
.skip:focus { top: 12px; }

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

/* Boutons */
.bouton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  background: var(--encre); color: var(--creme);
  border: 0; border-radius: var(--rayon);
  font: 700 1rem/1 var(--texte); text-decoration: none; cursor: pointer;
  transition: background-color .2s ease;
}
.bouton:hover { background: var(--encre-douce); }
.bouton[disabled] { opacity: .7; cursor: progress; }
.bouton--petit { min-height: 40px; padding: 0 16px; font-size: .9375rem; }

/* En-tête */
.entete { position: relative; z-index: 2; }
.entete__ligne { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.entete nav { display: flex; align-items: center; gap: 24px; }
.entete__lien { text-decoration: none; font-weight: 600; font-size: .9375rem; }
.entete__lien:hover { text-decoration: underline; text-underline-offset: 4px; }
.signature { font-family: var(--titre); font-size: 1.375rem; text-decoration: none; }

/* Premier écran */
.hero { position: relative; overflow: hidden; display: flex; flex-direction: column; }
.hero__grille { position: relative; z-index: 1; padding-block: 24px 56px; }
.hero__texte { max-width: 560px; }
.surtitre {
  font-weight: 700; font-size: .8125rem; letter-spacing: .18em; text-transform: uppercase;
  margin-bottom: 14px;
}
.titre-jeu { font-size: clamp(3.4rem, 9vw, 6.6rem); line-height: .95; }
.titre-jeu > span { display: block; }
.titre-jeu em { font-style: normal; color: var(--parme); }
.hero__accroche { margin-top: 22px; font-weight: 800; font-size: clamp(1.25rem, 2.4vw, 1.6rem); line-height: 1.25; }
.hero__intro { margin-top: 12px; }
.hero__ouverture { margin-top: 18px; font-size: .9375rem; font-weight: 600; }

.hero__image { order: 2; height: 440px; }
.hero__image img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 30%; }

@media (min-width: 960px) {
  .entete { position: absolute; top: 0; left: 0; right: 0; }
  .entete__lien { background: rgba(243, 228, 207, .85); padding: 8px 12px; border-radius: var(--rayon); }
  .hero { display: block; min-height: min(820px, 96vh); padding-top: 76px; }
  .hero__image { position: absolute; top: 0; right: 0; bottom: 0; width: 48%; height: auto; }
  .hero__image img { object-position: 40% 25%; }
  /* Fondu vers le crème de la page pour effacer le raccord de l'illustration */
  .hero__image::before {
    content: ""; position: absolute; inset: 0 auto 0 0; width: 22%; z-index: 1;
    background: linear-gradient(to right, var(--creme), rgba(243, 228, 207, 0));
  }
  .hero__texte { max-width: 50%; }
  .hero__grille { padding-block: 40px 72px; }
}

/* Formulaire */
.formulaire { margin-top: 26px; }
.formulaire__label { display: block; font-weight: 700; margin-bottom: 8px; }
.formulaire__ligne { display: flex; gap: 10px; flex-wrap: wrap; }
.formulaire input[type="email"] {
  flex: 1 1 240px; min-height: 48px; padding: 0 14px;
  font: 500 1rem var(--texte); color: var(--encre);
  background: #FFFDF9; border: 1.5px solid #8C8578; border-radius: var(--rayon);
}
.formulaire input[type="email"]::placeholder { color: #6F6A62; }
.formulaire input[aria-invalid="true"] { border-color: var(--erreur); }
.formulaire .bouton { flex: 0 0 auto; }
.formulaire__accord { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; font-size: .9375rem; cursor: pointer; }
.formulaire__accord input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--encre); flex: none; }
.formulaire__mention { margin-top: 8px; font-size: .8125rem; color: var(--encre-douce); }
.formulaire__message { margin-top: 12px; font-weight: 700; font-size: .9375rem; min-height: 1.5em; }
.formulaire__message[data-etat="erreur"] { color: var(--erreur); }
.formulaire__message[data-etat="succes"] { color: var(--succes); }
.formulaire__piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 520px) { .formulaire .bouton { width: 100%; } }

/* Sections */
.section { padding-block: clamp(56px, 9vw, 104px); }
.section--encre { background: var(--encre); color: var(--creme); }
.section--creme-fonce { background: var(--creme-fonce); }
.titre-section { font-size: clamp(2rem, 5vw, 3.4rem); text-align: center; }
.section__intro { max-width: 640px; margin: 18px auto 0; text-align: center; }
.section .conteneur--etroit > p { margin-top: 18px; }

/* Étapes */
.etapes { list-style: none; margin: 48px 0 0; padding: 0; display: grid; gap: 48px; }
@media (min-width: 860px) { .etapes { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.etape__numero { display: block; font-family: var(--titre); font-size: 3.4rem; line-height: 1; color: var(--parme); }
.etape img { width: 100%; max-width: 320px; aspect-ratio: 1; object-fit: contain; margin: 12px auto 18px; }
.etape h3 { font-size: 1.6rem; margin-bottom: 10px; }

/* Calendrier */
.calendrier { list-style: none; margin: 44px auto 0; padding: 0; max-width: 860px; }
.calendrier li {
  display: grid; gap: 4px 24px; padding: 18px 0;
  border-top: 1px solid rgba(243, 228, 207, .22);
}
.calendrier li:last-child { border-bottom: 1px solid rgba(243, 228, 207, .22); }
@media (min-width: 720px) { .calendrier li { grid-template-columns: 200px 220px 1fr; align-items: baseline; } }
.calendrier__date { font-weight: 700; font-size: .875rem; letter-spacing: .06em; text-transform: uppercase; color: #CDB6E6; }
.calendrier__titre { font-family: var(--titre); font-size: 1.45rem; }

/* Questions */
.questions { margin-top: 36px; }
.questions details { border-top: 1px solid rgba(10, 14, 32, .18); }
.questions details:last-child { border-bottom: 1px solid rgba(10, 14, 32, .18); }
.questions summary {
  list-style: none; cursor: pointer; padding: 18px 36px 18px 0; position: relative;
  font-weight: 700; font-size: 1.0625rem;
}
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.6rem; font-weight: 400; }
.questions details[open] summary::after { content: "\2212"; }
.questions details p { padding-bottom: 18px; }

/* Rappel */
.rappel { background: var(--lavande); padding-block: clamp(56px, 8vw, 88px); }
.rappel p { margin: 16px 0 26px; }

/* Pied de page */
.pied { padding-block: 36px; font-size: .9375rem; }
.pied__ligne { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; }
.pied__ligne > div { max-width: 560px; display: grid; gap: 6px; }
.pied nav { display: flex; gap: 24px; align-items: flex-start; }
.pied nav a { text-decoration: none; }
.pied nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 560px) {
  .entete__lien { display: none; }
  .signature { font-size: 1.2rem; }
}
