/* ==========================================================================
   Custom Scroll Animations for "Notre Concept"
   ========================================================================== */

/* Use the original border as a faint guideline for the drawing animation */
.process-card .process-card-number {
    border-bottom: 2px solid rgba(213, 215, 218, 0.15) !important;
    position: relative;
    padding-bottom: 22px;
}

/* Pseudo-element representing the dynamic drawing line */
.process-card .process-card-number::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px; /* aligns perfectly on top of the 2px border */
    width: calc(var(--line-progress, 0) * 1%) !important;
    height: 2px;
    background-color: var(--smoke-color);
    z-index: 2;
}

/* The dot at the end of the line (scale is controlled via JS/GSAP) */
.process-card .process-card-number::after {
    transform: translate(0px, 50%) scale(var(--dot-scale, 0)) !important;
    transform-origin: center center;
    transition: transform 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important; /* bounce effect */
}

/* Smooth reveal states for GSAP */
.process-card-title,
.process-card-text {
    will-change: transform, opacity;
}

/* ==========================================================================
   Custom Text Reveal Animations (WOW.js compatible)
   ========================================================================== */

.text-custom-anim-right {
    animation: text-anim-right 1.3s forwards cubic-bezier(0.645, 0.045, 0.355, 1) 0.4s;
    opacity: 0;
    will-change: transform, opacity, clip-path;
}

@keyframes text-anim-right {
    0% {
        transform: translateX(5%);
        clip-path: inset(0 0 0 100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        clip-path: inset(0 0 0 0);
        opacity: 1;
    }
}

.text-custom-anim-left {
    animation: text-anim-left 1.3s forwards cubic-bezier(0.645, 0.045, 0.355, 1) 0.4s;
    opacity: 0;
    will-change: transform, opacity, clip-path;
}

@keyframes text-anim-left {
    0% {
        transform: translateX(-5%);
        clip-path: inset(0 100% 0 0);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        clip-path: inset(0 0 0 0);
        opacity: 1;
    }
}

/* ==========================================================================
   Custom Scroll Animations for "Events" List Items
   ========================================================================== */

/* Use the original borders as guidelines */
.award-wrap-area .single-award-list {
    border-bottom: 2px solid rgba(10, 12, 0, 0.1) !important;
    position: relative;
    will-change: transform, opacity;
}

.award-wrap-area .single-award-list:first-child {
    border-top: 2px solid rgba(10, 12, 0, 0.1) !important;
}

/* Active drawing bottom line */
.award-wrap-area .single-award-list::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px; /* cover the bottom border */
    width: calc(var(--line-progress, 0) * 1%) !important;
    height: 2px;
    background-color: var(--title-color);
    z-index: 2;
}

/* Active drawing top line on the first item */
.award-wrap-area .single-award-list:first-child::after {
    content: "";
    position: absolute;
    left: 0;
    top: -2px; /* cover the top border */
    width: calc(var(--top-line-progress, 0) * 1%) !important;
    height: 2px;
    background-color: var(--title-color);
    z-index: 2;
}

/* ==========================================================================
   Custom Scroll Animations for "Service Section" Image Stack
   ========================================================================== */

.service-img-stack {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 580px;
    background-color: var(--title-color);
}

@media (max-width: 991px) {
    .service-img-stack {
        min-height: 480px;
    }
}

/* Individual stack items */
.service-img-stack .img-stack-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    will-change: transform, opacity;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.service-img-stack .img-stack-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Stacking order */
.service-img-stack .item-1 {
    z-index: 1;
}

.service-img-stack .item-2 {
    z-index: 2;
}

.service-img-stack .item-3 {
    z-index: 3;
}

/* ==========================================================================
   Custom Scroll Animations for "Testimonials" Horizontal Scroll
   ========================================================================== */

@media (min-width: 992px) {
    .testi-slider-scroll {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 4vw !important;
        width: max-content !important;
        padding-left: 25vw !important; /* Centers active card: (100vw - 50vw) / 2 = 25vw */
        padding-right: 25vw !important;
        align-items: center !important;
        will-change: transform;
        transition: none !important;
    }

    .testi-slider-scroll > [class^="col-"] {
        width: 50vw !important;
        flex: 0 0 50vw !important;
        max-width: none !important;
        will-change: transform, opacity, filter;
        transition: transform 0.2s ease-out, opacity 0.2s ease-out, filter 0.2s ease-out !important; /* smooth transitions between scroll steps */
    }

    /* Prevent clipping card shadows on the container edge */
    .testimonial-area-2 {
        overflow: hidden;
        position: relative;
    }
}

/* ==========================================================================
   Custom Instagram Reels Section Styles
   ========================================================================== */

/* Grid adjustments for Reels */
.instagram-reels-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-top: 50px;
}

/* Card design mimicking Instagram Reels */
.instagram-reel-card {
    position: relative;
    width: 100%;
    max-width: 360px;
    aspect-ratio: 9 / 16;
    height: 580px; /* fallback height */
    border-radius: 20px;
    overflow: hidden;
    background-color: #000;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    margin: 0 auto;
    cursor: pointer;
    transition: box-shadow 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.instagram-reel-card.ready {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
}

@media (max-width: 575px) {
    .instagram-reel-card {
        height: 500px;
    }
}

.instagram-reel-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
}

/* Video inside preview card */
.reel-video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s ease;
}

.instagram-reel-card:hover .reel-video-preview {
    transform: scale(1.05);
}

/* Overlay gradient & content */
.reel-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    z-index: 2;
    pointer-events: none; /* Make click go through to the card */
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0) 25%,
        rgba(0, 0, 0, 0) 65%,
        rgba(0, 0, 0, 0.85) 100%
    );
}

/* Instagram-style top header */
.reel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.reel-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reel-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--theme-color);
    padding: 2px;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.reel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.reel-username {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    letter-spacing: 0.3px;
}

.reel-badge {
    color: #fff;
    font-size: 18px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

/* Play indicator that pulses on hover */
.reel-play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.instagram-reel-card:hover .reel-play-indicator {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Footer elements */
.reel-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: auto; /* Allow buttons to be clicked */
}

.reel-caption-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-family: var(--title-font);
    letter-spacing: -0.5px;
}

.reel-caption-desc {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Glassmorphic "VOIR LA VIDÉO" button */
.reel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 8px;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    width: 100%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.reel-btn i {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.reel-btn:hover {
    background: var(--theme-color);
    color: var(--title-color);
    border-color: var(--theme-color);
    box-shadow: 0 8px 25px rgba(227, 255, 4, 0.4);
}

.reel-btn:hover i {
    transform: translate(2px, -2px);
}


/* ==========================================================================
   Custom Smartphone Reels Modal Player
   ========================================================================== */

.reel-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reel-modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* Smartphone Wrapper */
.reel-phone-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 85vh;
    max-height: 760px;
    aspect-ratio: 9 / 16;
    background: #000;
    border-radius: 36px;
    border: 8px solid #222;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (max-width: 480px) {
    .reel-phone-wrapper {
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        border: none;
    }
}

.reel-modal-overlay.show .reel-phone-wrapper {
    transform: scale(1) translateY(0);
}

/* Fullscreen Video inside smartphone */
.modal-reel-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #000;
}

/* Close Button (top-right of screen, outside or inside on mobile) */
.reel-modal-close {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

.reel-modal-close:hover {
    background: var(--theme-color);
    color: var(--title-color);
    border-color: var(--theme-color);
    transform: rotate(90deg);
}

/* Custom Controls Overlay */
.reel-modal-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 24px 24px 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: #fff;
}

/* Header inside modal (Instagram Profile) */
.modal-reel-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-reel-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-reel-author-name {
    font-size: 14px;
    font-weight: 600;
}

.modal-reel-caption {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    margin: 0;
}

/* Row with play/mute icons */
.modal-control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 5px;
}

.modal-action-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s ease;
}

.modal-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.modal-action-btn:active {
    transform: scale(0.95);
}

/* Progress bar styles */
.reel-progress-container {
    position: relative;
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
}

.reel-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--theme-color);
    border-radius: 10px;
    transition: width 0.1s linear;
}

/* Video Loader and Spinner */
.reel-video-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.reel-video-loader.show {
    opacity: 1;
    pointer-events: auto;
}

.reel-spinner {
    width: 45px;
    height: 45px;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-top: 4px solid var(--theme-color, #e3ff04);
    border-radius: 50%;
    animation: reel-spin 0.8s linear infinite;
}

@keyframes reel-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Full-Screen (100vh) Sections Adjustment
   ========================================================================== */

/* Apply minimum height and center contents vertically for full-screen feel */
@media (min-width: 992px) {
    .feature-area-1,
    .about-area-1,
    .service-area-1,
    .testimonial-area-2 {
        min-height: calc(100vh - 90px) !important; /* Subtract sticky header height (90px) on desktop */
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        padding-top: 60px !important;
        padding-bottom: 60px !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
}

@media (max-width: 991px) {
    .feature-area-1,
    .about-area-1,
    .service-area-1,
    .testimonial-area-2 {
        min-height: 100vh !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        padding-top: 60px !important;
        padding-bottom: 60px !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
}






