/* =============================================================
   Qui sommes-nous — styles spécifiques à cette page.
   ----------------------------------------------------------------
   Page structurée en 3 sections via .page-frame (cf. site.css §6.7) :
     - #histoire     : récit familial (.territory) + factbox
     - #engagement   : 3 thématiques repliables (.engagement-block)
     - #reseau       : appartenance au réseau Esprit de famille
   ============================================================= */

/* =========================================================
   SECTIONS — empilement et filets de séparation
   ========================================================= */
.engagement,
.network {
  padding-block: clamp(56px, 7vw, 96px);
  border-top: 1px solid var(--rule);
}

/* =========================================================
   ANCRAGE TERRITORIAL — section unique de la page
   ----------------------------------------------------------
   Composition :
     - .head    : eyebrow + h2 (en-tête pleine largeur)
     - .grid    : 2 colonnes — body (récit + anime) / factbox
   Markup :
     <section class="territory">
       <div class="container">
         <div class="head">
           <span class="eyebrow">Ancrage</span>
           <h2>… <em>mot ocre</em>.</h2>
         </div>
         <div class="grid">
           <div class="body">
             <p class="story">… <em>mot ocre</em>.</p>
             <p class="story">…</p>
             <div class="anime">
               <p class="anime-q">Ce qui nous anime ?</p>
               <p class="anime-a">Aider les plus <em>vulnérables</em>.</p>
               <p class="anime-note">…</p>
             </div>
           </div>
           <aside class="factbox">…</aside>
         </div>
       </div>
     </section>
   ========================================================= */
.territory {
  padding-block: clamp(24px, 3vw, 48px) clamp(56px, 7vw, 96px);
}

/* En-tête de section (eyebrow + h2) — pleine largeur, au-dessus de la grille */
.territory .head { margin-bottom: clamp(40px, 5vw, 64px); }
.territory .eyebrow { margin-bottom: 18px; }
.territory h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(32px, 3.4vw, 48px); line-height: 1.14;
  color: var(--marine); max-width: 16ch; letter-spacing: -0.014em;
}

/* Grille 2 colonnes : récit / factbox */
.territory .grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px); align-items: start;
}

/* Récit d'origine — paragraphes courts, sobres, italiques ocre pour l'emphase */
.territory .body { display: flex; flex-direction: column; gap: 22px; }
.territory .story {
  font-size: clamp(17px, 1.5vw, 19px); line-height: 1.7;
  color: var(--stone-700);
  max-width: 50ch; text-wrap: pretty;
}
.territory .story em {
  font-style: italic; color: var(--ocher); font-weight: 500;
}

/* Lede conservée — alignée visuellement sur .story pour la cohérence du flux */
.territory .lede {
  font-size: clamp(17px, 1.5vw, 19px); line-height: 1.7;
  color: var(--stone-700);
  max-width: 50ch; text-wrap: pretty;
}

/* ANIME — « Ce qui nous anime ? » intégré au flux, en peer du reste de
   la page : titre serif italique substantiel, réponse à l'échelle d'un
   manifesto, filet ocre marqué, plus d'air autour. */
.territory .anime {
  margin-top: 16px; padding-top: 48px;
  border-top: 1px solid color-mix(in srgb, var(--ocher) 55%, transparent);
  max-width: 60ch;
}
.territory .anime-q {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(22px, 2vw, 28px);
  color: var(--ocher-deep); letter-spacing: -0.008em;
  margin-bottom: 22px;
}
.territory .anime-a {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.28; letter-spacing: -0.015em;
  color: var(--marine); max-width: 22ch;
  text-wrap: balance;
  margin-bottom: 28px;
}
.territory .anime-a em {
  font-style: italic; color: var(--ocher); font-weight: 400;
}
.territory .anime-note {
  font-size: clamp(16px, 1.4vw, 18px); line-height: 1.65;
  color: var(--stone-700);
  max-width: 56ch; text-wrap: pretty;
}

@media (max-width: 720px) {
  .territory .grid { grid-template-columns: 1fr; gap: 32px; }
  /* Le titre h3 d'engagement reste lisible mais on resserre l'écart au toggle */
  .engagement-block > summary { gap: 16px; }
  .engagement-block > summary .toggle { width: 28px; height: 28px; }
}


/* =========================================================
   ENGAGEMENT — séquence de thématiques repliables
   ----------------------------------------------------------
   Chaque thématique est un <details> natif. Pas de JS requis
   pour l'ouverture/fermeture ; un petit script en bas de page
   ouvre automatiquement le bloc correspondant à l'ancre
   (#enfance / #insertion / #ecologie) si on arrive par un lien
   externe.
   Markup :
     <section class="engagement" id="engagement">
       <div class="head">
         <span class="eyebrow">Notre engagement</span>
         <h2>Trois thématiques, un même <em>engagement</em>.</h2>
       </div>
       <details class="engagement-block" id="enfance">
         <summary>
           <div class="summary-text">
             <span class="num">01 — Cœur historique</span>
             <h3>Enfance &amp; Jeunesse</h3>
           </div>
           <span class="toggle" aria-hidden="true"></span>
         </summary>
         <div class="content">
           <div class="body"><p>…</p></div>
           <h4>Domaines d'intervention</h4>
           <ul class="bullets"><li>…</li></ul>
         </div>
       </details>
       …
     </section>
   ========================================================= */
.engagement .head { margin-bottom: clamp(32px, 4vw, 48px); }
.engagement .head .eyebrow { margin-bottom: 18px; }
.engagement .head h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(32px, 3.4vw, 48px); line-height: 1.14;
  color: var(--marine); max-width: 18ch; letter-spacing: -0.014em;
}
.engagement .head h2 em {
  font-style: italic; color: var(--ocher); font-weight: 400;
}

.engagement-block { border-top: 1px solid var(--rule); }
.engagement-block:first-of-type { border-top: 0; }

/* ----- Summary (entête cliquable) ----- */
.engagement-block > summary {
  list-style: none; cursor: pointer;
  padding-block: clamp(28px, 4vw, 48px);
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(24px, 3vw, 48px);
  transition: color var(--t-fast) var(--ease-out);
}
.engagement-block > summary::-webkit-details-marker { display: none; }
.engagement-block > summary::marker { content: ""; }
.engagement-block > summary .summary-text {
  display: flex; flex-direction: column; gap: 12px;
}
.engagement-block .num {
  display: inline-block;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.16em; color: var(--ocher-deep);
  text-transform: uppercase;
  transition: color var(--t-fast) var(--ease-out);
}
.engagement-block h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(26px, 2.8vw, 36px); line-height: 1.14;
  color: var(--marine); letter-spacing: -0.014em;
  max-width: 22ch;
  margin: 0;
  transition: color var(--t-fast) var(--ease-out);
}
.engagement-block > summary:hover h3 { color: var(--ocher-deep); }
.engagement-block > summary:hover .num { color: var(--ocher); }
.engagement-block > summary:focus-visible {
  outline: 2px solid var(--ocher); outline-offset: 4px; border-radius: var(--r-1);
}

/* ----- Toggle + / − (CSS pur, animé) ----- */
.engagement-block > summary .toggle {
  flex: none; position: relative;
  width: 32px; height: 32px;
  color: var(--ocher);
}
.engagement-block > summary .toggle::before,
.engagement-block > summary .toggle::after {
  content: ""; position: absolute;
  top: 50%; left: 50%;
  background: currentColor;
  transition: transform var(--t-base) var(--ease-out);
}
.engagement-block > summary .toggle::before {
  width: 20px; height: 1.5px;
  transform: translate(-50%, -50%);
}
.engagement-block > summary .toggle::after {
  width: 1.5px; height: 20px;
  transform: translate(-50%, -50%);
}
.engagement-block[open] > summary .toggle::after {
  transform: translate(-50%, -50%) scaleY(0);
}

/* ----- Content (partie dépliée) ----- */
.engagement-block .content {
  padding-bottom: clamp(40px, 6vw, 80px);
}
.engagement-block .body {
  display: flex; flex-direction: column; gap: 20px;
  max-width: 64ch;
}
.engagement-block .body p {
  font-size: clamp(17px, 1.5vw, 19px); line-height: 1.7;
  color: var(--stone-700);
  text-wrap: pretty;
}
.engagement-block .body em {
  font-style: italic; color: var(--ocher); font-weight: 500;
}
.engagement-block .body a {
  color: var(--ocher-deep);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ocher) 50%, transparent);
  text-underline-offset: 3px;
  transition: color var(--t-fast) var(--ease-out),
              text-decoration-color var(--t-fast) var(--ease-out);
}
.engagement-block .body a:hover {
  color: var(--ocher);
  text-decoration-color: var(--ocher);
}
.engagement-block h4 {
  font-family: var(--sans); font-weight: 600;
  font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--marine);
  margin: 44px 0 22px;
  display: inline-flex; align-items: center; gap: 10px;
}
.engagement-block h4::before {
  content: ""; width: 24px; height: 1px; background: var(--ocher);
}
.engagement-block .bullets {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 64ch;
}
.engagement-block .bullets li {
  display: flex; gap: 14px; align-items: flex-start;
  font-size: 15px; line-height: 1.55; color: var(--ink);
}
.engagement-block .bullets li::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: var(--ocher); margin-top: 7px;
}


/* =========================================================
   RÉSEAU — paragraphes éditoriaux sur Esprit de famille
   ========================================================= */
.network .body {
  display: flex; flex-direction: column; gap: 22px;
  max-width: 60ch;
}
.network .body p {
  font-size: clamp(17px, 1.5vw, 19px); line-height: 1.7;
  color: var(--stone-700);
  text-wrap: pretty;
}
.network .body em {
  font-style: italic; color: var(--ocher); font-weight: 500;
}
