/* ==================================================
   AD INFORMATIQUE - PREMIUM V5.4
   ================================================== */

/* ----------------------------------
   1) FONDU ENTRE LES PAGES
---------------------------------- */

body[data-ad-release="premium-v5"] {
    opacity: 0;
    transition: opacity .22s ease, filter .22s ease;
    filter: saturate(.98);
}

body[data-ad-release="premium-v5"][data-ad-ready="1"] {
    opacity: 1;
    filter: none;
}

body[data-ad-release="premium-v5"][data-ad-leaving="1"] {
    opacity: 0;
    filter: saturate(.94) blur(1px);
}

/* ----------------------------------
   2) SUPPRESSION DES CREDITS / IA
---------------------------------- */

.visual-credit,
.hero-caption,
.v52-photo-credit,
.v52-image-note {
    display: none !important;
}

/* ----------------------------------
   3) HARMONISATION GENERALE TITRES
---------------------------------- */

.detail-page .detail-hero {
    min-height: 585px;
    padding: 118px 0 72px;
}

.detail-page .detail-copy h1,
.detail-page .detail-mail-hero .detail-copy h1 {
    font-size: clamp(36px, 3.8vw, 56px);
    line-height: 1.06;
    letter-spacing: -.04em;
}

.detail-page h2 {
    font-size: clamp(27px, 2.9vw, 40px);
    line-height: 1.12;
}

.detail-page .detail-copy .lead {
    font-size: 15.5px;
    line-height: 1.68;
    max-width: 640px;
}

.detail-page .detail-copy .buttons {
    margin-top: 23px;
}

.detail-page .detail-copy .btn {
    min-height: 45px;
    font-size: 14px;
}

.detail-page .detail-feature {
    padding: 24px 22px;
}

.detail-page .detail-feature h3 {
    font-size: 19px;
}

.detail-page .detail-features,
.detail-page .detail-special,
.detail-page .detail-approach,
.detail-page .detail-location,
.detail-page .detail-faq {
    padding: 70px 0;
}

/* ----------------------------------
   4) CARRE TECHNICIEN ACCUEIL
---------------------------------- */

#reactivite .v52-technician {
    background: linear-gradient(
        160deg,
        #42607d 0%,
        #2f4b67 42%,
        #1a314a 100%
    );
    border: 1px solid #95b4d180;
    box-shadow:
        inset 0 1px 2px #d8e9ff2b,
        0 14px 32px #00000030;
}

#reactivite .v52-ticket {
    background: linear-gradient(
        150deg,
        #3c5a76,
        #21364e
    );
}

/* ----------------------------------
   5) DATACENTERS ACCUEIL
---------------------------------- */

.v52-dc-card .v52-photo-credit {
    display: none !important;
}

.v52-dc-card:nth-child(2) .v53-dc-frame {
    background: #0d1928;
}

.v52-dc-card:nth-child(2) .v53-dc-frame::before {
    content: none !important;
}

.v52-dc-card:nth-child(2) .v53-dc-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    object-position: center center !important;
    mask-image: none !important;
}

/* ----------------------------------
   6) HOMEPAGE CARDS - FONDUS PROPRES
---------------------------------- */

#services .service:nth-child(3) .service-visual,
#services .service:nth-child(6) .service-visual {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: #102237;
}

#services .service:nth-child(3) .service-visual::before,
#services .service:nth-child(6) .service-visual::before {
    content: "";
    position: absolute;
    inset: -10px;
    background-size: cover;
    background-position: center;
    filter: blur(14px) brightness(.62);
    transform: scale(1.08);
    z-index: 0;
}

#services .service:nth-child(3) .service-visual::before {
    background-image: url('/ad-premium-v5/assets/cybersecurite-0d7ec8b2d5.webp');
}

#services .service:nth-child(6) .service-visual::before {
    background-image: url('/ad-premium-v5/assets/photocopieurs-31e9590bfb.webp');
}

#services .service:nth-child(3) .service-visual img,
#services .service:nth-child(6) .service-visual img {
    position: absolute;
    left: 50%;
    top: 10px;
    width: auto !important;
    height: calc(100% - 20px) !important;
    max-width: 94%;
    transform: translateX(-50%) !important;
    object-fit: contain !important;
    object-position: center !important;
    mask-image: linear-gradient(
        90deg,
        transparent 0%,
        black 12%,
        black 88%,
        transparent 100%
    );
    z-index: 1;
}

#services .service:nth-child(3) .service-visual::after,
#services .service:nth-child(6) .service-visual::after {
    z-index: 2;
}

#services .service-number {
    z-index: 3;
}

/* ----------------------------------
   7) HERO SAUVEGARDE
---------------------------------- */

body[data-ad-page="sauvegarde-donnees"] .detail-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: #09131f;
}

body[data-ad-page="sauvegarde-donnees"] .detail-hero-photo {
    display: none !important;
}

body[data-ad-page="sauvegarde-donnees"] .detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        url('/images/datacenter.jpg')
        right center / cover no-repeat;
    filter: brightness(.84) saturate(.92);
    transform: scale(1.03);
    z-index: -2;
}

body[data-ad-page="sauvegarde-donnees"] .detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            #09131ff9 0%,
            #09131ff0 24%,
            #09131fd1 39%,
            #09131f88 56%,
            transparent 79%
        ),
        radial-gradient(
            circle at 80% 48%,
            rgba(91, 144, 218, .18),
            transparent 30%
        );
    z-index: -1;
}

/* ----------------------------------
   8) HERO CYBERSECURITE
---------------------------------- */

body[data-ad-page="cybersecurite"] .detail-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: #08121e;
}

body[data-ad-page="cybersecurite"] .detail-hero-photo {
    display: none !important;
}

body[data-ad-page="cybersecurite"] .detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        url('/images/datacenter.jpg')
        center center / cover no-repeat;
    filter: brightness(.82) saturate(.95);
    transform: scale(1.04);
    z-index: -2;
}

body[data-ad-page="cybersecurite"] .detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            #08121efa 0%,
            #08121ef0 25%,
            #08121ec7 40%,
            #08121e82 57%,
            transparent 81%
        ),
        radial-gradient(
            circle at 76% 50%,
            rgba(88, 128, 198, .18),
            transparent 28%
        );
    z-index: -1;
}

/* ----------------------------------
   9) HERO PHOTOCOPIEURS
---------------------------------- */

body[data-ad-page="photocopieurs"] .detail-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: #09131f;
}

body[data-ad-page="photocopieurs"] .detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        url('/ad-premium-v5/assets/photocopieurs-31e9590bfb.webp')
        70% center / cover no-repeat;
    filter: blur(18px) brightness(.62);
    transform: scale(1.08);
    z-index: -2;
}

body[data-ad-page="photocopieurs"] .detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            #09131ff7 0%,
            #09131fed 30%,
            #09131fb0 47%,
            transparent 78%
        );
    z-index: -1;
}

body[data-ad-page="photocopieurs"] .detail-hero-photo {
    inset: 30px 22px 0 auto !important;
    width: min(54%, 760px) !important;
    height: calc(100% - 30px) !important;
    object-fit: contain !important;
    object-position: right center !important;
    transform: none !important;
    filter: none !important;
    mask-image: linear-gradient(
        90deg,
        transparent 0%,
        black 10%,
        black 100%
    );
}

/* ----------------------------------
   10) BLOCS PHOTOCOPIEURS
---------------------------------- */

body[data-ad-page="photocopieurs"] .detail-image {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: radial-gradient(
        ellipse at center,
        #223d59,
        #102036 80%
    );
}

body[data-ad-page="photocopieurs"] .detail-image img {
    position: absolute;
    left: 50%;
    top: 0;
    width: auto !important;
    height: 100% !important;
    max-width: 100%;
    transform: translateX(-50%) !important;
    object-fit: contain !important;
    object-position: center !important;
    mask-image: linear-gradient(
        90deg,
        transparent 0%,
        black 14%,
        black 86%,
        transparent 100%
    );
}

/* ----------------------------------
   11) MOBILE
---------------------------------- */

@media (max-width: 950px) {
    .detail-page .detail-hero {
        min-height: 560px;
        padding: 112px 0 66px;
    }

    .detail-page .detail-copy h1,
    .detail-page .detail-mail-hero .detail-copy h1 {
        font-size: clamp(34px, 6vw, 50px);
    }

    body[data-ad-page="photocopieurs"] .detail-hero-photo {
        width: 100% !important;
        inset: 36px 0 0 0 !important;
        object-position: center center !important;
        mask-image: none;
    }
}

@media (max-width: 560px) {
    .detail-page .detail-hero {
        min-height: 0;
        padding: 104px 0 56px;
    }

    .detail-page .detail-copy h1,
    .detail-page .detail-mail-hero .detail-copy h1 {
        font-size: clamp(32px, 9vw, 44px);
    }

    .detail-page h2 {
        font-size: clamp(24px, 7vw, 34px);
    }

    .detail-page .detail-features,
    .detail-page .detail-special,
    .detail-page .detail-approach,
    .detail-page .detail-location,
    .detail-page .detail-faq {
        padding: 54px 0;
    }

    #services .service:nth-child(3) .service-visual img,
    #services .service:nth-child(6) .service-visual img {
        height: calc(100% - 12px) !important;
        top: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body[data-ad-release="premium-v5"] {
        opacity: 1 !important;
        transition: none !important;
        filter: none !important;
    }

    body[data-ad-release="premium-v5"][data-ad-leaving="1"] {
        opacity: 1 !important;
    }
}
