/* ═══════════════════════════════════════════════════════════════════════════
   Coupes dans le vélo (budget 2027) : bannière rouge en haut de l'accueil et
   fenêtre plein écran noire, dans l'esprit de la fin de recap-velo (fond noir,
   lueur rouge qui pulse, nom qui « glitche », écrans qu'on fait défiler).
   Script : assets/coupes.js. Chiffres et sources : DONNEES.md, « Coupes ».
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Bannière de l'accueil ── */
.alerte-coupes {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  width: 100%; margin: 0 0 22px; padding: 12px 18px;
  border: none; border-radius: 14px;
  background: #d1121b; color: #fff;
  font: inherit; font-size: 15px; line-height: 1.35; text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(0,0,0,.28);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.alerte-coupes:hover { background: #e0141e; transform: translateY(-2px); box-shadow: 0 6px 0 rgba(0,0,0,.28); }
.alerte-coupes:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.alerte-coupes strong { font-weight: 700; }
.alerte-texte { flex: 1 1 260px; }
.alerte-point {
  flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,.7);
  animation: alerte-pouls 1.6s ease-out infinite;
}
@keyframes alerte-pouls { 70% { box-shadow: 0 0 0 9px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
.alerte-voir {
  flex-shrink: 0; padding: 6px 14px; border-radius: 999px;
  background: #fff; color: #b00e16;
  font-family: 'Poppins', 'IBM Plex Sans', sans-serif; font-weight: 600; font-size: 14px; white-space: nowrap;
}
#main-header .alerte-coupes { grid-column: 1 / -1; }

/* ── Fenêtre plein écran ── */
.coupes[hidden] { display: none; }
.coupes {
  --rouge: #ff2b2b; --texte: #f4f1ea;
  position: fixed; inset: 0; z-index: 3000;
  background: #000; color: var(--texte);
  font-family: 'IBM Plex Sans', sans-serif;
}
.coupes::before {     /* lueur rouge qui pulse sur les bords */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(150,0,0,.45) 100%);
  animation: coupes-pouls 3.2s ease-in-out infinite;
}
@keyframes coupes-pouls { 50% { opacity: .5; } }
.coupes.secoue .coupes-defile { animation: coupes-secousse .3s linear; }
@keyframes coupes-secousse {
  20% { transform: translate(-6px, 2px); } 40% { transform: translate(5px, -3px); }
  60% { transform: translate(-4px, 1px); } 80% { transform: translate(3px, -1px); } 100% { transform: none; }
}

/* Le site colore h2, p et p strong (style.css) : la fenêtre reprend ses propres couleurs */
.coupes h2, .coupes p, .coupes li, .coupes blockquote { color: var(--texte); }
.coupes h2 { display: block; }
.coupes h2::before { display: none; }
.coupes p strong { color: inherit; }
.coupes .coupes-zero strong, .coupes .citation strong { color: var(--rouge); }

.coupes-fermer {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid rgba(244,241,234,.5); background: rgba(0,0,0,.6); color: var(--texte);
  font-size: 26px; line-height: 1; cursor: pointer;
}
.coupes-fermer:hover { background: rgba(255,255,255,.12); }
.coupes-fermer:focus-visible { outline: 3px solid var(--rouge); outline-offset: 3px; }

/* Barre en segments, un par écran (comme des stories), comme recap-velo :
   segments créés par coupes.js. Centrée en haut sur ordinateur, sur toute la
   largeur sur téléphone. */
.coupes-progression {
  position: absolute; top: 30px; left: 50%; z-index: 3; transform: translateX(-50%);
  display: flex; gap: 3px; width: min(260px, calc(100% - 140px)); height: 4px;
  color: var(--texte); pointer-events: none;
}
.coupes-progression i {
  flex: 1 1 0; border-radius: 4px; overflow: hidden;
  background: color-mix(in srgb, currentColor 25%, transparent);
}
.coupes-progression i::after {
  content: ""; display: block; height: 100%; width: 100%;
  background: currentColor; border-radius: 4px;
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s ease;
}
.coupes-progression i.rempli::after { transform: scaleX(1); }
@media (max-width: 600px) {
  .coupes-progression { top: 8px; left: 12px; right: 12px; width: auto; height: 3px; gap: 2px; transform: none; }
}

/* Flèches ‹ › sur ordinateur, comme recap-velo : souris seulement, fenêtre assez
   large pour ne pas toucher le texte ; même trait de 1,5 px que le bouton × */
.coupes-fleche { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  .coupes-fleche {
    position: absolute; top: 50%; z-index: 3; transform: translateY(-50%);
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; padding: 0; border-radius: 50%; cursor: pointer;
    border: 1.5px solid currentColor; background: transparent; color: var(--texte);
    opacity: .7; transition: opacity .2s ease, background-color .2s ease;
  }
  .coupes-fleche.prec { left: 24px; }
  .coupes-fleche.suiv { right: 24px; }
  .coupes-fleche[hidden] { display: none; }
  .coupes-fleche:hover { opacity: 1; background: rgba(255,255,255,.12); }
  .coupes-fleche:focus-visible { opacity: 1; outline: 2px solid var(--rouge); outline-offset: 3px; }
  .coupes-fleche svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
}

.coupes-defile {
  position: relative; z-index: 2; height: 100%;
  overflow-y: auto; overscroll-behavior: contain;
  /* Écran par écran : on ne peut pas s'arrêter entre deux écrans, et un geste
     ne saute pas d'écran (snap-stop). Un écran plus haut que la fenêtre (petit
     téléphone) se lit quand même au complet avant de passer au suivant. */
  scroll-snap-type: y mandatory;
}
.coupes-ecran {
  min-height: 100%; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; align-items: center; justify-content: center;
  padding: 72px 24px 56px;
}
.coupes-contenu { width: min(760px, 100%); text-shadow: 0 2px 18px #000; }

.coupes .surtitre {
  margin: 0 0 14px; color: var(--rouge);
  font-weight: 700; font-size: clamp(14px, 2.2vw, 18px); text-transform: uppercase; letter-spacing: .08em;
}
.coupes .titre-geant {
  margin: 0 0 18px;
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: clamp(36px, 8.5vw, 92px); line-height: .98; letter-spacing: -.035em;
  text-wrap: balance;
}
.coupes .titre-geant.moyen { font-size: clamp(30px, 6vw, 64px); }
.coupes .nombre-geant {
  margin: 0; color: var(--rouge);
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: clamp(64px, 17vw, 180px); line-height: .9; letter-spacing: -.045em; white-space: nowrap;
}
.coupes .etiquette {
  margin: 12px 0 22px;
  font-family: 'Poppins', sans-serif; font-weight: 600;
  font-size: clamp(20px, 4vw, 34px); line-height: 1.15; letter-spacing: -.02em;
}
.coupes .sous { margin: 0 0 18px; font-size: clamp(16px, 2.4vw, 20px); line-height: 1.5; }
.coupes .note { margin: 18px 0 0; font-size: 13.5px; line-height: 1.55; color: rgba(244,241,234,.7); }
.coupes .pastille {
  display: inline-block; padding: 2px 10px; border-radius: 999px; vertical-align: middle;
  background: var(--rouge); color: #000; font-size: .6em; letter-spacing: 0;
}
.coupes .defiler { margin-top: 30px; font-size: 15px; color: rgba(244,241,234,.7); }
.coupes .defiler span { display: inline-block; animation: coupes-rebond 1.6s ease-in-out infinite; }
@keyframes coupes-rebond { 50% { transform: translateY(8px); } }

/* Nom qui « glitche » (comme recap-velo) */
.coupes .glitch { position: relative; display: inline-block; color: var(--rouge); }
.coupes .glitch::before, .coupes .glitch::after {
  content: attr(data-texte); position: absolute; inset: 0; pointer-events: none;
}
.coupes .glitch::before { color: #00e5ff; animation: coupes-glitch-a 3s steps(1) infinite; clip-path: inset(0 0 55% 0); }
.coupes .glitch::after  { color: #fff;    animation: coupes-glitch-b 2.4s steps(1) infinite; clip-path: inset(50% 0 0 0); }
@keyframes coupes-glitch-a { 0%, 86% { transform: none; opacity: 0; } 88% { transform: translate(-6px, 2px); opacity: 1; } 92% { transform: translate(4px, -2px); opacity: 1; } 94%, 100% { transform: none; opacity: 0; } }
@keyframes coupes-glitch-b { 0%, 80% { transform: none; opacity: 0; } 84% { transform: translate(6px, -1px); opacity: 1; } 90% { transform: translate(-5px, 2px); opacity: 1; } 92%, 100% { transform: none; opacity: 0; } }

/* Barres 300 M$ contre 15 M$ (largeur proportionnelle au montant) */
.coupes-barres { display: grid; gap: 12px; margin: 6px 0 4px; }
.coupes-barre { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 12px; font-size: 14px; }
.coupes-barre span { color: rgba(244,241,234,.75); }
.coupes-barre b {
  display: flex; align-items: center; justify-content: flex-end;
  width: var(--l); min-width: 64px; height: 38px; padding: 0 10px; border-radius: 6px;
  background: rgba(244,241,234,.85); color: #000;
  font-family: 'Poppins', sans-serif; font-size: 16px; white-space: nowrap; text-shadow: none;
}
.coupes-barre.coupe b { background: var(--rouge); }
.coupes-zero { margin: 18px 0 0; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: clamp(20px, 3.6vw, 30px); }
.coupes-zero strong { color: var(--rouge); }
@media (max-width: 520px) { .coupes-barre { grid-template-columns: 1fr; gap: 4px; } }

/* Citations du PDI */
.coupes .citation {
  margin: 0 0 18px; padding: 0 0 0 16px; border-left: 3px solid var(--rouge);
  font-size: clamp(17px, 2.6vw, 22px); line-height: 1.45;
}
.coupes .citation del { color: rgba(244,241,234,.55); text-decoration-color: var(--rouge); text-decoration-thickness: 2px; }
.coupes .citation strong { color: var(--rouge); }

/* BIXI : avant / après et tarifs */
.coupes .avant-apres { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 0; }
.coupes .avant-apres div { padding: 14px 16px; border-radius: 14px; background: rgba(244,241,234,.08); }
.coupes .avant-apres span { display: block; font-size: 13px; color: rgba(244,241,234,.7); }
.coupes .avant-apres b { font-family: 'Poppins', sans-serif; font-size: 28px; }
.coupes .avant-apres .coupe b { color: var(--rouge); }
.coupes .evolution { display: flex; align-items: baseline; gap: 18px; margin: 0; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: clamp(48px, 10vw, 104px); letter-spacing: -.04em; color: var(--rouge); }
.coupes .evolution span { color: rgba(244,241,234,.55); text-decoration: line-through; text-decoration-thickness: 4px; }
.coupes .evolution i { font-style: normal; font-size: .5em; color: var(--texte); }
.coupes .tarifs { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.coupes .tarifs li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; padding: 9px 0; border-bottom: 1px solid rgba(244,241,234,.15); }
.coupes .tarifs s { color: rgba(244,241,234,.5); }
.coupes .tarifs b { color: var(--rouge); }

/* « Qu'est-ce qu'on peut faire ? » sous « Le vélo mérite mieux qu'une coupe » */
.coupes .coupes-question {
  margin: 8px 0 0; color: var(--rouge);
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: clamp(24px, 4.4vw, 42px); line-height: 1.1; letter-spacing: -.02em;
}

/* Fin : sources et bouton */
.coupes .sources { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.7; color: rgba(244,241,234,.8); }
.coupes .sources a { color: var(--texte); text-decoration: underline; text-underline-offset: 3px; }
.coupes .sources a:hover { color: var(--rouge); }
.coupes .bouton-fin {
  margin-top: 26px; padding: 13px 26px; border-radius: 999px; border: none;
  background: var(--texte); color: #000;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 16px; cursor: pointer;
}
.coupes .bouton-fin:focus-visible { outline: 3px solid var(--rouge); outline-offset: 3px; }

/* Dernier écran : carte verte « Deviens membre », comme la fin de recap-velo */
.coupes-ecran-membre .coupes-contenu { display: flex; justify-content: center; text-shadow: none; }
.coupes-carte {
  --lime: #c6f432; --encre: #120d1f;
  width: min(560px, 100%);
  padding: clamp(28px, 5vw, 44px);
  border-radius: 28px;
  background: #11965d; color: #fffdf7;
  border: 2px solid rgba(255,255,255,.18);
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
  text-align: left;
}
.coupes .coupes-carte p, .coupes .coupes-carte h2 { color: #fffdf7; }
.coupes-carte-photo {
  display: block; width: 96px; height: 96px; margin-bottom: 22px;
  border-radius: 50%; object-fit: cover; border: 3px solid var(--lime);
}
.coupes .coupes-carte-titre {
  margin: 0 0 14px;
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: clamp(26px, 4.6vw, 40px); line-height: 1.12;
}
.coupes .coupes-carte-texte { margin: 0 0 28px; font-weight: 400; font-size: clamp(17px, 2.4vw, 21px); line-height: 1.45; }
.coupes .coupes-carte .coupes-carte-appel {
  margin: 0 0 14px; color: var(--lime);
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: clamp(19px, 2.8vw, 24px); line-height: 1.25;
}
.coupes-carte-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.coupes-carte-bouton {
  display: inline-block; padding: 14px 24px; border-radius: 999px; border: 2px solid var(--lime);
  background: var(--lime); color: var(--encre); text-decoration: none; cursor: pointer;
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 16px; line-height: 1.2;
}
.coupes-carte-bouton.membre:hover { background: #d8ff5a; border-color: #d8ff5a; }
.coupes-carte-bouton.petit { padding: 9px 16px; font-size: 14px; background: transparent; }
.coupes-carte-bouton.soutenir { color: var(--lime); }
.coupes-carte-bouton.soutenir:hover { background: rgba(198,244,50,.15); }
.coupes-carte-bouton:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* Apparition des écrans au défilement (classe posée par coupes.js) */
.coupes .apparait { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.coupes .vu .apparait { opacity: 1; transform: none; }
.coupes .vu .apparait:nth-child(2) { transition-delay: .12s; }
.coupes .vu .apparait:nth-child(3) { transition-delay: .24s; }
.coupes .vu .apparait:nth-child(4) { transition-delay: .36s; }
.coupes .vu .apparait:nth-child(n+5) { transition-delay: .48s; }

body.coupes-ouvert { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .alerte-point, .coupes::before, .coupes .defiler span { animation: none; }
  .coupes-progression i::after { transition: none; }
  .alerte-coupes:hover { transform: none; }
  .coupes.secoue .coupes-defile { animation: none; }
  .coupes .glitch::before, .coupes .glitch::after { display: none; }
  .coupes .apparait { opacity: 1; transform: none; transition: none; }
}
