@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

/* ----- STICKY FOOTER ----- */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 70px;
    font-family: 'Montserrat', sans-serif;
    background-color: #f8f9fa;
}
.main-content {
    flex: 1 0 auto;
}

/* ----- LOADER (toujours centré, pas de scroll) ----- */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* pour les navigateurs modernes */
    background: #1e272e;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    margin: 0;
    padding: 0;
}
#loader.hidden {
    opacity: 0;
    visibility: hidden;
}
.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #FE0000;
    max-width: 90%;
}
.loader-content img {
    display: block;
    margin: 0 auto 1rem auto;
    height: 60px;
    width: auto;
}
.loader-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pulse 1s infinite alternate;
    color: #FE0000;
}
.loader-title {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 0.5rem;
}
.loader-subtitle {
    font-size: 1.2rem;
    color: #FE0000;
    font-weight: 600;
}
@keyframes pulse {
    from { transform: scale(1); opacity: 0.8; }
    to { transform: scale(1.1); opacity: 1; }
}

/* ----- COULEURS PRINCIPALES (ROUGE CIMENKAT) ----- */
:root {
    --mining-dark: #1e272e;
    --cimenkat-red: #FE0000;
    --cimenkat-red-light: rgba(254,0,0,0.8);
    --mining-light: #f5f6fa;
}

/* ----- BARRE DE NAVIGATION ----- */
.bg-dark-mining { background-color: var(--mining-dark) !important; }
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255,255,255,0.85);
    font-weight: 500;
}
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--cimenkat-red) !important;
}
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

/* ----- HERO (si utilisée) ----- */
.hero-mining {
    background: linear-gradient(135deg, #2c3e50, var(--cimenkat-red));
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
}

/* ----- TITRES DE SECTION ----- */
.section-title {
    font-weight: 700;
    color: var(--mining-dark);
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 40px;
    text-align: center;
}
.section-title::after {
    content: '';
    width: 80px;
    height: 4px;
    background: var(--cimenkat-red);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* ----- CARTES ----- */
.card-mining {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}
.card-mining:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

/* ----- BOUTON PRINCIPAL ----- */
.btn-mining {
    background-color: var(--cimenkat-red);
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 12px 30px;
    font-weight: 600;
    transition: background-color 0.3s;
}
.btn-mining:hover {
    background-color: var(--cimenkat-red-light);
    color: #fff;
}

/* ----- GALERIE ----- */
.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

/* ----- TÉMOIGNAGES ----- */
.testimonial-box {
    background: var(--mining-light);
    padding: 30px;
    border-left: 5px solid var(--cimenkat-red);
    border-radius: 8px;
}

/* ----- SLIDER PLEIN ÉCRAN (desktop) ----- */
.full-slider {
    margin-top: -70px;
    width: 100%;
    height: 90vh;
    overflow: hidden;
}
.full-slider .swiper,
.full-slider .swiper-wrapper,
.full-slider .swiper-slide {
    height: 100%;
}
.slide-card {
    height: 100%;
    width: 100%;
}
.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5);
}
.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(254,0,0,0.7), transparent);
    z-index: 2;
}
.slide-overlay h4 {
    font-size: calc(1.5rem + 1vw);
    font-weight: 700;
}
.slide-overlay p {
    font-size: 1rem;
    max-width: 600px;
}

/* ----- EFFETS SLIDES ----- */
.swiper-slide-active .slide-img {
    animation: slowZoom 8s ease-in-out infinite alternate;
}
@keyframes slowZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}
.slide-overlay h4,
.slide-overlay p {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transform: translateY(20px);
}
.swiper-slide-active .slide-overlay h4,
.swiper-slide-active .slide-overlay p {
    opacity: 1;
    transform: translateY(0);
}
.swiper-slide-active .slide-card {
    box-shadow: 0 0 30px rgba(254,0,0,0.4);
}
.swiper-button-prev,
.swiper-button-next {
    color: var(--cimenkat-red) !important;
}

/* ----- ICÔNES PARTENAIRES ----- */
.partner-icon-box {
    width: 80px;
    height: 80px;
    background: #f5f6fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, background 0.3s;
}
.partner-icon-box:hover {
    transform: scale(1.1);
    background: var(--cimenkat-red);
}

/* ----- STATISTIQUES (jamais coupées) ----- */
.nowrap {
    white-space: nowrap;
}
.stat-value {
    white-space: nowrap;
    font-size: 1.3rem;
}

/* ----- SÉPARATEUR DÉCORATIF ----- */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80%;
    max-width: 700px;
    margin: 0 auto;
}
.section-divider .line-left,
.section-divider .line-right {
    flex: 1;
    height: 2px;
    background: var(--cimenkat-red);
    border: none;
}
.section-divider i {
    margin: 0 15px;
    font-size: 1.8rem;
    color: var(--cimenkat-red);
    opacity: 0.9;
}

/* ----- FORCER LE ROUGE SUR LES ANCIENNES CLASSES ORANGE ----- */
.text-warning {
    color: #FE0000 !important;
}
.btn-outline-warning {
    border-color: #FE0000 !important;
    color: #FE0000 !important;
}
.btn-outline-warning:hover {
    background-color: #FE0000 !important;
    color: #fff !important;
}

/* ----- SERVICES : CERCLE ICÔNE (page détail) ----- */
.service-icon-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: #f5f6fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 3px solid var(--cimenkat-red);
}

/* ----- SERVICES : ICÔNE DANS UN CERCLE (liste) ----- */
.service-icon-box {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #f9f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* ----- SERVICES : CARTE (hover) ----- */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(254, 0, 0, 0.15) !important;
}

/* ========== RESPONSIVE ========== */

/* Tablettes et petits écrans (≤ 992px) */
@media (max-width: 992px) {
    .full-slider {
        height: 60vh;
    }
    .service-icon-circle {
        width: 150px;
        height: 150px;
    }
    .service-icon-circle i {
        font-size: 3rem !important;
    }
}

/* Mobiles (≤ 768px) */
@media (max-width: 768px) {
    body {
        padding-top: 56px;
    }
    /* Slider fixe à 350px */
    .full-slider {
        margin-top: -56px;
        height: 350px;
    }
    /* Overlay discret */
    .slide-overlay {
        background: linear-gradient(to top, rgba(254,0,0,0.3), transparent);
    }
    .slide-overlay h4 {
        font-size: 1rem;
    }
    .slide-overlay p {
        font-size: 0.8rem;
        max-width: 400px;
    }
    /* Loader adapté */
    .loader-icon {
        font-size: 2rem;
    }
    .loader-title {
        font-size: 1.4rem;
    }
    .loader-subtitle {
        font-size: 0.7rem;
    }
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
    .stat-value {
        font-size: 1rem;
    }
    .partner-icon-box {
        width: 60px;
        height: 60px;
    }
    .btn-mining {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    footer .col-lg-3 {
        text-align: center;
    }
}

/* Très petits mobiles (≤ 576px) */
@media (max-width: 576px) {
    .full-slider {
        height: 350px;
    }
    .slide-overlay h4 {
        font-size: 0.9rem;
    }
    .slide-overlay p {
        font-size: 0.7rem;
        max-width: 300px;
    }
    .loader-icon {
        font-size: 1.8rem;
    }
    .loader-title {
        font-size: 1.2rem;
    }
    .loader-subtitle {
        font-size: 0.6rem;
    }
    .card-mining,
    .service-card {
        margin-bottom: 15px;
    }
    .hero-mining {
        min-height: 50vh;
    }
    .testimonial-box {
        padding: 15px;
    }
    .gallery-item img {
        height: 180px;
    }
    .stat-value {
        font-size: 1.1rem;
    }
}