/* =========================================================================
   Fonds de Dotation Maria Callas — feuille de style principale
   Identité typographique : serif classique, palette noir / crème / doré discret.
   ========================================================================= */

:root {
  /* Palette */
  --ink:        #17140f;   /* noir chaud, texte principal */
  --ink-soft:   #35302a;   /* noir adouci, texte de contenu */
  --paper:      #faf7f0;   /* crème */
  --paper-warm: #f3ecdf;   /* crème plus chaud pour sections alternées */
  --paper-deep: #14110c;   /* fond sombre (hero / footer) */
  --cream-on-dark: #f3ecdf;
  --muted:      #6b6357;   /* texte secondaire */
  --muted-dark: #a89f8e;   /* texte secondaire sur fond sombre */
  --gold:       #a8873f;   /* doré discret */
  --gold-soft:  #c7ab73;
  --line:       #dcd3c2;   /* filets clairs */
  --line-dark:  #3a342a;   /* filets sur fond sombre */

  /* Typographie */
  --serif-display: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --serif-text:    "EB Garamond", Georgia, "Times New Roman", serif;
  --sans:          system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Mesures */
  --measure: 66ch;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --section-y: clamp(3.5rem, 9vw, 7rem);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-text);
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
  line-height: 1.75;
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ----- Titres ----- */
h1, h2, h3, h4 {
  font-family: var(--serif-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0.005em;
  color: var(--ink);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.5rem, 1.6rem + 4.4vw, 5rem); font-weight: 500; }
h2 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); }
h3 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); }
h4 { font-size: 1.15rem; letter-spacing: 0.02em; }

p { margin: 0 0 1.2em; max-width: var(--measure); }
a { color: inherit; }

/* Liens de contenu */
.prose a,
a.link {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 1px;
  transition: color .2s ease, border-color .2s ease;
}
.prose a:hover,
a.link:hover { color: var(--gold); border-color: var(--gold-soft); }

strong { font-weight: 600; }
em { font-style: italic; }

/* Suréléments / yeux ----- */
.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--gold);
  margin: 0 0 1.2rem;
}
.eyebrow--muted { color: var(--muted); }

/* Filet doré fin */
.rule {
  width: 56px; height: 1px;
  background: var(--gold);
  border: 0; margin: 1.8rem 0;
}
.rule--center { margin-left: auto; margin-right: auto; }


/* =========================================================================
   Mise en page
   ========================================================================= */
.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 52rem; }

.section { padding-block: var(--section-y); }
.section--warm { background: var(--paper-warm); }
.section--dark { background: var(--paper-deep); color: var(--cream-on-dark); }
.section--dark h1,
.section--dark h2,
.section--dark h3 { color: var(--cream-on-dark); }
.section--dark p { color: var(--muted-dark); }

/* Accès rapide clavier */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 0.7rem 1.1rem; z-index: 1000;
  font-family: var(--sans); font-size: 0.85rem;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* =========================================================================
   En-tête
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  padding-inline: var(--gutter);
  max-width: 78rem; margin-inline: auto;
}
.brand {
  display: inline-flex; flex-direction: column; gap: 2px;
  text-decoration: none; color: var(--ink);
  line-height: 1;
}
.brand__name {
  font-family: var(--serif-display);
  font-size: 1.35rem; font-weight: 600; letter-spacing: 0.06em;
}
.brand__tag {
  font-family: var(--sans);
  font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.24em;
  color: var(--muted);
}

/* Navigation principale */
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); }
.nav__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem);
}
.nav__link {
  font-family: var(--sans);
  font-size: 0.82rem; letter-spacing: 0.04em;
  text-decoration: none; color: var(--ink-soft);
  padding: 0.4rem 0; position: relative;
  transition: color .2s ease;
}
.nav__link:hover { color: var(--gold); }
.nav__link[aria-current="page"] { color: var(--gold); }
.nav__link[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--gold);
}

/* Sélecteur de langue */
.lang {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.06em;
}
.lang a { text-decoration: none; color: var(--muted); }
.lang a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.lang span { color: var(--line); }

/* Bouton menu (mobile) */
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line);
  border-radius: 4px;
  width: 42px; height: 38px; cursor: pointer;
  color: var(--ink); align-items: center; justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* =========================================================================
   Hero — direction « Nocturne » : ouverture sombre, visuel plein cadre
   -------------------------------------------------------------------------
   Pour intégrer le visuel d'ouverture définitif : poser l'image sur
   .hero__bg (ex. inline style="background-image:url('/assets/hero.jpg')"),
   ajouter la classe .hero--image sur <section class="hero"> (léger zoom
   cinématographique), puis retirer le <p class="hero__note">.
   ========================================================================= */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(88vh, 820px);
  display: flex;
  align-items: center;
  background: var(--paper-deep);
  color: var(--cream-on-dark);
  overflow: hidden;
  padding-block: clamp(3.5rem, 9vw, 7rem);
}
/* Calque image plein cadre. WebP avec repli JPEG pour les navigateurs anciens. */
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  background-color: #14110c;
  background-position: 50% 32%; background-size: cover; background-repeat: no-repeat;
  background-image: url("/assets/hero.jpg");
  background-image: image-set(
    url("/assets/hero.webp") type("image/webp"),
    url("/assets/hero.jpg") type("image/jpeg"));
}
.hero--image .hero__bg { animation: heroZoom 24s ease-out both; }
/* Voile dégradé pour garantir la lisibilité du texte par-dessus l'image. */
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(130% 100% at 50% 40%, transparent 40%, rgba(8,6,4,0.55) 100%),
    linear-gradient(180deg, rgba(8,6,4,0.60) 0%, rgba(8,6,4,0.12) 30%, rgba(8,6,4,0.35) 72%, rgba(8,6,4,0.85) 100%);
}
.hero__inner { position: relative; text-align: center; max-width: 52rem; margin-inline: auto; }
.hero .eyebrow { color: var(--gold-soft); }
.hero h1 {
  color: var(--cream-on-dark);
  font-size: clamp(2.8rem, 1.9rem + 5vw, 6rem);
  text-shadow: 0 1px 30px rgba(0,0,0,0.35);
}
.hero__lede {
  font-size: clamp(1.2rem, 1rem + 0.9vw, 1.6rem);
  color: var(--cream-on-dark);
  max-width: 38ch; margin-inline: auto; line-height: 1.6;
}
/* Boutons adaptés au fond sombre. */
.hero .btn { background: var(--gold); border-color: var(--gold); color: #14110c; }
.hero .btn:hover { background: transparent; color: var(--gold-soft); }
.hero .btn--ghost { background: transparent; border-color: var(--gold-soft); color: var(--cream-on-dark); }
.hero .btn--ghost:hover { background: var(--cream-on-dark); color: #14110c; border-color: var(--cream-on-dark); }
/* Note d'emplacement du visuel (à retirer une fois l'image posée). */
.hero__note {
  position: absolute; left: 0; right: 0; bottom: 1.2rem; margin: 0;
  text-align: center; color: var(--muted-dark);
  font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
}
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .hero--image .hero__bg { animation: none; } }

/* Variante « texte à gauche » : la typographie occupe la zone sombre,
   le portrait respire à droite. Retirer la classe .hero--left sur la
   <section class="hero"> pour revenir au texte centré. */
.hero--left .hero__inner { text-align: left; max-width: 38rem; margin-inline: 0; }
.hero--left .hero__lede { margin-inline: 0; max-width: 34ch; font-size: clamp(1.1rem, 1rem + 0.5vw, 1.32rem); }
.hero--left .actions--center { justify-content: flex-start; }
/* Titre contenu pour que les appels à l'action restent au-dessus de la ligne de flottaison. */
.hero--left h1 { font-size: clamp(2.3rem, 1.4rem + 2.9vw, 3.9rem); margin-bottom: 0.45em; }

/* Direction artistique mobile : cadrage vertical du portrait, texte centré. */
@media (max-width: 760px) {
  .hero { min-height: min(92vh, 760px); }
  .hero__bg {
    background-position: 50% 26%;
    background-image: url("/assets/hero-portrait.jpg");
    background-image: image-set(
      url("/assets/hero-portrait.webp") type("image/webp"),
      url("/assets/hero-portrait.jpg") type("image/jpeg"));
  }
  /* Voile renforcé : le texte passe par-dessus le portrait. */
  .hero__scrim {
    background:
      linear-gradient(180deg, rgba(8,6,4,0.78) 0%, rgba(8,6,4,0.42) 42%, rgba(8,6,4,0.62) 74%, rgba(8,6,4,0.92) 100%);
  }
  .hero--left .hero__inner { text-align: center; max-width: none; margin-inline: auto; }
  .hero--left .hero__lede { margin-inline: auto; }
  .hero--left .actions--center { justify-content: center; }
}

/* Emplacement d'image dans une page intérieure (ex. portrait de Maria Callas). */
/* Portrait d'archive posé dans le corps de texte. */
.portrait { margin: 2.4rem 0; max-width: 24rem; }
.portrait img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); background: #14110c;
}
.portrait figcaption {
  margin-top: 0.7rem; line-height: 1.55;
  font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--muted);
}
/* Sur écran large, le portrait se décale dans la marge et le texte l'enveloppe.
   Les titres suivants dégagent le flottant pour ne pas être comprimés. */
@media (min-width: 900px) {
  .portrait { float: right; margin: 0.4rem 0 1.6rem 2.6rem; max-width: 19rem; }
  .prose h2 { clear: both; }
}
@media (max-width: 899px) { .portrait { max-width: 20rem; } }

/* Page-header (pages intérieures) */
.page-header {
  background: var(--paper-warm);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(3rem, 7vw, 5rem);
  text-align: center;
}
.page-header .eyebrow { margin-bottom: 0.8rem; }
.page-header p { max-width: 40ch; margin-inline: auto; color: var(--muted); }

/* =========================================================================
   Boutons
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--sans); font-size: 0.82rem; letter-spacing: 0.1em;
  text-transform: uppercase; text-decoration: none;
  padding: 0.85rem 1.7rem;
  border: 1px solid var(--ink);
  color: var(--paper); background: var(--ink);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
  cursor: pointer;
}
.btn:hover { background: transparent; color: var(--ink); }
.section--dark .btn { border-color: var(--gold-soft); background: var(--gold); color: #14110c; }
.section--dark .btn:hover { background: transparent; color: var(--gold-soft); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.actions--center { justify-content: center; }

/* Formulaire de don embarqué (HelloAsso).
   Le cadre distant arrive avec sa propre identité visuelle : on ne cherche pas
   à la contrefaire, on lui donne une bordure discrète et de l'air, pour qu'il
   se lise comme une pièce rapportée assumée plutôt que comme un accident. */
.donation-embed { margin-top: 2.5rem; }
.donation-embed__frame {
  width: 100%;
  min-height: 46rem;
  border: 1px solid var(--line);
  background: var(--paper);
  display: block;
}
.donation-embed__fallback {
  margin-top: 1rem;
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--muted);
}
@media (max-width: 40rem) {
  /* Le formulaire distant s'allonge sur petit écran : on lui laisse la place
     plutôt que de le condamner à défiler dans une fenêtre trop courte. */
  .donation-embed__frame { min-height: 58rem; }
}

/* =========================================================================
   Grilles de contenu
   ========================================================================= */
.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.8rem); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  padding: 1.8rem 0 0;
  border-top: 1px solid var(--line);
}
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--muted); margin-bottom: 0; }
.card .num {
  font-family: var(--serif-display); font-size: 1.1rem; color: var(--gold);
  display: block; margin-bottom: 0.8rem; letter-spacing: 0.1em;
}

/* Lede / intro */
.lede {
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.7rem);
  line-height: 1.5;
  font-family: var(--serif-display);
  color: var(--ink);
  max-width: 30ch;
}
.lede--wide { max-width: 46rem; }

/* Deux colonnes texte */
.split {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: start;
}
.split__aside .eyebrow { margin-bottom: 0.6rem; }

/* Liste de valeurs / faits */
.deflist { margin: 0; }
.deflist > div {
  display: grid; grid-template-columns: 1fr; gap: 0.2rem;
  padding: 1.1rem 0; border-top: 1px solid var(--line);
}
.deflist dt {
  font-family: var(--sans); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--gold);
}
.deflist dd { margin: 0; color: var(--ink-soft); }

/* Actualités */
.news-item {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: 1.5rem;
  padding: 1.8rem 0; border-top: 1px solid var(--line);
  align-items: baseline;
}
.news-item:last-child { border-bottom: 1px solid var(--line); }
.news-item time {
  font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.news-item h3 { margin: 0 0 0.35rem; }
.news-item p { margin: 0; color: var(--muted); }

/* Bloc contact */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.5rem,4vw,3.5rem); }
.contact-block h3 { font-family: var(--sans); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--gold); margin-bottom: 0.6rem; }
.contact-block p { color: var(--ink-soft); margin-bottom: 0.3rem; }

/* Prose (mentions légales, textes longs) */
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 1.8rem; }
.prose ul { padding-left: 1.2rem; max-width: var(--measure); }
.prose li { margin-bottom: 0.4rem; }

/* =========================================================================
   Pied de page
   ========================================================================= */
.site-footer {
  background: var(--paper-deep);
  color: var(--muted-dark);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  font-size: 0.95rem;
}
.footer-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem;
  padding-bottom: 2.5rem; border-bottom: 1px solid var(--line-dark);
}
.footer-brand .brand__name { color: var(--cream-on-dark); font-size: 1.5rem; }
.footer-brand p { color: var(--muted-dark); max-width: 34ch; margin-top: 1rem; }
.footer-col h4 {
  font-family: var(--sans); font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--gold-soft); margin-bottom: 1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { color: var(--muted-dark); text-decoration: none; transition: color .2s ease; }
.footer-col a:hover { color: var(--cream-on-dark); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  align-items: center; padding-top: 1.8rem;
  font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.03em; color: var(--muted-dark);
}
.footer-bottom a { color: var(--muted-dark); }
.footer-bottom nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }

/* =========================================================================
   Utilitaires
   ========================================================================= */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.stack > * + * { margin-top: 1.1rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 68px 0 auto 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.5rem var(--gutter) 1.5rem;
    transform: translateY(-8px);
    opacity: 0; visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    box-shadow: 0 20px 40px -24px rgba(0,0,0,0.35);
  }
  .nav[data-open="true"] { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .nav__link {
    padding: 0.9rem 0; border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }
  .nav__link[aria-current="page"]::after { display: none; }
  .lang { padding-top: 1rem; }
}

/* Sans JavaScript : la navigation reste visible sur mobile */
@media (max-width: 760px) {
  html.no-js .nav {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; padding-inline: 0;
  }
  html.no-js .nav-toggle { display: none; }
}

.news-item { grid-template-columns: 8.5rem 1fr; }
@media (max-width: 560px) {
  .news-item { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* =========================================================================
   Vague 4 — visuels, vidéo, appels à l'action
   ========================================================================= */

.prose figure, .page-visual {
  margin: 2rem 0;
}
.prose figure img, .page-visual img {
  width: 100%; height: auto; display: block;
  max-height: 34rem; object-fit: cover;
}
.prose figcaption, .page-visual figcaption {
  font-family: var(--sans);
  font-size: .74rem; letter-spacing: .04em;
  color: var(--muted); margin-top: .55rem;
}
.page-visual { margin: 0 0 .5rem; }

.video-facade {
  position: relative; margin: 2rem 0;
  background: var(--paper-deep);
}
.video-facade img {
  width: 100%; height: auto; display: block;
  aspect-ratio: 16 / 9; object-fit: cover; opacity: .82;
}
.video-facade__play {
  position: absolute; inset: 0; margin: auto;
  width: 4.5rem; height: 4.5rem; border-radius: 50%;
  border: 1px solid var(--gold-soft);
  background: rgba(20, 17, 12, .72); color: var(--cream-on-dark);
  display: grid; place-items: center; cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.video-facade__play svg { width: 2rem; height: 2rem; margin-left: .2rem; }
.video-facade__play:hover { transform: scale(1.06); background: rgba(20, 17, 12, .9); }
.video-facade__play:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.video-facade__title {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
  padding: .8rem 1rem;
  font-family: var(--sans); font-size: .72rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--cream-on-dark);
  background: linear-gradient(transparent, rgba(20, 17, 12, .85));
}
.video-facade iframe {
  width: 100%; aspect-ratio: 16 / 9; border: 0; display: block;
}

.cta-band h2 { margin-bottom: .6rem; }

.stats { display: grid; gap: 2rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.stats .num {
  font-family: var(--serif-display); font-weight: 600;
  font-size: clamp(2.1rem, 1.6rem + 1.6vw, 3.1rem); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stats p { margin: .4rem 0 0; font-family: var(--sans); font-size: .76rem; color: var(--muted); }
.section--dark .stats p { color: var(--muted-dark); }
