/* Fonds Arezki — feuille de style unique.
   Charte Fonds Arezki 2022 : bleu du logo #06507B avec beaucoup de blanc,
   nuances #183242 et #8090AE ; jaune #FFDE59 repris du site précédent, en touche.
   Typographie, dans l'esprit du site précédent mais allégée :
   - titres : EB Garamond (serif, déjà utilisé sur l'ancien site), en graisse moyenne ;
   - mots-clés : Caveat (manuscrit), avec un trait souligné, en remplacement de Dancing Script ;
   - texte : Jost, police libre très proche d'URW Geometric (police du logo). */

:root {
  --bleu: #06507b;
  --bleu-fonce: #003d5e;
  --nuit: #183242;
  --ardoise: #8090ae;
  --brique: #a15b39;
  --olive: #5c9040;
  --blanc: #ffffff;
  --papier: #f5f7f9;
  --bleu-pale: #e8eff4;
  --texte: #1c2a33;
  --texte-doux: #55636e;
  --ligne: #dbe3ea;
  --jaune: #ffde59;
  --rayon: 12px;
  --max: 1180px;
  --gouttiere: clamp(16px, 4vw, 40px);
  --font: "Jost", "Futura", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "EB Garamond", Garamond, Georgia, serif;
  --manuscrit: "Caveat", "Segoe Print", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--texte);
  background: var(--blanc);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--bleu); }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; text-wrap: balance; color: var(--bleu); }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.2rem; font-weight: 500; }

/* Mot-clé manuscrit, souligné d'un trait de plume (héritage du site précédent) */
.manu {
  font-family: var(--manuscrit); font-style: normal; font-weight: 600; font-size: 1.12em; line-height: 1;
  letter-spacing: 0; padding: 0 .06em .12em; white-space: nowrap;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8.5c38-5 92-7.5 196-3.5' fill='none' stroke='%2306507b' stroke-width='2.6' stroke-linecap='round' opacity='.55'/%3E%3C/svg%3E") left bottom / 100% .32em no-repeat;
}
.hero .manu, .section--bleu .manu, .section--nuit .manu {
  color: var(--jaune);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8.5c38-5 92-7.5 196-3.5' fill='none' stroke='%23ffde59' stroke-width='2.6' stroke-linecap='round' opacity='.8'/%3E%3C/svg%3E");
}
p { margin: 0 0 1em; text-wrap: pretty; }
.sr-only { position: absolute; left: -9999px; }
.sr-only:focus { left: 16px; top: 16px; z-index: 100; background: var(--blanc); padding: 8px 12px; }

.conteneur { max-width: var(--max); margin: 0 auto; padding: 0 var(--gouttiere); }
.etroit { max-width: 760px; }
.centre { text-align: center; margin-left: auto; margin-right: auto; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--pale { background: var(--papier); }
.section--bleu { background: var(--bleu); color: #e3edf3; }
.section--bleu h2, .section--bleu h3 { color: var(--blanc); }
.section--nuit { background: var(--nuit); color: #d5dee5; }
.section--nuit h2, .section--nuit h3 { color: var(--blanc); }

/* Surtitre : petites capitales espacées, comme les titres de la charte */
.surtitre {
  display: block; font-size: .8rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ardoise); margin-bottom: 14px;
}
.section--bleu .surtitre, .section--nuit .surtitre { color: #a9bccb; }
.chapo { font-size: clamp(1.12rem, 1.6vw, 1.32rem); line-height: 1.6; color: var(--texte-doux); font-weight: 300; }
.section--bleu .chapo, .section--nuit .chapo { color: #d5e2ea; }

/* ---------- En-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--ligne);
}
.entete .conteneur { display: flex; align-items: center; justify-content: space-between; height: 92px; gap: 24px; }
.entete__logo img { height: 50px; width: auto; } /* lockup horizontal : 125 px de large minimum */
.nav { display: flex; gap: 2px; align-items: center; }
.nav a {
  text-decoration: none; color: var(--nuit); font-size: .98rem; font-weight: 400; letter-spacing: .01em; white-space: nowrap;
  padding: 10px 12px; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--bleu); }
.nav a[aria-current="page"] { color: var(--bleu); border-bottom-color: var(--bleu); }
.nav a.nav__don { margin-left: 10px; background: var(--bleu); color: var(--blanc); border: 0; padding: 10px 20px; border-radius: 999px; font-weight: 500; }
.nav a.nav__don:hover { background: var(--bleu-fonce); color: var(--blanc); }
.nav a.nav__don[aria-current="page"] { background: var(--nuit); }
.burger { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.burger span { display: block; width: 26px; height: 2px; background: var(--bleu); margin: 6px 0; transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
@media (max-width: 1120px) {
  .entete .conteneur { height: 72px; }
  .entete__logo img { height: 36px; }
  .burger { display: block; }
  .nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--blanc); border-bottom: 1px solid var(--ligne); padding: 8px var(--gouttiere) 20px;
  }
  .nav.ouvert { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--ligne); font-size: .9rem; }
  .nav a[aria-current="page"] { border-bottom-color: var(--ligne); }
  .nav a.nav__don { margin: 16px 0 0; text-align: center; }
}

/* ---------- Héros ---------- */
.hero { position: relative; background: var(--bleu); color: var(--blanc); overflow: hidden; }
.hero__grille { display: grid; grid-template-columns: 1.05fr .95fr; min-height: min(78vh, 680px); }
.hero__texte { padding: clamp(56px, 8vw, 110px) var(--gouttiere) clamp(56px, 8vw, 96px) max(var(--gouttiere), calc((100vw - var(--max)) / 2 + var(--gouttiere))); display: flex; flex-direction: column; justify-content: center; }
.hero h1 { color: var(--blanc); }
.hero .chapo { color: #d5e2ea; max-width: 34em; }
.hero__visuel { position: relative; }
.hero__visuel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__visage { width: 64px; margin-bottom: 26px; opacity: .95; }
@media (max-width: 860px) {
  .hero__grille { grid-template-columns: 1fr; min-height: 0; }
  .hero__visuel { aspect-ratio: 16 / 10; order: -1; }
}

.hero--page { background: var(--papier); color: var(--texte); }
.hero--page .conteneur { padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(40px, 6vw, 72px); }
.hero--page h1 { color: var(--bleu); max-width: 18em; }
.hero--page .chapo { color: var(--texte-doux); max-width: 40em; }
.fil-ariane { font-size: .82rem; letter-spacing: .06em; color: var(--texte-doux); margin-bottom: 26px; }
.fil-ariane a { color: inherit; text-decoration: none; }
.fil-ariane a:hover { color: var(--bleu); }

/* ---------- Boutons et liens ---------- */
.boutons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.bouton {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer;
  font: 500 1rem/1 var(--font); letter-spacing: .01em;
  padding: 15px 26px; border-radius: 999px; border: 1.5px solid var(--bleu);
  background: var(--bleu); color: var(--blanc); transition: background .2s, color .2s;
}
.bouton:hover { background: var(--bleu-fonce); border-color: var(--bleu-fonce); }
.bouton--clair { background: transparent; color: var(--bleu); }
.bouton--clair:hover { background: var(--bleu); color: var(--blanc); }
.hero .bouton, .section--bleu .bouton, .section--nuit .bouton { background: var(--blanc); color: var(--bleu); border-color: var(--blanc); }
.hero .bouton:hover, .section--bleu .bouton:hover, .section--nuit .bouton:hover { background: var(--bleu-pale); }
.hero .bouton--clair, .section--bleu .bouton--clair, .section--nuit .bouton--clair { background: transparent; color: var(--blanc); }
.hero .bouton--clair:hover, .section--bleu .bouton--clair:hover, .section--nuit .bouton--clair:hover { background: rgba(255,255,255,.12); }
.lien-fleche { font-weight: 500; text-decoration: none; letter-spacing: .04em; color: var(--bleu); }
.lien-fleche::after { content: " →"; transition: margin .2s; }
.lien-fleche:hover::after { margin-left: 4px; }

/* ---------- Grilles ---------- */
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.deux-colonnes--haut { align-items: start; }
.grille-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grille-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grille-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 900px) {
  .deux-colonnes, .grille-3 { grid-template-columns: 1fr; }
  .grille-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) { .grille-2, .grille-4 { grid-template-columns: 1fr; } }
.entete-section { margin-bottom: clamp(32px, 5vw, 56px); max-width: 760px; }

/* Photos au format carré, comme le préconise la charte */
.carre { aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: var(--rayon); }
.photo-legende { font-size: .82rem; color: var(--texte-doux); margin-top: 10px; }

/* ---------- Cartes ---------- */
.carte { background: var(--blanc); border: 1px solid var(--ligne); padding: 28px; border-radius: var(--rayon); }
.section--pale .carte { border-color: transparent; }
.carte h3 { margin-bottom: .4em; }
.carte p:last-child { margin-bottom: 0; }
.carte__num { font-size: .8rem; font-weight: 500; letter-spacing: .2em; color: var(--ardoise); margin-bottom: 12px; display: block; }

.entree { text-decoration: none; color: inherit; display: block; }
.entree img { aspect-ratio: 1; object-fit: cover; width: 100%; transition: transform .5s; }
.entree__cadre { overflow: hidden; margin-bottom: 18px; border-radius: var(--rayon); }
.entree:hover img { transform: scale(1.04); }
.entree h3 { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; margin-bottom: .2em; }
.entree p { color: var(--texte-doux); margin-bottom: .6em; }

.mission img { aspect-ratio: 1; object-fit: cover; width: 100%; margin-bottom: 22px; border-radius: var(--rayon); }
.mission h3 { font-family: var(--serif); font-size: 1.7rem; font-weight: 500; }
.mission__objectif { font-size: .95rem; color: var(--texte-doux); border-top: 1px solid var(--ligne); padding-top: 12px; }
.mission__objectif b { color: var(--bleu); font-weight: 500; }

/* Statistique d'accroche */
.stat { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 4vw, 56px); align-items: center; }
.stat__valeur { font-family: var(--serif); font-size: clamp(2.8rem, 7vw, 5.6rem); font-weight: 500; line-height: 1; color: var(--jaune); white-space: nowrap; }
.stat__texte { font-size: clamp(1.1rem, 1.8vw, 1.45rem); font-weight: 300; margin: 0; }
@media (max-width: 700px) { .stat { grid-template-columns: 1fr; } .stat__valeur { white-space: normal; } }

.chiffre__valeur { font-family: var(--serif); font-size: clamp(3rem, 5.4vw, 4.2rem); font-weight: 500; color: var(--bleu); line-height: 1; margin-bottom: 12px; }
.chiffre { border-top: 2px solid var(--bleu); padding-top: 20px; }
.chiffre p { color: var(--texte-doux); margin: 0; }
.source { font-size: .8rem; color: var(--texte-doux); margin-top: 24px; }

.constat { border-left: 2px solid var(--brique); padding-left: 20px; }
.constat h3 { color: var(--nuit); }
.constat p { color: var(--texte-doux); margin: 0; }

/* Citation */
.citation { font-family: var(--serif); font-style: italic; font-size: clamp(1.7rem, 3.2vw, 2.6rem); font-weight: 400; line-height: 1.3; margin: 0; color: var(--blanc); }
.citation::before { content: "« "; }
.citation::after { content: " »"; }
.citation__auteur { margin-top: 18px; letter-spacing: .2em; text-transform: uppercase; font-size: .8rem; color: #a9bccb; }
.portrait-rond { width: clamp(140px, 18vw, 220px); aspect-ratio: 1; object-fit: cover; border-radius: 50%; filter: grayscale(1); }
.bandeau-citation { display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 700px) { .bandeau-citation { grid-template-columns: 1fr; } }

/* Valeurs */
.valeur h3 { font-size: 1.15rem; font-weight: 500; }
.valeur h3::before { content: ""; display: block; width: 28px; height: 2px; background: var(--brique); margin-bottom: 16px; }
.section--bleu .valeur p { color: #d5e2ea; }
.section--bleu .valeur h3::before { background: #a9bccb; }

/* Histoire : sections alternées */
.recit { display: grid; gap: clamp(56px, 8vw, 96px); }
.recit__bloc { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.recit__bloc:nth-child(even) .recit__image { order: 2; }
.recit__bloc h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); }
@media (max-width: 860px) { .recit__bloc { grid-template-columns: 1fr; } .recit__bloc:nth-child(even) .recit__image { order: 0; } }

.piliers { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.piliers li { border: 1px solid var(--bleu); color: var(--bleu); padding: 8px 16px; font-size: .88rem; letter-spacing: .06em; border-radius: 40px; }
.section--bleu .piliers li { border-color: rgba(255,255,255,.5); color: var(--blanc); }

/* Partenaires */
.logos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; align-items: stretch; }
.logos a { border-radius: var(--rayon); display: flex; align-items: center; justify-content: center; background: var(--blanc); border: 1px solid var(--ligne); padding: 20px; aspect-ratio: 3 / 2; text-decoration: none; color: var(--bleu); font-weight: 500; text-align: center; transition: border-color .2s; }
.logos a:hover { border-color: var(--bleu); }
.logos img { max-height: 76px; width: auto; max-width: 100%; object-fit: contain; }
@media (max-width: 900px) { .logos { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .logos { grid-template-columns: repeat(2, 1fr); } }

.fiche { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 64px); align-items: start; padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--ligne); scroll-margin-top: 100px; }
.fiche:first-child { border-top: 0; padding-top: 0; }
.fiche__logo { height: 56px; width: auto; margin-bottom: 18px; }
.fiche .chapo { color: var(--nuit); }
@media (max-width: 860px) { .fiche { grid-template-columns: 1fr; } }

/* Listes */
.coches { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.coches li { position: relative; padding-left: 32px; }
.coches li::before { content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 9px; border-left: 2px solid var(--bleu); border-bottom: 2px solid var(--bleu); transform: rotate(-45deg); }
.section--bleu .coches li::before { border-color: var(--blanc); }
.coches--2 { grid-template-columns: 1fr 1fr; column-gap: 32px; }
@media (max-width: 700px) { .coches--2 { grid-template-columns: 1fr; } }

/* Étapes numérotées */
.etapes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: 0; counter-reset: etape; }
.etapes li { counter-increment: etape; position: relative; padding: 0 16px 0 0; }
.etapes li::before {
  font-family: var(--serif);
  content: counter(etape); display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--bleu); color: var(--blanc); font-size: 1.3rem; font-weight: 400; margin-bottom: 18px; position: relative; z-index: 1;
}
.etapes li::after { content: ""; position: absolute; top: 26px; left: 52px; right: 0; height: 1px; background: var(--ardoise); }
.etapes li:last-child::after { display: none; }
.etapes h3 { margin-bottom: .2em; }
.etapes p { color: var(--texte-doux); font-size: .95rem; margin: 0; }
.section--bleu .etapes li::before { background: var(--blanc); color: var(--bleu); }
.section--bleu .etapes p { color: #d5e2ea; }
@media (max-width: 860px) {
  .etapes { grid-template-columns: 1fr; gap: 24px; }
  .etapes li { display: grid; grid-template-columns: 52px 1fr; column-gap: 18px; padding: 0; }
  .etapes li::before { grid-row: span 2; margin: 0; }
  .etapes li::after { top: 52px; bottom: -24px; left: 26px; right: auto; width: 1px; height: auto; }
}

/* Avantages fiscaux */
.avantage { background: var(--blanc); padding: 32px; border-top: 3px solid var(--bleu); border-radius: var(--rayon); }
.avantage__public { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ardoise); }
.avantage__taux { font-family: var(--serif); font-size: clamp(3.2rem, 6vw, 4.8rem); font-weight: 500; color: var(--bleu); line-height: 1.1; }
.avantage p { margin: 0; color: var(--texte-doux); }

.encart { background: var(--bleu-pale); padding: clamp(24px, 4vw, 40px); border-radius: var(--rayon); }
.encart p:last-child { margin-bottom: 0; }
.petit { font-size: .88rem; color: var(--texte-doux); }

/* ---------- Formulaire ---------- */
.formulaire { display: grid; gap: 18px; }
.formulaire .ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .formulaire .ligne { grid-template-columns: 1fr; } }
.formulaire label { display: grid; gap: 6px; font-size: .9rem; font-weight: 500; color: var(--nuit); }
.formulaire input, .formulaire select, .formulaire textarea {
  font: 400 1rem/1.4 var(--font); padding: 13px 14px; border: 1px solid #b9c6d1; border-radius: var(--rayon); background: var(--blanc); color: var(--texte); width: 100%;
}
.formulaire input:focus, .formulaire select:focus, .formulaire textarea:focus { outline: 2px solid var(--bleu); outline-offset: 1px; border-color: var(--bleu); }
.formulaire textarea { min-height: 160px; resize: vertical; }
.formulaire .consentement { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--texte-doux); font-size: .86rem; }
.formulaire .consentement input { width: auto; margin-top: 4px; }
.formulaire .piege { position: absolute; left: -9999px; }
.statut { min-height: 1.4em; color: var(--bleu); font-weight: 500; margin: 0; }
.coordonnees { display: grid; grid-template-columns: auto 1fr; gap: 10px 24px; margin: 0; }
.coordonnees dt { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ardoise); padding-top: 4px; }
.coordonnees dd { margin: 0; white-space: pre-line; }

/* ---------- Texte courant (mentions légales) ---------- */
.texte-courant h2 { font-size: 1.4rem; font-weight: 500; margin-top: 2em; }
.texte-courant h2:first-child { margin-top: 0; }
.a-completer { background: #fff3cd; padding: 0 4px; }

/* ---------- Pied de page ---------- */
.pied { background: var(--nuit); color: #b8c6d1; font-size: .92rem; padding: 64px 0 32px; }
.pied a { color: #dfe7ed; text-decoration: none; }
.pied a:hover { color: var(--blanc); text-decoration: underline; }
.pied__haut { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.12); }
.pied__logo img { width: 210px; height: auto; }
.pied__titre { font-size: .76rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ardoise); margin-bottom: 14px; }
.pied__liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pied__adresse { white-space: pre-line; margin: 0 0 8px; }
.pied__bas { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; font-size: .82rem; }
@media (max-width: 860px) { .pied__haut { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .pied__haut { grid-template-columns: 1fr; } }

/* Apparition douce au défilement */
.apparition { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.apparition.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .apparition { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
.vide { color: var(--texte-doux); font-style: italic; }
