* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
}

html {
    scroll-behavior: smooth;
    height: 100%;
    width: 100%;
    overflow-x: hidden;

}

h1,
h2,
h3 {
    font-family: 'Sora', sans-serif;
}

body {
    background-color: #0a0e1a;
    font-family: 'inter', sans-serif;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    position: relative;
    padding-top: 70px;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: rgba(11, 15, 26, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 99999;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(20, 27, 48, 0.95);
    backdrop-filter: blur(8px);
    z-index: 100;

}

.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 0;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 50px;
}

.menu-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10003;
}

.menu-hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #c4ccd9;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-hamburger.active span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}

.menu-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.menu-hamburger.active span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

ul {
    display: flex;
    justify-content: center;
    gap: 50px;
}

li a {
    color: #c4ccd9;
    text-decoration: none;
    font-family: 'inter', sans-serif;
    font-size: 25px;
    font-weight: bold;
}

li a:hover {
    color: #4dd9ff;
}

.fond-img {
    position: relative;
    width: 100%;
    min-height: 100vh;
    /* On pousse le CONTENU de la section (le texte) vers le bas pour ne pas qu'il soit sous le menu */
    padding-top: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.fond-img svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.3s ease;
    pointer-events: none;
}

/* centrage du titre*/
.fond-img h1 {
    position: relative;
    color: #e8f4ff;
    text-align: center;
    font-size: 3.5rem;
    line-height: 1.3;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    /* 1. Applique le dégradé linéaire de haut en bas */
    background-image: linear-gradient(to bottom, #7d5df1, #a3d2ff);
    /* 2. Coupe le fond pour qu'il épouse uniquement le texte (les préfixes webkit assurent la compatibilité) */
    -webkit-background-clip: text;
    background-clip: text;
    /* 3. Rend la couleur de base du texte transparente pour laisser apparaître le dégradé en fond */
    -webkit-text-fill-color: transparent;
    z-index: 10;
}

.fragment-moyen {
    transition: transform 0.3s ease;
    transform-box: fill-box;
    transform-origin: center;
    pointer-events: auto;
    /* Force la souris à détectet les fragments*/
}

.fragment-moyen:hover {
    transform: scale(1.05);
}

.propos {
    text-align: center;
    margin-top: 20px;
    background-color: #6f4ee9bb;
    color: #e8f4ff;
    font-size: 40px;
    justify-content: center;
    border: 2px solid #0D22A4;
    border-radius: 5px;
}

.alternance,
.durée,
.rythme {
    color: #4dd9ff;
    font-weight: bold;
}

.block {
    display: flex;
    gap: 10px;
    justify-content: center;
    max-width: 1200px;
    width: 100%;
    margin: 20px auto 0 auto;
    /* Centre la boîte sur la page */
    max-height: 75%;
    height: 50%;
    background-color: #11182c;
    border: 2px solid #0D22A4;
    border-radius: 12px;
    padding: 40px 20px;
    /* Remplacement des % de hauteur par du padding interne (garde ton design intact sans bug) */
}

.image {
    display: block;
    width: 400px;
    height: auto;
    /* Empêche l'image de s'écraser si le ratio change */
    border-radius: 10px;
    border: 2px solid #0D22A4;
}

.paragraphe-droite {
    display: flex;
    flex-direction: column;
    justify-content: center;

}

.paragraphe {
    color: #e8f4ff;
    font-size: 30px;
    line-height: 1.4;
    justify-content: center;
}


.Timeline {
    position: relative;
    max-width: 1000px;
    margin: 40px auto;
    padding: 40px 0;
    overflow: hidden;
    /* clearfix pour les floats */
}

.Timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: #0D22A4;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.container-gauche,
.container-droite {
    position: relative;
    width: 50%;
    padding: 15px 40px;
    margin-bottom: 25px;
}

.container-gauche {
    float: left;
    clear: right;
}

.container-droite {
    float: right;
    clear: left;
}

.container-gauche::after,
.container-droite::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background-color: #0a0e1a;
    border: 3px solid #4dd9ff;
    border-radius: 50%;
    top: 20px;
    z-index: 2;
}

.container-gauche::after {
    right: -9px;
}

.container-droite::after {
    left: -9px;
}

.content {
    background-color: #141b30;
    border: 2px solid #0D22A4;
    border-radius: 10px;
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}

.content:hover {
    border-color: #4dd9ff;
    box-shadow: 0 0 20px rgba(77, 217, 255, 0.25);
}

.content h2 {
    color: #e8f4ff;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
    min-width: 200px;
}

.date {
    font-size: 14px;
    font-weight: 700;
    color: #a3d2ff;
    white-space: nowrap;
    padding: 4px 8px;
    background-color: rgba(168, 85, 247, 0.1);
    border-radius: 6px;
    align-self: flex-start;
}

.titre-diplome {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mention {
    font-size: 13px;
    font-weight: 600;
    color: #a855f7;
    font-style: italic;
    margin: 0;
}



.lieu {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: #6b7280;
}



.presentation {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #383d61;
    width: 100%;
    max-width: 1000px;
    /* On le limite à la même largeur que ton bloc À propos pour garder une harmonie */
    /* REMPLACEMENT : On retire height: 156px et on met du padding pour laisser respirer */
    padding: 40px 20px;
    margin: 40px auto;
    border-radius: 10px;
    box-sizing: border-box;
    border: 2px solid rgba(232, 244, 255, 0.1);
}

.MMI {
    text-align: center;
    font-size: 22px;
    line-height: 1.6;
    /*permet de créer un léger saut de ligne entre les lignes*/
    color: #e8f4ff;
    font-family: 'Inter', sans-serif;
    max-width: 800px;
    /* Évite que le texte s'étale trop sur les écrans ultra-larges */
}

.outils {
    color: #e8f4ff;
    font-size: 28px;
    margin: 40px 0 20px 0;
    font-family: 'Sora', sans-serif;
}

.grille-outils {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    margin-bottom: 20px;
}

/* Style de chaque petite carte (reprend l'esprit de ton grand cadre .block) */
.carte-outil {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #0a0e1a;
    border: 2px solid #0D22A4;
    border-radius: 10px;
    padding: 15px 25px;
    transition: all 0.3s ease;
}

.carte-outil img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    /*adapté à son conteneur*/
}

/* Texte à l'intérieur des cartes */
.carte-outil span {
    color: #e8f4ff;
    font-family: 'inter', sans-serif;
    font-weight: bold;
    font-size: 18px;
}

/* Effet au survol : légère montée + illumination de la bordure */
.carte-outil:hover {
    transform: translateY(-5px);
    border-color: #7d5df1;
    /* Couleur cyan de tes hovers de liens */
    box-shadow: 0 4px 20px rgba(77, 217, 255, 0.15);

}

.projets {
    color: #c4ccd9;
    text-align: center;
    font-size: 22px;
    margin: 20px 0;
}

.projets-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.carte-projet {
    background-color: #141b30;
    border: 2px solid #0D22A4;
    border-radius: 12px;
    width: 400px;
    /* Aligne la taille sur ton image à 400px pour une harmonie parfaite */
    overflow: hidden;
    /* Requis pour que les arrondis masquent les débordements de l'image */
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease;

}



.carte-projet:hover {
    transform: translateY(-5px);
    border-color: #4dd9ff;
}

.projets-image img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    /* Recadre proprement ton image pour éviter de l'écraser */
    border-bottom: 2px solid #0D22A4;
}

/* Redimensionnement spécifique pour l'image du projet Motus */
.projets-image .img-motus {
    object-fit: contain;
    /* Empêche de zoomer/rogner agressivement si l'image est grande */
    background-color: #0a0e1a;
    /* Ajoute un fond bleu nuit pour remplir l'espace si l'image a des bandes */
    padding: 10px;
    /* Alèse un peu l'image pour qu'elle ne colle pas aux bordures bleues */
}



/* Zone textuelle à l'intérieur de ta carte */

.projet-content {
    display: flex;
    flex-direction: column;
    padding: 25px;
    flex-grow: 1;
}

.projet-titre {
    color: #e8f4ff;
    font-size: 22px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.projet-text-court {
    color: #c4ccd9;
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 20px;
    flex-grow: 1;
}

.projet-outils-liste {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.badge-outil {
    background-color: rgba(13, 34, 164, 0.3);
    border: 2px solid #0D22A4;
    color: #4dd9ff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.btn-savoir-plus {
    background-color: #0D22A4;
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    font-family: 'Sora', sans-serif;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-savoir-plus:hover {
    background-color: #1c39bb;
}


/* ==================== SYSTÈME FENÊTRE DÉTAIL (MODALE APPARANTE) ==================== */

#modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    /*utile pour safari d'après Gemini*/
    z-index: 100000;
    /* CORRECTIF 1 : z-index supérieur au header fixe pour afficher le titre et la croix */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    /* CORRECTIF 2 : Permet de scroller le texte DANS la modale sur les petits écrans */
    padding: 20px;
}

.modal-hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-cadre {
    background-color: #141b30;
    border: 2px solid #4dd9ff;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    padding: 40px;
    position: relative;
    box-shadow: 0 10px 30px rgba(77, 217, 255, 0.2);
    margin: auto;
    /* Aligne proprement au centre si le contenu dépasse */
}

#modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #c4ccd9;
    font-size: 32px;
    cursor: pointer;
    z-index: 100001;
    /* Reste cliquable au-dessus du contenu injecté */
}

#modal-close:hover {
    color: #4dd9ff;
}


/* Style des éléments clonés du template dans la modale */
.modal-titre {
    color: #e8f4ff;
    margin-bottom: 15px;
    font-size: 28px;
    line-height: 1.4;
    padding-right: 25px;
    /* Évite de chevaucher la croix de fermeture */
}

.modal-text-long {
    color: #c4ccd9;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-technos {
    color: #4dd9ff;
    margin-bottom: 25px;
    font-size: 15px;
}

.btn-voir-projet {
    display: inline-block;
    background-color: #6f4ee9bb;
    color: #ffffff;
    padding: 12px 25px;
    border-radius: 6px;
    font-family: 'Sora', sans-serif;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.btn-voir-projet:hover {
    background-color: #5633ccbb;
}



.rectangle {
    display: flex;
    width: 711px;
    max-width: 90%;
    height: auto;
    min-height: 477px;
    background-color: #141b30;
    border: 2px solid #0D22A4;
    border-radius: 12px;
    margin: 50px auto;
    padding: 30px;
    box-sizing: border-box;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.formulaire,
.contact-form {
    width: 100%;
}

.renseignement {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 10px;
    flex-wrap: wrap;
}

/* Regroupe nom + prénom : même style, plus de répétition */
.nom,
.prenom,
.email,
.message {
    background-color: #0a0e1a;
    border: 2px solid #0D22A4;
    border-radius: 6px;
    color: #e8f4ff;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    padding: 10px 14px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.nom::placeholder,
.prenom::placeholder,
.email::placeholder,
.message::placeholder {
    color: #7a8499;
}

.nom,
.prenom {
    width: 207px;
    max-width: 100%;
    height: 55px;
}

.nom:focus,
.prenom:focus,
.email:focus,
.message:focus {
    border-color: #4dd9ff;
    box-shadow: 0 0 12px rgba(77, 217, 255, 0.35);
    outline: none;
}

.mail {
    width: 100%;
    margin-top: 20px;
}

.email {
    width: 100%;
    height: 55px;
}

.écrire {
    margin-top: 20px;
}

.message {
    width: 100%;
    height: 137px;
    resize: vertical;
}

.bouton {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.Envoyer {
    background-color: #0D22A4;
    width: 130px;
    height: 45px;
    color: #ffffff;
    font-family: 'Sora', sans-serif;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.Envoyer:hover {
    background-color: #4dd9ff;
    color: #0a0e1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(77, 217, 255, 0.3);
}

.information {
    background-color: #6f4ee9bb;
    width: 98.9%;
    padding: 10px;
    margin-top: 20px;
}

.contact ul {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 60px;
}

.git {
    width: 60px;
    height: 60px;
}

footer {
    width: 100%;
    background-color: #141b30;
    color: white;
    border-top: 2px solid #0D22A4;
    padding: 25px 20px;
    margin-top: 60px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    text-align: center;
}

.mentions {
    color: #7a8499;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

.legales {
    color: #4dd9ff;
    text-decoration: underline;
    transition: color 0.3s ease;
    /* Correction avec '0.3s ease' */
}

.legales:hover {
    color: #e8f4ff;
}


/* ==================== 🛠️ AJUSTEMENT GLOBAL POUR LA ZONE CRITIQUE DES 1080PX / TABLETTES ==================== */
@media screen and (max-width: 1100px) {

    /* Diminution générale de la taille des gros paragraphes pour éviter les débordements */
    .paragraphe {
        font-size: 22px;
    }

    .fond-img h1 {
        font-size: 2.8rem;
    }

    .propos {
        font-size: 32px;
    }

    /* Le bloc à propos s'adapte en hauteur et réduit ses paddings */
    .block {
        height: auto;
        max-height: none;
        padding: 30px 20px;
        gap: 20px;
    }

    .image {
        width: 320px;
        /* Réduction légère de l'image de profil pour donner de l'air au texte */
    }

    /* Déclenchement de la timeline en une seule colonne pour éviter les textes compressés */
    .Timeline::after {
        left: 30px;
    }

    .container-gauche,
    .container-droite {
        width: 100%;
        padding-left: 65px;
        padding-right: 20px;
        float: none;
        clear: both;
    }

    .container-gauche::after,
    .container-droite::after {
        left: 21px;
        right: auto;
    }

    /* Adaptation de la taille des cartes de projets */
    .carte-projet {
        width: 340px;
    }

    .projets-image img {
        height: 190px;
    }
}

/* ==================== DESIGN RESPONSIVE TABLETTES PORTRAIT (MAX 920PX) ==================== */
@media screen and (max-width: 920px) {


    .navbar {
        justify-content: flex-end;
        align-items: center;
    }

    .menu-hamburger {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        margin: 0;
        padding: 0;
    }

    .menu-hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: #c4ccd9;
        margin: 3px 0;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 70%;
        max-width: 320px;
        height: 100vh;
        background-color: rgba(20, 27, 48, 0.98);
        backdrop-filter: blur(8px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0;
        transform: translateX(100%);
        /* CORRECTIF : On s'assure que le menu caché ne pousse pas les murs de l'écran */
        transition: margin-right 0.5s ease;
        z-index: 1000;
    }

    /* Quand le menu est ouvert, on le remet à sa position d'origine */
    .nav-links.mobile-menu {
        transform: translateX(0);
    }

    .nav-links li {
        margin: 20px 0;
    }

    .nav-links li a {
        font-size: 22px;
    }
}

/* Sécurité pour le body quand le menu est ouvert */
body.menu-open,
body.modal-open {
    overflow: hidden;
}



@media screen and (max-width: 480px) {
    .fond-img h1 {
        font-size: 2.2rem;
        padding: 0 10px;
    }

    .propos {
        font-size: 28px;
        padding: 10px;
        margin-top: 10px;
    }

    .block {
        flex-direction: column;
        height: auto;
        max-height: none;
        padding: 25px 15px;
        gap: 25px;
    }

    .image {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .paragraphe {
        font-size: 18px;
        text-align: center;
    }

    /* Ajustements de la Timeline en une seule colonne sur mobile */
    .Timeline::after {
        left: 20px;
    }

    .container-gauche,
    .container-droite {
        width: 100%;
        padding-left: 45px;
        float: none;
        clear: both;
    }

    .container-gauche::after,
    .container-droite::after {
        left: 11px;
        right: auto;
    }

    .content {
        padding: 15px;
    }

    .content .date {
        align-self: flex-start;
        text-align: left;
    }


    .presentation {
        padding: 25px 15px;
        margin: 25px auto;
    }

    .MMI {
        font-size: 16px;
    }

    .outils {
        font-size: 22px;
        text-align: center;
    }

    .grille-outils {
        justify-content: center;
        gap: 12px;
    }

    .carte-outil {
        width: 100%;
        max-width: 280px;
        padding: 12px 20px;
    }

    .projets {
        font-size: 16px;
    }

    .projets-container {
        padding: 0 20px;
        gap: 20px;
    }

    .carte-projet {
        width: 100%;
        max-width: 320px;
    }

    .projets-image img {
        height: 180px;
    }

    .projet-content {
        padding: 15px;
    }

    .projet-titre {
        font-size: 18px;
    }

    /* Ajustement de la Fenêtre Modale sur mobile */
    .modal-cadre {
        padding: 30px 15px;
    }

    .modal-titre {
        font-size: 20px;
    }

    .modal-text-long {
        font-size: 14px;
    }

    /* Formulaire de Contact */
    .rectangle {
        padding: 20px 15px;
        min-height: auto;
    }

    .renseignement {
        flex-direction: column;
        margin-top: 15px;
        gap: 15px;
    }

    .nom,
    .prenom {
        width: 100%;
    }

    .contact ul {
        gap: 30px;
    }

    .git {
        width: 45px;
        height: 45px;
    }
}

/* ==================== SYSTEME D'ANIMATION AU DEFILEMENT (SAMSUNG STYLE) ==================== */

.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.215, 0.610, 0.355, 1), transform 0.8s cubic-bezier(0.215, 0.610, 0.355, 1);
}

/* Classe active déclenchée par l'IntersectionObserver */
.scroll-reveal.reveal-active {
    opacity: 1;
    transform: translateY(0);
}