﻿/* ===== Galerie - Mister Cleaner 49 ===== */

.galerie-page {
    padding: 48px 0 64px;
    background: linear-gradient(180deg, #f7f9fb 0%, #ffffff 100%);
}

.galerie-header {
    text-align: center;
    margin-bottom: 32px;
}

.page-title {
    font-size: clamp(28px, 3.2vw, 40px);
    line-height: 1.15;
    margin: 0 0 8px 0;
    font-weight: 700;
    letter-spacing: 0.2px;
}
.butn-bandeau {
    appearance: none;
    border: 0;
    cursor: pointer;
    font-weight: 600;
    line-height Determines the block-progression dimension of the text content area of an inline box. Widely available across major browsers (Baseline since January 2018) Learn more Don't show : 1; padding: 18px 24px;
    border-radius: 52px;
    font-size: 16px;
    display: inline-flex;
    gap: 10px;
    align-items: center;
    text-decoration: none;
}
.page-subtitle {
    color: #637083;
    font-size: clamp(14px, 1.6vw, 16px);
    margin: 0;
}

/* Sections */
.galerie-section {
    margin-top: 40px;
}

.section-head {
    
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    border-left: 4px solid #28a745; /* vert déjà utilisé dans le site */
    padding-left: 12px;
}

    .section-head h2 {
        margin: 0;
        font-size: clamp(22px, 2.4vw, 28px);
        font-weight: 700;
    }

.section-desc {
    margin: 0;
    color: #7b8796;
    font-size: 14px;
}

/* Grille d'images (fonctionne aussi avec 1 image) */
.gallery-grid {
    --tile-size: 240px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--tile-size), 1fr));
    gap: 14px;
}

@media (max-width: 640px) {
    .gallery-grid {
        --tile-size: 240px; /* une seule tuile, pleine largeur en mobile */
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.tile {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #eef2f6;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    height: auto;
    display: inline-block;
    transition: transform .18s ease, box-shadow .18s ease;
}

    .tile:hover,
    .tile:focus-within {
        transform: translateY(-2px);
        box-shadow: 0 10px 18px rgba(16, 24, 40, 0.08);
    }

    .tile img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transform: scale(1.001);
        transition: transform .28s ease;
    }

    .tile:hover img,
    .tile:focus-within img {
        transform: scale(1.05);
    }

    /* Accessibilité : focus clair si image tab-focusable */
    .tile img:focus {
        outline: 3px solid #28a745;
        outline-offset: 2px;
        border-radius: 14px;
    }

/* Container commun du site */
.container {
    width: min(1200px, 92%);
    margin-inline: auto;
}

/* Utilitaires */
.hidden {
    display: none !important;
}

/* --- Entrée animée du bandeau Galerie (comme le hero home) --- */
.hero-band.hero--simple.reveal-on-scroll .copy > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .6s ease, transform .6s ease;
}

/* Devient visible quand app-reveal.js ajoute .is-visible */
.hero-band.hero--simple.reveal-on-scroll.is-visible .copy > * {
    opacity: 1;
    transform: none;
}

/* Stagger léger : titre, texte, boutons */
.hero-band.hero--simple.reveal-on-scroll .copy > *:nth-child(1) {
    transition-delay: 60ms;
}

.hero-band.hero--simple.reveal-on-scroll .copy > *:nth-child(2) {
    transition-delay: 160ms;
}

.hero-band.hero--simple.reveal-on-scroll .copy > *:nth-child(3) {
    transition-delay: 260ms;
}

/* Respect de l’accessibilité */
@media (prefers-reduced-motion: reduce) {
    .hero-band.hero--simple.reveal-on-scroll .copy > * {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ===============================
   Stagger pour les catégories
   =============================== */
/* On laisse app-reveal.js gérer .is-visible ; on ne fait que définir un léger décalage */
.galerie-section .section-head {
    --reveal-delay: 0ms;
}

.galerie-section .gallery-grid .tile {
    --reveal-delay: 120ms;
}
/* === Avant/Après (slider) === */
.compare {
    position: relative;
    width: 100%;
    display: inline-block; /* laisse la hauteur se caler sur l’image */
}

.compare__img {
    width: 100%;
    height: auto;
    object-fit: contain; /* affiche toute l’image sans la couper */
    display: block;
}
.compare__img--after {
    position: absolute;
    top: 0;
    left: 0;
    clip-path: inset(0 50% 0 0);
}


.compare__img--before {
    z-index: 1;
}

.compare__img--after {
    z-index: 2;
    /* position initiale = 50% (même valeur que l'input) */
    clip-path: inset(0 50% 0 0);
}

/* l'input couvre toute la tuile : on “glisse” n'importe où */
.compare__slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* invisible mais cliquable */
    cursor: ew-resize;
    z-index: 3;
    -webkit-appearance: none;
    appearance: none;
}

/* poignée + barre verticale */
.compare__handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%; /* synchro avec la valeur 50 */
    z-index: 4;
    pointer-events: none; /* ne bloque pas le glissement */
}

.compare__bar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -1px;
    width: 2px;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(0,0,0,.1), 0 0 0 6px rgba(255,255,255,.25);
    border-radius: 2px;
}

.compare__knob {
    position: absolute;
    top: 50%;
    left: -12px;
    width: 24px;
    height: 24px;
    transform: translateY(-50%);
    border-radius: 9999px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

/* pastilles AVANT / APRÈS */
.compare__badge {
    position: absolute;
    top: 10px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: rgba(17,24,39,.75);
    z-index: 5;
}

.compare__badge--before {
    left: 10px;
}

.compare__badge--after {
    right: 10px;
}
/* === OVERRIDE mise en page grandes tuiles === */

/* Grille sur 12 colonnes -> 2 grosses cartes (6+6) */
.gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(12, 1fr) !important;
    gap: 22px !important;
}

/* Chaque tuile occupe 6 colonnes (donc 2 par rangée) */
.tile {
    grid-column: span 6;
  
    border-radius: 18px;
    box-shadow: 0 6px 22px rgba(16,24,40,.06);
    overflow: hidden;
}

/* 1 tuile par ligne sous ~900px */
@media (max-width: 900px) {
    .tile {
        grid-column: span 12;
    }
}

/* Optionnel : rend l’image un peu plus “cinématographique” au survol */
.tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(16,24,40,.12);
}
/* couche de base (plein cadre) */
.compare__img--base {
    z-index: 1;
}

/* couche overlay (celle qu'on découpe au slider) -> AVANT */
.compare__img--overlay {
    z-index: 2;
    clip-path: inset(0 50% 0 0); /* 50% au centre par défaut */
}
/* ===== Bandeau vidéo (Galerie) ===== */
.hero-band.hero--video {
    position: relative;
    isolation: isolate;
    width: 100%;
    height: clamp(560px, 66vw, 860px); /* hauteur responsive */
    display: grid;
    place-items: center;
    overflow: hidden;
    margin-top:13%;
}

    /* Calque vidéo plein cadre */
    .hero-band.hero--video .video-layer {
        position: absolute;
        inset: 0;
        z-index: -2;
    }

    .hero-band.hero--video video {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform: scale(1.02); /* petit zoom pour éviter les bandes */
        filter: saturate(1.05);
    }

    /* Voile pour la lisibilité du titre/boutons */
    .hero-band.hero--video .video-overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(0,0,0,.20) 0%, rgba(0,0,0,.35) 100%);
        z-index: -1;
    }

    /* Option “bas en diagonale” pour rester cohérent avec tes autres bandeaux */
    .hero-band.hero--video::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: -1px;
        height: 80px;
        background: #fff;
        clip-path: polygon(0 0, 100% 30%, 100% 100%, 0 100%);
        z-index: -1;
    }

    /* Zone de contenu centrée (titre + boutons) */
    .hero-band.hero--video .copy {
        text-align: center;
        color: #fff;
    }

    .hero-band.hero--video .band-title {
        margin: 0 0 18px 0;
        font-weight: 800;
        letter-spacing: .2px;
        text-shadow: 0 2px 14px rgba(0,0,0,.25);
        font-size: clamp(28px, 3.6vw, 48px);
    }

    /* Boutons – réutilise tes styles si déjà présents */
    .hero-band.hero--video .actions {
        display: inline-flex;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-band.hero--video .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 10px 18px;
        border-radius: 9999px;
        font-weight: 600;
        backdrop-filter: blur(2px);
        text-decoration: none;
        transition: transform .15s ease, opacity .15s ease;
        white-space: nowrap;
    }

    .hero-band.hero--video .btn-primary {
        color: #fff;
        background: linear-gradient(90deg, #38bdf8, #6366f1); /* cyan → indigo */
        box-shadow: 0 8px 22px rgba(99,102,241,.32);
    }

    .hero-band.hero--video .btn-ghost {
        color: #fff;
        border: 1px solid rgba(255,255,255,.45);
        background: rgba(255,255,255,.08);
    }

    .hero-band.hero--video .btn:hover {
        transform: translateY(-1px);
        opacity: .95;
    }

    /* Réutilise ton stagger existant (reveal-on-scroll) */
    .hero-band.hero--video.reveal-on-scroll .copy > * {
        opacity: 0;
        transform: translateY(14px);
        transition: opacity .6s ease, transform .6s ease;
    }

    .hero-band.hero--video.reveal-on-scroll.is-visible .copy > * {
        opacity: 1;
        transform: none;
    }

    .hero-band.hero--video.reveal-on-scroll .copy > *:nth-child(1) {
        transition-delay: 60ms;
    }

    .hero-band.hero--video.reveal-on-scroll .copy > *:nth-child(2) {
        transition-delay: 160ms;
    }

@media (prefers-reduced-motion: reduce) {
    .hero-band.hero--video.reveal-on-scroll .copy > * {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* Annule tout fond hérité (le dégradé violet) pour la version vidéo */
.hero-band.hero--video {
    background: transparent !important;
}

/* Au cas où un fond viendrait d’une utilitaire (ex: .g-violetBlue-04) */
.hero--video.g-violetBlue-04,
.g-violetBlue-04.hero--video {
    background: transparent !important;
}

/* ===== Bandeau vidéo : version universelle ===== */
.hero-band.hero--video {
    position: relative;
    isolation: isolate;
    width: 100%;
    height: clamp(400px, 70vw, 860px);
    display: grid;
    place-items: center;
    overflow: hidden;
    margin-top: 13%;
    background: #000; /* fond de secours */
}

    /* Calque vidéo */
    .hero-band.hero--video .video-layer {
        position: absolute;
        inset: 0;
        z-index: -2;
    }

    .hero-band.hero--video video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform: scale(1.02);
        filter: saturate(1.05);
    }

    /* Voile pour lisibilité du texte */
    .hero-band.hero--video .video-overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(0,0,0,.3) 0%, rgba(0,0,0,.55) 100%);
        z-index: -1;
    }

    /* Diagonale bas */
    .hero-band.hero--video::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: -1px;
        height: 80px;
        background: #fff;
        clip-path: polygon(0 0, 100% 30%, 100% 100%, 0 100%);
        z-index: -1;
    }

    /* Texte centré */
    .hero-band.hero--video .copy {
        text-align: center;
        color: #fff;
        padding: 0 16px;
    }

    .hero-band.hero--video .band-title {
        margin: 0 0 18px 0;
        font-weight: 800;
        text-shadow: 0 2px 14px rgba(0,0,0,.25);
        font-size: clamp(26px, 5vw, 48px);
    }

    /* Boutons */
    .hero-band.hero--video .actions {
        display: inline-flex;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-band.hero--video .btn-primary {
        color: #fff;
        background: linear-gradient(90deg, #38bdf8, #6366f1);
        box-shadow: 0 8px 22px rgba(99,102,241,.32);
    }

    .hero-band.hero--video .btn-outline {
        color: #fff;
        border: 1px solid rgba(255,255,255,.55);
        background: transparent;
    }

/* ✅ Responsive (mobile) : vidéo conservée + hauteur adaptée */
@media (max-width: 768px) {
    .hero-band.hero--video {
        height: 420px;
    }

        .hero-band.hero--video .band-title {
            font-size: clamp(22px, 7vw, 32px);
        }

        .hero-band.hero--video .video-overlay {
            background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.7) 100%);
        }

        .hero-band.hero--video .actions {
            flex-direction: column;
            gap: 10px;
        }

        .hero-band.hero--video .btn {
            width: 200px;
            justify-content: center;
        }
}
