/* Importation de polices Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Roboto:wght@300;400;700&display=swap');

/* ========================================================================= */
/* 1. VARIABLES CSS (THÈMES SOMBRE ET CLAIR) */
/* ========================================================================= */

/* Variables CSS pour le Thème Sombre (par défaut) */
:root {
    --primary-color: #e74c3c; /* Rouge vif pour les accents et CTAs */
    --secondary-color: #1a1a1a; /* Noir profond pour les sections sombres/navbar */
    --tertiary-color: #2c2c2c; /* Gris très foncé pour le fond principal du site */
    --text-color: #ecf0f1; /* Blanc/Gris clair pour le texte principal */
    --light-text-color: #bdc3c7; /* Texte secondaire plus clair */
    --card-background: #3a3a3a; /* Gris foncé pour les cartes */
    --border-color: rgba(255, 255, 255, 0.05); /* Bordures subtiles en mode sombre */

    /* Polices */
    --heading-font: 'Montserrat', sans-serif;
    --body-font: 'Roboto', sans-serif;
}

/* Variables CSS pour le Thème Clair - APPLIQUÉES VIA body.light-theme */
body.light-theme {
    --primary-color: #c0392b; /* Rouge plus doux en mode clair */
    --secondary-color: #f8f9fa; /* Blanc très clair (navbar, sections claires) */
    --tertiary-color: #ffffff; /* Blanc pur (fond général) */
    --text-color: #2c3e50; /* Bleu marine foncé (texte principal) */
    --light-text-color: #6c757d; /* Gris moyen (texte secondaire) */
    --card-background: #e9ecef; /* Gris très clair (cartes) */
    --border-color: rgba(0, 0, 0, 0.1); /* Bordures subtiles foncées */
}

/* ========================================================================= */
/* 2. STYLES DE BASE & TYPOGRAPHIE */
/* ========================================================================= */

body {
    font-family: var(--body-font);
    margin: 0;
    padding: 0;
    background-color: var(--tertiary-color); 
    color: var(--text-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Transition pour l'effet de changement de thème */
    transition: background-color 0.3s ease, color 0.3s ease; 
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

/* Typographie */
h1, h2, h3, h4 {
    font-family: var(--heading-font);
    font-weight: 700;
}

h1 { font-size: 3.2em; margin-bottom: 15px; color: var(--text-color); }
h2 { font-size: 2.5em; margin-bottom: 30px; color: var(--text-color); }
h3 { font-size: 1.8em; margin-bottom: 15px; color: var(--primary-color); }
h4 { font-size: 1.4em; margin-bottom: 10px; color: var(--primary-color); }

p {
    font-size: 1.1em;
    color: var(--light-text-color);
}

.subtitle {
    font-size: 1.6em;
    margin-bottom: 40px;
    color: var(--light-text-color);
    font-weight: 300;
}

.small-text {
    font-size: 0.9em;
    color: var(--light-text-color);
    margin-top: 20px;
}

/* Style global des liens (pour les rendre rouges) */
a:not(.cta-button):not(.navbar-brand):not(.discord-nav-link) {
    color: var(--primary-color);
    text-decoration: none; 
    font-weight: 500;
    transition: color 0.3s ease;
}

a:not(.cta-button):not(.navbar-brand):not(.discord-nav-link):hover {
    color: #f39c12; /* Une couleur légèrement différente au survol (orange) */
    text-decoration: underline; 
}

/* ========================================================================= */
/* 3. BARRE DE NAVIGATION (NAVBAR) */
/* ========================================================================= */

.navbar {
    background-color: var(--secondary-color); 
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    color: var(--text-color);
    font-family: var(--heading-font);
    font-size: 1.8em;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.navbar-brand .logo {
    height: 40px; 
    margin-right: 10px;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 15px; 
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--light-text-color);
    text-decoration: none;
    font-weight: 400;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.discord-nav-link {
    background-color: var(--primary-color);
    color: var(--text-color) !important;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    /* Assure que le texte du lien Discord reste de la couleur du texte normal */
    color: var(--text-color);
}

.discord-nav-link:hover {
    background-color: #c0392b; 
}

/* BOUTON DE THÈME (Lune/Soleil) */
.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.5em;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 5px;
}

.theme-toggle:hover {
    color: var(--primary-color);
}


/* MENU BURGER (Non visible sur grand écran) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Animation de la croix */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ========================================================================= */
/* 4. SECTION HÉRO */
/* ========================================================================= */

.hero-section {
    background-color: var(--secondary-color); 
    padding: 120px 0;
    /* Motif hexagonal subtil */
    background-image: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="hex-pattern" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse" patternTransform="scale(0.5) rotate(30)"><path d="M10 0 L15 2.887 L15 8.66 L10 11.547 L5 8.66 L5 2.887 Z" fill="rgba(231, 76, 60, 0.03)"/></pattern></defs><rect x="0" y="0" width="100%" height="100%" fill="url(#hex-pattern)"/></svg>');
    background-size: 150px;
    position: relative;
    overflow: hidden;
    text-align: center; 
}

.hero-logo {
    width: 120px; 
    height: auto;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 10px rgba(231, 76, 60, 0.6)); 
    display: block; 
    margin-left: auto;
    margin-right: auto;
}

.hero-section h1 {
    text-shadow: 0 0 20px rgba(231, 76, 60, 0.8); 
}

/* BOUTONS D'ACTION (CTA) */
.cta-button {
    display: inline-block;
    padding: 18px 35px;
    margin: 15px 0;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.2em;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.primary-cta {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: 2px solid var(--primary-color);
}

.primary-cta:hover {
    background-color: #c0392b; 
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
}

/* ========================================================================= */
/* 5. SECTIONS GÉNÉRALES */
/* ========================================================================= */

.features-section {
    padding: 80px 0;
    background-color: var(--tertiary-color); 
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-item {
    background-color: var(--card-background); 
    padding: 35px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.feature-item .icon {
    font-size: 3em;
    display: block;
    margin-bottom: 15px;
    color: var(--primary-color);
}


.expertise-section {
    padding: 80px 0;
    background-color: var(--secondary-color); 
    text-align: center;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.expertise-item {
    background-color: var(--card-background); 
    padding: 25px;
    border-radius: 10px;
    text-align: left;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.expertise-item h4 {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* SECTION CONTACT */
.contact-section {
    padding: 80px 0;
    background-color: var(--tertiary-color); 
    text-align: center;
}

.discord-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2em;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 3px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.discord-link:hover {
    color: #c0392b; 
    border-color: #c0392b;
}


/* ========================================================================= */
/* 6. PIED DE PAGE */
/* ========================================================================= */

footer {
    background-color: var(--secondary-color); 
    padding: 30px 0;
    font-size: 0.9em;
    color: var(--light-text-color);
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.social-links a {
    color: var(--light-text-color);
    font-size: 1.5em;
    margin-left: 15px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* ========================================================================= */
/* 7. MEDIA QUERIES (ADAPTATION MOBILE) */
/* ========================================================================= */

@media (max-width: 992px) {
    .navbar-brand { font-size: 1.5em; }
    .nav-links { gap: 20px; }
    .hero-section h1 { font-size: 2.5em; }
    .hero-section .subtitle { font-size: 1.2em; }
    h2 { font-size: 2em; }
    .cta-button { padding: 15px 25px; font-size: 1.1em; }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: nowrap; /* Empêche le saut de ligne de la navbar */
    }

    .navbar-brand {
        flex-grow: 1;
    }

    .menu-toggle {
        display: flex; /* AFFICHE LE MENU BURGER */
        margin-left: 15px; 
    }
    
    .theme-toggle { 
        font-size: 1.3em;
    }

    /* Ajustements généraux de la section Héro */
    .hero-section {
        padding: 60px 0; 
    }
    
    /* 🚨 Correction : Taille du titre H1 (Plus petit) */
    .hero-section h1 { 
        font-size: 1.8em; /* Réduit la taille pour ne plus être un "gros pavé" */
        margin-bottom: 15px;
    }
    
    /* 🚨 Correction : Taille du Logo Héro (70px) */
    .hero-logo {
        width: 70px; /* Taille réduite à 70px pour mobile */
        margin-bottom: 15px;
    }

    /* Menu de navigation (ouvert) */
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--secondary-color); 
        box-shadow: 0 5px 10px rgba(0,0,0,0.5);
        position: absolute;
        top: 70px; 
        left: 0;
        padding: 0; 
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px); 
        transition: all 0.3s ease-in-out;
    }

    .nav-links.active {
        display: flex;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-links li {
        text-align: center;
        list-style: none; /* Suppression des points de liste */
        border-bottom: 1px solid var(--border-color);
        margin: 0; 
        padding: 0; 
    }

    .nav-links a {
        font-size: 1.2em; /* Taille de police plus lisible */
        padding: 15px 0; /* Espacement cliquable et aéré */
        display: block;
        color: var(--text-color);
        text-decoration: none;
    }
    
    .nav-links a:hover {
        color: var(--primary-color);
        background-color: rgba(231, 76, 60, 0.1); 
    }
    
    .discord-nav-link {
        /* Bouton CTA dans le menu ajusté pour la propreté */
        margin: 20px auto 25px auto; 
        width: 60%; 
        padding: 12px 20px; 
        font-size: 1.1em;
        box-shadow: 0 4px 8px rgba(0,0,0,0.4); 
    }
    
    .features-grid, .expertise-grid {
        grid-template-columns: 1fr;
    }
    
    footer .container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}
