/* 
   -------------------------------------------------------------------------
   FEUILLE DE STYLE - SITE PÉDAGOGIQUE SEO
   -------------------------------------------------------------------------
   CONSIGNE ÉTUDIANTS : 
   Vous pouvez modifier les couleurs et les polices ci-dessous pour personnaliser 
   l'apparence de votre site. N'hésitez pas à expérimenter !
   -------------------------------------------------------------------------
*/

:root {
    /* --- COULEURS --- */
    --primary-color: #3b82f6;
    /* Bleu (pour les boutons, liens) */
    --secondary-color: #1e293b;
    /* Gris foncé (pour les titres) */
    --background-color: #f8fafc;
    /* Gris très clair (fond de page) */
    --text-color: #334155;
    /* Gris moyen (texte courant) */
    --card-bg: #ffffff;
    /* Blanc (fond des blocs) */
    --header-bg: #ffffff;
    /* Blanc (fond du menu) */

    /* --- POLICES --- */
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Georgia', serif;
}

/* Reset CSS basique */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* --- EN-TÊTE / NAVIGATION --- */
header {
    background-color: var(--header-bg);
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
}

nav a:hover,
nav a.active {
    color: var(--primary-color);
}

/* --- CONTENU PRINCIPAL --- */
main {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    margin-top: 1rem;
}

h2 {
    font-size: 1.8rem;
    margin-top: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

h3 {
    font-size: 1.3rem;
    margin-top: 1rem;
}

p {
    margin-bottom: 1rem;
}

/* --- BOUTONS --- */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 1rem;
}

.btn:hover {
    opacity: 0.9;
}

/* --- GRILLES (pour services et blog) --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* --- PIED DE PAGE --- */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--secondary-color);
    color: white;
    margin-top: 4rem;
}

/* --- RESPONSIVE / MOBILE MENU --- */
.menu-toggle {
    display: none;
    /* Caché par défaut */
}

.menu-icon {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    header {
        position: relative;
    }

    .menu-icon {
        display: block;
        /* Affiche l'icône burger sur mobile */
    }

    nav ul {
        display: none;
        /* Cache le menu par défaut sur mobile */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--header-bg);
        border-bottom: 1px solid #e2e8f0;
        padding: 1rem 0;
        gap: 0;
        z-index: 1000;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    nav li {
        text-align: center;
    }

    nav a {
        display: block;
        padding: 1rem;
    }

    nav a:hover {
        background-color: var(--background-color);
    }

    /* La magie du CSS : quand la checkbox est cochée, on affiche le menu */
    #menu-toggle:checked~nav ul {
        display: flex;
    }
}