/* On s'mate quoi ? — charte tirée de Graphisme/Exemple site.pdf */
:root {
  --creme: #fbf3de;
  --creme-fonce: #f1e6c8;
  --bordeaux: #761829;
  --bordeaux-fonce: #5a1220;
  --marine: #043573;
  --marine-fonce: #022552;
  --encre: #1d2433;
  --blanc: #fffdf7;
  --titre: "Anton", "Arial Narrow", Impact, sans-serif;
  --texte: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rayon: 14px;
  --ombre: 0 4px 14px rgba(4, 53, 115, .12);
  --largeur: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--creme);
  color: var(--encre);
  font: 400 1.0625rem/1.7 var(--texte);
}
img { max-width: 100%; height: auto; }
a { color: var(--bordeaux); text-underline-offset: 3px; }
a:hover { color: var(--marine); }
h1, h2, h3 { color: var(--marine); line-height: 1.15; }
h1, h2 { font-family: var(--titre); font-weight: 400; letter-spacing: .01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: .2em 0 .4em; text-transform: uppercase; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 1.6em 0 .5em; }
h3 { font-size: 1.15rem; font-weight: 600; margin: 0 0 .2em; }
:focus-visible { outline: 3px solid var(--marine); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evitement { position: absolute; left: -999px; top: 0; background: var(--marine); color: #fff; padding: .5em 1em; z-index: 10; }
.evitement:focus { left: 1rem; }

/* ---------- En-tête ---------- */
.entete {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: .5rem 1.25rem;
  padding: .5rem 1rem 0;
  max-width: 1400px;
  margin: 0 auto;
}
.logo img { display: block; width: 88px; height: auto; }
.menu ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.menu a {
  display: block;
  background: var(--bordeaux);
  color: var(--creme);
  text-decoration: none;
  font-weight: 500;
  padding: .55rem 1.1rem;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .18);
}
.menu a:hover, .menu a[aria-current] { background: var(--marine); color: #fff; }
.recherche { display: flex; gap: .5rem; align-self: center; }
.recherche input {
  width: 220px; border: 0; border-radius: 999px; padding: .55rem 1rem;
  font: inherit; font-size: .95rem; background: #fff; box-shadow: var(--ombre);
}
.recherche button {
  width: 42px; height: 42px; border: 0; border-radius: 50%; background: #fff;
  box-shadow: var(--ombre); cursor: pointer; color: var(--marine); display: grid; place-items: center;
}

@media (max-width: 900px) {
  .entete { grid-template-columns: auto 1fr; align-items: center; }
  .menu { grid-column: 1 / -1; order: 3; }
  .menu ul { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; }
  .menu a { white-space: nowrap; padding: .45rem .8rem; font-size: .9rem; }
  .recherche { justify-self: end; }
  .recherche input { width: 100%; max-width: 180px; }
}

/* ---------- Accueil ---------- */
.hero {
  position: relative;
  min-height: 460px;
  display: grid;
  place-items: center;
  padding: 3rem 1rem;
  background: var(--encre) url(/static/img/hero.webp) center / cover no-repeat;
}
.hero-pastille {
  display: flex; align-items: center; gap: 1.25rem;
  background: var(--creme); border-radius: 999px;
  padding: 1rem 2rem; text-decoration: none; box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  max-width: 100%;
}
.hero-pastille:hover { transform: translateY(-2px); }
.hero-pastille img { width: 70px; height: auto; }
.hero-pastille h1 { margin: 0; font-size: clamp(1.9rem, 5vw, 3rem); color: var(--marine); }
.hero-pastille p { margin: 0; color: var(--bordeaux); font-weight: 500; }
@media (max-width: 560px) {
  .hero { min-height: 340px; }
  .hero-pastille { border-radius: 28px; padding: 1rem 1.25rem; gap: .75rem; }
  .hero-pastille img { width: 46px; }
  .hero-pastille .popcorn { display: none; }
}

.chiffres { background: var(--marine); color: #fff; padding: 2.5rem 1rem; }
.chiffres ul {
  list-style: none; margin: 0 auto; padding: 0; max-width: var(--largeur);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; text-align: center;
}
.chiffres li { font-family: var(--titre); font-size: clamp(1.8rem, 5vw, 3.4rem); line-height: 1.05; text-transform: uppercase; }
@media (max-width: 560px) { .chiffres ul { grid-template-columns: 1fr; } }

.bande-films { display: grid; grid-template-columns: repeat(4, 1fr); }
.bande-films a { text-decoration: none; }
.bande-films .film-affiche { border-radius: 0; aspect-ratio: 3 / 4; font-size: clamp(1.1rem, 2.4vw, 1.9rem); }
@media (max-width: 700px) { .bande-films { grid-template-columns: repeat(2, 1fr); } }

.accroche { max-width: 900px; margin: 0 auto; padding: 2.5rem 1rem; text-align: center; color: var(--marine); font-size: 1.25rem; }
.section-accueil { max-width: var(--largeur); margin: 0 auto; padding: 1rem 1rem 3rem; }
.etapes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; counter-reset: e; }
.etapes li { background: var(--blanc); border-radius: var(--rayon); padding: 1.25rem; box-shadow: var(--ombre); counter-increment: e; }
.etapes li::before { content: counter(e); font-family: var(--titre); font-size: 2.2rem; color: var(--bordeaux); display: block; }

/* ---------- Pages de contenu ---------- */
.article, .pilier { max-width: 860px; margin: 0 auto; padding: 1rem 1rem 3rem; }
.pilier { max-width: var(--largeur); }
.centre { text-align: center; padding-top: 3rem; }
.article-tete { border-bottom: 3px solid var(--bordeaux); margin-bottom: 1rem; }
.surtitre { margin: 0; font-weight: 600; text-transform: uppercase; font-size: .85rem; letter-spacing: .08em; }
.surtitre a { text-decoration: none; }
.chapo { font-size: 1.15rem; color: var(--marine); }
.ariane { max-width: var(--largeur); margin: 0 auto; padding: 1rem 1rem 0; font-size: .85rem; }
.ariane ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; padding: 0; }
.ariane li + li::before { content: "›"; margin-right: .3rem; color: var(--bordeaux); }
.ariane [aria-current] { color: #555; }

.films { display: grid; gap: 1rem; }
.film {
  display: grid; grid-template-columns: 120px 1fr; gap: 1.1rem; align-items: start;
  background: var(--blanc); border-radius: var(--rayon); padding: 1rem; box-shadow: var(--ombre);
}
.film p { margin: .2em 0 0; }
.film-meta { color: var(--bordeaux); font-size: .9rem; font-weight: 500; }
.film-affiche {
  aspect-ratio: 2 / 3; border-radius: 8px;
  display: flex; flex-direction: column; justify-content: flex-end; padding: .6rem;
  background:
    repeating-linear-gradient(90deg, var(--bordeaux) 0 14px, var(--bordeaux-fonce) 14px 28px);
  color: var(--creme); font-family: var(--titre); font-size: 1.05rem; line-height: 1.05; text-transform: uppercase;
  overflow: hidden; word-break: break-word;
}
.film:nth-child(3n+2) .film-affiche, .bande-films a:nth-child(2n) .film-affiche { background: linear-gradient(160deg, var(--marine), var(--marine-fonce)); }
.film:nth-child(3n) .film-affiche { background: linear-gradient(160deg, #23324d, var(--encre)); }
.film-affiche small { font-family: var(--texte); font-size: .75rem; opacity: .85; }
@media (max-width: 520px) { .film { grid-template-columns: 84px 1fr; gap: .8rem; } .film-affiche { font-size: .85rem; } }

.cta {
  display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center;
  margin: 2.5rem 0; padding: 1.25rem 1.5rem; border-radius: var(--rayon);
  background: var(--marine); color: #fff;
}
.cta p { margin: 0; }
.cta-titre { font-family: var(--titre); font-size: 1.5rem; text-transform: uppercase; }
@media (max-width: 640px) { .cta { grid-template-columns: 1fr; text-align: center; } .cta img { margin: 0 auto; } }
.bouton {
  display: inline-block; background: var(--bordeaux); color: var(--creme); text-decoration: none;
  font-weight: 600; padding: .75rem 1.3rem; border-radius: 999px; border: 0; font: inherit; font-weight: 600; cursor: pointer;
}
.bouton:hover { background: var(--creme); color: var(--bordeaux); }
.bouton.secondaire { background: transparent; color: var(--marine); box-shadow: inset 0 0 0 2px var(--marine); }

.voir-aussi ul, .rubrique ul { padding-left: 1.2rem; }
.cartes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.carte {
  display: flex; flex-direction: column; gap: .3rem; height: 100%;
  background: var(--blanc); border-radius: var(--rayon); padding: 1rem 1.1rem; box-shadow: var(--ombre);
  text-decoration: none; color: var(--encre); font-size: .92rem; border-top: 5px solid var(--bordeaux);
}
.carte:hover { border-top-color: var(--marine); }
.carte-titre { font-weight: 600; color: var(--marine); font-size: 1.05rem; }
.rubriques { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.rubrique { background: var(--blanc); border-radius: var(--rayon); padding: 0 1.25rem 1.25rem; box-shadow: var(--ombre); }
.rubrique h2 a { color: var(--marine); text-decoration: none; }
.lien-fleche { font-weight: 600; }
.lien-fleche::after { content: " →"; }

/* ---------- Questionnaire ---------- */
.quiz { max-width: 760px; margin: 0 auto; padding: 1rem 1rem 3rem; }
.quiz-etape { background: var(--blanc); border-radius: var(--rayon); padding: 1.5rem; box-shadow: var(--ombre); }
.quiz-etape[hidden] { display: none; }
.quiz fieldset { border: 0; padding: 0; margin: 0; }
.quiz legend { font-family: var(--titre); font-size: 1.8rem; color: var(--marine); text-transform: uppercase; margin-bottom: .8rem; }
.choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.choix label {
  display: flex; align-items: center; gap: .5rem; cursor: pointer;
  border: 2px solid var(--creme-fonce); border-radius: 12px; padding: .8rem 1rem; font-weight: 500;
}
.choix input { accent-color: var(--bordeaux); }
.choix label:has(input:checked) { border-color: var(--bordeaux); background: #fbe9ec; }
.quiz-progression { height: 8px; background: var(--creme-fonce); border-radius: 99px; margin: 0 0 1rem; overflow: hidden; }
.quiz-progression span { display: block; height: 100%; background: var(--bordeaux); width: 0; transition: width .25s; }
.quiz-actions { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.2rem; flex-wrap: wrap; }
.resultats .films { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.note { font-size: .9rem; color: #555; }

/* ---------- Formulaires ---------- */
.formulaire { display: grid; gap: 1rem; max-width: 560px; }
.formulaire label { font-weight: 500; display: grid; gap: .3rem; }
.formulaire input, .formulaire textarea, .formulaire select {
  font: inherit; padding: .65rem .8rem; border-radius: 10px; border: 2px solid var(--creme-fonce); background: #fff;
}

/* ---------- Pied de page ---------- */
.pied { background: var(--bordeaux); color: var(--creme); padding: 2.5rem 1rem 1rem; margin-top: 2rem; }
.pied a { color: var(--creme); }
.pied-grille { max-width: var(--largeur); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.pied ul { list-style: none; padding: 0; margin: 0; }
.pied-titre { font-family: var(--titre); font-size: 1.4rem; text-transform: uppercase; margin: 0 0 .4rem; }
.pied-bas { max-width: var(--largeur); margin: 2rem auto 0; font-size: .8rem; opacity: .8; }
@media (max-width: 700px) { .pied-grille { grid-template-columns: 1fr; gap: 1rem; } }
