/* --- Variables & Reset --- */
:root {
    --bg-color: #0f172a;        /* Fond très sombre (proche du noir/bleu) */
    --card-bg: #1e293b;         /* Fond des cartes (légèrement plus clair) */
    --primary-color: #38bdf8;   /* Bleu cyan (pour les boutons/liens) */
    --text-color: #e2e8f0;      /* Blanc cassé pour le texte */
    --text-muted: #94a3b8;      /* Gris pour les textes secondaires */
    --gradient: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --font-main: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

.container {
    max-width: 1200px; /* Élargi pour bien accueillir les 4 colonnes */
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Navigation --- */
.navbar {
    background-color: rgba(15, 23, 42, 0.95);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* --- Hero Section --- */
.hero {
    padding: 160px 0 100px;
    background: radial-gradient(circle at top right, #1e3a8a20, transparent);
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.hero-text h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.hero-text p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
}

.social-links {
    margin-bottom: 2rem;
}

.social-links a {
    font-size: 1.5rem;
    margin-right: 1.5rem;
    color: var(--text-color);
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
    display: inline-block;
}

/* Photo de profil ronde */
.hero-img img {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* --- Boutons --- */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #0f172a;
}

.btn-primary:hover {
    background-color: #7dd3fc;
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 20px;
    font-size: 0.9rem;
    background-color: var(--primary-color);
    color: #0f172a;
    width: fit-content;
}

.btn-small:hover {
    background-color: #fff;
}

/* Bouton Désactivé (Privé) */
.btn-disabled {
    background-color: #334155; /* Gris */
    color: #94a3b8;
    cursor: not-allowed;
}

.btn-disabled:hover {
    background-color: #334155;
    transform: none;
    color: #94a3b8;
}

/* --- Sections Générales --- */
.section {
    padding: 80px 0;
}

.bg-alt {
    background-color: #162035; /* Légère nuance pour séparer les sections */
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* --- About --- */
.about-content {
    display: flex;
    gap: 20px;
    margin-bottom: 2rem;
}

.about-card {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    flex: 1;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
}

.about-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.about-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-muted);
}

/* --- Skills (CORRIGÉ POUR 4 COLONNES) --- */
.skills-grid {
    display: grid;
    /* Force 4 colonnes de largeur égale */
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.skill-category {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-size: 1.1rem; /* Ajusté légèrement pour que ça rentre bien */
}

.skill-category ul li {
    margin-bottom: 0.5rem;
    padding-left: 10px;
    border-left: 2px solid var(--primary-color);
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Portfolio / Projects (Style Cartes) --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.project-img {
    height: 200px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img img {
    transform: scale(1.05);
}

.project-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex-grow: 1; /* Pousse le bouton vers le bas */
}

.project-tags {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Footer --- */
footer {
    background-color: #0b1120;
    padding: 50px 0 20px;
    text-align: center;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.contact-item i {
    color: var(--primary-color);
}

.copyright {
    color: #475569;
    font-size: 0.9rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 20px;
}

/* --- Responsive --- */

/* Tablettes / Petits écrans (Pour les skills) */
@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr); /* Passe à 2 colonnes */
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-text p {
        margin: 0 auto 2rem;
    }
    
    .nav-links {
        display: none; /* Simplification pour mobile */
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Petits Mobiles (Pour les skills) */
@media (max-width: 600px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}