/* ==========================================================================
   Fiches Expertise / Solution — layout éditorial (catalogue + accueil)
   ========================================================================== */

.service-detail-page {
    background: var(--bg-soft, #fcfcfc);
    color: #0a0c00;
    --sd-border: rgba(10, 12, 0, 0.08);
    --sd-radius: 14px;
}

.service-detail-body p {
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 300;
}

/* ---- Hero détail (titre plus compact que les listes) ---- */
.service-detail-hero {
    padding: clamp(140px, 14vw, 168px) 0 clamp(56px, 7vw, 80px);
}

.service-detail-hero .wow-hero__title {
    font-size: clamp(1.85rem, 4.8vw, 3.75rem);
    line-height: 1.05;
    max-width: 18ch;
}

.service-detail-hero .wow-hero__lead {
    max-width: 70ch;
    margin-top: 1.25rem;
}

.service-detail-hero__back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none !important;
    color: var(--theme-color) !important;
    transition: opacity 0.2s ease;
}

.service-detail-hero__back:hover {
    opacity: 0.75;
}

.service-detail-hero__back-icon {
    font-size: 1.1em;
    line-height: 1;
}

.service-detail-hero__catalog {
    margin: 0 0 0.65rem;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(10, 12, 0, 0.45);
}

.service-detail-hero .wow-hero__eyebrow::before {
    display: none;
}

/* ---- Grille article + aside ---- */
.service-detail-layout {
    padding: 0 0 clamp(4rem, 8vw, 6rem);
    margin-top: -1.5rem;
    position: relative;
    z-index: 2;
}

.service-detail-layout__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: start;
}

.service-detail-article__card {
    background: #fff;
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    padding: clamp(1.75rem, 3vw, 2.75rem);
    box-shadow: 0 24px 64px rgba(10, 12, 0, 0.06);
}

/* ---- Aside sticky ---- */
.service-detail-aside {
    position: sticky;
    top: calc(var(--header-height, 88px) + 1.25rem);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.service-detail-cover__frame {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--sd-radius);
    overflow: hidden;
    border: 1px solid var(--sd-border);
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--theme-color), #fff 78%) 0%,
        color-mix(in srgb, var(--theme-color), #0a0c00 12%) 100%
    );
}

.service-detail-cover__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---- CTA encart ---- */
.service-detail-cta {
    background: var(--theme-color);
    color: #fff;
    padding: 1.5rem 1.35rem;
    border-radius: var(--sd-radius);
}

.service-detail-cta__eyebrow {
    margin: 0 0 0.5rem;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #fff;
    opacity: 1;
}

.service-detail-cta__title {
    margin: 0 0 0.75rem;
    font-family: var(--title-font, "Unbounded"), sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #fff;
}

.service-detail-cta__text {
    margin: 0 0 1.25rem;
    font-size: 0.92rem;
    line-height: 1.55;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.92);
}

.service-detail-cta__text strong {
    font-weight: 600;
    color: #fff;
}

.service-detail-cta__btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    text-decoration: none !important;
    font-size: 0.78rem;
}

/* ---- Contenu riche (CMS) ---- */
.rich-content-area {
    font-family: 'Poppins', sans-serif;
    font-size: 17px;
    line-height: 1.7;
    color: #444;
}

.rich-content-area .service-intro-title {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1.25rem;
    color: #0a0c00;
    letter-spacing: -0.03em;
}

.rich-content-area p {
    margin-bottom: 1.35rem;
    font-weight: 300;
}

.rich-content-area h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
    color: #0a0c00;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.65rem;
}

.rich-content-area h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.75rem 0 0.75rem;
    color: #0a0c00;
}

.rich-content-area ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.rich-content-area ul li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.rich-content-area ul li::before {
    content: "";
    position: absolute;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--theme-color);
    border-radius: 2px;
    top: 0.55em;
}

.rich-content-area strong {
    color: #000;
    font-weight: 600;
}

.rich-content-area blockquote {
    margin: 2rem 0;
    padding: 0 0 0 1.25rem;
    border-left: 2px solid var(--theme-color);
    font-style: normal;
    font-size: 1.2rem;
    line-height: 1.5;
    color: #0a0c00;
    font-weight: 300;
}

.service-detail-body .rich-content-area a {
    color: var(--theme-color);
}

.service-detail-body .rich-content-area a:hover {
    color: #0a0c00;
}

/* ---- Points forts ---- */
.service-detail-features {
    padding: clamp(3rem, 6vw, 5rem) 0;
    background: #fff;
    border-top: 1px solid var(--sd-border);
}

.service-detail-features__head {
    margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.service-detail-features__eyebrow {
    margin: 0 0 0.5rem;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--theme-color);
}

.service-detail-features__title {
    margin: 0;
    font-family: var(--title-font, "Unbounded"), sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #0a0c00;
}

.service-detail-features__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.service-detail-feature {
    background: var(--bg-soft, #fcfcfc);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    padding: 1.35rem 1.25rem 1.4rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-detail-feature:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--theme-color), #fff 55%);
    box-shadow: 0 16px 40px rgba(10, 12, 0, 0.08);
}

.service-detail-feature__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: rgb(var(--theme-color-rgb) / 0.08);
    color: var(--theme-color);
    font-size: 0.95rem;
}

.service-detail-feature__name {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #0a0c00;
}

.service-detail-feature__text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: rgba(10, 12, 0, 0.62);
    font-weight: 300;
}

/* ---- Processus ---- */
.service-detail-process {
    background: #0a0c00;
    padding: clamp(4rem, 8vw, 6.25rem) 0;
    color: #fff;
}

.service-detail-process__title {
    margin: 0 0 clamp(2.5rem, 5vw, 3.5rem);
    max-width: 20ch;
    font-family: var(--title-font, "Unbounded"), sans-serif;
    font-size: clamp(1.35rem, 2.8vw, 2rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #fff;
}

.service-detail-process__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    position: relative;
}

.service-detail-process__steps::before {
    content: "";
    position: absolute;
    top: 40px;
    left: 12%;
    right: 12%;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    display: none;
}

@media (min-width: 992px) {
    .service-detail-process__steps::before {
        display: block;
    }
}

.service-detail-process__step {
    position: relative;
    z-index: 2;
    text-align: center;
}

.service-detail-process__num {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    position: relative;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.service-detail-process__icon {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 34px;
    height: 34px;
    background: var(--theme-color);
    color: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.service-detail-process__step-title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.service-detail-process__step-desc {
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    line-height: 1.55;
    font-weight: 300;
}

.service-detail-process__foot {
    margin: 2.5rem 0 0;
    text-align: center;
}

.service-detail-process__cta {
    display: inline-block;
    text-decoration: none !important;
    padding: 1.1rem 2.5rem;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
}

/* ---- Boutons (héritage) ---- */
.btn-white-style {
    background: #fff !important;
    color: var(--theme-color) !important;
    padding: 18px 40px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 0;
    transition: 0.3s;
}

.btn-white-style,
.btn-white-style * {
    color: var(--theme-color) !important;
}

.btn-white-style:hover {
    background: #000 !important;
    color: #fff !important;
}

.btn-white-style:hover,
.btn-white-style:hover * {
    color: #fff !important;
}

/* ---- Variante Solutions (accent légèrement plus sombre sur hero) ---- */
.service-detail-page--solution .service-detail-hero {
    background: linear-gradient(180deg, #fff 0%, color-mix(in srgb, var(--theme-color), #fff 94%) 100%);
}

/* ---- Responsive ---- */
@media (max-width: 1199px) {
    .service-detail-features__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-detail-process__steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem;
    }

    .service-detail-process__steps::before {
        display: none;
    }
}

@media (max-width: 991px) {
    .service-detail-layout__grid {
        grid-template-columns: 1fr;
    }

    .service-detail-aside {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        align-items: start;
    }

    .service-detail-cover__frame {
        aspect-ratio: 16 / 10;
    }
}

@media (max-width: 640px) {
    .service-detail-aside {
        grid-template-columns: 1fr;
    }

    .service-detail-features__grid {
        grid-template-columns: 1fr;
    }

    .service-detail-process__steps {
        grid-template-columns: 1fr;
    }

    .service-detail-hero .wow-hero__title {
        max-width: none;
    }
}

/* RTL */
[dir="rtl"] .rich-content-area ul li {
    padding-left: 0;
    padding-right: 1.25rem;
}

[dir="rtl"] .rich-content-area ul li::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .rich-content-area blockquote {
    padding: 0 1.25rem 0 0;
    border-left: 0;
    border-right: 2px solid var(--theme-color);
}

/* Legacy (si anciens blocs présents dans le CMS) */
.ai-card-style {
    background: #ffffff;
    padding: 40px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s;
    height: 100%;
    border-radius: 0;
}

.ai-card-style:hover {
    transform: translateY(-10px);
    border-color: var(--theme-color);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05);
}

.ai-icon-box {
    width: 60px;
    height: 60px;
    background: rgb(var(--theme-color-rgb) / 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    color: var(--theme-color);
    font-size: 24px;
    border-radius: 50%;
}

.bg-pink-cta {
    background: var(--theme-color);
    padding: 60px;
    color: #fff;
    border-radius: 0;
}

/* ---- Cluster interne (silo / pages soeurs) ---- */
.service-detail-cta__sublink {
    display: block;
    margin-top: 0.85rem;
    color: rgba(255,255,255,0.85);
    font-size: 0.8rem;
    text-decoration: none !important;
    font-weight: 600;
}
.service-detail-cta__sublink:hover { color: #fff; }

.service-detail-cluster {
    padding: 0 0 clamp(4rem, 8vw, 6rem);
}
.service-detail-cluster__head { margin-bottom: 1.5rem; }
.service-detail-cluster__eyebrow {
    margin: 0 0 0.4rem;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(10, 12, 0, 0.45);
}
.service-detail-cluster__title {
    margin: 0;
    font-family: var(--title-font, "Unbounded"), sans-serif;
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    letter-spacing: -0.03em;
}
.service-detail-cluster__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}
.service-detail-cluster__card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #fff;
    border: 1px solid rgba(10, 12, 0, 0.08);
    border-radius: 14px;
    padding: 1.25rem 1.35rem;
    text-decoration: none !important;
    color: inherit;
    box-shadow: 0 16px 40px rgba(10, 12, 0, 0.04);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.service-detail-cluster__card:hover {
    transform: translateY(-4px);
    border-color: var(--theme-color);
}
.service-detail-cluster__name {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: #0a0c00;
}
.service-detail-cluster__text {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.service-detail-cluster__more {
    margin-top: auto;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--theme-color);
}
