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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

h2 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 5rem;
}

a {
    text-decoration: none;
    color: #333;
}

.logo {
    font-family: "Space Mono", monospace;
    font-weight: 700;
    font-size: large;
    font-style: normal;
}

/* Navbar */

header {
    background-color: white;
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    z-index: 1;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: auto;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.0rem;
}

nav a {
    transition: color 0.2s ease;
    position: relative;
    color: inherit;
}

nav ul a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: rgb(109, 107, 107);
    transition: width 0.3s ease;
  }

nav a:hover {
    color: rgb(109, 107, 107);
}

nav ul a:hover::after {
    width: 100%;
}

/* Hero */

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 91.5vh;
    padding: 2rem;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5rem;
    max-width: 1100px;
    width: 100%;
}

.hero-text {
    text-align: left;
    flex: 1;
}

.hero h1 {
    font-size: 4rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 3rem;
}

.hero .button {
    background-color: #333;
    padding: 0.5rem 1rem;
    border-radius: 7px;
}

.hero .button:hover {
    background-color: #555;
}

.hero a {
    color:white;
}

.hero-image {
    flex: 0 0 auto;
}

.hero-image img {
    width: 280px; /* Largeur fixe pour garder l'harmonie */
    height: 350px; /* On définit une hauteur pour garder un ratio élégant */
    object-fit: cover; /* Coupe l'image proprement sans la déformer */
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* About */

.about {
    background-color: rgba(244, 244, 245, 0.3);
    padding-top: 5rem;
    padding-bottom: 10rem;
}

.about h3 {
    font-size: 2rem;
}

.about-container {
    margin: 0 auto;
    width: 75%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5rem;
}

.formation {
    flex: 1.5;
    text-align: left;
}

.formation p {
    margin-top: 20px;
    color:rgb(109, 107, 107);
}

.about-container .skills-developed {
    flex: 0.6;
    background-color: white;
    padding: 2rem;
    border-style: solid;
    border-width: 1px;
    border-radius: 10px;
    border-color: #e4e4e7;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);

    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center;
}

.skills-developed h3 {
    text-align: center;
}

.skills-buttons-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.skills-buttons-container a {
    width: 100%;
    display: flex;
    justify-content: center;
}

.skills-developed button {
    border: none;
    border-radius: 50px;
    margin-top: 1.4rem;
    padding: 1.8rem;
    font-size: 1.5rem;
    font-weight: 500;
    width: 70%;
    cursor: pointer;
}

.skills-developed button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    filter: brightness(1.1);
}

.btn-red {
    background-color: #b80905;
    color:white;
}

.btn-orange {
    background-color: #ed8c51;
}

.btn-yellow {
    background-color: #efba11;
}

.btn-green {
    background-color: #8cc850;
}

.btn-purple {
    background-color: #0a215e;
    color:white;
}

.btn-black {
    background-color: #0f0f0f;
    color:white;
}

/* Skills */

.skills {
    padding-top: 5rem;
    padding-bottom: 10rem;
    text-align: center;
}

.skill-category h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.skill-category {
    margin-bottom: 5rem;
}

.skill-category .hard-skills {
    border: #333 solid dotted;
}

.skills-grid {
    width: 60%;
    margin: 0 auto;
    color:white;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}
  
.skills-grid span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #333;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    user-select: none;
    transition: transform 0.2s ease;
}

.skills-grid span:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.skills-grid span img {
    width: 2rem;
    pointer-events: none;
}

.category-hard span {
    background-color: #2c3e50;
}

.category-soft span {
    background-color: #4b2c5e;
}

/* Projects */

.projects {
    background-color: rgba(244, 244, 245, 0.3);
    padding: 7em 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 1000px) {
    .projects-grid {
      grid-template-columns: repeat(2, 1fr);
    }
}
  
@media (max-width: 600px) {
    .projects-grid {
      grid-template-columns: 1fr;
    }
}

.project-card {
    display: flex;
    flex-direction: column;
    background-color: white;
    border-style: solid;
    border-width: 1px;
    border-radius: 10px;
    border-color: #e4e4e7;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition-duration: 0.3s;
    height: 100%;
    overflow: hidden; /* retiré ? */
}

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

.project-card .items {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.project-card p {
    margin-bottom: 1rem;
}

.project-card div {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.project-card span {
    font-size: smaller;
    border-radius: 20px;
    background-color: #f4f4f5;
    padding: 0.3rem 0.5rem;
    user-select: none;
}

.project-card img {
    width: 100%;
    display: block;
    margin: 0 auto;
    border-radius: 9px 9px 0 0;
    pointer-events: none;
}

.projects .other {
    margin-top: 3rem;
    text-align: center;
}

/* Contact */

.contact {
    margin-top: 8rem;
    margin-bottom: 5rem;
}

.contact-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
    margin: 0 auto;
    gap: 10rem;
}

.contact form {
    display: flex;
    flex-direction: column;
    width: 40%;
    margin-bottom: 2rem;
    padding: 1rem;
}

.contact form input {
    padding: 0.7rem;
    margin-bottom: 1rem;
    border: #e4e4e7 solid 1px;
    border-radius: 7px;
}

.contact form textarea {
    padding: 0.7rem;
    height: 10rem;
    margin-bottom: 1rem;
    border: #e4e4e7 solid 1px;
    border-radius: 7px;
}

.contact button {
    background-color: #333;
    border-radius: 10px;
    color:white;
    padding: 0.6rem;
    width: 6rem;
    font-weight: bold;
    font-size: 1rem;
}

.contact button:hover {
    cursor: pointer;
}

.contact .infos-contact {
    /* retirer */
    display: flex;
    justify-content: center;
    flex-direction: column;
    /* fin */

    width: 20%;
    padding: 1rem;
}

.contact-link {
    margin-bottom: 0.5rem;
}

.contact-link a {
    color:grey;
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.contact-link a:hover {
    color:#333;
}

.contact .infos-contact img {
    width: 2rem;
}

@media screen and (max-width: 950px) {
    .contact-container {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
  
    .contact form,
    .contact .infos-contact {
        width: 90%;
    }
  
    .contact form {
        padding: 1rem 0.5rem;
    }
  
    .contact .infos-contact {
        align-items: center;
        text-align: center;
    }
  
    .contact-link {
        justify-content: center;
    }
  
    .contact-link a {
        justify-content: center;
    }
}
  

/* Footer */

footer {
    background-color: rgba(244, 244, 244, 0.5);
    padding: 2rem 0;
}

footer div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: auto;
}

/* --- Style spécifique aux pages de compétences --- */

.skill-detail-page {
    max-width: 900px;
    margin: 4rem auto 10rem auto;
    padding: 0 2rem;
}

.skill-intro {
    text-align: center;
    margin-bottom: 4rem;
}

.skill-intro h1 {
    display: inline-block;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.skill-intro-text {
    margin-top: 2rem;
    font-size: 1.1rem;
    color: #444;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.back-link {
    display: block;
    margin-bottom: 2rem;
    color: #666;
    transition: color 0.3s;
}

.back-link:hover {
    color: #000;
}

.skill-definition {
    font-size: 1.2rem;
    color: #555;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

.project-evidence {
    background-color: white;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    padding: 3rem;
    margin-bottom: 4rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f4f4f5;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.project-header h3 {
    font-size: 1.8rem;
    margin: 0;
}

.project-tag {
    background-color: #f4f4f5;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #666;
}

.project-description h4 {
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: #333;
    padding-left: 1rem;
    font-size: 1.3rem;
}

.project-description p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #444;
    text-align: justify;
}

.project-description ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.project-description li {
    margin-bottom: 0.8rem;
    color: #555;
}

.text-placeholder {
    color: #999 !important;
    font-style: italic;
    border-left: 3px solid #eee;
    padding-left: 1rem;
}

.skill-detail-page:has(.btn-red) h4 {
    border-left: 4px solid #b80905;
}

.skill-detail-page:has(.btn-orange) h4 {
    border-left: 4px solid #ed8c51;
}

.skill-detail-page:has(.btn-yellow) h4 {
    border-left: 4px solid #efba11;
}

.skill-detail-page:has(.btn-green) h4 {
    border-left: 4px solid #8cc850;
}

.skill-detail-page:has(.btn-purple) h4 {
    border-left: 4px solid #0a215e;
}

.skill-detail-page:has(.btn-black) h4 {
    border-left: 4px solid #0f0f0f;
}