/* ==========================================================================
   Roby du Coeur — refonte 2026
   Système de style. HTML/CSS natifs, zéro dépendance, zéro build.
   Bilingue FR/EN. Propriétés logiques partout (prêt pour un RTL futur).
   ========================================================================== */

/* ---------- Polices (internalisées, pas de Google Fonts) ---------- */
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-latin-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-latin-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-400.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}

/* ---------- Variables ----------
   Les couleurs de marque sont relevées sur le logo d'origine
   (img/logo-robyducoeur.png) : dégradé safran -> corail, encre #303030.
   Les ratios de contraste notés sont mesurés, pas estimés.
   ------------------------------------------------------------------ */
:root {
  /* Marque : aplats, dégradés, gros titres. JAMAIS du petit texte sur blanc. */
  --corail: #e85858;
  --corail-profond: #e86048;
  --safran: #f09810;

  /* Déclinaisons lisibles */
  --corail-texte: #c8382c;    /* texte corail sur fond clair : 5.06:1 */
  --corail-nuit: #ff9d7d;     /* texte corail sur fond sombre  : 7.78:1 */
  --bouton: #c8382c;          /* aplat d'appel à l'action, blanc dessus : 5.18:1 */
  --bouton-survol: #b83227;   /* blanc dessus : 5.96:1 */

  /* Neutres chauds */
  --encre: #2a211c;           /* texte principal   : 15.41:1 sur --fond */
  --encre-2: #5f544e;         /* texte secondaire  : 7.17:1  sur --fond */
  --fond: #fffcf9;
  --fond-2: #fdf4ec;          /* sections alternées */
  --carte: #ffffff;
  --ligne: #f0e2d6;
  --sombre: #2a211c;
  --texte-sombre: #f7f1ea;    /* 14.05:1 sur --sombre */
  --texte-sombre-2: #cdbfb6;  /*  8.80:1 sur --sombre */

  /* Le dégradé ne porte jamais de texte : il remplit des surfaces.
     Côté safran, le blanc tombe à 2.28:1. Piège vérifié, pas supposé. */
  --degrade-marque: linear-gradient(100deg, #f09810 0%, #e87040 52%, #e85858 100%);

  /* Typo : échelle fluide, 3 tailles + un display */
  --t-display: clamp(2.4rem, 1.4rem + 3.4vw, 4.1rem);
  --t-h1: clamp(2rem, 1.35rem + 2.2vw, 3.05rem);
  --t-h2: clamp(1.55rem, 1.2rem + 1.3vw, 2.25rem);
  --t-h3: clamp(1.12rem, 1rem + 0.4vw, 1.32rem);
  --t-corps: 1.0625rem;
  --t-petit: 0.9375rem;

  /* Rythme */
  --pas: 0.5rem;
  --section-y: clamp(3.5rem, 2rem + 6vw, 6.5rem);
  --conteneur: 72rem;
  --gouttiere: clamp(1.25rem, 0.6rem + 2.4vw, 2.5rem);

  --rayon: 14px;
  --rayon-lg: 22px;
  --ombre: 0 1px 2px rgba(42, 33, 28, .05), 0 8px 24px -12px rgba(42, 33, 28, .16);
  --ombre-forte: 0 2px 4px rgba(42, 33, 28, .06), 0 20px 44px -20px rgba(42, 33, 28, .30);
}

/* ---------- Réinitialisation ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--t-corps);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;           /* aucun défilement horizontal du corps */
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--corail-texte); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--bouton-survol); }

h1, h2, h3, h4 {
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.018em;
  margin: 0 0 0.55em;
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); font-weight: 600; letter-spacing: -0.008em; }
p  { margin: 0 0 1.15em; }
p:last-child, ul:last-child { margin-bottom: 0; }

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

/* Lien d'évitement clavier */
.evitement {
  position: absolute; inset-inline-start: -9999px; top: 0;
  background: var(--sombre); color: var(--texte-sombre);
  padding: .75rem 1.25rem; z-index: 200; border-radius: 0 0 var(--rayon) 0;
}
.evitement:focus { inset-inline-start: 0; color: var(--texte-sombre); }

/* ---------- Conteneur & sections ---------- */
.conteneur {
  width: 100%;
  max-width: var(--conteneur);
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}
section { padding-block: var(--section-y); }
.fond-alt { background: var(--fond-2); }
.fond-sombre { background: var(--sombre); color: var(--texte-sombre); }
.fond-sombre h1, .fond-sombre h2, .fond-sombre h3 { color: var(--texte-sombre); }
.fond-sombre p { color: var(--texte-sombre-2); }
.fond-sombre a { color: var(--corail-nuit); }

.sur-titre {
  display: block;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: .8125rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--corail-texte);
  margin-bottom: .7rem;
}
.fond-sombre .sur-titre { color: var(--corail-nuit); }

.chapo { font-size: 1.15rem; color: var(--encre-2); max-width: 62ch; }
.fond-sombre .chapo { color: var(--texte-sombre-2); }
.mesure { max-width: 68ch; }
.centre { text-align: center; margin-inline: auto; }

/* ---------- Boutons ----------
   L'appel à l'action principal est un APLAT, jamais le dégradé :
   sur la moitié safran, le blanc tomberait à 2.28:1. */
.bouton {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: "Poppins", sans-serif; font-weight: 600; font-size: .95rem;
  padding: .7rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .18s ease, border-color .18s ease,
              color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.bouton svg { width: 1.1em; height: 1.1em; flex: none; }

.bouton-plein { background: var(--bouton); color: #fff; }
.bouton-plein:hover {
  background: var(--bouton-survol); color: #fff;
  transform: translateY(-1px); box-shadow: var(--ombre);
}
.bouton-ligne {
  background: transparent; color: var(--corail-texte);
  border-color: color-mix(in srgb, var(--corail-texte) 40%, transparent);
}
.bouton-ligne:hover {
  background: color-mix(in srgb, var(--corail-texte) 8%, transparent);
  color: var(--bouton-survol);
}
.fond-sombre .bouton-ligne {
  color: var(--texte-sombre);
  border-color: color-mix(in srgb, var(--texte-sombre) 38%, transparent);
}
.fond-sombre .bouton-ligne:hover {
  background: color-mix(in srgb, var(--texte-sombre) 12%, transparent);
  color: var(--texte-sombre);
}
.bouton-grand { padding: .95rem 1.9rem; font-size: 1.05rem; }

/* ---------- En-tête ----------
   Squelette d'ancrage, leçon reprise de roby.taxi : chaque élément a un
   ordre et un point fixe, aucun `margin: auto` qui pousse un bloc CONTRE
   ses voisins. Le ressort central (::before) est le seul élastique, donc
   les positions ne dépendent pas de la largeur des libellés voisins.
   Tout est en `flex: 0 0 auto` + `nowrap` : sans ça, un élément flex se
   laisse comprimer sous sa largeur naturelle et le texte passe à la ligne. */
.entete {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--fond) 88%, transparent);
  backdrop-filter: saturate(1.5) blur(12px);
  border-bottom: 1px solid var(--ligne);
}
.entete-inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 74px;
}
.entete-inner::before { content: ""; flex: 1 1 auto; order: 3; }

.logo { flex: 0 0 auto; order: 1; display: flex; align-items: center; }
.logo img { width: 132px; height: auto; }

.nav-principale { flex: 0 0 auto; order: 2; }
.nav-principale ul {
  display: flex; align-items: center; gap: 1.5rem;
  list-style: none; margin: 0; padding: 0;
}
.nav-principale a {
  display: inline-block;
  font-family: "Poppins", sans-serif; font-weight: 600; font-size: .95rem;
  color: var(--encre); text-decoration: none; white-space: nowrap;
  padding: .35rem 0; position: relative;
}
.nav-principale a::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px;
  background: var(--corail-texte); border-radius: 2px;
  transform: scaleX(0); transform-origin: inline-start;
  transition: transform .2s ease;
}
.nav-principale a:hover::after,
.nav-principale a[aria-current="page"]::after { transform: scaleX(1); }
.nav-principale a[aria-current="page"] { color: var(--corail-texte); }

.entete .bouton-don { flex: 0 0 auto; order: 4; }

.selecteur-langue {
  flex: 0 0 auto; order: 5;
  display: flex; align-items: center; gap: 2px;
  background: var(--fond-2); border: 1px solid var(--ligne);
  border-radius: 999px; padding: 3px;
}
.selecteur-langue a {
  font-family: "Poppins", sans-serif; font-weight: 600; font-size: .8rem;
  color: var(--encre-2); text-decoration: none;
  padding: .3rem .6rem; border-radius: 999px; line-height: 1;
  white-space: nowrap;
}
.selecteur-langue a[aria-current="true"] { background: var(--carte); color: var(--encre); box-shadow: var(--ombre); }

.bouton-nav {
  display: none; order: 6; flex: 0 0 auto;
  background: none; border: 1px solid var(--ligne); border-radius: 10px;
  padding: .4rem; color: var(--encre); cursor: pointer;
}

/* Menu replié */
.menu-mobile {
  display: none;
  border-top: 1px solid var(--ligne);
  background: var(--fond);
  padding: .75rem var(--gouttiere) 1.25rem;
}
.menu-mobile.ouvert { display: block; }
.menu-mobile ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.menu-mobile a {
  display: block; padding: .7rem 0;
  font-family: "Poppins", sans-serif; font-weight: 600;
  color: var(--encre); text-decoration: none;
  border-bottom: 1px solid var(--ligne);
}
.menu-mobile .bouton { width: 100%; justify-content: center; }

@media (max-width: 65rem) {
  .nav-principale, .entete .bouton-don { display: none; }
  .bouton-nav { display: inline-flex; }
  .entete-inner { gap: .75rem; }
}

/* ---------- Bandeau de tête de page ---------- */
.pagehead {
  background: var(--sombre); color: var(--texte-sombre);
  padding-block: clamp(3rem, 2rem + 4vw, 5rem);
  position: relative; overflow: hidden;
}
.pagehead::after {
  content: ""; position: absolute; inset-block: 0; inset-inline-end: -12%;
  width: 46%; background: var(--degrade-marque);
  opacity: .16; filter: blur(48px); pointer-events: none;
}
.pagehead h1 { color: var(--texte-sombre); position: relative; }
.pagehead p { color: var(--texte-sombre-2); max-width: 60ch; position: relative; }
.pagehead .sur-titre { color: var(--corail-nuit); position: relative; }

/* ---------- Accueil : hero ---------- */
.hero {
  padding-block: clamp(3rem, 1.5rem + 6vw, 6rem) var(--section-y);
  background:
    radial-gradient(70rem 34rem at 88% -18%, color-mix(in srgb, var(--safran) 15%, transparent), transparent 62%),
    radial-gradient(52rem 30rem at 4% 8%, color-mix(in srgb, var(--corail) 11%, transparent), transparent 60%);
}
.hero-grille {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center;
}
.hero h1 { font-size: var(--t-display); }
.hero .chapo { font-size: 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* Composition photo du hero : deux images décalées, pas un carrousel. */
.hero-photos { position: relative; }
.hero-photos img { border-radius: var(--rayon-lg); box-shadow: var(--ombre-forte); }
.hero-photos .photo-2 {
  position: absolute; inset-inline-end: -6%; bottom: -12%;
  width: 46%; border: 6px solid var(--fond);
}
@media (max-width: 60rem) {
  .hero-grille { grid-template-columns: 1fr; }
  .hero-photos { margin-top: 1rem; }
  .hero-photos .photo-2 { inset-inline-end: 0; bottom: -8%; width: 40%; }
}

/* ---------- Grilles génériques ---------- */
.grille { display: grid; gap: clamp(1.25rem, .8rem + 1.4vw, 2rem); }
.grille-2 { grid-template-columns: repeat(2, 1fr); }
.grille-3 { grid-template-columns: repeat(3, 1fr); }
.grille-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 60rem) { .grille-3, .grille-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 40rem) { .grille-2, .grille-3, .grille-4 { grid-template-columns: 1fr; } }

.duo {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(1.75rem, 1rem + 3vw, 4rem); align-items: center;
}
.duo img { border-radius: var(--rayon-lg); box-shadow: var(--ombre); }
.duo-inverse img { order: 2; }
@media (max-width: 58rem) {
  .duo { grid-template-columns: 1fr; }
  .duo-inverse img { order: 0; }
}

/* ---------- Cartes ---------- */
.carte {
  background: var(--carte); border: 1px solid var(--ligne);
  border-radius: var(--rayon); padding: 1.6rem;
  box-shadow: var(--ombre);
}
.carte h3 { margin-bottom: .4rem; }
.carte p { color: var(--encre-2); font-size: var(--t-petit); margin-bottom: 0; }

.carte-icone {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 1rem;
  background: color-mix(in srgb, var(--corail) 12%, transparent);
  color: var(--corail-texte);
}
.carte-icone svg { width: 24px; height: 24px; }

/* Valeurs : le numéro d'ordre sert de repère visuel */
.valeur { position: relative; padding-inline-start: 3.4rem; }
.valeur::before {
  content: attr(data-n);
  position: absolute; inset-inline-start: 0; top: -.15rem;
  font-family: "Poppins", sans-serif; font-weight: 700; font-size: 1.6rem;
  color: color-mix(in srgb, var(--corail) 42%, transparent);
  line-height: 1;
}

/* ---------- Chiffres ---------- */
.chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.chiffre-n {
  display: block;
  font-family: "Poppins", sans-serif; font-weight: 700;
  font-size: clamp(2rem, 1.4rem + 2vw, 2.9rem);
  line-height: 1.05; color: var(--corail-nuit);
}
.chiffre-l { font-size: var(--t-petit); color: var(--texte-sombre-2); }
@media (max-width: 40rem) { .chiffres { grid-template-columns: 1fr; text-align: center; } }

/* ---------- Dons ---------- */
.don-grille {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1rem; margin-block: 1.75rem;
}
@media (max-width: 52rem) { .don-grille { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 34rem) { .don-grille { grid-template-columns: 1fr; } }

/* Le montant est un vrai bouton radio : accessible au clavier et lisible
   par un lecteur d'écran. L'input est masqué visuellement, pas retiré. */
.don-option { position: relative; }
.don-option input {
  position: absolute; opacity: 0; width: 100%; height: 100%;
  margin: 0; cursor: pointer;
}
.don-option label {
  display: block; cursor: pointer;
  background: var(--carte); border: 2px solid var(--ligne);
  border-radius: var(--rayon); padding: 1.15rem 1.25rem;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.don-option input:hover + label { border-color: color-mix(in srgb, var(--corail) 45%, transparent); }
.don-option input:checked + label {
  border-color: var(--corail-texte);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--corail) 15%, transparent);
  transform: translateY(-2px);
}
.don-option input:focus-visible + label { outline: 3px solid var(--corail-texte); outline-offset: 3px; }
.don-montant {
  display: block; font-family: "Poppins", sans-serif; font-weight: 700;
  font-size: 1.45rem; line-height: 1.1; color: var(--encre);
}
.don-detail { display: block; font-size: var(--t-petit); color: var(--encre-2); margin-top: .3rem; }

.don-libre { display: flex; align-items: center; gap: .6rem; margin-top: .5rem; }
.don-libre input[type="number"] {
  flex: 1 1 auto; min-width: 0;
  font: inherit; font-family: "Poppins", sans-serif; font-weight: 700; font-size: 1.2rem;
  padding: .6rem .8rem; border: 2px solid var(--ligne); border-radius: 10px;
  background: var(--carte); color: var(--encre);
}
.don-libre input[type="number"]:focus-visible { border-color: var(--corail-texte); outline: none; }
.don-devise { font-family: "Poppins", sans-serif; font-weight: 700; color: var(--encre-2); }

.don-panneau {
  background: var(--carte); border: 1px solid var(--ligne);
  border-radius: var(--rayon-lg); padding: clamp(1.4rem, 1rem + 1.5vw, 2.4rem);
  box-shadow: var(--ombre-forte);
}
.don-total {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding-block: 1rem; margin-block: 1rem;
  border-block: 1px solid var(--ligne);
}
.don-total-n {
  font-family: "Poppins", sans-serif; font-weight: 700;
  font-size: 1.7rem; color: var(--corail-texte);
}
.don-note { font-size: var(--t-petit); color: var(--encre-2); }

.cartes-acceptees { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin-top: 1.1rem; }
.cartes-acceptees img { height: 34px; width: auto; }

/* ---------- Formulaire ---------- */
.champ { margin-bottom: 1.1rem; }
.champ label {
  display: block; font-family: "Poppins", sans-serif; font-weight: 600;
  font-size: var(--t-petit); margin-bottom: .35rem;
}
.champ input, .champ textarea, .champ select {
  width: 100%; font: inherit;
  padding: .7rem .85rem;
  border: 1.5px solid var(--ligne); border-radius: 10px;
  background: var(--carte); color: var(--encre);
}
.champ input:focus-visible, .champ textarea:focus-visible, .champ select:focus-visible {
  border-color: var(--corail-texte); outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--corail) 16%, transparent);
}
.champ textarea { min-height: 8rem; resize: vertical; }
.champ-requis { color: var(--corail-texte); }
.champ-aide { font-size: .875rem; color: var(--encre-2); margin-top: .3rem; }

/* ---------- Partenaires ---------- */
.partenaires {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: center; gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
}
.partenaires img {
  height: 62px; width: auto;
  filter: grayscale(1); opacity: .55;
  transition: filter .25s ease, opacity .25s ease;
}
.partenaires a:hover img, .partenaires img:hover { filter: none; opacity: 1; }

/* ---------- Coordonnées ---------- */
.coord { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.coord li { display: flex; gap: .85rem; align-items: flex-start; }
.coord svg { width: 20px; height: 20px; flex: none; margin-top: .3rem; color: var(--corail-texte); }
.fond-sombre .coord svg { color: var(--corail-nuit); }
.coord strong { display: block; font-family: "Poppins", sans-serif; font-size: var(--t-petit); }

/* Bloc IBAN : donnée à recopier, donc en chasse fixe et sélectionnable */
.iban {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .95rem; letter-spacing: .02em;
  background: var(--fond-2); border: 1px solid var(--ligne);
  border-radius: 10px; padding: .8rem 1rem;
  word-break: break-all; user-select: all;
}
.fond-sombre .iban {
  background: color-mix(in srgb, #fff 7%, transparent);
  border-color: color-mix(in srgb, #fff 14%, transparent);
  color: var(--texte-sombre);
}

/* ---------- Contenu légal ---------- */
.legal { max-width: 72ch; }
.legal h2 { margin-top: 2.5rem; }
.legal h3 { margin-top: 1.75rem; }
.legal ul { padding-inline-start: 1.25rem; }
.legal li { margin-bottom: .4rem; }
.legal table { width: 100%; border-collapse: collapse; margin-block: 1.25rem; font-size: var(--t-petit); }
.legal th, .legal td { text-align: start; padding: .6rem .75rem; border: 1px solid var(--ligne); vertical-align: top; }
.legal th { background: var(--fond-2); font-family: "Poppins", sans-serif; }
.tableau-defilant { overflow-x: auto; }

/* ---------- Pied de page ---------- */
.pied { background: var(--sombre); color: var(--texte-sombre-2); padding-block: 3.5rem 1.75rem; }
.pied-grille {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
  gap: clamp(1.75rem, 1rem + 2.5vw, 3rem);
}
@media (max-width: 62rem) { .pied-grille { grid-template-columns: 1fr 1fr; } }
@media (max-width: 38rem) { .pied-grille { grid-template-columns: 1fr; } }
.pied h3 {
  color: var(--texte-sombre); font-size: .8125rem; letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: 1rem;
}
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied li { margin-bottom: .55rem; }
.pied a { color: var(--texte-sombre-2); text-decoration: none; }
.pied a:hover { color: var(--texte-sombre); text-decoration: underline; }
.pied-marque img { width: 140px; margin-bottom: 1rem; }
.pied-marque p { font-size: var(--t-petit); color: var(--texte-sombre-2); }
.pied-bas {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  align-items: center;
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid color-mix(in srgb, #fff 12%, transparent);
  font-size: .875rem;
}
.pied-signature a { display: inline-flex; align-items: center; gap: .4rem; }
.pied-signature img { width: 44px; height: 14px; margin: 0; }

/* ---------- Bandeau cookies ---------- */
.bandeau-cookies {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 150;
  background: var(--sombre); color: var(--texte-sombre);
  padding: 1.1rem var(--gouttiere);
  box-shadow: 0 -8px 32px rgba(0,0,0,.24);
  transform: translateY(100%);
  transition: transform .3s ease;
}
.bandeau-cookies.visible { transform: translateY(0); }
.bandeau-cookies .conteneur {
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
  justify-content: space-between; padding-inline: 0;
}
.bandeau-cookies p { margin: 0; font-size: var(--t-petit); color: var(--texte-sombre-2); max-width: 70ch; }
.bandeau-cookies .actions { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ---------- Motion : une seule idée, l'apparition au défilement ---------- */
.apparait {
  opacity: 0; transform: translateY(18px);
  transition: opacity .6s cubic-bezier(.22,.61,.36,1), transform .6s cubic-bezier(.22,.61,.36,1);
}
.apparait.vu { opacity: 1; transform: none; }

/* Filet de sécurité : sans JS, l'état masqué ne s'applique jamais.
   La classe `js` est posée sur <html> par un script en ligne dans le <head>.
   Sans cette règle, un site.js absent rendrait toutes les sections invisibles. */
html:not(.js) .apparait { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .apparait { opacity: 1; transform: none; transition: none; }
  .bouton:hover, .don-option input:checked + label { transform: none; }
  .bandeau-cookies { transition: none; }
}

/* ---------- Impression ---------- */
@media print {
  .entete, .pied, .bandeau-cookies, .evitement, .bouton { display: none !important; }
  body { background: #fff; color: #000; }
  .apparait { opacity: 1; transform: none; }
}

/* ---------- Formulaire : anti-robot et retours ---------- */
/* Pot de miel : invisible a l'oeil et au lecteur d'ecran, mais bien present
   dans le DOM pour qu'un automate le remplisse. `display:none` seul est
   detecte par les robots un peu serieux : on le sort de l'ecran. */
.pot-de-miel {
  position: absolute !important;
  inline-size: 1px; block-size: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.message-ok,
.message-erreur {
  margin-block-start: 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: var(--rayon);
  border: 1.5px solid;
  font-size: var(--t-petit);
}
.message-ok { border-color: #1f7a4d; background: #eef8f2; color: #14532d; }
.message-erreur { border-color: var(--rouge, #c0392b); background: #fdf0ee; color: #8c2318; }

/* ---------- Defi anti-robot : glisser la piece dans l'encoche ---------- */
.defi-titre {
  display: block; font-weight: 600; font-family: "Poppins", sans-serif;
  font-size: var(--t-petit); margin-block-end: .6rem;
}
.defi-rail {
  --defi-piece: 3rem;
  position: relative;
  block-size: 3.4rem;
  border: 1.5px solid var(--ligne);
  border-radius: 999px;
  background: var(--fond-2);
  touch-action: none;          /* le doigt fait glisser, il ne fait pas defiler */
  overflow: hidden;
}
.defi-encoche {
  position: absolute; inset-block: .35rem;
  inline-size: var(--defi-piece);
  border: 2px dashed var(--ligne);
  border-radius: 999px;
  opacity: .9;
}
.defi-piece {
  position: absolute; inset-block: .3rem; inset-inline-start: 0;
  inline-size: var(--defi-piece);
  display: grid; place-items: center;
  border: 0; border-radius: 999px;
  background: var(--rouge, #c0392b); color: #fff;
  cursor: grab; touch-action: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}
.defi-piece:active { cursor: grabbing; }
.defi-piece svg { inline-size: 1.25rem; block-size: 1.25rem; }
.defi-actif .defi-piece { box-shadow: 0 4px 16px rgba(0, 0, 0, .28); }
/* Reussite : l'encoche se remplit, la piece se fond dedans. */
.defi-reussi { border-color: #1f7a4d; background: #eef8f2; }
.defi-reussi .defi-encoche { border-style: solid; border-color: #1f7a4d; background: #dff0e6; }
.defi-reussi .defi-piece { background: #1f7a4d; }
.defi-etat { font-size: var(--t-petit); margin-block: .5rem 0; min-block-size: 1.2em; }
.defi-repli {
  border: 0; background: none; padding: .35rem 0;
  font-size: var(--t-petit); color: var(--encre-2);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.defi-repli:hover { color: var(--encre); }

/* Le glisser suppose un pointeur ou un doigt. Pour qui n'en a pas, le repli
   par addition est mis en avant plutot que cache derriere un lien. */
@media (hover: none) and (pointer: coarse) { .defi-piece { inline-size: 3.5rem; } }
