* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #fefaf3 0%, #f9f4e8 100%);
    overflow-x: hidden;
}

/* Carrousel Container */
.carousel-container {
    margin-top: 30px;
    display: flex;
    width: 95%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(249, 244, 232, 0.95));
    backdrop-filter: blur(10px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.1),
        0 8px 25px rgba(212, 175, 55, 0.1);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Main Slide - Modifié pour afficher l'image complète */
.main-slide {
    width: 75%;
    height: 600px;
    position: relative;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f8f9fa;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: flex-end;
}

.main-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg, 
        rgba(44, 24, 16, 0.4) 0%, 
        rgba(212, 175, 55, 0.1) 50%, 
        rgba(244, 208, 63, 0.1) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.6) 50%,
        rgba(0, 0, 0, 0.2) 80%,
        transparent 100%
    );
    z-index: 2;
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.8s ease-out 0.3s forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.main-name {
    font-size: 1.9rem;
    margin-bottom: 12px;
    font-weight: 600;
    color: #fff;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
    letter-spacing: 1px;
}

.main-text {
    line-height: 1.8;
    font-size: 1.9rem;
    color: #f8f9fa;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
    max-width: 500px;
}

/* Thumbnails */
.thumbnails {
    flex: 1;
    background: linear-gradient(180deg, #faf7f0 0%, #f5f1e8 100%);
    padding: 25px 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
}

.thumbnails::-webkit-scrollbar {
    width: 6px;
}

.thumbnails::-webkit-scrollbar-track {
    background: rgba(212, 175, 55, 0.1);
    border-radius: 3px;
}

.thumbnails::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d4af37, #f4d03f);
    border-radius: 3px;
}

.thumbnail {
    width: 100%;
    padding: 15px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.1);
    position: relative;
    overflow: hidden;
}

.thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    transition: left 0.6s ease;
}

.thumbnail:hover::before {
    left: 100%;
}

.thumbnail:hover {
    transform: translateX(8px) scale(1.02);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.2);
}

.thumbnail.active {
    background: linear-gradient(135deg, #d4af37, #f4d03f);
    color: white;
    font-weight: 700;
    transform: translateX(12px) scale(1.05);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.4);
}

.thumbnail.active .thumbnail-name {
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.thumbnail img {
    width: 100%;
    border-radius: 8px;
    height: 80px;
    object-fit: cover;
    transition: all 0.3s ease;
    filter: brightness(0.9);
}

.thumbnail:hover img {
    filter: brightness(1.1) contrast(1.1);
}

.thumbnail.active img {
    filter: brightness(1.2) contrast(1.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.thumbnail-name {
    margin-top: 10px;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 600;
    color: #2c1810;
    transition: all 0.3s ease;
}

/* Option alternative : Utiliser object-fit pour une image HTML */
.main-slide-alt {
    width: 75%;
    height: 600px;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-slide-alt img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive Design */
@media (max-width: 991px) {
    .carousel-container {
        flex-direction: column;
        margin-top: 80px;
        width: 98%;
    }

    .main-slide {
        width: 100%;
        height: 450px;
    }

    .thumbnails {
        flex-direction: row;
        padding: 20px;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .thumbnail {
        min-width: 120px;
        flex-shrink: 0;
    }

    .main-name {
        font-size: 1.8rem;
    }

    .main-text {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .overlay {
        padding: 25px;
    }

    .main-name {
        font-size: 1.2rem;
    }

    .carousel-container {
        border-radius: 15px;
        margin: 70px 10px 20px;
    }

    .main-slide {
        height: 350px;
    }
}

/* Animation d'entrée */
.carousel-container {
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Classe pour forcer l'affichage complet de l'image */
.main-slide.full-image {
    background-size: contain !important;
    background-position: center !important;
}

/* Style de heroContainerOne */
#heroContainerOne img {
    width: 100%;           /* L’image prendra toute la largeur du conteneur */
    height: 600px;          /* Pour garder les proportions */
    display: block;        /* Élimine l’espace sous l’image */
    margin: 0 auto;        /* Centre l’image horizontalement */
    border-radius: 8px;    /* Bords légèrement arrondis */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Ombre légère */
    background: rgba(0, 0, 0, 0.3); /* Subtle dark overlay */
}


/* ============================= */
/* Responsive Screen Sizes Setup */
/* ============================= */

/* الشاشات الكبيرة: ≥1200px */
@media (min-width: 1200px) {
    .carousel-container { width: 90%; margin-top: 40px; }
    .main-slide { height: 600px; }
    .thumbnails { width: 25%; padding: 25px; }
}

/* الشاشات المتوسطة: 992px – 1199px */
@media (max-width: 1199px) and (min-width: 992px) {
    .carousel-container { width: 95%; margin-top: 35px; }
    .main-slide { height: 500px; }
    .thumbnails { width: 25%; padding: 20px; }
}

/* الشاشات الصغيرة: 768px – 991px */
@media (max-width: 991px) and (min-width: 768px) {
    .carousel-container { flex-direction: column; width: 98%; margin-top: 80px; }
    .main-slide { width: 100%; height: 450px; }
    .thumbnails { flex-direction: row; padding: 20px; gap: 10px; overflow-x: auto; }
}

/* الشاشات الصغيرة جدًا: <768px */
@media (max-width: 767px) {
    .carousel-container { width: 98%; margin: 70px 10px 20px; }
    .main-slide { height: 350px; }
    .overlay { padding: 20px; }
    .main-name { font-size: 1.5rem; }
    .thumbnails { flex-direction: row; gap: 8px; }
}
