/* --- Variables & Reset --- */
:root {
    --primary-color: #0d1117; /* Presque noir, fond principal */
    --secondary-color: #161b22; /* Gris foncé, fond des cartes */
    --accent-color: #007bff; /* Bleu vif pour les accents */
    --text-color: #c9d1d9; /* Gris clair pour le texte */
    --light-text-color: #8b949e; /* Texte secondaire, liens */
    --border-color: #30363d; /* Bordures subtiles */
    --hover-color: #21262d; /* Fond au survol */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header & Navigation --- */
header {
    background-color: var(--secondary-color);
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

header h1 {
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
    letter-spacing: 1px;
}

header p {
    text-align: center;
    color: var(--light-text-color);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

nav {
    text-align: center;
}

nav a {
    color: var(--light-text-color);
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.2s ease;
    padding: 5px 10px;
    border-radius: 5px;
}

nav a:hover {
    color: var(--accent-color);
    background-color: var(--hover-color);
    transform: translateY(-2px);
}

nav a i {
    margin-right: 8px;
}

/* --- Sections Générales --- */
section {
    padding: 4rem 0;
    text-align: center;
}

section:nth-child(odd) {
    background-color: var(--primary-color);
}

section:nth-child(even) {
    background-color: var(--secondary-color);
}

h2 {
    color: var(--accent-color);
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

/* --- Hero Section --- */
.hero-section {
    background: linear-gradient(rgba(13, 17, 23, 0.9), rgba(13, 17, 23, 0.9)), url('https://source.unsplash.com/random/1600x900?server,network') no-repeat center center/cover;
    color: white;
    padding: 8rem 0;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.intro-text {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: #f1f5f9;
}

.highlight-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1.2;
}

/* --- Home-Lab Section --- */
#lab .grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 2rem;
    text-align: left;
}

.card {
    background-color: var(--primary-color);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.card h3 {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.card h3 i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.card ul {
    list-style: none;
}

.card ul li {
    margin-bottom: 0.8rem;
    color: var(--text-color);
    font-size: 1.05rem;
    line-height: 1.4;
}

.card ul li strong {
    color: var(--accent-color);
}

/* --- Skills Section --- */
#skills .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

.skill-item {
    background-color: var(--primary-color);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.skill-item:hover {
    background-color: var(--hover-color);
    transform: translateY(-3px);
}

.skill-item i {
    margin-right: 10px;
    color: var(--accent-color);
    font-size: 1.5rem;
}

/* --- Projects Section --- */
.project-card {
    background-color: var(--primary-color);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-top: 2rem;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.project-card h3 {
    color: var(--accent-color);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.project-card h3 i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.project-card p {
    color: var(--text-color);
    font-size: 1.05rem;
}

/* --- Footer & Contact --- */
footer {
    background-color: var(--secondary-color);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--light-text-color);
}

footer h2 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.contact-links p {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.contact-links a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-links a:hover {
    text-decoration: underline;
    color: #69b6ff; /* Un bleu plus clair au survol */
}

.contact-links i {
    margin-right: 10px;
    color: var(--accent-color);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    header p {
        font-size: 1rem;
    }
    nav a {
        margin: 0 8px;
        font-size: 0.9rem;
    }
    h2 {
        font-size: 1.8rem;
    }
    .hero-section {
        padding: 6rem 0;
    }
    .highlight-text {
        font-size: 2rem;
    }
    .grid-container {
        grid-template-columns: 1fr;
    }
    .skill-item {
        font-size: 1rem;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    nav a {
        display: block;
        margin: 10px auto;
    }
    header p {
        margin-bottom: 1rem;
    }
    .hero-section {
        padding: 4rem 0;
    }
    .highlight-text {
        font-size: 1.5rem;
    }
}
