:root {
    --primary-color: #343A40;
    --primary-hover: #1a1e21;
    --accent-blue: #2563eb;
    --accent-blue-hover: #1d4ed8;
    
    /* Couleurs par défaut (Mode Clair) */
    --bg-light: #f8fafc;
    --surface-white: #ffffff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    --radius-full: 9999px;
    --radius-lg: 16px;
    --radius-md: 12px;
}

/* ==========================================================
   DÉTECTION AUTOMATIQUE DU MODE SOMBRE (SYSTÈME / MOBILE)
   ========================================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #f8fafc;
        --primary-hover: #e2e8f0;
        --bg-light: #0b0f19;        /* Fond de page sombre */
        --surface-white: #1e293b;   /* Fond des cartes plus clair que le fond global */
        --text-dark: #f8fafc;       /* Texte principal clair */
        --text-muted: #94a3b8;      /* Texte secondaire gris clair */
        --border-color: #334155;    /* Bordures subtiles pour le mode sombre */
    }

    /* Adaptation spécifique des boutons en mode sombre */
    .btn-primary {
        background-color: var(--primary-color) !important;
        color: #0f172a !important; /* Texte foncé sur bouton blanc en dark mode */
        box-shadow: 0 4px 14px rgba(255, 255, 255, 0.1) !important;
    }

    .btn-primary:hover {
        background-color: var(--primary-hover) !important;
    }

    .btn-outline {
        color: #f8fafc !important;
        border-color: #334155 !important;
    }

    .btn-outline:hover {
        background-color: #1e293b !important;
        border-color: var(--accent-blue) !important;
    }

    /* Halo lumineux en haut du Hero en mode sombre */
    .hero-section {
        background: radial-gradient(circle at top, rgba(37, 99, 235, 0.15) 0%, transparent 70%) !important;
    }
}

/* Correctif global anti-débordement horizontal */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* --- HERO SECTION --- */
.hero-section {
    padding: 5rem 1.5rem 4rem;
    text-align: center;
    background: radial-gradient(circle at top, rgba(37, 99, 235, 0.05) 0%, transparent 60%);
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(37, 99, 235, 0.08);
    color: var(--accent-blue);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1px;
    margin-bottom: 1.2rem;
    color: var(--text-dark);
}

.text-gradient {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* --- BOUTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.6rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(52, 58, 64, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--accent-blue);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
}

.btn-secondary:hover {
    background-color: var(--accent-blue-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background-color: var(--surface-white);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

/* --- SERVICES OVERVIEW --- */
.services-overview {
    padding: 5rem 1.5rem;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--surface-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.15);
}

.service-icon-box {
    width: 50px;
    height: 50px;
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--accent-blue);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-dark);
}

.service-card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.card-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.3s ease;
}

.card-link:hover {
    gap: 0.7rem;
}

/* --- BANNIÈRE COMMUNAUTÉ & DISCORD --- */
.community-banner {
    padding: 2rem 1.5rem 4rem;
    width: 100%;
}

.banner-container {
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(135deg, #0b0f19 0%, #1e293b 100%);
    border-radius: var(--radius-lg);
    padding: 3.5rem 2rem;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.banner-content {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.banner-content h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff !important;
}

.banner-content p {
    color: #94a3b8 !important;
    font-size: 1.1rem;
    margin: 0 0 2rem 0;
    line-height: 1.6;
}

.btn-discord {
    background-color: #5865F2 !important; 
    color: #ffffff !important;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
    max-width: 100%;
    justify-content: center;
    text-align: center;
}

.btn-discord:hover {
    background-color: #4752c4 !important;
    transform: translateY(-2px);
}

/* --- RÉSERVES DES COMPOSANTS --- */
#navbar-container {
    min-height: 80px;
}

#footer-container {
    min-height: 200px;
}

/* ==========================================================
   MEDIA QUERIES (RESPONSIVE TABLETTE ET MOBILE)
   ========================================================== */
@media (max-width: 768px) {
    .hero-section {
        padding: 3.5rem 1rem 2.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .services-overview {
        padding: 3rem 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .community-banner {
        padding: 1.5rem 1rem 3rem;
    }

    .banner-container {
        padding: 2.5rem 1.25rem;
        border-radius: var(--radius-md);
    }

    .banner-content h2 {
        font-size: 1.5rem;
    }

    .banner-content p {
        font-size: 0.95rem;
    }

    .btn-discord {
        width: 100%;
        padding: 0.85rem 1rem;
        font-size: 0.95rem;
        white-space: normal;
    }
}