/* =========================================================
   EPHPHATA – Page de dons
   Charte : bleu royal / bleu ciel, or métallique, rouge d'appel
   ========================================================= */

:root {
  --blue-night: #0A1F44;
  --blue-deep: #0B2A66;
  --blue-royal: #0B3D91;
  --blue-mid: #1E63C6;
  --blue-sky: #5BA4E6;
  --blue-ice: #D9ECFF;

  --gold-dark: #A9781C;
  --gold: #D4A537;
  --gold-light: #F5D27A;
  --gold-pale: #FFF1C9;
  --gold-gradient: linear-gradient(180deg, #FFF3C4 0%, #F5D27A 28%, #D4A537 55%, #A9781C 78%, #E9C25E 100%);

  --red: #C8102E;
  --red-dark: #8E0B20;

  --ink: #0F1B33;
  --ink-soft: #4A5875;
  --line: #DCE3EF;
  --bg: #F4F7FC;
  --white: #FFFFFF;

  --airtel: #E40000;
  --moov: #0057B8;
  --visa: #1A1F71;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px -20px rgba(10, 31, 68, .35);
  --font-title: "Cinzel", "Times New Roman", serif;
  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 28px; } }

/* ---------- Boutons ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--h); padding: 0 26px;
  border: 0; border-radius: 999px; cursor: pointer;
  font: 700 15px/1 var(--font-body); letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--blue-sky); outline-offset: 3px; }
.btn--gold {
  color: var(--blue-night);
  background: var(--gold-gradient);
  box-shadow: 0 8px 22px -8px rgba(212, 165, 55, .8), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.btn--gold:hover { filter: brightness(1.06); box-shadow: 0 12px 28px -8px rgba(212, 165, 55, .9), inset 0 1px 0 rgba(255,255,255,.6); }
.btn--sm { --h: 40px; padding: 0 18px; font-size: 12px; white-space: nowrap; flex: none; }
.btn--lg { --h: 56px; font-size: 16px; padding: 0 34px; }
.btn--block { width: 100%; }

/* ---------- Bandeau église ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(10, 31, 68, .92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(245, 210, 122, .25);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; min-width: 0; }
.brand__logo { width: 36px; height: 36px; flex: none; color: var(--gold-light); }
.brand__text { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; line-height: 1.25; }
.brand__text strong { color: var(--gold-light); font-weight: 700; }
.brand__text em { font-style: normal; opacity: .75; }
@media (max-width: 520px) {
  .brand__text em { display: none; }
  .brand__text { font-size: 10.5px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  color: var(--white);
  border-bottom: 4px solid var(--gold);
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(217, 236, 255, .55), transparent 70%),
    radial-gradient(ellipse 60% 60% at 15% 60%, rgba(91, 164, 230, .45), transparent 70%),
    radial-gradient(ellipse 60% 60% at 85% 55%, rgba(91, 164, 230, .4), transparent 70%),
    linear-gradient(180deg, #3E86D8 0%, var(--blue-mid) 28%, var(--blue-royal) 62%, var(--blue-deep) 100%);
}
/* Rayons de lumière */
.hero__rays {
  position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1;
  background: repeating-conic-gradient(from 180deg at 50% 0%, rgba(255,255,255,.14) 0deg 4deg, transparent 4deg 13deg);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, #000 30%, transparent 75%);
  animation: rays 40s linear infinite;
  transform-origin: 50% 0;
}
@keyframes rays { from { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } to { transform: rotate(-3deg); } }
/* Voiles bleus */
.hero__veil {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 60% at -10% 80%, rgba(255,255,255,.18), transparent 50%),
    radial-gradient(120% 60% at 110% 70%, rgba(255,255,255,.16), transparent 50%),
    linear-gradient(180deg, transparent 60%, rgba(10, 31, 68, .55) 100%);
}
@media (prefers-reduced-motion: reduce) { .hero__rays { animation: none; } html { scroll-behavior: auto; } }

.hero__content { position: relative; text-align: center; padding: 96px 16px 56px; }
@media (min-width: 768px) { .hero__content { padding: 64px 28px 72px; } }

.hero__presents {
  margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .4em; text-transform: uppercase; opacity: .85;
}

/* Logo officiel (PNG/WebP transparent) */
.hero__logo { margin: 0 auto; line-height: 0; }
.hero__logo img {
  margin: 0 auto; width: 100%; max-width: 520px; height: auto;
  filter: drop-shadow(0 4px 2px rgba(90, 60, 5, .45)) drop-shadow(0 14px 26px rgba(10, 31, 68, .5));
}
@media (max-width: 640px) { .hero__logo img { max-width: 320px; } }
.hero__logo.no-img picture { display: none; }
.hero__logo-fallback { display: none; line-height: 1; }
.hero__logo.no-img img { display: none; }
.hero__logo.no-img .hero__logo-fallback { display: block; }

.title-gold {
  display: block;
  font-family: var(--font-title); font-weight: 800;
  font-size: clamp(40px, 10.5vw, 112px); letter-spacing: .02em; line-height: 1.1;
  padding: 0 .08em; /* évite que le dégradé rogne la dernière lettre */
  background: var(--gold-gradient);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(120, 80, 10, .55)) drop-shadow(0 10px 22px rgba(10, 31, 68, .45));
}

.hero__lead { max-width: 620px; margin: 18px auto 0; font-size: clamp(16px, 2.2vw, 19px); font-weight: 500; }

.verse {
  margin: 22px auto 0; max-width: 520px;
  font-family: var(--font-title); font-size: clamp(17px, 2.4vw, 21px); font-weight: 600; font-style: normal;
  color: var(--gold-pale);
}
.verse cite { display: block; margin-top: 6px; font-family: var(--font-body); font-size: 12px; font-style: normal; letter-spacing: .2em; text-transform: uppercase; opacity: .8; }
.verse--dark { color: var(--blue-royal); text-align: center; margin-top: 28px; }
.verse--dark cite { color: var(--ink-soft); }

.hero__cta { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 28px; }
.hero__secure { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; opacity: .9; }
.hero__secure svg { width: 16px; height: 16px; color: var(--gold-light); }
.hero__pay { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 760px; }
.pay-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(10, 31, 68, .35); border: 1px solid rgba(245, 210, 122, .35);
  font-size: 13px; font-weight: 700;
}
.pay-chip em { font-style: normal; font-weight: 500; opacity: .8; }
.pay-chip .flag { width: 20px; height: 13px; }

/* Ruban rouge "Appel aux dons" (rappel du badge "Entrée gratuite") */
.ribbon {
  position: absolute; top: 18px; left: 16px;
  width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  background: radial-gradient(circle at 35% 30%, #E8344F, var(--red) 55%, var(--red-dark));
  box-shadow: 0 10px 24px -8px rgba(142, 11, 32, .7), inset 0 0 0 3px rgba(255,255,255,.25);
  font: 800 12px/1.15 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
  transform: rotate(-8deg);
}
.ribbon::before, .ribbon::after {
  content: ""; position: absolute; bottom: -20px; width: 22px; height: 34px; background: var(--red-dark); z-index: -1;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 75%, 0 100%);
}
.ribbon::before { left: 24px; transform: rotate(8deg); }
.ribbon::after { right: 24px; transform: rotate(-8deg); }
@media (max-width: 640px) {
  .ribbon { width: 72px; height: 72px; font-size: 10px; top: 12px; left: 12px; }
  .ribbon::before, .ribbon::after { width: 16px; height: 26px; bottom: -14px; }
  .ribbon::before { left: 18px; } .ribbon::after { right: 18px; }
}

.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: inline; } }

/* ---------- Section don ---------- */
.donate { padding: 48px 0 64px; scroll-margin-top: 64px; }
@media (min-width: 900px) { .donate { padding: 72px 0 88px; } }
.donate__grid { display: grid; gap: 32px; }
@media (min-width: 900px) {
  .donate__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: start; }
}

.section-title {
  margin: 0 0 12px;
  font-family: var(--font-title); font-weight: 700; font-size: clamp(26px, 3.4vw, 34px);
  color: var(--blue-royal);
}
.section-title--light { color: var(--gold-light); }

.why__intro { margin: 0 0 22px; color: var(--ink-soft); font-size: 16px; }
.why__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.why__list li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px; background: var(--white); border-radius: var(--radius-sm);
  border: 1px solid var(--line); border-left: 4px solid var(--gold);
}
.why__icon {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blue-royal); color: var(--gold-light); font-size: 15px;
}
.why__list strong { display: block; color: var(--blue-night); font-size: 15px; }
.why__list p { margin: 2px 0 0; color: var(--ink-soft); font-size: 14px; }

.goal { margin-top: 24px; padding: 18px; background: var(--white); border-radius: var(--radius-sm); border: 1px solid var(--line); }
.goal__head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
.goal__head strong { color: var(--blue-night); }
.goal__bar { height: 12px; background: var(--blue-ice); border-radius: 999px; overflow: hidden; }
.goal__bar span { display: block; height: 100%; width: 0; background: var(--gold-gradient); border-radius: inherit; transition: width 1s ease; }

/* ---------- Carte formulaire ---------- */
.card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  border-top: 5px solid var(--gold);
  padding: 24px 18px 26px;
}
@media (min-width: 600px) { .card { padding: 32px 32px 34px; } }
.card__title { margin: 0 0 8px; font-family: var(--font-title); font-weight: 700; font-size: 26px; color: var(--blue-night); text-align: center; }

.step { border: 0; padding: 0; margin: 22px 0 0; min-width: 0; }
.step legend {
  display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 12px;
  font-weight: 700; font-size: 15px; color: var(--blue-night);
}
.step__num {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue-royal); color: var(--gold-light); font-size: 13px;
}

.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.amount {
  min-height: 52px; border-radius: var(--radius-sm); cursor: pointer;
  border: 2px solid var(--line); background: var(--white);
  font: 700 16px var(--font-body); color: var(--blue-night);
  transition: border-color .15s, background .15s, color .15s, transform .1s;
}
.amount::after { content: " F"; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.amount:hover { border-color: var(--blue-sky); }
.amount:focus-visible { outline: 3px solid var(--blue-sky); outline-offset: 2px; }
.amount.is-active { border-color: var(--blue-royal); background: var(--blue-royal); color: var(--white); }
.amount.is-active::after { color: var(--gold-light); }

.field { display: block; margin-top: 12px; }
.field__label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.field__label em { font-weight: 500; font-style: normal; opacity: .8; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"] {
  width: 100%; min-height: 50px; padding: 0 14px;
  border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--white);
  font: 500 16px var(--font-body); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--blue-royal); box-shadow: 0 0 0 4px rgba(11, 61, 145, .12); }
.field input.is-invalid { border-color: var(--red); }
.field__wrap { position: relative; display: flex; align-items: stretch; }
.field__wrap input { flex: 1; min-width: 0; }
.field__prefix, .field__suffix {
  display: grid; place-items: center; padding: 0 12px;
  background: var(--bg); border: 2px solid var(--line); color: var(--ink-soft); font-weight: 700; font-size: 14px;
}
.field__prefix { border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.field__prefix + input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important; }
.field__suffix { border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.field--amount input { border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important; }
.field__hint { display: block; margin-top: 6px; font-size: 12.5px; color: var(--ink-soft); }
.field__hint.is-detected { color: var(--blue-royal); font-weight: 600; }

.check { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue-royal); }

.error { min-height: 0; margin: 6px 0 0; font-size: 13px; font-weight: 600; color: var(--red); }
.error:empty { display: none; }

/* Opérateurs */
.operators { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.operator { position: relative; cursor: pointer; }
.operator input { position: absolute; opacity: 0; pointer-events: none; }
.operator__box {
  display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center;
  padding: 14px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--white);
  transition: border-color .15s, background .15s;
}
.operator__dot { grid-row: span 2; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); transition: all .15s; }
.operator__name { font-weight: 700; font-size: 15px; color: var(--blue-night); }
.operator__sub { font-size: 12px; color: var(--ink-soft); }
/* Couleur de chaque opérateur passée par style="--op:…; --op-bg:…" (voir dons.js) */
.operator input:checked + .operator__box { border-color: var(--op, var(--blue-royal)); background: var(--op-bg, #F1F7FF); }
.operator input:checked + .operator__box .operator__dot { border-color: var(--op, var(--blue-royal)); background: radial-gradient(circle, var(--op, var(--blue-royal)) 45%, transparent 50%); }
.operator input:focus-visible + .operator__box { outline: 3px solid var(--blue-sky); outline-offset: 2px; }

/* Carte VISA : sur toute la largeur, sous les Mobile Money */
.operator--visa { grid-column: 1 / -1; }
.operator--visa .operator__box { grid-template-columns: auto 1fr auto; }
.operator--visa .operator__name, .operator--visa .operator__sub { grid-column: 2; }
.visa-mark {
  grid-column: 3; grid-row: 1 / span 2; align-self: center;
  padding: 6px 10px; border-radius: 6px;
  background: var(--visa); color: var(--white);
  font: italic 800 17px/1 var(--font-body); letter-spacing: .04em;
}
.visa-mark--sm { padding: 3px 6px; font-size: 11px; border-radius: 4px; }

@media (max-width: 380px) { .operators { grid-template-columns: 1fr; } }

/* Pays */
.flag { width: 24px; height: 16px; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(15, 27, 51, .12); }
.countries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.country { cursor: pointer; position: relative; }
.country input { position: absolute; opacity: 0; pointer-events: none; }
.country__box {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 6px 8px; border-radius: 999px;
  border: 2px solid var(--line); background: var(--white);
  font-weight: 700; font-size: 14px; color: var(--blue-night);
  transition: border-color .15s, background .15s;
}
.country:hover .country__box { border-color: var(--blue-sky); }
.country input:checked + .country__box { border-color: var(--blue-royal); background: var(--blue-ice); }
.country input:focus-visible + .country__box { outline: 3px solid var(--blue-sky); outline-offset: 2px; }
@media (max-width: 420px) {
  .country__box { flex-direction: column; gap: 4px; border-radius: var(--radius-sm); font-size: 12.5px; min-height: 58px; }
}
.step > .field__label { margin: 0 0 8px; }

/* Récapitulatif don + frais */
.recap {
  margin-top: 24px; padding: 16px 18px;
  border-radius: var(--radius-sm); background: var(--bg); border: 1px dashed #C5D0E3;
}
.recap__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; font-size: 14.5px; color: var(--ink-soft); }
.recap__row strong { color: var(--blue-night); font-weight: 700; white-space: nowrap; }
.recap__row--total { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 16px; color: var(--blue-night); font-weight: 700; }
.recap__row--total strong { font-size: 20px; color: var(--blue-royal); }
.recap__note { margin: 8px 0 0; font-size: 12px; color: var(--ink-soft); }

#submit-btn { margin-top: 26px; position: relative; }
.spinner {
  display: none; width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid rgba(10, 31, 68, .25); border-top-color: var(--blue-night);
  animation: spin .8s linear infinite;
}
.is-loading .spinner { display: inline-block; }
.is-loading { pointer-events: none; opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }

.secure-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; font-size: 12.5px; color: var(--ink-soft); text-align: center; }
.secure-note svg { width: 14px; height: 14px; flex: none; color: var(--blue-royal); }

/* ---------- Contacts ---------- */
.contact { background: linear-gradient(135deg, var(--blue-night), var(--blue-royal)); color: var(--white); padding: 48px 0; }
.contact__inner { display: grid; gap: 24px; }
.contact p { margin: 0; opacity: .9; }
.contact__links { display: grid; gap: 10px; }
.contact__item {
  display: block; padding: 14px 18px; border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 210, 122, .35); background: rgba(255,255,255,.06);
  text-decoration: none; font-weight: 600;
  transition: background .15s, border-color .15s;
}
.contact__item:hover { background: rgba(255,255,255,.12); border-color: var(--gold-light); }
@media (min-width: 860px) { .contact__inner { grid-template-columns: 1fr 1fr; align-items: center; } }

.footer { background: #06142E; color: rgba(255,255,255,.7); text-align: center; padding: 28px 0; font-size: 13px; }
.footer p { margin: 0; }
.footer__slogan { font-family: var(--font-title); font-size: 16px; color: var(--gold-light); margin-bottom: 6px !important; }

/* ---------- Modale ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(6, 20, 46, .7); backdrop-filter: blur(3px); }
.modal__box {
  position: relative; width: 100%; max-width: 440px;
  background: var(--white); border-radius: var(--radius); padding: 32px 24px 26px; text-align: center;
  border-top: 5px solid var(--gold); box-shadow: var(--shadow);
  animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(.95); opacity: 0; } }
.modal__close { position: absolute; top: 8px; right: 12px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--ink-soft); }
.modal__icon {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; font-size: 30px; font-weight: 800;
  background: var(--gold-gradient); color: var(--blue-night);
}
.modal__icon.is-error { background: var(--red); color: var(--white); }
.modal__icon.is-pending { background: var(--blue-royal); color: var(--gold-light); }
.modal__box h3 { margin: 0 0 8px; font-family: var(--font-title); font-size: 22px; color: var(--blue-night); }
.modal__box p { margin: 0 0 20px; color: var(--ink-soft); font-size: 15px; }
