/**
 * Feuille de style isolée — page « Arrêt du tabac » (Tabac • Vapote •
 * Cannabis) uniquement.
 *
 * Fichier autonome, sur le même principe que assets/css/tarifs.css et
 * assets/css/offre-merci.css : le thème local diverge du main.css réellement
 * en production, donc ce fichier redéclare lui-même les variables :root et
 * les composants partagés (.shell, .section, .eyebrow, .lead, .button,
 * .text-link, .faq/.accordion, .smartagenda-embed) à l'identique du main.css
 * local, plutôt que de dépendre d'un état de production non garanti.
 *
 * Chargé uniquement sur la page /arret-du-tabac/ (voir le bloc conditionnel
 * ajouté dans templates/template-service.php), avec reset-signature-main en
 * dépendance pour charger après lui. N'affecte aucune autre page.
 */

:root {
    --forest: #17392f;
    --forest-2: #244c40;
    --sage: #7f9f8f;
    --sage-ink: #486b5c;
    --mist: #e8f0ec;
    --ivory: #f7f4ec;
    --sand: #efe9dc;
    --terracotta: #cf6435;
    --clay-ink: #984025;
    --ink: #18372f;
    --text: #334a42;
    --muted: #5f716a;
    --paper: #fdfcf9;
    --white: #ffffff;
    --line: rgba(23, 57, 47, 0.16);
    --line-strong: rgba(23, 57, 47, 0.28);
    --shell: min(1220px, calc(100% - 64px));
    --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    --font-sans: Inter, "Avenir Next", "Segoe UI", Arial, sans-serif;
    --radius: 6px;
}

.tabac-page * {
    box-sizing: border-box;
}

.tabac-page h1,
.tabac-page h2,
.tabac-page h3,
.tabac-page p,
.tabac-page blockquote {
    margin-top: 0;
}

.tabac-page h1,
.tabac-page h2,
.tabac-page h3 {
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: 0;
    overflow-wrap: break-word;
}

.tabac-page h1 {
    font-size: 4.5rem;
}

.tabac-page h2 {
    font-size: 3rem;
}

.tabac-page h3 {
    font-size: 1.5rem;
}

.tabac-page .shell {
    width: var(--shell);
    margin-inline: auto;
}

.tabac-page .narrow {
    max-width: 820px;
}

.tabac-page .section {
    padding: 104px 0;
}

.tabac-page .section--sand {
    background: var(--sand);
}

.tabac-page .center {
    text-align: center;
}

.tabac-page .eyebrow {
    margin-bottom: 20px;
    color: var(--clay-ink);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: uppercase;
}

.tabac-page .lead {
    max-width: 620px;
    font-size: 1.125rem;
    line-height: 1.7;
}

.tabac-page .button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border: 1px solid var(--forest);
    border-radius: var(--radius);
    background: var(--forest);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    text-align: center;
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.tabac-page .button:hover {
    border-color: var(--forest-2);
    background: var(--forest-2);
    color: var(--white);
    transform: translateY(-1px);
}

.tabac-page .button--light {
    border-color: var(--white);
    background: var(--white);
    color: var(--forest);
}

.tabac-page .button--light:hover {
    border-color: var(--ivory);
    background: var(--ivory);
    color: var(--forest);
}

.tabac-page .button-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 32px;
}

.tabac-page .text-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 0 7px;
    border-bottom: 1px solid currentColor;
    color: var(--forest);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
}

.tabac-page .text-link:hover {
    color: var(--clay-ink);
}

/* Section sans classe dédiée : ciblage par relation (CSS suffisant) */
.tabac-page .section:has(> .faq) {
    padding: 92px 0;
}

/* Réutilisation à l'identique du bloc FAQ / accordéon existant */
.tabac-page .faq {
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
    align-items: start;
    gap: 96px;
}

.tabac-page .accordion details {
    padding: 27px 0;
    border-top: 1px solid var(--line);
}

.tabac-page .accordion details:last-child {
    border-bottom: 1px solid var(--line);
}

.tabac-page .accordion summary {
    display: grid;
    min-height: 44px;
    grid-template-columns: minmax(0, 1fr) 32px;
    align-items: center;
    gap: 20px;
    color: var(--forest);
    font-family: var(--font-display);
    font-size: 1.3125rem;
    line-height: 1.35;
    list-style: none;
    cursor: pointer;
}

.tabac-page .accordion summary::-webkit-details-marker {
    display: none;
}

.tabac-page .accordion summary::after {
    color: var(--clay-ink);
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 400;
    text-align: center;
    content: "+";
}

.tabac-page .accordion details[open] summary::after {
    content: "−";
}

.tabac-page .accordion details p {
    max-width: 680px;
    padding-right: 52px;
    margin: 18px 0 0;
    color: var(--muted);
}

/* Bloc CTA (grand bloc vert) — identique au .cta partagé */
.tabac-page .cta {
    position: relative;
    padding: 64px;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--forest);
    color: var(--white);
}

.tabac-page .cta h2 {
    max-width: 880px;
    color: var(--white);
}

/* Widget SmartAgenda — identique à tarifs.css / offre-merci.css */
.tabac-page .smartagenda-embed {
    margin-block: 8px;
}

.tabac-page .smartagenda-embed__frame {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 520px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    background: var(--ivory);
    box-shadow: 0 24px 48px rgba(24, 55, 47, 0.32);
}

.tabac-page .smartagenda-embed__frame iframe {
    display: block;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

.tabac-page .smartagenda-embed__loading,
.tabac-page .smartagenda-embed__error {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 100%;
    margin: 0;
    padding: 24px;
    color: var(--muted);
    font-size: 0.95rem;
    text-align: center;
}

.tabac-page .smartagenda-embed__error {
    color: var(--clay-ink);
}

/* ==================================================
   Hero éditorial asymétrique — remplace le cercle + lettre
   ================================================== */
.tabac-hero {
    padding: 84px 0 64px;
    border-bottom: 1px solid var(--line);
}

.tabac-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr);
    align-items: start;
    gap: 48px;
}

.tabac-hero__content {
    max-width: 640px;
}

.tabac-hero__content .lead {
    margin-top: 24px;
}

/* Grande photographie éditoriale — présence réelle, pas une vignette.
   Aucune carte, aucune ombre, aucune bordure : juste l'image. */
.tabac-hero__visual {
    overflow: hidden;
}

.tabac-hero__image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: 50% 50%;
}

/* Réassurance repositionnée en ligne éditoriale horizontale sous la
   composition texte/photo, pour ne plus concurrencer l'image. */
.tabac-hero__reassurance {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 64px;
    margin-top: 44px;
    padding-top: 26px;
    border-top: 2px solid var(--forest);
}

.tabac-hero__reassurance-item {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin: 0;
    color: var(--ink);
    font-size: 1.125rem;
    font-weight: 700;
}

.tabac-hero__reassurance-item span {
    color: var(--clay-ink);
    font-family: var(--font-display);
    font-size: 1.75rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* ==================================================
   Pour qui
   ================================================== */
.tabac-page .tabac-audience {
    padding: 88px 0;
}

.tabac-audience__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 56px;
    align-items: start;
}

.tabac-audience__grid h2 {
    margin: 20px 0 24px;
    font-size: 2.5rem;
}

.tabac-audience__grid > div > p {
    max-width: 480px;
    color: var(--muted);
}

.tabac-intentions {
    padding: 4px 0 0;
    margin: 0;
    list-style: none;
}

/* Repères éditoriaux (courte marque terracotta), pas une liste à puces */
.tabac-intentions li {
    padding: 0 0 26px;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1.1875rem;
    line-height: 1.5;
}

.tabac-intentions li:last-child {
    padding-bottom: 0;
}

.tabac-intentions li::before {
    display: block;
    width: 32px;
    height: 2px;
    margin-bottom: 16px;
    background: var(--clay-ink);
    content: "";
}

/* ==================================================
   Déroulement
   ================================================== */
.tabac-page .tabac-journey {
    padding: 92px 0;
}

.tabac-journey__head {
    max-width: 640px;
    margin-bottom: 44px;
}

.tabac-journey__head h2 {
    margin-top: 20px;
    font-size: 2.5rem;
}

.tabac-steps {
    padding: 0;
    margin: 0;
    list-style: none;
}

.tabac-steps li {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 32px;
    padding: 32px 0;
    border-top: 1px solid var(--line);
}

.tabac-steps li:last-child {
    border-bottom: 1px solid var(--line);
}

.tabac-steps__index {
    color: var(--clay-ink);
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 400;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.tabac-steps h3 {
    margin-bottom: 10px;
    color: var(--forest);
    font-size: 1.5625rem;
}

.tabac-steps p {
    max-width: 560px;
    margin-bottom: 0;
    color: var(--muted);
}

/* ==================================================
   Méthodes — passage éditorial discret (Hypnose + EMDR), icônes déjà
   validées du projet (assets/images/methodes/), aucune carte, aucun fond.
   ================================================== */
.tabac-page .tabac-methods {
    padding: 64px 0;
}

.tabac-methods h2 {
    max-width: 560px;
    margin: 16px auto 0;
    font-size: 2.125rem;
}

.tabac-methods__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 80px;
    max-width: 760px;
    margin: 48px auto 0;
}

.tabac-methods__item {
    text-align: center;
}

/* Icônes déjà validées du projet (traits très fins, dessinées pour une
   grande taille : 1254x1254px natif). À 40-44px, le downsampling standard
   du navigateur rend un trait de quelques pixels quasi invisible (gris très
   clair) — c'est la cause exacte de leur disparition. Le même problème est
   déjà résolu ailleurs dans le thème pour ce même gabarit de taille (voir
   .hero__meta-icon img dans main.css, ~43px) via un drop-shadow à décalage
   nul : chaque passe superpose une copie pleine teinte du contour, ce qui
   épaissit et solidifie visuellement le trait sans toucher au fichier
   source. Repris ici à l'identique (empilé pour une taille encore réduite),
   à la teinte vert profond #344A3F demandée. */
.tabac-methods__icon {
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto 32px;
    opacity: 1;
    filter:
        drop-shadow(0 0 0.4px #344a3f)
        drop-shadow(0 0 0.4px #344a3f)
        drop-shadow(0 0 0.4px #344a3f);
}

.tabac-methods__item h3 {
    margin-bottom: 14px;
    color: var(--forest);
    font-size: 1.4375rem;
}

.tabac-methods__item p {
    max-width: 300px;
    margin: 0 auto;
    color: var(--text);
    font-size: 0.9375rem;
    line-height: 1.65;
}

/* ==================================================
   Bénéfices — rangée éditoriale, sans cartes
   ================================================== */
.tabac-page .tabac-benefits {
    padding: 92px 0;
}

.tabac-benefits__head {
    max-width: 640px;
    margin-bottom: 48px;
}

.tabac-benefits__head h2 {
    margin-top: 20px;
    font-size: 2.5rem;
}

.tabac-benefits__row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 2px solid var(--forest);
}

.tabac-benefits__row article {
    padding: 40px;
    border-left: 1px solid var(--line-strong);
}

.tabac-benefits__row article:first-child {
    padding-left: 0;
    border-left: 0;
}

.tabac-benefits__row article:last-child {
    padding-right: 0;
}

.tabac-benefits__index {
    display: block;
    margin-bottom: 20px;
    color: var(--clay-ink);
    font-family: var(--font-display);
    font-size: 2rem;
    font-variant-numeric: tabular-nums;
}

.tabac-benefits__row h3 {
    margin-bottom: 14px;
    color: var(--forest);
    font-size: 1.4375rem;
}

.tabac-benefits__row p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1rem;
}

/* ==================================================
   Bloc preuve / réassurance éditoriale
   ================================================== */
/* Section sans classe dédiée dans le markup existant : ciblage par relation
   plutôt que d'ajouter une classe (CSS suffisant, aucun markup modifié). */
.tabac-page .section:has(> .tabac-proof__grid) {
    padding: 92px 0;
}

/* Élargi au-delà de .narrow (820px) pour laisser respirer les 4 repères */
.tabac-proof__grid.narrow {
    max-width: 980px;
}

.tabac-proof__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px;
}

.tabac-proof__stat {
    padding-top: 24px;
    border-top: 2px solid var(--forest);
}

.tabac-proof__value {
    margin: 0 0 10px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 2.5rem;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

/* Le tarif (2e repère) doit être immédiatement visible — accent terracotta
   et taille supérieure aux trois autres valeurs. */
.tabac-proof__stat:nth-child(2) .tabac-proof__value {
    color: var(--clay-ink);
    font-size: 3.25rem;
}

.tabac-proof__label {
    margin: 0;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ==================================================
   Footer — réassertion explicite du logo (voir .offer-page ~ .site-footer
   dans main.css pour le même principe de portée par combinateur frère
   général). Le HTML et le CSS partagés (.custom-logo, .brand--footer,
   .site-footer) sont strictement identiques à ceux des autres pages ; cette
   règle ne fait que garantir sa visibilité/sa taille sans toucher aux
   colonnes, textes ou espacements globaux du footer.
   ================================================== */
.tabac-page ~ .site-footer .brand--footer .custom-logo {
    display: block;
    max-height: 48px;
    opacity: 1;
}

/* ==================================================
   CTA final — bloc vert renforcé + widget SmartAgenda intégré
   ================================================== */
.tabac-cta {
    scroll-margin-top: 96px;
}

.tabac-cta .cta {
    padding: 112px 64px 64px;
    text-align: center;
}

.tabac-cta .cta h2 {
    margin: 0 auto 24px;
    max-width: 700px;
    font-size: 3.625rem;
}

.tabac-cta .cta > p {
    max-width: 600px;
    margin: 0 auto 44px;
    font-size: 1.1875rem;
    color: rgba(253, 252, 249, 0.86);
}

.tabac-cta .button {
    min-height: 60px;
    padding: 18px 36px;
    font-size: 1rem;
}

.tabac-cta .smartagenda-embed {
    margin-top: 44px;
    margin-inline: -40px;
    text-align: left;
}

/* ==================================================
   Points de rupture — mêmes seuils que le reste du site
   ================================================== */
@media (max-width: 1040px) {
    .tabac-page .smartagenda-embed__frame {
        height: var(--smartagenda-height, 760px);
    }

    :root {
        --shell: min(960px, calc(100% - 48px));
    }

    .tabac-page h1 {
        font-size: 4rem;
    }

    .tabac-page h2 {
        font-size: 2.625rem;
    }

    .tabac-page .section {
        padding: 88px 0;
    }

    .tabac-hero__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Composition à 2 colonnes trop étroite pour ce H1 en dessous de 1040px
       (retour à la ligne prématuré) : bascule verticale, photo conservée
       grande mais plafonnée pour ne pas dominer la mise en page empilée. */
    .tabac-hero__visual {
        max-width: 480px;
        margin-inline: auto;
    }

    .tabac-audience__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Même seuil que le hero et Pour qui : au-delà, 3 colonnes se compressent
       (texte des bénéfices trop étroit dès ~900px). */
    .tabac-benefits__row {
        grid-template-columns: 1fr;
        border-top: 0;
    }

    .tabac-benefits__row article {
        padding: 24px 0;
        border-left: 0;
        border-top: 1px solid var(--line-strong);
    }

    .tabac-benefits__row article:first-child {
        padding-top: 0;
        border-top: 0;
    }

    .tabac-proof__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 24px;
    }

    .tabac-proof__stat:nth-child(2) .tabac-proof__value {
        font-size: 2.75rem;
    }
}

/* Palette tablette dédiée : le header bascule en hamburger dès 1040px
   (header-responsive-fix.css, non modifié et non concerné), mais le CONTENU
   de cette page conserve une vraie composition à 2/3 colonnes jusqu'à
   769px — seul le palier <= 768px (ci-dessous) repasse en disposition
   verticale complète. */
@media (min-width: 769px) and (max-width: 1040px) {
    /* H1 réduit spécifiquement à ce palier : à ~520-540px de colonne texte,
       la taille de 4rem (palette 1040px générale) casse la phrase en plein
       milieu d'un mot. Garde anti-coupure conservée dans tous les cas. */
    .tabac-page h1 {
        font-size: 2.75rem;
    }

    .tabac-hero h1 {
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }

    .tabac-hero__grid {
        grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr);
        gap: 40px;
    }

    .tabac-hero__visual {
        max-width: none;
        margin-inline: 0;
    }

    .tabac-benefits__row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        border-top: 2px solid var(--forest);
    }

    .tabac-benefits__row article {
        padding: 40px;
        border-top: 0;
        border-left: 1px solid var(--line-strong);
    }

    .tabac-benefits__row article:first-child {
        padding-left: 0;
        border-left: 0;
    }

    .tabac-benefits__row article:last-child {
        padding-right: 0;
    }
}

@media (max-width: 768px) {
    :root {
        --shell: calc(100% - 32px);
    }

    .tabac-page {
        font-size: 1rem;
    }

    .tabac-page h1 {
        font-size: 3.25rem;
    }

    .tabac-page h2 {
        font-size: 2.25rem;
    }

    .tabac-page h3 {
        font-size: 1.35rem;
    }

    .tabac-page .section {
        padding: 72px 0;
    }

    .tabac-hero {
        padding: 56px 0 40px;
    }

    .tabac-audience__grid h2,
    .tabac-journey__head h2,
    .tabac-benefits__head h2 {
        font-size: 2rem;
    }

    /* Coupure de mot interdite dans le H1 (leçon tirée de /tarifs/) : garde
       défensive, sans besoin de réduire davantage la taille ici (mots les
       plus longs du titre bien plus courts que sur /tarifs/). */
    .tabac-hero h1 {
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }

    .tabac-cta .cta {
        padding: 56px 32px;
    }

    .tabac-cta .smartagenda-embed {
        margin-inline: 0;
    }

    .tabac-cta .cta h2 {
        font-size: 2.625rem;
    }

    .tabac-cta .button {
        width: 100%;
    }

    .tabac-page .faq {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 599px) {
    .tabac-steps li {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 28px 0;
    }

    .tabac-steps__index {
        font-size: 2.25rem;
    }

    /* Réassurance : empilement propre plutôt qu'un retour à la ligne
       imprévisible entre 3 éléments de largeurs différentes. */
    .tabac-hero__reassurance {
        flex-direction: column;
        gap: 18px;
    }

    /* Image du hero plus présente à 390/457px (~74% de la largeur utile) :
       le plafond de 480px (palier 1040px) ne suffit pas à lui seul à cette
       largeur, la colonne s'étirant sinon à 100% du shell. Ratio et
       centrage conservés. */
    .tabac-hero__visual {
        width: 74%;
        margin-inline: auto;
    }

    /* Hypnose / EMDR restent côte à côte tant que la largeur le permet
       (voir @media 1040px pour Pour qui / Bénéfices) ; en dessous de 599px,
       les 2 colonnes de 80px de gap deviennent trop étroites pour le texte. */
    /* Vide vertical réduit d'environ 15-20% sur mobile uniquement (desktop et
       tablette non affectés, valeurs déclarées hors media query inchangées) :
       section, titre -> icône, icône -> nom, Hypnose -> EMDR. Resserré une
       seconde fois ici (gabarit commun aux pages Accompagnements) : les 3
       méthodes restaient trop éloignées verticalement sur mobile. */
    .tabac-page .tabac-methods {
        padding: 58px 0;
    }

    .tabac-methods__row {
        grid-template-columns: 1fr;
        gap: 26px;
        margin-top: 40px;
    }

    .tabac-methods__icon {
        margin-bottom: 20px;
    }

    .tabac-methods__item h3 {
        margin-bottom: 9px;
    }

    .tabac-proof__grid {
        gap: 24px 20px;
    }

    .tabac-proof__value {
        font-size: 1.625rem;
    }

    .tabac-proof__stat:nth-child(2) .tabac-proof__value {
        font-size: 2.25rem;
    }

    /* Bouton CTA final sur une seule ligne à 390px : padding horizontal et
       taille de texte légèrement réduits (largeur inchangée : width:100%
       déjà fixé au palier <=768px). Hauteur tactile confortable préservée
       via min-height, inchangé. */
    .tabac-cta .button {
        padding: 16px 20px;
        font-size: 0.875rem;
    }
}

@media (max-width: 420px) {
    :root {
        --shell: calc(100% - 24px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tabac-page * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
