:root {
  --vert-nuit: #0f2e1f;
  --vert-foret: #1b5e3b;
  --vert-vif: #2fbf71;
  --vert-neon: #c6ff5a;
  --vert-pale: #eef8f1;
  --blanc: #ffffff;
  --texte: #14271d;
  --texte-doux: #4a6154;
  --rayon: 22px;
  --ombre: 0 18px 40px -22px rgba(15, 46, 31, 0.28);
}

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

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--blanc);
  color: var(--texte);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.conteneur { width: min(1120px, 100% - 32px); margin-inline: auto; }

.bouton {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.9rem 1.5rem; border-radius: 999px;
  background: var(--vert-foret); color: #fff;
  font-weight: 700; text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.bouton:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px var(--vert-foret); }
.bouton--secondaire { background: transparent; color: var(--vert-foret); border: 2px solid var(--vert-foret); }

/* Logo : le SVG sert de masque, donc sa couleur se règle avec la variable CSS */
.logo-marque {
  display: block;
  width: 96px; height: 70px;
  background: var(--vert-foret);
  -webkit-mask: url("../img/raton-laveur.svg") center / contain no-repeat;
          mask: url("../img/raton-laveur.svg") center / contain no-repeat;
}
.logo-marque--grand { width: 150px; height: 110px; background: var(--vert-foret); }
.logo-marque--pied { background: var(--vert-neon); }

/* En-tête */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e3efe6;
  color: var(--texte);
}
.entete__ligne { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.logo { display: inline-flex; text-decoration: none; }
.menu { display: flex; gap: 1.5rem; list-style: none; }
.menu a { text-decoration: none; font-weight: 500; color: var(--texte); opacity: 0.8; }
.menu a:hover, .menu a[aria-current="page"] { opacity: 1; color: var(--vert-foret); font-weight: 700; }

/* Héro */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--vert-pale), var(--blanc));
  padding: clamp(3.5rem, 9vw, 6.5rem) 0;
}
.hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); max-width: 14ch; color: var(--vert-nuit); }
.hero h1 em { font-style: normal; color: var(--vert-foret); background: linear-gradient(transparent 62%, var(--vert-neon) 62%); }
.hero p { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 52ch; margin-block: 1.5rem 2rem; color: var(--texte-doux); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.hero__logo { position: absolute; right: clamp(1rem, 6vw, 5rem); top: 50%; transform: translateY(-50%); opacity: 0.9; }
.tag {
  display: inline-block; padding: 0.35rem 0.9rem; border-radius: 999px;
  background: var(--vert-pale); color: var(--vert-foret);
  font-size: 0.85rem; font-weight: 600; margin-bottom: 1.2rem; border: 1px solid #cfe8d8;
}

/* Décors SVG discrets */
.deco { position: absolute; pointer-events: none; user-select: none; opacity: 0.1; }
.hero .deco--chene { width: min(520px, 70vw); right: -90px; top: -60px; opacity: 0.1; }
.deco--coin { width: 120px; top: -20px; right: -20px; opacity: 0.08; }
.carte { position: relative; overflow: hidden; }

/* Bande défilante */
.bande {
  background: var(--vert-foret); color: #fff;
  overflow: hidden; white-space: nowrap; padding: 0.9rem 0;
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.1rem;
}
.bande__piste { display: inline-block; animation: defile 28s linear infinite; }
.bande span { margin-inline: 1.2rem; }
.bande span:nth-child(even) { color: var(--vert-neon); }
@keyframes defile { to { transform: translateX(-50%); } }

/* Sections */
section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-titre { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 0.6rem; color: var(--vert-nuit); }
.section-intro { color: var(--texte-doux); max-width: 60ch; margin-bottom: 2.5rem; }

/* Grilles et cartes */
.grille { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.carte {
  background: var(--vert-pale); border-radius: var(--rayon); padding: 1.75rem;
  border: 1px solid #dcefe2;
}
.carte h3 { font-size: 1.35rem; margin-bottom: 0.5rem; color: var(--vert-nuit); }
.carte p { color: var(--texte-doux); }

/* Carrousel photos */
.carrousel { position: relative; border-radius: var(--rayon); overflow: hidden; background: var(--vert-pale); aspect-ratio: 1 / 1; max-width: 520px; margin-inline: auto; box-shadow: var(--ombre); }
.carrousel__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s; display: flex; align-items: flex-end; margin: 0; }
.carrousel__slide.actif { opacity: 1; }
.carrousel__slide img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.carrousel__legende {
  position: relative; width: 100%; padding: 1.5rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); color: #fff; font-weight: 600;
}
.carrousel__vide { display: grid; place-items: center; height: 100%; color: var(--vert-foret); text-align: center; padding: 2rem; }
.carrousel__boutons { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1rem; }
.carrousel__point { width: 10px; height: 10px; border-radius: 50%; border: 0; background: var(--vert-foret); opacity: 0.3; cursor: pointer; }
.carrousel__point.actif { opacity: 1; background: var(--vert-vif); }

/* Dons */
.dons { background: var(--vert-pale); border: 1px solid #cfe8d8; border-radius: var(--rayon); padding: clamp(2rem, 5vw, 3.5rem); position: relative; overflow: hidden; }
.montants { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }
.montants a {
  padding: 0.7rem 1.2rem; border-radius: 14px; text-decoration: none; font-weight: 700;
  background: var(--blanc); color: var(--vert-foret); border: 1px solid #cfe8d8;
}
.montants a:hover { background: var(--vert-foret); color: #fff; }

/* Réseaux */
.liens { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.liens a {
  padding: 0.6rem 1.1rem; border-radius: 999px; text-decoration: none; font-weight: 600;
  background: var(--blanc); color: var(--vert-foret); border: 1px solid #cfe8d8;
}
.liens a:hover { background: var(--vert-foret); color: #fff; }

/* Pied de page */
.pied { background: var(--vert-nuit); color: #cfe6d6; padding: 3rem 0 2rem; margin-top: 2rem; }
.pied__grille { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.pied a { color: #cfe6d6; }
.pied h2 { font-size: 1rem; color: var(--vert-neon); margin-bottom: 0.7rem; }
.pied ul { list-style: none; display: grid; gap: 0.4rem; }
.pied__bas { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.9rem; opacity: 0.7; }

/* Page d'accueil agrandie */
.conteneur--large { width: min(1280px, 100% - 32px); margin-inline: auto; }
.hero--grand { padding: clamp(5rem, 12vw, 9rem) 0; min-height: 80vh; display: flex; align-items: center; }
.hero--grand h1 { font-size: clamp(3rem, 8vw, 6.5rem); max-width: 16ch; }
.hero--grand p { font-size: clamp(1.1rem, 2.2vw, 1.4rem); }

/* Défilement de photos pleine largeur */
.terrain-defile { overflow: hidden; }
.defile { overflow: hidden; margin-top: 2rem; }
.defile__piste { display: flex; width: max-content; animation: defile-photos 60s linear infinite; }
.defile:hover .defile__piste { animation-play-state: paused; }
.defile__groupe { display: flex; gap: 1rem; padding-right: 1rem; flex-shrink: 0; }
.defile__groupe img { height: clamp(220px, 28vw, 340px); width: auto; border-radius: var(--rayon); box-shadow: var(--ombre); }
@keyframes defile-photos { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .defile__piste { animation: none; } }

/* Galerie d'illustration en mosaïque */
.galerie {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-auto-flow: dense;
}
.galerie__item { position: relative; margin: 0; border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); aspect-ratio: 1 / 1; }
.galerie__item--0 { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.galerie__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.galerie__item:hover img { transform: scale(1.05); }
.galerie__item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 0.8rem 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); color: #fff; font-weight: 600; font-size: 0.95rem;
}

.galerie--compacte { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.galerie--compacte .galerie__item { aspect-ratio: 9 / 16; }
.galerie--compacte .galerie__item img { object-fit: contain; background: var(--vert-pale); }

/* Raton BD en bas de l'accueil */
.raton-section { padding-top: 0; }
.raton-bd { display: flex; align-items: center; justify-content: center; gap: clamp(1.5rem, 4vw, 3.5rem); flex-wrap: wrap; }
.raton-bd__perso { width: min(260px, 70vw); height: auto; flex-shrink: 0; }
.bulle-bd {
  position: relative; max-width: 420px; background: var(--blanc);
  border: 3px solid var(--vert-nuit); border-radius: 26px; padding: 1.6rem 1.8rem;
  box-shadow: 8px 8px 0 var(--vert-neon);
}
.bulle-bd::before {
  content: ""; position: absolute; left: -22px; bottom: 42px;
  border: 12px solid transparent; border-right: 14px solid var(--vert-nuit); border-left: 0;
}
.bulle-bd::after {
  content: ""; position: absolute; left: -17px; bottom: 42px;
  border: 10px solid transparent; border-right: 12px solid var(--blanc); border-left: 0;
}
.bulle-bd__titre { font-family: "Space Grotesk", sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--vert-nuit); margin-bottom: 0.4rem; }
.bulle-bd p { color: var(--texte-doux); }
.bulle-bd__reseaux { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.bulle-bd__reseaux a {
  padding: 0.55rem 1rem; border-radius: 999px; text-decoration: none; font-weight: 700;
  background: var(--vert-foret); color: #fff;
}
.bulle-bd__reseaux a:hover { background: var(--vert-nuit); }

/* Bulle BD en bas à droite du héros, au-dessus de la bande verte */
/* Bulle hors flux : elle ne change pas la hauteur du héros */
.hero .bulle-bd--hero {
  position: absolute; right: clamp(1.5rem, 5vw, 4rem); bottom: 3rem;
  width: 260px; margin: 0; padding: 1.1rem 1.3rem;
  box-shadow: 6px 6px 0 var(--vert-neon);
}
.hero .bulle-bd--hero p { font-size: 0.9rem; margin: 0; }
.hero .bulle-bd--hero .bulle-bd__titre { font-size: 1.05rem; margin-bottom: 0.3rem; }
.hero .bulle-bd--hero .bulle-bd__reseaux { margin-top: 0.8rem; gap: 0.4rem; }
.hero .bulle-bd--hero .bulle-bd__reseaux a { font-size: 0.8rem; padding: 0.4rem 0.7rem; }
@media (max-width: 900px) {
  .hero .bulle-bd--hero { position: relative; right: auto; bottom: auto; margin: 2rem 0 0; width: 100%; max-width: 320px; }
}
.bulle-bd--hero::before, .bulle-bd--hero::after { display: none; }
.bulle-bd--hero .bulle-bd__titre { font-size: 1.2rem; }
.bulle-bd--hero .bulle-bd__reseaux a { font-size: 0.85rem; padding: 0.45rem 0.8rem; }

/* Étapes */
.etapes { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); counter-reset: etape; }
.etape { background: var(--vert-pale); border: 1px solid #dcefe2; border-radius: var(--rayon); padding: 2rem; position: relative; }
.etape::before {
  counter-increment: etape; content: counter(etape);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--vert-foret); color: #fff; font-family: "Space Grotesk", sans-serif; font-weight: 700; margin-bottom: 1rem;
}
.etape h3 { font-size: 1.35rem; margin-bottom: 0.5rem; color: var(--vert-nuit); }
.etape p { color: var(--texte-doux); }

/* Petits écrans */
@media (max-width: 720px) {
  .entete__ligne { height: 72px; }
  .logo-marque { width: 72px; height: 54px; }
  .menu { gap: 0.9rem; font-size: 0.9rem; }
  .menu li:nth-child(n+4) { display: none; }
  .hero__logo { display: none; }
  .hero .deco--chene { width: 360px; right: -140px; }
}
