:root {
    --primary-red: #8B0000;
    --dark-red: #5B0000;
    --accent-red: #C8102E;
    --light-bg: #F8F9FA;
    --dark-text: #1A1A1A;
    --muted-text: #6C757D;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--dark-text);
    overflow-x: hidden;
}

/* Preloader Circulaire Styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.spinner-circle {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(139, 0, 0, 0.1);
    border-top: 5px solid var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Navbar */
.navbar {
    padding: 18px 0;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.navbar.scrolled {
    padding: 12px 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

/* .navbar-brand {
            font-weight: 800;
            font-size: 1.6rem;
            color: var(--primary-red) !important;
            letter-spacing: -0.5px;
        } */
.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-red) !important;
    letter-spacing: -0.5px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.navbar-brand span {
    color: var(--dark-text);
}

.nav-link {
    font-weight: 600;
    color: var(--dark-text) !important;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-red) !important;
}

/* Style spécifique pour l'image du logo */
.brand-logo {
    /* Hauteur adaptée pour la navbar */
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Effet survol discret */
.navbar-brand:hover .brand-logo {
    transform: scale(1.05);
}

/* Texte BoomRang Group */
.brand-text {
    color: var(--primary-red) !important;
    line-height: 1;
}

.brand-text span {
    color: var(--dark-text);
}

/* --- Responsivité pour Mobile --- */
@media (max-width: 576px) {
    .brand-logo {
        height: 32px;
        /* Réduction légère de l'image sur petit écran */
    }

    .navbar-brand {
        font-size: 1.25rem;
        /* Ajustement de la taille du texte */
    }
}

.btn-custom-red {
    background-color: var(--primary-red);
    color: white;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 50px;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.2);
}

.btn-custom-red:hover {
    background-color: var(--accent-red);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 16, 46, 0.3);
}

.btn-outline-custom {
    border: 2px solid white;
    color: white;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    background-color: white;
    color: var(--primary-red);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(91, 0, 0, 0.85) 0%, rgba(139, 0, 0, 0.80) 100%),
        url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    color: white;
    padding: 160px 0 120px;
    position: relative;
    overflow: hidden;
}

/* .hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
} */

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.95;
    margin-bottom: 35px;
    line-height: 1.6;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Stats Section avec Icônes */
.stats-section {
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
    border-bottom: 4px solid var(--primary-red);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2rem;
    color: var(--primary-red);
    margin-bottom: 10px;
}

.stat-number {
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--dark-text);
}

.stat-label {
    font-weight: 600;
    color: var(--muted-text);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-top: 5px;
}

/* Section Styling */
.section-padding {
    padding: 90px 0;
}

.section-title-wrapper {
    margin-bottom: 60px;
}

.section-subtitle {
    color: var(--accent-red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--dark-text);
}

/* About Section */
.about-img-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    /* box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1); */
}

.about-img-wrapper img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.about-img-wrapper:hover img {
    transform: scale(1.04);
}

.about-card {
    background: var(--light-bg);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Values Grid */
.value-tag {
    background: white;
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 700;
    color: var(--dark-text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid var(--primary-red);
    transition: all 0.3s ease;
}

.value-tag:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.value-tag i {
    color: var(--primary-red);
}

/* Timeline Section */
.timeline-container {
    position: relative;
    padding-left: 30px;
    border-left: 3px solid #E9ECEF;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -38px;
    top: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-red);
    border: 4px solid white;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.2);
}

.timeline-year {
    font-weight: 800;
    color: var(--primary-red);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

/* Services Cards */
.service-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(139, 0, 0, 0.12);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: rgba(139, 0, 0, 0.08);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary-red);
    margin-bottom: 25px;
}

.project-badge {
    background: var(--light-bg);
    border: 1px solid #E9ECEF;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--dark-text);
    display: inline-block;
    margin: 4px;
}

/* Galerie Styles */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.5s ease;
    height: 260px;
    object-fit: cover;
    width: 100%;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(139, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-size: 1.5rem;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Why Choose Us */
.why-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.why-icon {
    width: 28px;
    height: 28px;
    background: rgba(139, 0, 0, 0.1);
    color: var(--primary-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 0.85rem;
}

/* Partner Logos Grid - 8 par ligne sur PC */
.partner-grid {
    display: grid;
    /* 8 colonnes égales par défaut (écrans PC/Desktop) */
    grid-template-columns: repeat(8, 1fr);
    gap: 15px;
    align-items: center;
}

.partner-card {
    background: white;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Hauteur fixe pour l'uniformité */
    height: 90px;
    overflow: hidden;
}

.partner-card img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    /* Empêche la déformation */
    transition: all 0.3s ease;
}

.partner-card:hover {
    border-color: var(--primary-red);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(139, 0, 0, 0.08);
}

.partner-card:hover img {
    transform: scale(1.08);
}

/* --- RESPONSIVITÉ (Adaptation selon l'écran) --- */

/* Écrans moyens (Laptops / Tablettes paysage) : 4 par ligne */
@media (max-width: 1200px) {
    .partner-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablettes portrait : 3 par ligne */
@media (max-width: 768px) {
    .partner-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobiles : 2 par ligne */
@media (max-width: 480px) {
    .partner-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .partner-card {
        height: 75px;
    }
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, rgba(91, 0, 0, 0.9) 0%, rgba(139, 0, 0, 0.88) 100%),
        url('https://images.unsplash.com/photo-1557804506-669a67965ba0?auto=format&fit=crop&w=1200&q=80') center/cover no-repeat;
    color: white;
    border-radius: 30px;
    padding: 60px;
    margin-bottom: 60px;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.contact-icon-box {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Accordion FAQ Styling Corrected */
.accordion-button:not(.collapsed) {
    color: var(--primary-red);
    background-color: rgba(139, 0, 0, 0.05);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(139, 0, 0, 0.1);
}

/* Footer & Back to top */
footer {
    background: #111;
    color: #AAA;
    padding: 40px 0 20px;
    font-size: 0.9rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: var(--accent-red);
    color: white;
    transform: translateY(-3px);
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--primary-red);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--accent-red);
    color: white;
    transform: translateY(-3px);
}