/* ==========================================================================
   Variables CSS personnalisées
   ========================================================================== */
:root {
    /* Couleurs principales - adaptées à Bootstrap */
    --bs-primary: #a5603f;
    --bs-primary-hover: #6e402a;
    --bs-light: #252525; /* Changé de #f5f5f5 vers #252525 */
    --bs-dark: #252525; /* Nouvelle variable pour le thème sombre */
    --bs-warning: #ffc107;
    --bs-hero-border: #7a472e; /* Couleur de bordure pour la hero section */

    /* Typographie */
    --bs-font-sans-serif: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ==========================================================================
   Base et typographie
   ========================================================================== */
body {
    font-family: var(--bs-font-sans-serif);
    font-weight: 500;
    line-height: 1.6;
    background-color: var(--bs-dark); /* Fond sombre par défaut */
    color: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--bs-font-sans-serif);
    font-weight: 700;
    color: #ffffff; /* Titres en blanc */
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.site-header {
    background-color: #000000 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    z-index: 1030; /* Z-index élevé pour le header */
    position: fixed; /* Header fixe */
    top: 0;
    left: 0;
    right: 0;
}

.navbar-brand .logo {
    transition: all 0.3s ease;
}

.navbar-brand .logo:hover {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    color: #ffffff !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--bs-primary) !important;
}

.navbar-toggler {
    border: 2px solid #ffffff;
    border-radius: 2px;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ==========================================================================
   Main content - compensation du header fixe
   ========================================================================== */
.main-content {
    padding-top: 76px;
}

/* ==========================================================================
   Hero Section - Avec image de fond et bordures
   ========================================================================== */
.hero-section {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;

    /* Image de fond avec effet de flou */
    background-image: url('../img/pexels-photo-577585.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    /* Bordures colorées en haut et en bas */
    border-top: 2px solid var(--bs-hero-border);
    border-bottom: 6px solid var(--bs-hero-border);
}

/* Overlay pour le flou et l'assombrissement de l'image */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4); /* Overlay sombre pour améliorer la lisibilité */
    backdrop-filter: blur(1px); /* Léger effet de flou */
    z-index: 1;
}

/* Contenu de la hero section au-dessus de l'overlay */
.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section .btn-light {
    color: var(--bs-primary);
    font-weight: 700;
    transition: all 0.3s ease;
    background-color: #ffffff;
    border-color: #ffffff;
    position: relative;
    z-index: 3;
}

.hero-section .btn-light:hover {
    color: var(--bs-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background-color: #f8f9fa;
    border-color: #f8f9fa;
}

/* Amélioration de la lisibilité du texte */
.hero-section h1,
.hero-section p,
.hero-section .lead {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    position: relative;
    z-index: 2;
}

.hero-section .text-warning {
    color: var(--bs-primary) !important;
}

/* ==========================================================================
   Services Section - Thème sombre
   ========================================================================== */
.services-section {
    background-color: var(--bs-dark) !important;
}

.service-card {
    transition: all 0.3s ease;
    border: none !important;
    background-color: #333333 !important; /* Cartes en gris foncé */
    color: #ffffff;
}

.service-card h3 {
    color: #ffffff;
}

.service-card p {
    color: #cccccc; /* Texte plus clair pour la lisibilité */
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    background-color: #404040 !important; /* Légèrement plus clair au hover */
}

.service-number {
    line-height: 1;
    color: var(--bs-primary);
}

.btn-outline-primary {
    border-width: 2px;
    font-weight: 700;
    transition: all 0.3s ease;
    color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #ffffff;
}

/* ==========================================================================
   About Preview Section - Thème sombre
   ========================================================================== */
.about-preview-section {
    background-color: #333333 !important; /* Au lieu de bg-white */
}

.about-preview-section h2,
.about-preview-section p {
    color: #ffffff;
}

.about-preview-section .text-muted {
    color: #cccccc !important;
}

/* ==========================================================================
   Why Choose Section - Thème sombre SANS z-index problématique
   ========================================================================== */
.why-choose-section {
    background-color: var(--bs-dark) !important;
}

.experience-highlight {
    padding: 2rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.counter-display {
    margin-bottom: 1rem;
}

.mission-content {
    padding: 2rem;
    border-left: 4px solid var(--bs-primary);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 10px 10px 0;
}

/* ==========================================================================
   Partners Section - Images plus grandes et titres plus gros
   ========================================================================== */
.partners-section {
    padding: 1.5rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 1rem;
}

.partners-section h4 {
    font-size: 1.2rem !important; /* Augmentation de la taille de police des h4 */
    font-weight: 600 !important;
    margin-bottom: 1rem;
}

.partner-logo {
    transition: all 0.3s ease;
    filter: brightness(0) invert(1);
    max-height: 60px !important; /* Augmentation à 160px */
}

.partner-logo:hover {
    opacity: 1 !important;
    transform: scale(1.1);
    filter: brightness(1) invert(0);
}

/* ==========================================================================
   Gallery Section - Thème sombre
   ========================================================================== */
.gallery-section {
    background-color: #333333 !important; /* Au lieu de bg-light */
}

.gallery-image {
    height: 250px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.05);
}

/* ==========================================================================
   Clients Section - Thème sombre
   ========================================================================== */
.clients-section {
    background-color: var(--bs-dark) !important; /* Au lieu de bg-white */
}

.clients-section h2,
.clients-section .text-uppercase {
    color: #ffffff;
}

.client-logo {
    transition: all 0.3s ease;
    filter: grayscale(100%) brightness(0) invert(1); /* Logos en blanc */
}

.client-logo:hover {
    opacity: 1 !important;
    filter: grayscale(0%) brightness(1) invert(0);
    transform: scale(1.1);
}


/* Clients Section Styles */

/* Cartes expandues (featured) */
.client-card-expanded {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.client-card-expanded:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.client-logo-expanded {
    transition: transform 0.3s ease;
}

.client-card-expanded:hover .client-logo-expanded {
    transform: scale(1.05);
}

/* Toggle button pour les détails */
.client-card-expanded button[aria-expanded="true"] .show-more {
    display: none;
}

.client-card-expanded button[aria-expanded="true"] .show-less {
    display: inline !important;
}

/* Grille des cartes minimalistes - hauteur uniforme */
.clients-minimal-grid {
    display: flex;
    flex-wrap: wrap;
}

.clients-minimal-grid > [class*="col-"] {
    display: flex;
}

/* Cartes minimalistes avec hauteur fixe */
.client-card-minimal {
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    min-height: 160px;
    max-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

.client-card-minimal .client-logo {
    transition: transform 0.3s ease, opacity 0.3s ease;
    flex-shrink: 0;
}

.client-card-minimal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
}

.client-card-minimal-content h4 {
    flex-shrink: 0;
    transition: margin 0.4s ease;
}

/* Texte "Cliquez pour en savoir plus" */
.client-cta-hint {
    color: var(--ast-global-color-0, #a5603f) !important;
    font-style: italic;
    font-weight: 600;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Icône flèche optionnelle avec CSS */
.client-cta-hint::after {
    content: "↓";
    display: inline-block;
    font-size: 1em;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

.client-card-minimal .client-text {
    position: relative;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease,
    margin-top 0.4s ease;
}

/* État hover/actif des cartes minimalistes */
.client-card-minimal:hover,
.client-card-minimal.expanded {
    transform: translateY(-8px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
    max-height: 500px;
    min-height: 400px;
    padding-bottom: 1.5rem !important;
}

/* Masquer le CTA au hover/expansion */
.client-card-minimal:hover .client-cta-hint,
.client-card-minimal.expanded .client-cta-hint {
    opacity: 0;
    transform: translateY(-10px);
}

.client-card-minimal:hover .client-text,
.client-card-minimal.expanded .client-text {
    max-height: 500px;
    opacity: 1;
    margin-top: 10px;
}

.client-card-minimal:hover .client-logo,
.client-card-minimal.expanded .client-logo {
    transform: scale(1.1);
    opacity: 1 !important;
}

/* Animation collapse Bootstrap */
.client-details.collapsing,
.client-details.collapse.show {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 991px) {
    .client-card-minimal {
        min-height: 140px;
        max-height: 140px;
    }

    .client-card-minimal:hover,
    .client-card-minimal.expanded {
        min-height: 280px;
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .client-card-minimal {
        min-height: 130px;
        max-height: 130px;
    }

    .client-card-minimal:hover,
    .client-card-minimal.expanded {
        min-height: 260px;
        max-height: 500px;
    }

    .client-card-minimal .client-logo {
        max-height: 40px !important;
    }

    .client-cta-hint {
        font-size: 0.75rem;
    }
}/* ==========================================================================
   CTA Section - SANS comportement spécial
   ========================================================================== */
.cta-section {
    background-color: var(--bs-primary) !important;
}

.cta-section .btn-light {
    color: var(--bs-primary);
    font-weight: 700;
    transition: all 0.3s ease;
    background-color: #ffffff;
    border-color: #ffffff;
}

.cta-section .btn-light:hover {
    color: var(--bs-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background-color: #f8f9fa;
    border-color: #f8f9fa;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer-link {
    color: #ffffff !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: var(--bs-primary) !important;
    text-decoration: underline;
}

/* ==========================================================================
   Scroll to top
   ========================================================================== */
#scroll-to-top {
    transition: all 0.3s ease;
}

#scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter-animate {
    animation: countUp 0.5s ease-out;
}

/* Animation fadeIn pour les éléments au scroll */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Responsive adjustments
   ========================================================================== */
@media (max-width: 991.98px) {
    .main-content {
        padding-top: 70px;
    }

    .hero-section {
        min-height: 400px;
        text-align: center;
        border-top: 6px solid var(--bs-hero-border);
        border-bottom: 6px solid var(--bs-hero-border);
    }

    .mission-content {
        border-left: none;
        border-top: 4px solid var(--bs-primary);
        border-radius: 10px;
    }

    .gallery-image {
        height: 200px;
    }

    .partner-logo {
        max-height: 90px !important; /* Version mobile plus petite */
    }

    .partners-section h4 {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 767.98px) {
    .hero-section .display-3 {
        font-size: 2.5rem;
    }

    .display-5 {
        font-size: 2rem;
    }

    .experience-highlight {
        margin-bottom: 2rem;
    }

    .partner-logo {
        max-height: 70px !important; /* Version mobile encore plus petite */
    }

    .partners-section h4 {
        font-size: 1rem !important;
    }

    .hero-section {
        border-top: 4px solid var(--bs-hero-border);
        border-bottom: 4px solid var(--bs-hero-border);
    }
}

/* ==========================================================================
   Utilitaires Bootstrap personnalisés - Thème sombre
   ========================================================================== */
.text-primary {
    color: var(--bs-primary) !important;
}

.bg-primary {
    background-color: var(--bs-primary) !important;
}

.bg-light {
    background-color: var(--bs-dark) !important; /* Redéfinition de bg-light */
}

.bg-white {
    background-color: #333333 !important; /* Redéfinition de bg-white pour le thème sombre */
}

.text-dark {
    color: #ffffff !important; /* Texte sombre devient blanc */
}

.text-muted {
    color: #cccccc !important; /* Texte muted plus clair */
}

.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    font-weight: 700;
}

.btn-primary:hover {
    background-color: var(--bs-primary-hover);
    border-color: var(--bs-primary-hover);
}
