/* =========================================================
   Association Les Amis de Hugues Charnallet
   Minimal, elegant stylesheet
   Brand red sampled from logo: #A0030A
   ========================================================= */

:root {
  --red: #A0030A;
  --red-dark: #7a0208;
  --red-soft: #f9eaea;
  --ink: #111111;
  --ink-muted: #4a4a4a;
  --line: #e6e6e6;
  --bg: #ffffff;
  --bg-soft: #fafaf7;
  --max: 1100px;
  --max-narrow: 720px;

  --serif: "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 420;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "calt", "ss01", "cv11";
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-2);
}
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.1; font-weight: 600; }
h2 { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.15; margin-top: var(--space-3); font-weight: 600; }
.eyebrow + h2 { margin-top: 0.25rem; }
h3 { font-size: 1.35rem; line-height: 1.35; margin-top: var(--space-3); font-weight: 600; }
h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink); }

p { margin: 0 0 1.15em; }
strong { font-weight: 600; color: var(--ink); }

.lead {
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.55;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--space-3);
}
.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: var(--space-1);
  display: block;
}

/* --- Layout --- */
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--space-3); }
.container--narrow { max-width: var(--max-narrow); }
main { padding: var(--space-5) 0 var(--space-6); }
section { display: flow-root; }
section + section { margin-top: 5rem; }

/* Give red eyebrow titles extra breathing room at the top of a section */
.eyebrow { margin-top: 3rem; }
.hero .eyebrow,
.page-header .eyebrow,
.donate-hero .eyebrow,
.legal-details .eyebrow { margin-top: 0; }

/* --- Header / Nav --- */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 50;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  max-width: var(--max);
  margin: 0 auto;
  gap: var(--space-3);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
}
.brand-tagline {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.25rem 0;
  position: relative;
}
.nav-links a:hover { color: var(--red); text-decoration: none; }
.nav-links a.active { color: var(--red); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--red);
}

.nav-right { display: flex; align-items: center; gap: 0.75rem; }
.lang-toggle {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}
.lang-toggle:hover { border-color: var(--red); color: var(--red); }

.cta-btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 1px solid var(--red);
  transition: background 0.15s, transform 0.1s;
}
.cta-btn:hover { background: var(--red-dark); color: #fff; text-decoration: none; }
.cta-btn:active { transform: translateY(1px); }
.cta-btn--ghost {
  background: transparent;
  color: var(--red);
}
.cta-btn--ghost:hover { background: var(--red-soft); color: var(--red); }
.cta-btn--large { padding: 0.9rem 2rem; font-size: 1rem; }

/* --- Mobile nav --- */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  color: var(--ink);
}
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: var(--space-2) var(--space-3);
    gap: var(--space-2);
    display: none;
    align-items: flex-start;
  }
  .nav-links.open { display: flex; }
  .nav-right .cta-btn { display: none; }
}

/* --- Hero --- */
.hero {
  padding: var(--space-6) 0 var(--space-5);
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}
.hero h1 { margin-bottom: var(--space-3); }
.hero .lead { max-width: 640px; margin: 0 auto var(--space-4); color: var(--ink-muted); }
.hero-cta { display: inline-flex; gap: var(--space-2); flex-wrap: wrap; justify-content: center; }

/* --- Stats row --- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
  padding: var(--space-3) 0;
  margin-top: var(--space-3);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { text-align: center; padding: var(--space-2); }
.stat-value {
  font-family: var(--serif);
  font-size: clamp(3rem, 5.5vw, 4.25rem);
  color: var(--red);
  line-height: 1;
  display: block;
  margin-bottom: 0.5rem;
}
.stat-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  line-height: 1.4;
}
.stat-label-sub { font-size: 0.85rem; }

/* --- Two-col --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  align-items: center;
}
.two-col--narrow { grid-template-columns: 1.3fr 1fr; }
@media (max-width: 820px) {
  .two-col, .two-col--narrow { grid-template-columns: 1fr; }
}

/* --- Cards --- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3);
  margin: var(--space-3) 0;
}
.card {
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card-link {
  margin-top: var(--space-2);
  font-size: 0.9rem;
  font-weight: 600;
}

/* --- Pullquote --- */
.pullquote {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
  border-left: 3px solid var(--red);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: var(--space-4) 0;
  font-style: italic;
}
.pullquote cite {
  display: block;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-style: normal;
  color: var(--ink-muted);
  margin-top: 0.75rem;
  letter-spacing: 0.05em;
}

/* --- Page header (for inner pages) --- */
.page-header {
  padding: var(--space-5) 0 var(--space-4);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.page-header .lead {
  max-width: 640px;
  margin: var(--space-2) auto 0;
  color: var(--ink-muted);
}

/* --- Gallery --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px;
  margin: var(--space-3) 0;
}
.gallery figure {
  margin: 0;
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg-soft);
}
.gallery img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery figure:hover img { transform: scale(1.03); }
.gallery-placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
  border: 1px dashed var(--line);
}

/* --- Partners --- */
.partners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
}
.partners--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 820px;
  margin: 0 auto;
}
@media (max-width: 640px) {
  .partners--two { grid-template-columns: 1fr; }
}
.partner {
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: 4px;
  text-align: center;
}
.partner .country {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.5rem;
}
.partner .name {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}
.partner .city {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* --- Team grid --- */
.team {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4) var(--space-3);
  margin: var(--space-3) auto 0;
  max-width: 780px;
}
@media (max-width: 720px) {
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .team { grid-template-columns: 1fr; }
}
.team-member {
  text-align: center;
}
.team-member .avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto var(--space-1);
  background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted);
  font-family: var(--serif);
  font-size: 2rem;
}
.team-member .avatar img {
  width: 100%; height: 100%; object-fit: cover;
}
.team-member .name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
}
.team-member .role {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

/* --- Donation page --- */
.donate-hero {
  background: var(--red-soft);
  padding: var(--space-5) 0;
  text-align: center;
  border-radius: 6px;
  margin-bottom: var(--space-4);
}
.donate-amounts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-2);
  margin: var(--space-3) 0;
}
.donate-amount {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: var(--space-3) var(--space-2);
  text-align: center;
}
.donate-amount .amount {
  font-family: var(--serif);
  font-size: 2.25rem;
  color: var(--red);
  line-height: 1;
}
.donate-amount .net {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-muted);
  margin-top: 0.3rem;
}
.donate-amount .impact {
  margin-top: var(--space-1);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}

/* --- Footer --- */
.site-footer {
  background: var(--bg-soft);
  padding: var(--space-4) 0 var(--space-3);
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  font-weight: 450;
  color: var(--ink-muted);
  margin-top: var(--space-6);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.3fr) 1fr 1fr;
  gap: var(--space-5);
  align-items: start;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; gap: var(--space-3); } }

.footer-brand { display: flex; align-items: center; }
.footer-brand .footer-logo {
  height: 210px;
  width: auto;
  max-width: 100%;
  mix-blend-mode: multiply;
}
.footer-grid h4 {
  color: var(--ink);
  margin-bottom: var(--space-1);
  font-size: 0.8rem;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.4rem; }
.footer-grid a { color: var(--ink-muted); }
.footer-grid a:hover { color: var(--red); }
.footer-bottom {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: 0.8rem;
}

/* --- Utility --- */
.center { text-align: center; }
.muted { color: var(--ink-muted); }
.divider { height: 1px; background: var(--line); margin: var(--space-4) 0; }

/* --- Legal details (mentions légales — de-emphasized) --- */
.legal-details {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-muted);
}
.legal-details h3 {
  font-size: 1rem;
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: var(--space-3);
}
.legal-details strong { color: var(--ink); font-weight: 600; }
.legal-details .eyebrow { margin-bottom: var(--space-2); }

/* Hide language-inactive nodes */
[data-lang]:not(.visible) { display: none; }

/* Focus */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
  border-radius: 2px;
}
