/* ============================================================
   Sociologues Sans Frontières — Design System
   Palette extraite du logo : bleu globe, vert espoir, rouge accent
   Typo : Fraunces (titres) + Figtree (texte)
   ============================================================ */

:root {
  /* Couleurs — extraites du logo SSF */
  --bleu: #1B5FAE;
  --bleu-fonce: #0F3D75;
  --bleu-pale: #E7F0FA;
  --vert: #217A3C;
  --vert-fonce: #15522A;
  --vert-pale: #E6F3EA;
  --rouge: #C0392B;
  --rouge-fonce: #96271B;
  --rouge-pale: #FAECEA;
  --papier: #FBF8F2;
  --blanc: #FFFFFF;
  --encre: #22282F;
  --encre-douce: #4E5866;
  --ligne: #E4DDD0;

  /* Typographie */
  --font-titre: "Fraunces", Georgia, serif;
  --font-texte: "Figtree", "Segoe UI", system-ui, sans-serif;

  /* Échelle d'espacement (base 8) */
  --s1: 0.5rem;
  --s2: 1rem;
  --s3: 1.5rem;
  --s4: 2rem;
  --s5: 3rem;
  --s6: 4.5rem;
  --s7: 6rem;

  --radius: 14px;
  --radius-lg: 22px;
  --ombre: 0 2px 10px rgba(34, 40, 47, 0.07);
  --ombre-haute: 0 12px 32px rgba(15, 61, 117, 0.14);
  --transition: 200ms ease-out;
  --largeur-max: 72rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
/* Filet anti-debordement horizontal (stabilite mobile). clip n'affecte pas le sticky. */
html, body { overflow-x: clip; }

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  font-family: var(--font-texte);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--encre);
  background: var(--papier);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

/* Grain de papier — texture globale très discrète (imprimé artisanal) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.032;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160"><filter id="g"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2"/></filter><rect width="160" height="160" filter="url(%23g)"/></svg>');
}

h1, h2, h3, h4 {
  font-family: var(--font-titre);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 var(--s2);
  color: var(--encre);
}

h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); }

p { margin: 0 0 var(--s2); }
p:last-child { margin-bottom: 0; }

a { color: var(--bleu); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--bleu-fonce); }

:focus-visible {
  outline: 3px solid var(--bleu);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--s2); top: -100px;
  background: var(--bleu-fonce); color: #fff;
  padding: var(--s1) var(--s2); border-radius: 8px;
  z-index: 200; transition: top var(--transition);
}
.skip-link:focus { top: var(--s2); color: #fff; }

/* ---------- Bande tissée (signature — pagne togolais) ---------- */
.tisse {
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--bleu) 0 34px,
    var(--papier) 34px 38px,
    var(--vert) 38px 72px,
    var(--papier) 72px 76px,
    var(--rouge) 76px 96px,
    var(--papier) 96px 100px
  );
  border: 0;
  margin: 0;
}

/* ---------- Structure ---------- */
.conteneur {
  max-width: var(--largeur-max);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.section { padding-block: clamp(3rem, 7vw, 5.5rem); position: relative; overflow: hidden; }
.section > .conteneur { position: relative; z-index: 1; }

/* Blanc légèrement dégradé vers le papier — la page respire au lieu d'alterner des aplats */
.section--blanc { background: linear-gradient(180deg, var(--blanc) 0%, #FDFAF4 100%); }

/* Bleu profond éclairé par deux lueurs — encre sérigraphiée plutôt qu'aplat */
.section--bleu {
  background:
    radial-gradient(ellipse at 12% -20%, rgba(255, 255, 255, 0.075), transparent 52%),
    radial-gradient(ellipse at 95% 120%, rgba(33, 122, 60, 0.34), transparent 55%),
    linear-gradient(175deg, #114484 0%, var(--bleu-fonce) 70%);
  color: #F2F6FB;
}
.section--bleu h2, .section--bleu h3 { color: #fff; }

.section--vert-pale {
  background:
    radial-gradient(ellipse at 88% 0%, rgba(255, 255, 255, 0.6), transparent 50%),
    linear-gradient(180deg, #EBF5EE 0%, #E0EEE4 100%);
}

/* Filigrane typographique — une lettre géante en creux derrière la section */
.section--filigrane { overflow: hidden; }
.section--filigrane::before {
  content: attr(data-lettre);
  position: absolute;
  left: -0.08em; bottom: -0.42em;
  font-family: var(--font-titre);
  font-weight: 700;
  font-size: clamp(14rem, 30vw, 24rem);
  line-height: 1;
  color: var(--bleu);
  opacity: 0.045;
  pointer-events: none;
  user-select: none;
}
.section--filigrane > .conteneur { position: relative; }

.section-entete { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }

.surtitre {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vert);
  margin-bottom: var(--s1);
}
.section--bleu .surtitre { color: #9CC8A8; }
.surtitre--rouge { color: var(--rouge); }
.surtitre--bleu { color: var(--bleu); }

/* Fil tissé sous chaque surtitre — le motif signature en miniature */
.surtitre::after {
  content: "";
  display: block;
  width: 54px;
  height: 3px;
  margin-top: 7px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--bleu) 0 34%, var(--vert) 34% 68%, var(--rouge) 68% 100%);
}
.centre .surtitre::after, .section-entete.centre .surtitre::after { margin-inline: auto; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  white-space: nowrap;
  font-family: var(--font-texte);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
}
.btn { transition: transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1), background var(--transition), color var(--transition), box-shadow var(--transition); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(0.97); transition-duration: 90ms; }
.btn svg { flex-shrink: 0; transition: transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.btn--don:hover svg { transform: scale(1.18) rotate(-6deg); }

/* Bouton "Faire un don" — finition premium, animee, responsive */
.btn--don {
  color: #fff;
  background-color: var(--rouge);
  background-image: linear-gradient(135deg, #D0432F 0%, #C0392B 48%, #A62D20 100%);
  box-shadow: 0 6px 18px rgba(192, 57, 43, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn--don::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.30) 50%, transparent 75%);
  transform: translateX(-130%);
  transition: transform 700ms ease;
}
.btn--don:hover::after { transform: translateX(130%); }
.btn--don:hover {
  color: #fff;
  background-image: linear-gradient(135deg, #C0392B 0%, #A62D20 55%, #85231A 100%);
  box-shadow: 0 12px 26px rgba(192, 57, 43, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

/* Halo d'attention discret sur le CTA de l'en-tete (coupe par reduced-motion) */
@keyframes lueur-don {
  0%, 100% { box-shadow: 0 6px 18px rgba(192, 57, 43, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
  50%      { box-shadow: 0 8px 24px rgba(192, 57, 43, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.20); }
}
.entete-actions .btn--don { flex: 0 0 auto; animation: lueur-don 3.4s ease-in-out infinite; }
.entete-actions .btn--don:hover { animation: none; }

.btn--primaire { background: var(--bleu); color: #fff; }
.btn--primaire:hover { background: var(--bleu-fonce); color: #fff; }

.btn--contour { border-color: var(--bleu); color: var(--bleu); background: transparent; }
.btn--contour:hover { background: var(--bleu-pale); color: var(--bleu-fonce); }

.section--bleu .btn--contour, .cta-final .btn--contour { border-color: #fff; color: #fff; }
.section--bleu .btn--contour:hover, .cta-final .btn--contour:hover { background: rgba(255,255,255,0.14); color: #fff; }

/* ---------- En-tête / navigation ---------- */
.entete {
  position: sticky;
  top: 0;
  z-index: 100;
  /* Fond solide par défaut : garantit que le contenu ne transparaît jamais
     à travers la barre lors du défilement, même sans support du flou. */
  background: var(--papier);
  border-bottom: 1px solid var(--ligne);
}
/* Le flou translucide ne s'active que si le navigateur le supporte vraiment. */
@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .entete {
    background: rgba(251, 248, 242, 0.85);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}

.entete-barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  min-height: 74px;
}

.marque {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  text-decoration: none;
  color: var(--encre);
}
.marque img {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--blanc);
  box-shadow: var(--ombre);
}
.marque-nom {
  font-family: var(--font-titre);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.15;
}

/* Sur grand ecran (nav horizontale) : marque sur une ligne, en-tete elargi */
@media (min-width: 1281px) {
  .entete-barre { max-width: min(94vw, 1240px); }
  .marque { flex-shrink: 0; }
  .marque-nom { white-space: nowrap; }
}
.marque-nom small {
  display: block;
  margin-top: 0.22rem;
  font-family: var(--font-texte);
  font-weight: 600;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--encre-douce);
}

.nav-principale ul {
  display: flex;
  align-items: center;
  gap: clamp(0.1rem, 0.7vw, 0.5rem);
  list-style: none;
  margin: 0; padding: 0;
}
.nav-principale a {
  display: inline-block;
  padding: 0.5rem 0.62rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.93rem;
  white-space: nowrap;
  color: var(--encre);
  text-decoration: none;
  background-image: linear-gradient(var(--vert), var(--vert));
  background-repeat: no-repeat;
  background-size: 0% 2px;
  background-position: 0.75rem calc(100% - 0.35rem);
  transition: background-size 260ms ease-out, color var(--transition);
}
.nav-principale a:hover {
  color: var(--vert-fonce);
  background-size: calc(100% - 1.5rem) 2px;
}
.nav-principale a[aria-current="page"] {
  color: var(--bleu-fonce);
  box-shadow: inset 0 -3px 0 var(--vert);
  border-radius: 8px 8px 0 0;
}

.entete-actions { display: flex; align-items: center; gap: var(--s1); }
.entete-actions .btn { min-height: 44px; padding: 0.5rem 1.2rem; font-size: 0.95rem; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px; height: 48px;
  padding: 12px;
  background: none;
  border: 1px solid var(--ligne);
  border-radius: 10px;
  cursor: pointer;
}
.burger span {
  display: block; height: 2.5px; width: 100%;
  background: var(--encre); border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 1280px) {
  .burger { display: flex; }
  .nav-principale {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--blanc);
    border-bottom: 1px solid var(--ligne);
    box-shadow: var(--ombre-haute);
    display: none;
  }
  .nav-principale.ouverte { display: block; }
  .nav-principale ul { flex-direction: column; align-items: stretch; gap: 0; padding: var(--s1) 0; }
  .nav-principale a { display: block; padding: 0.9rem 1.4rem; font-size: 1.05rem; }
  .nav-principale a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--vert); border-radius: 0; }
  .entete-actions .btn--contour { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 85% 10%, rgba(27, 95, 174, 0.10), transparent 55%),
    radial-gradient(ellipse at 5% 90%, rgba(33, 122, 60, 0.10), transparent 50%),
    var(--papier);
  padding-block: clamp(3.5rem, 9vw, 7rem);
}

/* Filigrane de lettres — l'alphabétisation rendue visible */
.hero::before {
  content: "A a É k Ɔ m F ɖ B ŋ";
  position: absolute;
  inset: -2rem 0 auto auto;
  font-family: var(--font-titre);
  font-weight: 700;
  font-size: clamp(6rem, 16vw, 12rem);
  line-height: 1.05;
  letter-spacing: 0.15em;
  color: var(--bleu);
  opacity: 0.055;
  white-space: normal;
  word-break: break-all;
  pointer-events: none;
  user-select: none;
  max-width: 55%;
  text-align: right;
}

.hero-grille {
  position: relative;
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 880px) {
  .hero-grille { grid-template-columns: 1.15fr 0.85fr; }
}

.hero h1 { margin-bottom: var(--s3); }
/* Surligneur qui se trace au chargement, comme un trait de crayon */
.hero h1 em {
  font-style: normal;
  color: var(--vert);
  background-image: linear-gradient(rgba(33, 122, 60, 0.18), rgba(33, 122, 60, 0.18));
  background-repeat: no-repeat;
  background-position: 0 78%;
  background-size: 0% 0.32em;
  transition: background-size 650ms cubic-bezier(0.25, 0.1, 0.25, 1);
}
.hero h1 em:nth-of-type(2) { transition-delay: 350ms; }
.hero h1.trace em { background-size: 100% 0.32em; }
@media (prefers-reduced-motion: reduce) {
  .hero h1 em { background-size: 100% 0.32em; }
}

.hero-texte p.grand {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--encre-douce);
  max-width: 34em;
}

.hero-boutons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s4);
}
/* Mobile conçu : les CTA deviennent des barres pleine largeur, faciles au pouce */
@media (max-width: 560px) {
  .hero-boutons .btn { flex: 1 1 100%; }
}

.hero-note {
  margin-top: var(--s3);
  font-size: 0.9rem;
  color: var(--encre-douce);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-note svg { color: var(--vert); flex-shrink: 0; }

/* ---------- Cadre photo (placeholders à remplacer) ---------- */
.cadre-photo {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--ombre-haute);
  aspect-ratio: 4 / 3;
  background: linear-gradient(160deg, var(--bleu) 0%, var(--bleu-fonce) 60%, var(--vert-fonce) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cadre-photo--carre { aspect-ratio: 1; }
.cadre-photo--large { aspect-ratio: 16 / 9; }
.cadre-photo--vert { background: linear-gradient(160deg, var(--vert) 0%, var(--vert-fonce) 100%); }
.cadre-photo--rouge { background: linear-gradient(160deg, var(--rouge) 0%, var(--rouge-fonce) 100%); }

/* Vraie photo dans le cadre : plein cadre, recadrée proprement */
.cadre-photo > img.photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cadre-photo .motif {
  position: absolute; inset: 0;
  opacity: 0.15;
  background-image: radial-gradient(circle at 2px 2px, #fff 1.5px, transparent 0);
  background-size: 26px 26px;
}
.cadre-photo .legende-photo {
  position: relative;
  color: #fff;
  text-align: center;
  padding: var(--s3);
  font-weight: 600;
  font-size: 0.95rem;
}
.cadre-photo .legende-photo svg { margin-inline: auto; margin-bottom: 0.6rem; opacity: 0.9; }
.cadre-photo .legende-photo small {
  display: block; font-weight: 400; opacity: 0.75; font-size: 0.8rem; margin-top: 0.3rem;
}

/* ---------- Cartes ---------- */
.grille {
  display: grid;
  gap: clamp(1.2rem, 2.5vw, 1.8rem);
}
.grille--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.grille--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grille--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }

.carte {
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: var(--ombre);
  transition: transform var(--transition), box-shadow var(--transition);
}
a.carte { text-decoration: none; color: inherit; display: block; }
.carte:hover { transform: translateY(-4px); box-shadow: var(--ombre-haute); }

.carte-icone {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--s2);
  background: var(--bleu-pale);
  color: var(--bleu);
  transition: transform 380ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.carte:hover .carte-icone { transform: rotate(-5deg) scale(1.06); }
.carte-icone--vert { background: var(--vert-pale); color: var(--vert); }
.carte-icone--rouge { background: var(--rouge-pale); color: var(--rouge); }

.carte h3 { margin-bottom: 0.5rem; }
.carte p { color: var(--encre-douce); font-size: 0.97rem; }

.carte .lien-fleche {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: var(--s2);
  font-weight: 700; font-size: 0.92rem;
  color: var(--vert-fonce);
}
.carte:hover .lien-fleche { color: var(--vert); }
.lien-fleche svg { transition: transform 260ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.carte:hover .lien-fleche svg { transform: translateX(5px); }

/* ---------- Chiffres d'impact ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  text-align: center;
}
.stat .valeur {
  font-family: var(--font-titre);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1;
  color: var(--bleu-fonce);
  display: block;
}
.section--bleu .stat .valeur { color: #fff; }
.stat .valeur .unite { font-size: 0.55em; color: var(--vert); }
.section--bleu .stat .valeur .unite { color: #8FCF9F; }
.stat .intitule {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--encre-douce);
}
.section--bleu .stat .intitule { color: #B9CBE0; }

/* ---------- Témoignages ---------- */
.temoignage {
  position: relative;
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-left: 5px solid var(--vert);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 1.8rem);
  box-shadow: var(--ombre);
  overflow: hidden;
}
/* Guillemet fantôme — la voix avant le texte */
.temoignage::before {
  content: "«";
  position: absolute;
  top: -1.2rem; right: 0.6rem;
  font-family: var(--font-titre);
  font-weight: 700;
  font-size: 6.5rem;
  line-height: 1;
  color: var(--vert);
  opacity: 0.10;
  pointer-events: none;
}
.temoignage blockquote, .temoignage figcaption { position: relative; }
.temoignage blockquote {
  margin: 0 0 var(--s2);
  font-family: var(--font-titre);
  font-size: 1.08rem;
  font-style: italic;
  color: var(--encre);
}
.temoignage figcaption {
  display: flex; align-items: center; gap: 0.7rem;
  font-size: 0.9rem; color: var(--encre-douce);
}
.temoignage .avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff;
  background: var(--bleu);
}
.temoignage .avatar--vert { background: var(--vert); }
.temoignage .avatar--rouge { background: var(--rouge); }
.temoignage figcaption strong { color: var(--encre); display: block; }

/* ---------- Bandeau CTA ---------- */
.cta-final {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--vert-fonce), var(--vert));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(2.2rem, 6vw, 4rem);
  text-align: center;
}
.cta-final::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,0.35) 1.5px, transparent 0);
  background-size: 30px 30px;
  opacity: 0.14;
}
.cta-final > * { position: relative; }
.cta-final h2 { color: #fff; }
.cta-final p { max-width: 38em; margin-inline: auto; color: #E2F0E6; }
.cta-final .hero-boutons { justify-content: center; }

/* ---------- Badges & listes ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem; font-weight: 700;
  background: var(--bleu-pale); color: var(--bleu-fonce);
}
.badge--vert { background: var(--vert-pale); color: var(--vert-fonce); }
.badge--rouge { background: var(--rouge-pale); color: var(--rouge-fonce); }

.liste-coches { list-style: none; padding: 0; margin: 0 0 var(--s2); }
.liste-coches li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.7rem;
}
.liste-coches li::before {
  content: "";
  position: absolute; left: 0; top: 0.28em;
  width: 1.15rem; height: 1.15rem;
  border-radius: 50%;
  background: var(--vert-pale) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23217A3C" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') center / 62% no-repeat;
}

/* ---------- Page hero (pages intérieures) ---------- */
.page-hero {
  background:
    radial-gradient(ellipse at 90% 0%, rgba(27, 95, 174, 0.12), transparent 55%),
    var(--blanc);
  border-bottom: 1px solid var(--ligne);
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.page-hero p.grand {
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  color: var(--encre-douce);
  max-width: 42em;
}
.fil-ariane {
  font-size: 0.85rem;
  color: var(--encre-douce);
  margin-bottom: var(--s2);
}
.fil-ariane a { color: var(--encre-douce); }
.fil-ariane a:hover { color: var(--bleu); }

/* ---------- Galerie ---------- */
.galerie-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
}
.galerie-grille figure { margin: 0; }
.galerie-grille figcaption {
  font-size: 0.85rem; color: var(--encre-douce);
  padding-top: 0.5rem;
}

/* ---------- Formulaires ---------- */
.formulaire { display: grid; gap: var(--s3); }
.champ { display: grid; gap: 0.45rem; }
.champ label { font-weight: 700; font-size: 0.95rem; }
.champ label .requis { color: var(--rouge); }
.champ .aide { font-size: 0.85rem; color: var(--encre-douce); }
.champ input, .champ select, .champ textarea {
  font: inherit;
  color: var(--encre);
  background: var(--blanc);
  border: 1.5px solid var(--ligne);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  min-height: 48px;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.champ textarea { min-height: 8rem; resize: vertical; }
.champ input:focus, .champ select:focus, .champ textarea:focus {
  outline: none;
  border-color: var(--bleu);
  box-shadow: 0 0 0 3px rgba(27, 95, 174, 0.18);
}
.champ .erreur-message { display: none; font-size: 0.85rem; font-weight: 600; color: var(--rouge-fonce); }
.champ.erreur input, .champ.erreur textarea, .champ.erreur select { border-color: var(--rouge); }
.champ.erreur .erreur-message { display: block; }

.form-succes {
  display: none;
  background: var(--vert-pale);
  border: 1.5px solid var(--vert);
  color: var(--vert-fonce);
  font-weight: 600;
  border-radius: var(--radius);
  padding: var(--s2) var(--s3);
}
.form-succes.visible { display: block; }

.form-erreur {
  display: none;
  background: var(--rouge-pale);
  border: 1.5px solid var(--rouge);
  color: var(--rouge-fonce);
  font-weight: 600;
  border-radius: var(--radius);
  padding: var(--s2) var(--s3);
  margin-top: var(--s2);
}
.form-erreur.visible { display: block; }
.form-erreur a { color: var(--rouge-fonce); }

/* ---------- Options de don ---------- */
.montants {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: var(--s1);
}
.montant {
  position: relative;
}
.montant input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.montant span {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 72px;
  border: 2px solid var(--ligne);
  border-radius: var(--radius);
  background: var(--blanc);
  font-weight: 800; font-size: 1.15rem;
  transition: border-color var(--transition), background var(--transition);
}
.montant span small { font-weight: 600; font-size: 0.75rem; color: var(--encre-douce); }
.montant input:checked + span {
  border-color: var(--rouge);
  background: var(--rouge-pale);
  color: var(--rouge-fonce);
}
.montant input:focus-visible + span { outline: 3px solid var(--bleu); outline-offset: 2px; }

/* ---------- Actualités ---------- */
.article-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem;
  font-size: 0.85rem; color: var(--encre-douce);
  margin-bottom: 0.6rem;
}

/* ---------- Pied de page ---------- */
.pied {
  background: var(--encre);
  color: #C9CFD8;
  padding-block: var(--s6) var(--s4);
  font-size: 0.95rem;
}
.pied h4 {
  color: #fff;
  font-family: var(--font-texte);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--s2);
}
.pied a { color: #C9CFD8; text-decoration: none; }
.pied a:hover { color: #fff; text-decoration: underline; }
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied li { margin-bottom: 0.6rem; }
.pied-grille {
  display: grid;
  gap: var(--s4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  padding-bottom: var(--s4);
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.pied-marque { display: flex; align-items: center; gap: 0.7rem; margin-bottom: var(--s2); }
.pied-marque img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.pied-marque strong { color: #fff; font-family: var(--font-titre); }
.pied-bas {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2);
  padding-top: var(--s3);
  font-size: 0.85rem;
  color: #8D95A3;
}

/* ---------- Liens juridiques du pied de page ---------- */
.pied-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.4rem;
  padding-top: var(--s3);
  margin-top: var(--s3);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.pied-legal a,
.pied-legal-cookies {
  color: #C9CFD8;
  opacity: 0.85;
  font-size: 0.88rem;
  font-family: var(--font-texte);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.pied-legal a:hover,
.pied-legal-cookies:hover { color: #fff; opacity: 1; text-decoration: underline; }

/* ---------- Case de consentement (formulaires) ---------- */
.champ--case { margin-top: 0.25rem; }
.case-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--encre);
}
.case-consent input[type="checkbox"] {
  margin-top: 0.15rem;
  width: 1.2rem; height: 1.2rem;
  flex-shrink: 0;
  accent-color: var(--vert);
  cursor: pointer;
}
.case-consent a { color: var(--bleu); font-weight: 600; }
.champ--case.erreur .case-consent { color: var(--rouge-fonce); }

/* ---------- Bandeau de consentement aux cookies ---------- */
.cookies-bandeau {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1500;
  background: var(--blanc);
  border-top: 3px solid var(--bleu);
  box-shadow: 0 -12px 34px rgba(15, 61, 117, 0.18);
  transform: translateY(112%);
  transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 88vh;
  overflow-y: auto;
}
.cookies-bandeau.visible { transform: translateY(0); }
.cookies-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.9rem 1.6rem;
  max-width: var(--largeur-max); margin-inline: auto;
  padding: 1.1rem clamp(1.1rem, 4vw, 2rem);
}
.cookies-texte { flex: 1 1 320px; }
.cookies-texte strong { display: block; font-family: var(--font-titre); font-size: 1.08rem; margin-bottom: 0.25rem; color: var(--encre); }
.cookies-texte p { margin: 0; font-size: 0.9rem; color: var(--encre-douce); line-height: 1.55; }
.cookies-texte a { color: var(--bleu); font-weight: 600; }
.cookies-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; flex-shrink: 0; }
.cookies-actions .btn { min-height: 42px; padding: 0.5rem 1.15rem; font-size: 0.92rem; }
.cookies-perso {
  max-width: var(--largeur-max); margin-inline: auto;
  padding: 0.2rem clamp(1.1rem, 4vw, 2rem) 1.3rem;
}
.cookies-cat {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.8rem 0; border-top: 1px solid var(--ligne);
  font-size: 0.92rem;
}
.cookies-cat small { color: var(--encre-douce); font-weight: 400; }
.cookies-cat input[type="checkbox"] { width: 1.35rem; height: 1.35rem; accent-color: var(--vert); flex-shrink: 0; cursor: pointer; }
.cookies-cat input:disabled { opacity: 0.6; }
@media (max-width: 600px) {
  .cookies-actions { width: 100%; }
  .cookies-actions .btn { flex: 1 1 auto; }
}

/* ---------- Motion 3D : inclinaison des cartes au survol (souris) ---------- */
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .carte { transition: transform 150ms ease-out, box-shadow 220ms ease-out; will-change: transform; }
}

/* ---------- Animations d'apparition ---------- */
.reveler {
  opacity: 0;
  transform: perspective(1000px) rotateX(7deg) translateY(22px);
  transform-origin: 50% 100%;
  transition: opacity 560ms ease-out, transform 680ms cubic-bezier(0.22, 1, 0.36, 1);
}
.reveler.visible { opacity: 1; transform: perspective(1000px) rotateX(0deg) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveler { opacity: 1; transform: none; }
}

/* ============================================================
   Vie ambiante — un mouvement lent et discret par section.
   Amplitudes minuscules, durées longues : la page respire,
   elle ne gesticule pas. Tout est coupé par prefers-reduced-motion.
   ============================================================ */
@keyframes derive-lueur {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-3%, 5%, 0) scale(1.07); }
}
@keyframes flotter {
  from { transform: translateY(0); }
  to   { transform: translateY(-14px); }
}
@keyframes respirer {
  from { transform: translateY(0) rotate(0deg); }
  to   { transform: translateY(-12px) rotate(1deg); }
}
@keyframes panner-points {
  to { background-position: 30px 30px; }
}
@keyframes tisser {
  to { background-position: 200px 0; }
}

/* Lueur dérivante : chaque type de section a la sienne */
.section::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: min(48vw, 540px);
  aspect-ratio: 1;
  top: -14%;
  right: -12%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(27, 95, 174, 0.06), transparent 62%);
  animation: derive-lueur 22s ease-in-out infinite alternate;
}
.section--blanc::after {
  background: radial-gradient(circle, rgba(33, 122, 60, 0.055), transparent 62%);
  right: auto;
  left: -12%;
  animation-duration: 26s;
}
.section--bleu::after {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.07), transparent 62%);
  animation-duration: 18s;
}
.section--vert-pale::after {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6), transparent 62%);
  top: auto;
  bottom: -18%;
  animation-duration: 24s;
}

/* Le hero : les lettres du filigrane flottent lentement */
.hero::before { animation: flotter 15s ease-in-out infinite alternate; }

/* Les lettres géantes en creux respirent */
.section--filigrane::before { animation: respirer 24s ease-in-out infinite alternate; }

/* La bande tissée glisse imperceptiblement, comme un métier à tisser */
.tisse { animation: tisser 26s linear infinite; }

/* Les points du bandeau final dérivent en diagonale */
.cta-final::before { animation: panner-points 14s linear infinite; }

/* Les heros de pages intérieures ont aussi leur lueur */
.page-hero { position: relative; overflow: hidden; }
.page-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: min(44vw, 480px);
  aspect-ratio: 1;
  top: -20%;
  right: -10%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(27, 95, 174, 0.07), transparent 62%);
  animation: derive-lueur 20s ease-in-out infinite alternate;
}
.page-hero .conteneur { position: relative; z-index: 1; }

/* ============================================================
   Immersif : barre de progression de lecture + lueur au curseur.
   Interactif et discret ; entierement coupe par reduced-motion.
   ============================================================ */
.progression-lecture {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
  background: linear-gradient(90deg, var(--bleu), var(--vert) 52%, var(--rouge));
  z-index: 1200;
  pointer-events: none;
  will-change: transform;
}

.hero > * { position: relative; z-index: 1; }
@media (hover: hover) and (pointer: fine) {
  .hero { --gx: 50%; --gy: 30%; }
  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(360px circle at var(--gx) var(--gy),
      rgba(27, 95, 174, 0.18), rgba(33, 122, 60, 0.06) 45%, transparent 70%);
    opacity: 0;
    transition: opacity 450ms ease;
  }
  .hero.lueur-active::after { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .progression-lecture { display: none; }
  .hero::after { display: none; }
}

/* ============================================================
   Passe mobile dédiée : masquer le secondaire, compacter le
   vertical, garder les cibles tactiles généreuses.
   ============================================================ */
@media (max-width: 640px) {
  /* En-tête : la devise disparaît, le logo se resserre */
  .entete-barre { min-height: 60px; }
  .marque img { width: 38px; height: 38px; }
  .marque-nom { font-size: 0.95rem; }
  .marque-nom small { display: none; }
  .entete-actions .btn { padding: 0.45rem 1rem; font-size: 0.9rem; }

  /* Hero : moins de hauteur, filigrane en retrait */
  .hero { padding-block: 2.6rem 3rem; }
  .hero::before { font-size: 4.8rem; opacity: 0.045; max-width: 70%; }
  .hero-note { font-size: 0.85rem; }

  /* Les cadres photo passent en 16/10 : ils coûtent moins d'écran */
  .cadre-photo { aspect-ratio: 16 / 10; }
  .cadre-photo--carre { aspect-ratio: 1; }

  /* Chiffres : 2 x 2 plutôt qu'une pile */
  .stats { grid-template-columns: repeat(2, 1fr); gap: 1.6rem 0.8rem; }

  /* Partenaires et galerie : 2 colonnes compactes */
  .grille--4 { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .grille--4 .carte { padding: 1rem; font-size: 0.9rem; }
  .galerie-grille { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .galerie-grille figcaption { font-size: 0.78rem; }

  /* Décor redimensionné */
  .section--filigrane::before { font-size: 9rem; }
  .cta-final { padding: 2rem 1.3rem; }
  .fil-ariane { font-size: 0.8rem; }
  .temoignage blockquote { font-size: 1rem; }

  /* Pied de page : marque et contact en pleine largeur,
     les deux colonnes de liens côte à côte */
  .pied { padding-block: 3rem 1.8rem; font-size: 0.9rem; }
  .pied-grille { grid-template-columns: 1fr 1fr; gap: 1.6rem; }
  .pied-grille > div:first-child { grid-column: 1 / -1; }
  .pied-grille > div:last-child { grid-column: 1 / -1; }
  .pied-bas { flex-direction: column; align-items: center; text-align: center; gap: 0.4rem; }
}

/* ---------- Tableaux (résultats par centre, etc.) ---------- */
table.liste {
  width: 100%;
  border-collapse: collapse;
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--ombre);
}
table.liste th {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--encre-douce);
  padding: 0.8rem 1rem;
  border-bottom: 2px solid var(--ligne);
  background: var(--papier);
}
table.liste td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--ligne);
  font-size: 0.97rem;
}
table.liste tr:last-child td { border-bottom: 0; }

/* ---------- Équipe / direction ---------- */
.membre { text-align: center; }
.membre .initiales {
  width: 64px; height: 64px;
  border-radius: 50%;
  margin: 0 auto var(--s2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-titre);
  font-weight: 700; font-size: 1.4rem;
  color: #fff; background: var(--bleu);
}
.membre .initiales.vert { background: var(--vert); }
.membre .initiales.rouge { background: var(--rouge); }
.membre h3 { margin-bottom: 0.2rem; font-size: 1.1rem; }
.membre .poste { font-weight: 700; color: var(--vert-fonce); font-size: 0.92rem; }
.membre .metier { color: var(--encre-douce); font-size: 0.9rem; margin-top: 0.2rem; }

/* ---------- Utilitaires ---------- */
.centre { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--s2); }
.mt-4 { margin-top: var(--s4); }
.texte-doux { color: var(--encre-douce); }
