/*
Theme Name: Les Gazelles en folie
Theme URI: https://lesgazelles3.laurent-angeli.fr/
Author: Les Gazelles en folie
Description: Thème bloc du site de l'association Les Gazelles en folie — Rallye Aïcha des Gazelles 2027, au profit de l'AEM. Blocs natifs uniquement.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lesgazelles
Tags: block-theme, full-site-editing, one-column, custom-colors
*/

/* ==========================================================================
   LES GAZELLES EN FOLIE — conversion de la maquette accueil (v4 validée)
   Registre verrouillé (règle 0′) : Titan One (titres) / Nunito (textes),
   rose #ff1493, turquoise #19bec8, jaune #ffd700, encre #1a1a1a,
   bandes pleine largeur, blocs arrondis 24-30 px, rotations légères,
   composition centrée.
   ========================================================================== */

:root {
  --rose: #ff1493;
  --rose-vif: #ff69b4;
  --turquoise: #19bec8;
  --turquoise-clair: #40e0d0;
  --jaune: #ffd700;
  --encre: #1a1a1a;
  --blanc: #ffffff;
  --ombre: 0 22px 44px rgba(26, 26, 26, 0.18);
  --rayon: 30px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Nunito", "Trebuchet MS", sans-serif;
  font-size: 18px;
  line-height: 1.65;
  color: var(--encre);
  background: var(--blanc);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; } /* height:auto obligatoire : sinon l'attribut height des blocs image l'emporte sur aspect-ratio */

a { color: inherit; text-decoration: none; }

.display,
h1, h2, h3, h4 {
  font-family: "Titan One", "Nunito", sans-serif;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

/* ---------- Adaptation Gutenberg : neutralisation des espacements ----------
   Couper à la source (theme.json blockGap "0px") et, en filet de sécurité,
   à spécificité NULLE — jamais en .wp-block-group > * qui écraserait
   toutes les marges des composants. */
:where(.wp-block-group) > :where(*),
:where(.wp-block-buttons) { margin-block: 0; }
figure.wp-block-image { margin: 0; }

/* ---------- En-tête ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--turquoise);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.08);
}

.site-header .inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo-badge {
  width: 100px;
  height: 100px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: width 0.25s ease, height 0.25s ease;
}

.logo-badge img { width: 100%; height: 100%; border-radius: 20px; }

.site-header.compacte .logo-badge { width: 60px; height: 60px; }

/* Navigation (core/navigation, className main-nav, sans menu superposé) */
.main-nav { margin-left: auto; }

.main-nav .wp-block-navigation__container {
  gap: 26px;
  align-items: center;
  justify-content: flex-end;
  font-weight: 800;
  color: var(--blanc);
  font-size: 17px;
}

.site-header .main-nav .wp-block-navigation-item__content {
  position: relative;
  padding: 6px 2px;
  color: var(--blanc);
}

.site-header .main-nav .wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 6px;
  border-radius: 6px;
  background: var(--jaune);
  transition: right 0.25s ease;
}

.site-header .main-nav .wp-block-navigation-item__content:hover::after { right: 0; }

/* ---------- Boutons (adaptation core/buttons + core/button) ----------
   La classe passe sur le conteneur div.wp-block-button : les styles visuels
   sont portés par le lien, le conteneur est neutralisé. */
.wp-block-button.bouton { display: inline-block; background: none; border: 0; padding: 0; border-radius: 0; box-shadow: none; transform: none; }

.wp-block-button.bouton .wp-block-button__link {
  display: inline-block;
  font-weight: 900;
  border-radius: 999px;
  padding: 14px 30px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  border: 0;
  text-decoration: none;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.wp-block-button.bouton .wp-block-button__link:active { transform: scale(0.97); }

.wp-block-button.bouton-jaune { transform: rotate(-1.5deg); }
.wp-block-button.bouton-jaune .wp-block-button__link { background: var(--jaune); color: var(--encre); box-shadow: 0 7px 0 #d4a900; }
.wp-block-button.bouton-jaune:hover { transform: rotate(0deg) translateY(-3px); }
.wp-block-button.bouton-jaune.droit { transform: none; }
.wp-block-button.bouton-jaune.droit:hover { transform: translateY(-3px); }

.wp-block-button.bouton-rose .wp-block-button__link { background: var(--rose); color: var(--blanc); box-shadow: 0 7px 0 #b80d6b; }
.wp-block-button.bouton-rose:hover { transform: translateY(-3px); }

.wp-block-button.bouton-turquoise .wp-block-button__link { background: var(--turquoise); color: var(--blanc); box-shadow: 0 7px 0 #0f8f97; }
.wp-block-button.bouton-turquoise:hover { transform: translateY(-3px); }

.wp-block-button.bouton-contour .wp-block-button__link { border: 4px solid var(--blanc); color: var(--blanc); background: transparent; }
.wp-block-button.bouton-contour .wp-block-button__link:hover { background: rgba(255, 255, 255, 0.14); }

/* ---------- Héros ---------- */

.hero {
  position: relative;
  background: var(--turquoise);
  padding: 84px 24px;
  text-align: center;
  color: var(--blanc);
}

/* Éclaboussures décoratives (SVG de la maquette -> pseudo-élément) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 900' preserveAspectRatio='xMidYMid slice'%3E%3Cpath d='M120,80 C180,20 320,10 360,90 C420,60 540,40 560,130 C660,90 780,120 790,210 C690,240 620,180 560,230 C480,290 380,250 330,180 C250,220 150,190 120,80 Z' fill='%23ff69b4' opacity='0.5'/%3E%3Cpath d='M1030,620 C1100,560 1240,570 1290,650 C1370,640 1430,700 1410,780 C1330,830 1240,790 1180,830 C1090,870 1000,820 990,740 C950,700 980,660 1030,620 Z' fill='%23ffd700' opacity='0.55'/%3E%3Cpath d='M60,560 C130,520 210,540 230,620 C300,610 360,660 340,730 C260,760 190,720 140,760 C70,750 30,660 60,560 Z' fill='%2340e0d0' opacity='0.6'/%3E%3Ccircle cx='1300' cy='140' r='70' fill='%23ff69b4' opacity='0.45'/%3E%3Ccircle cx='740' cy='60' r='34' fill='%23ffd700' opacity='0.7'/%3E%3Ccircle cx='420' cy='780' r='46' fill='%23ffffff' opacity='0.25'/%3E%3Ccircle cx='880' cy='520' r='26' fill='%23ffffff' opacity='0.3'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.ruban {
  display: inline-block;
  background: var(--jaune);
  color: var(--encre);
  font-family: "Titan One", sans-serif;
  font-size: clamp(15px, 2vw, 20px);
  padding: 10px 34px;
  border-radius: 999px;
  transform: rotate(-2deg);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.12);
  margin-bottom: 34px;
}

.hero h1 {
  font-size: clamp(46px, 9.5vw, 130px);
  color: var(--blanc);
  text-shadow:
    0.045em 0.045em 0 var(--rose),
    0.09em 0.09em 0 rgba(26, 26, 26, 0.22);
  margin-bottom: 26px;
  position: relative;
  z-index: 2;
}

.hero .accroche {
  max-width: 660px;
  margin: 0 auto 40px;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 800;
  position: relative;
  z-index: 2;
}

.hero .accroche em { color: var(--jaune); font-style: italic; }

.hero .actions {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
  margin-bottom: 64px;
}

/* Photo du héros qui déborde sur la section suivante */

.hero-cadre {
  position: relative;
  z-index: 3;
  width: min(1080px, 94vw);
  margin: 0 auto;
}

/* Cadre jaune décoratif (div.cadre-fond de la maquette -> pseudo-élément) */
.hero-cadre::before {
  content: "";
  position: absolute;
  inset: 22px -22px -22px 22px;
  background: var(--jaune);
  border-radius: var(--rayon);
  transform: rotate(1.6deg);
}

.hero-cadre .cadre-photo {
  position: relative;
  border-radius: var(--rayon);
  overflow: hidden;
  transform: rotate(-1.2deg);
  box-shadow: var(--ombre);
}

.hero-cadre img { width: 100%; }

/* Badges flottants — masqués à la demande du client (v4). */
.badge-flottant {
  position: absolute;
  z-index: 4;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  display: none;
  place-items: center;
  text-align: center;
  font-family: "Titan One", sans-serif;
  font-size: 17px;
  line-height: 1.2;
  padding: 12px;
}

.badge-flottant.petit { width: 110px; height: 110px; font-size: 15px; }

.badge-jaune { background: var(--jaune); color: var(--encre); box-shadow: 0 10px 0 rgba(0,0,0,0.12); }
.badge-rose { background: var(--rose); color: var(--blanc); box-shadow: 0 10px 0 rgba(0,0,0,0.14); }
.badge-blanc { background: var(--blanc); color: var(--encre); box-shadow: 0 10px 0 rgba(0,0,0,0.1); }

.badge-1 { top: -30px; left: 0; transform: rotate(-9deg); }
.badge-2 { top: -30px; left: max(40px, 6vw); transform: rotate(7deg); }
.badge-3 { top: -30px; left: max(200px, 11vw); transform: rotate(-6deg); }

/* ---------- Bande défilante ---------- */

.bande {
  background: var(--jaune);
  overflow: hidden;
  padding: 18px 0;
  transform: rotate(-1deg) scale(1.02);
  margin: -14px 0 10px;
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.06);
}

.bande .piste {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: defile 26s linear infinite;
  font-family: "Titan One", sans-serif;
  font-size: 24px;
  color: var(--encre);
  white-space: nowrap;
}

.bande .piste em { color: var(--rose); font-style: normal; }

@keyframes defile {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Sections communes ---------- */

.section {
  padding: 96px 24px;
  position: relative;
  overflow: hidden;
}

.section-blanc { background: var(--blanc); }
.section-turquoise { background: var(--turquoise); color: var(--blanc); }
.section-rose { background: var(--rose); color: var(--blanc); }

.sur-titre {
  font-family: "Titan One", sans-serif;
  font-size: 16px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.sur-titre.teinte-rose { color: var(--rose); }
.sur-titre.teinte-turquoise { color: var(--turquoise); }

.section h2 {
  font-size: clamp(38px, 6vw, 74px);
  margin-bottom: 26px;
}

.section .intro {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
  font-size: 20px;
}

.centrer { text-align: center; }

/* ---------- Le Rallye ---------- */

.grille-rallye {
  position: relative;
  max-width: 1120px;
  margin: 0 auto 70px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 34px;
  align-items: start;
}

.carte-photo {
  position: relative;
  border-radius: var(--rayon);
  overflow: hidden;
  padding: 1rem;
}

.carte-photo:nth-child(2) { padding: 2rem; }

.carte-photo figure { border-radius: var(--rayon); overflow: hidden; }
.carte-photo img { width: 100%; height: 100%; object-fit: cover; }

.grille-rallye .grande { transform: rotate(-1.6deg); }
.grille-rallye .petite { transform: rotate(2.4deg) translateY(24px); }

/* Cadres colorés décoratifs (div.cadre-fond -> pseudo-éléments) */
.carte-photo.fond-rose::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border-radius: var(--rayon);
  background: var(--rose);
  transform: rotate(1.6deg);
}

.carte-photo.fond-turquoise::before {
  content: "";
  position: absolute;
  inset: 2rem;
  border-radius: var(--rayon);
  background: var(--turquoise);
  transform: rotate(-3.1deg) translateY(17px);
}

.medailles {
  max-width: 980px;
  margin: 90px auto 0;
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.medaille {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  box-shadow: 0 12px 0 rgba(0, 0, 0, 0.1);
}

.medaille .chiffre {
  font-family: "Titan One", sans-serif;
  font-size: 40px;
  display: block;
}

.medaille .libelle { font-weight: 800; font-size: 16px; display: block; }

.medaille:nth-child(1) { background: var(--rose); color: var(--blanc); transform: rotate(-3deg); }
.medaille:nth-child(2) { background: var(--jaune); color: var(--encre); transform: translateY(-24px); }
.medaille:nth-child(3) { background: var(--turquoise); color: var(--blanc); transform: rotate(3deg); }

/* ---------- Bandeau photo pleine largeur ---------- */

.bandeau-photo {
  position: relative;
  height: 520px;
  overflow: hidden;
}

.bandeau-photo figure { height: 100%; }

.bandeau-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bandeau-photo .citation {
  position: absolute;
  inset: auto 24px 120px;
  text-align: center;
  color: var(--blanc);
  max-width: 900px;
  margin: 0 auto;
  left: 0;
  right: 0;
}

.bandeau-photo .citation .devise {
  font-family: "Titan One", sans-serif;
  font-size: clamp(28px, 4.6vw, 52px);
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.55);
}

.bandeau-photo .citation .source {
  display: inline-block;
  margin-top: 14px;
  background: var(--rose);
  border-radius: 999px;
  padding: 8px 24px;
  font-weight: 900;
}

/* ---------- Équipage ---------- */

.equipage {
  padding: 100px 24px 170px;
  background: var(--rose);
  color: var(--blanc);
  text-align: center;
  overflow: hidden;
  position: relative;
}

.equipage::before,
.equipage::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.equipage::before {
  width: 420px;
  height: 420px;
  top: -160px;
  left: -160px;
  background: var(--jaune);
  opacity: 0.28;
  transform: rotate(-8deg);
}

.equipage::after {
  width: 520px;
  height: 520px;
  bottom: -240px;
  right: -200px;
  background: var(--turquoise-clair);
  opacity: 0.22;
  transform: rotate(12deg);
}

.equipage .sur-titre { color: var(--jaune); position: relative; z-index: 2; }

.equipage h2 { font-size: clamp(38px, 6vw, 74px); margin-bottom: 16px; position: relative; z-index: 2; }

.equipage .sous-titre {
  font-size: 22px;
  font-weight: 800;
  font-style: italic;
  margin-bottom: 18px;
  position: relative;
  z-index: 2;
}

.equipage .intro-equipage {
  max-width: 700px;
  margin: 0 auto 64px;
  font-size: 18px;
  position: relative;
  z-index: 2;
}

.equipage .cartes {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 44px;
  position: relative;
  z-index: 2;
}

.carte-gazelle {
  position: relative;
  background: var(--blanc);
  color: var(--encre);
  border-radius: var(--rayon);
  padding: 18px 18px 34px;
  text-align: center;
}

.carte-gazelle:nth-child(1) { transform: rotate(-2.5deg); box-shadow: 0 18px 44px rgba(0,0,0,0.25); }
.carte-gazelle:nth-child(2) { transform: rotate(2.2deg); box-shadow: 0 18px 44px rgba(0,0,0,0.25); }

.carte-gazelle .photo {
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 24px;
}

.carte-gazelle .photo img { width: 100%; }

.carte-gazelle h3 { font-size: 32px; margin-bottom: 6px; }

.carte-gazelle:nth-child(1) h3 { color: var(--rose); }
.carte-gazelle:nth-child(2) h3 { color: var(--turquoise); }

.carte-gazelle .metier {
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: block;
}

.carte-gazelle > p { padding: 0 14px; font-size: 16.5px; }

.carte-gazelle .citation-gazelle {
  margin: 16px 16px 0;
  padding: 14px 18px;
  background: rgba(0, 180, 216, 0.08);
  border-radius: 18px;
  font-style: italic;
  font-weight: 700;
  font-size: 16px;
}

.carte-gazelle .role {
  display: inline-block;
  margin-top: 16px;
  background: var(--jaune);
  border-radius: 999px;
  padding: 6px 20px;
  font-weight: 900;
  font-size: 15px;
}

.bus-carte {
  position: relative;
  width: min(1020px, 94vw);
  margin: 80px auto 0;
  z-index: 2;
}

/* Fond jaune décoratif (div.fond -> pseudo-élément) */
.bus-carte::before {
  content: "";
  position: absolute;
  inset: -18px;
  background: var(--jaune);
  border-radius: var(--rayon);
  transform: rotate(1.4deg);
}

.bus-carte .photo {
  position: relative;
  border-radius: var(--rayon);
  overflow: hidden;
  transform: rotate(-1deg);
  box-shadow: var(--ombre);
}

.bus-carte .photo img { width: 100%; }

/* ---------- AEM ---------- */

.aem {
  background: var(--turquoise);
  color: var(--blanc);
  padding: 90px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.aem .encart {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  background: var(--blanc);
  color: var(--encre);
  border-radius: var(--rayon);
  padding: 44px 40px;
  transform: rotate(-1.2deg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.aem .encart .logo-aem { width: 170px; margin: 0 auto 20px; }

.aem h3 {
  font-size: 28px;
  margin-bottom: 12px;
  color: var(--rose);
}

.aem .encart > p { font-size: 16px; line-height: 1.65; margin-bottom: 16px; }

.aem .accroche-aem { font-size: 17px; font-weight: 700; }

.aem .engagement-aem { font-weight: 700; }

.stats-aem {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px 0 26px;
}

.stat-aem {
  width: 150px;
  border-radius: 22px;
  padding: 18px 10px 16px;
  display: grid;
  gap: 3px;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.08);
}

.stat-aem .stat-chiffre {
  font-family: "Titan One", sans-serif;
  font-size: 30px;
  display: block;
}

.stat-aem .stat-libelle { font-size: 12.5px; font-weight: 800; line-height: 1.3; }

.stat-aem:nth-child(1) { background: var(--rose); color: var(--blanc); transform: rotate(-2deg); }
.stat-aem:nth-child(2) { background: var(--turquoise); color: var(--blanc); transform: translateY(-8px); }
.stat-aem:nth-child(3) { background: var(--jaune); color: var(--encre); transform: rotate(2deg); }

.aem .encart .wp-block-buttons { margin-top: 10px; }

/* ---------- Pour nous aider ---------- */

.aide .cartes {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px;
  align-items: stretch;
}

.carte-aide {
  background: var(--blanc);
  border-radius: 28px;
  padding: 0 0 34px;
  box-shadow: var(--ombre);
  text-align: center;
  display: flex;
  flex-direction: column;
  position: relative;
}

.carte-aide:nth-child(1) { transform: rotate(-1.4deg); }
.carte-aide:nth-child(3) { transform: rotate(1.4deg); }

.carte-aide .bandeau {
  font-family: "Titan One", sans-serif;
  font-size: 30px;
  letter-spacing: 0.04em;
  padding: 26px 10px 18px;
  border-radius: 28px 28px 0 0;
}

.carte-aide:nth-child(1) .bandeau { background: var(--rose); color: var(--blanc); }
.carte-aide:nth-child(2) .bandeau { background: var(--turquoise); color: var(--blanc); }
.carte-aide:nth-child(3) .bandeau { background: var(--jaune); color: var(--encre); }

.carte-aide .contenu { padding: 22px 26px 0; flex: 1; }

.carte-aide .contenu > p { font-size: 16.5px; margin-bottom: 22px; }

/* Jauge de collecte (SVG de la maquette -> anneau CSS pur, éditable via
   la variable --jauge-remplissage : 170 € sur 3 000 € = 5,7 %). */
.jauge { margin: 4px auto 18px; position: relative; width: 150px; height: 150px; }

.jauge::before,
.jauge::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 17px), #000 calc(100% - 15px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 17px), #000 calc(100% - 15px));
}

.jauge::before { background: #ffd1e8; }

.jauge::after {
  background: conic-gradient(var(--rose) var(--jauge-remplissage, 5.7%), transparent 0);
  transform: rotate(-90deg);
}

.jauge .valeur {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
}

.jauge .valeur .chiffre-jauge {
  font-family: "Titan One", sans-serif;
  font-size: 26px;
  display: block;
  color: var(--rose);
}

.jauge .valeur .libelle-jauge { font-size: 13px; font-weight: 800; }

/* ---------- Partenaires ---------- */

.partenaires {
  background: var(--blanc);
  padding: 90px 24px 110px;
  text-align: center;
}

.partenaires h2 {
  font-size: clamp(38px, 6vw, 74px);
  margin-bottom: 26px;
}

.partenaires .grille-partenaires {
  max-width: 1100px;
  margin: 0 auto 44px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}

.carte-partenaire {
  position: relative;
  background: var(--blanc);
  border-radius: 24px;
  padding: 30px 20px 26px;
  box-shadow: var(--ombre);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.carte-partenaire:nth-child(odd) { transform: rotate(-1.6deg); }
.carte-partenaire:nth-child(even) { transform: rotate(1.8deg); }

.carte-partenaire .logo-partenaire {
  width: 132px;
  height: 132px;
  background: var(--blanc);
  border: 3px solid #f1f1f4;
  border-radius: 24px;
  display: grid;
  place-items: center;
  padding: 14px;
  margin-bottom: 6px;
  overflow: hidden;
}

.carte-partenaire .logo-partenaire img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.carte-partenaire h4 {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 400;
}

.carte-partenaire p { font-size: 14px; line-height: 1.5; color: #444; }

.carte-partenaire .badge-premier {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  background: var(--jaune);
  border-radius: 999px;
  padding: 5px 16px;
  font-family: "Titan One", sans-serif;
  font-size: 12px;
  box-shadow: 0 5px 0 rgba(0,0,0,0.1);
}

.carte-partenaire-cta {
  background: var(--turquoise);
  color: var(--blanc);
  border-radius: 24px;
  padding: 34px 26px;
  max-width: 640px;
  margin: 0 auto 44px;
  transform: rotate(-1deg);
  box-shadow: 0 14px 0 rgba(0,0,0,0.12);
}

.carte-partenaire-cta p {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 18px;
}

/* ---------- Vague de transition vers le pied de page ----------
   (SVG inline de la maquette -> arrière-plan en pseudo-élément) */
.pied {
  position: relative;
}

.pied::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -116px;
  height: 110px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 110' preserveAspectRatio='none'%3E%3Cpath d='M0,58 C170,18 350,10 520,38 C660,62 780,58 920,32 C1060,8 1230,16 1350,46 C1390,56 1420,60 1440,58 L1440,110 L0,110 Z' fill='%23ffd1e8' opacity='0.5'/%3E%3Cpath d='M0,88 C150,52 330,48 510,70 C670,88 810,80 980,58 C1130,40 1290,44 1440,78 L1440,110 L0,110 Z' fill='%231a1a1a'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
}

/* ---------- Pied de page ---------- */

.pied {
  background: var(--encre);
  color: var(--blanc);
  padding: 80px 24px 46px;
  text-align: center;
}

.pied .logos-duo {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 34px;
  margin-bottom: 40px;
}

.pied .logos-duo .logo-rallye { width: 200px; }

.pied .logos-duo .rond {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.pied .logos-duo .rond img { width: 108px; height: 108px; border-radius: 50%; }

/* Navigation de pied de page (core/navigation, className nav-pied) */
.pied .nav-pied { margin-bottom: 34px; }

.pied .nav-pied .wp-block-navigation__container {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  font-weight: 800;
}

.pied .nav-pied .wp-block-navigation-item__content { color: var(--blanc); }

.pied .nav-pied .wp-block-navigation-item__content:hover { color: var(--jaune); }

/* Bouton « Pour nous écrire » */
.pied .contact-boutons { margin-bottom: 34px; }

/* Réseaux sociaux (core/social-links, className reseaux) */
.pied .reseaux {
  margin-bottom: 34px;
  display: flex;
  gap: 16px;
  justify-content: center;
}

.pied .reseaux .wp-block-social-link { background: rgba(255, 255, 255, 0.12); }

.pied .reseaux .wp-block-social-link:hover { background: var(--turquoise); }

.pied .reseaux .wp-block-social-link-anchor {
  width: 52px;
  height: 52px;
  padding: 14px;
}

.pied .reseaux svg { width: 24px; height: 24px; fill: var(--blanc); }

.pied .mentions {
  display: block;
  opacity: 0.72;
  font-size: 14.5px;
  line-height: 1.9;
}

.pied .soutien {
  display: inline-block;
  margin-top: 18px;
  color: var(--jaune);
  font-weight: 800;
}

/* ---------- Focus et mouvement ---------- */

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--jaune);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Variantes affichées par bascule de classe, jamais par injection JS. */
.est-cachee { display: none; }
.est-cachee.est-actif { display: block; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .grille-rallye { grid-template-columns: 1fr; }
  .grille-rallye .petite { transform: rotate(2.4deg) translateY(0); }
  .equipage .cartes { grid-template-columns: 1fr; max-width: 460px; }
  .aide .cartes { grid-template-columns: 1fr; max-width: 460px; }
  .partenaires .grille-partenaires { grid-template-columns: repeat(2, 1fr); }
  .badge-flottant { width: 96px; height: 96px; font-size: 13px; }
  .badge-flottant.petit { width: 84px; height: 84px; font-size: 12px; }
  .bandeau-photo { height: 420px; }
  .site-header .inner { flex-wrap: wrap; gap: 12px; padding: 12px 18px; }
  .main-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }
  .main-nav .wp-block-navigation__container {
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 15px;
  }
  .site-header .inner .wp-block-buttons { margin-left: auto; }
}
