/* ===== HERO CAROUSEL RESPONSIVE ===== */

.hero-carousel-container {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 50%, #2b6cb0 100%);
}

.hero-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.carousel-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 20px;
    animation: slideInUp 1s ease-out;
}

.slide-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    line-height: 1.2;
}

.slide-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.95;
    line-height: 1.6;
}

.slide-content .btn-carousel {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.slide-content .btn-carousel:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.3);
}

/* Navigation du carrousel */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.carousel-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
    left: 30px;
}

.carousel-nav.next {
    right: 30px;
}

.carousel-nav svg {
    width: 24px;
    height: 24px;
}

/* Indicateurs du carrousel */
.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 4;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background: white;
    transform: scale(1.2);
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablettes */
@media (max-width: 1024px) {
    .hero-carousel-container {
        height: 80vh;
        min-height: 500px;
    }
    
    .slide-content h1 {
        font-size: 3rem;
    }
    
    .slide-content p {
        font-size: 1.2rem;
    }
}

/* Tablettes portrait */
@media (max-width: 768px) {
    .hero-carousel-container {
        height: 70vh;
        min-height: 450px;
    }
    
    .slide-content {
        max-width: 600px;
        padding: 0 15px;
    }
    
    .slide-content h1 {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .slide-content p {
        font-size: 1.1rem;
        margin-bottom: 25px;
    }
    
    .carousel-nav {
        width: 45px;
        height: 45px;
    }
    
    .carousel-nav.prev {
        left: 20px;
    }
    
    .carousel-nav.next {
        right: 20px;
    }
    
    .carousel-nav svg {
        width: 20px;
        height: 20px;
    }
}

/* Mobiles larges */
@media (max-width: 425px) {
    .hero-carousel-container {
        height: 60vh;
        min-height: 400px;
    }
    
    .slide-content h1 {
        font-size: 2.2rem;
        margin-bottom: 12px;
    }
    
    .slide-content p {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .slide-content .btn-carousel {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
    }
    
    .carousel-nav.prev {
        left: 15px;
    }
    
    .carousel-nav.next {
        right: 15px;
    }
    
    .carousel-nav svg {
        width: 18px;
        height: 18px;
    }
    
    .carousel-indicators {
        bottom: 20px;
    }
    
    .carousel-indicator {
        width: 10px;
        height: 10px;
    }
}

/* Mobiles moyens */
@media (max-width: 375px) {
    .slide-content h1 {
        font-size: 2rem;
    }
    
    .slide-content p {
        font-size: 0.95rem;
    }
    
    .slide-content .btn-carousel {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Petits mobiles */
@media (max-width: 320px) {
    .hero-carousel-container {
        min-height: 350px;
    }
    
    .slide-content {
        padding: 0 10px;
    }
    
    .slide-content h1 {
        font-size: 1.8rem;
    }
    
    .slide-content p {
        font-size: 0.9rem;
    }
    
    .carousel-nav {
        width: 35px;
        height: 35px;
    }
    
    .carousel-nav.prev {
        left: 10px;
    }
    
    .carousel-nav.next {
        right: 10px;
    }
    
    .carousel-nav svg {
        width: 16px;
        height: 16px;
    }
}

/* Optimisations pour les écrans tactiles */
@media (hover: none) and (pointer: coarse) {
    .carousel-nav {
        background: rgba(255, 255, 255, 0.3);
        width: 55px;
        height: 55px;
    }
    
    .carousel-nav:active {
        background: rgba(255, 255, 255, 0.5);
    }
    
    .carousel-indicator {
        width: 14px;
        height: 14px;
    }
    
    .slide-content .btn-carousel {
        padding: 16px 32px;
        font-size: 1.1rem;
    }
}

/* Préchargement des images */
.carousel-slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Indicateur de chargement */
.carousel-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    z-index: 5;
}

.carousel-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}