/* --------------------- */
/*        GLOBAL         */
/* --------------------- */
*, ::before, ::after {
    box-sizing: border-box;
}
html, body {
    margin: 0;
    padding: 0;
    width: 100vw;               /* ⚡ Empêche le scroll horizontal */
    overflow-x: hidden;         /* ⚡ Empêche le scroll horizontal */
    min-height: 100vh;
    font-family: "new-order", sans-serif;
    scroll-behavior: smooth;
    background-color: #34354c;

    /* ⚡ Background radial vert + bleu nuit */
/* background-image:  */
        /* radial-gradient(circle at 5% 5%, rgba(70,182,169,0.236) 0%, transparent 20%),
        radial-gradient(circle at 95% 95%, rgba(70,182,169,0.236) 0%, transparent 20%); */
    background-repeat: no-repeat;
    background-position: top left, bottom right;
    /* background-size: 50% 50%, 50% 50%; plus large, pour éviter le “coupage” */
    z-index: 0;
    /* box-sizing: border-box;       ⚡ Padding inclus dans la largeur */
}

/* --------------------- */
/*        NAVBAR         */
/* --------------------- */
.navbar {
    font-family: 'new-order';
    background-color: #2d2e42;
    padding: 20px 60px; /* Légère réduction pour optimiser le viewport */
    display: flex;
    position: fixed;
    top: 0;               /* Obligatoire pour fixer au sommet */
    left: 0;              /* Obligatoire pour caler à gauche */
    width: 100%;
    justify-content: space-between; 
    align-items: center;
    flex-wrap: nowrap;
    z-index: 1000;        /* Pour rester au-dessus des cartes Skills */
    box-sizing: border-box; /* ⚡ INDISPENSABLE : inclut le padding dans les 100% de largeur */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); /* Optionnel : détache la nav du fond */
}

/* Style pour ton nom (le nouveau "logo") */
.nav-logo a {
    color: white;
    text-decoration: none;
    font-size: 2rem; /* Aligné sur la taille de tes nav-items */
    font-weight: bold;
}

.nav-logo a span {
    color: #e24267; /* Utilise ton rose signature pour ton nom de famille */
}

.navbar .nav-items {
    display: flex;
    gap: 2rem;
    font-size: 2rem;
}
.navbar a {
    color: white;
    text-decoration: none;
    font-size: 1.7rem;
    scroll-behavior: smooth;
}
.navbar a:hover {
    color: #e24267;
}
.navbar .nav-items span {
    color: rgb(70, 182, 169);
}
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 10rem;
    padding-right: 10rem;
    gap: 40px;
    padding-top: 5rem;
}
.nav-items a.active {
    color:#e24267 !important; /* Force la couleur rouge */
}
/* --------------------- */
/* TITRE / TEXTE   */
/* --------------------- */
.title {
    font-family: "new-order";
    padding-top: 7rem;
    padding-bottom: 7rem;
    /* On retire les padding-left/right excessifs pour laisser Flexbox gérer l'espace */
    margin: 0;
    flex: 1.2;
}

.title h1 {
    font-size: 3rem;
    margin: 0;
    line-height: 1.1;
    color: whitesmoke;
}
.title h2 {
    color: whitesmoke;
    font-size: 2.5rem;
    font-weight: 500;
    margin-top: 10px;
    margin-bottom: 20px;
}

.title p {
    color: #8a95ae;
    font-size: 1.2rem;
    line-height: 1.5;
    max-width: 500px;
    margin: 0;
}

.title h2 span {
    color: #e24267;
}
/* --------------------- */
/* HERO IMAGE      */
/* --------------------- */
.hero-image {
    flex: 0.8;
    display: flex;
    justify-content: center;
}

/* Le conteneur qui permet de superposer le texte */
.img-wrapper {
    position: relative;
    max-width: 400px;
    width: 100%;
    display: block;
    border-radius: 20px;
    overflow: hidden; /* Pour que l'image ne dépasse pas des arrondis */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hero-image img {
    width: 100%;
    display: block;
    transition: 0.3s ease;
}
.img-wrapper:hover img {
    opacity: 60%;
}
.hover-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgb(70, 182, 169);
    font-family: 'new-order', sans-serif;
    font-weight: bold;
    font-size: 1.2rem;
    opacity: 0; /* Caché par défaut */
    transition: 0.3s ease;
    pointer-events: none; /* Le clic passe à travers pour atteindre le lien */
}
.img-wrapper:hover .hover-text {
    opacity: 1;
}
/* --------------------- */
/* BUTTON          */
/* --------------------- */
.github-btn-one {
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: #e9345e;
    font-family: 'new-order';
    color: whitesmoke;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 2rem;
    padding: 5px 15px; /* Ajusté pour être plus équilibré */
    margin-bottom: 15px;
}
.github-btn-one img {
    margin-left: 10px;
    height: 35px;
    width: 35px;
    object-fit: contain;
}
.github-btn-one:hover {
    background-color: #2d2e42;
}
/* Titres */
h2,
h3 {
    color: #e24267;
    font-size: 2.5rem;
    font-style: normal;
    font-weight: 600;
}
/* --------------------- */
/*        ABOUT          */
/* --------------------- */
#about {
    background-color: #2d2e42;
    padding-top: 4rem;
    padding-bottom: 7rem;
    width: 100%;
    font-family: "new-order";
    /* IMPORTANT : Utilise la même marge que ton header ici */
    padding-left: 10rem; 
    padding-right: 10rem;
    box-sizing: border-box;
}
#about h2 {
    margin: 0;
    font-size: 3rem;
    color: #e9345e;
    padding-bottom: 2rem;
    text-align: left; /* Aligné à gauche */
}
#about p {
    max-width: 800px; /* On limite la largeur pour la lecture, mais on reste à gauche */
    color: whitesmoke;
    margin: 0 0 1.2rem 0; /* Pas de "auto" ici pour ne pas centrer le bloc */
    font-size: 1.2rem;
    line-height: 1.5;
    text-align: left;
}
.alternance-box {
    border: 1px solid #e9345e;
    border-radius: 10px;
    max-width: 650px;
    margin-top: 2rem;
}
.alternance-box p {
    padding: 20px !important;
    text-align: left;
}

/* --------------------- */
/*        SKILLS         */
/* --------------------- */
#skills {
    padding-top: 7rem;
    padding-left: 10rem;
    padding-right: 10rem;
    font-family: "new-order";
    padding-bottom: 7rem;
    justify-content: center;
}
#skills h3 {
    color: whitesmoke;
    font-size: 1.2rem;
    margin: 0;
    padding-top: 35px;
}
#skills h2 {
    font-family: "new-order";
    font-size: 2.5rem;
    border-bottom: 5px solid #e9345e;
    width: 50px;
    margin: 0;
    padding-bottom: 2rem;
}
.Skill-category {
    background-color: #34354cfc;
    min-height: 230px; 
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    gap: 15px;
    padding: 20px;
    justify-items: center;
    /* --- INTERVENTION : Bordure et Ombre --- */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);  
}
.skills-wrapper {
    padding-top: 3rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}
.Skills-card {
    background-color: #3d3e56;
    width: 100%;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    padding-bottom: 10px;
}

.Skills-card svg {
    width: 60px;
    padding-top: 10px;
    transition: transform 0.3s ease, filter 0.3s ease;
    cursor: pointer;
}
.Skills-card svg:hover {
    transform: scale(1.15) rotate(10deg);
    filter: drop-shadow(0 0 5px #e9345e);
}
.Skills-card svg path {
    fill: #e9345e;
}
.Skills-card h3 {
    margin: 0;
    padding-bottom: 20px;
    font-size: 2rem;
}
.Skills-card p {
    color: #8a95ae;
    line-height: 1.5;
    font-size: 1rem;
    margin: 0;
    padding-top: 5px;
}
.icon-agile {
    width: 32px;
    height: 32px;
    /* Ce filtre transforme le noir en #e9345e */
    filter: invert(31%) sepia(94%) saturate(4520%) hue-rotate(331deg) brightness(96%) contrast(92%);
    transition: 0.3s ease;
}
.Skills-card:hover .icon-agile {
    transform: scale(1.15) rotate(10deg); /* Garde la même animation que tes SVGs */
}
/* --------------------- */
/* TECHNOS PROJETS       */
/* --------------------- */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding-bottom: 25px;
}
.tech-tag {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    background-color: rgba(220, 212, 212, 0.608);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* couleurs spécifiques par techno */
.html { background-color: #e14468; color: white; }
.css { background-color: #61627ad1; color: rgb(66, 218, 200); }
.js { background-color: #fcd00cde; color: #2e304a; }
.react { background-color: rgb(66, 218, 200); color: #2d2e42; }
.next { background-color: #4d5278ca; color: rgb(66, 218, 200); }
.node { background-color: #59ab90; color: white; }
.express { background-color: #a83f58; color: white; }
.sql { background-color: #4b8196ee; color: white; }

/* --------------------- */
/*       PROJECTS        */
/* --------------------- */
#projects {
    font-family: "new-order";
    background-color: #2d2e42;
    padding-top: 7rem;
    padding-bottom: 7rem;
    margin-bottom: 10rem;
}
#projects h1 {
    font-family: "new-order";
    color: whitesmoke;
    font-size: 3rem;
    margin-left: 10rem; /* ⚡ On utilise margin au lieu de padding */
    border-bottom: 5px solid #e9345e;
    width: 50px; /* Le trait fera 50px à partir du début du texte */
    margin-top: 0;
    margin-bottom: 0;
    padding-bottom: 2rem;
    padding-left: 0; /* On remet le padding à 0 */
}
#projects h2 {
padding-left: 10rem;
padding-right: 10rem;
}
/* ::::::::: */
.projects-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 8px;
    gap: 2rem;
    align-items: center;
    background-color: #34354c;
    /* background: radial-gradient(circle at 90% 90%, rgba(70, 182, 169, 0.134) 0%, transparent 45%); */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);  
    margin-bottom: 2rem;
    margin-left: 10rem;
    margin-right: 10rem;
}
.project-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}
.project-content h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}
.project-content p {
    color: white;
    margin-bottom: 0.7rem;
    line-height: 1.5;
}
/* Le conteneur du lien : il doit épouser la taille de l'image */
.project-img-container {
    position: relative;
    display: inline-block; /* Très important pour ne pas prendre toute la largeur */
    line-height: 0;        /* Supprime l'espace vide sous l'image */
    width: 100%;           /* S'adapte à ton div project-image */
}

/* L'image reste naturelle */
.project-img-container img {
    width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
}

/* L'overlay qui contient le texte */
.project-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Voile noir léger */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; /* Caché par défaut */
    transition: opacity 0.3s ease;
}

/* Le texte à l'intérieur de l'overlay */
.project-hover-overlay span {
    color: #e9345e; /* Ta couleur turquoise */
    font-family: 'new-order', sans-serif;
    font-weight: bold;
    font-size: 1.2rem;
    text-transform: uppercase;
}

/* Au survol : on affiche l'overlay et on baisse l'opacité de l'image */
.project-img-container:hover .project-hover-overlay {
    opacity: 2;
}

.project-img-container:hover img {
    opacity: 0.6;
}

/* --------------------- */
/*       BUTTONS         */
/* --------------------- */
/* --------------------- */
/* VERCEL BUTTON      */
/* --------------------- */
.vercel-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: #e9345e; /* Même couleur que tes boutons actuels */
    font-family: 'new-order';
    color: whitesmoke;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    padding: 7px 10px; /* Ajusté pour du texte sans icône image */
    margin-bottom: 15px;
}

.vercel-btn:hover {
    background-color: #37364a; /* Même couleur de hover que LinkedIn/GitHub */
}

.linkedin-btn,
.github-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    /* On utilise justify-content pour caler le texte à gauche et l'icône à droite */
    justify-content: space-between; 
    background-color: #e9345e;
    font-family: 'new-order';
    color: whitesmoke;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    /* On fixe un padding vertical (8px) et horizontal (15px) identique pour les deux */
    margin-bottom: 15px;
    /* Largeur fixe pour qu'ils aient la même taille visuelle */
    width: 170px; 
    padding-top: 5px;
    padding-bottom: 5px;
    padding-left: 15px;
    padding-right: 10px;
}
/* On unifie la taille des deux images à 40px */
.linkedin-btn img{
    height: 40px; 
    width: 40px;
    object-fit: contain;
    /* On supprime les marges et paddings individuels qui créaient le décalage */
    margin: 0;
    padding: 0;
}
.github-btn img {
    margin-left: 10px;
    height: 35px;
    width: 35px;
    object-fit: contain;
    /* On supprime les marges et paddings individuels qui créaient le décalage */
}

.linkedin-btn:hover,
.github-btn:hover {
    background-color: #37364a;
}

/* --------------------- */
/*       FOOTER          */
/* --------------------- */
footer {
    background-color: #2d2e42;
    padding-left: 10rem;
    padding-right: 10rem;
    padding-top: 25px;
    padding-bottom: 25px;
}

/* --------------------- */
/*       CONTACT         */
/* --------------------- */
#contact {
    font-family: "new-order";
}
#contact h2 {
    color: rgb(70, 182, 169);
    font-size: 1.5rem;
    margin: 0;
    padding-bottom: 25px;
}
#contact p {
    color: whitesmoke;
    font-size: 1rem;
    line-height: 5px;
    margin: 0;
    padding-bottom: 20px;
}
.contact a {
    color: rgb(70, 182, 169);
}
.footer-mail {
    color: whitesmoke;
    text-decoration: none;
}
a {
    color: whitesmoke;
    text-decoration: none;
}

/* --------------------- */
/* Desktop à Tablette     */
/* --------------------- */
@media (max-width: 1024px) {
    /* ⚡ INTERVENTION : Ajustement des marges pour le nouveau layout Hero et About */
    .title, footer, .hero-section, #about h2, #projects h2, .projects-box {
        padding-left: 5rem !important;
        padding-right: 5rem !important;
    }
    /* ⚡ INTERVENTION : Ajustement de l'encadré rouge d'alternance pour tablette */
    div[style*="border: 1px solid #e9345e"] {
        margin-left: 5rem !important;
        width: calc(100% - 10rem) !important;
    }
    /* ⚡ INTERVENTION : Grille de compétences en 2 colonnes pour tablette */
    .skills-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --------------------- */
/* Mobile (<= 600px)     */
/* --------------------- */
@media (max-width: 600px) {
    /* ⚡ BASE : Bloque tout dépassement latéral */
    html, body {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden;
    }
    /* ⚡ ALIGNEMENT HARMONISÉ : Marges identiques partout */
    .hero-section, #about, #skills, #projects, #contact, footer {
        padding-left: 1.5rem !important; 
        padding-right: 1.5rem !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }
    /* ⚡ HERO : Image LinkedIn au-dessus du texte */
    .hero-section {
        flex-direction: column-reverse; 
        padding-top: 4rem !important;
        text-align: center;
        gap: 20px;
    }
    .title { padding: 20px 0 !important; }
    .title h1 { font-size: 2.2rem; }
    .title h2 { font-size: 1.2rem; }
    .img-wrapper { max-width: 250px; margin: 0 auto; }
    /* ⚡ SECTION ABOUT : Suppression des décalages desktop */
    #about h2 { padding: 20px 0 !important; text-align: left; font-size: 2rem; }
    #about p {
        width: 100% !important; padding-left: 0 !important; padding-right: 0 !important;
        margin: 0 0 1.2rem 0 !important; text-align: left; line-height: 1.5; font-size: 1rem;
    }
    /* ⚡ ENCADRÉ ROUGE : Aligné sur les 1.5rem de la section */
    div[style*="border: 1px solid #e9345e"] { margin: 20px 0 !important; width: 100% !important; }
    div[style*="border: 1px solid #e9345e"] p { padding: 15px !important; font-size: 0.9rem !important; width: 100% !important; }
    /* ⚡ SKILLS : Grille verticale harmonisée */
    #skills h2 { font-size: 2rem; padding: 20px 0 !important; }
    .skills-wrapper { display: flex !important; flex-direction: column !important; gap: 25px !important; padding: 0 !important; }
    .Skill-category {
        width: 100% !important; min-height: auto !important; display: flex !important;
        flex-direction: column !important; align-items: center !important;
        padding: 15px !important; background-color: #34354cfc !important;
    }
    .Skills-card {
        width: 100% !important; height: auto !important; margin-bottom: 10px !important;
        padding: 10px 0 !important; background-color: #3d3e56 !important;
        display: flex !important; flex-direction: column !important; align-items: center !important;
    }
    .Skills-card svg, .icon-agile { width: 45px !important; height: 45px !important; margin-bottom: 5px !important; }
    /* ⚡ PROJECTS : Correction du décalage titre Portfolio */
    #projects h1 {
        padding-left: 0 !important; margin-left: 0 !important; text-align: left; font-size: 2.2rem;
        width: fit-content; border-bottom: 4px solid #e9345e; padding-bottom: 0.5rem; margin-bottom: 1.5rem !important;
    }
    #projects h2 { font-size: 2rem; padding: 20px 0 !important; }
    .projects-box { grid-template-columns: 1fr; gap: 1.5rem; padding: 1rem !important; margin: 0 0 2rem 0 !important; border-radius: 8px; }
    .project-content h3 { font-size: 1.3rem; }
    .project-content p { font-size: 0.9rem; }
    /* ⚡ CONTACT : Correction du chevauchement texte/email */
    #contact { display: flex !important; flex-direction: column !important; align-items: flex-start !important;}
    #contact p { margin-bottom: 0 !important; }
    #contact a[href^="mailto:"] { word-break: break-all; font-size: 1rem !important; }
    /* ⚡ FOOTER & BOUTONS : Largeur ajustée */
    .button-wrapper {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    .linkedin-btn, .github-btn {
        width: 50%; /* S'étend sur 100% de la colonne */
        max-width: 300px;
    }
   /* Ciblage de l'image GitHub pour l'aligner sur LinkedIn */
.github-btn img {
    width: 40px !important;      /* Taille identique à LinkedIn */
    height: 40px !important;
    border-radius: 50% !important; /* Crée le cercle blanc */
    padding: 4px !important;  
    margin-right: 2px;    /* Espace pour que l'icône ne touche pas les bords */
    object-fit: contain !important;
}
    .navbar { top: auto; bottom: 0; position: fixed; width: 100%; left: 0; height: 65px; padding: 0 1rem !important; justify-content: center; }
    .navbar .nav-items { width: 100%; justify-content: space-around; gap: 0; }
    .nav-logo { display: none !important; }
    .navbar a { font-size: 0.95rem; white-space: nowrap; }
    footer { padding-bottom: 95px !important; }
}