/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    color: #333;
}

/* Navigation */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-links a {
    margin-right: 2rem;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.nav-links a:hover {
    color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
}

/* Sélecteur de langue */
.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.language-switcher a {
    text-decoration: none;
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: block;
}

.language-switcher a:hover {
    background-color: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

/* Contenu principal */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    min-height: 500px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .nav-links a {
        margin-right: 0;
    }
    
    .language-switcher {
        gap: 1rem;
    }
    
    .container {
        margin: 1rem;
        padding: 1rem;
    }
}
/* ... styles existants ... */

/* Footer */
.footer {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    position: relative;
    bottom: 0;
    left: 0;
    right: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin-left: 1.5rem;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links a {
        margin: 0 0.75rem;
    }
}
/* Section des régions */
.regions-section {
    margin: 3rem 0;
    text-align: center;
}

.regions-section h2 {
    color: #333;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 300;
}

.regions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* Section des régions - Version responsive améliorée */
.regions-section {
    margin: 2rem 0;
    text-align: center;
    padding: 0 1rem;
}

.regions-section h2 {
    color: #333;
    margin-bottom: 2rem;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 300;
    line-height: 1.3;
}

.regions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: clamp(1rem, 3vw, 2rem);
    margin: 2rem auto;
    max-width: 1400px;
    padding: 0 1rem;
}

/* Cartes de région - Responsive amélioré */
.region-card {
    background: white;
    border-radius: clamp(12px, 2vw, 20px);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.region-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: clamp(3px, 1vw, 5px);
    background: linear-gradient(90deg, #007bff, #0056b3);
}

.region-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

/* Couleurs spécifiques aux régions */
.region-card[data-region="russia"]::before {
    background: linear-gradient(90deg, #d52b1e, #0039a6);
}

.region-card[data-region="mali"]::before {
    background: linear-gradient(90deg, #ce1126, #fcd116);
}

.region-card[data-region="africa"]::before {
    background: linear-gradient(90deg, #008751, #fcd116, #000000);
}

.region-card[data-region="cis"]::before {
    background: linear-gradient(90deg, #0052b4, #d52b1e);
}

/* Icônes responsive */
.card-icon {
    font-size: clamp(2.5rem, 8vw, 4rem);
    margin-bottom: clamp(0.5rem, 2vw, 1rem);
}

/* Contenu texte responsive */
.region-card h3 {
    color: #333;
    margin-bottom: clamp(0.5rem, 2vw, 1rem);
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: 600;
    line-height: 1.2;
}

.region-card p {
    color: #666;
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
    line-height: 1.5;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    flex-grow: 1;
}

/* Bouton de sélection responsive */
.region-select-btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: clamp(0.6rem, 2vw, 0.9rem) clamp(1.5rem, 4vw, 2.5rem);
    border-radius: clamp(20px, 3vw, 30px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    min-height: 44px; /* Taille minimum pour le touch */
}

.region-select-btn:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: scale(1.05);
}

/* Couleurs des boutons par région */
.region-card[data-region="russia"] .region-select-btn {
    background: linear-gradient(135deg, #d52b1e, #0039a6);
}

.region-card[data-region="mali"] .region-select-btn {
    background: linear-gradient(135deg, #ce1126, #fcd116);
    color: #333;
}

.region-card[data-region="africa"] .region-select-btn {
    background: linear-gradient(135deg, #008751, #000000);
}

.region-card[data-region="cis"] .region-select-btn {
    background: linear-gradient(135deg, #0052b4, #d52b1e);
}

/* Conteneur principal responsive */
.home-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

/* Media Queries spécifiques pour différents breakpoints */

/* Tablettes petites (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .regions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .region-card {
        min-height: 300px;
    }
}

/* PC portables (1024px - 1439px) */
@media (min-width: 1024px) and (max-width: 1439px) {
    .regions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .region-card {
        min-height: 320px;
    }
}

/* Grands écrans (1440px et plus) */
@media (min-width: 1440px) {
    .regions-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    
    .region-card {
        min-height: 350px;
    }
}

/* Très petits mobiles (moins de 375px) */
@media (max-width: 374px) {
    .regions-section {
        padding: 0 0.5rem;
    }
    
    .regions-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem;
    }
    
    .region-card {
        padding: 1rem;
        min-height: 250px;
    }
    
    .card-icon {
        font-size: 2rem;
    }
}

/* Support pour les appareils avec hover (PC) */
@media (hover: hover) and (pointer: fine) {
    .region-card:hover {
        transform: translateY(-8px) scale(1.02);
    }
    
    .region-select-btn:hover {
        transform: scale(1.05);
    }
}

/* Support pour les appareils tactiles (mobile) */
@media (hover: none) and (pointer: coarse) {
    .region-card:active {
        transform: scale(0.98);
    }
    
    .region-select-btn:active {
        transform: scale(0.95);
        background: linear-gradient(135deg, #004085, #003066);
    }
}

/* Amélioration de l'accessibilité */
@media (prefers-reduced-motion: reduce) {
    .region-card,
    .region-select-btn {
        transition: none;
    }
    
    .region-card:hover,
    .region-select-btn:hover {
        transform: none;
    }
}

/* Mode sombre automatique */
@media (prefers-color-scheme: dark) {
    .region-card {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .region-card h3 {
        color: #e2e8f0;
    }
    
    .region-card p {
        color: #cbd5e0;
    }
}

/* Amélioration du conteneur principal */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: clamp(1rem, 3vw, 2rem);
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: clamp(10px, 2vw, 20px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    min-height: 500px;
}

.region-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.region-header {
    text-align: center;
    margin-bottom: 3rem;
}

.region-header h1 {
    font-size: 2.2rem;
    color: #333;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: scale(1.03);
}

.service-card-image {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f0f2f5;              /* fond derrière l'image */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;                   /* petit espace autour de l'image */
    box-sizing: border-box;
}

.service-card-image img {
   display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;               /* ⭐ image entière, jamais coupée */
    object-position: center;
    transition: transform 0.4s ease;
}

.service-card-image.placeholder span {
    font-size: 3rem;
    opacity: 0.4;
}

.service-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.service-card-body h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0.75rem;
}

.service-card-body p {
    color: #666;
    line-height: 1.5;
    flex: 1;
    margin-bottom: 1rem;
}

.service-card-btn {
    display: inline-block;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.service-card-btn:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
}

.no-services {
    text-align: center;
    color: #888;
    font-size: 1.1rem;
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

/* ============================================
   PAGE DÉTAIL SERVICE
   ============================================ */

.service-detail {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Lien retour */
.service-detail .back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.service-detail .back-link:hover {
    color: #0056b3;
}

/* En-tête : titre du service */
.service-detail-header {
    text-align: center;
    margin-bottom: 2rem;
}

.service-detail-header h1 {
    color: #333;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Image de couverture */
.service-detail-image {
    width: 100%;
    max-width: 100%;
    background: #f0f2f5;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-detail-image img {
    display: block;
    max-width: 100%;
    max-height: 450px;                 /* limite haute pour éviter les images géantes */
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
}

/* Description */
.service-detail-description {
    background: white;
    border-radius: 16px;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    line-height: 1.7;
    color: #444;
}

.service-detail-description p {
    margin-bottom: 1rem;
}

.service-detail-description p:last-child {
    margin-bottom: 0;
}

.service-detail-description h2,
.service-detail-description h3 {
    color: #333;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.service-detail-description h2 {
    font-size: 1.4rem;
}

.service-detail-description h3 {
    font-size: 1.2rem;
}

.service-detail-description ul,
.service-detail-description ol {
    margin: 1rem 0 1rem 1.5rem;
    line-height: 1.7;
}

.service-detail-description li {
    margin-bottom: 0.5rem;
}

.service-detail-description strong {
    color: #333;
    font-weight: 600;
}

/* Action principale (bouton) */
.service-detail-action {
    text-align: center;
    margin-bottom: 2rem;
}

.service-detail-btn {
    display: inline-block;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.service-detail-btn:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.35);
}

/* Formulaire de contact intégré à la page détail */
.service-detail-form {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.service-detail-form h2 {
    text-align: center;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

/* Réutilisation du style de formulaire existant (main/index) */
.service-detail-form .contact-form-section {
    background: white;
    padding: clamp(1.5rem, 4vw, 3rem);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin: 0;
    border: 1px solid #e0e0e0;
}

/* Responsive */
@media (max-width: 767px) {
    .service-card-image {
        height: 150px;
        padding: 0.4rem;
    }

    .service-detail-image img {
        max-height: 300px;
    }
}

@media (max-width: 374px) {
    .service-card-image {
        height: 130px;
        padding: 0.3rem;
    }

    .service-detail-image img {
        max-height: 220px;
    }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    .service-detail-btn,
    .service-detail .back-link {
        transition: none;
    }

    .service-detail-btn:hover {
        transform: none;
    }
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .service-detail-description {
        background: #2d3748;
        color: #e2e8f0;
    }

    .service-detail-description h2,
    .service-detail-description h3,
    .service-detail-description strong {
        color: #f7fafc;
    }

    .service-detail-header h1 {
        color: #e2e8f0;
    }

    .service-detail-form {
        border-top-color: #4a5568;
    }

    .service-detail-form h2 {
        color: #e2e8f0;
    }
}