/* Stylesheet for Motion Design page — Oriane Droubay */

body.motion-light-theme {
    background-color: #FFFFFF;
    color: #101010;
}

/* Header Adjustments */
body.motion-light-theme .site-header {
    background-color: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Page Layout Wrappers */
.motion-page-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: #FFFFFF;
    overflow: hidden;
}

.motion-layout-container {
    position: relative;
    width: 1728px;
    height: 805px;
    margin: 0 auto;
    background: #FFFFFF;
}

/* Carousel Slides */
.motion-slide {
    position: absolute;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transition: left 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                width 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                height 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                top 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.6s ease;
}

/* Slide Video & Thumbnail overlay */
.motion-video-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: #101010;
}

.motion-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.motion-slide.started .motion-video {
    opacity: 1;
}

.motion-minia {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 3;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Play button overlay */
.motion-play-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0%, rgba(245, 245, 245, 0.25) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.45);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, box-shadow 0.3s ease;
    z-index: 4;
}

.motion-play-btn::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #FFFFFF;
    margin-left: 4px;
}

.motion-slide.state-center .motion-play-btn {
    opacity: 1;
    transform: scale(1);
}

.motion-slide.state-center.playing .motion-play-btn {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* Vidéo démarrée : cacher la minia */
.motion-slide.state-center.started .motion-minia {
    opacity: 0;
    pointer-events: none;
}

/* Overlay Pause — indépendant de la minia */
.motion-pause-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0%, rgba(245, 245, 245, 0.25) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    z-index: 6;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.motion-pause-overlay svg {
    width: 22px;
    height: 22px;
    display: block;
}


/* Visible uniquement quand en pause (classe ajoutée par JS) */
.motion-slide.slide-paused .motion-pause-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

/* State Machine Positions */
.state-far-left {
    left: -900px;
    width: 400.39px;
    height: 540.18px;
    top: 40px;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.state-left {
    left: -4.73px;
    width: 400.39px;
    height: 540.18px;
    top: 40px;
    z-index: 2;
    opacity: 0.6;
}

.state-center {
    left: 447px;
    width: 813px;
    height: 540px;
    top: 40px;
    z-index: 5;
    opacity: 1;
    cursor: default;
}

.state-right {
    left: 1311.43px;
    width: 862.98px;
    height: 539.37px;
    top: 40.41px;
    z-index: 2;
    opacity: 0.6;
}

.state-far-right {
    left: 2248px;
    width: 862.98px;
    height: 539.37px;
    top: 39px;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}



/* Gradient side masks to blend with background */
.motion-gradient {
    position: absolute;
    width: 355px;
    height: 543px;
    pointer-events: none;
    z-index: 10;
}

.motion-gradient-right {
    position: absolute;
    width: 355px;
    height: 543px;
    left: 1373px;
    top: 40px;
    background: linear-gradient(270deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 10;
}

.motion-gradient-left {
    position: absolute;
    width: 355px;
    height: 543px;
    left: -6px;
    top: 39px;
    background: linear-gradient(270deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);
    transform: rotate(-180deg);
    pointer-events: none;
    z-index: 10;
}

/* Navigation Arrows */
.motion-nav-arrow {
    position: absolute;
    width: 64px;
    height: 64px;
    top: 298px; /* Center aligned with the shifted 40px top + 40px height */
    z-index: 15;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0%, rgba(245, 245, 245, 0.25) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.45);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}
.motion-arrow-left {
    left: 300px;
}

.motion-arrow-right {
    left: 1364px;
    transform: rotate(180deg);
}

.motion-nav-arrow img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: transform 0.2s ease;
}

.motion-nav-arrow:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.75) 0%, rgba(245, 245, 245, 0.45) 100%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.motion-arrow-left:hover {
    transform: scale(1.08);
}

.motion-arrow-right:hover {
    transform: rotate(180deg) scale(1.08);
}

.motion-arrow-left:hover img {
    transform: translateX(-2px);
}

.motion-arrow-right:hover img {
    transform: translateX(-2px);
}

/* Composition (Description Card Box) */
.motion-composition {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px 25px;
    gap: 12px;
    position: absolute;
    width: 1064px;
    height: 158px;
    left: 332px;
    top: 612px;
    background-image: url('../10-Motion design/Descriptif.webp');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    box-sizing: border-box;
    z-index: 10;
    cursor: pointer;
    transition: box-shadow 0.3s ease;
}

.motion-composition:hover {
    box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.08);
}

.motion-composition:hover .motion-bouton-tout-voir {
    transform: translateY(-4px);
}

.motion-descriptif-text {
    width: 1030px;
    height: auto;
    font-family: 'Source Code Pro', monospace;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 18px;
    color: #101010;
    text-align: left;
    margin: 0;
    white-space: pre-line;
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
}

/* BOUTON TOUT VOIR */
.motion-bouton-tout-voir {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 0px;
    gap: 113px;
    width: 22px;
    height: 13px;
    flex: none;
    order: 1;
    flex-grow: 0;
    transition: transform 0.3s ease;
}

/* Line 1 */
.motion-line-1 {
    margin: 0 auto;
    display: none;
    width: 84.53px;
    height: 0.12px;
    border: 1px solid #101010;
    transform: rotate(0.08deg);
    flex: none;
    order: 0;
    flex-grow: 0;
}

/* arrow-24-regular inside button */
.motion-arrow-24-regular {
    margin: 0 auto;
    width: 22px;
    height: 13px;
    transform: rotate(180deg);
    flex: none;
    order: 1;
    flex-grow: 0;
}

.motion-arrow-24-regular img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* Ellipse 1 */
.motion-ellipse-1 {
    box-sizing: border-box;
    position: absolute;
    visibility: hidden;
    width: 219px;
    height: 219px;
    left: 827px;
    top: 506px;
    background: rgba(217, 217, 217, 0.5);
    border: 3px solid #FFFFFF;
}

/* f7:hand-draw */
.motion-hand-draw {
    position: absolute;
    visibility: hidden;
    width: 91px;
    height: 91px;
    left: 889px;
    top: 569px;
    transform: rotate(-2.99deg);
}

.motion-hand-draw::after {
    content: '';
    position: absolute;
    left: 0.35%;
    right: 6.33%;
    top: 10.24%;
    bottom: 8.55%;
    background: #FFFFFF;
    transform: rotate(-2.99deg);
}

/* uil:arrows-h */
.motion-arrows-h {
    position: absolute;
    visibility: hidden;
    width: 118px;
    height: 118px;
    left: 796px;
    top: 351px;
}

.motion-arrows-h::after {
    content: '';
    position: absolute;
    left: 8.47%;
    right: 8.23%;
    top: 28.81%;
    bottom: 29.48%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #FFFFFF;
}

/* Mute Button */
.motion-mute-btn {
    position: absolute;
    bottom: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    z-index: 20;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0%, rgba(245, 245, 245, 0.25) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.45);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
}

.motion-mute-btn svg {
    width: 18px;
    height: 18px;
    stroke: #FFFFFF;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.motion-slide.playing .motion-mute-btn {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.motion-mute-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.75) 0%, rgba(245, 245, 245, 0.45) 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transform: scale(1.08);
}

/* Carousel Pagination Dots */
.motion-pagination {
    position: absolute;
    left: 50%;
    top: 592px;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 12px;
    z-index: 20;
}

.motion-pagination-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(16, 16, 16, 0.25);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.motion-pagination-dot:hover {
    background-color: rgba(16, 16, 16, 0.55);
}

.motion-pagination-dot.active {
    background-color: #101010;
    transform: scale(1.25);
}

/* Footer light overrides */
body.motion-light-theme .site-footer {
    background-color: #FFFFFF !important;
    color: #101010 !important;
    max-width: 100% !important;
    padding: 70px 41px 70px !important;
}

/* Responsive Scaling for viewport fit */
@media (max-width: 1728px) {
    .motion-page-wrapper {
        height: calc(805px * (100vw / 1728));
        overflow-x: hidden;
    }
    
    .motion-layout-container {
        transform: scale(calc(100vw / 1728));
        transform-origin: top left;
        margin: 0;
    }
}
