/* Variables CSS pour gérer le thème clair et sombre */
:root {
    --bg-body: #038397;
    --bg-container: #ffffff;
    --text-color: #333333;
    --bg-nav: #333333;
    --text-nav: #ffffff;
}

body.sombre {
    --bg-body: #121212;
    --bg-container: #2c2c2c;
    --text-color: #e0e0e0;
    --bg-nav: #000000;
    --text-nav: #e0e0e0;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin: 0;
    padding: 10px;
}

/* Navbar et header */
.navbar {
    background-color: var(--bg-nav);
    border-radius: 50px;
    color: var(--text-nav);
    padding: 20px 0;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.navbar a {
    color: var(--text-nav);
    text-decoration: none;
    margin: 10px;
    font-weight: bold;
} 

.navbar a:hover {
    border-bottom: 2px solid #007BFF;
}

/* Sections principales */
.portfolio {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: var(--bg-container);
    border-radius: 60px; 
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease-in-out, background-color 0.3s ease;
}

.portfolio:hover {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.profile { text-align: center; }
.profile img { max-width: 100%; border-radius: 50%; }

.projects { margin-top: 20px; }
.projects ul { list-style: none; padding: 0; }
.projects li { margin-bottom: 20px; }

.contact {
    max-width: 1200px;
    margin: 20px auto;
    border-radius: 50px;
    padding: 20px;
    background-color: var(--bg-container);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.2);
    text-align: center;
}

footer {
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--bg-nav);
    border-radius: 50px;
    color: var(--text-nav);
    text-align: center;
    padding: 20px 0;
}

/* --- Contrôles (Langue & Thème) --- */
.controls {
    display: inline-flex;
    align-items: center;
    margin-left: 20px;
    gap: 10px;
}
.controls button {
    cursor: pointer;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    background-color: #1382d1;
    color: white;
    font-weight: bold;
}

/* Switch (Thème) */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px; width: 16px;
    left: 4px; bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider { background-color: #2196F3; }
input:checked + .slider:before { transform: translateX(26px); }

@media (max-width: 768px) {
    .navbar { flex-direction: column; }
    .controls { margin-top: 15px; margin-left: 0; }
}