/* ==========================================================================
   Help Children Education — feuille de style unique du site
   Palette chaude inspirée des terres et tissus d'Afrique centrale
   ========================================================================== */

:root {
  --cocoa: #2b1709;        /* texte, fonds sombres */
  --cocoa-soft: #5a3b26;   /* texte secondaire */
  --saffron: #f4a300;      /* action principale (don) */
  --saffron-deep: #d98c00;
  --hibiscus: #b5301a;     /* accent, liens */
  --hibiscus-deep: #8f2412;
  --sand: #f6e9d6;         /* surfaces secondaires */
  --sand-line: #e7d3b6;
  --forest: #1f5b3a;       /* confirmation, réduction d'impôt */
  --white: #ffffff;

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-text: "Newsreader", Georgia, serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-s: 6px;
  --radius-m: 14px;
  --radius-l: 28px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--cocoa);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
a { color: var(--hibiscus); text-underline-offset: 3px; }
a:hover { color: var(--hibiscus-deep); }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 750;
}
h1 { font-size: clamp(2.6rem, 6.2vw, 5.2rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.prose, .lede {
  font-family: var(--font-text);
  font-size: 1.2rem;
  line-height: 1.65;
}
.lede { font-size: clamp(1.2rem, 1.8vw, 1.4rem); color: var(--cocoa-soft); max-width: 34em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { max-width: 42rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { font-family: var(--font-text); font-size: 1.2rem; color: var(--cocoa-soft); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--white); padding: 8px 14px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font: 650 1rem/1 var(--font-display);
  padding: 0.95em 1.6em;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-give { background: var(--saffron); color: var(--cocoa); }
.btn-give:hover { background: var(--saffron-deep); color: var(--cocoa); }
.btn-line { border-color: currentColor; color: var(--cocoa); background: transparent; }
.btn-line:hover { background: var(--cocoa); color: var(--white); border-color: var(--cocoa); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--sand-line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--cocoa); margin-right: auto; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand span { font-weight: 700; font-size: 1rem; line-height: 1.15; max-width: 15rem; }
.brand small { display: block; font-weight: 500; font-size: 0.78rem; color: var(--cocoa-soft); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--cocoa); text-decoration: none; font-weight: 550; font-size: 0.97rem;
  padding: 8px 12px; border-radius: 999px;
}
.nav a:hover { background: var(--sand); }
.nav a[aria-current="page"] { background: var(--sand); }
.nav .lang { color: var(--cocoa-soft); font-size: 0.9rem; }
.nav .btn { margin-left: 8px; padding: 0.8em 1.3em; }
.nav .btn:hover { background: var(--saffron-deep); }

.menu-toggle {
  display: none; background: none; border: 2px solid var(--cocoa); border-radius: 999px;
  font: 600 0.95rem var(--font-display); color: var(--cocoa); padding: 8px 16px; cursor: pointer;
}

@media (max-width: 960px) {
  .menu-toggle { display: inline-block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--sand-line);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--sand); }
  .nav a:hover, .nav a[aria-current="page"] { background: none; color: var(--hibiscus); }
  .nav .btn { margin: 16px 0 0; border-bottom: 0; border-radius: 999px; }
  .brand span { font-size: 0.92rem; }
}

/* ---------- Héros (accueil) ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: calc(100vh - 77px);
  min-height: calc(100svh - 77px);
}
.hero-photo { position: relative; overflow: hidden; background: var(--cocoa); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 30%; }
.hero-photo figcaption {
  position: absolute; left: 20px; bottom: 20px; right: 20px;
  color: var(--white); font-family: var(--font-text); font-style: italic; font-size: 1rem;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
.hero-body {
  background: var(--saffron);
  padding: clamp(40px, 6vw, 80px) clamp(20px, 5vw, 72px);
  display: flex; flex-direction: column; justify-content: center;
}
.hero-body h1 { color: var(--cocoa); max-width: 11em; }
.hero-body .lede { color: var(--cocoa); opacity: .85; margin-bottom: 32px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-photo { aspect-ratio: 4 / 3; }
}

/* ---------- Module de don ---------- */
.give {
  background: var(--white);
  border-radius: var(--radius-l);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: 0 30px 60px -30px rgba(43, 23, 9, 0.45);
  max-width: 30rem;
  width: 100%;
}
.give-freq {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--sand); border-radius: 999px; padding: 4px; margin-bottom: 20px;
}
.give-freq input, .give-amounts input { position: absolute; opacity: 0; pointer-events: none; }
.give-freq label {
  text-align: center; padding: 10px; border-radius: 999px; font-weight: 600; cursor: pointer;
}
.give-freq input:checked + label { background: var(--cocoa); color: var(--white); }
.give-freq input:focus-visible + label { outline: 3px solid var(--saffron-deep); outline-offset: 2px; }

.give-amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.give-amounts label {
  display: flex; align-items: center; justify-content: center;
  min-height: 56px; border: 2px solid var(--sand-line); border-radius: var(--radius-m);
  font-weight: 700; font-size: 1.15rem; cursor: pointer; transition: border-color .15s, background-color .15s;
}
.give-amounts label:hover { border-color: var(--cocoa-soft); }
.give-amounts input:checked + label { border-color: var(--cocoa); background: var(--cocoa); color: var(--white); }
.give-amounts input:focus-visible + label { outline: 3px solid var(--saffron-deep); outline-offset: 2px; }

.give-other { position: relative; margin-bottom: 18px; }
.give-other input {
  width: 100%; min-height: 56px; padding: 0 48px 0 18px;
  border: 2px solid var(--sand-line); border-radius: var(--radius-m);
  font: 600 1.1rem var(--font-display); color: var(--cocoa); background: var(--white);
}
.give-other input:focus { border-color: var(--cocoa); outline: none; }
.give-other span { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--cocoa-soft); }

.give-net {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  border-top: 1px dashed var(--sand-line); padding: 16px 0 18px; margin: 0;
  font-size: 0.95rem; color: var(--cocoa-soft);
}
.give-net strong { font-size: 1.6rem; color: var(--forest); letter-spacing: -0.02em; white-space: nowrap; }
.give-note { font-size: 0.85rem; color: var(--cocoa-soft); margin: 14px 0 0; text-align: center; }
.give-error { color: var(--hibiscus); font-size: 0.92rem; margin: 10px 0 0; min-height: 1.2em; }

/* ---------- Bandeau citation ---------- */
.quote-band { background: var(--cocoa); color: var(--sand); }
.quote-band blockquote { margin: 0; max-width: 54rem; }
.quote-band blockquote p {
  font-family: var(--font-text); font-size: clamp(1.7rem, 3.6vw, 2.8rem);
  line-height: 1.25; font-weight: 400; color: var(--white);
}
.quote-band footer { display: flex; align-items: center; gap: 14px; font-size: 1rem; }
.quote-band footer img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.quote-band footer span { color: var(--saffron); font-weight: 600; }

/* ---------- Nos actions ---------- */
.actions { display: grid; gap: clamp(48px, 7vw, 96px); }
.action {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px); align-items: center;
}
.action:nth-child(even) .action-media { order: 2; }
.action-media { border-radius: var(--radius-l); overflow: hidden; aspect-ratio: 5 / 4; background: var(--sand); }
.action-media img { width: 100%; height: 100%; object-fit: cover; }
/* Photos verticales : cadre vertical calé en haut pour ne pas couper les visages */
.action-media.is-portrait { aspect-ratio: 4 / 5; }
.action-media.is-portrait img { object-position: 50% 0; }
.action-place { color: var(--hibiscus); font-weight: 600; margin-bottom: 10px; }
.action p.prose { color: var(--cocoa-soft); }
@media (max-width: 800px) {
  .action { grid-template-columns: 1fr; }
  .action:nth-child(even) .action-media { order: 0; }
}

/* ---------- Ce que permet un don ---------- */
.impact { background: var(--sand); }
.impact-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--cocoa); }
.impact-list li { padding: 28px 28px 0 0; }
.impact-list li + li { padding-left: 28px; border-left: 1px solid var(--sand-line); }
.impact-list b { display: block; font-size: clamp(2.2rem, 4vw, 3.2rem); letter-spacing: -0.03em; color: var(--hibiscus); line-height: 1; margin-bottom: 12px; }
.impact-list p { font-family: var(--font-text); font-size: 1.12rem; color: var(--cocoa-soft); margin: 0; }
@media (max-width: 760px) {
  .impact-list { grid-template-columns: 1fr; }
  .impact-list li, .impact-list li + li { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--sand-line); }
}

/* ---------- Vidéo ---------- */
.video-block { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.video-frame { position: relative; border-radius: var(--radius-l); overflow: hidden; background: var(--cocoa); }
.video-frame video { width: 100%; height: 100%; object-fit: cover; }
/* Vidéo verticale (format téléphone) : le cadre suit son format, sans recadrage */
.video-frame.is-vertical { aspect-ratio: 480 / 848; width: min(100%, calc(min(78vh, 680px) * 480 / 848)); justify-self: center; }
@media (max-width: 800px) { .video-block { grid-template-columns: 1fr; } }

/* ---------- Articles ---------- */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 36px 28px; }
.post { display: flex; flex-direction: column; text-decoration: none; color: var(--cocoa); }
.post-media { aspect-ratio: 3 / 2; border-radius: var(--radius-m); overflow: hidden; background: var(--sand); margin-bottom: 18px; }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post:hover .post-media img { transform: scale(1.03); }
.post time { font-size: 0.9rem; color: var(--cocoa-soft); }
.post h3 { margin: 6px 0 10px; }
.post:hover h3 { color: var(--hibiscus); }
.post p { font-family: var(--font-text); font-size: 1.08rem; color: var(--cocoa-soft); margin: 0; }
.post-media.is-empty { display: grid; place-items: center; background: var(--saffron); }
.post-media.is-empty img { width: 64px; height: 64px; object-fit: contain; }
.status { font-family: var(--font-text); font-size: 1.1rem; color: var(--cocoa-soft); }
.row-end { margin-top: 40px; }

/* ---------- Équipe ---------- */
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.member img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-m); margin-bottom: 16px; background: var(--sand); }
.member h3 { margin-bottom: 4px; }
.member .role { color: var(--hibiscus); font-weight: 600; font-size: 0.95rem; margin-bottom: 10px; }
.member p { font-family: var(--font-text); font-size: 1.04rem; color: var(--cocoa-soft); }
@media (max-width: 960px) { .team { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .team { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { background: var(--cocoa); color: var(--sand); }
.contact h2 { color: var(--white); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); }
.contact dl { margin: 32px 0 0; display: grid; gap: 18px; }
.contact dt { color: var(--saffron); font-weight: 600; font-size: 0.92rem; }
.contact dd { margin: 2px 0 0; font-size: 1.05rem; }
.contact a { color: var(--white); }
.form { display: grid; gap: 16px; }
.form .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: 0.92rem; font-weight: 600; }
.form input, .form textarea {
  width: 100%; padding: 14px 16px; border-radius: var(--radius-s);
  border: 1.5px solid rgba(246, 233, 214, 0.35); background: rgba(255, 255, 255, 0.06);
  color: var(--white); font: 1.02rem var(--font-display);
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--saffron); }
.form textarea { min-height: 150px; resize: vertical; }
.form .btn { justify-self: start; }
@media (max-width: 800px) { .contact-grid, .form .pair { grid-template-columns: 1fr; } }

/* ---------- Pied de page ---------- */
.site-footer { background: #1d0f05; color: rgba(246, 233, 214, 0.75); padding: 56px 0 32px; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: var(--white); font-size: 1rem; letter-spacing: 0; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: rgba(246, 233, 214, 0.9); text-decoration: none; }
.site-footer a:hover { color: var(--saffron); }
.footer-legal { border-top: 1px solid rgba(246, 233, 214, 0.15); margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 0.85rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- En-tête de page intérieure ---------- */
.page-head { background: var(--saffron); padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 72px); }
.page-head h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); max-width: 14em; }
.page-head .lede { color: var(--cocoa); opacity: .85; }

/* ---------- Page don ---------- */
.donate-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); gap: clamp(32px, 6vw, 88px); align-items: start; }
.donate-layout .give { position: sticky; top: 100px; margin-top: calc(-1 * clamp(80px, 10vw, 140px)); }
@media (max-width: 900px) {
  .donate-layout { grid-template-columns: 1fr; }
  .donate-layout .give { position: static; margin: -48px auto 0; order: -1; }
}
.uses { list-style: none; padding: 0; margin: 0 0 48px; display: grid; gap: 22px; }
.uses li { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; }
.uses .ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--sand); color: var(--hibiscus); }
.uses h3 { margin-bottom: 4px; }
.uses p { font-family: var(--font-text); font-size: 1.08rem; color: var(--cocoa-soft); margin: 0; }

.faq { border-top: 2px solid var(--cocoa); }
.faq details { border-bottom: 1px solid var(--sand-line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-weight: 650; font-size: 1.12rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; font-weight: 400; color: var(--hibiscus); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details > div { padding: 0 0 22px; font-family: var(--font-text); font-size: 1.1rem; color: var(--cocoa-soft); max-width: 40em; }

/* ---------- Galerie ---------- */
.gallery { columns: 3 300px; column-gap: 18px; }
.tile {
  break-inside: avoid; margin: 0 0 18px; position: relative;
  border-radius: var(--radius-m); overflow: hidden; background: var(--sand);
  border: 0; padding: 0; width: 100%; cursor: zoom-in; display: block;
}
.tile img, .tile video { width: 100%; height: auto; display: block; }
.tile figcaption, .tile .tile-meta {
  position: absolute; left: 12px; bottom: 12px;
  background: rgba(43, 23, 9, 0.78); color: var(--white);
  font: 600 0.82rem var(--font-display); padding: 5px 10px; border-radius: 999px;
}
.tile .tile-kind { position: absolute; right: 12px; top: 12px; background: var(--saffron); color: var(--cocoa); font: 700 0.8rem var(--font-display); padding: 5px 10px; border-radius: 999px; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1200px); max-height: 92vh; }
.lightbox::backdrop { background: rgba(29, 15, 5, 0.92); }
.lightbox img, .lightbox video { max-height: 86vh; width: auto; margin: 0 auto; border-radius: var(--radius-s); }
.lightbox button {
  position: fixed; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: var(--white); color: var(--cocoa); font-size: 1.5rem; cursor: pointer;
}
.spinner { width: 36px; height: 36px; border: 4px solid var(--sand-line); border-top-color: var(--hibiscus); border-radius: 50%; animation: spin 0.9s linear infinite; margin: 32px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Article de blog ---------- */
.article { max-width: 46rem; margin: 0 auto; }
.article-head { padding: clamp(48px, 8vw, 96px) 0 32px; }
.article-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.article-head time { color: var(--hibiscus); font-weight: 600; }
.article-media { border-radius: var(--radius-l); overflow: hidden; margin-bottom: 40px; background: var(--sand); }
.article-media img, .article-media video { width: 100%; max-height: 560px; object-fit: cover; }
.article-body { font-family: var(--font-text); font-size: 1.24rem; line-height: 1.75; }
.article-body h2, .article-body h3 { margin-top: 1.6em; }
.article-body h2 { font-size: 2rem; }
.article-body img { border-radius: var(--radius-m); margin: 1.5em 0; }
.article-body blockquote { margin: 1.5em 0; padding-left: 24px; border-left: 4px solid var(--saffron); color: var(--cocoa-soft); }
.article-cta { margin: 64px 0 40px; background: var(--saffron); border-radius: var(--radius-l); padding: clamp(28px, 5vw, 48px); }
.article-cta h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.back { display: inline-block; margin: 0 0 80px; font-weight: 600; text-decoration: none; }

/* ---------- Merci ---------- */
.thanks { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.thanks-photo { background: var(--cocoa); }
.thanks-photo img { width: 100%; height: 100%; object-fit: cover; }
.thanks-body { background: var(--saffron); padding: clamp(40px, 7vw, 96px) clamp(20px, 6vw, 80px); display: flex; flex-direction: column; justify-content: center; }
.thanks-body h1 { font-size: clamp(3rem, 7vw, 5.6rem); }
.thanks-body .lede { color: var(--cocoa); }
.thanks-body .actions-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
@media (max-width: 860px) {
  .thanks { grid-template-columns: 1fr; }
  .thanks-photo { aspect-ratio: 16 / 10; }
}
.give-links { display: grid; gap: 6px; margin: 14px 0 0; padding-top: 14px; border-top: 1px dashed var(--sand-line); text-align: center; font-size: 0.88rem; }
.give-cur { display: flex; justify-content: flex-end; gap: 4px; margin: -4px 0 12px; }
.give-cur input { position: absolute; opacity: 0; pointer-events: none; }
.give-cur label { padding: 4px 10px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; color: var(--cocoa-soft); cursor: pointer; border: 1.5px solid transparent; }
.give-cur input:checked + label { border-color: var(--cocoa); color: var(--cocoa); }
.give-cur input:focus-visible + label { outline: 3px solid var(--saffron-deep); outline-offset: 2px; }
.give-net[hidden] { display: none; }
