/* Confrérie du Sapeur — direction « Bannière & BD » */

@font-face { font-family: "Luckiest Guy"; src: url("/fonts/luckiest-guy-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/fonts/atkinson-hyperlegible-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/fonts/atkinson-hyperlegible-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/fonts/atkinson-hyperlegible-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bleu: #1d3fa6;
  --bleu-nuit: #12286b;
  --soleil: #f5c842;
  --soleil-pale: #fbe7a1;
  --rouge: #c8202a;
  --vert: #1d6b35;
  --encre: #111;
  --creme: #fffbf0;
  --trait: 3px solid var(--encre);
  --ombre: 6px 6px 0 var(--encre);
  --titre: "Luckiest Guy", Impact, sans-serif;
  --texte: "Atkinson Hyperlegible", system-ui, sans-serif;
  --largeur: 70rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body { margin: 0; background: var(--creme); color: var(--encre); font: 1.0625rem/1.6 var(--texte); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--bleu); font-weight: 700; text-underline-offset: .2em; }
a:hover { color: var(--rouge); }
:focus-visible { outline: 3px solid var(--rouge); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--titre); font-weight: 400; line-height: 1.05; letter-spacing: .02em; margin: 0 0 .5em; }
h2 { font-size: clamp(2rem, 6vw, 3.2rem); }
h3 { font-size: 1.6rem; }
.wrap { max-width: var(--largeur); margin: 0 auto; padding: 0 1rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: #fff; padding: .5rem 1rem; }

/* Cartouche façon bannière (le ruban jaune) */
.ruban {
  display: inline-block; background: var(--soleil); color: var(--encre);
  font: 400 1rem var(--titre); letter-spacing: .06em; padding: .35rem 1.1rem .2rem;
  border: var(--trait); transform: rotate(-2deg); margin-bottom: .9rem;
}
.case { background: #fff; border: var(--trait); box-shadow: var(--ombre); }
.trame { /* points de trame d'imprimerie */
  background-image: radial-gradient(rgba(0,0,0,.13) 1.2px, transparent 1.3px);
  background-size: 9px 9px;
}

/* En-tête */
header { position: sticky; top: 0; z-index: 5; background: var(--bleu); border-bottom: var(--trait); }
header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 4rem; }
.marque { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: #fff; }
.marque img { width: 3.2rem; border: 2px solid var(--encre); box-shadow: 3px 3px 0 var(--encre); }
.marque span { font: 400 1.25rem/1 var(--titre); letter-spacing: .04em; color: var(--soleil); }
nav ul { list-style: none; margin: 0; padding: 0; }
nav a { text-decoration: none; color: #fff; font-weight: 700; }
nav a:hover { color: var(--soleil); }
.burger {
  background: var(--soleil); border: var(--trait); box-shadow: 3px 3px 0 var(--encre);
  font: 400 1rem var(--titre); letter-spacing: .05em; padding: .4rem .7rem .25rem; cursor: pointer;
}
@media (max-width: 52rem) {
  nav ul { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bleu-nuit); border-bottom: var(--trait); padding: .5rem 1rem 1rem; }
  nav ul.ouvert { display: block; }
  nav li a { display: block; padding: .7rem 0; border-bottom: 1px solid rgba(255,255,255,.2); }
}
@media (min-width: 52rem) {
  .burger { display: none; }
  nav ul { display: flex; gap: 1.5rem; }
}

/* Accueil : soleil rayonnant derrière la bannière */
.hero {
  position: relative; overflow: hidden; color: #fff; padding: 3rem 0 3.5rem;
  background:
    repeating-conic-gradient(from 0deg at 72% 45%, rgba(245,200,66,.18) 0 7deg, transparent 7deg 18deg),
    var(--bleu);
  border-bottom: var(--trait);
}
.hero .wrap { display: grid; gap: 2.5rem; align-items: center; position: relative; }
.hero h1 {
  font-size: clamp(2.6rem, 10vw, 5rem); color: var(--soleil);
  text-shadow: 3px 3px 0 var(--encre), -1px -1px 0 var(--encre), 1px -1px 0 var(--encre), -1px 1px 0 var(--encre);
}
.hero h1 small { display: block; font-size: .5em; color: #fff; }
.bulle {
  position: relative; background: #fff; color: var(--encre); border: var(--trait); border-radius: 1.5rem;
  padding: 1rem 1.25rem; font-size: 1.15rem; font-style: italic; max-width: 30rem; box-shadow: var(--ombre);
}
.bulle::after { /* queue de la bulle */
  content: ""; position: absolute; left: 2.5rem; bottom: -1.2rem; width: 1.6rem; height: 1.6rem;
  background: #fff; border-right: var(--trait); border-bottom: var(--trait);
  transform: skewX(35deg) rotate(10deg);
}
.boutons { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.25rem; }
.bouton {
  display: inline-block; padding: .75rem 1.3rem .55rem; font: 400 1.15rem var(--titre); letter-spacing: .04em;
  text-decoration: none; color: var(--encre); background: var(--soleil); border: var(--trait);
  box-shadow: 4px 4px 0 var(--encre); transition: transform .1s, box-shadow .1s; cursor: pointer;
}
.bouton:hover { color: var(--encre); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--encre); }
.bouton.rouge { background: var(--rouge); color: #fff; }
.bouton[disabled] { opacity: .6; cursor: wait; transform: none; }
.hero .case { max-width: 21rem; margin: 0 auto; transform: rotate(2deg); padding: .5rem; }
@media (min-width: 52rem) { .hero .wrap { grid-template-columns: 1.3fr 1fr; } }

section { padding: 3.5rem 0; }

/* Bienvenue */
.intro { display: grid; gap: 2rem; }
.intro .lead { font-size: 1.15rem; }
.vignettes { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.vignette { padding: 1.4rem; }
.vignette h3 { color: var(--bleu); }
.vignette.jaune { background: var(--soleil-pale); }
.portrait { max-width: 16rem; margin: 0 auto; padding: .4rem; transform: rotate(-2.5deg); }
@media (min-width: 40rem) { .vignettes { grid-template-columns: 1fr 1fr; } }
@media (min-width: 52rem) { .intro { grid-template-columns: 2fr 1fr; align-items: start; } }

/* Planche de BD : les trois histoires */
.planche { background: var(--rouge); border-top: var(--trait); border-bottom: var(--trait); }
.planche h2 { color: #fff; text-shadow: 3px 3px 0 var(--encre); }
.histoires { display: grid; gap: 1.75rem; margin-top: 1.5rem; }
.histoire { display: flex; flex-direction: column; }
.histoire img { aspect-ratio: 4/3; object-fit: cover; object-position: 50% 35%; width: 100%; border-bottom: var(--trait); }
.histoire .corps { padding: 1.2rem 1.4rem 1.4rem; }
.histoire:nth-child(2) { transform: rotate(-1deg); }
.histoire:nth-child(odd) { transform: rotate(.8deg); }
details summary {
  cursor: pointer; display: inline-block; margin-top: .4rem; list-style: none;
  font: 400 1rem var(--titre); letter-spacing: .05em; background: var(--bleu); color: #fff;
  padding: .45rem .9rem .3rem; border: var(--trait); box-shadow: 3px 3px 0 var(--encre);
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: " +"; }
details[open] summary::after { content: " –"; }
details h4 { font: 700 1.05rem var(--texte); color: var(--rouge); margin: 1.2rem 0 .3rem; text-transform: uppercase; letter-spacing: .04em; }
@media (min-width: 52rem) { .histoires { grid-template-columns: repeat(3, 1fr); align-items: start; } }

/* Confrérie */
.photo-groupe { margin: 1.5rem auto 2.5rem; max-width: 54rem; padding: .5rem; transform: rotate(-.6deg); }
.colonnes { display: grid; gap: 2rem; }
@media (min-width: 52rem) { .colonnes { grid-template-columns: 1fr 1fr; } }
.maxime { margin-top: 1.5rem; }
.objectifs { list-style: none; padding: 0; margin: 0; counter-reset: o; }
.objectifs li { counter-increment: o; display: flex; gap: .8rem; align-items: baseline; padding: .35rem 0; }
.objectifs li::before {
  content: counter(o); font: 400 1.1rem/1 var(--titre); flex: 0 0 2rem; height: 2rem; padding-top: .45rem;
  text-align: center; background: var(--soleil); border: 2px solid var(--encre); border-radius: 50%;
}
.membres { display: grid; gap: 1.75rem; margin-top: 2.5rem; }
@media (min-width: 40rem) { .membres { grid-template-columns: repeat(3, 1fr); } }
.membre { padding: 1.25rem; text-align: center; }
.membre img { width: 8rem; height: 8rem; border-radius: 50%; object-fit: cover; margin: 0 auto .75rem; border: var(--trait); }
.membre .titre { display: block; font: 400 1.1rem var(--titre); letter-spacing: .03em; color: var(--rouge); }
.membre strong { font-size: 1.2rem; }
.membre p { font-size: .95rem; margin: .5rem 0 0; }

/* Contact */
.contact { background: var(--bleu); color: #fff; border-top: var(--trait); }
.contact h2 { color: var(--soleil); text-shadow: 3px 3px 0 var(--encre); }
.contact .case { color: var(--encre); padding: 1.5rem 1.25rem; max-width: 42rem; margin: 1.5rem auto 0; }
form { display: grid; gap: 1rem; }
label { font-weight: 700; display: block; margin-bottom: .3rem; }
input, textarea { width: 100%; font: inherit; padding: .7rem .8rem; border: var(--trait); background: var(--creme); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--rouge); background: #fff0f0; }
textarea { min-height: 9rem; resize: vertical; }
.piege { position: absolute; left: -5000px; }
#turnstile { min-height: 65px; }
form .bouton { justify-self: start; }
.statut { min-height: 1.5em; font-weight: 700; margin: 0; }
.statut.ok { color: var(--vert); }
.statut.erreur { color: var(--rouge); }

footer { background: var(--encre); color: #fff; text-align: center; padding: 2rem 0; font-size: .95rem; }
footer a { color: var(--soleil); }

/* Page simple (404, confirmation d'envoi sans JavaScript) */
.page-simple { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 3rem 1rem; }
.page-simple .case { padding: 2rem 1.5rem; max-width: 32rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bouton { transition: none; }
}
