/* ==========================================================================
   Page éditoriale (modèle « Accueil éditorial », page-edito.php)
   Mise en page aérée, grands titres serrés, photos larges. Reprend les jetons de
   main.css (rouge Duboux, #2D2D2D, gris, arrondis) : seule la composition change.
   ========================================================================== */

.edito { --ed-wrap: 1440px; --ed-gutter: clamp(20px, 4vw, 64px); --ed-pad: clamp(80px, 9vw, 136px); }
.ed-wrap { max-width: var(--ed-wrap); margin: 0 auto; padding: 0 var(--ed-gutter); }
/* Hero collant : chaque section suivante a un fond opaque et passe par-dessus.
   :where() garde une spécificité faible, les fonds teintés ci-dessous l'emportent. */
.edito > :where(section:not(.ed-hero)) { position: relative; z-index: 1; background: var(--white); }
/* Espacement vertical unique entre les sections : --ed-pad en haut et en bas.
   Deux sections blanches consécutives ne cumulent pas leurs marges. */
.ed-section { padding: var(--ed-pad) 0; }
.ed-section:not(.ed-section--tint):not(.ed-steps) + .ed-section:not(.ed-section--tint):not(.ed-steps) { padding-top: 0; }
.ed-section--tint { background: var(--g50); }

.ed-h2 {
  font-size: clamp(32px, 3.4vw, 52px); font-weight: 500; line-height: 1.08;
  letter-spacing: -0.03em; color: var(--text); max-width: 24ch; text-wrap: balance;
}
.ed-lead { font-size: 15px; line-height: 1.7; color: var(--g600); max-width: 920px; margin-top: 20px; }
.ed-head { margin-bottom: clamp(40px, 5vw, 64px); }

.ed-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 500; padding: 14px 24px; border-radius: var(--radius-btn);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.ed-btn svg { width: 16px; height: 16px; }
.ed-btn--red { background: var(--red); color: var(--white); }
.ed-btn--red:hover { background: var(--red-hover); }
.ed-about__cta { margin-top: 32px; }
.ed-btn--white { background: var(--white); color: var(--red); }
.ed-btn--white:hover { background: var(--text); color: var(--white); }
.ed-btn--line { border: 1px solid var(--g200); color: var(--text); background: var(--white); }
.ed-btn--line:hover { border-color: var(--red); color: var(--red); }
.ed-btn--outline { border: 1px solid rgba(255,255,255,0.5); color: var(--white); }
.ed-btn--outline:hover { background: var(--white); color: var(--red); border-color: var(--white); }

.ed-media { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--g100); }
.ed-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s ease; }
.ed-media--square { aspect-ratio: 1 / 1; }
.ed-media--wide { aspect-ratio: 4 / 3; }

/* ── Bandeau photo et navigation ───────────────────────────────────────── */
.ed-hero {
  position: sticky; top: 0; z-index: 0;
  height: max(620px, 100svh); max-height: 980px; color: var(--white); overflow: hidden; background: var(--dark);
}
/* Diaporama (classes .hero__* de main.css) : contexte d'empilement propre pour que le voile
   et le dégradé restent au-dessus des photos. Photos sans assombrissement. */
.ed-hero .hero__slider { z-index: 0; }
.ed-hero .hero__bg { filter: none; }

/* Assombrit le bandeau à mesure que la section suivante le recouvre (--shade : 0 → 0,5, main.js). */
.ed-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: #000; opacity: var(--shade, 0); pointer-events: none; }
.ed-hero__content { will-change: transform, opacity; }
.ed-about { box-shadow: 0 -20px 50px rgba(0,0,0,0.12); }
.ed-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,0.28), transparent 22%, transparent 55%, rgba(0,0,0,0.45));
}
.ed-nav {
  position: absolute; z-index: 3; top: 0; left: 0; right: 0;
  max-width: var(--ed-wrap); margin: 0 auto; padding: 28px var(--ed-gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
}
.ed-nav__brand img { height: 40px; width: auto; }
.ed-nav__links { display: flex; gap: 28px; }
.ed-nav__links a { font-size: 15px; font-weight: 500; color: var(--white); opacity: 0.9; transition: opacity 0.2s; }
.ed-nav__links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.ed-nav__cta { justify-self: end; }
.ed-nav__toggle { display: none; }
.ed-hero__content {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
  max-width: var(--ed-wrap); margin: 0 auto; padding: 0 var(--ed-gutter) 40px;
}
.ed-hero__title {
  font-size: clamp(42px, 6vw, 88px); font-weight: 500; line-height: 1.02; letter-spacing: -0.035em;
  text-wrap: balance; text-shadow: 0 2px 24px rgba(0,0,0,0.2);
}
.ed-hero__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.ed-hero__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
  margin-top: 36px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.45);
  font-size: 15px;
}

/* ── Votre contact (template-parts/agent-card.php) ─────────────────────── */
.agent__photo { flex-shrink: 0; border-radius: 50%; object-fit: cover; }
.agent__kicker { font-size: 12px; color: var(--g500); }
.agent__name { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; color: var(--text); }
/* Bandeau : vignette claire posée sur la photo. */
.agent--hero {
  flex-shrink: 0; display: flex; align-items: center; gap: 14px;
  padding: 10px 22px 10px 10px; border-radius: 60px;
  background: rgba(255,255,255,0.94); backdrop-filter: blur(8px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.2); transition: transform 0.2s, box-shadow 0.2s;
}
.agent--hero:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0,0,0,0.25); }
.agent--hero .agent__photo { width: 60px; height: 60px; }
.agent--hero .agent__body { display: flex; flex-direction: column; gap: 1px; }
.agent__phone { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--red); }
.agent__phone svg { width: 14px; height: 14px; }
/* Questions : carte complète. */
.agent--card { background: var(--white); border: 1px solid var(--g100); border-radius: var(--radius); padding: 24px; max-width: 460px; margin-bottom: 48px; }
.agent__head { display: flex; align-items: center; gap: 16px; }
.agent--card .agent__photo { width: 72px; height: 72px; }
.agent__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
/* Appel final : photo + phrase. */
.agent--inline { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 28px; font-size: 16px; }
.agent--inline .agent__photo { width: 52px; height: 52px; border: 2px solid var(--white); }
.agent--inline a { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

/* ── Le projet et chiffres ─────────────────────────────────────────────── */
.ed-about__grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.ed-about__label { font-size: 14px; font-weight: 500; color: var(--red); }
.ed-about__title {
  font-size: clamp(26px, 2.8vw, 42px); font-weight: 400; line-height: 1.2; letter-spacing: -0.02em; color: var(--text);
}
/* Remplissage mot à mot au défilement (main.js, [data-fill]). */
.fill-word { color: var(--g200); transition: color 0.3s ease; }
.fill-word.is-on { color: var(--text); }
/* Même largeur que la phrase d'accroche. */
.ed-about__text { font-size: 16px; line-height: 1.75; color: var(--g600); margin-top: 28px; }
.ed-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 0; margin-top: clamp(56px, 7vw, 96px); }
.ed-stat { padding: 0 24px; border-left: 1px solid var(--g200); }
.ed-stat:nth-child(odd) { border-left: 0; padding-left: 0; }
.ed-stat__value {
  font-size: clamp(34px, 4.2vw, 64px); font-weight: 500; line-height: 1; letter-spacing: -0.04em;
  color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ed-stat__label { font-size: 14px; color: var(--g500); margin-top: 12px; }

/* ── Cartes photo ──────────────────────────────────────────────────────── */
.ed-life { display: grid; grid-template-columns: 1fr; gap: 24px; }
.ed-life__card:hover img { transform: scale(1.04); }
.ed-life__card figcaption { display: flex; flex-direction: column; gap: 4px; margin-top: 18px; }
.ed-life__title { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; color: var(--text); }
.ed-life__text { font-size: 14px; color: var(--g500); }

/* ── Prestations ───────────────────────────────────────────────────────── */
.ed-features { display: grid; grid-template-columns: 1fr; gap: 48px 40px; }
.ed-feature__icon {
  display: inline-flex; width: 52px; height: 52px; padding: 13px; margin-bottom: 28px;
  color: var(--white); background: var(--red); border-radius: var(--radius);
}
.ed-feature__icon svg { stroke-width: 1.6; }
.ed-feature__title { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; color: var(--text); margin-bottom: 10px; }
.ed-feature__text { font-size: 15px; line-height: 1.65; color: var(--g600); max-width: 340px; }

/* ── Typologies en grandes cartes ──────────────────────────────────────── */
.ed-typos { display: grid; grid-template-columns: 1fr; gap: 48px 24px; }
.ed-typo { display: block; color: var(--text); }
.ed-typo:hover img { transform: scale(1.04); }
.ed-typo__go {
  position: absolute; right: 16px; bottom: 16px; z-index: 2;
  display: flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  border-radius: 50%; background: var(--white); color: var(--text);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.ed-typo__go svg { width: 20px; height: 20px; }
.ed-typo:hover .ed-typo__go { background: var(--red); color: var(--white); transform: rotate(-45deg); }
.ed-typo__row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 20px; }
.ed-typo__title { font-size: clamp(20px, 1.8vw, 26px); font-weight: 500; letter-spacing: -0.02em; }
.ed-typo__price { font-size: clamp(18px, 1.6vw, 24px); font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; }
.ed-typo__price small { font-size: 0.6em; color: var(--g500); margin-left: 2px; }
.ed-typo__meta { font-size: 14px; color: var(--g500); margin-top: 6px; }

/* ── Lots : onglets + tableau ──────────────────────────────────────────── */
.ed-lots__top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
/* Titre et onglets restent en haut de l'écran pendant le défilement des lots.
   Fond gris pleine largeur (ombre + clip-path) et filet sous le bloc. */
.ed-lots__top {
  position: sticky; top: 0; z-index: 5; padding: 20px 0 16px;
  background: var(--g50); box-shadow: 0 0 0 100vmax var(--g50), 0 1px 0 100vmax var(--g200);
  clip-path: inset(0 -100vmax -1px);
}
.ed-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-tabs .chip {
  font: inherit; font-size: 14px; font-weight: 500; color: var(--title); cursor: pointer;
  background: var(--white); border: 1px solid var(--g200); border-radius: 40px; padding: 9px 16px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.ed-tabs .chip:hover { border-color: var(--g400); }
.ed-tabs .chip.is-active { background: var(--text); border-color: var(--text); color: var(--white); }

/* ── Étapes sur fond sombre ────────────────────────────────────────────── */
.ed-steps { background: var(--dark); color: var(--white); }
.ed-steps .ed-h2 { color: var(--white); }
.ed-steps .ed-lead { color: var(--g400); }
.ed-steps__grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.ed-steps__list { list-style: none; padding: 0; display: grid; gap: 24px; }
/* Cartes qui s'empilent : chacune se colle un peu plus bas que la précédente
   et recouvre la suivante au défilement. */
.ed-step {
  position: sticky; top: calc(96px + var(--i, 0) * 28px);
  background: var(--white); color: var(--text); border-radius: var(--radius);
  padding: clamp(28px, 3vw, 44px); min-height: 280px;
  display: grid; grid-template-rows: auto auto 1fr auto; gap: 12px;
  box-shadow: 0 -12px 40px rgba(0,0,0,0.25);
}
.ed-step__num { font-size: 14px; font-weight: 600; color: var(--red); }
.ed-step__title { font-size: clamp(22px, 2vw, 28px); font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; }
.ed-step__text { align-self: end; font-size: 15px; line-height: 1.65; color: var(--g600); max-width: 440px; }
.ed-step__link {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px; margin-top: 8px;
  font-size: 14px; font-weight: 500; color: var(--red);
}
.ed-step__link svg { width: 15px; height: 15px; transition: transform 0.2s; }
.ed-step__link:hover svg { transform: translateX(3px); }

/* ── Galerie (template-parts/section-galerie.php) adaptée à la page ──────── */
.edito .photos__inner { max-width: var(--ed-wrap); padding: var(--ed-pad) var(--ed-gutter); }
.edito .photos .section-title {
  font-size: clamp(32px, 3.4vw, 52px); font-weight: 500; line-height: 1.08; letter-spacing: -0.03em;
  color: var(--text); margin-bottom: clamp(40px, 5vw, 64px);
}
.edito .photos__grid { gap: 12px; }
.edito .photos__actions { margin-top: 40px; }

/* ── Localisation (template-parts/section-carte.php) adaptée à la page ──── */
.edito .map { background: var(--g50); }
.edito .map__inner { max-width: var(--ed-wrap); padding: var(--ed-pad) var(--ed-gutter); }
.edito .map .section-title {
  font-size: clamp(32px, 3.4vw, 52px); font-weight: 500; line-height: 1.08; letter-spacing: -0.03em;
  color: var(--text); margin-bottom: 20px;
}
.edito .map__text { font-size: 16px; max-width: 520px; margin-bottom: 32px; }
.edito .map__route { font-size: 14px; font-weight: 500; text-transform: none; letter-spacing: 0; padding: 14px 24px; }
@media (min-width: 1024px) {
  .edito .map__inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 80px; }
  .edito .map__visual { min-height: 600px; }
}

/* ── Questions fréquentes ──────────────────────────────────────────────── */
.ed-faq { display: grid; grid-template-columns: 1fr; gap: 0 64px; }
.ed-faq__intro .ed-head { margin-bottom: 32px; }
.ed-faq__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 48px; }
.ed-faq__list { border-top: 1px solid var(--g200); }
.ed-faq__item { border-bottom: 1px solid var(--g200); }
.ed-faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; cursor: pointer; list-style: none;
  padding: 24px 0; font-size: clamp(17px, 1.4vw, 20px); font-weight: 500; letter-spacing: -0.01em; color: var(--text);
}
.ed-faq__item summary::-webkit-details-marker { display: none; }
.ed-faq__item summary:hover { color: var(--red); }
.ed-faq__plus { position: relative; flex-shrink: 0; width: 28px; height: 28px; border: 1px solid var(--g200); border-radius: 50%; }
.ed-faq__plus::before, .ed-faq__plus::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; background: currentColor;
  transform: translate(-50%, -50%); transition: transform 0.2s;
}
.ed-faq__plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.ed-faq__item[open] .ed-faq__plus::after { transform: translate(-50%, -50%) rotate(0deg); }
.ed-faq__item p { font-size: 15px; line-height: 1.7; color: var(--g600); padding: 0 48px 24px 0; max-width: 680px; }

/* ── Appel final ───────────────────────────────────────────────────────── */
.ed-final { background: var(--red); color: var(--white); }
.ed-final__inner { padding-top: var(--ed-pad); padding-bottom: var(--ed-pad); text-align: center; }
.ed-final__title {
  font-size: clamp(32px, 3.6vw, 56px); font-weight: 500; line-height: 1.08; letter-spacing: -0.03em;
  max-width: 820px; margin: 0 auto; text-wrap: balance;
}
.ed-final__text { font-size: 16px; line-height: 1.7; opacity: 0.9; max-width: 560px; margin: 20px auto 0; }
.ed-final__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 40px; }

/* ── Grands écrans ─────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .ed-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ed-stat, .ed-stat:nth-child(odd) { border-left: 1px solid var(--g200); padding: 0 24px; }
  .ed-stat:first-child { border-left: 0; padding-left: 0; }
  .ed-life { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ed-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-typos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .ed-about__grid { grid-template-columns: 3fr 9fr; gap: 48px; }
  .ed-features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ed-steps__grid { grid-template-columns: 1fr 1fr; gap: 64px; }
  /* Titre des étapes fixe pendant que les cartes défilent. */
  .ed-steps__intro { position: sticky; top: 96px; align-self: start; }
  .ed-faq { grid-template-columns: 5fr 7fr; }
  .ed-faq__intro { position: sticky; top: 96px; align-self: start; }
  .ed-faq__actions, .agent--card { margin-bottom: 0; }
}

/* ── Petits écrans ─────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .ed-hero .agent--hero { display: none; }
}
@media (max-width: 1023px) {
  .ed-nav { grid-template-columns: 1fr auto auto; gap: 10px; padding-top: 20px; padding-bottom: 20px; }
  .ed-nav__brand img { height: 34px; }
  .ed-nav__toggle {
    display: flex; align-items: center; justify-content: center; order: 3;
    width: 46px; height: 46px; padding: 12px; border: 0; border-radius: var(--radius-btn);
    background: rgba(255,255,255,0.92); color: var(--text);
  }
  .ed-nav__toggle svg:last-child, .ed-nav__toggle[aria-expanded="true"] svg:first-child { display: none; }
  .ed-nav__toggle[aria-expanded="true"] svg:last-child { display: block; }
  /* Panneau des liens, sous la barre. */
  .ed-nav__links {
    display: none; position: absolute; top: calc(100% - 8px); left: var(--ed-gutter); right: var(--ed-gutter);
    flex-direction: column; gap: 0; padding: 8px; border-radius: var(--radius);
    background: var(--white); box-shadow: 0 16px 40px rgba(0,0,0,0.2);
  }
  .ed-nav__links.is-open { display: flex; }
  .ed-nav__links a { color: var(--text); opacity: 1; font-size: 16px; padding: 14px 12px; border-radius: var(--radius-btn); }
  .ed-nav__links a:hover { background: var(--g50); text-decoration: none; color: var(--red); }
  .ed-nav__links a + a { border-top: 1px solid var(--g100); }
  .ed-media--wide { aspect-ratio: 16 / 11; }
}
@media (max-width: 767px) {
  /* Prestations : lignes compactes, icône à gauche. */
  .ed-features { gap: 28px; }
  .ed-feature { display: grid; grid-template-columns: 44px 1fr; column-gap: 16px; }
  .ed-feature__icon { grid-row: span 2; width: 44px; height: 44px; padding: 11px; margin-bottom: 0; }
  .ed-feature__title { font-size: 18px; margin-bottom: 6px; }
  /* Cartes photo : carrousel à faire glisser, la carte suivante dépasse. */
  .ed-life {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 calc(-1 * var(--ed-gutter)); padding: 0 var(--ed-gutter); scroll-padding: 0 var(--ed-gutter);
  }
  .ed-life::-webkit-scrollbar { display: none; }
  .ed-life__card { flex: 0 0 82%; scroll-snap-align: start; }
  /* Onglets des lots : une ligne qui défile. */
  .ed-lots__top { gap: 14px; padding: 14px 0 12px; }
  .ed-lots__top .ed-h2 { font-size: 26px; }
  .ed-tabs {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: calc(100% + 2 * var(--ed-gutter));
    margin: 0 calc(-1 * var(--ed-gutter)); padding: 0 var(--ed-gutter);
  }
  .ed-tabs::-webkit-scrollbar { display: none; }
  .ed-tabs .chip { flex-shrink: 0; white-space: nowrap; }
  .ed-typos { gap: 36px; }
  .agent__actions .ed-btn { flex: 1 1 100%; justify-content: center; }
  .ed-step { min-height: 0; }
}
@media (max-width: 599px) {
  .ed-nav__cta { padding: 11px 16px; font-size: 13px; }
  .ed-hero__foot { font-size: 13px; flex-direction: column; align-items: flex-start; }
  .ed-faq__item p { padding-right: 0; }
  .ed-final__actions .ed-btn { width: 100%; justify-content: center; }
  .ed-stat__value { font-size: clamp(26px, 8.5vw, 34px); }
}
