/**
 * projets.css — page vitrine « Projets » (projets.html)
 * ------------------------------------------------------------
 * Recentrée sur UN projet phare : « Premier Élan ».
 * Hero immersif → section phare éditoriale → bandeau initiatives sombre
 * → repère concis projet/initiative → CTA final. Page présentée comme
 * finalisée (aucun avertissement de développement).
 * S'appuie sur styles.css (--blue*, --text*, .container, .btn-*, .nav).
 * ------------------------------------------------------------ */

.projets-page {
  --pj-navy: #0b2350;
  --pj-navy-deep: #071a3d;
  --pj-ink: #0d2757;
  background: #f7faff;
}

/* ═══════════════ NAV TRANSPARENTE SUR LE HERO ═══════════════
   Desktop uniquement (le drawer mobile <901px garde le fond blanc).
   Voile sombre sur un pseudo → on anime son opacité, pas d'interpolation
   dégradé↔couleur. Filet de sécurité si le toggle .scrolled n'arrive pas. */
@media (min-width: 901px) {
  .projets-page .nav {
    background-color: transparent;
    border-bottom-color: transparent;
    box-shadow: none;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  }
  .projets-page .nav::before {
    content: "";
    position: absolute;
    inset: -1px -1px -46px -1px;
    background: linear-gradient(180deg, rgba(7, 20, 46, 0.74) 0%, rgba(7, 20, 46, 0.52) 58%, rgba(7, 20, 46, 0) 100%);
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }
  .projets-page .nav.scrolled::before { opacity: 0; }
  .projets-page .nav .nav-logo-text { color: #fff; transition: color 0.3s ease; }
  .projets-page .nav .nav-links > li > a:not(.nav-cta):not(.nav-login):not(.nav-donate):not(.nav-projets) {
    color: #fff;
    text-shadow: 0 1px 8px rgba(7, 20, 46, 0.5);
  }
  .projets-page .nav .nav-links > li > a:not(.nav-cta):not(.nav-login):not(.nav-donate):not(.nav-projets):hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
  }
  .projets-page .nav.scrolled .nav-links > li > a:not(.nav-cta):not(.nav-login):not(.nav-donate):not(.nav-projets) {
    text-shadow: none;
  }
  .projets-page .nav .nav-projets {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #fff !important;
  }
  .projets-page .nav .nav-projets svg { color: #fff; }
  .projets-page .nav .nav-donate {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    background: rgba(255, 255, 255, 0.08) !important;
  }
  .projets-page .nav.scrolled .nav-donate { background: transparent !important; }

  .projets-page .nav.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    border-bottom-color: rgba(26, 86, 219, 0.1);
    box-shadow: 0 2px 20px rgba(13, 39, 87, 0.08);
  }
  .projets-page .nav.scrolled .nav-logo-text { color: var(--blue-dark); }
  .projets-page .nav.scrolled .nav-links > li > a:not(.nav-cta):not(.nav-login):not(.nav-donate):not(.nav-projets) {
    color: var(--text);
  }
  .projets-page .nav.scrolled .nav-projets {
    background: var(--blue-pale) !important;
    color: var(--blue-dark) !important;
  }
  .projets-page .nav.scrolled .nav-projets svg { color: var(--blue); }
  .projets-page .nav.scrolled .nav-donate {
    color: var(--blue) !important;
    border-color: rgba(26, 86, 219, 0.25) !important;
  }
}

/* ═══════════════ HERO ═══════════════ */
.projets-hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 44px) 0 96px;
  overflow: hidden;
  isolation: isolate;
  background: var(--pj-navy-deep);
}
.projets-hero-media { position: absolute; inset: 0; z-index: -1; }
.projets-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 40%;
}
.projets-hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(7, 20, 46, 0.94) 0%, rgba(9, 26, 61, 0.78) 42%, rgba(9, 26, 61, 0.35) 72%, rgba(9, 26, 61, 0.15) 100%),
    linear-gradient(0deg, rgba(7, 20, 46, 0.55), rgba(7, 20, 46, 0) 45%);
}
.projets-hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
}
.projets-hero-inner { position: relative; z-index: 1; }
.projets-hero .page-back { margin-bottom: 26px; color: rgba(255, 255, 255, 0.6); }
.projets-hero .page-back:hover { color: #fff; }
.projets-hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin: 0 0 16px;
}
.projets-hero-title {
  font-family: var(--font-title);
  font-size: clamp(2.6rem, 6.2vw, 4.5rem);
  line-height: 0.98;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.projets-hero-accent { color: var(--blue-light); display: inline-block; }
.projets-hero-lead {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1rem, 1.6vw, 1.16rem);
  line-height: 1.65;
  max-width: 560px;
  margin: 22px 0 0;
}
.projets-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}
.projets-hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  line-height: 0;
  z-index: 1;
}
.projets-hero-wave svg { width: 100%; height: 90px; display: block; }

/* ═══════════════ EN-TÊTES DE SECTION ═══════════════ */
.projets-section { padding: 84px 0; background: #fff; }
.projets-section-pe { background: #f7faff; padding-top: 60px; }
.projets-section-head { max-width: 640px; margin-bottom: 30px; }
.projets-section-head h2 {
  font-family: var(--font-title);
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  line-height: 1.06;
  color: var(--pj-ink);
  margin: 8px 0 12px;
}
.projets-section-head .section-label { margin: 0; }
.projets-section-intro {
  font-size: 0.98rem;
  line-height: 1.62;
  color: var(--text-soft);
  margin: 0;
}
.projets-section-head-light h2 { color: #fff; }
.projets-section-head-light .projets-section-intro { color: rgba(255, 255, 255, 0.72); }

/* ═══════════════ PREMIER ÉLAN — PROJET PHARE ═══════════════ */
.projets-pe-label { display: block; margin: 0 0 22px; }
.projets-featured { position: relative; }
.projets-loading {
  padding: 48px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.pe {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  align-items: stretch;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(158deg, var(--pj-navy) 0%, #143a78 100%);
  box-shadow: 0 40px 90px -34px rgba(11, 35, 80, 0.55);
}
.pe-media {
  position: relative;
  margin: 0;
  min-height: 420px;
}
.pe-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pe-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(11, 35, 80, 0) 50%, rgba(11, 35, 80, 0.6) 100%),
    linear-gradient(0deg, rgba(11, 35, 80, 0.4), transparent 42%);
}
.pe-media-fallback { display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.05); }
.pe-media-fallback img { position: static; width: 96px; height: 96px; object-fit: contain; opacity: 0.5; }
.pe-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.95);
  color: var(--pj-ink);
}
.pe-badge.is-active::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.25);
}

.pe-body {
  padding: 44px 48px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #fff;
}
.pe-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin: 0;
}
.pe-title {
  font-family: var(--font-title);
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.02;
  margin: 0;
  color: #fff;
}
.pe-tagline {
  font-family: var(--font-title);
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-weight: 600;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
}
.pe-desc {
  font-size: 0.95rem;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.76);
  margin: 0;
}

.pe-more { margin: 0; }
.pe-more summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue-light);
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pe-more summary::-webkit-details-marker { display: none; }
.pe-more summary::before {
  content: "+";
  font-size: 1rem;
  line-height: 1;
}
.pe-more[open] summary::before { content: "−"; }
.pe-more-text {
  margin: 8px 0 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.68);
}

.pe-progress {
  margin-top: 8px;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pe-amounts { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.pe-raised {
  font-family: var(--font-title);
  font-size: 1.7rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.pe-target { font-size: 0.82rem; color: rgba(255, 255, 255, 0.6); }
.pe-progress-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.pe-pct { font-family: var(--font-title); font-size: 1rem; font-weight: 700; color: var(--blue-light); }
.pe-impact { font-size: 0.8rem; color: rgba(255, 255, 255, 0.78); }

.pe-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 10px;
}
.pe-support { text-decoration: none; }
.pe-learn {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}
.pe-learn:hover { border-color: #fff; }

/* Barre de progression premium (fine, animée, accessible) */
.projet-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
}
.pe-bar { background: rgba(255, 255, 255, 0.15); }
.projet-card-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  min-width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-light), #a9c9ff);
  transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ═══════════════ CARTES PROJET (projets additionnels, plus tard) ═══════════════ */
.projets-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 26px;
}
@media (max-width: 720px) { .projets-grid { grid-template-columns: 1fr; } }
.pcard {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(13, 39, 87, 0.09);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pcard:hover { transform: translateY(-3px); box-shadow: 0 20px 44px -18px rgba(13, 39, 87, 0.24); }
.pcard-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(150deg, var(--pj-navy), #1d4ed8);
  overflow: hidden;
}
.pcard-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pcard-cat {
  position: absolute; left: 14px; bottom: 12px; z-index: 1;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.09em;
  text-transform: uppercase; color: #fff;
}
.pcard-status {
  position: absolute; right: 12px; top: 12px; z-index: 1;
  padding: 3px 10px; border-radius: 999px; font-size: 0.64rem; font-weight: 700;
  background: rgba(255, 255, 255, 0.92); color: var(--pj-ink);
}
.pcard-body { display: flex; flex-direction: column; gap: 9px; padding: 18px 20px 20px; flex: 1; }
.pcard-title { font-family: var(--font-title); font-size: 1.14rem; line-height: 1.14; color: var(--pj-ink); margin: 0; }
.pcard-line { font-size: 0.85rem; line-height: 1.5; color: var(--text-soft); margin: 0; }
.pcard-meta { margin-top: 4px; display: flex; flex-direction: column; gap: 6px; }
.pcard-obj { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pcard-obj-label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); }
.pcard-obj-val { font-family: var(--font-title); font-size: 1rem; font-weight: 700; color: var(--pj-ink); }
.pcard-bar { background: var(--blue-pale); }
.pcard-bar .projet-card-bar-fill { background: linear-gradient(90deg, var(--blue), var(--blue-light)); }
.pcard-pct { font-size: 0.72rem; color: var(--text-muted); }
.pcard-foot { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 12px; }
.pcard-cta {
  font-size: 0.8rem; font-weight: 600; padding: 8px 16px; border-radius: 9px;
  background: var(--blue); color: #fff; text-decoration: none;
}
.pcard-cta:hover { background: #1344b5; }
.pcard-learn { font-size: 0.8rem; font-weight: 700; color: var(--blue); text-decoration: none; }
.pcard-learn:hover { text-decoration: underline; }

/* ═══════════════ INITIATIVES (bandeau sombre) ═══════════════ */
.projets-initiatives {
  position: relative;
  padding: 80px 0;
  background: radial-gradient(120% 90% at 85% 0%, #143a78 0%, var(--pj-navy) 45%, var(--pj-navy-deep) 100%);
  overflow: hidden;
  isolation: isolate;
}
.projets-initiatives-glow {
  position: absolute;
  width: 460px;
  height: 460px;
  left: -140px;
  bottom: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.28), transparent 70%);
  z-index: -1;
}
.projets-init-status { color: rgba(255, 255, 255, 0.66); font-size: 0.9rem; margin-bottom: 20px; }
.projets-init-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 860px) { .projets-init-grid { grid-template-columns: 1fr; } }
.projets-init-grid:empty { display: none; }

.icard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.icard-top { display: flex; align-items: center; justify-content: space-between; }
.icard-mark {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: rgba(96, 165, 250, 0.2); color: #fff;
  font-family: var(--font-title); font-weight: 700; font-size: 0.95rem;
}
.icard-pts { font-size: 0.74rem; font-weight: 700; color: var(--blue-light); }
.icard-title { font-family: var(--font-title); font-size: 1.06rem; line-height: 1.16; color: #fff; margin: 2px 0 0; }
.icard-desc {
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.68);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.icard-author { font-size: 0.72rem; color: rgba(255, 255, 255, 0.45); }
.icard-bar { height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); overflow: hidden; margin-top: 4px; }
.icard-bar-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue-light), #a9c9ff); }
.projets-init-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ═══════════════ REPÈRE CONCIS PROJET / INITIATIVE ═══════════════ */
.projets-distinct { background: #fff; padding: 56px 0; }
.projets-distinct-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 720px) { .projets-distinct-grid { grid-template-columns: 1fr; } }
.projets-distinct-col {
  position: relative;
  background: linear-gradient(160deg, #f7faff 0%, #eef4ff 100%);
  border: 1px solid rgba(13, 39, 87, 0.08);
  border-radius: 16px;
  padding: 22px 24px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.projets-distinct-col::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-light) 100%);
  opacity: 0.85;
}
.projets-distinct-col-init::before { background: linear-gradient(90deg, #2563eb 0%, #93c5fd 100%); }
.projets-distinct-col:hover {
  border-color: rgba(26, 86, 219, 0.22);
  box-shadow: 0 18px 34px -22px rgba(13, 39, 87, 0.35);
  transform: translateY(-2px);
}
.projets-distinct-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--blue-pale);
  color: var(--blue);
  margin-bottom: 12px;
}
.projets-distinct-icon svg { width: 17px; height: 17px; }
.projets-distinct-icon-alt { background: rgba(96, 165, 250, 0.16); color: #2563eb; }
.projets-distinct-tag {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}
.projets-distinct-tag-alt { color: #2563eb; }
.projets-distinct-col p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-soft);
  margin: 0;
}

/* ═══════════════ CTA FINAL ═══════════════ */
.projets-final {
  position: relative;
  padding: 92px 0 88px;
  text-align: center;
  color: #fff;
  background: linear-gradient(160deg, #143a78 0%, var(--pj-navy) 55%, var(--pj-navy-deep) 100%);
  overflow: hidden;
}
.projets-final-wave { position: absolute; top: -1px; left: 0; right: 0; line-height: 0; }
.projets-final-wave svg { width: 100%; height: 80px; display: block; }
.projets-final-inner { position: relative; z-index: 1; }
.projets-final .section-label.light { display: block; margin-bottom: 14px; }
.projets-final h2 {
  font-family: var(--font-title);
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.05;
  margin: 0 0 16px;
  color: #fff;
}
.projets-final-lead {
  font-size: 1.02rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.74);
  max-width: 520px;
  margin: 0 auto;
}
.projets-final-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

/* ═══════════════ RÉVÉLATION AU SCROLL ═══════════════ */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 940px) {
  .pe { grid-template-columns: 1fr; }
  .pe-media { min-height: 240px; }
}
@media (max-width: 640px) {
  .projets-hero { min-height: 0; padding: calc(var(--nav-h) + 30px) 0 92px; }
  .projets-hero-title { font-size: clamp(1.95rem, 8.5vw, 2.6rem); line-height: 1.02; }
  .projets-hero-lead { font-size: 0.98rem; }
  .projets-section, .projets-initiatives, .projets-distinct { padding: 54px 0; }
  .projets-final { padding: 72px 0 64px; }
  .pe-body { padding: 30px 24px; }
  .pe-raised { font-size: 1.45rem; }
  .projets-hero-cta .btn-primary,
  .projets-hero-cta .btn-outline-light,
  .projets-final-cta .btn-primary,
  .projets-final-cta .btn-outline-light,
  .projets-init-cta .btn-primary,
  .projets-init-cta .btn-outline-light,
  .pe-actions .btn-primary { width: 100%; text-align: center; }
  .pe-actions { flex-direction: column; align-items: stretch; }
  .pe-learn { text-align: center; }
}
