
/* ===== RESET & VARIABLES ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --rose:      #E8426A;
  --rose-lt:   #FCEEF2;
  --teal:      #1A8A7A;
  --teal-lt:   #EAF5F3;
  --teal-mid:  #2BA898;
  --ink:       #1A1A2E;
  --muted:     #6B7280;
  --warm:      #F8F6F1;
  --white:     #FFFFFF;
  --border:    #E5E7EB;
  --shadow:    0 4px 24px rgba(26,26,46,0.08);
  --shadow-lg: 0 16px 48px rgba(26,26,46,0.14);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--warm);
  padding-top: 72px;
}

/* ===== NAVBAR ===== */
nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
  height: 72px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  transition: box-shadow 0.3s;
}
nav.scrolled { box-shadow: var(--shadow); }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 2px;
  text-decoration: none;
}
.nav-logo .apo,
.nav-logo .o        { font-family: 'Playfair Display', serif; font-size: 1.7rem; font-weight: 700; color: var(--teal); letter-spacing: -0.02em; }
.nav-logo .ribbon-icon { font-size: 1.4rem; line-height: 1; margin: 0 -1px; }

.nav-links { display: flex; gap: 8px; list-style: none; align-items: center; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s;
}
.nav-links a:hover         { color: var(--teal); background: var(--teal-lt); }
.nav-links .cta-btn        { background: var(--rose); color: var(--white) !important; }
.nav-links .cta-btn:hover  { background: #c73058 !important; }

/* Rubrique affichée à l'écran (classe .active ajoutée par script.js au défilement) */
.nav-links a.active        { color: var(--teal); background: var(--teal-lt); box-shadow: inset 0 -2px 0 var(--teal); }
.nav-links .cta-btn.active { background: #c73058; box-shadow: 0 0 0 3px var(--rose-lt); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: 0.3s;
}

/* ===== SECTIONS — général ===== */
section { scroll-margin-top: 72px; }

.section-header    { text-align: center; margin-bottom: 64px; }
.section-label {
  display: inline-block;
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--rose); background: var(--rose-lt);
  padding: 4px 14px; border-radius: 100px; margin-bottom: 16px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem; font-weight: 700;
  color: var(--ink); line-height: 1.2; margin-bottom: 16px;
}
.section-description { font-size: 1rem; color: var(--muted); max-width: 600px; margin: 0 auto; }

/* Canvas molécules */
#molecules-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; }

/* ===== HERO ===== */
#accueil {
  min-height: 92vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #F0FAF8 0%, #FFF7F9 60%, #FEF3F2 100%);
  position: relative;
  overflow: hidden;
}
#accueil::before {
  content: '';
  position: absolute; top: -120px; right: -120px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(232,66,106,0.08) 0%, transparent 70%);
  pointer-events: none;
}
#accueil::after {
  content: '';
  position: absolute; bottom: -80px; left: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(26,138,122,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 80px 40px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--rose-lt);
  border: 1px solid rgba(232,66,106,0.2);
  color: var(--rose);
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 100px; margin-bottom: 24px;
}

.hero-logo-big {
  font-family: 'Playfair Display', serif;
  font-size: 5.5rem; font-weight: 700;
  line-height: 1; margin-bottom: 12px;
  display: flex; align-items: center; gap: 4px;
}
.hero-logo-big .apo,
.hero-logo-big .o      { color: var(--teal); }
.hero-logo-big .ribbon-icon { font-size: 4.5rem; }

.hero-subtitle {
  font-size: 1rem; font-weight: 500;
  color: var(--muted); letter-spacing: 0.04em;
  text-transform: uppercase; line-height: 1.5;
  margin-bottom: 32px;
  border-left: 3px solid var(--rose);
  padding-left: 16px;
}

.hero-description {
  font-size: 1.05rem; color: #374151;
  line-height: 1.75; margin-bottom: 40px;
}

.hero-meta { display: flex; gap: 24px; flex-wrap: wrap; }
.meta-chip {
  display: flex; align-items: center; gap: 8px;
  background: white; border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 20px; font-size: 0.9rem;
  width: 260px;
}
.meta-chip .meta-icon { font-size: 1.2rem; }
.meta-chip strong { font-weight: 600; color: var(--teal); display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.meta-chip span   { color: var(--muted); font-size: 0.85rem; }

/* Cartes équipe */
.team-card-grid { display: flex; flex-direction: column; gap: 16px; }

.team-card {
  background: white; border: 1px solid var(--border);
  border-radius: 16px; padding: 20px 24px;
  display: flex; align-items: center; gap: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}
.team-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.team-card img {
  width: 60px; height: 60px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid var(--teal-lt); flex-shrink: 0;
}
.team-card-info   { flex: 1; }
.team-card-name   { font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.team-card-role   { font-size: 0.8rem; color: var(--teal); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }

.role-badge { padding: 4px 12px; border-radius: 100px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.role-pres  { background: #FEF3C7; color: #92400E; }
.role-sec   { background: #E0F2FE; color: #0369A1; }
.role-tres  { background: #D1FAE5; color: #065F46; }

/* ===== OBJECTIFS ===== */
#objectifs { background: white; padding: 100px 40px; }
.objectifs-inner { max-width: 1200px; margin: 0 auto; }

.objectifs-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 28px; margin-bottom: 80px;
}

.objectif-card {
  border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border);
  background: white; box-shadow: var(--shadow);
  transition: transform 0.35s cubic-bezier(.22,.68,0,1.2), box-shadow 0.35s;
}
.objectif-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }

.objectif-card-top { padding: 40px 36px 32px; text-align: center; }
.teal-gradient  { background: linear-gradient(135deg, #EAF5F3, #D1F0EB); }
.green-gradient { background: linear-gradient(135deg, #F0FDF4, #DCFCE7); }
.blue-gradient  { background: linear-gradient(135deg, #EFF6FF, #DBEAFE); }

.objectif-icon-wrap {
  width: 72px; height: 72px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  background: white; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.objectif-icon-wrap img { width: 44px; height: 44px; object-fit: contain; }

.objectif-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem; font-weight: 700;
  color: var(--ink); line-height: 1.3;
}
.objectif-card-bottom { padding: 28px 36px; }
.objectif-card-bottom p { font-size: 0.95rem; color: var(--muted); line-height: 1.7; }

.objectifs-text {
  background: var(--warm); border-radius: 20px;
  padding: 48px 56px;
  display: grid; grid-template-columns: 1fr 2fr;
  gap: 40px; align-items: start;
  border: 1px solid var(--border);
}
.objectifs-text-label {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; font-weight: 700; color: var(--teal);
}
.objectifs-text-body p { font-size: 0.95rem; color: #374151; line-height: 1.75; margin-bottom: 12px; }
.objectifs-text-body p:last-child { margin-bottom: 0; }

/* ===== RÉALISATIONS ===== */
#realisations { background: var(--warm); padding: 100px 40px; }
.realisations-inner { max-width: 1200px; margin: 0 auto; }

.realisations-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.realisation-card {
  background: white; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  display: flex;
  transition: transform 0.3s, box-shadow 0.3s;
}
.realisation-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.realisation-img { width: 160px; flex-shrink: 0; overflow: hidden; }
.realisation-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.realisation-content { padding: 28px 32px; }
.realisation-tag {
  display: inline-block; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--teal); background: var(--teal-lt);
  padding: 3px 10px; border-radius: 100px; margin-bottom: 12px;
}
.realisation-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 700; color: var(--ink);
  margin-bottom: 8px; line-height: 1.3;
}
.realisation-desc { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }

/* ===== PROJETS ===== */
#projets { background: white; padding: 100px 40px; }
.projets-inner { max-width: 1200px; margin: 0 auto; }

.projets-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.projet-card {
  border-radius: 20px; background: white;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(.22,.68,0,1.2), box-shadow 0.35s;
}
.projet-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }

.projet-card-img { height: 180px; overflow: hidden; position: relative; }
.projet-card-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s;
}
.projet-card:hover .projet-card-img img { transform: scale(1.06); }
.projet-card-img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(26,26,46,0.5));
}

.projet-number {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  width: 36px; height: 36px; border-radius: 10px;
  background: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; color: var(--teal);
}

.projet-card-body { padding: 28px; }
.projet-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 700; color: var(--ink);
  margin-bottom: 10px; line-height: 1.3;
}
.projet-card-desc { font-size: 0.88rem; color: var(--muted); line-height: 1.65; }

/* ===== ÉVÉNEMENTS ===== */
#evenements { background: var(--warm); padding: 100px 40px; }
.evenements-inner { max-width: 1200px; margin: 0 auto; }

.evenements-list { display: flex; flex-direction: column; gap: 32px; }

.evenement {
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 36px 40px 40px;
}

.evenement-head { margin-bottom: 24px; }
.evenement-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem; font-weight: 700; color: var(--ink);
  line-height: 1.3; margin-bottom: 8px;
}
.evenement-date {
  display: inline-block;
  font-size: 0.85rem; font-weight: 600;
  color: var(--teal); background: var(--teal-lt);
  padding: 4px 14px; border-radius: 100px;
  margin-bottom: 4px;
}
.evenement-desc { font-size: 0.92rem; color: var(--muted); line-height: 1.65; max-width: 720px; }

.evenement-photos {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  /* Barre de défilement masquée (le défilement reste actif) */
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* anciens Edge / IE */
}
.evenement-photos::-webkit-scrollbar { display: none; }  /* Chrome, Safari, Edge */

.evenement-photos img {
  flex: 0 0 auto;
  width: 460px; height: 340px;
  object-fit: cover; display: block;
  border-radius: 14px;
  border: 1px solid var(--border);
  cursor: zoom-in;
  transition: filter 0.3s ease, box-shadow 0.3s ease;
}
.evenement-photos img:hover { filter: brightness(1.06); box-shadow: var(--shadow-lg); }
.evenement-photos img:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

/* --- Texte sous les photos --- */
.evenement-text {
  margin-top: 28px;
  padding-left: 20px;
  border-left: 3px solid var(--rose);
  max-width: 820px;
}
.evenement-text-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem; font-weight: 700; color: var(--teal);
  line-height: 1.3; margin-bottom: 14px;
}
.evenement-text p { font-size: 0.95rem; color: #374151; line-height: 1.75; margin-bottom: 12px; }
.evenement-text p:last-child { margin-bottom: 0; }
.evenement-text-closing { font-weight: 600; color: var(--ink) !important; }

/* --- Lightbox (agrandissement des photos) --- */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(26,26,46,0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}
.lightbox.open { opacity: 1; visibility: visible; }

.lightbox-img {
  max-width: 92vw; max-height: 88vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: scale(0.96);
  transition: transform 0.25s ease;
}
.lightbox.open .lightbox-img { transform: scale(1); }

.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  width: 44px; height: 44px;
  border: none; border-radius: 50%;
  background: white; color: var(--ink);
  font-size: 1.6rem; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.lightbox-close:hover { background: var(--rose); color: white; transform: rotate(90deg); }

/* --- Boîte « Notre histoire » (sous Siège Social) --- */
.hero-meta--histoire { margin-top: 16px; }
.meta-chip--bouton {
  font: inherit; text-align: left; color: inherit;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.meta-chip--bouton:hover { border-color: var(--teal); box-shadow: var(--shadow); transform: translateY(-2px); }
.meta-chip--bouton:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.meta-chip--bouton .meta-text  { display: block; }
.meta-chip--bouton .meta-arrow { margin-left: 12px; color: var(--teal); font-size: 1.1rem; transition: transform 0.2s; }
.meta-chip--bouton:hover .meta-arrow { transform: translateX(4px); }

/* --- Fenêtre « Histoire de l'APRIO » --- */
.histoire-modal {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(26,26,46,0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}
.histoire-modal.open { opacity: 1; visibility: visible; }

.histoire-panel {
  position: relative;
  width: 100%; max-width: 820px; max-height: 90vh;
  display: flex; flex-direction: column;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  overflow: hidden;
  transform: translateY(12px) scale(0.97);
  transition: transform 0.25s ease;
}
.histoire-modal.open .histoire-panel { transform: none; }

/* Bouton de fermeture : reste visible pendant le défilement du texte */
.histoire-close {
  top: 14px; right: 14px;
  width: 40px; height: 40px;
  background: var(--warm);
  box-shadow: 0 2px 8px rgba(26,26,46,0.15);
  z-index: 2;
}

.histoire-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 44px 48px 40px;
}

.histoire-kicker {
  display: inline-block;
  font-size: 0.85rem; font-weight: 600;
  color: var(--teal); background: var(--teal-lt);
  padding: 4px 14px; border-radius: 100px;
  margin-bottom: 12px;
}
.histoire-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem; font-weight: 700; line-height: 1.2;
  color: var(--ink);
  margin-bottom: 28px;
  padding-right: 40px;
}

/* Les deux fondateurs */
.histoire-fondateurs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  max-width: 520px; margin: 0 auto 32px;
}
.histoire-fondateur { text-align: center; }

/* Cadre du portrait : fond doux + rubans roses animés derrière la photo (sans fond) */
.histoire-portrait {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--rose-lt) 0%, #fff 55%, var(--teal-lt) 100%);
}
.histoire-portrait img {
  position: relative; z-index: 1;   /* au-dessus des rubans */
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
}
.histoire-portrait-fond {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
}

/* Rubans roses (créés par script.js) : chaque « piste » monte de bas en haut */
.ruban-piste {
  position: absolute; inset: 0;
  opacity: var(--op, 0.6);
  transform: translateY(var(--y, 40%));   /* position fixe si animations réduites */
}
.ruban {
  position: absolute; top: 0; left: var(--x);
  width: var(--w); height: calc(var(--w) * 1.25);
  color: var(--c);
}

/* Animation uniquement si l'utilisateur n'a pas demandé de réduire les mouvements,
   et seulement pendant que la fenêtre est ouverte */
@media (prefers-reduced-motion: no-preference) {
  .ruban-piste {
    opacity: 0;
    animation: ruban-monte var(--dur, 10s) linear var(--delay, 0s) infinite paused;
  }
  .ruban {
    animation: ruban-vire var(--sway, 3.5s) ease-in-out var(--delay, 0s) infinite alternate paused;
  }
  .histoire-modal.open .ruban-piste,
  .histoire-modal.open .ruban { animation-play-state: running; }
}
@keyframes ruban-monte {
  0%   { transform: translateY(100%); opacity: 0; }
  12%  { opacity: var(--op, 0.6); }
  88%  { opacity: var(--op, 0.6); }
  100% { transform: translateY(-50px); opacity: 0; }
}
@keyframes ruban-vire {
  from { transform: translateX(-9px) rotate(-22deg); }
  to   { transform: translateX(9px)  rotate(22deg); }
}
.histoire-fondateur figcaption { margin-top: 10px; line-height: 1.4; }
.histoire-fondateur-nom {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem; font-weight: 700; color: var(--ink);
}
.histoire-fondateur-role { display: block; font-size: 0.85rem; font-weight: 500; color: var(--teal); }

/* Texte */
.histoire-text p { font-size: 0.98rem; color: #374151; line-height: 1.8; margin-bottom: 14px; }
.histoire-text p:last-child { margin-bottom: 0; }
.histoire-text .histoire-conviction {
  margin: 22px 0;
  padding-left: 18px;
  border-left: 3px solid var(--rose);
  font-weight: 600; color: var(--ink);
}

@media (max-width: 768px) {
  .histoire-modal   { padding: 14px; }
  .histoire-scroll  { padding: 32px 22px 28px; }
  .histoire-title   { font-size: 1.6rem; margin-bottom: 22px; }
  .histoire-fondateurs { gap: 12px; }
}

/* --- Fenêtre « Membres de l'association » --- */
.membres-modal {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(26,26,46,0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}
.membres-modal.open { opacity: 1; visibility: visible; }

.membres-panel {
  position: relative;
  width: 100%; max-width: 820px; max-height: 90vh;
  display: flex; flex-direction: column;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  overflow: hidden;
  transform: translateY(12px) scale(0.97);
  transition: transform 0.25s ease;
}
.membres-modal.open .membres-panel { transform: none; }

.membres-close {
  top: 14px; right: 14px;
  width: 40px; height: 40px;
  background: var(--warm);
  box-shadow: 0 2px 8px rgba(26,26,46,0.15);
  z-index: 2;
}

.membres-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 44px 48px 40px;
}

.membres-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.membre-card {
  background: var(--warm);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 16px 18px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.membre-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.membre-card img {
  width: 84px; height: 84px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid var(--teal-lt);
  margin: 0 auto 14px;
  display: block;
}
.membre-card-nom {
  font-family: 'Playfair Display', serif;
  font-weight: 700; font-size: 1rem; color: var(--ink);
  margin-bottom: 4px;
}
.membre-card-role {
  font-size: 0.78rem; font-weight: 500; color: var(--teal);
  text-transform: uppercase; letter-spacing: 0.04em;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .membres-modal  { padding: 14px; }
  .membres-scroll { padding: 32px 22px 28px; }
  .membres-grid   { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (max-width: 480px) {
  .membres-grid   { grid-template-columns: 1fr; }
}

/* ===== FOOTER ===== */
footer { background: var(--ink); color: rgba(255,255,255,0.6); padding: 60px 40px 40px; }

.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 32px;
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 2rem; font-weight: 700; color: white;
  display: flex; align-items: center; gap: 2px; margin-bottom: 16px;
}
.footer-logo .apo,
.footer-logo .o { color: var(--teal-mid); }

.footer-tagline { font-size: 0.88rem; line-height: 1.65; max-width: 280px; }

.footer-col-title {
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: white; margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,0.55); text-decoration: none; font-size: 0.88rem; transition: color 0.2s; }
.footer-col ul li a:hover { color: white; }
.footer-col address { font-style: normal; font-size: 0.88rem; line-height: 1.8; }

.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem;
}

/* ===== ANIMATIONS ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: none; }
.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-inner                         { grid-template-columns: 1fr; gap: 60px; }
  .hero-logo-big                      { font-size: 4rem; }
  .objectifs-grid, .projets-grid      { grid-template-columns: repeat(2, 1fr); }
  .footer-inner                       { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  nav { padding: 0 20px; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute; top: 72px; left: 0; right: 0;
    background: white; border-bottom: 1px solid var(--border);
    padding: 16px; gap: 4px;
  }
  .nav-links.open { display: flex; }
  .hamburger      { display: flex; }

  .hero-inner                         { padding: 60px 24px; grid-template-columns: 1fr; }
  .hero-logo-big                      { font-size: 3.2rem; }
  .hero-meta                          { flex-direction: column; }
  .meta-chip                          { width: 100%; }

  #objectifs, #realisations, #projets, #evenements { padding: 64px 24px; }
  .section-title                      { font-size: 2rem; }

  .objectifs-grid, .projets-grid      { grid-template-columns: 1fr; }
  .objectifs-text                     { grid-template-columns: 1fr; padding: 32px; gap: 24px; }

  .evenement                          { padding: 24px 20px 28px; }
  .evenement-photos                   { gap: 10px; }
  .evenement-photos img               { width: 82%; height: 240px; }

  .realisations-grid                  { grid-template-columns: 1fr; }
  .realisation-card                   { flex-direction: column; }
  .realisation-img                    { width: 100%; height: 200px; }

  .footer-inner                       { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom                      { flex-direction: column; gap: 8px; text-align: center; }
}

/* ===== COMMENTAIRES ===== */
#commentaires { background: white; padding: 100px 40px; }
.commentaires-inner { max-width: 1200px; margin: 0 auto; }

.commentaires-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 48px;
  align-items: start;
}

/* --- Formulaire --- */
.commentaire-form-card {
  background: var(--warm);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  position: sticky;
  top: 92px;
}

.form-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  resize: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(26,138,122,0.12);
}

.char-count {
  position: absolute;
  bottom: 10px;
  right: 14px;
  font-size: 0.75rem;
  color: var(--muted);
  pointer-events: none;
}

.btn-submit {
  width: 100%;
  padding: 14px 24px;
  background: var(--teal);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  margin-top: 4px;
}
.btn-submit:hover { background: #14766A; box-shadow: 0 6px 20px rgba(26,138,122,0.3); transform: translateY(-1px); }
.btn-submit:active { transform: translateY(0); }
.btn-submit.loading { opacity: 0.7; cursor: not-allowed; }
.btn-icon { font-size: 1rem; }

.form-feedback {
  margin-top: 14px;
  font-size: 0.88rem;
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s, padding 0.3s;
}
.form-feedback.show { max-height: 80px; padding: 12px 16px; }
.form-feedback.success { background: #D1FAE5; color: #065F46; }
.form-feedback.error   { background: #FEE2E2; color: #991B1B; }

/* --- Liste --- */
.commentaires-list {
  display: flex; flex-direction: column; gap: 16px;
  max-height: 560px;            /* hauteur maximale du bloc */
  overflow-y: auto;             /* ascenseur vertical */
  padding: 4px 12px 4px 4px;    /* évite que les ombres soient coupées */
  scrollbar-width: thin;
  scrollbar-color: var(--teal) var(--border);
}
.commentaires-list::-webkit-scrollbar { width: 8px; }
.commentaires-list::-webkit-scrollbar-track { background: var(--border); border-radius: 100px; }
.commentaires-list::-webkit-scrollbar-thumb { background: var(--teal); border-radius: 100px; }
.commentaires-list .comment-card { flex-shrink: 0; }

.comment-card {
  background: var(--warm);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px 28px;
  position: relative;
  transition: box-shadow 0.25s, transform 0.25s;
  animation: slideIn 0.4s ease both;
}
.comment-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.comment-meta { flex: 1; }
.comment-name { font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.comment-role-date {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.comment-role-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--teal-lt);
  color: var(--teal);
}

.comment-date { font-size: 0.78rem; color: var(--muted); }

.comment-text {
  font-size: 0.92rem;
  color: #374151;
  line-height: 1.7;
}

/* --- Réponse d'un médecin / de l'équipe sous un commentaire --- */
.comment-reponse {
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--teal-lt);
  border-left: 3px solid var(--teal);
  border-radius: 0 14px 14px 0;
}
.comment-reponse-head {
  display: flex; align-items: baseline; flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 4px;
}
.comment-reponse-label {
  font-size: 0.85rem; font-weight: 600; color: var(--teal);
}
.comment-reponse-label::before { content: '↳ '; }
.comment-reponse-text {
  font-size: 0.92rem; color: #374151; line-height: 1.7;
  white-space: pre-wrap;
}

.quote-icon {
  position: absolute;
  top: 20px; right: 24px;
  font-size: 2.5rem;
  color: var(--border);
  line-height: 1;
  font-family: Georgia, serif;
  pointer-events: none;
}

.comments-loading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 32px;
  color: var(--muted);
  font-size: 0.9rem;
}

.loading-spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.comments-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
  font-size: 0.95rem;
}
.comments-empty .empty-icon { font-size: 2.5rem; display: block; margin-bottom: 12px; }

.btn-load-more {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-load-more:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-lt); }

/* Responsive commentaires */
@media (max-width: 1024px) {
  .commentaires-layout { grid-template-columns: 1fr; }
  .commentaire-form-card { position: static; }
  .commentaires-list { max-height: 480px; }
}
@media (max-width: 768px) {
  #commentaires { padding: 64px 24px; }
  .commentaire-form-card { padding: 28px 24px; }
}


/* ===== INTRO : ANIMATION DU LOGO AU LANCEMENT ===== */
.intro { position: fixed; inset: 0; z-index: 9999; }

/* Mêmes teintes que le fond de la page d'accueil */
.intro__fond {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 65%),
    linear-gradient(135deg, #F0FAF8 0%, #FFF7F9 60%, #FEF3F2 100%);
}
.intro__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}

/* Pendant l'intro : pas de défilement, et les blocs du site attendent la fin pour apparaître */
html.intro-actif { overflow: hidden; }
html.intro-actif .fade-up,
html.intro-actif .fade-up.visible {
  opacity: 0;
  transform: translateY(30px);
  transition: none;
}

/* ==========================================================================
   FAIRE UN DON
   ========================================================================== */
#don {
  position: relative;
  overflow: hidden;
  padding: 100px 40px;
  background: linear-gradient(135deg, #F0FAF8 0%, #FFF7F9 60%, #FEF3F2 100%);
}
#don::before {
  content: '';
  position: absolute; top: -120px; right: -120px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(232,66,106,0.08) 0%, transparent 70%);
  pointer-events: none;
}
#don::after {
  content: '';
  position: absolute; bottom: -80px; left: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(26,138,122,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.don-inner { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; }

.donation-container {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  background: var(--white);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  position: relative;
  z-index: 1;
}

/* Colonne gauche : Explications & Déduction */
.donation-info {
  background: linear-gradient(135deg, var(--teal), #12585B);
  color: var(--white);
  padding: 44px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.info-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
}
.info-header h2 .accent {
  font-style: italic;
  color: #FFD9E1;
  position: relative;
  white-space: nowrap;
}
.info-header h2 .accent::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: rgba(255, 217, 225, 0.5);
  border-radius: 2px;
}

.info-header p {
  font-size: 0.95rem;
  color: #E0F2F1;
  line-height: 1.7;
}

.tax-badge {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  padding: 22px;
  margin: 28px 0;
}

.tax-badge h3 {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  color: #B9F0DA;
}

.tax-badge p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--white);
}

/* --- Calculateur de coût réel --- */
.calc-box {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  padding: 22px;
}
.calc-box h3 {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  color: #B9F0DA;
}
.calc-toggle {
  display: flex;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 100px;
  padding: 3px;
  margin-bottom: 18px;
}
.calc-toggle button {
  flex: 1;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.calc-toggle button.active {
  background: var(--white);
  color: var(--teal);
}

.calc-field {
  position: relative;
  margin-bottom: 16px;
}
.calc-field input {
  width: 100%;
  padding: 12px 16px;
  padding-right: 40px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.calc-field input::placeholder { color: rgba(255,255,255,0.5); font-weight: 400; }
.calc-field input:focus { border-color: #B9F0DA; background: rgba(255,255,255,0.16); }
.calc-field span {
  position: absolute; top: 50%; right: 16px; transform: translateY(-50%);
  font-weight: 600; color: rgba(255,255,255,0.7); pointer-events: none;
}
.calc-presets {
  display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap;
}
.calc-preset {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.calc-preset:hover, .calc-preset.active { background: rgba(255,255,255,0.28); border-color: rgba(255,255,255,0.5); }
.calc-result {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
}
.calc-result + .calc-result {
  border-top: 1px solid rgba(255,255,255,0.18);
}
.calc-result-label { font-size: 0.88rem; color: #E0F2F1; }
.calc-result-value { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700; color: var(--white); }
.calc-result--highlight .calc-result-label { color: #B9F0DA; font-weight: 600; }
.calc-result--highlight .calc-result-value { font-size: 1.5rem; color: #B9F0DA; }

.info-footer {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem;
  color: #B2DFDB;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 18px;
}

/* Colonne droite : Modes de paiement */
.donation-methods {
  padding: 44px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Pluie de billets animée en arrière-plan (décoratif, opacité 30%) */
.billets-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}
.billet {
  position: absolute;
  top: -12%;
  width: 56px;
  height: 32px;
  animation-name: billet-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes billet-fall {
  0%   { top: -12%; transform: translateX(0) rotate(0deg); }
  15%  { transform: translateX(18px) rotate(70deg); }
  30%  { transform: translateX(-16px) rotate(140deg); }
  45%  { transform: translateX(20px) rotate(210deg); }
  60%  { transform: translateX(-18px) rotate(280deg); }
  75%  { transform: translateX(14px) rotate(340deg); }
  90%  { transform: translateX(-10px) rotate(400deg); }
  100% { top: 112%; transform: translateX(0) rotate(440deg); }
}

.method-card {
  background: var(--warm);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  z-index: 1;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.method-card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}


/* Bandeau diagonal « Prochainement » (angle haut droit de la carte) */
.method-card--soon { overflow: hidden; }
.ribbon-soon {
  position: absolute;
  top: 26px;
  right: -42px;
  width: 160px;
  padding: 5px 0;
  line-height: 1.4;
  background: #D62839;
  color: var(--white);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  transform: rotate(45deg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  pointer-events: none;
  z-index: 2;
}

.method-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.method-icon {
  font-size: 1.3rem;
  background: var(--white);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.method-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
}

.method-body {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.65;
}

.address-box {
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 10px;
  font-style: normal;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.9rem;
}

.btn-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 18px;
  background: var(--teal);
  color: var(--white);
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.btn-email:hover { background: #14766A; box-shadow: 0 6px 20px rgba(26,138,122,0.3); transform: translateY(-1px); }
.btn-email:active { transform: translateY(0); }
.btn-email { border: none; cursor: pointer; }

/* ==========================================================================
   MODALE RIB
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,26,46,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: var(--white);
  border-radius: 18px;
  max-width: 420px;
  width: 100%;
  padding: 32px;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.2s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--warm);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.modal-close:hover { background: var(--rose-lt); color: var(--rose); }
.modal-box h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 18px;
  padding-right: 30px;
}

/* Bandeau « Prochainement » dans la modale RIB (angle haut gauche, pour ne pas masquer la croix) */
.modal-box--soon { overflow: hidden; }
.modal-box--soon h3 { padding-top: 32px; }
.ribbon-soon--left {
  top: 26px;
  right: auto;
  left: -42px;
  width: 160px;
  line-height: 1.4;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  transform: rotate(-45deg);
}

.rib-table { width: 100%; border-collapse: collapse; }
.rib-table td {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--ink);
  vertical-align: top;
}
.rib-table td:first-child { color: var(--muted); font-weight: 500; width: 38%; }
.rib-table td:last-child { font-weight: 600; letter-spacing: 0.02em; }
.rib-table tr:last-child td { border-bottom: none; }
.rib-note {
  margin-top: 18px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--muted);
}

@media (max-width: 860px) {
  .donation-container { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  #don { padding: 64px 24px; }
}
@media (max-width: 600px) {
  .donation-info, .donation-methods { padding: 28px 24px; }
}

/* ===== RESPONSIVE — COMPLÉMENTS ===== */

/* L'accueil est une grille dans un conteneur flex : sans min-width: 0 elle refuse
   de rétrécir sous la largeur de son contenu et déborde sur les petits écrans (320 px). */
.hero-inner { width: 100%; min-width: 0; }
.hero-left, .hero-right { min-width: 0; }

/* Hauteurs d'écran : dvh/svh tiennent compte de la barre d'adresse mobile (vh en secours) */
#accueil { min-height: 92svh; }
.histoire-panel, .membres-panel { max-height: 90dvh; }
.lightbox-img { max-height: 88dvh; }

/* Titres fluides : la taille suit la largeur de l'écran au lieu de sauter par paliers */
.section-title { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem); }
.hero-logo-big { font-size: clamp(2.6rem, 1.4rem + 7vw, 5.5rem); }
.hero-logo-big .ribbon-icon { font-size: 0.82em; }

@media (max-width: 768px) {
  /* Cibles tactiles d'au moins 44 px */
  .hamburger { width: 44px; height: 44px; align-items: center; justify-content: center; margin-right: -10px; }
  .nav-links { max-height: calc(100dvh - 72px); overflow-y: auto; }
  .nav-links a { display: block; padding: 12px 16px; font-size: 1rem; }
  .calc-preset { min-height: 40px; }

  /* 16 px minimum dans les champs : iOS ne zoome plus la page quand on tape */
  .form-group input, .form-group select, .form-group textarea { font-size: 16px; }

  footer { padding: 48px 24px 32px; }
  .footer-col ul li { margin-bottom: 0; }
  .footer-col ul li a { display: inline-block; padding: 10px 0; }
}

/* Boutons « Membres » / « Notre histoire » en pleine largeur : la flèche va au bord droit */
.meta-chip--bouton .meta-arrow { margin-left: auto; padding-left: 12px; }

@media (max-width: 480px) {
  nav { padding: 0 16px; }
  .hero-subtitle br { display: none; } /* les retours à la ligne forcés isolent des mots sur petit écran */
  .hero-inner { padding: 48px 16px; gap: 40px; }
  #objectifs, #realisations, #projets, #evenements, #commentaires, #don { padding: 56px 16px; }
  .section-header { margin-bottom: 40px; }

  .team-card { padding: 16px; gap: 14px; }
  .role-badge { display: none; } /* le rôle est déjà écrit sous le nom */

  .objectif-card-top { padding: 32px 22px 24px; }
  .objectif-card-bottom { padding: 22px; }
  .objectifs-text { padding: 24px 20px; }
  .realisation-content { padding: 22px 20px; }
  .evenement { padding: 20px 16px 24px; }
  .evenement-photos img { width: 88%; height: 220px; }

  .commentaire-form-card { padding: 24px 18px; }

  .donation-info, .donation-methods { padding: 24px 18px; }
  .calc-box { padding: 16px; }
  .calc-toggle button { font-size: 0.8rem; padding: 9px 8px; white-space: nowrap; }
  .calc-presets { display: grid; grid-template-columns: repeat(4, 1fr); }
  .calc-preset { padding: 10px 0; }

  footer { padding: 44px 16px 28px; }
}

/* Très petits écrans : les deux choix du calculateur passent l'un sous l'autre */
@media (max-width: 380px) {
  .calc-toggle { flex-direction: column; border-radius: 14px; }
  .calc-toggle button { border-radius: 11px; }
}

/* ===== PAYSAGE & TABLETTES ===== */

/* Le menu complet ne tient sur une ligne qu'à partir de ~1000 px : en dessous (tablette en portrait,
   grand smartphone en paysage 844–932 px) il passait sur 2–3 lignes. Menu hamburger jusqu'à 1023 px. */
@media (max-width: 1023px) {
  nav { padding: 0 20px; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute; top: 72px; left: 0; right: 0;
    background: white; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 16px; gap: 4px;
    max-height: calc(100dvh - 72px); overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 16px; font-size: 1rem; }
  .hamburger { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; margin-right: -10px; }  .footer-col ul li { margin-bottom: 0; }
  .footer-col ul li a { display: inline-block; padding: 10px 0; }
  .calc-preset { min-height: 40px; }
}

/* Smartphone en paysage : écran large mais très peu haut */
@media (orientation: landscape) and (max-height: 500px) {
  /* Barre de menu plus basse pour laisser de la place au contenu */
  nav { height: 56px; }
  section { scroll-margin-top: 56px; }
  /* Menu ouvert sur deux colonnes : les 7 liens tiennent dans la hauteur */
  .nav-links.open { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
  .nav-links { top: 56px; max-height: calc(100dvh - 56px); padding: 8px 16px; }
  .nav-links a { padding: 9px 16px; }
  .version-badge { top: 4px; left: 4px; }

  /* Accueil sur deux colonnes (texte | équipe) au lieu d'une longue colonne */
  body { padding-top: 56px; }
  #accueil { min-height: 0; }
  .hero-inner { grid-template-columns: 1.15fr 1fr; gap: 28px; padding: 28px 24px 36px; align-items: start; }
  .hero-logo-big { font-size: clamp(2.2rem, 13vh, 3.4rem); }
  .hero-meta { flex-direction: column; gap: 10px; }
  .meta-chip { width: 100%; padding: 10px 16px; }
  .hero-meta--histoire { margin-top: 10px; }
  .team-card-grid { gap: 10px; }
  .team-card { padding: 12px 16px; gap: 14px; }
  .team-card img { width: 48px; height: 48px; }
  .role-badge { display: none; }

  /* Sections moins hautes */
  #objectifs, #realisations, #projets, #evenements, #commentaires, #don { padding: 44px 24px; }
  .section-header { margin-bottom: 32px; }
  .section-title { font-size: clamp(1.6rem, 9vh, 2.2rem); }

  /* Photos d'événement à la hauteur de l'écran */
  .evenement-photos img { height: 62dvh; width: calc(62dvh * 1.35); max-width: 80vw; }

  /* Fenêtres « Notre histoire » / « Membres » : presque tout l'écran */
  .histoire-modal, .membres-modal, .lightbox { padding: 8px; }
  .histoire-panel, .membres-panel { max-height: calc(100dvh - 16px); }
  .histoire-scroll, .membres-scroll { padding: 24px 28px; }
  .membres-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .lightbox-img { max-height: calc(100dvh - 16px); }

  footer { padding: 36px 24px 24px; }
}

/* Champ piège anti-robots du formulaire de commentaires : invisible pour les visiteurs */
.champ-piege {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Macaron de version (mis à jour par version.sh à la racine du projet) :
   un rond « V » dans le coin supérieur gauche ; la version apparaît au survol (ou au toucher / au clavier). */
.version-badge {
  position: fixed;
  top: 6px;
  left: 6px;
  z-index: 1001;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #1A8A7A;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', sans-serif;
  box-shadow: 0 1px 4px rgba(26, 26, 46, 0.18);
  cursor: default;
  outline: none;
  opacity: 0;
  transition: opacity .2s ease;
}

.version-badge::before {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  width: 36px;
  height: 36px;
}

.version-v {
  font-size: 0.45rem;
  font-weight: 700;
  line-height: 1;
}

.version-badge:hover,
.version-badge:focus-visible {
  opacity: 1;
}

.version-badge:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1A8A7A;
}

.version-popup {
  position: absolute;
  top: 50%;
  left: calc(100% + 8px);
  transform: translate(-4px, -50%);
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 10px;
  background: #1A1A2E;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 18px rgba(26, 26, 46, 0.2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}

.version-popup::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 100%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: #1A1A2E;
}

.version-badge:hover .version-popup,
.version-badge:focus .version-popup {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
}

@media (prefers-reduced-motion: reduce) {
  .version-popup { transition: none; }
}
