/* ============================================================
   ASSOCIATION MALGACHE POUR L'AUTISME (AMA) · amautisme.org
   Design system Serenity by Simafri · vertical ASSOCIATION / NON-PROFIT
   Base : Bootstrap 5 + couche Simafri (structure golden Kajy Line).
   Palette = extraite du logo (bleu ciel autisme #1AADD3 mesuré au pixel,
   accent ambre chaud, touches multicolores en rappel des mains du logo).
   ============================================================ */

:root {
  /* ↓↓↓ PALETTE CLIENT ↓↓↓ */
  --brand-primary: #1AADD3;   /* bleu ciel du logo (couleur mondiale de l'autisme) */
  --brand-accent:  #F4A024;   /* ambre chaud : CTA don / parrainage */
  --brand-grey:    #56666E;   /* texte secondaire */
  /* ↑↑↑ ------------------ ↑↑↑ */

  --brand-deep:    #0E5E79;   /* bleu profond dérivé : titres, nav, fonds sombres (contraste AA) */
  --brand-deep-2:  #0A4459;   /* footer, dégradés */
  --accent-dark:   color-mix(in srgb, var(--brand-accent) 82%, black);
  --primary-dark:  color-mix(in srgb, var(--brand-primary) 70%, black);

  /* rappel des mains multicolores du logo (pictos, à doser) */
  --hand-pink:   #E2628F;
  --hand-green:  #7DB94C;
  --hand-violet: #8E6FB8;
  --hand-yellow: #F2C94C;

  --ink:   #1d2b33;           /* texte courant */
  --muted: #56666E;
  --soft:  #f2f9fc;           /* fonds de section clairs (bleu très pâle) */
  --line:  #dfeaf0;           /* filets / bordures */
  --sky-grad: linear-gradient(135deg, #0A4459 0%, #0E5E79 48%, #1390b3 100%);
}

/* ---------- Base typographie ---------- */
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, .font-head {
  font-family: "Nunito", "Inter", system-ui, sans-serif;
  font-weight: 800;
}
.lead { color: var(--muted); }
a { color: var(--brand-deep); }
a:hover { color: var(--primary-dark); }

/* ---------- Utilitaires marque ---------- */
.text-brand  { color: var(--brand-deep) !important; }
.text-sky    { color: var(--brand-primary) !important; }
.text-accent { color: var(--accent-dark) !important; }
.bg-deep     { background: var(--brand-deep) !important; }
.bg-soft     { background: var(--soft) !important; }
.fw-800      { font-weight: 800 !important; }
.text-muted-2 { color: var(--muted) !important; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .16em; font-weight: 700;
  font-size: .78rem; color: var(--brand-primary);
}
.eyebrow.on-dark { color: #aee4f5; }
.rule-accent { width: 64px; height: 4px; background: var(--brand-accent); border: 0; border-radius: 2px; opacity: 1; }
.section { padding: 4.5rem 0; }
@media (max-width: 768px) { .section { padding: 3rem 0; } }

/* ---------- Navbar (claire, logo couleur) ---------- */
.navbar-ama {
  background: #fff;
  box-shadow: 0 1px 0 var(--line), 0 6px 24px rgba(14, 94, 121, .06);
}
.navbar-ama .navbar-brand { display: flex; align-items: center; gap: .6rem; }
.navbar-ama .navbar-brand img { height: 52px; width: 52px; display: block; }
.navbar-ama .brand-name {
  font-family: "Nunito", sans-serif; font-weight: 800; color: var(--brand-deep);
  font-size: 1.02rem; line-height: 1.15;
}
.navbar-ama .brand-name small { display: block; font-weight: 600; color: var(--brand-primary); font-size: .72rem; }
.navbar-ama .nav-link { color: var(--brand-deep); font-weight: 600; padding: .5rem .85rem; }
.navbar-ama .nav-link:hover { color: var(--brand-primary); }
.navbar-ama .nav-link.active { color: var(--brand-primary); }
.navbar-ama .nav-link.active::after {
  content: ""; display: block; height: 3px; border-radius: 2px;
  background: var(--brand-accent); margin-top: 2px;
}

/* ---------- Boutons ---------- */
.btn-don {
  background: var(--brand-accent); border-color: var(--brand-accent);
  color: #2b1a02; font-weight: 700;
}
.btn-don:hover, .btn-don:focus {
  background: var(--accent-dark); border-color: var(--accent-dark); color: #fff;
}
.btn-outline-deep { border: 1.5px solid var(--brand-deep); color: var(--brand-deep); font-weight: 600; }
.btn-outline-deep:hover { background: var(--brand-deep); color: #fff; }
.btn-outline-light { border: 1.5px solid rgba(255,255,255,.7); color: #fff; font-weight: 600; }
.btn-outline-light:hover { background: #fff; color: var(--brand-deep); }

/* ---------- Hero photo voilée (photos amateurs → voile dégradé brand) ---------- */
.hero-ama {
  position: relative; color: #fff;
  background-color: var(--brand-deep);
  background-size: cover; background-position: center;
}
.hero-ama::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg,
    rgba(8, 56, 74, .94) 0%,
    rgba(14, 94, 121, .86) 45%,
    rgba(26, 173, 211, .55) 100%);
}
.hero-ama .container { position: relative; z-index: 2; }
.hero-ama h1 { font-weight: 800; line-height: 1.12; }
.hero-ama .lead { color: rgba(255, 255, 255, .92); }
.hero-home { background-image: url('/assets/img/home/hero-accueil.webp'); }
.hero-sinformer { background-image: url('/assets/img/s-informer/hero-s-informer.webp'); }

/* ---------- Cartes piliers / missions ---------- */
.card-ama {
  background: #fff; border: 1px solid var(--line); border-radius: 1rem; height: 100%;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card-ama:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(14, 94, 121, .10); }
.card-ama .card-body { padding: 1.6rem; }
.card-ama h3 { color: var(--brand-deep); }
.feature {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem; height: 3.25rem; width: 3.25rem; border-radius: 50%;
  background: color-mix(in srgb, var(--brand-primary) 14%, #fff); color: var(--brand-deep);
}
/* touches multicolores (rappel des mains du logo) */
.feature--pink   { background: color-mix(in srgb, var(--hand-pink) 16%, #fff);   color: color-mix(in srgb, var(--hand-pink) 70%, black); }
.feature--green  { background: color-mix(in srgb, var(--hand-green) 18%, #fff);  color: color-mix(in srgb, var(--hand-green) 55%, black); }
.feature--violet { background: color-mix(in srgb, var(--hand-violet) 16%, #fff); color: color-mix(in srgb, var(--hand-violet) 65%, black); }

/* ---------- Listes à puces "check" ---------- */
.list-check { list-style: none; padding-left: 0; margin-bottom: 0; }
.list-check li { position: relative; padding-left: 1.9rem; margin-bottom: .65rem; }
.list-check li::before {
  content: "\F26B"; /* bi-check-circle-fill */
  font-family: "bootstrap-icons"; position: absolute; left: 0; top: .05rem;
  color: var(--brand-primary);
}
.list-check--accent li::before { color: var(--accent-dark); }

/* ---------- Images de section ---------- */
.img-soft { border-radius: 1rem; box-shadow: 0 14px 36px rgba(14, 94, 121, .14); width: 100%; height: auto; }
.img-native { max-width: 332px; display: block; margin-inline: auto; } /* ne pas agrandir une source de petite taille */

/* ---------- Accordéon natif (details/summary, accessible clavier) ---------- */
.faq-item {
  background: #fff; border: 1px solid var(--line); border-radius: .9rem;
  margin-bottom: .9rem; overflow: hidden;
}
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: .8rem;
  padding: 1.05rem 1.25rem; font-weight: 700; color: var(--brand-deep);
  font-family: "Nunito", sans-serif;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "\F282"; /* bi-chevron-down */
  font-family: "bootstrap-icons"; margin-left: auto; font-size: .95rem;
  color: var(--brand-primary); transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-item[open] summary { border-bottom: 1px solid var(--line); background: var(--soft); }
.faq-item .faq-body { padding: 1.1rem 1.25rem 1.25rem; }
.faq-item .faq-body p:last-child, .faq-item .faq-body ul:last-child { margin-bottom: 0; }

/* ---------- Bandeau CTA sombre ---------- */
.cta-band { background: var(--sky-grad); color: #fff; border-radius: 1.25rem; }
.cta-band .lead { color: rgba(255, 255, 255, .85); }

/* ---------- Citation / encadré ---------- */
.quote-soft {
  background: var(--soft); border-left: 4px solid var(--brand-primary);
  border-radius: .6rem; padding: 1.1rem 1.4rem; font-weight: 600; color: var(--brand-deep);
}

/* ---------- Footer ---------- */
.footer-ama { background: var(--brand-deep-2); color: rgba(255, 255, 255, .78); }
.footer-ama a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.footer-ama a:hover { color: #fff; text-decoration: underline; }
.footer-ama h6 { color: #fff; letter-spacing: .02em; font-weight: 700; }
.footer-ama .brand-foot { height: 56px; width: 56px; }
.footer-ama .slogan { color: #fff; font-weight: 700; font-family: "Nunito", sans-serif; }
.footer-ama .bi { color: var(--brand-primary); }
.footer-credit { background: #073245; }
.footer-credit a { color: #ffce80; }

/* ---------- Page 404 ---------- */
.page-404 { min-height: 55vh; display: flex; align-items: center; }
.page-404 .code { font-size: 5.5rem; font-weight: 800; color: var(--brand-primary); line-height: 1; font-family: "Nunito", sans-serif; }

/* ---------- Divers ---------- */
section[id] { scroll-margin-top: 84px; }

/* ============================================================
   EXTENSION -- pages fan-out (activites, galerie, don,
   parrain, contact, actualites, guides, mentions legales)
   Aucune classe existante modifiee ni supprimee.
   ============================================================ */

/* ---------- Hero variante compacte (pages sans grande photo) ---------- */
.hero-ama.hero--compact { padding-top: 2.5rem; padding-bottom: 2.5rem; }
@media (min-width: 992px) { .hero-ama.hero--compact { padding-top: 3.5rem; padding-bottom: 3.5rem; } }

/* ---------- Hero background-image par page ---------- */
.hero-activites  { background-image: url('/assets/img/activites/hero-activites.webp'); }
.hero-galerie    { background-image: url('/assets/img/galerie/hero-galerie.webp'); }
.hero-don        { background-image: url('/assets/img/don/hero-don.webp'); background-position: center top; }
.hero-parrain    { background-image: url('/assets/img/parrain/hero-parrain.webp'); }
.hero-contact    { background-image: url('/assets/img/contact/hero-contact.webp'); }
.hero-actualites { background-image: url('/assets/img/actualites/hero-actualites.webp'); }

/* ---------- Grille galerie (CSS Grid, aucune dependance JS) ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.gallery-item {
  display: block;
  overflow: hidden;
  border-radius: .75rem;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  background: var(--soft);
  transition: transform .18s ease, box-shadow .18s ease;
}
.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(14, 94, 121, .14);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  transition: transform .24s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-figcaption {
  font-size: .78rem; color: var(--muted);
  padding: .45rem .65rem .55rem;
  background: #fff;
  border-top: 1px solid var(--line);
  line-height: 1.35;
}
@media (max-width: 575px) {
  .gallery { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: .65rem; }
}

/* ---------- Prose d'article (guides evergreen) ---------- */
.article { max-width: 760px; margin-inline: auto; }
.article-hero-img {
  width: 100%; height: auto;
  max-height: 420px;
  object-fit: cover; object-position: center;
  border-radius: 1rem;
  margin-bottom: 2rem;
  box-shadow: 0 14px 36px rgba(14, 94, 121, .13);
}
.article-prose {
  font-size: 1.06rem;
  line-height: 1.82;
  color: var(--ink);
}
.article-prose h2 {
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  color: var(--brand-deep);
  font-size: 1.42rem;
  margin-top: 2.4rem;
  margin-bottom: .75rem;
}
.article-prose h3 {
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  color: var(--brand-deep);
  font-size: 1.14rem;
  margin-top: 1.8rem;
  margin-bottom: .55rem;
}
.article-prose p { margin-bottom: 1.2rem; }
.article-prose ul, .article-prose ol {
  padding-left: 1.4rem;
  margin-bottom: 1.2rem;
}
.article-prose li { margin-bottom: .45rem; }
.article-prose figure {
  margin: 2rem 0;
}
.article-prose figure img {
  width: 100%; height: auto;
  border-radius: .85rem;
  box-shadow: 0 8px 24px rgba(14, 94, 121, .1);
}
.article-prose figcaption {
  font-size: .82rem;
  color: var(--muted);
  text-align: center;
  margin-top: .5rem;
  font-style: italic;
}
.article-prose blockquote {
  border-left: 4px solid var(--brand-primary);
  background: var(--soft);
  border-radius: .6rem;
  padding: 1rem 1.4rem;
  margin: 1.6rem 0;
  font-weight: 600;
  color: var(--brand-deep);
}
.article-prose a { color: var(--brand-deep); text-decoration: underline; text-underline-offset: 3px; }
.article-prose a:hover { color: var(--primary-dark); }
.article-meta {
  font-size: .82rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
  margin-bottom: 1.8rem;
}
@media (max-width: 768px) {
  .article-prose { font-size: 1rem; line-height: 1.72; }
  .article-prose h2 { font-size: 1.25rem; }
  .article-prose h3 { font-size: 1.06rem; }
}

/* ---------- Cartes paiement mobile (don) ---------- */
.pay-card {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 1rem;
  padding: 1.5rem 1.6rem;
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  transition: box-shadow .18s ease;
}
.pay-card:hover { box-shadow: 0 10px 28px rgba(14, 94, 121, .10); }
.pay-card__icon {
  flex-shrink: 0;
  width: 3.25rem; height: 3.25rem;
  border-radius: .75rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  background: color-mix(in srgb, var(--brand-accent) 16%, #fff);
  color: var(--accent-dark);
}
.pay-card__icon--om {
  background: #fff3e0;
  color: #e65100;
}
.pay-card__icon--mvola {
  background: #fce4ec;
  color: #ad1457;
}
.pay-card__label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: .2rem;
}
.pay-card__operator {
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  color: var(--brand-deep);
  font-size: 1.06rem;
  margin-bottom: .25rem;
}
.pay-card__number {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--ink);
  word-break: break-all;
}
.pay-card__beneficiary {
  font-size: .82rem;
  color: var(--muted);
  margin-top: .25rem;
}

/* Bouton campagne WhyDonate (nuance don externe) */
.btn-whydonate {
  background: #fff;
  border: 1.5px solid var(--brand-accent);
  color: var(--accent-dark);
  font-weight: 700;
}
.btn-whydonate:hover, .btn-whydonate:focus {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  color: #2b1a02;
}

/* ---------- Formulaire de contact (embed iframe) ---------- */
.form-embed {
  width: 100%;
  min-height: 460px;
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  display: block;
  background: transparent;
}
.form-fallback {
  display: none;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 2rem;
}
.form-fallback.is-visible { display: block; }
.form-container {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 2rem 2.25rem;
  box-shadow: 0 6px 20px rgba(14, 94, 121, .07);
}
@media (max-width: 575px) {
  .form-container { padding: 1.4rem 1.25rem; }
  .form-embed { min-height: 520px; }
}

/* ---------- Carte ressource avec vignette (hub actualites) ---------- */
.card-ama--media {
  overflow: hidden;
}
.card-ama--media .card-img-top {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .24s ease;
}
.card-ama--media:hover .card-img-top { transform: scale(1.03); }
.card-ama--media .card-body { padding: 1.25rem 1.4rem 1.5rem; }
.card-ama--media h3 {
  font-size: 1.05rem;
  line-height: 1.38;
  color: var(--brand-deep);
  margin-bottom: .5rem;
}
.card-ama--media .card-link {
  font-size: .88rem;
  font-weight: 700;
  color: var(--brand-primary);
  text-decoration: none;
}
.card-ama--media .card-link:hover { color: var(--brand-deep); text-decoration: underline; }

/* ---------- Coordonnees / infos contact ---------- */
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: 1.1rem 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: .85rem;
  margin-bottom: .75rem;
}
.contact-info-item .bi {
  font-size: 1.2rem;
  color: var(--brand-primary);
  flex-shrink: 0;
  margin-top: .1rem;
}
.contact-info-item strong {
  display: block;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: .1rem;
}
.contact-info-item span, .contact-info-item a {
  color: var(--ink);
  font-weight: 600;
  word-break: break-word;
}

/* ---------- Map embed ---------- */
.map-embed {
  width: 100%;
  height: 340px;
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  display: block;
  border: 1px solid var(--line);
}

/* ---------- Parrain -- niveaux de soutien ---------- */
.parrain-tier {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 1rem;
  padding: 1.75rem 1.6rem;
  height: 100%;
  transition: transform .18s ease, box-shadow .18s ease;
}
.parrain-tier:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(14, 94, 121, .11); }
.parrain-tier--featured {
  border-color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 5%, #fff);
}
.parrain-tier__badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 12%, #fff);
  border-radius: 2rem;
  padding: .25rem .75rem;
  margin-bottom: .85rem;
}
.parrain-tier__amount {
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--brand-deep);
  line-height: 1.1;
  margin-bottom: .3rem;
}
.parrain-tier__period {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

/* ---------- Mentions legales -- prose legale ---------- */
.legal-prose {
  max-width: 760px;
  margin-inline: auto;
  line-height: 1.8;
}
.legal-prose h2 {
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  color: var(--brand-deep);
  font-size: 1.22rem;
  margin-top: 2.2rem;
  margin-bottom: .6rem;
  border-bottom: 2px solid var(--line);
  padding-bottom: .4rem;
}
.legal-prose p, .legal-prose ul { margin-bottom: 1rem; }
.legal-prose ul { padding-left: 1.3rem; }
.legal-prose li { margin-bottom: .3rem; }
.legal-prose address { font-style: normal; }

/* ---------- Lightbox galerie (vanilla, sans dependance) ---------- */
.gallery-item img { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 1080;
  display: flex; align-items: center; justify-content: center;
  padding: 3.75rem 1rem;
  background: rgba(8, 33, 45, .93);
  opacity: 0; visibility: hidden; transition: opacity .2s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__figure { margin: 0; max-width: 1100px; width: 100%; text-align: center; }
.lightbox__img {
  max-width: 100%; max-height: 80vh; width: auto; height: auto;
  border-radius: .5rem; box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  object-fit: contain; background: var(--brand-deep-2);
}
.lightbox__caption {
  color: rgba(255, 255, 255, .9); font-size: .95rem; margin-top: .9rem;
  font-family: "Nunito", sans-serif;
}
.lightbox__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 3rem; height: 3rem; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff;
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.lightbox__btn:hover, .lightbox__btn:focus { background: rgba(255, 255, 255, .3); outline: none; }
.lightbox__btn--prev { left: 1rem; }
.lightbox__btn--next { right: 1rem; }
.lightbox__close { top: 1rem; right: 1rem; transform: none; }
.lightbox__count {
  position: absolute; top: 1.2rem; left: 1.3rem;
  color: rgba(255, 255, 255, .7); font-size: .85rem; font-family: "Nunito", sans-serif;
}
@media (max-width: 576px) {
  .lightbox { padding: 3rem .5rem; }
  .lightbox__btn { width: 2.5rem; height: 2.5rem; font-size: 1.2rem; }
  .lightbox__btn--prev { left: .35rem; }
  .lightbox__btn--next { right: .35rem; }
}

/* ---------- Badge "Identite verifiee" (footer, sur fond sombre) ---------- */
.badge-verifie {
  display: inline-flex; align-items: center; gap: .45rem;
  margin-top: 1rem; padding: .4rem .7rem;
  border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px;
  font-size: .8rem; line-height: 1; color: #dbe7f3; text-decoration: none;
  transition: border-color .2s, color .2s;
}
.badge-verifie:hover { border-color: rgba(255, 255, 255, .5); color: #fff; }
.badge-verifie .bi { color: #3fb37f; font-size: 1rem; }
.badge-verifie--expire { opacity: .65; }
.badge-verifie--expire .bi { color: #9aa6b2; }
