/* ========================================
   SLIDER PROFESSIONNEL - CSS
   ======================================== */

/* Variables CSS pour une maintenance facile */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --text-primary: #ffffff;
    --text-secondary: #f1f5f9;
    --overlay-color: rgba(0, 0, 0, 0.5);
    --overlay-gradient: linear-gradient(135deg, rgba(37, 99, 235, 0.8), rgba(0, 0, 0, 0.6));
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ========================================
   SECTION HERO PRINCIPALE
   ======================================== */
.hero-section {
    position: relative;
    margin-top: 3rem;
    height: 80vh; /* 100vh moins la hauteur du footer */
    /* min-height: 600px; */
    overflow: hidden;
}

/* ========================================
   CAROUSEL PRINCIPAL
   ======================================== */
#hero-carousel {
    height: 80vh; /*100vh;*/
    position: relative;
}

.carousel-inner {
    height: 100%;
}

.carousel-item {
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   IMAGES ET OVERLAY
   ======================================== */
.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-gradient);
    z-index: 2;
}

/* ========================================
   CONTAINER ET CONTENU
   ======================================== */
.carousel-container {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.carousel-content {
    padding-top: 2rem;
    text-align: center;
    animation: slideInUp 0.8s ease-out;
}

/* ========================================
   BADGES
   ======================================== */
.slide-badge {
    display: inline-block;
    margin-bottom: 1.5rem;
    animation: fadeInScale 0.6s ease-out 0.2s both;
}

.badge-text {
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-medium);
}

/* ========================================
   TITRES
   ======================================== */
.carousel-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.8s ease-out 0.3s both;
}

.title-highlight {
    color: var(--accent-color);
    position: relative;
    display: inline-block;
}

.title-highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
    animation: expandWidth 0.6s ease-out 0.8s both;
}

/* ========================================
   DESCRIPTIONS
   ======================================== */
.carousel-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    animation: slideInUp 0.8s ease-out 0.4s both;
}

/* ========================================
   BOUTONS D'ACTION
   ======================================== */
.carousel-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: slideInUp 0.8s ease-out 0.5s both;
}

.carousel-actions .btn {
    /* padding: 0.875rem 2rem; */
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    box-shadow: var(--shadow-medium);
}

.carousel-actions .btn-primary {
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: white;
}

.carousel-actions .btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.carousel-actions .btn-outline-light {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
}

.carousel-actions .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

/* ========================================
   CONTRÔLES DE NAVIGATION
   ======================================== */
.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    opacity: 0.8;
}

.carousel-control-prev {
    left: 2rem;
}

.carousel-control-next {
    right: 2rem;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background: none;
    width: 24px;
    height: 24px;
}

.carousel-control-prev-icon i,
.carousel-control-next-icon i {
    font-size: 24px;
    color: white;
}

/* ========================================
   INDICATEURS
   ======================================== */
.carousel-indicators {
    bottom: 2rem;
    margin-bottom: 0;
    gap: 0.5rem;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    margin: 0;
    transition: var(--transition);
}

.carousel-indicators button.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: scale(1.2);
}

.carousel-indicators button:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

/* ========================================
   BARRE DE PROGRESSION
   ======================================== */
.carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.progress-bar {
    height: 100%;
    background: var(--accent-color);
    width: 0%;
    transition: width 0.1s linear;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes expandWidth {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablettes */
@media (min-width: 780px) {
    .hero-section {
        height: 100vh;
        /* min-height: 500px; */
        margin-top: 2rem;
    }

    .carousel-description {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .carousel-actions {
        flex-direction: column;
        align-items: center;
    }

    .carousel-actions .btn {
        width: 100%;
        max-width: 280px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 50px;
        height: 50px;
    }

    .carousel-control-prev {
        left: 1rem;
    }

    .carousel-control-next {
        right: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: 100vh;
        min-height: 500px;
    }

    .carousel-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .carousel-description {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .carousel-actions {
        flex-direction: column;
        align-items: center;
    }

    .carousel-actions .btn {
        width: 100%;
        max-width: 280px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 50px;
        height: 50px;
    }

    .carousel-control-prev {
        left: 1rem;
    }

    .carousel-control-next {
        right: 1rem;
    }
}

/* Mobiles */
@media (max-width: 576px) {
    .hero-section {
        min-height: 450px;
    }

    .carousel-container {
        padding: 0 1rem;
    }

    .carousel-title {
        font-size: 2rem;
        line-height: 1.3;
    }

    .carousel-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .carousel-actions .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .slide-badge {
        margin-bottom: 1rem;
    }

    .badge-text {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
    }
}

/* Très petits écrans */
@media (max-width: 380px) {
    .carousel-title {
        font-size: 1.75rem;
    }

    .carousel-description {
        font-size: 0.95rem;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
    }

    .carousel-control-prev-icon i,
    .carousel-control-next-icon i {
        font-size: 20px;
    }
}

/* ========================================
   OPTIMISATIONS PERFORMANCE
   ======================================== */
.carousel-item {
    will-change: transform;
}

.carousel-image img {
    will-change: transform;
}

/* Réduction des animations pour les utilisateurs qui préfèrent moins de mouvement */
@media (prefers-reduced-motion: reduce) {
    .carousel-content,
    .slide-badge,
    .carousel-title,
    .carousel-description,
    .carousel-actions {
        animation: none;
    }

    .carousel-control-prev:hover,
    .carousel-control-next:hover {
        transform: translateY(-50%);
    }

    .carousel-indicators button:hover {
        transform: none;
    }
}
