@import url('https://fonts.googleapis.com/css2?family=Public+Sans:ital,wght@0,100..900;1,100..900&display=swap');

/* Styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Public Sans", 'Arial', sans-serif;
    background-color: #ffffff; /* Fond blanc par défaut */
    color: #333; /* Texte sombre */
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
}

/* Styles de l'en-tête */
header {
    background-color: #1a1a1a; /* Fond sombre pour l'en-tête */
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

header .header-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 0 auto;
    padding: 0 20px;
}

.header-container h1 {
    font-size: 2em;
    text-align: center;
}

header p {
    font-size: 1.1em;
    color: #ccc;
    padding-right: 8%;
}

header nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
}

header nav a {
    color: white;
    text-decoration: none;
    font-size: 1em;
    padding: 5px 10px;
    transition: color 0.3s;
}

a {
    color: #1e90ff;
    text-decoration: none;
    font-weight: 700;
}

a:hover {
    color: #ff6347;
}

/* Bouton Dark/Light Mode */
.modeToggle {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.3s;
}

.modeToggle:hover {
    transform: scale(1.1);
}

/* Contenu principal */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    background-color: #ffffff; /* Fond blanc par défaut */
    transition: background-color 0.3s;
}

/* Sections */
section {
    margin-bottom: 60px;
}

#about p {
    text-align: center;
}

.section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 20px;
    color: #1e90ff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.projects, .skills, .socials {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-around;
}

.project, .skill, .social {
    width: 30%;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, color 0.3s, transform 0.3s;
    text-align: center;
}

.project:hover, .skill:hover, .social:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
}

.project h3, .skill h3 {
    font-size: 1.5em;
    color: #333;
}

.project p, .skill p {
    font-size: 1em;
    color: #666;
}

.project a, .skill a {
    display: inline-block;
    margin-top: 10px;
}

/* Section Contact */
ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Section Réseaux Sociaux */
section.socials {
    text-align: center;
    margin-bottom: 60px;
}

.socials {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.socials .social {
    max-width: 300px;
}

.socials h3 {
    font-size: 1.5em;
    color: #333;
}

.socials a {
    display: inline-block;
    margin-top: 10px;
}

/* Pied de page */
footer {
    background-color: #1a1a1a;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 60px;
}

.dark-mode h3, .dark-mode p {
    color: white;

}

/* Mode sombre */
body.dark-mode {
    background-color: #1c2b3d;
    color: #e0e0e0;
}

body.dark-mode header {
    background-color: #141f2e;
}

header nav a {
    color: #e0e0e0;
}

header nav a:hover {
    color: #1e90ff;
}

body.dark-mode .container {
    background-color: #1c2b3d;
}

body.dark-mode .project, body.dark-mode .skill, body.dark-mode .social {
    background-color: #2e3e4e;
    color: #e0e0e0;
}

body.dark-mode footer {
    background-color: #0f1923;
}

/* Animation de transition du mode sombre */
body.dark-mode .modeToggle {
    color: #1e90ff;
}

/* Responsivité */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }

    header p {
        padding: 0px;
    }

    .projects, .skills, .socials {
        flex-direction: column;
        gap: 30px;
    }

    .project, .skill, .social {
        width: 80%;
        margin: 0 auto;
        max-width: 80% !important;
    }
}