/* Project Gallery Block Styles */
.project-area {
    background-color: #09090b;
    overflow: hidden;
    padding-top: 120px;
    padding-bottom: 140px;
}

.project__wrapper {
    display: flex;
    position: relative;
    margin: 0 0 75px 0;
}

/* Section Title */
.section__title {
    text-align: left;
    width: 420px;
    flex: 0 0 auto;
    margin: 70px 0 0 0;
    position: relative;
}

.section__title .title {
    margin: 0 0 10px 0;
    font-size: 45px;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    font-family: 'Barlow', sans-serif;
    line-height: 1.1;
    letter-spacing: 1px;
}

.section__title .sub-title {
    display: block;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 2px;
    font-weight: 600;
    color: var(--main-color) !important;
    line-height: 1;
    margin: 0;
}

/* Flèches avec effet click */
.slider-button-prev {
    position: absolute;
    transform: translateY(-50%) rotate(180deg);
    display: flex;
    align-items: center;
    line-height: 1;
    font-size: 38px;
    letter-spacing: -7px;
    left: 30.5%;
    top: 50%;
    cursor: pointer;
    z-index: 10;
}

.slider-button-prev i {
    transition: all 0.3s ease-out;
    color: #fff;
    animation: shapeBlinker 0.6s linear infinite;
}

.slider-button-prev i:last-child {
    color: var(--main-color) !important;
    animation-delay: 0.2s;
}

@keyframes shapeBlinker {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

/* Carousel container */
.swiper-container.project-active {
    margin: 0 -180px 0 160px;
    overflow: hidden;
}

.swiper-wrapper {
    display: flex;
    transition: transform 0.8s ease;
    height: 100%;
}

.swiper-slide {
    flex-shrink: 0;
    width: 280px;
    margin-right: 20px;
    height: 400px; /* Hauteur fixe pour uniformité */
}

/* Project items - taille optimisée */
.project__item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    width: 100%;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    display: block;
}

.project__item:hover {
    /* transform: translateY(-8px) scale(1.02); */
    box-shadow: 0 15px 35px rgba(69, 248, 130, 0.2);
}

.project__item img {
    width: 100%;
    height: 30rem !important;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
    display: block;
    border-radius: 12px;
}

.project__item:hover img {
    transform: scale(1.08);
    /* height: 100%; */
}

/* Assurer que les liens d'images prennent toute la place */
.project__item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* Overlay moderne */
.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px;
    opacity: 0;
    transition: all 0.4s ease;
    transform: translateY(100%);
}

.project__item:hover .project-overlay {
    opacity: 1;
    transform: translateY(0);
}

.project-overlay .project-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: var(--main-color);
}

.project-overlay .project-subtitle {
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.9;
}

/* Barre de progression interactive */
.swiper-scrollbar {
    display: block;
    width: 100%;
    height: 6px;
    position: relative;
    margin: 11px 0;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.swiper-scrollbar:hover {
    height: 8px;
}

.swiper-scrollbar-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.swiper-scrollbar-drag {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--main-color), #00ff88);
    border-radius: 3px;
    transition: all 0.5s ease;
    box-shadow: 0 0 15px rgba(69, 248, 130, 0.5);
    cursor: pointer;
}

.swiper-scrollbar:hover .swiper-scrollbar-drag {
    box-shadow: 0 0 20px rgba(69, 248, 130, 0.8);
}

/* Cercle indicateur sur la barre */
.swiper-scrollbar-drag::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: #ffffff;
    border: 2px solid var(--main-color);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(69, 248, 130, 0.8);
    transition: all 0.3s ease;
}

.swiper-scrollbar:hover .swiper-scrollbar-drag::after {
    width: 16px;
    height: 16px;
    right: -8px;
    box-shadow: 0 0 15px rgba(69, 248, 130, 1);
}

/* Swiper notifications */
.swiper-notification {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
    opacity: 0;
    z-index: -1000;
}

/* Container */
.custom-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
}

/* Responsive Design - Basé sur les breakpoints du thème */

/* XXL breakpoint - 1500px+ */
@media (min-width: 1500px) {
    .custom-container {
        max-width: 1500px;
    }
    
    .swiper-container.project-active {
        margin: 0 -160px 0 180px;
    }
    
    .slider-button-prev {
        left: 28%;
    }
    
    .swiper-slide {
        width: 300px;
    }
}

/* XL breakpoint - 1400px */
@media (max-width: 1399px) {
    .swiper-container.project-active {
        margin: 0 -230px 0 100px;
    }
    
    .slider-button-prev {
        left: 34.5%;
    }
}

/* LG breakpoint - 1200px */
@media (max-width: 1199px) {
    .swiper-container.project-active {
        margin: 0 -230px 0 80px;
    }
    
    .slider-button-prev {
        left: 43.5%;
    }
    
    .section__title {
        width: 380px;
    }
    
    .section__title .title {
        font-size: 42px;
    }
}

/* MD breakpoint - 992px */
@media (max-width: 991px) {
    .project__wrapper {
        flex-direction: column;
        gap: 50px;
        margin: 0 0 50px;
    }
    
    .section__title {
        width: 100%;
        flex: 0 0 auto;
        text-align: center;
        margin: 0;
    }
    
    .section__title .title {
        font-size: 40px;
    }
    
    .swiper-container.project-active {
        margin: 0 -150px;
    }
    
    .slider-button-prev {
        left: 50%;
        top: auto;
        bottom: -60px;
        transform: translateX(-50%) rotate(180deg);
        position: relative;
        margin-top: 30px;
        justify-content: center;
    }
    
    .swiper-scrollbar {
        margin: 30px 0 11px;
    }
}

/* SM breakpoint - 768px */
@media (max-width: 767px) {
    .project-area {
        padding-top: 100px;
        padding-bottom: 100px;
    }
    
    .project__wrapper {
        margin: 0 0 40px;
        flex-direction: column;
        gap: 40px;
    }
    
    .section__title {
        width: 100%;
        text-align: center;
        margin: 0;
    }
    
    .section__title .title {
        font-size: 35px;
        line-height: 1.1;
        margin-bottom: 8px;
    }
    
    .section__title .sub-title {
        font-size: 12px;
        letter-spacing: 1.5px;
    }
    
    .swiper-container.project-active {
        margin: 0 -50px;
        display: block !important;
        overflow: visible !important;
    }
    
    .swiper-slide {
        width: 240px;
        margin-right: 15px;
        height: 320px;
    }
    
    .slider-button-prev {
        left: 50%;
        top: auto;
        bottom: -50px;
        transform: translateX(-50%) rotate(180deg);
        position: relative;
        margin-top: 25px;
        font-size: 32px;
    }
    
    .swiper-scrollbar {
        margin: 25px 20px 11px;
        height: 4px;
    }
    
    .project-overlay {
        padding: 15px;
    }
    
    .project-overlay .project-title {
        font-size: 1rem;
    }
    
    .project-overlay .project-subtitle {
        font-size: 0.8rem;
    }
}

/* XS breakpoint - 576px */
@media (max-width: 575px) {
    .project-area {
        padding-top: 80px;
        padding-bottom: 80px;
    }
    
    .project__wrapper {
        margin: 0 0 30px;
        gap: 30px;
    }
    
    .section__title .title {
        font-size: 28px;
        line-height: 1.2;
        margin-bottom: 6px;
    }
    
    .section__title .sub-title {
        font-size: 11px;
        letter-spacing: 1px;
    }
    
    .swiper-container.project-active {
        margin: 0 -30px;
    }
    
    .swiper-slide {
        width: 200px;
        margin-right: 12px;
        height: 280px;
    }
    
    .project__item {
        border-radius: 8px;
    }
    
    .project__item img {
        border-radius: 8px;
    }
    
    .slider-button-prev {
        font-size: 28px;
        bottom: -40px;
        margin-top: 20px;
    }
    
    .swiper-scrollbar {
        margin: 20px 15px 8px;
        height: 3px;
    }
    
    .swiper-scrollbar-drag::after {
        width: 10px;
        height: 10px;
        right: -5px;
    }
    
    .project-overlay {
        padding: 12px;
    }
    
    .project-overlay .project-title {
        font-size: 0.9rem;
        margin-bottom: 3px;
    }
    
    .project-overlay .project-subtitle {
        font-size: 0.75rem;
    }
}

/* XXS breakpoint - très petits écrans */
@media (max-width: 480px) {
    .project-area {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    
    .custom-container {
        padding: 0 10px;
    }
    
    .section__title .title {
        font-size: 24px;
    }
    
    .swiper-container.project-active {
        margin: 0 -20px;
    }
    
    .swiper-slide {
        width: 180px;
        margin-right: 10px;
        height: 240px;
    }
    
    .slider-button-prev {
        font-size: 24px;
    }
    
    .swiper-scrollbar {
        margin: 15px 10px 6px;
    }
}

/* Orientation paysage pour mobiles */
@media (max-width: 767px) and (orientation: landscape) {
    .project-area {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    
    .project__wrapper {
        gap: 25px;
    }
    
    .section__title .title {
        font-size: 30px;
    }
    
    .swiper-slide {
        height: 200px;
    }
}

/* Mode sombre adaptatif */
@media (prefers-color-scheme: dark) {
    .project-overlay {
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    }
}

/* Réduction du mouvement pour l'accessibilité */
@media (prefers-reduced-motion: reduce) {
    .project__item,
    .project__item img,
    .project-overlay,
    .swiper-scrollbar-drag,
    .slider-button-prev i {
        transition: none;
    }
    
    .slider-button-prev i {
        animation: none;
    }
    
    .project__item:hover {
        transform: none;
    }
    
    .project__item:hover img {
        transform: none;
    }
}

/* Overlay moderne avec icônes */
.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px;
    opacity: 0;
    transition: all 0.4s ease;
    transform: translateY(100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.project__item:hover .project-overlay {
    opacity: 1;
    transform: translateY(0);
}

.project-overlay .project-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: var(--main-color);
}

.project-overlay .project-subtitle {
    font-size: 0.85rem;
    margin: 0 0 10px 0;
    opacity: 0.9;
}

/* Icônes dans l'overlay */
.project-overlay i.flaticon-right-arrow {
    display: inline-block;
    color: var(--main-color);
    font-size: 16px;
    margin-right: 5px;
    animation: slideArrow 1s ease-in-out infinite;
}

.project-overlay i.flaticon-right-arrow:last-child {
    animation-delay: 0.2s;
}

@keyframes slideArrow {
    0%, 100% { 
        transform: translateX(0); 
        opacity: 1; 
    }
    50% { 
        transform: translateX(5px); 
        opacity: 0.7; 
    }
}

/* Responsive overlay */
@media (max-width: 767px) {
    .project-overlay {
        padding: 15px;
    }
    
    .project-overlay .project-title {
        font-size: 1rem;
    }
    
    .project-overlay .project-subtitle {
        font-size: 0.8rem;
    }
    
    .project-overlay i.flaticon-right-arrow {
        font-size: 14px;
    }
}

@media (max-width: 575px) {
    .project-overlay {
        padding: 12px;
    }
    
    .project-overlay .project-title {
        font-size: 0.9rem;
        margin-bottom: 3px;
    }
    
    .project-overlay .project-subtitle {
        font-size: 0.75rem;
        margin-bottom: 8px;
    }
    
    .project-overlay i.flaticon-right-arrow {
        font-size: 12px;
    }
}
