/* =========================================
   VARIABLES (Change tes couleurs ici !)
   ========================================= */
:root {
    --primary-color: #4f46e5; /* Bleu Indigo */
    --primary-hover: #4338ca;
    --bg-color: #f8fafc; /* Gris très clair pour le fond */
    --text-main: #0f172a; /* Texte foncé (presque noir) */
    --text-muted: #64748b; /* Texte secondaire gris */
    --card-bg: #ffffff;
    --font-main: 'Inter', sans-serif;
}

/* =========================================
   RESET ET BASES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth; /* Pour un défilement fluide au clic */
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

/* Typographie globale */
h1, h2, h3 { line-height: 1.2; }
a { text-decoration: none; transition: 0.3s; }
.section { padding: 80px 20px; max-width: 1100px; margin: 0 auto; }
.highlight { color: var(--primary-color); }

/* =========================================
   NAVIGATION
   ========================================= */
.navbar {
    position: fixed;
    top: 0; width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px); /* Effet de flou moderne */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
}

.nav-brand { font-size: 1.5rem; font-weight: 700; color: var(--primary-color); }
.nav-links { list-style: none; display: flex; gap: 30px; align-items: center; }
.nav-links a { color: var(--text-main); font-weight: 600; }
.nav-links a:hover { color: var(--primary-color); }

/* BOUTONS */
.btn-primary, .btn-secondary, .btn-outline {
    padding: 10px 20px; border-radius: 8px; font-weight: 600; display: inline-block;
}
.btn-primary { background: var(--primary-color); color: white; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); }
.btn-secondary { background: var(--text-main); color: white; }
.btn-secondary:hover { background: #333; transform: translateY(-2px); }
.btn-outline { border: 2px solid var(--text-muted); color: var(--text-main); }
.btn-outline:hover { border-color: var(--primary-color); color: var(--primary-color); }
.btn-large { padding: 15px 30px; font-size: 1.1rem; }

/* =========================================
   SECTION HERO (ACCUEIL)
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    padding-top: 80px; /* Pour compenser la navbar fixe */
}

.hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 20px; }
.hero p { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 30px; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-buttons { display: flex; gap: 15px; justify-content: center; }

/* =========================================
   SECTION PROJETS (GRILLE)
   ========================================= */
.projets-section { text-align: center; }
.projets-section h2 { font-size: 2.5rem; margin-bottom: 10px; }
.section-subtitle { color: var(--text-muted); margin-bottom: 50px; }

.grid-projets {
    display: grid;
    /* C'est ici que la magie opère : la grille s'adapte toute seule ! */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    text-align: left;
}

/* Cartes Projets */
.carte-projet {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.carte-projet:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.1);
}

.carte-projet img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.carte-contenu { padding: 25px; }
.carte-contenu h3 { font-size: 1.3rem; margin-bottom: 10px; }
.carte-contenu p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; }

/* Tags de langages (HTML, CSS...) */
.tags { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.tags span {
    background: var(--bg-color); color: var(--primary-color);
    padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600;
}

.lien-projet { color: var(--primary-color); font-weight: 600; }
.lien-projet:hover { color: var(--primary-hover); text-decoration: underline; }

/* =========================================
   CONTACT ET FOOTER
   ========================================= */
.contact-section { text-align: center; background: var(--card-bg); border-radius: 20px; padding: 60px 20px; margin-bottom: 40px;}
.contact-section h2 { margin-bottom: 15px; }
.contact-section p { color: var(--text-muted); margin-bottom: 30px; }

footer {
    text-align: center; padding: 30px; color: var(--text-muted); font-size: 0.9rem;
}

/* =========================================
   RESPONSIVE (MOBILES)
   ========================================= */
@media (max-width: 768px) {
    .nav-links { display: none; /* Cache les liens sur mobile pour faire simple */ }
    .hero-buttons { flex-direction: column; }
}