body {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Arial', sans-serif; /* Police par défaut conservée */
    color: #333;
    overflow-x: hidden; /* Empêche le défilement horizontal */
}

.container-fluid {
    background-color: rgba(255, 255, 255, 0.9); /* Plus opaque pour un meilleur contraste */
    border-radius: 20px; /* Bords plus arrondis */
    padding: 50px; /* Padding augmenté */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15); /* Ombre plus prononcée */
    max-width: 95%; /* Plus large sur les grands écrans */
    margin-top: 50px;
    margin-bottom: 50px;
    position: relative;
}

.header-section {
    text-align: center;
    margin-bottom: 50px; /* Marge inférieure augmentée */
}

.app-logo {
    width: 150px; /* Taille légèrement augmentée */
    height: auto;
    margin-bottom: 20px; /* Marge augmentée */
    animation: bounceIn 1s ease-out; /* Animation d'apparition */
}

.app-name {
    font-family: 'Arial Narrow', sans-serif;
    font-size: 4.5rem; /* Très grande taille */
    font-weight: normal;
    color: #188AC9; /* Couleur rouge-corail attrayante */
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2); /* Ombre plus marquée */
    letter-spacing: 3px; /* Espacement des lettres augmenté */
    margin-top: 15px;
    margin-bottom: 25px;
}

.search-bar-container {
    margin-bottom: 40px; /* Marge inférieure augmentée */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.search-select {
    border-radius: 50px 0 0 50px;
    padding: 15px 20px;
    border: 2px solid #ccc;
    border-right: none;
    font-size: 1.1rem;
    background-color: #f8f9fa;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease;
}

.search-select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.1);
}

.search-input {
    flex-grow: 1;
    max-width: 600px;
    padding: 15px 25px;
    border-radius: 0 50px 50px 0;
    border: 2px solid #ccc;
    border-left: none;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
    outline: none;
}

.tagline {
    text-align: center;
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 60px; /* Marge inférieure augmentée */
    line-height: 1.7;
    font-style: italic; /* Style italique */
}

.departments-carousel {
    position: relative;
    width: 100%;
    overflow: hidden; /* Clé pour masquer les images hors champ */
    margin-top: 30px; /* Marge supérieure pour l'espacement */
}

.carousel-inner {
    display: flex;
    animation: infinite-scroll 40s linear infinite; /* Vitesse d'animation ajustée */
    white-space: nowrap; /* Ajouté pour éviter le wrap */
    width: fit-content; /* S'assure que le contenu ne déborde pas avant l'animation */
}

.department-item {
    flex: 0 0 auto;
    width: 250px; /* **Largeur fixe pour chaque élément - ajustée pour 4 images visibles sur un écran large standard** */
    text-align: center;
    padding: 0 15px;
    box-sizing: border-box;
    display: inline-block; /* Utile avec white-space: nowrap; */
    /* Ajouté pour gérer le texte en dessous */
    word-wrap: break-word; /* Permet le retour à la ligne pour les mots longs */
    white-space: normal; /* Annule white-space: nowrap pour le texte interne */
}

.department-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.department-item img:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.department-title {
    margin-top: 15px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #333;
    /* text-transform: uppercase; */ /* Tu peux réactiver si tu veux tout en majuscules */
    letter-spacing: 0.5px;
    /* **Aucun "white-space: nowrap" ici pour permettre le retour à la ligne** */
}

/* Animations */
@keyframes infinite-scroll {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%); /* Déplace d'exactement la largeur d'un jeu complet d'images */
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

@media (max-width: 992px) {
    .container-fluid {
        padding: 40px;
    }
    .app-name {
        font-size: 3.5rem;
    }
    .search-select, .search-input {
        padding: 12px 18px;
        font-size: 1rem;
    }
    /* .department-item { width: 33.33%; } <-- C'était pour la responsivité du défilement, retiré. */
}

@media (max-width: 768px) {
    .container-fluid {
        padding: 30px;
    }
    .app-name {
        font-size: 2.8rem;
    }
    .search-bar-container {
        flex-direction: column;
        align-items: stretch;
    }
    .search-select {
        border-radius: 50px 50px 0 0;
        border-right: 2px solid #ccc;
        border-bottom: none;
        margin-bottom: -2px;
        width: 100%;
    }
    .search-input {
        border-radius: 0 0 50px 50px;
        border-left: 2px solid #ccc;
        width: 100%;
    }
    .tagline {
        font-size: 1rem;
    }
    /* .department-item { width: 50%; } <-- Retiré */
    .department-item img {
        height: 160px;
    }
    .department-title {
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 20px;
    }
    .app-name {
        font-size: 2.2rem;
        letter-spacing: 1px;
    }
    .search-select, .search-input {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    /* .department-item { width: 100%; } <-- Retiré */
    .department-item img {
        height: 140px;
    }
    .department-title {
        font-size: 0.9rem;
    }
}
