/* * =========================================
 * THÈME AUTOMNAL & VARIABLES
 * =========================================
 * On définit nos couleurs ici. Si tu veux changer
 * le thème, tu n'as qu'à modifier ces valeurs.
*/
:root {
    --bg-light: #F5EFE6;         /* Beige / Crème (fond clair) */
    --bg-dark: #4E342E;          /* Marron foncé (pour le footer) */
    --text-color: #3E2723;       /* Marron texte */
    --primary-color: #D87C49;    /* Orange brûlé (titres, liens) */
    --secondary-color: #8C3A2B;  /* Rouge brique (accents) */
    --font-main: 'Georgia', 'Times New Roman', serif;
    --font-secondary: 'Helvetica', 'Arial', sans-serif;
}

/* * =========================================
 * STYLES GLOBAUX
 * =========================================
*/

/* LA MAGIE POUR LE DÉFILEMENT FLUIDE */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-light);
    /* On ajoute un padding en haut égal à la hauteur 
       de la navbar pour que le contenu ne passe pas dessous */
    padding-top: 70px; 
}

h1, h2, h3 {
    font-family: var(--font-secondary);
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

p {
    line-height: 1.6;
    font-size: 1.1rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Classe utilitaire pour centrer le contenu et ajouter du padding */
.section-padding {
    padding: 4rem 2rem;
    max-width: 1100px;
    margin: 0 auto; /* Centre le contenu */
}

.section-bg-light {
    background-color: #ffffff;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

/* * =========================================
 * NAVBAR
 * =========================================
*/
.navbar {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed; /* Reste fixe en haut */
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    z-index: 1000;
}

.navbar nav {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between; /* Sépare le logo des liens */
    align-items: center;
    height: 100%;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    font-family: var(--font-main);
}

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

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    font-family: var(--font-secondary);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 1rem;
}

/* * =========================================
 * PORTFOLIO (Les cartes)
 * =========================================
*/
.portfolio-grid {
    display: flex;
    justify-content: space-around; /* Espace les cartes */
    flex-wrap: wrap; /* Passe à la ligne sur mobile */
    gap: 2rem; /* Espace entre les cartes */
}

.card {
    width: 320px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(78, 52, 46, 0.15);
    overflow: hidden; /* Pour que l'image respecte les coins arrondis */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(78, 52, 46, 0.2);
}

.card img {
    width: 100%;
    height: 250px;
    object-fit: cover; /* L'image couvre la zone sans se déformer */
    border-radius: 8px 8px 0 0;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    margin-top: 0;
    color: var(--secondary-color);
}

/* * =========================================
 * BIOGRAPHIE
 * =========================================
*/
.bio-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.bio-image {
    width: 250px;
    height: 250px;
    border-radius: 50%; /* Image de profil ronde */
    object-fit: cover;
    border: 5px solid var(--primary-color);
}

/* * =========================================
 * RÉSEAUX
 * =========================================
*/
#reseaux {
    text-align: center;
}

.social-links {
    margin-top: 2rem;
}

.social-btn {
    display: inline-block;
    padding: 1rem 2rem;
    margin: 0.5rem;
    background-color: var(--primary-color);
    color: white;
    font-family: var(--font-secondary);
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.social-btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* * =========================================
 * FOOTER (Pied de page)
 * =========================================
*/
.site-footer {
    background-color: var(--bg-dark);
    color: var(--bg-light);
    padding: 2rem;
    text-align: center;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--bg-light);
    margin: 0 1rem;
    font-family: var(--font-secondary);
}

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

/* * =========================================
 * RESPONSIVE (Tablettes & Mobiles)
 * =========================================
 * On applique ces styles si l'écran fait
 * 768px de large ou MOINS.
*/
@media (max-width: 768px) {

    /* * NAVBAR 
     * Le logo passe au-dessus des liens, mais la barre reste fixe
    */
    .navbar {
        height: auto; /* Hauteur auto pour s'adapter */
    }
    
    .navbar nav {
        flex-wrap: wrap; /* Permet aux éléments de passer à la ligne */
        justify-content: center; /* Centre les liens */
        padding: 0.5rem 1rem;
    }

    .nav-logo {
        width: 100%; /* Le logo prend toute la largeur */
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .nav-links {
        margin: 0;
    }
    
    .nav-links li {
        margin: 0 0.75rem; /* On réduit l'espace entre les liens */
    }
    
    /* * On doit ajuster le padding du body 
     * La navbar fixe est plus haute (elle fait ~2 lignes)
     * (Ajuste "100px" si besoin)
    */
    body {
        padding-top: 100px; 
    }


    /* * GÉNÉRAL
     * On réduit les titres et les paddings pour les petits écrans
    */
    h2 {
        font-size: 2rem;
    }
    .section-padding {
        padding: 2.5rem 1rem; /* Moins de padding sur les côtés */
    }


    /* * PORTFOLIO
     * Les cartes vont s'empiler verticalement
    */
    .portfolio-grid {
        flex-direction: column; /* Les cartes s'empilent */
        align-items: center; /* On les centre */
    }

    .card {
        width: 90%; /* Prend 90% de la largeur dispo */
        max-width: 400px; /* Mais pas plus de 400px */
    }

    /* * BIOGRAPHIE
     * L'image passe au-dessus du texte
    */
    .bio-content {
        flex-direction: column; /* On empile image et texte */
        text-align: center;
    }
    
    .bio-image {
        width: 200px; /* On réduit un peu l'image de profil */
        height: 200px;
        margin-bottom: 1.5rem; /* Espace entre l'image et le texte */
    }

    /* * RÉSEAUX
     * Les boutons s'empilent pour être plus faciles à cliquer
    */
    .social-btn {
        display: block; /* Prend toute la largeur, un par ligne */
        margin: 0.5rem 0;
    }
}
