/* ==========================================================================
   E-NETT — version moderne : page Prestations (hub) et pages des six secteurs
   (src-moderne/pages/prestations/*.html, front-matter « css: pages/prestations.css »).

   Gabarit commun des secteurs :
     entrée de page ({{@ pageHero }}, photo découverte par la raclette, titre révélé)
     01 tâches du secteur : la liste se coche au défilement, le trait vert avance (.sx-check)
     02 formule conseillée + exemple chiffré, prix en grand qui roule (odomètre, [data-odo])
     03 spécificités : photo + points numérotés (.sx-spec, .sx-specs)
     04 questions fréquentes · voir aussi (trois secteurs voisins, cartes .sector) · bandeau d’appel
   Script : js/pages/prestations.js (secteurs seulement). Sans animations (mouvement réduit, script
   absent) : les tâches incluses sont cochées (pas les options ni « Sur demande »), le trait est plein,
   le prix est affiché tel quel. Sous la formule : les quatre engagements ({{> assure }}).
   ========================================================================== */

/* ---------- 01 Tâches : colonne fixe + liste qui se coche ---------- */
.sx-tasks__aside .h2 { max-width: 11em; }
.sx-tasks__intro { margin-top: clamp(16px, 2vw, 24px); max-width: 44ch; color: var(--muted); }
.sx-facts { margin-top: clamp(28px, 3.4vw, 44px); }
.sx-facts dd { font-weight: 500; }

.sx-check { position: relative; padding-left: clamp(26px, 3.2vw, 48px); }
/* Le trait : filet gris sur toute la hauteur, rempli de vert au rythme du défilement (js : scaleY) */
.sx-check__rail { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line); }
.sx-check__fill { position: absolute; inset: 0; background: var(--vert); transform-origin: 50% 0; }
html.motion .sx-check__fill { transform: scaleY(0); }

.sx-group + .sx-group { margin-top: clamp(36px, 4.4vw, 60px); }
.sx-group__title {
  padding-bottom: 14px; border-bottom: 1px solid var(--fg);
  font-size: var(--t-h3); line-height: 1.15; font-weight: 700; font-stretch: 108%; letter-spacing: -.015em;
}
.sx-task {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: start; gap: 4px clamp(14px, 1.6vw, 22px);
  padding: 15px 0 16px; border-bottom: 1px solid var(--line); font-size: 17px; line-height: 1.45;
}
.sx-task .tag { align-self: center; }
/* Case à cocher : carré au trait fin, coche verte qui déborde (cochée d’office sans animations) */
.sx-task__box { width: 26px; height: 26px; margin-top: -2px; overflow: visible; }
.sx-task__box rect { fill: none; stroke: var(--fg); stroke-opacity: .4; stroke-width: 1.5; }
.sx-task__box path { fill: none; stroke: var(--vert); stroke-width: 3.2; stroke-linecap: square; stroke-linejoin: miter; stroke-dasharray: 1; stroke-dashoffset: 0; }
html.motion .sx-task__box path { stroke-dashoffset: 1; transition: stroke-dashoffset .55s var(--ease-out); }
html.motion .sx-task.is-done .sx-task__box path { stroke-dashoffset: 0; }
html.motion .sx-task__txt { color: var(--muted); transition: color .45s; }
html.motion .sx-task.is-done .sx-task__txt { color: var(--fg); }
.sx-note { margin-top: clamp(24px, 3vw, 36px); font-size: 15.5px; }
/* Tâches en option (.sx-task--opt, étiquette « Option ») et groupe « Sur demande » ([data-optional]) : jamais cochées
   (ni au défilement, ni sans animations) ; case en pointillé, texte lisible : ce ne sont pas des tâches incluses d’office. */
.sx-task--opt .sx-task__box path, [data-optional] .sx-task__box path { display: none; }
.sx-task--opt .sx-task__box rect, [data-optional] .sx-task__box rect { stroke-dasharray: 3 2.5; stroke-opacity: .55; }
html.motion .sx-task--opt .sx-task__txt, html.motion [data-optional] .sx-task__txt { color: var(--fg); }

/* ---------- 02 Formule conseillée : exemple chiffré (prix qui roule) + formules ---------- */
.sx-offer { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 4.4vw, 80px); align-items: start; }
.sx-case { margin-top: 12px; max-width: 44ch; font-size: 16px; line-height: 1.5; color: var(--muted); }
.sx-price { margin-top: clamp(18px, 2.4vw, 30px); align-items: flex-end; }
.sx-price small { padding-bottom: .16em; }
.sx-price .odo { line-height: 1.1; }
.sx-alt { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.5; color: var(--muted); }
.sx-alt strong { color: var(--fg); font-weight: 600; white-space: nowrap; }
.sx-formulas .formula-list { border-top-color: var(--fg); }

/* Réassurance sous l’exemple chiffré ({{> assure }}) */
.sx-assure { margin-top: clamp(40px, 5vw, 64px); }

/* ---------- 03 Spécificités : photo + points numérotés ---------- */
.sx-spec { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 96px); align-items: start; }
/* Photo en portrait (4/5) tirée d’un original 3/2 : « sizes » demande ~1,9 fois la largeur du cadre (netteté) */
.sx-spec figcaption b { flex: none; white-space: nowrap; }
.sx-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 3vw, 52px); border-top: 1px solid var(--fg); }
.sx-specs > li { padding: 22px 0 26px; border-bottom: 1px solid var(--line); }
.sx-specs__n { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.sx-specs__n::after { content: ""; width: 18px; height: 3px; background: var(--vert); }
.sx-specs__title { margin-top: 14px; font-size: var(--t-h3); line-height: 1.15; font-weight: 700; font-stretch: 108%; letter-spacing: -.015em; text-wrap: balance; }
.sx-specs__text { margin-top: 10px; max-width: 42ch; font-size: 16px; line-height: 1.55; color: var(--muted); }
.sx-sub { margin-top: clamp(40px, 5vw, 64px); font-size: var(--t-h3); line-height: 1.15; font-weight: 700; font-stretch: 108%; letter-spacing: -.015em; text-wrap: balance; }
.sx-text { margin-top: 14px; max-width: 64ch; color: var(--muted); }
.sx-text + .table-wrap { margin-top: 24px; }
.table-wrap + .sx-text { margin-top: 20px; }
.sx-tva td:not(:last-child) { color: var(--muted); }
.sx-tva td:last-child { font-weight: 600; }

/* ---------- 04 Questions fréquentes ---------- */
.sx-faq__more { margin-top: 18px; max-width: 34ch; font-size: 16px; color: var(--muted); }
.sx-faq__more a { color: var(--fg); }

/* ---------- Voir aussi : trois secteurs voisins ({{@ sectorCards seulement=…, classe=sx-next }}) ---------- */
.sx-next-all { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 32px; }

/* ---------- Page Prestations : tableau « par besoin », conditions ---------- */
.hub-needs tbody th { font-size: 17.5px; line-height: 1.35; }
.hub-needs td { white-space: nowrap; }
.hub-needs td a:not(.link-arrow) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.hub-needs td a:not(.link-arrow):hover { text-decoration-color: var(--vert); text-decoration-thickness: 2px; }
.hub-needs__go { text-align: right; }
.hub-more { margin-top: 22px; max-width: 70ch; color: var(--muted); }
.hub-more a { color: var(--fg); }
.hub-terms { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 24px clamp(32px, 5vw, 96px); align-items: end; }
.hub-terms .link-arrow { justify-self: start; }

@media (max-width: 1099px) {
  .sx-specs { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  .sx-offer, .sx-spec, .hub-terms { grid-template-columns: 1fr; }
  .sx-spec .figure--portrait .figure__media { aspect-ratio: 3 / 2; }
  .sx-check { padding-left: 22px; }
}
@media (max-width: 640px) {
  .hub-needs td { white-space: normal; }
  .hub-needs__go { text-align: left; }
}
@media (max-width: 599px) {
  .sx-task { grid-template-columns: 24px minmax(0, 1fr); font-size: 16.5px; }
  .sx-task .tag { grid-column: 2; justify-self: start; margin-top: 4px; }
  .sx-task__box { width: 24px; height: 24px; }
  .sx-next .sector__text { display: none; }
}
