/* ============================================================
   MY RENOV — Service Page V2 (prototype renovation-complete)
   Override SCOPÉ aux pages services via .service-detail
   Crée le 13 mai 2026
   ------------------------------------------------------------
   Objectifs :
   - Respiration : H2 généreux, line-height confortable
   - Modernité : Manrope partout, micro-animations subtiles
   - Visuels distribués : callouts, blockquote, schéma SVG
   - Fix bouton .related-services (lisible sur fond blanc)
   - Fix FAQ icône (alignement flex strict)
   - Responsive impeccable (375px et +)
   ============================================================ */

/* === 1. TYPOGRAPHIE & RESPIRATION (scope strict) === */

.service-detail,
.service-detail p,
.service-detail li,
.service-detail h2,
.service-detail h3,
.service-detail h4,
.service-detail th,
.service-detail td,
.service-detail .faq-question,
.service-detail .faq-answer p {
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.service-detail {
  font-size: 1.02rem;
}

.service-detail .container > h2 {
  margin-top: 3.75rem;
  margin-bottom: 1.25rem;
  font-size: clamp(1.65rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.2;
  position: relative;
  padding-top: 0.5rem;
}

/* Filet décoratif au-dessus du H2 — accent vert MY RENOV */
.service-detail .container > h2::before {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--primary);
  margin-bottom: 1.1rem;
  border-radius: 2px;
}

/* Premier H2 plus serré (juste après l'image hero) */
.service-detail .container > figure + h2 {
  margin-top: 1.5rem;
}

.service-detail h3 {
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--on-surface);
}

.service-detail p {
  margin-bottom: 1.25rem;
  line-height: 1.72;
  color: #2a2c2c;
}

.service-detail p:last-child {
  margin-bottom: 0;
}

.service-detail strong {
  font-weight: 700;
  color: var(--on-surface);
}

/* Liens internes du corps — soulignement progressif */
.service-detail .container p a:not(.btn) {
  color: var(--primary-dark);
  background-image: linear-gradient(var(--primary), var(--primary));
  background-size: 0% 1.5px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.3s ease, color 0.2s ease;
  padding-bottom: 1px;
  font-weight: 600;
}
.service-detail .container p a:not(.btn):hover {
  background-size: 100% 1.5px;
  color: var(--primary);
}

/* Listes corps — puces vertes carrées modernes */
.service-detail .container > ul {
  margin: 1rem 0 1.75rem;
  padding-left: 0;
}
.service-detail .container > ul > li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.75rem;
  line-height: 1.65;
  color: #2a2c2c;
}
.service-detail .container > ul > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 1px;
  transform: rotate(45deg);
}

/* === 2. IMAGE HERO & FIGURES === */

.service-detail figure {
  position: relative;
  margin: 0 0 2.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(27, 28, 28, 0.10);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.4s ease;
}
.service-detail figure:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(27, 28, 28, 0.14);
}
.service-detail figure img {
  display: block;
  width: 100%;
  height: auto;
}

/* === 3. ENCART "À RETENIR" (callout-retenir) === */

.callout-retenir {
  position: relative;
  margin: 2.5rem 0;
  padding: 1.6rem 1.75rem 1.6rem 2.1rem;
  background: linear-gradient(180deg, #f0f6f4 0%, #e7f1ee 100%);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  box-shadow: 0 4px 18px rgba(0, 104, 91, 0.06);
}
.callout-retenir .callout-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.85rem;
}
.callout-retenir .callout-label::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 2px;
  background: var(--primary);
}
.callout-retenir h3 {
  margin: 0 0 0.85rem !important;
  font-size: 1.15rem;
  color: var(--primary-dark);
  font-weight: 700;
  letter-spacing: -0.012em;
}
.callout-retenir ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.callout-retenir ul li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.6rem;
  font-size: 0.96rem;
  line-height: 1.6;
  color: #2a2c2c;
}
.callout-retenir ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0.35rem;
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
}

/* === 4. ENCART "CHIFFRES CLÉS" (callout-chiffres) === */

.callout-chiffres {
  margin: 2.5rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0;
  background: var(--on-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(27, 28, 28, 0.18);
}
.callout-chiffres .chiffre-item {
  padding: 2rem 1.5rem;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  transition: background 0.3s ease;
}
.callout-chiffres .chiffre-item:last-child {
  border-right: none;
}
.callout-chiffres .chiffre-item:hover {
  background: rgba(255, 255, 255, 0.04);
}
.callout-chiffres .chiffre-value {
  display: block;
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.callout-chiffres .chiffre-value .unit {
  font-size: 0.55em;
  font-weight: 600;
  color: var(--primary-light);
  margin-left: 2px;
}
.callout-chiffres .chiffre-label {
  display: block;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* === 5. BLOCKQUOTE CITATION === */

.blockquote-citation {
  position: relative;
  margin: 3rem auto;
  padding: 2rem 2rem 2rem 4.5rem;
  max-width: 720px;
  background: #fafaf7;
  border-radius: var(--radius-lg);
  font-size: 1.15rem;
  line-height: 1.55;
  color: #1b1c1c;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.blockquote-citation::before {
  content: '\201C';
  position: absolute;
  top: 0.5rem;
  left: 1.25rem;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 5rem;
  line-height: 1;
  color: var(--primary);
  font-style: normal;
  opacity: 0.85;
}
.blockquote-citation cite {
  display: block;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-style: normal;
  font-weight: 600;
  color: var(--gray);
  letter-spacing: 0.02em;
}
.blockquote-citation cite::before {
  content: '— ';
  color: var(--primary);
}

/* === 6. SCHÉMA SVG PROCESS (timeline 5 étapes) === */

.process-svg-wrap {
  margin: 2.5rem 0 2rem;
  padding: 2rem 1.5rem;
  background: linear-gradient(180deg, #fafaf7 0%, #f5f5f0 100%);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px rgba(0, 104, 91, 0.06);
}
.process-svg-wrap svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 920px;
  margin: 0 auto;
}
.process-svg-wrap .process-svg-caption {
  display: block;
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--gray);
  letter-spacing: 0.02em;
}

/* Animation des cercles étapes au scroll quand parent .reveal devient visible */
.process-svg-wrap .step-circle {
  transition: transform 0.5s ease, fill 0.4s ease;
  transform-origin: center;
  transform-box: fill-box;
}
.process-svg-wrap.reveal.visible .step-circle {
  animation: stepPop 0.6s cubic-bezier(0.5, 1.6, 0.5, 1) both;
}
.process-svg-wrap.reveal.visible .step-circle:nth-of-type(1) { animation-delay: 0.05s; }
.process-svg-wrap.reveal.visible .step-circle:nth-of-type(2) { animation-delay: 0.18s; }
.process-svg-wrap.reveal.visible .step-circle:nth-of-type(3) { animation-delay: 0.31s; }
.process-svg-wrap.reveal.visible .step-circle:nth-of-type(4) { animation-delay: 0.44s; }
.process-svg-wrap.reveal.visible .step-circle:nth-of-type(5) { animation-delay: 0.57s; }
@keyframes stepPop {
  0%   { transform: scale(0.3); opacity: 0; }
  60%  { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* === 7. SERVICES ASSOCIÉS — GRILLE DE CARDS (remplace boutons textuels) === */

.service-detail .related-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin: 1.25rem 0 2.5rem;
}
.service-detail .related-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 1.1rem 1.25rem;
  background: #fff;
  border: 1.5px solid var(--surface-container);
  border-radius: var(--radius-lg);
  color: var(--on-surface);
  text-decoration: none;
  transition: transform 0.28s ease, border-color 0.25s ease, box-shadow 0.3s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
}
.service-detail .related-card::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.service-detail .related-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 12px 28px rgba(0, 104, 91, 0.13);
  background: #fdfefd;
}
.service-detail .related-card:hover::after {
  transform: scaleX(1);
}
.service-detail .related-card .related-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 104, 91, 0.08);
  color: var(--primary);
  border-radius: 6px;
  transition: background 0.25s ease, color 0.25s ease;
}
.service-detail .related-card:hover .related-icon {
  background: var(--primary);
  color: #fff;
}
.service-detail .related-card .related-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}
.service-detail .related-card .related-title {
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.3;
  color: var(--on-surface);
  letter-spacing: -0.01em;
}
.service-detail .related-card .related-arrow {
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.3s ease;
}
.service-detail .related-card:hover .related-arrow {
  gap: 8px;
}

/* Fallback : si l'on garde les btn-outline historiques (autres pages services) */
.service-detail .related-services a.btn-outline,
.service-detail .related-services a.btn.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  font-weight: 600;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.3s ease;
}
.service-detail .related-services a.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 104, 91, 0.25);
}

/* === 8. FAQ FIX ICÔNE (flex strict, plus de chevauchement) === */

.service-detail .faq-list {
  margin: 1.5rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.service-detail .faq-item {
  border: 1px solid var(--surface-container);
  border-radius: var(--radius-lg);
  background: #fff;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.3s ease;
  margin-bottom: 0;
}
.service-detail .faq-item:hover {
  border-color: var(--primary-light);
  box-shadow: 0 6px 20px rgba(0, 104, 91, 0.07);
}
.service-detail .faq-item.open,
.service-detail .faq-item.active {
  border-color: var(--primary);
  box-shadow: 0 10px 28px rgba(0, 104, 91, 0.10);
}
.service-detail .faq-question {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  width: 100%;
  padding: 1.15rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  background: transparent;
  border: none;
  color: var(--on-surface);
  text-align: left;
  cursor: pointer;
  line-height: 1.45;
  letter-spacing: -0.005em;
  transition: background 0.2s ease, color 0.2s ease;
}
.service-detail .faq-question:hover {
  background: var(--surface-container-low);
  color: var(--primary);
}
.service-detail .faq-item.open .faq-question,
.service-detail .faq-item.active .faq-question {
  color: var(--primary);
}
.service-detail .faq-question .faq-icon {
  width: 22px;
  height: 22px;
  margin-left: auto;
  flex-shrink: 0;
  color: var(--primary);
  fill: currentColor;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.service-detail .faq-item.open .faq-icon,
.service-detail .faq-item.active .faq-icon {
  transform: rotate(180deg);
}
.service-detail .faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 1.25rem;
  opacity: 0;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.4s ease,
              opacity 0.3s ease;
}
.service-detail .faq-item.open .faq-answer,
.service-detail .faq-item.active .faq-answer,
.service-detail .faq-answer.active {
  max-height: 600px;
  padding: 0 1.25rem 1.15rem;
  opacity: 1;
}
.service-detail .faq-answer p {
  color: #3a3c3c;
  font-size: 0.96rem;
  line-height: 1.65;
  margin: 0;
}

/* === 9. TABLEAU PRIX — leger refresh (sans tout casser) === */

.service-detail .price-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(27, 28, 28, 0.08);
}
.service-detail .price-table thead {
  background: var(--primary);
  color: #fff;
}
.service-detail .price-table th {
  padding: 0.95rem 1.1rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: left;
}
.service-detail .price-table td {
  padding: 0.85rem 1.1rem;
  font-size: 0.94rem;
  border-bottom: 1px solid var(--surface-container);
  color: #2a2c2c;
}
.service-detail .price-table tbody tr:last-child td {
  border-bottom: none;
}
.service-detail .price-table tbody tr {
  transition: background 0.2s ease;
}
.service-detail .price-table tbody tr:hover {
  background: rgba(0, 104, 91, 0.04);
}
.service-detail .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.75rem 0 1.25rem;
}

/* === 10. CTA BLOCK FINAL — micro-anim sur bouton === */

.service-detail .cta-block {
  position: relative;
  overflow: hidden;
}
.service-detail .cta-block::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.service-detail .cta-block .btn-white {
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.3s ease;
}
.service-detail .cta-block .btn-white:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2);
}

/* === 11. PAGE HERO — petit polish (scoped to body of services page) === */

body .page-hero h1 {
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

/* === 12. ANIMATIONS REVEAL personnalisées (micro-stagger) === */

.service-detail .reveal,
.service-detail .reveal-left,
.service-detail .reveal-right {
  will-change: opacity, transform;
}

/* === 13. RESPONSIVE — Mobile-first refinements === */

@media (max-width: 768px) {
  .service-detail {
    padding: 40px 0 70px;
  }
  .service-detail .container > h2 {
    margin-top: 2.75rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
  }
  .service-detail h3 {
    margin-top: 1.85rem;
    margin-bottom: 0.65rem;
    font-size: 1.1rem;
  }
  .service-detail p {
    font-size: 0.99rem;
    line-height: 1.7;
  }

  .callout-retenir {
    padding: 1.3rem 1.25rem 1.3rem 1.5rem;
    margin: 2rem 0;
  }
  .callout-retenir h3 {
    font-size: 1.05rem;
  }

  .callout-chiffres {
    grid-template-columns: 1fr 1fr;
  }
  .callout-chiffres .chiffre-item {
    padding: 1.5rem 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .callout-chiffres .chiffre-item:nth-child(even) {
    border-right: none;
  }
  .callout-chiffres .chiffre-item:nth-last-child(-n+2) {
    border-bottom: none;
  }
  .callout-chiffres .chiffre-value {
    font-size: 1.85rem;
  }

  .blockquote-citation {
    padding: 1.4rem 1.25rem 1.5rem 2.75rem;
    font-size: 1.02rem;
  }
  .blockquote-citation::before {
    font-size: 3.5rem;
    left: 0.85rem;
    top: 0.2rem;
  }

  .process-svg-wrap {
    padding: 1.5rem 0.5rem;
  }
  .process-svg-wrap .process-svg-caption {
    font-size: 0.78rem;
    padding: 0 0.5rem;
  }

  .service-detail .related-services-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .service-detail .related-card {
    padding: 0.95rem 1rem;
  }
  .service-detail .related-card .related-title {
    font-size: 0.92rem;
  }

  .service-detail .faq-question {
    padding: 1rem 1rem;
    font-size: 0.95rem;
    gap: 12px;
  }
  .service-detail .faq-question .faq-icon {
    width: 20px;
    height: 20px;
  }

  .service-detail .price-table th,
  .service-detail .price-table td {
    padding: 0.7rem 0.8rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 420px) {
  .service-detail .related-services-grid {
    grid-template-columns: 1fr;
  }
  .callout-chiffres {
    grid-template-columns: 1fr;
  }
  .callout-chiffres .chiffre-item {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .callout-chiffres .chiffre-item:last-child {
    border-bottom: none;
  }
}

/* === 14. REDUCED MOTION — accessibilité === */

@media (prefers-reduced-motion: reduce) {
  .service-detail figure,
  .service-detail .related-card,
  .service-detail .cta-block .btn-white,
  .service-detail .related-card::after,
  .process-svg-wrap.reveal.visible .step-circle {
    transition: none !important;
    animation: none !important;
  }
}

/* ============================================================
   V3.1 — TOC sticky scrollspy + Cards services associés v2
   Ajout du 13 mai 2026
   ============================================================ */

/* === 15. TOC SIDEBAR (desktop sticky) === */

/* Le layout : sur desktop ≥1024px, on bascule .service-detail.has-toc .container
   en grille 2 colonnes (contenu + TOC à droite). Sur tablette/mobile, on cache
   la sidebar et on affiche le bouton flottant .toc-fab + overlay. */

.service-detail.has-toc .toc-sidebar {
  display: none; /* desktop only — activé par media query */
}

@media (min-width: 1024px) {
  .service-detail.has-toc .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 248px;
    gap: 56px;
    align-items: start;
  }

  /* tous les enfants directs prennent la colonne 1 (le contenu) */
  .service-detail.has-toc .container > *:not(.toc-sidebar) {
    grid-column: 1;
    min-width: 0; /* permet aux contenus larges (table) de rester contenus */
  }

  .service-detail.has-toc .toc-sidebar {
    display: block;
    grid-column: 2;
    grid-row: 1 / -1;
    position: sticky;
    top: 100px; /* offset header sticky */
    align-self: start;
    max-height: calc(100vh - 130px);
  }
}

@media (min-width: 1280px) {
  .service-detail.has-toc .container {
    grid-template-columns: minmax(0, 1fr) 268px;
    gap: 72px;
  }
}

.toc-sidebar-inner {
  position: relative;
  padding: 0 0 0 18px;
  border-left: 1px solid rgba(0, 104, 91, 0.10);
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  /* fade-out en bas pour signaler le scroll interne */
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent 100%);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent 100%);
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 104, 91, 0.25) transparent;
}
.toc-sidebar-inner::-webkit-scrollbar { width: 6px; }
.toc-sidebar-inner::-webkit-scrollbar-thumb {
  background: rgba(0, 104, 91, 0.18);
  border-radius: 3px;
}
.toc-sidebar-inner::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 104, 91, 0.35);
}

.toc-label {
  display: block;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
  padding-bottom: 0;
}

.toc-sidebar nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-sidebar nav ul li {
  margin: 0;
  padding: 0;
}

.toc-sidebar nav ul li::before {
  content: none !important; /* override puce verte des listes du corps */
}

.toc-sidebar nav a.toc-link {
  position: relative;
  display: block;
  padding: 7px 10px 7px 14px;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.4;
  color: #6c757d;
  text-decoration: none;
  border-radius: 6px;
  letter-spacing: -0.002em;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.toc-sidebar nav a.toc-link::before {
  content: '';
  position: absolute;
  left: -19px; /* aligné sur la bordure gauche du .toc-sidebar-inner */
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 0;
  background: var(--primary);
  border-radius: 1px;
  transition: height 0.22s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.toc-sidebar nav a.toc-link:hover {
  color: var(--on-surface);
  background: rgba(0, 104, 91, 0.04);
}

.toc-sidebar nav a.toc-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.toc-sidebar nav a.toc-link.is-active {
  color: var(--primary-dark);
  font-weight: 700;
  background: rgba(0, 104, 91, 0.05);
}

.toc-sidebar nav a.toc-link.is-active::before {
  height: 60%;
}

/* === 16. BOUTON FLOTTANT TOC (mobile/tablet) === */

.toc-fab {
  display: none; /* activé sous 1024px */
  position: fixed;
  z-index: 980;
  right: 18px;
  bottom: 90px; /* au-dessus du mobile-call-btn / back-to-top */
  padding: 10px 16px 10px 12px;
  background: var(--on-surface);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 28px rgba(27, 28, 28, 0.28), 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.25s ease, background 0.2s ease;
}

.toc-fab svg {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.toc-fab .toc-fab-label {
  line-height: 1;
}

.toc-fab:hover,
.toc-fab:focus-visible {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 104, 91, 0.32), 0 2px 6px rgba(0, 0, 0, 0.12);
}

.toc-fab:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 3px;
}

@media (max-width: 1023.98px) {
  .toc-fab {
    display: inline-flex;
  }
}

@media (max-width: 480px) {
  .toc-fab {
    right: 14px;
    bottom: 84px;
    padding: 9px 14px 9px 11px;
    font-size: 0.82rem;
  }
}

/* === 17. OVERLAY TOC (drawer mobile/tablet) === */

.toc-overlay {
  position: fixed;
  inset: 0;
  z-index: 990;
  pointer-events: none;
}

.toc-overlay[hidden] {
  display: none !important;
}

.toc-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 28, 28, 0.5);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: auto;
}

.toc-overlay-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(86vw, 360px);
  background: #fff;
  box-shadow: -12px 0 40px rgba(27, 28, 28, 0.18);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.toc-overlay.is-open .toc-overlay-backdrop {
  opacity: 1;
}

.toc-overlay.is-open .toc-overlay-panel {
  transform: translateX(0);
}

.toc-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 22px 14px;
  border-bottom: 1px solid var(--surface-container);
}

.toc-overlay-header .toc-label {
  margin: 0;
}

.toc-overlay-close {
  background: transparent;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--on-surface);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.toc-overlay-close svg {
  width: 18px;
  height: 18px;
}
.toc-overlay-close:hover,
.toc-overlay-close:focus-visible {
  background: var(--surface-container);
  color: var(--primary-dark);
}

.toc-overlay nav {
  padding: 14px 14px 28px;
}

.toc-overlay nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-overlay nav ul li::before {
  content: none !important;
}

.toc-overlay nav a.toc-link {
  display: block;
  padding: 12px 14px;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--on-surface);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.18s ease, color 0.18s ease;
}

.toc-overlay nav a.toc-link:hover,
.toc-overlay nav a.toc-link:focus-visible {
  background: rgba(0, 104, 91, 0.07);
  color: var(--primary-dark);
  outline: none;
}

.toc-overlay nav a.toc-link.is-active {
  background: rgba(0, 104, 91, 0.10);
  color: var(--primary-dark);
  font-weight: 700;
}

/* === 18. RELATED SERVICES V2 — Cards riches === */

.service-detail .related-intro {
  max-width: 640px;
  color: #4a4d4d;
  font-size: 0.98rem;
  line-height: 1.65;
  margin: 0.5rem 0 1.5rem;
}

.service-detail .related-services-v2 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 1rem 0 3rem;
}

/* Featured card : prend 2 colonnes sur desktop */
.service-detail .related-card-v2.is-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.service-detail .related-card-v2 {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 28px 26px 24px;
  background: #fff;
  border: 1px solid rgba(27, 28, 28, 0.08);
  border-radius: 18px;
  color: var(--on-surface);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.3, 1),
              border-color 0.25s ease,
              box-shadow 0.32s ease,
              background 0.25s ease;
}

/* Halo dégradé décoratif en fond, subtil */
.service-detail .related-card-v2::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 88% -20%, rgba(0, 104, 91, 0.10) 0%, transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #fafaf7 100%);
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

/* Accent diagonal (visible au hover) */
.service-detail .related-card-v2::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, #00a890 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.service-detail .related-card-v2:hover,
.service-detail .related-card-v2:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(0, 104, 91, 0.35);
  box-shadow: 0 22px 48px rgba(0, 104, 91, 0.14), 0 4px 12px rgba(0, 0, 0, 0.04);
  background: #fff;
  outline: none;
}
.service-detail .related-card-v2:hover::before,
.service-detail .related-card-v2:focus-visible::before {
  opacity: 1;
}
.service-detail .related-card-v2:hover::after,
.service-detail .related-card-v2:focus-visible::after {
  transform: scaleX(1);
}

.service-detail .related-card-v2:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* Icône — bulle ronde primaire, plus présente que la V1 */
.service-detail .related-card-v2 .card-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 104, 91, 0.10) 0%, rgba(0, 104, 91, 0.04) 100%);
  color: var(--primary);
  border-radius: 14px;
  margin-bottom: 18px;
  transition: background 0.28s ease, color 0.28s ease, transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.service-detail .related-card-v2 .card-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}
.service-detail .related-card-v2:hover .card-icon,
.service-detail .related-card-v2:focus-visible .card-icon {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  transform: scale(1.05) rotate(-2deg);
}

/* Eyebrow pour featured */
.service-detail .related-card-v2 .card-eyebrow {
  display: inline-block;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
  padding: 4px 10px;
  background: rgba(0, 104, 91, 0.08);
  border-radius: 999px;
}

/* Titre — beaucoup plus prononcé qu'avant */
.service-detail .related-card-v2 .card-title {
  margin: 0 0 8px;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.018em;
  color: var(--on-surface);
}

.service-detail .related-card-v2.is-featured .card-title {
  font-size: 1.45rem;
  line-height: 1.18;
}

.service-detail .related-card-v2 .card-desc {
  margin: 0 0 18px;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #5a5d5d;
  flex-grow: 1;
}

.service-detail .related-card-v2.is-featured .card-desc {
  font-size: 0.98rem;
  line-height: 1.6;
  color: #3a3c3c;
  max-width: 380px;
}

/* CTA "Voir le service" en bas avec flèche animée */
.service-detail .related-card-v2 .card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--primary);
  text-transform: uppercase;
  transition: gap 0.3s cubic-bezier(0.2, 0.7, 0.3, 1), color 0.2s ease;
}
.service-detail .related-card-v2 .card-cta svg {
  width: 16px;
  height: 16px;
  display: block;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.service-detail .related-card-v2:hover .card-cta,
.service-detail .related-card-v2:focus-visible .card-cta {
  gap: 10px;
  color: var(--primary-dark);
}
.service-detail .related-card-v2:hover .card-cta svg,
.service-detail .related-card-v2:focus-visible .card-cta svg {
  transform: translateX(2px);
}

/* === 19. Responsive related-services-v2 === */

@media (max-width: 1023.98px) {
  .service-detail .related-services-v2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .service-detail .related-card-v2.is-featured {
    grid-column: span 2;
    grid-row: auto;
  }
  .service-detail .related-card-v2.is-featured .card-title {
    font-size: 1.3rem;
  }
}

@media (max-width: 600px) {
  .service-detail .related-services-v2 {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .service-detail .related-card-v2 {
    padding: 22px 20px 20px;
  }
  .service-detail .related-card-v2.is-featured {
    grid-column: auto;
  }
  .service-detail .related-card-v2 .card-icon {
    width: 46px;
    height: 46px;
    margin-bottom: 14px;
    border-radius: 12px;
  }
  .service-detail .related-card-v2 .card-icon svg {
    width: 22px;
    height: 22px;
  }
  .service-detail .related-card-v2 .card-title {
    font-size: 1.05rem;
  }
  .service-detail .related-card-v2.is-featured .card-title {
    font-size: 1.2rem;
  }
  .service-detail .related-card-v2 .card-desc,
  .service-detail .related-card-v2.is-featured .card-desc {
    font-size: 0.88rem;
  }
}

/* === 20. Reduced motion override pour V3.1 === */

@media (prefers-reduced-motion: reduce) {
  .toc-sidebar nav a.toc-link,
  .toc-sidebar nav a.toc-link::before,
  .toc-fab,
  .toc-overlay-backdrop,
  .toc-overlay-panel,
  .service-detail .related-card-v2,
  .service-detail .related-card-v2::after,
  .service-detail .related-card-v2 .card-icon,
  .service-detail .related-card-v2 .card-cta,
  .service-detail .related-card-v2 .card-cta svg {
    transition: none !important;
    animation: none !important;
  }
}

/* ============================================================
   V3.2 — TOC à gauche + Fix FAQ double icône + Cards uniformes
          + Élargir le conteneur
   Ajout du 13 mai 2026
   ============================================================ */

/* === 21. V3.2 — TOC bascule À GAUCHE (pattern docs/wiki classique)
   Override les règles V3.1 (section 15) qui plaçaient le TOC à droite.
   Pattern Anthropic docs / GitBook / MDN : sommaire à gauche,
   contenu à droite, lecture naturelle gauche → droite. */

@media (min-width: 1024px) {
  .service-detail.has-toc .container {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  /* TOC sidebar prend la colonne 1 (gauche) */
  .service-detail.has-toc .toc-sidebar {
    grid-column: 1;
  }

  /* Tout le reste va sur la colonne 2 (droite) */
  .service-detail.has-toc .container > *:not(.toc-sidebar) {
    grid-column: 2;
  }

  /* Bordure visuelle du TOC : passe à droite (filet côté contenu) */
  .toc-sidebar-inner {
    padding: 0 18px 0 0;
    border-left: none;
    border-right: 1px solid rgba(0, 104, 91, 0.10);
  }

  /* Repositionner l'indicateur vert actif côté droit du lien */
  .toc-sidebar nav a.toc-link::before {
    left: auto;
    right: -19px;
  }
}

@media (min-width: 1280px) {
  .service-detail.has-toc .container {
    grid-template-columns: 268px minmax(0, 1fr);
  }
}

/* === 22. V3.2 — Élargir le conteneur (pages services uniquement)
   Réduit les marges blanches latérales sur écrans larges.
   Le contenu textuel principal garde une largeur de lecture
   confortable grâce à max-width sur les paragraphes (~70ch). */

@media (min-width: 1024px) {
  .service-detail .container {
    max-width: 1360px;
    padding-left: 28px;
    padding-right: 28px;
  }
}

@media (min-width: 1440px) {
  .service-detail .container {
    max-width: 1440px;
    padding-left: 32px;
    padding-right: 32px;
  }
}

/* Confort de lecture : paragraphes et listes du corps gardent une
   largeur de ligne confortable (cible ~75 caractères max). */
@media (min-width: 1280px) {
  .service-detail .container > p,
  .service-detail .container > ul,
  .service-detail .container > ol {
    max-width: 78ch;
  }
}

/* === 23. V3.2 — Cards "Services associés" uniformes (6 carrés identiques)
   Neutralise la classe .is-featured qui rendait la première card 2x plus
   grande. Toutes les cards ont désormais la même taille (3 colonnes desktop,
   2 colonnes tablette, 1 colonne mobile). */

.service-detail .related-card-v2.is-featured {
  grid-column: auto;
  grid-row: auto;
}

.service-detail .related-card-v2.is-featured .card-title {
  font-size: 1.15rem;
  line-height: 1.25;
}

.service-detail .related-card-v2.is-featured .card-desc {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #5a5d5d;
  max-width: none;
}

/* Eyebrow conservé visuellement, mais sans casser l'uniformité */
.service-detail .related-card-v2.is-featured .card-eyebrow {
  margin-bottom: 12px;
}

@media (max-width: 1023.98px) {
  .service-detail .related-card-v2.is-featured {
    grid-column: auto;
    grid-row: auto;
  }
  .service-detail .related-card-v2.is-featured .card-title {
    font-size: 1.05rem;
  }
}

/* === 24. V3.2 — FIX BUG FAQ double icône
   CAUSE : css/style.css (ligne ~2948) définit `.faq-item .faq-question::after`
   qui dessine un chevron en CSS pur (border-right + border-bottom rotaté).
   Ce chevron CSS s'ajoutait en plus du SVG `.faq-icon` présent dans le HTML
   des pages services V2, d'où le "v" parasite visible avant le vrai chevron.

   SOLUTION : annuler le pseudo-element ::after sur les pages .service-detail.
   Le SVG .faq-icon reste le seul indicateur visuel. */

.service-detail .faq-item .faq-question::after,
.service-detail .faq-item h3::after,
.service-detail .faq-item h4::after {
  content: none !important;
  display: none !important;
}

/* Sécurité : si le padding-right hérité du CSS global laisse trop d'espace
   à droite à cause de l'ancien chevron CSS, on rééquilibre. */
.service-detail .faq-question {
  padding-right: 1.25rem;
}
@media (max-width: 768px) {
  .service-detail .faq-question {
    padding-right: 1rem;
  }
}

/* ============================================================
   V3.3 — Pages secteurs : H1 hero en Manrope (cohérence accueil)
   Ajout du 16 mai 2026
   ------------------------------------------------------------
   Sur les pages secteurs (Bordeaux, Mérignac, Pessac…), on cible
   le H1 du hero avec la classe additionnelle .page-hero-secteur
   pour le passer en Manrope (sans-serif, comme sur l'accueil)
   plutôt qu'en Playfair Display (serif, défaut .page-hero du CSS
   global). Override scopé : n'impacte PAS les pages services qui
   conservent Playfair Display sur leur H1 page-hero.
   ============================================================ */

.page-hero.page-hero-secteur h1 {
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif !important;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.page-hero.page-hero-secteur h1 span {
  color: #7dd8c8; /* accent vert clair, cohérent avec .hero-title-animate de l'accueil */
}

