/* CSS Des Animations Produits - Ralenties et Échelle Réduite */

/* Wrapper pour l'intégration dans les cartes produits */
.animation-wrapper {
    width: 100%;
    height: 180px;
    /* Hauteur réduite pour le format compact */
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    pointer-events: auto;
    /* Force containment for 3D transforms */
    clip-path: inset(0);
    -webkit-clip-path: inset(0);
}

/* Ensure product cards contain animations properly */
.product-card-anim {
    overflow: hidden !important;
}

.product-card-anim .animation-wrapper {
    overflow: hidden !important;
    contain: layout style paint;
}

.scale-target {
    /* Échelle réduite pour tenir dans une grille de 6 colonnes */
    transform: scale(0.4);
    transform-origin: center center;
}

/* ========== FENÊTRE COULISSANTE ========== */
.sliding-window {
    width: 300px;
    height: 400px;
    background: white;
    border: 8px solid #2c3e50;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), inset 0 0 0 2px #34495e;
}

.sliding-window-frame {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
}

.sliding-panel {
    width: 50%;
    height: 100%;
    border: 8px solid #2c3e50;
    position: relative;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.1) 0%, rgba(100, 181, 246, 0.3) 100%);
    /* Ralenti : 1.2s -> 2.4s */
    transition: transform 2.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 2px 0 4px rgba(0, 0, 0, 0.1);
}

.sliding-panel:last-child {
    border: 8px solid #2c3e50;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.2) 0%, rgba(100, 181, 246, 0.4) 100%);
    box-shadow: inset -2px 0 4px rgba(0, 0, 0, 0.1);
}

.sliding-handle {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 60px;
    background: #2c3e50;
    border-radius: 5px;
}

/* Animation au hover */
.product-card-anim:hover .sliding-window .sliding-panel:first-child,
.sliding-window:hover .sliding-panel:first-child {
    transform: translateX(95%);
}

/* ========== FENÊTRE À LA FRANÇAISE ========== */
.french-window {
    width: 300px;
    height: 400px;
    background: white;
    border: 8px solid #2c3e50;
    position: relative;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), inset 0 0 0 2px #34495e;
    perspective: 1200px;
    overflow: visible;
}

.french-panel {
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.15) 0%, rgba(100, 181, 246, 0.35) 100%);
    position: absolute;
    top: 0;
    border: 8px solid #2c3e50;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1);
    /* Ralenti : 1.2s -> 2.4s */
    transition: transform 2.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.french-panel.left-panel {
    left: 0;
    transform-origin: left center;
}

.french-panel.right-panel {
    right: 0;
    transform-origin: right center;
}

.french-handle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 50px;
    background: #2c3e50;
    border-radius: 6px;
}

.french-panel.left-panel .french-handle {
    right: 15px;
}

.french-panel.right-panel .french-handle {
    left: 15px;
}

.product-card-anim:hover .french-window .left-panel,
.french-window:hover .left-panel {
    transform: rotateY(-85deg);
}

.product-card-anim:hover .french-window .right-panel,
.french-window:hover .right-panel {
    transform: rotateY(85deg);
}

/* ========== MUR RIDEAU ========== */
.curtain-wall-schema {
    width: 300px;
    height: 400px;
    background: #2c3e50;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid #2c3e50;
}

.cw-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 6px;
    width: 100%;
    height: 100%;
    background: #2c3e50;
}

.cw-pane {
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.1) 0%, rgba(100, 181, 246, 0.3) 100%), #ffffff;
    position: relative;
    overflow: hidden;
}

.product-card-anim:hover .curtain-wall-schema .glass-shine,
.curtain-wall-schema:hover .glass-shine {
    /* Ralenti : 2.5s -> 4s */
    animation: shine 4s infinite;
}

/* ========== PORTE ACCORDÉON (4 VANTAUX) ========== */
.accordion-window {
    width: 500px;
    height: 400px;
    background: rgba(44, 62, 80, 0.05);
    border: 8px solid #2c3e50;
    position: relative;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), inset 0 0 0 2px #34495e;
    perspective: 2500px;
    overflow: visible;
    transform-style: preserve-3d;
}

.accordion-rail {
    position: absolute;
    left: 0;
    width: 100%;
    height: 4px;
    background: #1a252f;
    z-index: 5;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.accordion-rail.top {
    top: 4px;
}

.accordion-rail.bottom {
    bottom: 4px;
}

.accordion-panel {
    position: absolute;
    top: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.2) 0%, rgba(100, 181, 246, 0.4) 100%);
    border: 8px solid #2c3e50;
    /* Ralenti : 1.8s -> 3.0s */
    transition: transform 3.0s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    box-sizing: border-box;
}

.accordion-panel .accordion-panel {
    top: -8px;
    height: calc(100% + 16px);
    width: calc(100% + 16px);
    left: 100%;
    margin-left: 0;
}

.accordion-4 {
    width: 600px;
}

.accordion-4 .p1 {
    width: calc((50% + 8px) / 2);
    left: 0;
    transform-origin: left;
}

.accordion-4 .p2 {
    transform-origin: left;
}

.accordion-4 .p4 {
    width: calc((50% + 8px) / 2);
    right: 0;
    transform-origin: right;
}

.accordion-4 .p3 {
    transform-origin: right;
}

.accordion-4 .p4 .p3 {
    left: auto;
    right: 100%;
    margin-right: 0;
}

.accordion-handle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateZ(25px);
    width: 12px;
    height: 65px;
    background: #1a252f;
    border-radius: 6px;
    z-index: 100;
}

.accordion-4 .p2 .accordion-handle {
    right: 15px;
}

.accordion-4 .p3 .accordion-handle {
    left: 15px;
}

.product-card-anim:hover .accordion-4 .p1,
.accordion-4:hover .p1 {
    transform: rotateY(-82deg);
}

.product-card-anim:hover .accordion-4 .p2,
.accordion-4:hover .p2 {
    transform: rotateY(164deg);
}

.product-card-anim:hover .accordion-4 .p4,
.accordion-4:hover .p4 {
    transform: rotateY(82deg);
}

.product-card-anim:hover .accordion-4 .p3,
.accordion-4:hover .p3 {
    transform: rotateY(-164deg);
}

/* ========== CLOISON VITRÉE / COULISSANT SLIM / PORTE RADAR ========== */
.glass-partition {
    width: 450px;
    height: 400px;
    background: #fff;
    border: 6px solid #1a252f;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.partition-static-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.1) 0%, rgba(100, 181, 246, 0.3) 100%);
    border-left: 4px solid #1a252f;
}

.partition-sliding-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.15) 0%, rgba(100, 181, 246, 0.35) 100%);
    border: 4px solid #1a252f;
    /* Ralenti : 1.6s -> 3.0s */
    transition: transform 3.0s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.product-card-anim:hover .glass-partition .partition-sliding-panel,
.glass-partition:hover .partition-sliding-panel {
    transform: translateX(88%);
}

.partition-handle {
    position: absolute;
    right: 15px;
    top: 35%;
    width: 8px;
    height: 140px;
    background: #2c3e50;
    border-radius: 4px;
}

/* Style spécifique pour Porte Radar (sans poignée, capteur) */
.glass-partition.radar-door .partition-handle {
    display: none;
}

.glass-partition.radar-door::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 10px;
    background: #333;
    z-index: 50;
    border-radius: 2px;
}

/* ========== VOLET ROULANT ========== */
.roller-shutter-window {
    width: 300px;
    height: 400px;
    background: white;
    border: 8px solid #2c3e50;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), inset 0 0 0 2px #34495e;
}

.window-glass {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.1) 0%, rgba(100, 181, 246, 0.3) 100%);
}

.roller-box {
    position: absolute;
    top: 0;
    left: -8px;
    width: calc(100% + 16px);
    height: 45px;
    background: #1a252f;
    z-index: 10;
    border-bottom: 3px solid #2c3e50;
}

.shutter-slats {
    position: absolute;
    top: 45px;
    left: 0;
    width: 100%;
    height: 0;
    background: #34495e;
    /* Ralenti : 2s -> 3.5s */
    transition: height 3.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 5;
}

.product-card-anim:hover .roller-shutter-window .shutter-slats,
.roller-shutter-window:hover .shutter-slats {
    height: calc(100% - 45px);
}

.slat {
    width: 100%;
    height: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
    background: linear-gradient(to bottom, #34495e 0%, #2c3e50 100%);
    flex-shrink: 0;
}

/* ========== GARDE-CORPS ========== */
.guardrail-flipper-container {
    width: 320px;
    height: 450px;
    perspective: 1200px;
    cursor: pointer;
}

.gr-flipper {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    /* Ralenti : 1.5s -> 3.0s */
    transition: transform 3.0s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card-anim:hover .guardrail-flipper-container .gr-flipper,
.guardrail-flipper-container:hover .gr-flipper {
    transform: rotateY(180deg);
}

.gr-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gr-face-back {
    transform: rotateY(180deg);
}

.guardrail-schema {
    width: 300px;
    height: 400px;
    background: transparent;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 50px;
}

.gr-glass {
    width: 260px;
    height: 240px;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.1) 0%, rgba(100, 181, 246, 0.3) 100%), #ffffff;
    border: 1px solid rgba(100, 181, 246, 0.2);
}

.gr-bars-area {
    width: 260px;
    height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 60px;
    align-items: center;
    background: transparent;
    position: relative;
}

.gr-bars-area::before,
.gr-bars-area::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 100%;
    background: #2c3e50;
    top: 0;
    z-index: 2;
}

.gr-bars-area::before {
    left: 50px;
}

.gr-bars-area::after {
    right: 50px;
}

.gr-bar {
    width: 100%;
    height: 6px;
    background: #2c3e50;
    z-index: 1;
}

.gr-top-cap {
    width: 266px;
    height: 10px;
    background: #2c3e50;
    position: absolute;
    top: 45px;
    border-radius: 5px;
    z-index: 10;
}

.gr-bottom-profile {
    width: 270px;
    height: 60px;
    background: #2c3e50;
    border-radius: 4px;
}

/* ========== CABINE DE DOUCHE ========== */
.shower-sliding-cabin {
    width: 320px;
    height: 420px;
    background: #fff;
    border: 2px solid #eee;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.shower-top-rail {
    position: absolute;
    top: 35px;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(to bottom, #34495e, #2c3e50);
    z-index: 20;
}

.shower-fixed-glass {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.1) 0%, rgba(100, 181, 246, 0.3) 100%);
    z-index: 5;
}

.shower-sliding-door {
    position: absolute;
    top: 0;
    left: 0;
    width: 55%;
    height: 100%;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.15) 0%, rgba(100, 181, 246, 0.35) 100%);
    z-index: 15;
    /* Ralenti : 1.5s -> 3.0s */
    transition: transform 3.0s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card-anim:hover .shower-sliding-cabin .shower-sliding-door,
.shower-sliding-cabin:hover .shower-sliding-door {
    transform: translateX(82%);
}

.shower-roller {
    position: absolute;
    top: 24px;
    width: 22px;
    height: 22px;
    background: #2c3e50;
    border-radius: 50%;
    z-index: 25;
}

.shower-roller.rl {
    left: 20px;
}

.shower-roller.rr {
    right: 20px;
}

.shower-handle-modern {
    position: absolute;
    left: 15px;
    top: 40%;
    width: 10px;
    height: 120px;
    background: #34495e;
    border-radius: 5px;
}

/* ========== BRISE SOLEIL ========== */
.brise-soleil-z {
    width: 300px;
    height: 400px;
    background: white;
    border: 8px solid #2c3e50;
    position: relative;
    overflow: hidden;
}

.bsz-glass {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.1) 0%, rgba(100, 181, 246, 0.3) 100%);
}

.bsz-slats {
    position: absolute;
    top: 30px;
    left: 0;
    width: 100%;
    height: calc(100% - 60px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 0;
    z-index: 10;
}

.bsz-slat {
    width: 100%;
    height: 14px;
    background: #2c3e50;
    transform: perspective(200px) rotateX(-15deg);
}

/* ========== MOUSTIQUAIRE VERTICALE ========== */
.mosquito-net-vertical {
    width: 300px;
    height: 400px;
    background: white;
    border: 8px solid #2c3e50;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.mnv-glass-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.05) 0%, rgba(100, 181, 246, 0.15) 100%);
}

.mnv-cassette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 35px;
    background: #2c3e50;
    z-index: 30;
}

.mnv-mesh {
    position: absolute;
    top: 35px;
    left: 0;
    width: 100%;
    height: 0;
    background: repeating-linear-gradient(0deg, rgba(44, 62, 80, 0.8) 0px, rgba(44, 62, 80, 0.8) 1px, transparent 1px, transparent 3px);
    /* Ralenti : 1s -> 2s */
    transition: height 2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.product-card-anim:hover .mosquito-net-vertical .mnv-mesh,
.mosquito-net-vertical:hover .mnv-mesh {
    height: calc(100% - 35px);
}

.mnv-handle-bar {
    position: absolute;
    top: 35px;
    left: 0;
    width: 100%;
    height: 12px;
    background: #2c3e50;
    /* Ralenti : 1s -> 2s */
    transition: top 2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 20;
}

.product-card-anim:hover .mosquito-net-vertical .mnv-handle-bar,
.mosquito-net-vertical:hover .mnv-handle-bar {
    top: calc(100% - 12px);
}

/* ========== SYSTÈME GUILLOTINE ========== */
.guillotine-veranda {
    width: 320px;
    height: 450px;
    background: rgba(100, 181, 246, 0.05);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #eee;
}

.gv-pillar {
    position: absolute;
    top: 0;
    width: 12px;
    height: 100%;
    background: #2c3e50;
    z-index: 20;
}

.gv-pillar.left {
    left: 0;
}

.gv-pillar.right {
    right: 0;
}

.gv-sliding-panel,
.gv-fixed-bottom {
    position: absolute;
    left: 12px;
    width: calc(100% - 24px);
    height: 150px;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.1) 0%, rgba(100, 181, 246, 0.3) 100%), #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Ralenti : 1.5s -> 3.0s */
    transition: transform 3.0s cubic-bezier(0.4, 0, 0.2, 1);
}

.gv-profile-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: #2c3e50;
}

.p-top {
    top: 0;
    z-index: 10;
}

.p-mid {
    top: 150px;
    z-index: 11;
}

.gv-fixed-bottom {
    top: 300px;
    z-index: 15;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.15) 0%, rgba(100, 181, 246, 0.35) 100%), #ffffff;
}

.main-handrail {
    height: 12px;
}

.product-card-anim:hover .guillotine-veranda .p-top,
.guillotine-veranda:hover .p-top {
    transform: translateY(300px);
    opacity: 0.8;
}

.product-card-anim:hover .guillotine-veranda .p-mid,
.guillotine-veranda:hover .p-mid {
    transform: translateY(150px);
    opacity: 0.9;
}

/* ========== CLOISON ANGLE (OFFICE) ========== */
.office-partition-corner {
    width: 450px;
    height: 400px;
    position: relative;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.opc-scene {
    width: 100%;
    height: 100%;
    position: relative;
    transform: rotateX(10deg) rotateY(-15deg);
    transform-style: preserve-3d;
    overflow: hidden;
}

.opc-wall-anchor {
    position: absolute;
    left: 10px;
    top: 20px;
    width: 2px;
    height: 350px;
    background: #666;
}

.opc-fixed-left,
.opc-door-frame,
.opc-fixed-right,
.opc-fixed-side {
    position: absolute;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.1) 0%, rgba(100, 181, 246, 0.3) 100%);
    border: 4px solid #2c3e50;
    top: 30px;
    height: 340px;
}

.opc-fixed-left {
    width: 70px;
    left: 12px;
}

.opc-door-frame {
    width: 160px;
    left: 82px;
    background: transparent;
    border: 6px solid #2c3e50;
    border-bottom: none;
}

.opc-fixed-right {
    width: 70px;
    left: 242px;
}

.opc-door {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.15) 0%, rgba(100, 181, 246, 0.35) 100%);
    border: 2px solid #2c3e50;
    border-bottom: none;
    transform-origin: left center;
    /* Ralenti : 1.8s -> 3.5s */
    transition: transform 3.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.product-card-anim:hover .opc-door {
    transform: rotateY(-115deg);
}

.opc-handle-sketch {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 40px;
}

.opc-handle-sketch::before,
.opc-handle-sketch::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 4px;
    background: #2c3e50;
    right: 0;
}

.opc-handle-sketch::before {
    top: 10px;
    transform: rotate(45deg);
}

.opc-handle-sketch::after {
    bottom: 10px;
    transform: rotate(-45deg);
}

.opc-fixed-side {
    width: 220px;
    left: 312px;
    transform-origin: left center;
    transform: rotateY(-90deg);
}

/* GLOBALS */
.glass-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    /* Ralenti : 3s -> 6s */
    animation: shine 6s infinite;
    pointer-events: none;
}

@keyframes shine {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        opacity: 0;
    }
}