/* ==========================================================================
   1. VARIABLES & STYLES DE BASE
   ========================================================================== */
:root {
    --dark-blue: #002366;
    --gold: #FFC107;
    --white: #ffffff;
}

img {
    max-width: 100%;
    height: auto;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    color: #333;
    background-color: #fcfcfc;
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
header {
    background: var(--dark-blue);
    color: white;
    display: flex;
    justify-content: space-between;
    padding: 20px 5%;
    align-items: center;
}

/* Forçage strict de la taille du logo principal */
.logo img, .logo-link img {
    height: 50px !important; 
    width: auto !important;
    max-height: 50px !important;
    margin-right: 10px;
    display: inline-block !important;
}

.logo-link {
    text-decoration: none; 
    color: inherit;        
    display: flex;         
    align-items: center;
}

.logo-link:hover {
    opacity: 0.9;          
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 14px;
}

/* ==========================================================================
   3. BANNIERES HERO
   ========================================================================== */
.hero {
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('hero-bg.jpg');
    background-size: cover;        
    background-position: center;   
    background-repeat: no-repeat;
    height: 500px; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.about-hero {
    background: linear-gradient(rgba(0, 35, 102, 0.8), rgba(0, 35, 102, 0.8)), url('hero-bg.jpg');
    background-size: cover;
    background-position: center;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.services-hero {
    background: linear-gradient(rgba(0, 35, 102, 0.85), rgba(0, 35, 102, 0.85));
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.partners-hero {
    background: linear-gradient(rgba(0, 35, 102, 0.9), rgba(0, 35, 102, 0.9));
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.gallery-hero {
    background: linear-gradient(rgba(0, 35, 102, 0.8), rgba(0, 35, 102, 0.8)), url('hero-bg.jpg');
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.contact-hero {
    background: linear-gradient(rgba(0, 35, 102, 0.9), rgba(0, 35, 102, 0.9));
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.btn-contact {
    background: var(--gold);
    padding: 12px 25px;
    color: black;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
}

/* ==========================================================================
   4. PAGE D'ACCUEIL (EXPERTISE & QUICK SERVICES)
   ========================================================================== */
.expertise h2 {
    text-align: center;      
    width: 100%;             
    margin-top: 40px;        
    margin-bottom: 30px;     
    color: #002366;          
    font-size: 28px;         
    font-weight: bold;       
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 40px 5%;
}

.expertise-grid .card img {
    width: 100%;
    height: auto; 
    display: block;
}

.card {
    position: relative;
    overflow: hidden;
}

.card h3 {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    font-size: 16px;
    background: rgba(0, 35, 102, 0.7);
    padding: 5px;
}

.quick-services {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #f8f9fa; 
    padding: 15px 5%;
    border-bottom: 2px solid #ddd;
    flex-wrap: wrap; 
}

.service-item {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    justify-content: center;
    padding: 10px 0;
    border-right: 1px solid #ccc; 
}

.service-item:last-child {
    border-right: none;
}

/* Forçage de la taille des icônes de la barre d'accueil */
.service-item img {
    height: 40px !important; 
    width: auto !important;
    max-height: 40px !important;
    display: block !important;
}

.service-item span {
    font-weight: bold;
    color: #002366; 
    font-size: 14px;
    max-width: 150px; 
    line-height: 1.2;
}

/* ==========================================================================
   5. PAGE À PROPOS
   ========================================================================== */
.about-content {
    padding: 60px 10%;
    line-height: 1.8;
    color: #444;
}

.about-text h2 {
    color: #002366;
    border-left: 5px solid #FFC107;
    padding-left: 15px;
    margin-bottom: 20px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.value-card {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    border-bottom: 3px solid #002366;
    transition: 0.3s;
}

.value-card:hover {
    border-bottom: 3px solid #FFC107;
    transform: translateY(-5px);
}

.value-card h3 {
    color: #002366;
    margin-bottom: 15px;
}

/* ==========================================================================
   6. PAGE NOS SERVICES
   ========================================================================== */
.services-list {
    padding: 40px 0;
}

.service-block {
    display: flex;
    align-items: center;
    padding: 60px 10%;
    gap: 50px;
}

.service-block.reverse {
    flex-direction: row-reverse; 
    background-color: #f4f7fa; 
}

.service-image {
    flex: 1;
}

.service-image img {
    width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    display: block;
}

.service-info {
    flex: 1;
}

.service-info h2 {
    color: #002366;
    font-size: 2rem;
    margin-bottom: 20px;
}

.service-info ul {
    margin-top: 20px;
    padding-left: 20px;
}

.service-info li {
    margin-bottom: 10px;
    list-style-type: square;
    color: #FFC107; 
}

/* ==========================================================================
   7. PAGE PARTENAIRES & CLIENTS
   ========================================================================== */
.intro-partners {
    text-align: center;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.intro-partners h2 {
    color: var(--dark-blue);
    font-size: 28px;
}

.intro-partners p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
}

.country-section {
    margin-top: 40px;
    margin-bottom: 40px;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.country-header {
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 12px;
    margin-bottom: 35px;
}

.country-header h2 {
    color: var(--dark-blue);
    font-size: 24px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flag-icon {
    font-size: 32px;
}

.mining-groups-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 50px;
}

.group-corporate-block {
    background: #f8f9fa;
    border-left: 5px solid var(--dark-blue);
    border-radius: 6px;
    padding: 25px;
}

.group-main-card {
    margin-bottom: 25px;
    background: white;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: inline-flex;
    align-items: center;
    gap: 30px;
    width: 100%;
    box-sizing: border-box;
}

.group-main-card h3 {
    margin: 0;
    font-size: 20px;
    color: var(--dark-blue);
}

.partner-details {
    font-size: 13px;
    color: #666;
    margin: 5px 0 0 0;
}

.group-subsidiaries-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.group-subsidiaries-grid.tri-column {
    grid-template-columns: repeat(3, 1fr);
}

.sub-section-title {
    color: #444;
    font-size: 19px;
    margin-top: 45px;
    margin-bottom: 25px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.partner-card {
    background: #ffffff;
    border: 1px solid #eef2f5;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ZONE RESTREINTE POUR TOUS LES LOGOS PARTENAIRES */
.partner-logo-wrapper {
    width: 100% !important;       
    height: 90px !important;      
    max-height: 90px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;  
    margin-bottom: 10px;
}

.partner-logo-wrapper img {
    max-width: 100% !important;    
    max-height: 100% !important;  
    width: auto !important;
    height: auto !important;
    object-fit: contain !important; 
    display: block !important;
    margin: 0 auto !important;
}

.group-main-card .partner-logo-wrapper {
    width: auto !important;
    height: 60px !important;      
    max-height: 60px !important;
    min-width: 120px;
    margin-bottom: 0;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 20px;
    text-transform: uppercase;
    margin-top: 10px;
}

.badge.drc { background: #e3efff; color: #0066ff; }
.badge.rsa { background: #e3fcf0; color: #00cc66; }
.badge.zambia { background: #fff4e3; color: #ff9900; }
.badge.international { background: #f1efff; color: #6633ff; }

.section-divider {
    border: 0;
    height: 1px;
    background: #e0e0e0;
    margin: 60px 0;
}

/* ==========================================================================
   8. PAGE GALERIE
   ========================================================================== */
.gallery-content {
    padding: 60px 10%;
}

.gallery-filters {
    text-align: center;
    margin-bottom: 40px;
}

.filter-btn {
    background: transparent;
    border: 2px solid #002366;
    color: #002366;
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background-color: #002366;
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 250px; 
    object-fit: cover; 
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1); 
}

.gallery-overlay {
    position: absolute;
    bottom: -100%; 
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 35, 102, 0.9), transparent);
    color: white;
    padding: 20px;
    transition: bottom 0.3s ease;
    text-align: center;
}

.gallery-item:hover .gallery-overlay {
    bottom: 0; 
}

.gallery-overlay h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #FFC107; 
}

.gallery-overlay p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ==========================================================================
   9. PAGE CONTACT
   ========================================================================== */
.contact-container {
    padding: 60px 10%;
}

.contact-container .container {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
}

.contact-info, .contact-form {
    flex: 1;
    min-width: 300px;
}

.contact-info h2 {
    color: #002366;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    margin-bottom: 25px;
    align-items: center;
}

.info-item h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #002366;
}

.info-item p {
    margin: 5px 0 0;
    color: #666;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
}

.btn-submit {
    background-color: #FFC107; 
    color: #002366;
    border: none;
    padding: 15px 30px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    width: 100%;
    transition: background 0.3s;
}

.btn-submit:hover {
    background-color: #e5ac00;
}

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
footer {
    background-color: #002366; 
    color: white;
    padding: 30px 5%;
    border-top: 4px solid #FFC107; 
    text-align: center;
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.footer-slogan p {
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 1px;
    margin: 0;
}

.footer-socials {
    display: flex;
    gap: 25px;
}

/* Forçage strict de la taille des icônes de réseaux sociaux du bas */
.footer-socials img {
    width: 30px !important; 
    height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    transition: transform 0.3s ease;
    display: block !important;
}

.footer-socials a:hover img {
    transform: scale(1.2); 
}

.footer-copyright {
    font-size: 0.9rem;
    opacity: 0.8;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    width: 100%;
}

/* ==========================================================================
   11. ADAPTATION RESPONSIVE (MOBILE & TABLETTE)
   ========================================================================== */
@media (max-width: 1024px) {
    .group-subsidiaries-grid, 
    .group-subsidiaries-grid.tri-column {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    nav ul {
        flex-direction: column; 
        gap: 10px;
        margin-top: 15px;
        padding: 0;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .quick-services {
        display: grid;
        grid-template-columns: 1fr 1fr; 
        gap: 10px;
    }

    .service-item {
        border-right: none;
        border-bottom: 1px solid #ddd;
        padding: 15px 5px;
    }

    .service-item:last-child {
        border-bottom: none;
        grid-column: span 2; 
    }

    .expertise-grid {
        grid-template-columns: 1fr;
        padding: 20px 5%;
    }

    .contact-container .container,
    .service-block,
    .service-block.reverse {
        flex-direction: column !important;
        padding: 30px 5%;
        gap: 20px;
    }

    .service-image, .service-info, .contact-info, .contact-form {
        width: 100%;
    }

    .group-main-card { 
        flex-direction: column; 
        text-align: center; 
        gap: 15px; 
    }
    
    .group-subsidiaries-grid, 
    .group-subsidiaries-grid.tri-column,
    .partners-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .quick-services {
        grid-template-columns: 1fr; 
    }
    
    .service-item:last-child {
        grid-column: span 1;
    }
}