*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: "Mako", serif;
    margin: 0; /* Supprime la marge par défaut du navigateur */
}

.site-content {
    background-color: #18111B; /* Applique la couleur de fond au conteneur principal */
    min-height: 100vh; /* S'assure que le contenu remplit au moins toute la hauteur de l'écran */
    padding-top: 100px; /* Ajoute un espacement pour le header fixe */
    overflow-x: hidden; /* Empêche le débordement horizontal */
}

h1 {
    color: #D19DFF;
    font-size: 4em;
}

h2 {
    color: #D19DFF;
    font-size: 3em;
    text-align: center;
}

h3 {
    color: #ECD9FA;
    font-size: 2em;
}

h4 {
    color: #D19DFF;
    font-size: 1.3em;
}

p, a, .box-cub3D, .minishell, ul, .container-skills {
    color: #ECD9FA;
}

a {
    text-decoration: none;
}

.titre-acceuil h1 {
    font-family: "Lobster Two", sans-serif;
}
#home, #skills, #project, #about-me {
    scroll-margin-top: 120px; /* Même ajustement */
}

/*HEADER*/
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px 0 40px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #18111B;
    z-index: 1000;
    border-bottom: #54346B solid 1px;
}

nav a {
    padding-right: 70px;
    gap: 20px;
    font-size: 1.5em;
    text-decoration: none;
}

.titre-acceuil h1 {
    font-size: 2em;
}
/* --- Responsive --- */
@media (max-width: 768px) {
    h1 {
        font-size: 3em;
    }

    h2 {
        font-size: 2.5em;
    }

    h3 {
        font-size: 1.8em;
    }

    header {
        flex-direction: column;
        align-items: center;
        padding: 10px 20px;
        position: static; /* Le header ne sera plus fixé en haut */
    }

    .site-content {
        padding-top: 0; /* On enlève le padding car le header n'est plus fixé */
    }

    nav {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-top: 10px;
    }

    nav a {
        padding-right: 0;
        font-size: 1.2em;
    }

    #home, #skills, #project, #about-me {
        scroll-margin-top: 20px;
    }

    /* Home */
    .home {
        flex-direction: column;
        text-align: center;
        gap: 40px;
        padding: 20px 5%;
    }

    .home img {
        width: 200px;
        height: 200px;
    }

    .bouton-container {
        justify-content: center;
    }

    /* Jour/Nuit */
    #jour-nuit {
        position: static; /* On enlève le positionnement absolu */
        margin: 20px auto; /* On centre le bouton */
        transform: none;
    }

    /* Skills */
    .skills {
        margin-top: 100px;
    }

    .tab-skills, .tab-skills thead, .tab-skills tbody, .tab-skills th, .tab-skills td, .tab-skills tr {
        display: block;
    }

    .tab-skills thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .tab-skills tr {
        margin-bottom: 20px;
        border-bottom: 2px solid #54346B;
    }
    #dark-toggle:not(:checked) ~ .site-content .tab-skills tr {
        border-bottom: 2px solid #c6a5ff;
    }


    .tab-skills td {
        border: none;
        position: relative;
        padding-left: 50%;
        text-align: left;
        font-size: 1em;
    }

    .tab-skills td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: #D19DFF;
    }
    #dark-toggle:not(:checked) ~ .site-content .tab-skills td:before {
        color: #54346B;
    }


    /* Project */
    .project {
        margin: 100px auto;
    }
    .containerde-project {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    /* About me */
    .about-me {
        margin: 100px 0;
    }
    .about-me-container {
        flex-direction: column;
        align-items: center;
        gap: 40px;
        text-align: center;
        margin-top: 50px;
    }

    .about-me img {
        width: 50%;
        margin-left: 0;
    }

    .about-me p {
        width: 90%;
        margin: 0 auto;
        font-size: 16px;
    }

    /* Footer */
    footer {
        padding: 20px;
        justify-content: center;
        gap: 40px;
    }
}

.head-acceuil:hover,
.head-project:hover,
.head-about-me:hover,
.head-skills:hover {
    text-decoration: underline;
    color: #48295C;
}

/*MAIN*/
/*Section jour/nuit*/
#jour-nuit {
    position: absolute;
    top: 150px; /* sous le header */
    right: 1%; /* aligné avec l'image de la section home */
    opacity: 1;
    transform: none;
    transition: all 0.5s ease;
}

#jour-nuit h2 {
    background-color: #e6d6ff;
    font-weight: 300;
}
.dark-btn {
    width: 80px;
    height: 40px;
    background: #370078;
    border: 2px solid #ac72ff;
    border-radius: 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    box-sizing: border-box;
    cursor: pointer;
    transition: background 0.3s ease;
}

.dark-btn .icon {
    font-size: 18px;
    z-index: 2;
    transition: opacity 0.3s ease;
  }

.dark-btn .slider {
    position: absolute;
    width: 36px;
    height: 36px;
    background: #ac72ff;
    border-radius: 50%;
    left: 1px;
    transition: left 0.3s ease;
    z-index: 3;
}
/* Styles pour le mode jour/nuit */

/* --- Styles du bouton --- */

/* Mouvement du slider */
#dark-toggle:checked ~ .site-content .dark-btn .slider {
  left: 42px; /* Ajusté pour le padding et la bordure */
}



/* Apparence du bouton en mode jour (case NON cochée) */
#dark-toggle:not(:checked) ~ .site-content .dark-btn {
    background: #e6d6ff;
    border: 2px solid #c6a5ff;
}

/* --- Styles globaux du thème --- */

/* Thème Jour (lorsque la case n'est PAS cochée) */
#dark-toggle:not(:checked) ~ .site-content {
    background-color: #f5f0ff;
    color: #18111B;
    transition: background-color 0.5s, color 0.5s;
}

#dark-toggle:not(:checked) ~ .site-content header {
    background-color: #f5f0ff;
    border-bottom: #c6a5ff solid 1px;
}

#dark-toggle:not(:checked) ~ .site-content h1,
#dark-toggle:not(:checked) ~ .site-content h2,
#dark-toggle:not(:checked) ~ .site-content h4,
#dark-toggle:not(:checked) ~ .site-content .tab-skills th,
#dark-toggle:not(:checked) ~ .site-content #padugraphie {
    color: #54346B;
}

#dark-toggle:not(:checked) ~ .site-content h3 {
    color: #301C3B;
}

#dark-toggle:not(:checked) ~ .site-content p,
#dark-toggle:not(:checked) ~ .site-content a,
#dark-toggle:not(:checked) ~ .site-content .tab-skills,
#dark-toggle:not(:checked) ~ .site-content .project-tech,
#dark-toggle:not(:checked) ~ .site-content .icon-footer {
    color: #18111B;
}

#dark-toggle:not(:checked) ~ .site-content .bouton-github,
#dark-toggle:not(:checked) ~ .site-content .bouton-linkedin {
    background-color: #e6d6ff;
}

#dark-toggle:not(:checked) ~ .site-content .bouton-github a,
#dark-toggle:not(:checked) ~ .site-content .bouton-linkedin a {
    color: #18111B;
}

#dark-toggle:not(:checked) ~ .site-content .bouton-github:hover,
#dark-toggle:not(:checked) ~ .site-content .bouton-linkedin:hover {
    background-color: #d1bfff;
}

#dark-toggle:not(:checked) ~ .site-content .project-card {
    background-color: #e6d6ff;
    border: #c6a5ff solid 2px;
}

#dark-toggle:not(:checked) ~ .site-content .project-card:hover {
    background-color: #d1bfff;
}

#dark-toggle:not(:checked) ~ .site-content .home img,
#dark-toggle:not(:checked) ~ .site-content .about-me img {
    border-color: #c6a5ff;
}

#dark-toggle:not(:checked) ~ .site-content footer {
    background-color: #f5f0ff;
    border-top: #c6a5ff solid 1px;
}

#dark-toggle:not(:checked) ~ .site-content .icon-footer {
    color: #18111B;
}

/* Les styles du mode sombre sont les styles par défaut, donc pas besoin de les redéfinir avec #dark-toggle:checked */

/*Home*/
.home {
    display: flex;
    align-items: center;
    gap: 100px;
    padding: 20px 10%;
}

.home img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: solid 2px black;
    object-fit: cover; /*Pour que l image remplisse tout le cercle*/
    border:#54346B solid 3px;;
}

.bouton-container {
    display: flex;
    justify-content: flex-start;
    gap: 50px;
    align-items: center;
}

.bouton-github, .bouton-linkedin {
    background-color: #301C3B;
    padding: 10px 20px;
    border-radius: 20px;
}

.bouton-github:hover,
.bouton-linkedin:hover {
    background-color: #3D224E;
}

/*Skills*/
table {
    border-collapse: collapse;
    margin: 40px auto;
    font-size: 1.5em;
    width: 100%;
    table-layout: fixed;
}

.skills {
    margin-top: 200px;
}
.skills h2 {
    display: flex;
    justify-content: center;
}
.tab-skills {
    color: #ECD9FA;
}

.tab-skills th, .tab-skills td {
    padding: 20px;
    text-align: center;
}

.tab-skills th {
    color: #D19DFF;
}

/*Project*/
.project {
    margin: 200px auto;
}

.containerde-project {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20%;
    padding: 0 20px;
}

.project-card {
    background-color: #301C3B;
    width: 300px;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: #54346B solid 2px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card p {
    line-height: 1.6;
}

.project-tech {
    color: #ECD9FA;
    font-size: 1.3em;
    margin-top: auto; /* Pousse cette section en bas de la carte */
    padding-top: 20px; /* Espace avec le paragraphe du dessus */
    display: grid;
    grid-template-columns: auto 1fr; /* 1ère colonne s'adapte à l'icône, 2ème prend le reste */
    align-items: center; /* Alignement vertical */
    gap: 10px 8px; /* 10px entre les lignes, 8px entre icône et texte */
}

.project-card:hover {
    background-color: #3D224E;
    transform: translateY(-10px);
    box-shadow: 0 12px 16px rgba(0, 0, 0, 0.3);
}

#padugraphie {
    color: #D19DFF;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    font-size-adjust: 1.7em;
}

#padugraphie:hover {
    text-decoration: underline;
    border-radius: 5px;
    transition: background 0.2s, color 0.2s;
}

#salon-imaginaire {
    color: #D19DFF;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    font-size-adjust: 1.7em;   
}

#salon-imaginaire:hover {
    text-decoration: underline;
    border-radius: 5px;
    transition: background 0.2s, color 0.2s;
}


/*About me*/
.about-me {
    margin: 200px 0;
}

.about-me img {
    width: 30%;
    height: auto;
    border: #54346B solid 2px;
    border-radius: 10px;
    margin-left: 10%;
}
.about-me p {
   text-align: justify;
   width: 60%;
   font-size: 18px;
   line-height: 1.6;
}

.about-me-container {
    display: flex;
    align-items: flex-start;
    gap: 150px;
    margin-top: 100px;
}

/*FOOTER*/
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    text-decoration: none;
    background-color: #18111B;
    border-top: #54346B solid 1px;
}

.icon-footer {
    font-size: 40px;
}