/**
 * C2S — Templates Villes (SEO + Création de site)
 *
 * Styles spécifiques aux templates villes.
 *  - .tv-hero (hero split layout : contenu + image Stan non tronquée)
 *  - .tv-local (section locale ville — anti duplicate)
 *  - .tv-advantages (H2 fort "Ce que je fais mieux que les concurrents")
 *  - .tv-cities (grille villes)
 *  - .tv-faq (FAQ accordéon, alignée sur cds-accordion)
 */

/* ============================================
   Page wrapper
   ============================================ */
.tv-page {
    background-color: var(--color-bg);
    color: var(--color-heading);
}

/* Sur les pages villes, les sections dark cseo-* (.cseo-advantages, .cseo-tools,
   .cseo-algo, .cseo-auto) sont des CLONES du markup de la page mère consultant-seo
   et utilisent par défaut padding-inline: var(--col) — pratique sur la page mère
   où TOUT le template utilise ce padding, mais ÇA NE COLLE PAS sur les pages villes
   où .tv-hero, .tv-local, .tv-cities, .tv-faq, .tv-advantages utilisent le
   .container standard (padding-inline: var(--space-6) ≈ 6em).
   → On force les sections cseo-* à utiliser le même padding que le reste du
   template ville. Le grid 12 cols est ALORS aligné de bout en bout du site
   (vérifiable Shift+G). On ne touche PAS la page mère consultant-seo. */
.tv-page .cseo-advantages > .container,
.tv-page .cseo-tools > .container,
.tv-page .cseo-algo > .container,
.tv-page .cseo-auto > .container {
    padding-inline: var(--space-6);
}

/* Sections dark cseo-* (advantages / tools / algo / auto) : sur la page mère,
   chaque container a 1 col de padding interne via var(--col). Sur les pages
   villes, on a viré ce padding pour aligner sur la grille globale → on rend
   l'air visuel en décalant chaque enfant de 1 col gauche/droite (cols 2-11
   au lieu de 1-12). */
.tv-page .cseo-advantages__title {
    grid-column: 2 / span 10;
}

/* Layout commun des 3 sections dark : visuel 5 cols + 1 col de gap + texte 4 cols
   dans cols 2-11 (1 col vide à gauche, 1 col vide à droite).

   tools / algo : visuel à GAUCHE (cols 2-6), texte à DROITE (cols 8-11)
   auto         : texte à GAUCHE (cols 2-5), visuel à DROITE (cols 7-11) */
.tv-page .cseo-tools__editor-col,
.tv-page .cseo-algo__visual-col {
    grid-column: 2 / span 5;
}
.tv-page .cseo-tools__content-col,
.tv-page .cseo-algo__content-col {
    grid-column: 8 / span 4;
}

.tv-page .cseo-auto__content-col {
    grid-column: 2 / span 4;
}
.tv-page .cseo-auto__visual-col {
    grid-column: 7 / span 5;
}

/* La page mère contraint le SVG des brevets à max-width:24em (visuel "petit"
   et centré). Sur les pages villes on veut qu'il occupe TOUTE la 5-col. */
.tv-page .cseo-algo__svg {
    max-width: 100%;
    width: 100%;
}
.tv-page .cseo-algo__visual {
    width: 100%;
    align-items: stretch;
}

/* ============================================
   Hero ville — split layout (image préservée)
   - .tv-hero : 90vh + padding-top/bottom symétriques (espacement original validé)
   - .tv-hero__grid align-items stretch → image et content même hauteur
   - .tv-hero__content : flex column → main (flex:1, center) puis facts (collés en bas)
   - .tv-hero__media : aspect-ratio préservée, hauteur dictée par la cellule
   ============================================ */
.tv-hero {
    position: relative;
    min-height: 90vh;
    min-height: 90dvh;
    padding-top: calc(var(--space-20) + var(--space-10));
    padding-bottom: calc(var(--space-20) + var(--space-10));
    background-color: var(--color-bg);
    display: flex;
    align-items: center;
}

.tv-hero__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.5em;
    align-items: stretch;
    width: 100%;
}

.tv-hero__content {
    grid-column: 2 / span 6;
    display: flex;
    flex-direction: column;
}

.tv-hero__main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
}

.tv-hero__media {
    grid-column: 8 / span 4;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 4px;
    position: relative;
}

.tv-hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    display: block;
}

.tv-hero__title {
    font-size: clamp(2.75rem, 6vw, 5.5rem);
    font-weight: 500;
    line-height: 0.98;
    letter-spacing: -0.025em;
    color: var(--color-heading);
    margin: 0 0 var(--space-10);
}

.tv-hero__lead {
    font-size: var(--18px-size);
    line-height: 1.55;
    color: var(--color-heading);
    opacity: 0.78;
    margin: 0 0 var(--space-10);
    max-width: 32em;
}

/* Hero entrance — état initial CACHÉ en CSS pour éviter tout flash.
   Le JS (templates-villes.js) anime via GSAP from→to puis force l'état
   visible. Fallback : si JS plante, un setTimeout 2.5s pose .is-fallback
   qui rend tout visible (pas de hero invisible permanent). */
/* Animation hero — gérée 100% en GSAP côté JS (templates-villes.js).
   On ne pose ICI que le visibility:hidden initial pour éviter le FOUC entre
   le rendu HTML et l'init GSAP (autoAlpha:0 sera posé immédiatement par GSAP
   avec immediateRender:true). */
.tv-hero__cta,
.tv-hero__fact {
    visibility: hidden;
}

.tv-hero__cta {
    display: flex;
    margin-top: var(--space-2);
}

.tv-hero__facts {
    list-style: none;
    margin: var(--space-10) 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4) var(--space-10);
}

.tv-hero__fact {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    font-size: var(--14px-size);
    line-height: 1.2;
    color: var(--color-heading);
    letter-spacing: 0.005em;
}

@media (prefers-reduced-motion: reduce) {
    .tv-hero__cta,
    .tv-hero__fact {
        visibility: visible;
        opacity: 1;
    }
    .tv-hero__fact {
        opacity: 0.85;
    }
}

.tv-hero__fact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: var(--orange);
    flex: 0 0 auto;
}

.tv-hero__fact-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.tv-hero__fact-label {
    font-weight: 500;
}

/* ============================================
   Section locale — anti duplicate content (paragraphes + stats)
   ============================================ */
.tv-local {
    padding-top: calc(var(--col) * 2);
    padding-bottom: calc(var(--col) * 2);
    background-color: var(--color-bg);
}

.tv-local__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.5em;
    align-items: start;
}

.tv-local__head {
    grid-column: 2 / span 4;
}

.tv-local__title {
    font-size: clamp(2rem, 4.5vw, 4rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.025em;
    margin: 0;
    color: var(--color-heading);
}

.tv-local__body {
    grid-column: 7 / span 5;
    display: flex;
    flex-direction: column;
    gap: 1.25em;
}

.tv-local__body p {
    font-size: var(--18px-size);
    line-height: 1.55;
    margin: 0;
    color: var(--color-heading);
    opacity: 0.82;
}

/* Wrapper en subgrid → il hérite des tracks du .tv-local__grid parent,
   donc les stats tombent EXACTEMENT sur les mêmes colonnes que .tv-local__head
   (col 2-5) et .tv-local__body (col 7-11). Pas de calcul de fr indépendant,
   pas de décalage possible. La ligne animée (data-border-reveal) reste sur
   le wrapper (top:0). */
.tv-local__stats-wrap {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    margin: var(--space-12) 0 0;
    padding-top: var(--space-10);
}

.tv-local__stats {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: subgrid;
    row-gap: var(--space-10);
}

/* Alignement strict sur le contenu du dessus :
   - stats 1 & 2 sous .tv-local__head (col 2-5) → cols 2-3 et 4-5
   - stats 3 & 4 sous .tv-local__body (col 7-11) → cols 7-8 et 10-11 */
.tv-local__stat:nth-child(1) { grid-column: 2 / span 2; }
.tv-local__stat:nth-child(2) { grid-column: 4 / span 2; }
.tv-local__stat:nth-child(3) { grid-column: 7 / span 2; }
.tv-local__stat:nth-child(4) { grid-column: 10 / span 2; }

.tv-local__stat {
    position: relative;
    min-width: 0;
    overflow: hidden;
}

.tv-local__stat-num {
    font-size: clamp(2rem, 3.4vw, 3.25rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--orange);
    margin-bottom: 0.4rem;
    word-break: break-word;
}

.tv-local__stat-label {
    font-size: var(--16px-size);
    line-height: 1.35;
    opacity: 0.7;
}

/* ============================================
   Cities grid — "Prestations partout en France" (fond noir)
   ============================================ */
.tv-cities {
    padding-top: calc(var(--col) * 2);
    padding-bottom: calc(var(--col) * 2);
    background-color: var(--color-heading);
    color: var(--white);
}

.tv-cities__head {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.5em;
    margin-bottom: calc(var(--col) * 1);
}

.tv-cities__title {
    grid-column: 2 / span 8;
    font-size: clamp(2.5rem, 5.5vw, 5rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.025em;
    margin: 0 0 var(--space-6);
    color: var(--white);
}

.tv-cities__intro {
    grid-column: 2 / span 8;
    font-size: var(--18px-size);
    line-height: 1.55;
    margin: 0;
    color: var(--white);
    opacity: 0.78;
}

.tv-cities__bounds {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0;
}

.tv-cities__grid {
    grid-column: 2 / span 10;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    /* Plus de border-top static : ligne du haut animée via data-border-reveal="light"
       (système global border-reveal.js, scaleX 0→1 au scroll). */
}

.tv-cities__item {
    position: relative;
    /* Plus de border-bottom static : la ligne au-dessus de chaque item est
       animée via data-border-reveal="light" (système global). */
}

/* Lignes verticales (animées scaleY 0→1 par templates-villes.js).
   - vline--left : à gauche de chaque item (encadre le tableau à gauche
     pour les 1ers de rangée + sépare les colonnes pour les autres).
   - vline--right : à droite uniquement du DERNIER item de chaque rangée
     (encadre le tableau à droite). */
.tv-cities__vline {
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3);
    transform: scaleY(0);
    transform-origin: top center;
    pointer-events: none;
    z-index: 1;
}

.tv-cities__vline--left  { left: 0; }
.tv-cities__vline--right { right: 0; }

/* En desktop (3 cols) : right uniquement sur le 3e, 6e, 9e... item
   + le tout dernier (au cas où la dernière rangée est incomplète). */
.tv-cities__vline--right { display: none; }
.tv-cities__item:nth-child(3n) .tv-cities__vline--right,
.tv-cities__item:last-child .tv-cities__vline--right { display: block; }

/* Ligne ORANGE au hover (différente de la ligne d'apparition data-border-reveal).
   Apparaît en BAS de l'item (-1px) pour souligner la ligne au survol. */
.tv-cities__hover-line {
    position: absolute;
    inset: auto 0 -1px 0;
    height: 1px;
    background-color: var(--orange);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.5s var(--ease-in-out);
    pointer-events: none;
    z-index: 2;
}

.tv-cities__item:hover .tv-cities__hover-line {
    transform: scaleX(1);
}

/* Ligne FINALE en bas du tableau — animée comme les autres via data-border-reveal.
   Le wrapper a 0 de hauteur ; le système border-reveal y injecte un <div> 1px
   absolument positionné en top:0 (donc juste sous l'<ul>). Aligné sur cols 2-10
   comme l'<ul>. */
.tv-cities__bottom-line {
    grid-column: 2 / span 10;
    position: relative;
    height: 0;
    width: 100%;
}

.tv-cities__link {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: var(--space-10) var(--space-6);
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.tv-cities__link--current {
    opacity: 0.45;
    cursor: default;
}

.tv-cities__icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--white);
    transition: color 0.3s ease, transform 0.5s var(--ease-in-out);
}

.tv-cities__item:hover .tv-cities__icon {
    color: var(--orange);
    transform: translateY(-2px);
}

.tv-cities__label {
    flex: 1;
    font-size: var(--18px-size);
    line-height: 1.2;
    font-weight: 500;
    color: var(--white);
}

.tv-cities__arrow {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.3s ease, transform 0.5s var(--ease-in-out);
    color: var(--orange);
    flex: 0 0 auto;
}

.tv-cities__item:hover .tv-cities__arrow {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 991px) {
    .tv-cities__title,
    .tv-cities__intro { grid-column: 2 / span 10; }
    .tv-cities__grid {
        grid-column: 2 / span 10;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    /* Tablet (2 cols) : reset des règles desktop, on recalibre sur 2n
       + last-child au cas où la dernière rangée est incomplète. */
    .tv-cities__item .tv-cities__vline--left  { display: block; }
    .tv-cities__item .tv-cities__vline--right { display: none; }
    .tv-cities__item:nth-child(2n) .tv-cities__vline--right,
    .tv-cities__item:last-child .tv-cities__vline--right { display: block; }
}

@media (max-width: 640px) {
    .tv-cities__grid { grid-template-columns: 1fr; }
    /* Mobile (1 col) : encadrement gauche/droite sur chaque item. */
    .tv-cities__item .tv-cities__vline--left  { display: block; }
    .tv-cities__item .tv-cities__vline--right { display: block; }
}

/* ============================================
   FAQ accordéon — utilise cds-accordion JS (initCdsAccordion)
   On hérite de .cds-accordion__body { max-height ... } pour le toggle
   ============================================ */
.tv-faq {
    padding-top: calc(var(--col) * 2);
    padding-bottom: calc(var(--col) * 2);
}

.tv-faq__head {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.5em;
    margin-bottom: calc(var(--col) * 1);
}

.tv-faq__title {
    grid-column: 2 / span 10;
    font-size: clamp(2.5rem, 5.5vw, 5rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.025em;
    margin: 0;
}

.tv-faq__bounds {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0;
}

.tv-faq__list {
    grid-column: 2 / span 10;
    margin: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.tv-faq__item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.tv-faq__header {
    display: grid !important;
    grid-template-columns: 4em 1fr auto;
    align-items: center;
    gap: 1em;
    padding: var(--space-10) var(--space-6) !important;
    width: 100%;
    background: none;
    border: 0;
    text-align: left;
    cursor: pointer;
    color: var(--color-heading);
    transition: color 0.3s ease;
}

.tv-faq__index {
    font-size: var(--16px-size);
    letter-spacing: 0.04em;
    opacity: 0.55;
}

.tv-faq__q {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--color-heading);
}

.tv-faq__icon {
    width: 18px;
    height: 18px;
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
}

.tv-faq__icon span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 1.5px;
    background-color: var(--color-heading);
    transform: translate(-50%, -50%);
    transition: transform var(--duration-base, 0.4s) var(--ease-in-out);
}

.tv-faq__icon span:last-child {
    transform: translate(-50%, -50%) rotate(90deg);
}

.tv-faq__item.is-open .tv-faq__icon span:last-child {
    transform: translate(-50%, -50%) rotate(180deg);
}

.tv-faq__a {
    padding: 0 var(--space-6) var(--space-10) calc(4em + 1em + var(--space-6));
    font-size: var(--16px-size);
    line-height: 1.6;
    color: var(--color-heading);
    opacity: 0.85;
    max-width: 60em;
}

.tv-faq__a p {
    margin: 0 0 1em 0;
    padding: 0;
}
.tv-faq__a p:last-child { margin-bottom: 0; }

/* Listes (notamment .tv-faq__links générée par les helpers cross-link) */
.tv-faq__a ul,
.tv-faq__a ol {
    margin: 0.75em 0;
    padding-left: 1.4em;
    list-style: disc outside;
}
.tv-faq__a ul.tv-faq__links {
    columns: 2;
    column-gap: 1.5em;
    list-style: disc outside;
    padding-left: 1.2em;
    margin-top: 0.75em;
}
.tv-faq__a ul.tv-faq__links > li {
    break-inside: avoid;
    margin-bottom: 0.35em;
}
.tv-faq__a li {
    margin-bottom: 0.35em;
    line-height: 1.5;
}
.tv-faq__a li:last-child { margin-bottom: 0; }

/* Liens dans les réponses FAQ : couleur heading, soulignement subtil,
   compatibles avec l'animation char-par-char au hover (data-button-animate-chars
   injecté par c2s_animate_links_in_html). Le span enfant prend l'animation. */
.tv-faq__a a {
    color: var(--color-heading);
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 100% 1px;
    transition: opacity 0.2s ease;
    will-change: opacity;
}
.tv-faq__a a:hover {
    opacity: 0.7;
}
.tv-faq__a a > span[data-button-animate-chars] {
    display: inline;
}

/* ============================================================
   FAQ — Variante dark (uniquement hubs /creation-site-internet/
   et /seo/consultant-seo/). On override le BG en var(--color-heading)
   et on inverse les couleurs texte / borders pour rester lisible.
   Cible : main.c2s-page-creation et main.c2s-page-seo (set en PHP).
   Aucune autre page (villes, services) impactée.
   ============================================================ */
.c2s-page-creation .tv-faq,
.c2s-page-seo .tv-faq {
    background-color: var(--color-heading);
    color: var(--color-bg);
}

.c2s-page-creation .tv-faq .tv-faq__title,
.c2s-page-seo .tv-faq .tv-faq__title,
.c2s-page-creation .tv-faq .tv-faq__header,
.c2s-page-seo .tv-faq .tv-faq__header,
.c2s-page-creation .tv-faq .tv-faq__q,
.c2s-page-seo .tv-faq .tv-faq__q,
.c2s-page-creation .tv-faq .tv-faq__a,
.c2s-page-seo .tv-faq .tv-faq__a {
    color: var(--color-bg);
}

.c2s-page-creation .tv-faq .tv-faq__list,
.c2s-page-seo .tv-faq .tv-faq__list {
    border-top-color: rgba(255, 255, 255, 0.18);
}
.c2s-page-creation .tv-faq .tv-faq__item,
.c2s-page-seo .tv-faq .tv-faq__item {
    border-bottom-color: rgba(255, 255, 255, 0.18);
}

.c2s-page-creation .tv-faq .tv-faq__icon span,
.c2s-page-seo .tv-faq .tv-faq__icon span {
    background-color: var(--color-bg);
}

/* Liens dans les réponses : utilisent currentColor pour leur
   underline → blanc automatiquement. On garde l'opacity hover. */
.c2s-page-creation .tv-faq .tv-faq__a a,
.c2s-page-seo .tv-faq .tv-faq__a a {
    color: var(--color-bg);
}

/* ============================================
   Advantages — "Ce que je fais mieux que les concurrents"
   Cartes 2x2 sur fond noir, avec icône SVG par carte
   ============================================ */
.tv-advantages {
    background-color: var(--color-heading);
    color: var(--white);
    padding-top: calc(var(--col) * 2.5);
    padding-bottom: calc(var(--col) * 2.5);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.tv-advantages__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.5em;
    margin-bottom: calc(var(--col) * 1.25);
}

.tv-advantages__title {
    grid-column: 2 / span 9;
    font-size: clamp(2.75rem, 6vw, 5.5rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.025em;
    color: var(--white);
    margin: 0 0 var(--space-8);
}

.tv-advantages__intro {
    grid-column: 2 / span 7;
    font-size: var(--18px-size);
    line-height: 1.55;
    color: var(--white);
    opacity: 0.78;
    margin: 0;
}

.tv-advantages__bounds {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0;
}

.tv-advantages__list {
    grid-column: 2 / span 10;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    position: relative;
    z-index: 1;
}

.tv-advantages__item {
    position: relative;
    padding: var(--space-12) var(--space-10) var(--space-10);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-right: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    overflow: hidden;
    isolation: isolate;
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

.tv-advantages__tile {
    position: absolute;
    inset: 0;
    background-color: var(--orange);
    z-index: -1;
    pointer-events: none;
    will-change: transform;
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.tv-advantages__num {
    position: absolute;
    top: var(--space-8);
    right: var(--space-10);
    font-family: "JetBrains Mono", "SF Mono", "Menlo", monospace;
    font-size: var(--12px-size);
    letter-spacing: 0.14em;
    color: var(--orange);
    line-height: 1;
    opacity: 0.9;
    transition: color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.tv-advantages__icon {
    display: inline-flex;
    width: 56px;
    height: 56px;
    color: var(--white);
    margin-bottom: var(--space-10);
    transition: color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.tv-advantages__icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.tv-advantages__h3 {
    font-size: clamp(1.4rem, 2.2vw, 1.95rem);
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--white);
    margin: 0 0 var(--space-6);
    line-height: 1.18;
    max-width: 22ch;
    transition: color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.tv-advantages__p {
    font-size: var(--16px-size);
    line-height: 1.6;
    color: var(--white);
    opacity: 0.78;
    margin: 0;
    max-width: 38ch;
    transition: color 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hover — tile orange qui suit la souris (directional-hover.js) +
   inversion couleurs pour lisibilité maximale */
.tv-advantages__item:hover .tv-advantages__icon { color: var(--color-heading); }
.tv-advantages__item:hover .tv-advantages__h3 { color: var(--color-heading); }
.tv-advantages__item:hover .tv-advantages__p {
    color: var(--color-heading);
    opacity: 1;
}
.tv-advantages__item:hover .tv-advantages__num { color: var(--color-heading); }

@media (max-width: 991px) {
    /* Pleine largeur du container : sur mobile, le décalage `2 / span 10`
       (1 col vide gauche, 1 col vide droite) tasse le contenu et la
       border-left de la liste crée une "ligne flottante" décollée du bord
       gauche → effet "tout est décalé". On bascule sur `1 / -1`. */
    .tv-advantages__title,
    .tv-advantages__intro,
    .tv-advantages__list { grid-column: 1 / -1; }

    .tv-advantages__title {
        font-size: clamp(2rem, 8vw, 3rem);
        margin-bottom: var(--space-6);
    }

    .tv-advantages__intro {
        font-size: var(--16px-size);
    }

    /* Stack 1 col : la border-left de la liste devient un trait vertical
       isolé à gauche, sans sens visuel — on la coupe. Les borders des
       items font déjà le travail de séparation. */
    .tv-advantages__list {
        grid-template-columns: 1fr;
        border-left: none;
    }

    .tv-advantages__item {
        min-height: 0;
        padding: var(--space-8) var(--space-6);
    }
    .tv-advantages__num { top: var(--space-6); right: var(--space-6); }
    .tv-advantages__icon { margin-bottom: var(--space-6); }
    .tv-advantages__h3 { font-size: var(--display-sm); }
}

/* ============================================
   Mobile / tablet
   ============================================ */
@media (max-width: 991px) {
    .tv-hero {
        min-height: auto;
        padding-top: calc(var(--space-20) + var(--space-12));
        padding-bottom: calc(var(--col) * 1);
    }

    .tv-hero__content {
        grid-column: 2 / span 10;
        margin-bottom: var(--space-12);
        display: flex;
        flex-direction: column;
        gap: var(--space-10);
        align-self: auto;
        min-height: 0;
    }

    .tv-hero__main {
        justify-content: flex-start;
    }

    .tv-hero__media {
        grid-column: 2 / span 10;
        aspect-ratio: 5 / 4;
        max-height: 70vh;
        min-height: 0;
    }

    .tv-hero__image {
        object-position: center 25%;
    }

    .tv-hero__facts {
        gap: var(--space-6);
        margin-top: 0;
    }

    .tv-local__head,
    .tv-local__body {
        grid-column: 2 / span 10;
    }

    /* En tablet : on sort du subgrid et on repasse sur 2 colonnes simples. */
    .tv-local__stats-wrap {
        grid-template-columns: 1fr;
    }

    .tv-local__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1.5em;
    }

    .tv-local__stat:nth-child(1),
    .tv-local__stat:nth-child(2),
    .tv-local__stat:nth-child(3),
    .tv-local__stat:nth-child(4) {
        grid-column: auto;
    }


    /* ============================================
       Sections dark `.cseo-*` clonées sur `.tv-page`

       Bug : consultant-seo.css définit déjà un override @991 qui passe
       `.cseo-{tools,algo,auto}__grid` en `grid-template-columns: 1fr`
       et chaque `__col` en `grid-column: span 1`. MAIS, en haut de ce
       fichier (~ligne 50-64), on définit des overrides desktop préfixés
       `.tv-page .cseo-algo__visual-col { grid-column: 2 / span 5 }`,
       etc. Spécificité 0,2,0 vs 0,1,0 du fichier consultant-seo → la
       cascade desktop GAGNE sur l'override mobile, et le grid 2-cols
       persiste sur mobile (texte tronqué à 4ch + visuel collé à gauche).

       Fix : re-overrider avec la MÊME spécificité (`.tv-page ...`) dans
       le @media mobile. Pleine largeur + stack vertical + visuel
       au-dessus du texte (ordre cohérent avec le bloc 991 de la page
       mère consultant-seo, ligne 805 : `cseo-algo__visual-col { order: -1 }`).
       ============================================ */
    /* `minmax(0, 1fr)` (et non `1fr`) : empêche le <pre> des editors /
       terminals (white-space: pre) de pousser la largeur du col en
       min-content → débordement viewport sur mobile. Voir le même fix
       dans consultant-seo.css @991. */
    .tv-page .cseo-tools__grid,
    .tv-page .cseo-algo__grid,
    .tv-page .cseo-auto__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-12);
    }

    .tv-page .cseo-tools__editor-col,
    .tv-page .cseo-tools__content-col,
    .tv-page .cseo-algo__visual-col,
    .tv-page .cseo-algo__content-col,
    .tv-page .cseo-auto__content-col,
    .tv-page .cseo-auto__visual-col {
        grid-column: 1 / -1;
        min-width: 0;
    }

    /* Visuels en premier (cohérent UX : on voit l'animation/code avant
       de lire le texte d'explication, idem que la page mère consultant-seo). */
    .tv-page .cseo-tools__editor-col,
    .tv-page .cseo-algo__visual-col,
    .tv-page .cseo-auto__visual-col {
        order: -1;
    }

    /* `.tv-page .cseo-advantages__title` était sur `2 / span 10` aussi
       (ligne 41-43). Pleine largeur sur mobile pour cohérence avec le
       fix `.cseo-advantages__title` du fichier consultant-seo @991. */
    .tv-page .cseo-advantages__title {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .tv-faq__header {
        grid-template-columns: auto 1fr auto;
        gap: 0.75em;
    }

    .tv-faq__a {
        padding-left: var(--space-6);
    }

    .tv-local__stats {
        grid-template-columns: 1fr 1fr;
    }
}
