:root {
    --bg: #f4efe6;
    --text: #333;
    --accent: #c9a227;
    --card: #fffaf1;
    --shadow: rgba(0, 0, 0, 0.1);
}

.dark-theme {
    --bg: #111;
    --text: #f1f1f1;
    --card: #1a1a1a;
    --shadow: rgba(0, 0, 0, 0.5);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Poppins', sans-serif; 
}

body { 
    background: var(--bg); 
    color: var(--text); 
    transition: 0.3s; 
    overflow-x: hidden; 
}

/* ===== LOADER (INTRO) ===== */
#intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

#logo {
    width: 120px;
    opacity: 0; /* Géré par GSAP */
}

/* ===== NAVIGATION ===== */
header {
    background: var(--card);
    border-bottom: 2px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.nav-logo img { 
    height: 45px; 
    width: auto; 
    border-radius: 8px; 
}

nav { 
    display: flex; 
    gap: 20px; 
    align-items: center; 
}

nav a {
    text-decoration: none;
    font-weight: 600;
    color: var(--text);
    transition: 0.3s;
    font-size: 0.9rem;
}

nav a:hover, nav a.active { 
    color: var(--accent); 
}

/* MENU BURGER */
.burger { 
    display: none; 
    flex-direction: column; 
    gap: 4px; 
    cursor: pointer; 
}

.burger span { 
    width: 25px; 
    height: 3px; 
    background: var(--text); 
    border-radius: 2px; 
}

#theme-toggle { 
    background: none; 
    border: none; 
    font-size: 1.5rem; 
    cursor: pointer; 
}

/* ===== CONTENU GLOBAL ===== */
.content { 
    max-width: 1100px; 
    margin: 40px auto; 
    padding: 0 20px; 
}

.fade { 
    opacity: 0; 
    transform: translateY(20px); 
}

/* ===== SECTION BIO (ACCUEIL) ===== */
.bio { 
    display: flex; 
    align-items: center; 
    gap: 40px; 
    margin-top: 30px; 
}

.bio-text { flex: 2; }
.bio-photo { flex: 1; }
.bio-photo img { 
    width: 100%; 
    border-radius: 20px; 
    box-shadow: 0 10px 20px var(--shadow); 
}

/* ===== GRILLES DE COMPÉTENCES ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.skill-category {
    background: var(--card);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(201, 162, 39, 0.2);
    box-shadow: 0 5px 15px var(--shadow);
}

/* ===== GRILLE PROJETS (SITES WEB CLICABLES) ===== */
.websites-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.site-card {
    background: var(--card);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(201, 162, 39, 0.2);
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s ease;
}

.site-card:hover { transform: translateY(-5px); }

.site-card a {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.site-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.site-card h3 {
    padding: 15px;
    text-align: center;
    font-size: 1rem;
}

/* ===== GRILLE MAQUETTES (GALLERY) ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.gallery-grid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 5px 15px var(--shadow);
}

/* ===== CARTES PRÉSENTATION (INTERESTS) ===== */
.cards-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.card {
    background: var(--card);
    height: 180px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(201, 162, 39, 0.2);
}

.card span { font-weight: 600; z-index: 2; position: relative; }

.hover-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: 0.4s;
}

.card:hover .hover-img { opacity: 1; }

/* ===== FORMULAIRE DE CONTACT ===== */
.contact-form {
    max-width: 600px;
    margin: 30px auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(201, 162, 39, 0.3);
    background: var(--card);
    color: var(--text);
    font-size: 1rem;
}

.btn-submit {
    background: var(--accent);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.3s;
}

.btn-submit:hover { opacity: 0.9; }

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .websites-grid, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .cards-container { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .burger { display: flex; }
    nav {
        position: fixed; 
        top: 0; 
        left: -100%; 
        height: 100vh; 
        width: 70%;
        background: var(--card); 
        flex-direction: column; 
        padding: 100px 20px;
        transition: 0.4s ease; 
        z-index: 999;
    }
    nav.active { left: 0; }
    
    .bio { 
        flex-direction: column-reverse; 
        text-align: center; 
    }
    
    .websites-grid, .gallery-grid, .cards-container { 
        grid-template-columns: 1fr; 
    }
    
    .site-card img { height: 200px; }
}

/* --- STYLES COMPÉTENCES AMÉLIORÉS --- */

.skill-category h3 {
    margin-bottom: 20px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-box {
    width: 100%;
    margin-bottom: 15px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.skill-info i {
    margin-right: 8px;
    color: var(--accent);
}

/* Barre grise en fond */
.progress-line {
    height: 8px;
    width: 100%;
    background: rgba(128, 128, 128, 0.1);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

/* Barre de couleur (niveau) */
.progress-line span {
    height: 100%;
    position: absolute;
    background: var(--accent);
    border-radius: 10px;
    transform: scaleX(0); /* Pour l'animation GSAP */
    transform-origin: left;
    transition: transform 1s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

/* Animation au survol de la carte */
.skill-category:hover .progress-line span {
    transform: scaleX(1);
}
