/* =============================================================================
   PAGES SEO — SERVICES by BEST
   Chargé uniquement sur les pages du registre inc/seo-data/ (body.sbb-seo-page).
   Aucune nouvelle couleur ni police : variables :root et composants de style.css.
   ============================================================================= */

body.sbb-seo-page {
    --sp-ease: cubic-bezier(.16, .8, .3, 1);
    --sp-header: 124px;
    /* hauteur réelle du header collant (logo 90 px + marges) */
}

/* Ancres : arrivée sous le header collant */
body.sbb-seo-page section[id],
body.sbb-seo-page #obtenir-mon-chiffrage {
    scroll-margin-top: calc(var(--sp-header) + 16px);
}

/* -----------------------------------------------------------------------------
   Accessibilité : boutons AA (#3C6B2C = --green-700) et focus visible
   ----------------------------------------------------------------------------- */
body.sbb-seo-page .btn {
    background: var(--green-700);
    box-shadow: 0 4px 14px rgba(60, 107, 44, .3);
}

body.sbb-seo-page .btn:hover {
    background: var(--green-800);
    box-shadow: 0 10px 24px rgba(44, 74, 32, .38);
}

body.sbb-seo-page .form-submit {
    background: linear-gradient(90deg, var(--green-800), var(--green-700), var(--green-800));
}

body.sbb-seo-page .sbb-success-close {
    background: var(--green-700);
}

body.sbb-seo-page .sbb-success-close:hover {
    background: var(--green-800);
}

body.sbb-seo-page :focus-visible {
    outline: 3px solid var(--green-600);
    outline-offset: 3px;
    border-radius: 6px;
}

body.sbb-seo-page .form-card :focus-visible,
body.sbb-seo-page footer :focus-visible {
    outline-color: var(--green-400);
}

/* Focus programmatique sur le formulaire après fermeture de la popup : pas de contour global */
body.sbb-seo-page #obtenir-mon-chiffrage:focus {
    outline: none;
}

/* Le champ entier porte déjà l'anneau de focus (.field:focus-within) */
body.sbb-seo-page .field input:focus-visible,
body.sbb-seo-page .field textarea:focus-visible {
    outline: none;
}

/* Popup de confirmation : titre en <p> sur ces pages (pas de titre parasite) */
body.sbb-seo-page .sbb-success-modal .sbb-success-title {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.01em;
    color: var(--text);
}

/* -----------------------------------------------------------------------------
   Texte courant et liens de contenu
   ----------------------------------------------------------------------------- */
.sp-prose a {
    color: var(--green-700);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color .2s ease, text-decoration-color .2s ease, text-decoration-thickness .2s ease;
}

.sp-prose a:hover {
    color: var(--green-800);
    text-decoration-thickness: 2px;
}

/* Lien en attente de publication de sa page cible (visible seulement par les éditeurs connectés) */
.sp-link-pending {
    text-decoration: underline dotted rgba(107, 111, 99, .7);
    text-underline-offset: 3px;
    cursor: help;
}

/* -----------------------------------------------------------------------------
   Rythme des sections
   ----------------------------------------------------------------------------- */
.sp-page .sp-section {
    padding-top: clamp(56px, 7vw, 96px);
    padding-bottom: clamp(56px, 7vw, 96px);
}

.sp-band {
    background: var(--cream-2);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.sp-page .sp-sec-head {
    max-width: 780px;
    margin-bottom: clamp(28px, 4vw, 46px);
}

.sp-page .sp-sec-head h2 {
    font-size: clamp(26px, 2.5vw, 34px);
    line-height: 1.14;
    margin-bottom: 0;
}

.sp-page .sp-sec-head .lead {
    max-width: 720px;
    margin: 16px 0 0;
    font-size: 16.5px;
    line-height: 1.75;
}

/* =============================================================================
   HERO IMMERSIF — composant commun des pages prestations
   La photo sert de fond sur tous les écrans ; fil d'Ariane, H1, introduction et CTA sont superposés.
   Direction lumineuse, reprise du hero de l'accueil : fond crème, photo naturelle (sans voile noir),
   fondu progressif crème → photo, texte anthracite, accent vert.
   Ordinateur : photo à droite fondue vers la zone de lecture.
   Tablette / mobile (≤ 900 px) : photo plein cadre sous un voile crème translucide.
   Par page : image, cadrage (position / position_sm), textes, variante d'animation (voir hero.php).
   ============================================================================= */
.sp-hero {
    position: relative;
    display: flex;
    align-items: flex-start;
    /* contenu aligné en haut : même position du fil d'Ariane sur toutes les pages */
    min-height: clamp(660px, 50vw, 740px);
    padding: clamp(48px, 5vw, 80px) 8vw clamp(48px, 5vw, 80px);
    overflow: hidden;
    isolation: isolate;
    background: var(--cream);
    color: var(--ink);
}

/* Zone de lecture : voile crème progressif à gauche (comme l'accueil), pan vert très pâle à droite, fondu crème haut et bas */
.sp-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(90deg, var(--cream) 0%, var(--cream) 24%, rgba(246, 245, 239, .86) 36%, rgba(246, 245, 239, .5) 46%, rgba(246, 245, 239, .16) 54%, rgba(246, 245, 239, 0) 62%),
        radial-gradient(60% 80% at 0% 100%, rgba(223, 236, 214, .7), rgba(223, 236, 214, 0) 65%),
        linear-gradient(180deg, rgba(246, 245, 239, .55) 0%, rgba(246, 245, 239, 0) 20%, rgba(246, 245, 239, 0) 80%, rgba(246, 245, 239, .6) 100%);
}

.sp-hero__visual {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    width: 66%;
    /* la photo démarre à 34 % : le sujet reste à droite de la zone de lecture (≤ 52 %) */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .5) 12%, #000 24%);
    mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .5) 12%, #000 24%);
}

.sp-hero__text {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: min(620px, 52%);
    min-width: 0;
}

/* Fil d'Ariane — le thème masque tout <nav> sous 900 px (menu principal) : on le réaffiche */
.sp-page .sp-breadcrumb {
    display: block;
    position: static;
}

.sp-breadcrumb ol {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0 0 22px;
    padding: 0 18px;
    list-style: none;
    background: rgba(255, 255, 255, .78);
    border: 1px solid var(--line);
    border-radius: 100px;
    box-shadow: 0 6px 16px -10px rgba(20, 22, 15, .25);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.sp-breadcrumb li {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.sp-breadcrumb li+li::before {
    content: "›";
    content: "›" / "";
    margin: 0 10px;
    color: var(--green-500);
    font-weight: 800;
}

.sp-breadcrumb a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--green-700);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
    transition: text-decoration-color .2s ease, color .2s ease;
}

.sp-breadcrumb a:hover {
    color: var(--green-800);
    text-decoration-color: currentColor;
}

/* H1 manuscrit, cohérent avec l'accueil (Courgette via .handwritten-test) ; lignes équilibrées */
.sp-page .sp-hero__title {
    max-width: 15.5em;
    margin: 0 0 24px;
    font-size: clamp(34px, 3.5vw, 50px);
    line-height: 1.16;
    letter-spacing: 0;
    color: var(--ink);
}

.sp-hero__line {
    display: block;
    text-wrap: balance;
}

/* Première ligne du H1 jamais coupée (tablette et ordinateur) ; sur mobile elle peut passer à la ligne */
@media (min-width: 701px) {
    .sp-hero__line:first-child {
        white-space: nowrap;
    }
}

.sp-hero__line--accent {
    color: var(--green-700);
    font-weight: 600;
}

.sp-page .sp-hero__lead {
    max-width: 560px;
    margin: 0 0 32px;
    font-size: 17.5px;
    line-height: 1.75;
    color: rgba(27, 29, 24, .86);
}

.sp-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
}

.sp-page .sp-btn {
    min-height: 52px;
    padding: 15px 26px;
    font-size: 15px;
}

.sp-hero .sp-btn {
    box-shadow: 0 14px 28px -14px rgba(60, 107, 44, .55);
}

/* -----------------------------------------------------------------------------
   Photo + animation d'entrée (signature de chaque métier : raclette / voile de poussière)
   Uniquement transform / opacity. L'image n'est jamais masquée (LCP préservé).
   État naturel des calques = invisibles ; seule l'animation les rend visibles.
   ----------------------------------------------------------------------------- */
.sp-pane {
    position: absolute;
    inset: 0;
    margin: 0;
    overflow: hidden;
    isolation: isolate;
    background: var(--ink-2);
}

.sp-pane__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    animation: sp-settle 2.4s var(--sp-ease) .1s both;
}

/* Repère tourné de 25° : bord des calques à 115°, comme .hero-bg-shape */
/* Voile à points blancs de l'entrée : supprimé à la demande (aucune animation de voile au rechargement) */
.sp-pane__wipe {
    display: none;
    position: absolute;
    inset: -60%;
    z-index: 2;
    transform: rotate(25deg);
    pointer-events: none;
}

/* Buée : voile crème légèrement perlé ; la lame est son bord gauche */
.sp-pane__sheet {
    position: absolute;
    inset: 0;
    visibility: hidden;
    transform: translate3d(82%, 0, 0);
    background:
        radial-gradient(circle at 30% 35%, rgba(255, 255, 255, .6) 0 1.1px, transparent 1.8px) 0 0 / 13px 17px,
        radial-gradient(circle at 70% 65%, rgba(255, 255, 255, .45) 0 1.5px, transparent 2.2px) 0 0 / 23px 29px,
        rgba(246, 245, 239, .74);
    animation: sp-wipe 1.15s var(--sp-ease) .35s backwards;
}

/* Lame en caoutchouc (vert de la charte) */
.sp-pane__sheet::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -4px;
    width: 8px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .95) 0 1.5px, var(--green-400) 1.5px, var(--green-600) 65%, var(--green-800));
    box-shadow:
        -12px 0 22px -6px rgba(255, 255, 255, .7),
        4px 0 10px rgba(16, 18, 12, .2);
}

/* Bourrelet d'eau poussé par la lame */
.sp-pane__sheet::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 4px;
    width: 34px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
}

/* Reflet unique après le passage */
.sp-pane__glint {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 12%;
    opacity: 0;
    transform: translate3d(150%, 0, 0);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
    animation: sp-glint .95s cubic-bezier(.4, 0, .2, 1) 1.35s backwards;
}

@keyframes sp-wipe {
    from {
        visibility: visible;
        transform: translate3d(18%, 0, 0);
    }

    to {
        visibility: visible;
        transform: translate3d(82%, 0, 0);
    }
}

@keyframes sp-glint {
    0% {
        opacity: 0;
        transform: translate3d(150%, 0, 0);
    }

    30% {
        opacity: .65;
    }

    100% {
        opacity: 0;
        transform: translate3d(680%, 0, 0);
    }
}

@keyframes sp-settle {
    from {
        transform: scale(1.045);
    }

    to {
        transform: scale(1);
    }
}

/* -----------------------------------------------------------------------------
   Carte vitrée facultative (option 'glass' d'une page) : ordinateur = coin inférieur droit de la photo,
   tablette / mobile = sous le bouton, dans le flux.
   ----------------------------------------------------------------------------- */
.sp-glass {
    position: absolute;
    right: 8vw;
    bottom: clamp(24px, 3vw, 40px);
    z-index: 3;
    width: min(368px, 34vw);
    padding: 15px 20px 14px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 20px;
    background: rgba(246, 245, 239, .86);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    box-shadow: 0 24px 44px -22px rgba(20, 22, 15, .5), 0 2px 6px rgba(20, 22, 15, .06);
    animation: sp-glass-in .7s var(--sp-ease) 1.3s backwards;
}

.sp-glass__title {
    margin: 0 0 8px;
    font-size: 15.5px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.01em;
    color: var(--text);
}

.sp-glass__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sp-glass__list li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text);
}

.sp-glass__list svg {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    stroke: var(--green-700);
    stroke-width: 2.6;
}

@keyframes sp-glass-in {
    from {
        opacity: 0;
        transform: translate3d(0, 12px, 0);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ---- Hero : largeurs intermédiaires ---- */
@media (max-width: 1180px) {
    .sp-glass {
        width: auto;
        max-width: min(380px, 40vw);
        padding: 12px 16px;
    }

    .sp-glass__title {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .sp-glass__list {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 14px;
    }

    .sp-glass__list li {
        font-size: 13px;
        gap: 6px;
    }
}

/* ---- Hero : tablette et mobile — photo plein cadre sous un voile crème translucide ---- */
@media (max-width: 900px) {
    .sp-hero {
        flex-direction: column;
        align-items: stretch;
        min-height: clamp(560px, 80svh, 780px);
        padding: 24px 6vw 40px;
    }

    .sp-hero__visual {
        left: 0;
        width: auto;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .sp-pane__img {
        object-position: var(--sp-pos-sm, 50% 50%) !important;
        /* cadrage mobile propre à chaque photo */
    }

    /* voile crème : dense sous le titre et en pied (texte), plus léger au milieu (photo visible), pointe de vert pâle */
    .sp-hero::before {
        background:
            radial-gradient(120% 50% at 100% 0%, rgba(223, 236, 214, .55), rgba(223, 236, 214, 0) 62%),
            linear-gradient(180deg, rgba(246, 245, 239, .92) 0%, rgba(246, 245, 239, .86) 24%, rgba(246, 245, 239, .78) 38%, rgba(246, 245, 239, .3) 52%, rgba(246, 245, 239, .22) 62%, rgba(246, 245, 239, .62) 80%, rgba(246, 245, 239, .9) 100%);
    }

    .sp-hero__text {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        max-width: none;
    }

    .sp-page .sp-hero__lead {
        max-width: none;
        margin: auto 0 28px;
        padding: 16px 16px;
        /* voile crème localisé derrière le paragraphe (contraste sur toute photo) */
        background: rgba(246, 245, 239, .68);
        border-radius: 16px;
    }

    .sp-glass {
        position: relative;
        right: auto;
        bottom: auto;
        z-index: 2;
        width: auto;
        max-width: none;
        margin: 4px 0 0;
        padding: 15px 20px 14px;
        background: rgba(246, 245, 239, .92);
    }

    .sp-glass__list {
        display: grid;
        gap: 6px 16px;
    }

    .sp-glass__list li {
        font-size: 14px;
    }
}

@media (max-width: 700px) {
    .sp-page .sp-hero__title {
        font-size: clamp(30px, 8.4vw, 38px);
        text-shadow: 0 0 14px rgba(246, 245, 239, .95), 0 0 4px rgba(246, 245, 239, .8);
        /* halo crème : lisibilité sur photo */
    }

    .sp-page .sp-hero__lead {
        font-size: 16.5px;
    }
}

@media (max-width: 620px) {
    .sp-pane__sheet {
        animation-duration: .95s;
    }

    .sp-page .sp-btn {
        width: 100%;
        justify-content: center;
    }

    .sp-glass__list li {
        font-size: 13.5px;
    }
}

@media (max-width: 360px) {

    /* très petit écran : le fil d'Ariane reste sur une seule ligne */
    .sp-breadcrumb ol {
        padding: 0 12px;
        font-size: 11.5px;
    }

    .sp-breadcrumb li+li::before {
        margin: 0 6px;
    }
}

/* =============================================================================
   CARTES (photo + H3)
   ============================================================================= */
.comp-grid.sp-grid-2,
.commit.sp-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(20px, 2.4vw, 32px);
    margin-bottom: 0;
}

.sp-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 26px;
    box-shadow: 0 24px 50px -40px rgba(20, 22, 15, .3);
}

.sp-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--green-500), var(--green-700));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .45s var(--sp-ease);
}

.sp-card:hover::after {
    transform: scaleX(1);
}

.sp-card .comp-icon {
    left: 18px;
    bottom: 18px;
    width: 52px;
    height: 52px;
}

.sp-card .comp-icon svg {
    width: 22px;
    height: 22px;
}

.sp-card__body {
    padding: 26px 30px 32px;
}

.sp-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.3;
}

.sp-card p {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--muted);
}

/* =============================================================================
   PONCTUEL / RÉGULIER
   ============================================================================= */
.sp-duo-card {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 3vw, 42px);
}

.sp-duo-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--green-500), var(--green-700));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .45s var(--sp-ease);
}

.sp-duo-card:hover::before {
    transform: scaleX(1);
}

.sp-duo-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.3;
}

.sp-duo-card p {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--muted);
}

/* =============================================================================
   ÉTAPES (liste ordonnée sur la « vigne » de l'accueil)
   ============================================================================= */
.sp-steps-wrap {
    position: relative;
}

.sp-steps__vine {
    position: absolute;
    top: 6px;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 0;
}

.sp-steps {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(18px, 2.6vw, 40px);
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: sp-step;
}

.sp-steps__item {
    position: relative;
    counter-increment: sp-step;
}

.sp-steps__item:nth-child(even) {
    margin-top: 44px;
}

.sp-steps__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 18px;
    border: 2px solid var(--green-500);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 10px 22px -12px rgba(60, 107, 44, .4);
    transition: transform .35s var(--sp-ease), background-color .3s ease, border-color .3s ease;
}

.sp-steps__icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--green-700);
    transition: stroke .3s ease;
}

.sp-steps__item:hover .sp-steps__icon {
    transform: translateY(-3px);
    background: var(--green-700);
    border-color: var(--green-700);
}

.sp-steps__item:hover .sp-steps__icon svg {
    stroke: #fff;
}

.sp-steps__item p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--muted);
}

.sp-steps__item p::before {
    content: "0" counter(sp-step);
    content: "0" counter(sp-step) / "";
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-style: italic;
    font-weight: 600;
    color: var(--green-700);
}

.sp-steps__item strong {
    font-weight: 700;
    color: var(--text);
}

/* =============================================================================
   ZONE D'INTERVENTION — carte géographique réelle (Leaflet + OpenStreetMap)
   ============================================================================= */
.sp-livemap {
    margin: 0;
}

.sp-livemap__canvas {
    position: relative;
    z-index: 0;
    /* confine les z-index internes de Leaflet sous le header collant */
    height: clamp(380px, 38vw, 520px);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        radial-gradient(circle at 30% 40%, rgba(143, 194, 110, .12), transparent 55%),
        #efede4;
    box-shadow: 0 25px 60px -40px rgba(20, 22, 15, .32), 0 8px 24px -18px rgba(20, 22, 15, .16);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Tuiles adoucies dans les tons crème de la charte */
.sp-livemap__canvas .leaflet-tile-pane {
    filter: grayscale(.6) sepia(.18) saturate(.9) brightness(1.03) contrast(.94);
}

.sp-livemap__canvas.leaflet-container {
    background: #efede4;
}

.sp-livemap__canvas .leaflet-control-zoom {
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 24px -14px rgba(20, 22, 15, .45);
}

.sp-livemap__canvas .leaflet-control-zoom a {
    width: 44px;
    height: 44px;
    line-height: 44px;
    color: var(--green-800);
    font-size: 20px;
}

.sp-livemap__canvas .leaflet-control-zoom a:hover {
    background: var(--green-100);
}

.sp-livemap__canvas .leaflet-control-attribution {
    padding: 2px 8px;
    border-top-left-radius: 8px;
    background: rgba(246, 245, 239, .88);
    font-size: 11px;
    color: var(--muted);
}

.sp-livemap__canvas .leaflet-control-attribution a {
    color: var(--green-700);
}

/* Marqueurs (divIcon) : point ancré exactement sur la commune, libellé à droite */
.sp-mk-wrap {
    background: none;
    border: 0;
}

.sp-mk {
    position: absolute;
    left: 0;
    top: 0;
    display: block;
}

.sp-mk--city .sp-mk__label {
    left: 0;
    top: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 11px 3px 8px;
    transform: translate(-50%, -50%);
}

.sp-mk__dot {
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--green-700);
    box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgba(60, 107, 44, .35);
}

.sp-mk__label {
    position: absolute;
    left: 14px;
    top: -13px;
    padding: 2px 9px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 6px 14px -8px rgba(20, 22, 15, .45);
    font-family: 'Fraunces', 'Inter', serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    white-space: nowrap;
    color: var(--text);
}

.sp-mk--hq .sp-mk__leaf {
    position: absolute;
    left: -20px;
    top: -20px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50% 50% 50% 8px;
    background: linear-gradient(150deg, var(--green-500), var(--green-700));
    transform: rotate(-8deg);
    box-shadow: 0 0 0 7px rgba(229, 240, 218, .85), 0 12px 24px -8px rgba(44, 74, 32, .6);
}

.sp-mk--hq .sp-mk__leaf svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    transform: rotate(8deg);
}

/* Étiquette et badge du siège à gauche : Aix-en-Provence est sur la même latitude, à l'est */
.sp-mk--hq .sp-mk__label {
    left: auto;
    right: 32px;
    top: -15px;
    font-size: 19px;
    font-weight: 700;
}

.sp-mk__pill {
    position: absolute;
    right: 32px;
    top: -44px;
    padding: 3px 10px;
    border-radius: 100px;
    background: var(--green-700);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.4;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Texte validé, placé discrètement sous la carte */
.sp-livemap__caption {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    max-width: 900px;
    margin: 22px 0 0;
}

.sp-livemap__pin {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--green-100);
}

.sp-livemap__pin svg {
    width: 18px;
    height: 18px;
    stroke: var(--green-700);
}

.sp-livemap__caption p {
    margin: 0;
    font-size: 15px;
    line-height: 1.75;
    color: var(--muted);
}

/* =============================================================================
   FAQ
   ============================================================================= */
.sp-faq__layout {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: clamp(28px, 4vw, 64px);
    align-items: start;
}

.sp-faq__head {
    position: sticky;
    top: calc(var(--sp-header) + 24px);
}

.sp-faq__card {
    padding: clamp(14px, 2vw, 24px) clamp(22px, 3vw, 40px);
}

.sp-faq__q {
    margin: 0;
    font: inherit;
    letter-spacing: normal;
}

.sp-faq .faq-q {
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 16px;
    min-height: 60px;
    padding: 16px 0;
    border-radius: 8px;
}

.sp-faq .faq-question-text {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    transition: color .2s ease;
}

.sp-faq .faq-q:hover .faq-question-text {
    color: var(--green-700);
}

.sp-faq .faq-plus {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--green-100);
    color: var(--green-700);
    transition: background-color .25s ease, color .25s ease;
}

.sp-faq .faq-plus svg {
    width: 18px;
    height: 18px;
}

.sp-faq .faq-item.open .faq-plus {
    background: var(--green-700);
    color: #fff;
}

.sp-faq .faq-item.open .faq-a {
    padding-bottom: 20px;
}

.sp-faq .faq-a-inner p {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--muted);
}

/* Réponse fermée : retirée de la lecture et du clavier (le texte reste dans le DOM) */
.sp-faq .faq-item:not(.open) .faq-a-inner {
    visibility: hidden;
    transition: visibility 0s linear .35s;
}

.sp-faq .faq-item.open .faq-a-inner {
    visibility: visible;
}

/* =============================================================================
   CHIFFRAGE — une seule composition : photo VIT-04 + intro à gauche, formulaire à droite
   ============================================================================= */
.sp-cta__shell {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(145deg, #19201d, #111512 60%, #171d1b);
    box-shadow: 0 30px 70px -42px rgba(0, 0, 0, .55), 0 15px 35px -25px rgba(0, 0, 0, .38);
}

.sp-cta__visual {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 100%;
    padding: clamp(32px, 3.6vw, 52px);
    color: #fff;
}

.sp-cta__img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-cta__visual::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(12, 18, 14, .92) 0%, rgba(12, 18, 14, .74) 40%, rgba(12, 18, 14, .16) 72%, rgba(12, 18, 14, .45) 100%);
}

.sp-page .sp-cta__visual .sp-sec-head {
    max-width: 480px;
    margin: 0;
}

.sp-page .sp-cta__visual .sp-sec-head h2 {
    color: #fff;
    font-size: clamp(24px, 2.3vw, 32px);
}

.sp-page .sp-cta__visual .sp-sec-head .lead {
    color: rgba(255, 255, 255, .86);
    font-size: 16px;
}

/* Le formulaire devient le panneau droit (mêmes champs, même fonctionnement) */
.sp-cta .sp-cta__form {
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, .08);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.sp-cta .sp-cta__form .form-hero {
    min-height: 0;
    padding: clamp(28px, 3vw, 40px) 40px 4px;
}

.sp-cta .sp-cta__form .form-hero::before {
    display: none;
}

.sp-cta .sp-cta__form .form-body {
    padding-top: 26px;
    border-top: 0;
}

.sp-page .form-hero .form-hero-title {
    margin: 0;
    font-size: clamp(24px, 2.2vw, 30px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.01em;
    color: #fff;
}

.sp-page .form-hero .form-hero-title+p {
    margin-top: 10px;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width: 1100px) {
    .sp-faq__layout {
        grid-template-columns: 1fr;
    }

    .sp-faq__head {
        position: static;
    }

    .sp-faq .sp-sec-head {
        margin-bottom: 8px;
    }
}

@media (max-width: 1180px) {

    .sp-cta .sp-cta__form .form-hero,
    .sp-cta .sp-cta__form .form-body {
        padding-left: 30px;
        padding-right: 30px;
    }
}

@media (max-width: 920px) {
    .sp-cta__shell {
        grid-template-columns: 1fr;
    }

    .sp-cta__visual {
        min-height: 320px;
    }

    /* Panneau bas et large : le texte couvre toute la photo, voile renforcé pour la lisibilité */
    .sp-cta__visual::before {
        background: linear-gradient(180deg, rgba(12, 18, 14, .9) 0%, rgba(12, 18, 14, .82) 55%, rgba(12, 18, 14, .62) 100%);
    }

    .sp-cta__img {
        object-position: 92% 50% !important;
        /* remplace le cadrage en ligne du grand écran */
    }

    .sp-cta .sp-cta__form {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, .08);
    }

    .sp-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 34px;
    }

    .sp-steps__vine {
        display: none;
    }

    .sp-steps__item:nth-child(even) {
        margin-top: 0;
    }
}

@media (max-width: 700px) {

    .comp-grid.sp-grid-2,
    .commit.sp-grid-2 {
        grid-template-columns: 1fr;
    }

    .sp-page .sp-sec-head h2,
    .sp-page .contact-sec-head h2 {
        font-size: clamp(22px, 6.2vw, 28px);
        line-height: 1.18;
        -webkit-hyphens: auto;
        hyphens: auto;
        overflow-wrap: break-word;
    }

    .sp-card__body {
        padding: 22px 22px 26px;
    }

    .sp-faq .faq-question-text {
        font-size: 15px;
    }
}

@media (max-width: 620px) {
    .sp-cta__shell {
        border-radius: 22px;
    }

    .sp-cta__visual {
        min-height: 300px;
        padding: 28px 22px;
    }

    .sp-cta .sp-cta__form .form-hero,
    .sp-cta .sp-cta__form .form-body {
        padding-left: 22px;
        padding-right: 22px;
    }

    .sp-steps {
        grid-template-columns: 1fr;
        row-gap: 26px;
    }

    .sp-steps__item {
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr);
        column-gap: 16px;
        align-items: start;
    }

    .sp-steps__icon {
        margin-bottom: 0;
    }

    .sp-steps__item:not(:last-child)::after {
        content: "";
        position: absolute;
        left: 25px;
        top: 60px;
        bottom: -20px;
        border-left: 2px dotted var(--green-400);
    }

    .sp-livemap__canvas {
        height: 400px;
        border-radius: 20px;
    }

    .sp-mk__label {
        font-size: 13.5px;
    }

    .sp-mk--hq .sp-mk__label {
        font-size: 16px;
        top: -14px;
    }

    .sp-mk--hq .sp-mk__pill {
        top: -42px;
    }
}

/* =============================================================================
   RÉDUCTION DES ANIMATIONS
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
    .sp-pane__wipe {
        display: none;
    }

    .sp-pane__img,
    .sp-glass {
        animation: none;
    }

    .sp-card::after,
    .sp-duo-card::before,
    .sp-steps__icon,
    .sp-steps__icon svg,
    .sp-faq .faq-plus,
    .sp-prose a {
        transition: none;
    }

    .sp-steps__item:hover .sp-steps__icon {
        transform: none;
    }

    .sp-faq .faq-item:not(.open) .faq-a-inner {
        transition: none;
    }
}

/* =============================================================================
   SECTIONS IMAGE + TEXTE (.sp-split) ET VARIANTE D'ANIMATION DU HERO — pages prestations
   Réutilisent les composants de la page Vitrerie (mêmes rayons, ombres, easing, verts).
   ============================================================================= */

/* ---- Hero : animation d'entrée « voile de poussière » (option variant = dust) ---- */
.sp-pane--dust .sp-pane__wipe {
    inset: 0;
    transform: none;
}

.sp-pane--dust .sp-pane__sheet {
    transform: none;
    animation: sp-dust 1.7s ease-out .3s backwards;
}

.sp-pane--dust .sp-pane__sheet::before,
.sp-pane--dust .sp-pane__sheet::after {
    display: none;
}

.sp-pane--dust .sp-pane__glint {
    width: 14%;
    animation: sp-glint-dust 1.1s cubic-bezier(.4, 0, .2, 1) 1.2s backwards;
}

@keyframes sp-dust {
    from {
        visibility: visible;
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }

    to {
        visibility: visible;
        opacity: 0;
        transform: translate3d(0, -2.5%, 0);
    }
}

@keyframes sp-glint-dust {
    0% {
        opacity: 0;
        transform: translate3d(-100%, 0, 0);
    }

    30% {
        opacity: .6;
    }

    100% {
        opacity: 0;
        transform: translate3d(720%, 0, 0);
    }
}

/* ---- Section image + texte ---- */
.sp-split__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: clamp(32px, 5vw, 84px);
    align-items: center;
}

.sp-split--reverse .sp-split__media {
    order: 2;
}

.sp-split__media {
    position: relative;
    margin: 0;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    isolation: isolate;
    border-radius: 28px;
    background: var(--cream-2);
    box-shadow:
        0 44px 80px -50px rgba(20, 22, 15, .5),
        0 18px 40px -30px rgba(20, 22, 15, .3);
}

.sp-split__media img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s var(--sp-ease);
}

.sp-split__media:hover img {
    transform: scale(1.04);
}

.sp-split__media::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(115deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 34%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5), inset 0 1px 0 rgba(255, 255, 255, .85);
}

.sp-split__media .comp-icon.sp-split__icon {
    left: 18px;
    bottom: 18px;
    z-index: 2;
    width: 52px;
    height: 52px;
}

.sp-split__media .comp-icon svg {
    width: 22px;
    height: 22px;
}

.sp-split__body {
    min-width: 0;
}

.sp-page .sp-split__body .sp-sec-head {
    margin-bottom: clamp(18px, 2.4vw, 26px);
}

.sp-split__text p {
    margin: 0 0 16px;
    font-size: 16.5px;
    line-height: 1.8;
    color: var(--muted);
}

.sp-split__text p:last-child {
    margin-bottom: 0;
}

.sp-split__items {
    display: grid;
    gap: 16px;
}

.sp-split__item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 22px 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 20px 40px -34px rgba(20, 22, 15, .3);
    transition: opacity .6s ease, transform .35s var(--sp-ease), box-shadow .35s ease, border-color .25s ease;
}

.sp-split__item:hover {
    transform: translateY(-3px);
    border-color: rgba(82, 140, 57, .45);
    box-shadow: 0 26px 44px -30px rgba(60, 107, 44, .32);
}

.sp-split__item .leaf-badge {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    margin: 0;
}

.sp-split__item h3 {
    margin: 2px 0 8px;
    font-size: 19px;
    line-height: 1.3;
}

.sp-split__item p {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--muted);
}

@media (max-width: 900px) {
    .sp-split__layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    /* mobile / tablette : le texte d'abord, la photo en dessous (même pour les sections inversées) */
    .sp-split__body,
    .sp-split--reverse .sp-split__body {
        order: 1;
    }

    .sp-split__media,
    .sp-split--reverse .sp-split__media {
        order: 2;
    }

    .sp-split__media {
        aspect-ratio: 16 / 10;
        border-radius: 24px;
    }
}

@media (max-width: 620px) {
    .sp-split__media {
        aspect-ratio: 3 / 2;
        border-radius: 22px;
    }

    .sp-split__media .comp-icon.sp-split__icon {
        left: 14px;
        bottom: 14px;
        width: 46px;
        height: 46px;
    }

    .sp-split__item {
        gap: 14px;
        padding: 18px;
    }

    .sp-split__item .leaf-badge {
        flex-basis: 46px;
        width: 46px;
        height: 46px;
    }

    .sp-split__text p {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .sp-split__media img,
    .sp-split__item {
        transition: none;
    }

    .sp-split__media:hover img,
    .sp-split__item:hover {
        transform: none;
    }
}

@media (max-width: 620px) {

    /* Cartes H3 : badge au-dessus du texte pour garder toute la largeur de lecture */
    .sp-split__item {
        flex-direction: column;
        gap: 12px;
    }
}

/* =============================================================================
   CARTES — variante à 3 colonnes (Remise en état : trois situations, chacune avec sa photographie)
   Ordinateur : 3 colonnes. Tablette (701-1024 px) : 2 colonnes, la 3e carte en bandeau horizontal pleine largeur.
   Mobile (<= 700 px) : une colonne. Les pages à 2 cartes (sp-grid-2) ne sont pas concernées.
   ============================================================================= */
.comp-grid.sp-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(18px, 2vw, 28px);
    margin-bottom: 0;
}

/* Ordinateur : colonnes légèrement modulées selon la longueur des textes (moins de blanc sous les plus courts),
   hauteur de photo identique pour que titres et textes restent alignés. */
@media (min-width: 1025px) {
    .comp-grid.sp-grid-3 {
        grid-template-columns: var(--sp-cols-xl, minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1.2fr));
    }

    .comp-grid.sp-grid-3 .comp-photo {
        aspect-ratio: auto;
        height: clamp(210px, 18vw, 260px);
    }

    .comp-grid.sp-grid-3 .sp-card__body {
        padding: 24px 28px 28px;
    }
}

@media (min-width: 1025px) and (max-width: 1279px) {
    .comp-grid.sp-grid-3 {
        grid-template-columns: var(--sp-cols-lg, minmax(0, .94fr) minmax(0, 1fr) minmax(0, 1.16fr));
    }
}

@media (max-width: 1024px) {
    .comp-grid.sp-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .comp-grid.sp-grid-3 .sp-card:nth-child(3):last-child {
        grid-column: 1 / -1;
        flex-direction: row;
    }

    .comp-grid.sp-grid-3 .sp-card:nth-child(3):last-child .comp-photo {
        flex: 0 0 46%;
        aspect-ratio: auto;
        min-height: 260px;
    }

    .comp-grid.sp-grid-3 .sp-card:nth-child(3):last-child .comp-photo img {
        position: absolute;
        inset: 0;
    }

    .comp-grid.sp-grid-3 .sp-card:nth-child(3):last-child .sp-card__body {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        justify-content: center;
    }
}

@media (max-width: 700px) {
    .comp-grid.sp-grid-3 {
        grid-template-columns: 1fr;
    }

    .comp-grid.sp-grid-3 .sp-card:nth-child(3):last-child {
        flex-direction: column;
    }

    .comp-grid.sp-grid-3 .sp-card:nth-child(3):last-child .comp-photo {
        flex: none;
        aspect-ratio: 3 / 2;
        min-height: 0;
    }
}

/* =============================================================================
   SECTION IMAGE + TEXTE sans photographie (sp-split--solo) : bloc sobre, titre à gauche et texte à droite
   ============================================================================= */
.sp-split--solo .sp-split__layout {
    display: block;
}

.sp-split--solo .sp-split__body {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: clamp(24px, 4vw, 64px);
    align-items: center;
    padding: clamp(28px, 3.4vw, 48px) clamp(24px, 3.6vw, 52px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: 0 24px 50px -40px rgba(20, 22, 15, .3);
}

.sp-split--solo .sp-split__text p {
    font-size: 17px;
    line-height: 1.8;
}

@media (max-width: 900px) {
    .sp-split--solo .sp-split__body {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

/* Section image + texte : lorsque des paragraphes précèdent des cartes (items), on garde un espace régulier entre les deux */
.sp-split__text+.sp-split__items {
    margin-top: 22px;
}

/* Nettoyage de vehicules : image de flotte sur toute la hauteur de la colonne texte.
   Haut et bas alignes avec le contenu gauche, sans effet sur les autres pages. */
@media (min-width: 901px) {
    body.sbb-seo-page #societe-flottes .sp-split__layout {
        align-items: stretch;
    }

    body.sbb-seo-page #societe-flottes .sp-split__media {
        align-self: stretch;
        height: auto;
        min-height: 0;
        aspect-ratio: auto;
    }

    body.sbb-seo-page #societe-flottes .sp-split__media img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}
/* =============================================================================
   SECTION IMAGE + TEXTE alignée haut/bas (option 'align' => 'stretch', ordinateur uniquement)
   Le haut de la photo s'aligne sur le haut du contenu (titre compris), son bas sur le bas du dernier bloc ;
   la hauteur de la photo suit celle du contenu (object-fit: cover).
   ============================================================================= */
@media (min-width: 901px) {
    .sp-split--stretch .sp-split__layout {
        align-items: stretch;
    }
    .sp-split--stretch .sp-split__media {
        aspect-ratio: auto;
        height: auto;
    }
    .sp-split--stretch .sp-split__media img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}
