/*
 * static/style.css
 * Styles mutualisés et optimisés pour DAPLUS
 */

/* === 1. VARIABLES ET CONFIGURATION GLOBALE === */
:root {
    --daplus-primary: #007bff;   /* Bleu Principal */
    --daplus-dark: #212529;      /* Noir/Gris Foncé */
    --daplus-accent: #ffc107;    /* Jaune Accent */
    --daplus-light-bg: #f8f9fa;  /* Gris Clair */
    --daplus-transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--daplus-dark);
    overflow-x: hidden;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.2rem); /* Typographie responsive */
    font-weight: 800;
    line-height: 1.2;
}

/* === 2. BARRE DE NAVIGATION (HEADER) === */
.navbar {
    transition: var(--daplus-transition);
    padding: 10px 0;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 1px;
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand img:hover {
    transform: scale(1.05);
}

/* Liens de navigation */
.navbar-light .navbar-nav .nav-link {
    color: #333 !important;
    transition: color 0.2s;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: var(--daplus-primary) !important;
}

/* Bouton Contact Spécifique dans Navbar */
.nav-link.btn-primary {
    background-color: var(--daplus-accent) !important;
    border-color: var(--daplus-accent) !important;
    color: var(--daplus-dark) !important;
    font-weight: 600;
    border-radius: 5px;
    margin-left: 10px;
}

.nav-link.btn-primary:hover {
    background-color: #e0a800 !important;
}

.dropdown-menu {
    border-radius: 12px;
    margin-top: 10px;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* === 3. SECTION HÉRO ET BOUTONS === */
header.bg-primary {
    background-color: var(--daplus-primary) !important;
    padding: 8rem 0 !important;
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
}

.btn-warning.btn-lg {
    background-color: var(--daplus-accent);
    border-color: var(--daplus-accent);
    color: var(--daplus-dark);
    font-size: 1.25rem;
    padding: 12px 35px;
    font-weight: 600;
    transition: var(--daplus-transition);
}

/* === 4. COMPOSANTS (CARTES ET CARROUSEL) === */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Conteneur d'images produits (Carrousel) */
.product-img-container {
    width: 100%;
    height: 220px;
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #eee;
    transition: transform 0.3s ease;
}

.product-img-container img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}

.carousel-item:hover .product-img-container {
    transform: translateY(-5px);
    border-color: var(--daplus-primary);
}

/* Médias Responsives */
.office-img, .service-card-img, .video-item iframe, .video-item video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    border: none;
}

.legend {
    font-size: 0.95rem;
    color: #333;
    min-height: 45px;
    margin-top: 10px;
}

/* === 5. FOOTER ET UTILITAIRES === */
footer.bg-dark {
    background-color: var(--daplus-dark) !important;
    padding: 3rem 0;
}

.text-secondary { color: #adb5bd !important; }
.gap-3 { gap: 1rem; }

.transition-icon { 
    transition: transform 0.3s ease, color 0.3s ease; 
}

.transition-icon:hover { 
    transform: translateY(-3px); 
    color: var(--daplus-primary) !important; 
}

.hover-link:hover { 
    text-decoration: underline !important; 
    color: var(--daplus-primary) !important; 
}

/* === 6. ADMINISTRATION (SIDEBAR) === */
.sidebar {
    background-color: var(--daplus-dark) !important;
    color: white;
    min-height: 100vh;
}

.list-group-item-action {
    color: white !important;
    background-color: var(--daplus-dark) !important;
    border: none;
    transition: background 0.2s;
}

.list-group-item-action:hover {
    background-color: #343a40 !important;
}

/* === 7. MEDIA QUERIES (ADAPTATION) === */
@media (min-width: 992px) {
    .main-content {
        margin-left: 250px;
    }
}

@media (max-width: 768px) {
    header.bg-primary {
        padding: 4rem 0 !important;
    }
    
    .product-img-container {
        height: 180px;
    }
}
/* Force l'image à remplir le conteneur sur mobile */
.carousel-item img {
    width: 100% !important;
    height: auto !important;
    max-height: 250px; /* Ajustez selon vos photos du Hilton */
    object-fit: cover; /* Évite les bords noirs/gris */
    display: block;
}

/* Sur mobile, on veut voir 1 seule image à la fois sans espace perdu */
@media (max-width: 768px) {
    .carousel-item {
        min-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .carousel-track {
        display: flex;
        gap: 0 !important; /* Supprime les écarts qui créent du vide */
    }
}
/* Adaptation des images de la galerie événements */
#evenements-gallery .carousel-item img {
    width: 100%;
    height: 300px; /* Garde une hauteur cohérente pour l'alignement */
    object-fit: contain; /* L'image s'adapte sans être rognée */
    background-color: #f8f9fa; /* Fond léger si l'image est plus étroite que le cadre */
    display: block;
}

.carousel-item {
    flex: 0 0 100%; /* Défaut mobile */
    padding: 0 !important; 
    margin: 0 !important;
}

.carousel-item img {
    width: 100% !important;
    height: auto !important;
    max-height: 250px; /* Ajustez selon vos photos du Hilton */
    object-fit: cover; /* Évite les bords noirs/gris */
    display: block;
}

/* La légende collée */
.carousel-item .legend {
    margin: 0 !important;
    padding: 5px 10px;
    font-size: 0.9rem;
    color: #333;
    text-align: center;
    width: 100%;
    background: rgba(255, 255, 255, 0.8); /* Optionnel : léger fond pour lisibilité */
}
.carousel-item .legend {
    /* Autorise le texte à passer à la ligne */
    white-space: normal !important; 
    
    /* Empêche la ligne d'être trop longue (ajustez selon vos goûts) */
    max-width: 80%; 
    
    /* Centre le bloc de texte par rapport à l'image */
    margin: 10px auto !important; 
    
    /* Améliore la lisibilité */
    line-height: 1.4; 
    text-align: center;
    font-size: 0.95rem;
    
    /* Optionnel : Coupe le texte avec des "..." s'il dépasse 2 lignes */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Nombre de lignes maximum */
    -webkit-box-orient: vertical;
    overflow: hidden;
}