/* ============================================================
   SARGAWATT – Page /sargasses
   Extends styles.css (Direction A : light, premium B2B)
   ============================================================ */

/* ---------- Active nav state ---------- */
.nav a.active {
  color: var(--teal-700);
  background: var(--teal-tint-2);
}
.nav a.active::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
  margin: 5px 4px 0;
}

/* ============================================================
   STICKY TUNNEL SUB-NAV
   ============================================================ */
.subnav {
  position: sticky;
  top: 76px;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.subnav-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 52px;
}
.subnav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
  margin-right: 14px;
  white-space: nowrap;
}
.subnav a {
  position: relative;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.subnav a:hover { color: var(--teal-700); background: var(--teal-tint-2); }
.subnav a.current { color: var(--teal-700); }
.subnav a.current::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: -1px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
}
.subnav .subnav-cta {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 700; font-size: 13.5px; color: var(--teal-700);
}
.subnav .subnav-cta svg { width: 15px; height: 15px; transition: transform 0.3s var(--ease); }
.subnav .subnav-cta:hover svg { transform: translateX(4px); }

/* ============================================================
   COMPACT PAGE HERO
   ============================================================ */
.page-hero { background: var(--bg); }
.page-hero .wrap { padding-block: clamp(34px, 4.5vw, 56px) clamp(36px, 4.5vw, 60px); }
.page-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(32px, 4.5vw, 64px);
  align-items: center;
}
.page-hero h1 {
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.03;
}
.page-hero .sub {
  margin-top: 20px;
  font-size: clamp(16.5px, 1.5vw, 19px);
  color: var(--ink-soft);
  max-width: 540px;
}
.hero-ctas {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 30px;
}

/* Proof badges */
.proof-badges {
  display: flex; flex-wrap: wrap; gap: 9px;
  margin-top: 26px;
}
.proof-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px 8px 11px;
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.proof-badge:hover { border-color: var(--teal); transform: translateY(-2px); }
.proof-badge svg { width: 15px; height: 15px; color: var(--teal); flex: none; }
.proof-badge b { color: var(--ink); font-weight: 700; }

.page-hero-visual { position: relative; }
.page-hero-visual .ph { min-height: 480px; }

/* ============================================================
   SECTION RHYTHM
   ============================================================ */
.section.tight { padding-block: clamp(56px, 7vw, 92px); }

/* ---------- Generic icon-card grid (4 up) ---------- */
.card-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.icard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.icard:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: transparent; }
.icard .icard-ico {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--teal-tint); color: var(--teal-700);
  display: grid; place-items: center; margin-bottom: 18px;
}
.icard .icard-ico svg { width: 24px; height: 24px; }
.icard h3 {
  font-size: 18px; line-height: 1.15;
  font-family: var(--font-display); font-weight: 600;
}
.icard p { margin-top: 10px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.5; }

/* ============================================================
   NEEDS SECTION ("ce que vous devez sécuriser")
   ============================================================ */
.needs { background: var(--surface); border-block: 1px solid var(--line); }
.needs-head { max-width: 720px; margin-bottom: clamp(34px, 4vw, 50px); }
.needs-head h2 { font-size: clamp(28px, 3.6vw, 44px); margin-top: 18px; }
.needs-head p { margin-top: 18px; font-size: clamp(16.5px, 1.4vw, 19px); color: var(--ink-soft); }

/* ============================================================
   FORMES SECTION ("sous quelle forme")
   ============================================================ */
.formes { background: var(--bg); }

.forme-transition {
  margin-top: clamp(32px, 4vw, 48px);
  padding: clamp(28px, 3.5vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.forme-transition p {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(19px, 2vw, 26px); line-height: 1.25;
  color: var(--ink); letter-spacing: -0.01em;
}

/* ============================================================
   WHY SARGAWATT
   ============================================================ */
.why { background: var(--surface); border-block: 1px solid var(--line); }
.why-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
.why-text .lead {
  font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-soft); line-height: 1.6;
  margin-top: 20px;
}
.why-text .lead strong { color: var(--ink); font-weight: 700; }
.why-note {
  margin-top: 24px;
  font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--teal-800);
}
.why-proofs { display: flex; flex-direction: column; gap: 14px; }
.why-proof {
  display: flex; align-items: center; gap: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.why-proof:hover { transform: translateX(4px); box-shadow: var(--shadow-sm); border-color: var(--teal); }
.why-proof .wp-ico {
  flex: none; width: 54px; height: 54px; border-radius: 14px;
  background: var(--teal-tint); color: var(--teal-700);
  display: grid; place-items: center;
}
.why-proof .wp-ico svg { width: 27px; height: 27px; }
.why-proof .wp-big {
  font-family: var(--font-display); font-weight: 500; letter-spacing: -0.02em;
  font-size: 34px; line-height: 1; color: var(--teal-700);
}
.why-proof .wp-t { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--ink); }
.why-proof .wp-s { font-size: 13.5px; color: var(--ink-soft); margin-top: 3px; }

/* ============================================================
   PROCESS TIMELINE (frise 4 étapes)
   ============================================================ */
.process { background: var(--bg); }
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute; top: 27px; left: 8%; right: 8%;
  height: 2px;
  background: linear-gradient(90deg, var(--teal-tint), var(--gray-300), var(--teal-tint));
  z-index: 0;
}
.step { position: relative; z-index: 1; }
.step .step-num {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--teal);
  color: var(--teal-700);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 22px;
  margin-bottom: 20px;
  box-shadow: 0 0 0 6px var(--bg);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.step:hover .step-num { background: var(--teal); color: #fff; transform: scale(1.06); }
.step h3 { font-size: 17.5px; font-family: var(--font-display); font-weight: 600; line-height: 1.2; }
.step p { margin-top: 9px; font-size: 14px; color: var(--ink-soft); line-height: 1.5; }

/* ============================================================
   FAQ
   ============================================================ */
.faq { background: var(--surface); border-block: 1px solid var(--line); }
.faq-list { max-width: 860px; margin-inline: auto; }
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left;
  display: flex; align-items: center; gap: 18px;
  background: none; border: 0;
  padding: 24px 4px;
  font-family: var(--font-display); font-weight: 500; font-size: clamp(17px, 1.7vw, 21px);
  color: var(--ink); line-height: 1.3;
  transition: color 0.2s;
}
.faq-q:hover { color: var(--teal-700); }
.faq-q .faq-ico {
  flex: none; margin-left: auto;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--teal-tint); color: var(--teal-700);
  display: grid; place-items: center;
  transition: background 0.3s var(--ease), transform 0.35s var(--ease);
}
.faq-q .faq-ico svg { width: 16px; height: 16px; transition: transform 0.35s var(--ease); }
.faq-item.open .faq-q .faq-ico { background: var(--teal); color: #fff; }
.faq-item.open .faq-q .faq-ico svg { transform: rotate(180deg); }
.faq-a {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s var(--ease);
}
.faq-a-inner {
  padding: 0 56px 26px 4px;
  font-size: 16px; color: var(--ink-soft); line-height: 1.6;
}
@media (prefers-reduced-motion: reduce) {
  .faq-a { transition: none; }
}

/* ============================================================
   FINAL CTA (light premium, framed)
   ============================================================ */
.page-final { background: var(--teal-900); position: relative; overflow: hidden; }
.page-final svg.contours { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.32; }
.page-final .wrap { position: relative; z-index: 2; text-align: center; max-width: 720px; }
.page-final .eyebrow { color: #7fd6da; justify-content: center; }
.page-final .eyebrow::before { background: #7fd6da; }
.page-final h2 { color: var(--white); font-size: clamp(30px, 4vw, 48px); margin-top: 18px; }
.page-final p { margin: 22px auto 0; color: rgba(255,255,255,0.82); font-size: clamp(16.5px, 1.5vw, 19px); max-width: 560px; }
.page-final .hero-ctas { justify-content: center; margin-top: 34px; }
.page-final .btn-ghost { background: transparent; color: #eafafa; border-color: rgba(255,255,255,0.3); }
.page-final .btn-ghost:hover { border-color: #7fd6da; color: #fff; background: rgba(255,255,255,0.06); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .steps::before { display: none; }
}

@media (max-width: 920px) {
  .subnav-label { display: none; }
  .page-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .page-hero-visual { order: -1; }
  .why-grid { grid-template-columns: 1fr; gap: 32px; }
  .forme-transition { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .subnav .subnav-cta { display: none; }
  .subnav-inner { justify-content: space-between; }
  .page-hero .wrap {
    /* Le titre repasse avant le visuel sur mobile pour donner le contexte immediatement. */
    padding-block: 28px 38px;
  }
  .page-hero-grid {
    gap: 24px;
  }
  .page-hero-visual {
    order: 0;
  }
  .page-hero h1 {
    font-size: clamp(30px, 8.4vw, 38px);
    line-height: 1.04;
  }
  .page-hero .sub {
    margin-top: 16px;
    font-size: 16px;
    line-height: 1.55;
  }
  .page-hero-visual .ph {
    min-height: clamp(220px, 62vw, 300px);
    aspect-ratio: 4 / 3;
  }
  .hero-ctas {
    flex-direction: column;
    margin-top: 22px;
  }
  .card-grid-4, .steps { grid-template-columns: 1fr; }
  .hero-ctas .btn {
    flex: 1;
    width: 100%;
    justify-content: center;
    min-height: 48px;
    white-space: normal;
    text-align: center;
  }
  .faq-a-inner { padding-right: 4px; }
}

/* ============================================================
   EDITORIAL OVERRIDES (v2) – de-carded sections
   ============================================================ */

/* Editorial list (projects / needs) */
.ed-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.ed-list.two { grid-template-columns: 1fr 1fr; column-gap: clamp(28px, 4vw, 60px); }
.ed-row {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start;
  padding: 22px 0; border-top: 1px solid var(--line-2);
}
.ed-idx {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  color: var(--teal-700); letter-spacing: 0.05em; padding-top: 4px;
}
.ed-body h3 { font-family: var(--font-display); font-weight: 600; font-size: 19px; line-height: 1.2; }
.ed-body p { margin-top: 8px; font-size: 15px; color: var(--ink-soft); line-height: 1.5; }

/* Needs band: image + lined list */
.needs-band {
  display: grid; grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(28px, 4vw, 60px); align-items: center;
}
.needs-figure .ph { min-height: 420px; }
.needs .ed-list.lined .ed-row:first-child { border-top: 0; }

/* Formes: les gouttieres gardent les trois miniatures a la taille de la forme 01. */
.formes-row {
  --forme-gutter: clamp(22px, 2.6vw, 36px);
  --forme-divider: 1px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.forme-col {
  padding: 4px 0;
  border-left: var(--forme-divider) solid var(--line-2);
}
.forme-col:first-child {
  padding-right: var(--forme-gutter);
  border-left: 0;
}
.forme-col:nth-child(2) {
  padding-left: calc((var(--forme-gutter) - var(--forme-divider)) / 2);
  padding-right: calc((var(--forme-gutter) - var(--forme-divider)) / 2);
}
.forme-col:nth-child(3) {
  padding-left: calc(var(--forme-gutter) - var(--forme-divider));
}
.forme-col .forme-tag {
  font-family: var(--font-mono); font-weight: 500; font-size: 11px;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--teal-700);
  margin-bottom: 14px;
}
.forme-col h3 { font-size: 22px; }
.forme-col p { margin-top: 12px; font-size: 15px; color: var(--ink-soft); line-height: 1.55; }
/* Miniatures des formes : ratios fixes pour garder les colonnes stables au chargement. */
.forme-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin: 0 0 18px;
  border-radius: var(--radius-sm);
  background: var(--teal-tint-2);
}
.forme-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.forme-media-dry img { object-position: 47% 44%; }
.forme-media-fresh img { object-position: 50% 50%; }
.forme-media-ground img { object-position: 78% 48%; }

/* Forme transition: editorial statement without the former supporting image. */
.forme-transition {
  background: transparent; border: 0; border-top: 1px solid var(--line-2);
  display: block;
  border-radius: 0; padding: clamp(34px, 4vw, 52px) 0 0;
  margin: clamp(38px, 4.5vw, 60px) auto 0;
  max-width: 880px;
}
.forme-transition p {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: clamp(22px, 2.4vw, 32px); line-height: 1.3; color: var(--ink); letter-spacing: -0.01em;
  text-align: center;
}
.forme-transition p strong { font-style: normal; font-weight: 500; color: var(--teal-800); }

/* Why: de-chrome proof rows */
.why-proofs { gap: 0; }
.why-proof {
  background: transparent; border: 0; border-top: 1px solid var(--line-2);
  border-radius: 0; padding: 22px 0; gap: 18px;
}
.why-proof:hover { transform: none; box-shadow: none; }
.why-proof .wp-ico { display: none; }
.why-note {
  background: transparent; border-left: 0; border-top: 2px solid var(--teal);
  border-radius: 0; padding: 18px 0 0; color: var(--ink);
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: clamp(18px, 1.8vw, 22px);
}

/* Process: sober numbered frieze */
.frieze {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 2.6vw, 38px); list-style: none; margin: 0; padding: 0;
}
.frieze-step { border-top: 2px solid var(--teal); padding-top: 18px; }
.frieze-num {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  color: var(--teal-700); letter-spacing: 0.08em;
}
.frieze-step h3 { margin-top: 12px; font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1.2; }
.frieze-step p { margin-top: 10px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.5; }

/* FAQ: simplify icon chip */
.faq-q .faq-ico { background: transparent; width: 24px; height: 24px; color: var(--teal-700); }
.faq-item.open .faq-q .faq-ico { background: transparent; color: var(--teal); }

/* Final CTA: marine, no decorative waves */
.page-final { background: var(--marine); }
.page-final svg.contours { display: none; }
.page-final h2,
.page-final .section-head h2 {
  /* Renforce les titres des appels a l'action finaux sur fond sombre. */
  color: #ffffff;
  font-weight: 750;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.34);
}
.page-final p {
  color: rgba(255, 255, 255, 0.9);
}
.page-final .eyebrow {
  color: #9fe7ea;
}
.page-final .eyebrow::before {
  background: #9fe7ea;
}
.page-final .btn-light { background: #fff; color: var(--teal-800); }
.page-final .btn-light:hover { background: #f0ede5; }
.footer-merged > .page-final {
  /* Les CTA finaux accoles au footer deviennent le premier niveau du meme bloc sombre. */
  background: var(--marine);
  padding-block: clamp(58px, 7vw, 94px) clamp(34px, 4vw, 58px);
}
.footer-merged > .page-final svg.contours {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.16;
}
.footer-merged > .page-final .wrap {
  position: relative;
  z-index: 2;
}
.footer-merged > .wrap {
  padding-top: clamp(36px, 5vw, 62px);
  border-top: 1px solid rgba(255,255,255,0.13);
}

/* Responsive – editorial */
@media (max-width: 920px) {
  .needs-band { grid-template-columns: 1fr; gap: 28px; }
  .needs-figure { order: -1; }
  .needs-figure .ph { min-height: 300px; }
}
@media (max-width: 760px) {
  .subnav { top: 66px; }
  .ed-list.two { grid-template-columns: 1fr; }
  .formes-row { grid-template-columns: 1fr; }
  .forme-col,
  .forme-col:first-child,
  .forme-col:nth-child(2),
  .forme-col:nth-child(3) {
    padding-left: 0;
    padding-right: 0;
  }
  .forme-col { border-left: 0; border-top: 1px solid var(--line-2); padding-top: 22px; }
  .forme-col:first-child { border-top: 0; padding-top: 4px; }
  .frieze { grid-template-columns: 1fr 1fr; row-gap: 30px; }
}
