/* ==========================================================================
   COEUR2BOUCHONS — Couche « modern » 1.2.0 (novembre 2026)
   Chargée après style.css, visual-refresh.css et home-refresh.css.
   Charte inchangée : bleu #1e73be, vert #43a047, rouge #e53935, encre #162d42,
   Manrope (titres) + Source Sans 3 (texte). Seules des nuances plus foncées
   des mêmes teintes sont utilisées quand le contraste texte l'exige (AA).
   ========================================================================== */

:root {
  --c2b-blue-ink: #155a96;
  --c2b-green-ink: #2e7d32;
  --c2b-red-ink: #c62828;
  --c2b-ink: #162d42;
  --c2b-brand-gradient: linear-gradient(90deg, #1e73be 0 33.33%, #43a047 33.33% 66.66%, #e53935 66.66% 100%);
  --c2b-ease: cubic-bezier(.2, .7, .2, 1);
  --c2b-header-offset: 150px;
}

html { scroll-padding-top: var(--c2b-header-offset); }
::selection { background: rgba(30, 115, 190, .18); color: inherit; }

/* ---------- Lien d'évitement (accessibilité clavier / lecteurs d'écran) ---------- */
.c2b-skip-link {
  position: absolute; left: 16px; top: -120px; z-index: 10000;
  padding: 12px 20px; border-radius: 10px;
  background: var(--c2b-ink); color: #fff !important;
  font: 700 16px/1.2 Manrope, Arial, sans-serif; text-decoration: none;
  transition: top .2s var(--c2b-ease);
}
.c2b-skip-link:focus { top: 12px; outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px var(--c2b-blue); }
main:focus { outline: none; }

/* ---------- Lisibilité des textes ---------- */
:is(h1, h2, h3, .section-title) { text-wrap: balance; }
main :is(p, li) { text-wrap: pretty; }
main :is(p, li) a:not(.btn) { text-underline-offset: .18em; text-decoration-thickness: 1px; }

/* ---------- En-tête : se compacte au défilement ---------- */
.header { transition: box-shadow .3s var(--c2b-ease); }
.header-inner { transition: padding .3s var(--c2b-ease); }
.brand-slogan { transition: opacity .2s ease; }
body.c2b-scrolled .header { box-shadow: 0 10px 30px rgb(12 40 63 / 8%); }
@media (min-width: 1101px) {
  body.c2b-scrolled .header-inner { padding-block: 10px 8px !important; row-gap: 6px !important; }
  body.c2b-scrolled .brand-slogan { opacity: 0; height: 0; margin: 0; overflow: hidden; }
}

/* ---------- Navigation : soulignement aux couleurs de la charte ---------- */
@media (min-width: 1101px) {
  body .nav a { position: relative; white-space: nowrap; text-decoration: none !important; }
  body .nav a:not(.nav-cta-don)::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; border-radius: 3px;
    background: var(--c2b-brand-gradient);
    transform: scaleX(0); transform-origin: left; transition: transform .25s var(--c2b-ease);
  }
  body .nav a:not(.nav-cta-don):hover::after,
  body .nav a:not(.nav-cta-don)[aria-current="page"]::after,
  body .nav a:not(.nav-cta-don).active::after { transform: scaleX(1); }
  body .nav a[aria-current="page"] { color: var(--c2b-blue-ink); }

  /* « Faire un don » devient un bouton discret mais repérable */
  body .nav a.nav-cta-don {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 16px !important; border-radius: 999px !important;
    background: var(--c2b-red-ink) !important; color: #fff !important;
    box-shadow: 0 4px 14px rgb(198 40 40 / 22%);
    transition: background .2s ease, transform .2s var(--c2b-ease), box-shadow .2s ease;
  }
  body .nav a.nav-cta-don:hover { background: #a91f1f !important; transform: translateY(-1px); box-shadow: 0 8px 20px rgb(198 40 40 / 28%); }
}
@media (min-width: 1440px) { body .nav a { font-size: 15px; } }
.nav a.nav-cta-don::before {
  content: ""; flex: none; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.3C.9 8.3 3 4.5 6.7 4.5c2.1 0 3.6 1.1 4.3 2.6.1.2.4.2.5 0 .7-1.5 2.2-2.6 4.3-2.6 3.7 0 5.8 3.8 4.3 7.2C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.3C.9 8.3 3 4.5 6.7 4.5c2.1 0 3.6 1.1 4.3 2.6.1.2.4.2.5 0 .7-1.5 2.2-2.6 4.3-2.6 3.7 0 5.8 3.8 4.3 7.2C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 1100px) { body .nav a.nav-cta-don { display: flex; align-items: center; gap: 8px; } }

/* Menu mobile : le don en bouton pleine largeur, page courante signalée */
@media (max-width: 1100px) {
  body .nav a { flex: 1 0 100%; justify-content: flex-start; text-align: left; border-radius: 10px !important; }
  body .nav a[aria-current="page"] { color: var(--c2b-blue-ink); font-weight: 800; text-decoration: none !important; background: rgb(30 115 190 / 7%); box-shadow: inset 4px 0 0 var(--c2b-blue); }
  body .nav a.nav-cta-don {
    justify-content: center; margin-top: 8px; padding-inline: 16px !important;
    background: var(--c2b-red-ink) !important; color: #fff !important; border-radius: 12px !important;
  }
}

/* ---------- Cartes d'action : relief léger et code couleur du badge ---------- */
.action-card { position: relative; overflow: hidden; transition: transform .25s var(--c2b-ease), box-shadow .25s ease; }
.action-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c2b-blue); }
.action-card:has(.green-bg)::before { background: var(--c2b-green); }
.action-card:has(.red-bg)::before { background: var(--c2b-red); }
.action-card:hover, .action-card:focus-within { transform: translateY(-4px); box-shadow: 0 18px 40px rgb(12 40 63 / 10%); }

/* Étapes du parcours : pastille numérotée */
.process-card { transition: box-shadow .25s ease; }
.process-card:hover { box-shadow: 0 14px 34px rgb(12 40 63 / 8%); }

/* Galerie : léger zoom des aperçus */
.lumiere-gallery-previews button { overflow: hidden; }
.lumiere-gallery-previews img { transition: transform .5s var(--c2b-ease); }
.lumiere-gallery-previews button:hover img { transform: scale(1.04); }

/* ---------- Apparition douce des blocs (uniquement si JavaScript + mouvement autorisé) ---------- */
.c2b-motion .c2b-reveal { opacity: 0; transform: translateY(18px); }
.c2b-motion .c2b-reveal.c2b-visible {
  opacity: 1; transform: none;
  transition: opacity .6s var(--c2b-ease), transform .6s var(--c2b-ease);
  transition-delay: var(--c2b-delay, 0s);
}

/* ---------- Bandeau de confiance (remplace les styles en ligne) ---------- */
.c2b-trust { background: #f8fafc; border-top: 1px solid #e3eaf0; border-bottom: 1px solid #e3eaf0; padding: 28px 0; }
.c2b-trust-inner {
  width: min(1200px, calc(100% - 40px)); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 32px;
}
.c2b-trust-item { position: relative; padding: 4px 0 4px 20px; text-align: left; }
.c2b-trust-item::before { content: ""; position: absolute; left: 0; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--c2b-blue); }
.c2b-trust-green::before { background: var(--c2b-green); }
.c2b-trust-red::before { background: var(--c2b-red); }
.c2b-trust-item strong { display: block; color: var(--c2b-ink); font: 800 17px/1.3 Manrope, Arial, sans-serif; }
.c2b-trust-item span { display: block; margin-top: 4px; color: #4c6272; font-size: 16px; line-height: 1.5; }
@media (max-width: 760px) { .c2b-trust-inner { grid-template-columns: 1fr; } }

/* ---------- Barre d'action mobile (déposer / devenir bénévole) ---------- */
.c2b-mobile-cta { display: none; }
@media (max-width: 760px) {
  .c2b-mobile-cta {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgb(255 255 255 / 96%); backdrop-filter: blur(8px);
    border-top: 1px solid #e3eaf0; box-shadow: 0 -8px 24px rgb(12 40 63 / 8%);
    transition: transform .3s var(--c2b-ease);
  }
  .c2b-mobile-cta a {
    display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 10px;
    border-radius: 12px; text-align: center; text-decoration: none;
    font: 700 15px/1.2 Manrope, Arial, sans-serif;
  }
  .c2b-mobile-cta a.c2b-cta-primary { background: var(--c2b-blue-ink) !important; color: #fff !important; }
  .c2b-mobile-cta a.c2b-cta-secondary { background: #fff !important; color: var(--c2b-green-ink) !important; border: 2px solid var(--c2b-green-ink); }
  .c2b-js .c2b-mobile-cta { transform: translateY(110%); }
  .c2b-js body.c2b-scrolled .c2b-mobile-cta { transform: none; }
  body.c2b-has-mobile-cta { padding-bottom: 76px; }
  body.c2b-has-mobile-cta .grecaptcha-badge { bottom: 84px !important; }
}

/* ---------- Préférences de mouvement ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .action-card, .process-card, .lumiere-gallery-previews img, .nav a, .nav a::after, .c2b-mobile-cta, .header-inner { transition: none !important; }
  .action-card:hover, .action-card:focus-within, .lumiere-gallery-previews button:hover img { transform: none; }
}

/* ---------- Impression ---------- */
@media print {
  .topbar, .nav, .nav-toggle, .social-icons, .c2b-mobile-cta, .c2b-skip-link, .home-social-feed, .carousel-btn, .carousel-dots { display: none !important; }
  .header { position: static !important; box-shadow: none !important; }
}
