/* =========================================================================
   FONDATION 5 DIRECTIONS — DESIGN SYSTEM & STYLES PRINCIPAUX
   ========================================================================= */

:root {
  /* Palette officielle */
  --color-primary: #1d3439;
  --color-secondary: #469171;
  --color-secondary-hover: #3b7d60;
  --color-accent-mint: #6ac384;
  --color-sage: #caded5;
  --color-surface-soft: #f0f2f1;
  --color-gold: #e0b770;
  --color-bg: #fbfbfb;
  --color-white: #ffffff;
  --color-border: rgba(29, 52, 57, 0.12);

  /* Typographie */
  --font-heading: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Mise en page & rayons */
  --container-max: 73rem; /* 1168px — identique au site original */
  --header-height: 84px;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 32px;
  --radius-pill: 9999px;

  /* Ombres */
  --shadow-sm: 0 4px 16px rgba(29, 52, 57, 0.06);
  --shadow-md: 0 12px 32px rgba(29, 52, 57, 0.08);
  --shadow-lg: 0 24px 60px rgba(29, 52, 57, 0.25);

  /* Transitions */
  --transition: 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================================================
   RESET & BASE
   ========================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 1rem;
  line-height: 1.3;
}

h1 {
  font-size: clamp(2.15rem, 4.8vw, 4rem);
  line-height: 1.22;
}

h2 {
  font-size: clamp(1.85rem, 3.4vw, 3rem);
  line-height: 1.28;
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.55rem);
}

h4 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.section {
  padding-block: clamp(4rem, 7vw, 6.25rem);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 0.85rem;
}

.section-header-center {
  text-align: center;
  max-width: 44rem;
  margin: 0 auto 3.25rem;
}

.section-intro {
  font-size: 1.05rem;
  color: rgba(29, 52, 57, 0.82);
}

/* =========================================================================
   BOUTONS
   ========================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.8rem 2.35rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-secondary);
  color: var(--color-white);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--color-secondary-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(70, 145, 113, 0.28);
  outline: none;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-full {
  width: 100%;
}

/* =========================================================================
   EN-TÊTE FIXE & NAVIGATION
   z-index: 1000 pour toujours rester au-dessus des iframes tiers (PayPal)
   ========================================================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background-color: transparent;
  transition: background-color var(--transition), box-shadow var(--transition);
}

.site-header.is-scrolled,
.site-header.is-menu-open {
  background-color: var(--color-sage);
  box-shadow: 0 4px 20px rgba(29, 52, 57, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo img {
  height: 54px;
  width: auto;
  object-fit: contain;
}

.site-nav {
  margin-left: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-white);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  position: relative;
  padding-block: 0.25rem;
  transition: color var(--transition), opacity var(--transition);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.site-header.is-scrolled .nav-links a,
.site-header.is-menu-open .nav-links a {
  color: var(--color-primary);
  text-shadow: none;
}

.site-header.is-scrolled .nav-links a:hover {
  color: var(--color-secondary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: background-color var(--transition);
}

.site-header.is-scrolled .menu-toggle,
.site-header.is-menu-open .menu-toggle {
  background: rgba(29, 52, 57, 0.08);
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background-color: var(--color-white);
  transition: transform var(--transition), opacity var(--transition), background-color var(--transition);
}

.site-header.is-scrolled .menu-toggle span,
.site-header.is-menu-open .menu-toggle span {
  background-color: var(--color-primary);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  background-color: var(--color-sage);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 14px 30px rgba(29, 52, 57, 0.14);
}

.mobile-menu-inner {
  padding-block: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mobile-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-nav-links a {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  padding: 0.5rem 0;
}

/* =========================================================================
   SECTION 1 : HERO
   ========================================================================= */

.hero-section {
  position: relative;
  min-height: min(92vh, 840px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-height) + 3.5rem) 0 4.5rem;
  background-image: url("../assets/images/hero.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--color-white);
  text-align: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(18, 32, 35, 0.48) 0%,
    rgba(0, 0, 0, 0.42) 55%,
    rgba(18, 32, 35, 0.54) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 52rem;
}

.hero-content h1 {
  color: var(--color-white);
  margin-bottom: 2rem;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
}

.hero-text {
  max-width: 45rem;
  margin-inline: auto;
  font-size: clamp(0.98rem, 1.3vw, 1.08rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.hero-divisions {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.hero-divisions li::before {
  content: "– ";
}

.hero-divisions strong {
  font-weight: 500;
  color: var(--color-white);
}

.hero-closing {
  margin-top: 1.15rem;
  font-style: italic;
}

/* =========================================================================
   SECTION 2 : CONTRIBUTION & DONS (REFONTE COMPLÈTE)
   ========================================================================= */

.donation-section {
  background-color: var(--color-bg);
}

.donation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: stretch;
}

.donation-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Crée un contexte d'empilement isolé pour empêcher les iframes PayPal (z-index: 100)
     de passer devant l'en-tête fixe lors du défilement */
  isolation: isolate;
  position: relative;
  z-index: 1;
}

.donation-card-online {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  justify-content: space-between;
  gap: 1.75rem;
}

.donation-card-bank {
  background-color: var(--color-surface-soft);
  border: 1px solid rgba(29, 52, 57, 0.08);
  box-shadow: var(--shadow-sm);
}

.donation-card-head {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.donation-card-head h3 {
  margin-bottom: 0.2rem;
}

.donation-card-sub {
  font-size: 0.92rem;
  color: rgba(29, 52, 57, 0.72);
  margin: 0;
}

.donation-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background-color: rgba(70, 145, 113, 0.14);
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.donation-icon-bank {
  background-color: var(--color-white);
}

.donation-icon svg {
  width: 26px;
  height: 26px;
}

/* Zone PayPal centrée & propre */
.paypal-embed-wrapper {
  background-color: #f8faf9;
  border: 1px solid rgba(70, 145, 113, 0.18);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.paypal-container {
  width: 100%;
  max-width: 400px;
  margin-inline: auto;
}

/* Harmonisation interne du widget PayPal lorsqu'il s'injecte */
.paypal-container h3,
.paypal-container #desc-label {
  font-family: var(--font-heading) !important;
  font-size: 1.1rem !important;
  color: var(--color-primary) !important;
  text-align: center;
}

.paypal-fallback {
  width: 100%;
  max-width: 380px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.paypal-fallback p {
  font-size: 0.95rem;
  color: rgba(29, 52, 57, 0.8);
}

.paypal-fallback.is-hidden {
  display: none;
}

/* Bandeau QR Code élégant */
.qr-strip {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.qr-thumb {
  flex-shrink: 0;
  width: 112px;
  height: 112px;
  padding: 6px;
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.qr-info h4 {
  margin-bottom: 0.3rem;
}

.qr-info p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(29, 52, 57, 0.78);
}

/* Carte Virement Bancaire Direct */
.bank-card-media {
  height: 205px;
  overflow: hidden;
  background-color: #dce5e1;
}

.bank-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.bank-card-body {
  padding: clamp(1.75rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
}

.bank-intro {
  font-size: 0.96rem;
  color: rgba(29, 52, 57, 0.85);
}

.bank-details {
  margin: 0;
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.4rem 1.25rem;
}

.bank-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
}

.bank-detail-row + .bank-detail-row {
  border-top: 1px solid rgba(29, 52, 57, 0.08);
}

.bank-detail-row dt {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(29, 52, 57, 0.65);
  font-weight: 500;
}

.bank-detail-row dd {
  margin: 0.1rem 0 0;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--color-primary);
}

.copy-btn {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-secondary);
  background-color: rgba(70, 145, 113, 0.12);
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.95rem;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}

.copy-btn:hover,
.copy-btn:focus-visible {
  background-color: var(--color-secondary);
  color: var(--color-white);
  outline: none;
}

.copy-btn.is-copied {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.bank-reference {
  font-size: 0.92rem;
  line-height: 1.55;
  padding: 0.95rem 1.15rem;
  background-color: rgba(202, 222, 213, 0.5);
  border-left: 3px solid var(--color-secondary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--color-primary);
  margin-top: auto;
}

.bank-reference strong {
  font-weight: 700;
}

/* =========================================================================
   SECTION 3 : À PROPOS DE NOUS + SÉPARATEUR NUAGES
   ========================================================================= */

.about-section {
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}

.about-inner {
  max-width: 52rem;
}

.about-copy {
  margin-top: 1.5rem;
  font-size: clamp(1rem, 1.3vw, 1.08rem);
  line-height: 1.8;
  color: rgba(29, 52, 57, 0.9);
}

.about-copy p {
  margin-bottom: 1.2rem;
}

.cloud-divider {
  width: 100%;
  line-height: 0;
  overflow: hidden;
  background-color: var(--color-bg);
}

.cloud-divider svg {
  display: block;
  width: 100%;
  height: clamp(85px, 14vw, 190px);
}

/* =========================================================================
   SECTION 4 : OBJECTIFS ET MISSIONS
   ========================================================================= */

.missions-section {
  background-color: var(--color-bg);
}

.missions-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(2.25rem, 5vw, 4.5rem);
  align-items: center;
}

.missions-media img {
  width: 100%;
  aspect-ratio: 4 / 4.2;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.missions-content h2 {
  margin-bottom: 1.5rem;
}

.missions-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.missions-list li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: rgba(29, 52, 57, 0.92);
}

.missions-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--color-secondary);
}

/* =========================================================================
   PIED DE PAGE
   ========================================================================= */

.site-footer {
  background-color: var(--color-sage);
  padding-block: 3.25rem 2.5rem;
  color: var(--color-primary);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-divider {
  border: 0;
  height: 2px;
  background-color: rgba(29, 52, 57, 0.12);
  margin: 2.25rem 0 1.75rem;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.94rem;
}

.footer-copy {
  margin: 0;
}

.footer-email {
  font-weight: 500;
  color: var(--color-primary);
  transition: color var(--transition);
}

.footer-email:hover {
  color: var(--color-secondary);
  text-decoration: underline;
}

/* =========================================================================
   FENÊTRE MODALE DE CONTACT (« DISCUTONS »)
   ========================================================================= */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background-color: rgba(15, 28, 31, 0.68);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  border-radius: 24px;
  background-image: url("../assets/images/contact-bg.jpg");
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-lg);
  color: var(--color-white);
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(29, 52, 57, 0.62);
}

.modal-close {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(29, 52, 57, 0.45);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition), transform var(--transition);
}

.modal-close:hover {
  background: rgba(29, 52, 57, 0.78);
  transform: scale(1.05);
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-body {
  position: relative;
  z-index: 1;
  padding: clamp(2.25rem, 5vw, 3.5rem);
}

.modal-body h2 {
  color: var(--color-white);
  text-align: center;
  margin-bottom: 1.75rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  padding: 0.95rem 1.15rem;
  transition: border-color var(--transition), background-color var(--transition);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.22);
}

.form-field textarea {
  resize: vertical;
  min-height: 130px;
}

.form-status {
  min-height: 1.4rem;
  margin: 0.25rem 0 0;
  font-size: 0.94rem;
  text-align: center;
  color: var(--color-sage);
}

.modal-direct-email {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.88);
}

.modal-direct-email a {
  color: var(--color-white);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================================================================
   RESPONSIVE (TABLETTE & MOBILE)
   ========================================================================= */

@media (max-width: 960px) {
  .site-nav {
    display: none;
  }

  .header-actions .btn-primary {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .donation-grid {
    grid-template-columns: 1fr;
  }

  .missions-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .missions-media img {
    max-height: 440px;
  }
}

@media (max-width: 575px) {
  :root {
    --header-height: 74px;
  }

  .brand-logo img {
    height: 44px;
  }

  .hero-section {
    min-height: 85vh;
    padding-top: calc(var(--header-height) + 2.5rem);
  }

  .qr-strip {
    flex-direction: column;
    text-align: center;
  }

  .bank-card-media {
    height: 170px;
  }

  .footer-top,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
