/* Noto Sans auto-hébergée (pas d'appel à Google, RGPD) */
@font-face { font-family: "Noto Sans"; src: url("/assets/fonts/noto-sans-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans"; src: url("/assets/fonts/noto-sans-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Noto Sans"; src: url("/assets/fonts/noto-sans-900-normal.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Noto Sans"; src: url("/assets/fonts/noto-sans-900-italic.woff2") format("woff2"); font-weight: 900; font-style: italic; font-display: swap; }

:root {
  --jaune: #FEFF3B;
  --bleu: #0000FF;
  --ciel: #8CCBFF;
  --blanc: #FFFFFF;
  --marge: clamp(16px, 5vw, 56px);
  --max: 1100px;
  --rayon: 20px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bleu);
  color: var(--blanc);
  font-family: "Noto Sans", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
p { margin: 0 0 1em; }
h2, h3 { margin: 0; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--jaune); color: var(--bleu); padding: 8px 12px; z-index: 10; }

/* Fonds : le site alterne bleu et jaune */
.bleu { background: var(--bleu); color: var(--blanc); }
.jaune { background: var(--jaune); color: var(--bleu); }
section { padding: clamp(64px, 10vw, 120px) var(--marge); }
.wrap { max-width: var(--max); margin: 0 auto; }

/* Titres : Noto Sans très grasse, capitales */
.titre {
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(2.25rem, 1.5rem + 3.5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.01em;
  text-align: center;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.bleu .titre { color: var(--jaune); }
.titre--petit { font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem); text-align: left; margin-bottom: 28px; }

/* Boutons en pilule */
.pilule {
  display: inline-block;
  background: var(--jaune);
  color: var(--bleu);
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 0.9375rem;
  line-height: 1.2;
  padding: 12px 24px;
  border-radius: 999px;
  border: 3px solid var(--jaune);
  transition: background .15s, color .15s;
}
.pilule:hover { background: var(--bleu); color: var(--jaune); }
.pilule--bleue { background: var(--bleu); color: var(--jaune); border-color: var(--bleu); }
.pilule--bleue:hover { background: var(--jaune); color: var(--bleu); }
.boutons { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.boutons--centre { justify-content: center; }

/* En-tête */
.hero { padding: 16px var(--marge) clamp(56px, 8vw, 96px); text-align: center; }
.nav { display: flex; justify-content: space-between; align-items: center; max-width: var(--max); margin: 0 auto; gap: 16px; }
.nav-logo img { width: 44px; }
.nav-liens { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 24px; font-weight: 900; text-transform: uppercase; font-size: 0.875rem; }
.nav-liens a:not(.pilule) { text-decoration: none; color: var(--jaune); }
.nav-liens a:not(.pilule):hover { text-decoration: underline; }
.nav-liens .pilule { padding: 8px 18px; font-size: 0.875rem; }
.hero-titre { margin: clamp(24px, 5vw, 48px) auto 0; max-width: 780px; }
.hero-titre img { width: 100%; }
.hero-sous { font-weight: 600; font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem); color: var(--jaune); margin: 8px 0 0; }
.hero-prochaine {
  display: inline-block;
  margin-top: 28px;
  background: var(--jaune);
  color: var(--bleu);
  border-radius: var(--rayon);
  padding: 12px 22px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.35;
}
.hero-prochaine { min-height: 3.6em; visibility: hidden; }
.hero-prochaine.pret { visibility: visible; }
@media (max-width: 820px) { .hero-prochaine { min-height: 5em; } }
.hero-prochaine strong { font-weight: 900; text-transform: uppercase; display: block; font-size: 0.875rem; }
.hero-prochaine:hover { text-decoration: underline; }

/* Bandeaux photo pleine largeur */
.bandeau { height: clamp(240px, 42vw, 540px); overflow: hidden; background: var(--ciel); }
.bandeau img { width: 100%; height: 100%; object-fit: cover; }

/* Mantra */
.mantra { text-align: center; }
.sur-titre { font-weight: 900; text-transform: uppercase; font-size: 1.125rem; margin-bottom: 20px; }
.mantra-texte {
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  font-size: clamp(1.75rem, 1rem + 3.5vw, 3.5rem);
  line-height: 1.15;
  margin: 0 auto;
  max-width: 30ch;
  text-wrap: balance;
}

/* Principe */
.principe-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(32px, 5vw, 64px); text-align: center; }
.principe article img { height: clamp(160px, 18vw, 220px); width: auto; margin: 0 auto 24px; object-fit: contain; }
.principe h3 { color: var(--jaune); font-weight: 900; text-transform: uppercase; font-size: 1.25rem; line-height: 1.2; margin-bottom: 10px; }
.principe p { max-width: 30ch; margin: 0 auto; }

/* Agenda */
.evenements { list-style: none; padding: 0; margin: 0 auto; max-width: 980px; display: grid; gap: 20px; }
.evt {
  display: grid;
  grid-template-columns: 6.5rem 1fr minmax(0, 280px);
  align-items: center;
  gap: 28px;
  background: var(--bleu);
  color: var(--blanc);
  border-radius: var(--rayon);
  padding: 20px 20px 20px 28px;
}
.evt-bloc-date { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 0; line-height: 1; color: var(--jaune); font-weight: 900; text-transform: uppercase; }
.evt-jour, .evt-mois { font-size: 0.875rem; }
.evt-num { font-size: 3.75rem; margin: 4px 0; }
.evt-corps { display: flex; flex-direction: column; gap: 10px; }
.evt-titre { color: var(--jaune); font-weight: 900; font-size: clamp(1.25rem, 1rem + 0.8vw, 1.625rem); line-height: 1.2; }
.evt-titre a { text-decoration: none; }
.evt-lieu { margin: 0; font-weight: 600; }
.evt-media { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--ciel); }

.passes { margin: 48px auto 0; max-width: 980px; }
.passes summary { cursor: pointer; font-weight: 900; text-transform: uppercase; width: fit-content; }
.insta { text-align: center; margin: 48px 0 0; }
.vide { text-align: center; font-weight: 600; }

/* Asso + partenaires */
.asso-texte { max-width: 760px; margin: 0 auto; text-align: center; }
.asso-texte p { margin-left: auto; margin-right: auto; }
.asso-chapo { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem); line-height: 1.5; font-weight: 600; }
.soutiens { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; max-width: 900px; margin: 48px auto 0; }
.soutien { border-radius: var(--rayon); padding: 32px; color: var(--bleu); display: flex; flex-direction: column; align-items: flex-start; }
.soutien--jaune { background: var(--jaune); }
.soutien--blanc { background: var(--blanc); }
.soutien h3 { font-weight: 900; text-transform: uppercase; font-size: 1.375rem; line-height: 1.15; margin-bottom: 12px; }
.soutien p { flex: 1; }
.statuts { text-align: center; margin: 32px 0 0; }
.statuts a { color: var(--jaune); font-weight: 600; }
.logos { list-style: none; padding: 0; margin: 0 auto; max-width: 980px; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.logos li { width: clamp(96px, 28vw, 150px); }
.logos img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--blanc); border-radius: 14px; }
.logos a { display: block; border-radius: 14px; }
.logos a:hover img { outline: 4px solid var(--bleu); }

/* Contact */
.contact { text-align: center; }
.contact .titre { margin-bottom: 24px; }
.contact .titre { color: var(--jaune); }
.contact-intro { max-width: 46ch; margin: 0 auto; text-wrap: balance; font-weight: 600; font-size: 1.125rem; }

/* Pied */
.pied { display: flex; gap: 16px; align-items: center; justify-content: center; padding: 40px var(--marge); font-weight: 600; }
.pied img { width: 36px; }
.pied p { margin: 0; }
.pied { flex-wrap: wrap; }

@media (max-width: 820px) {
  .principe-grille { grid-template-columns: 1fr; }
  .nav-liens a:not(.pilule) { display: none; }
  .evt { grid-template-columns: 4.5rem 1fr; gap: 14px 16px; padding: 16px; }
  .evt-num { font-size: 2.75rem; }
  .evt-jour, .evt-mois { font-size: 0.75rem; }
  .evt-media { grid-column: 1 / -1; }
  .pied { flex-direction: column; text-align: center; }
}

/* Bandeau vidéo */
.bandeau--video { position: relative; }
.bandeau--video video { width: 100%; height: 100%; object-fit: cover; }
.video-pause { position: absolute; right: var(--marge); bottom: 16px; padding: 6px 16px; font-size: 0.8125rem; cursor: pointer; font-family: inherit; }

/* Formulaire de contact */
.formulaire { max-width: 560px; margin: 36px auto 8px; text-align: left; display: grid; gap: 6px; }
.formulaire label { font-weight: 600; margin-top: 10px; }
.formulaire input, .formulaire textarea {
  font: inherit; color: var(--bleu); background: var(--blanc);
  border: 3px solid var(--jaune); border-radius: 16px; padding: 12px 16px; width: 100%;
}
.formulaire textarea { resize: vertical; min-height: 140px; }
.formulaire input:focus-visible, .formulaire textarea:focus-visible { outline: 3px solid var(--jaune); outline-offset: 3px; }
.formulaire .envoyer { margin-top: 18px; width: 100%; padding: 14px; font-size: 1rem; cursor: pointer; font-family: inherit; }
.formulaire .envoyer:disabled { opacity: .6; cursor: wait; }
.form-statut { min-height: 1.6em; font-weight: 600; text-align: center; margin: 8px 0 0; }
.pot { position: absolute; left: -9999px; }

/* Newsletter */
.newsletter { max-width: 560px; margin: 56px auto 0; padding-top: 48px; border-top: 3px solid var(--jaune); }
.newsletter h3 { color: var(--jaune); font-weight: 900; text-transform: uppercase; font-size: 1.5rem; margin-bottom: 8px; }
.newsletter-ligne { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.newsletter input { flex: 1 1 220px; font: inherit; color: var(--bleu); background: var(--blanc); border: 3px solid var(--jaune); border-radius: 999px; padding: 10px 18px; }
.newsletter input:focus-visible { outline: 3px solid var(--jaune); outline-offset: 3px; }
.newsletter .pilule { cursor: pointer; font-family: inherit; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Historique des friteries */
.evenements-passes { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.passe { background: var(--blanc); color: var(--bleu); border-radius: 16px; overflow: hidden; padding-bottom: 14px; }
.passe img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--ciel); margin-bottom: 10px; }
.passe .evt-date { margin: 0 14px 4px; font-weight: 900; text-transform: uppercase; font-size: 0.75rem; }
.passe .evt-titre { margin: 0 14px; color: var(--bleu); font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
.passe-lieu { margin: 6px 14px 0; font-size: 0.8125rem; opacity: .8; }

/* Petites mentions sous les formulaires */
.petit { font-size: 0.8125rem; text-align: center; margin: 10px 0 0; opacity: .9; }

/* Page mentions légales */
.hero--court { padding-bottom: 16px; }
.legal { padding: clamp(48px, 8vw, 96px) var(--marge); }
.legal-texte { max-width: 720px; }
.legal-texte .titre { text-align: left; margin-bottom: 32px; }
.titre--legal { font-size: clamp(2rem, 1.4rem + 2.5vw, 3rem); margin-top: 72px; }
.legal h2:not(.titre) { font-weight: 900; text-transform: uppercase; font-size: 1.125rem; margin: 32px 0 8px; }
.legal h3 { font-weight: 900; font-size: 1.0625rem; margin: 24px 0 6px; }
.legal-maj { margin-top: 48px; font-size: 0.875rem; }

/* ---------- Animations (désactivées si l'utilisateur limite les animations) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Entrée du logo : il surgit puis se pose */
  .hero-titre img { animation: logo-pop 1s cubic-bezier(.2, 1.6, .4, 1) both; transform-origin: 50% 60%; }
  @keyframes logo-pop {
    0%   { opacity: 0; transform: scale(.35) rotate(-10deg); }
    55%  { opacity: 1; transform: scale(1.08) rotate(3deg); }
    75%  { transform: scale(.97) rotate(-1.5deg); }
    100% { transform: scale(1) rotate(0); }
  }
  .hero-sous, .hero-prochaine.pret { animation: apparait .5s .6s ease-out both; }
  @keyframes apparait { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

  /* Agenda : la prochaine friterie se trémousse, les cartes réagissent au survol */
  .evt { transition: transform .2s ease, box-shadow .2s ease; }
  .evt:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ciel); }
  .evt:first-child { animation: tremousse 6s ease-in-out 1.5s infinite; }
  .evt:first-child:hover { animation-play-state: paused; }
  @keyframes tremousse {
    0%, 86%, 100% { transform: rotate(0); }
    89% { transform: rotate(-1.2deg); }
    92% { transform: rotate(1.2deg); }
    95% { transform: rotate(-.6deg); }
  }
  .passe { transition: transform .2s ease; }
  .passe:hover { transform: translateY(-4px) rotate(-1deg); }

  /* Pluie de frites */
  .pluie { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50; }
  .frite {
    position: absolute; top: -70px; width: 11px; border-radius: 2px;
    background: var(--jaune); border: 2px solid var(--bleu); box-shadow: 3px 2px 0 var(--ciel);
    transform: rotate(var(--penche));
    animation-name: tombe; animation-timing-function: cubic-bezier(.3, .1, .7, 1); animation-fill-mode: forwards;
  }
  @keyframes tombe {
    to { transform: translateY(calc(100vh + 120px)) rotate(var(--rot)); }
  }
}

/* Ajouter à mon agenda */
.evt-ajout { align-self: flex-start; margin-top: 4px; font-weight: 900; text-transform: uppercase; font-size: 0.75rem; text-decoration: none; color: var(--bleu); background: var(--jaune); padding: 6px 14px; border-radius: 999px; }
.evt-ajout::before { content: "+ "; }
.evt-ajout:hover { background: var(--blanc); }
.abonnement { max-width: 640px; margin: 56px auto 0; text-align: center; }
.abonnement h3 { font-weight: 900; text-transform: uppercase; font-size: 1.25rem; margin-bottom: 8px; }
.abonnement .boutons { margin: 16px 0 0; }
.insta { margin-top: 28px; }
