/* ---------------------------------------------------- */
/* --- FICHIER CSS COMPLET ET FINALISÉ (V32 - AJOUT APPARITION DÉCALÉE MENU) --- */
/* ---------------------------------------------------- */

/* ---------------------------------------------------- */
/* --- VARIABLES GLOBALES ET PARAMÈTRES D'AJUSTEMENT --- */
/* ---------------------------------------------------- */
:root {
    --color-blue: #1d2b4e;
    --color-red: #e73642;
    --color-gris: #e0e0e0;
    --border-color: black;
    --skew-angle: 0.8deg; 
    --seam-offset: 1.8px; 
    --animation-duration: 40s;
    --band-spacing: 20px; 
}

/* ---------------------------------------------------- */
/* --- STYLES DE BASE --- */
/* ---------------------------------------------------- */
body {
    margin: 0;
    padding: 0;
    background-color: #FFF9F0;
    font-family: 'Inter', sans-serif;
}

p {
    font-family: 'Altivo';
    font-size: 1.2vw;
    text-align: justify;
}

h2, h3 { 
    margin: 0; 
}
h3 { 
    font-family: "altivo"; 
    font-weight: 400; 
    text-transform: uppercase; 
}

/* ---------------------------------------------------- */
/* --- SECTION 1 : PAGE D'ACCUEIL --- */
/* ---------------------------------------------------- */
.sec1 {
    min-height: 130vh;
    position: relative;
    overflow: hidden;
    width: 100%;
    align-items: center;
    margin-bottom: 0;
}

.desc {
    font-family: "altivo";
    color: #B3DEEF;
    margin: 0%;
    font-size: 1.2vw;
}

.sec1::before {
    background: linear-gradient(30deg, rgba(54, 52, 52, 0.4), rgba(0, 0, 0, 0.3)), url('accueil.png');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    content: '';
    height: 100%;
    left: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: -2;
}

.blur-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    backdrop-filter: blur(0px);
    transition: backdrop-filter 0.3s ease;
}

/* --- Texte Principal (un) --- */
.un {
    position: fixed;
    color: white;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: -1;
}

h1 {
    margin: 0;
    padding: 0;
    font-family: "altivo";
    font-weight: bold;
    letter-spacing: 2px;
    font-size: 13vw;
    margin-bottom: -20px;
    opacity: 0;
    display: block;
    animation: apparition 1s 0.3s ease-in-out forwards;
}

.nom {
    font-size: 3vw;
    color: var(--color-blue);
    margin: 0;
    margin-bottom: 0px;
    opacity: 0;
    animation: apparition 1s 0.3s ease-in-out forwards;
    font-family: "eight", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.autre {
    font-size: 1.5vw;
}

.accueil {
    position: fixed;
    opacity: 1;
}

a img {
    width: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    cursor: pointer;
    z-index: 10;
    top: 2%;
    left: auto;
    transition: transform 0.5s;
}

a:hover img {
    transform: scale(1.3);
}

a {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    text-decoration: none;
}

@keyframes apparition {
    100% {
        opacity: 1;
        transform: none;
    }
}

/* --- Flèche de défilement --- */
.arrow,
.arrow2 {
    width: 10px;
    height: 40px;
    border-radius: 5px;
    background-color: black;
    margin: 6px;
    animation: move 2s infinite ease;
}

.arrow {
    transform: rotate(-45deg);
}

.arrow2 {
    transform: rotate(45deg);
}

@keyframes move {
    0% {
        margin-top: 0;
    }

    50% {
        margin-top: 100px;
    }

    100% {
        margin-top: 0;
    }
}

.arrow-down {
    position: fixed;
    top: 80%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ---------------------------------------------------- */
/* --- NAVIGATION / MENU HAMBURGER --- */
/* ---------------------------------------------------- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 249, 240, 0.7);
    backdrop-filter: blur(10px); 
    transform: translateX(-110%);
    transition: transform 0.3s ease;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

nav.active {
    transform: translateX(0);
}

.nav-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 30px;
    cursor: pointer;
    z-index: 20;
    background: transparent;
    border: none;
}

/* Style des liens texte du menu */
.nav {
    font-size: 22px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
    margin: 20px 0;
}

.nav::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    background-color:  #1d2b4e;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav:hover {
    color: #1d2b4e;
}

.nav:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Lignes du bouton toggle */
.line {
    position: absolute;
    width: 100%;
    height: 4px;
    /* --- MODIFIÉ : COULEUR BLANCHE POUR LE BURGER --- */
    background-color: white; 
    /* ------------------------------------------------ */
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.l1 {
    top: 0;
}

.l2 {
    top: 13px;
}

.l3 {
    top: 26px;
}

.nav-toggle.active .l1 {
    transform: translateY(13px) rotate(45deg);
}

.nav-toggle.active .l2 {
    opacity: 0;
}

.nav-toggle.active .l3 {
    transform: translateY(-13px) rotate(-45deg);
}

nav.nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 249, 240, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(-110%);
    transition: transform 0.3s ease;
    z-index: 10;
}

nav.nav-menu.active {
    transform: translateX(0);
}

/* Styles pour les liens du menu (dans le nav principal) */
nav a {
    position: relative;
    font-family: "altivo";
    color: black;
    font-size: 20px;
    display: block;
    margin: 10px 0;
    text-decoration: none;
    transition: 0.3s ease-in-out;
}

.ici {
    font-weight: bold;
    letter-spacing: 3px;
}


/* ---------------------------------------------------- */
/* --- AJOUT : Animation d'Apparition des Conteneurs (Photos/Chiffres) --- */
/* ---------------------------------------------------- */

@keyframes menuSlideUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Déclenchement et Décalage Séquentiel à l'activation du menu */
nav.nav-menu.active .main .container {
    animation: menuSlideUp 0.5s ease-out forwards;
}

/* Délai pour le 1er bloc */
nav.nav-menu.active .main .container:nth-child(1) {
    animation-delay: 0.1s; 
}

/* Délai pour le 3ème bloc */
nav.nav-menu.active .main .container:nth-child(2) {
    animation-delay: 0.2s;
}

/* --- FIN AJOUT APPARITION CONTENEURS --- */


/* ---------------------------------------------------- */
/* --- SECTION 2 : CONTENU (BANDES ET PROJETS) --- */
/* ---------------------------------------------------- */
.sec2 {
    position: relative;
    background-color: var(--color-blue); 
    width: 100%;
    z-index: 2;
    margin-top: 0;
    padding-top: 60px; 
    padding-bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Styles Vagues SVG --- */
section svg {
    position: absolute;
    bottom: -20px;
    width: 100%;
    animation: wave 5s infinite ease-in-out alternate;
}

.vague {
    top: 100%;
    width: 100%;
    height: auto;
    position: absolute;
    opacity: 0;
    animation: apparition 1.3s 0.2s ease-out forwards;
}

.wave1 {
    z-index: 9;
    animation-delay: 0s;
}

.wave2 {
    z-index: 7;
    animation-delay: 4s;
}

.wave3 {
    z-index: 8;
    animation-delay: 2s;
}

@keyframes wave {
    0% {
        transform: translateY(0px);
    }

    100% {
        transform: translateY(15px);
    }
}


/* --- Styles Conteneurs (Photos - Menu Burger) --- */
.main {
    position: relative;
    overflow: hidden;
    display: flex;
    width: 60%; /* Réduit de 75% à 60% pour resserrer l'ensemble */
    height: 65%; /* Hauteur généreuse pour l'aspect vertical */
    justify-content: center; 
    align-items: center;
    gap: 30px; 
    margin: 0 auto;
}

.container {
    position: relative;
    height: 100%; 
    /* On définit une largeur max pour forcer la forme rectangulaire verticale */
    width: 400px; 
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    
    /* REDIMENSIONNEMENT DES IMAGES */
    background-size: cover;      /* Remplissage propre */
    background-position: center; 
    background-repeat: no-repeat;
    
    color: white;
    font-size: 20px;
    border-radius: 30px; /* Bords beaucoup plus arrondis pour le style rectangle vertical */
    
    opacity: 0; 
    transform: translateY(20px);
    transition: filter 0.5s ease-in-out, transform 0.3s ease; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); /* Petit effet d'ombre pour le relief */
}
.container span {
    z-index: 2;
    position: relative;
}

.container::after {
    content: "";
    position: absolute;
    inset: 0;
}

/* Attribution des images */
.container:nth-child(1) {
    background-image: url('photos/moi.jpg');
}

.container:nth-child(2) {
    background-image: url('photos/photographie.jpg');
}


.main:hover .container {
    filter: brightness(0.5);
}

.main:hover .container:hover {
    filter: brightness(1);
}

/* Suppression de la transition ici car elle est déplacée dans le sélecteur .container général */
/* .main .container {
    transition: filter 0.5s ease-in-out;
} */

/* Chiffres sur les conteneurs */
.numbers {
    display: flex;
    flex-direction: row;
    position: relative;
    font-family: "altivo", sans-serif;
    font-size: 3em;
    font-weight: 400;
    font-style: normal;
}

.digit {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    height: 80px;
}

.digit span {
    display: block;
    height: 80px;
    line-height: 80px;
    text-align: center;
}

@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-100%);
    }
}

@keyframes scrollDown {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(0);
    }
}

.container:hover .digit:nth-child(1) span {
    animation: scrollUp 0.3s ease-in-out forwards;
    animation-delay: 0s;
}

.container:hover .digit:nth-child(2) span {
    animation: scrollUp 0.3s ease-in-out forwards;
    animation-delay: 0.1s;
}

.container .digit:nth-child(1) span {
    animation: scrollDown 0.3s ease-in-out forwards;
    animation-delay: 0s;
}

.container .digit:nth-child(2) span {
    animation: scrollDown 0.3s ease-in-out forwards;
    animation-delay: 0.1s;
}

/* --- Bloc À Propos (div1) --- */

.div1,
.div3,
.div5 {
    padding: 10px;
    background-color: #FFF9F0;
    border-radius: 20px;
}

.div1 {
    display: flex;
    flex-direction: row; 
    align-items: flex-start; 
    justify-content: center;
    max-width: 1200px; 
    margin: 0 auto; 
    height: auto; 
    overflow: hidden;
    gap: 1.5rem; 
    padding: 20px;
    text-align: left; 
}

/* --- AJUSTEMENT : Image plus à droite et plus en bas --- */
.item1 {
    width: 35%; /* Conteneur de l'image */
    flex-shrink: 0;
}

.item1 img {
    width: 100%;
    height: auto; 
    object-fit: contain; 
    border-radius: 10px;
    margin-top: 50px; 
}

.item2 {
    display: flex;
    flex-direction: column;
    justify-content: center; 
    width: 65%; 
    text-align: left;
    margin-top: 45px; 
}

.item2 p {
    font-size: 1.2vw; 
}

.item2 h3 {
    text-transform: none;
    font-weight: bold;
    margin: 0;
}

.item2-1, .item3-2 {
    margin: 20px 20px 20px 0;
}

.item3 {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-around;
}

/* ---------------------------------------------------- */
/* --- BLOC DE COMPÉTENCES (DIV3 & CARTES 3D) --- */
/* ---------------------------------------------------- */

/* NOUVEAU: Animation de défilement automatique */
@keyframes autoScroll {
    0% { transform: translateX(0); }
    /* Défile jusqu'à cacher le début (width) moins la zone visible (max-width du div3) */
    50% { transform: translateX(calc(-100% + 1200px)); } 
    100% { transform: translateX(0); }
}

.div3 {
    width: 90%;
    max-width: 1200px;
    /* NOUVEAU: Marge réduite en hauteur */
    margin: 20px auto; 
    /* NOUVEAU: Padding réduit */
    padding: 10px; 
    background-color: #FFF9F0;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;

    /* Cache la barre de défilement et gère le débordement */
    overflow-x: hidden; 
    overflow-y: hidden;
    padding-bottom: 15px; /* Espace réduit pour le scroll caché */
}

.content1 {
    display: flex;
    flex-wrap: wrap; 
    /* NOUVEAU: Hauteur réduite pour un affichage plus compact */
    height: 250px; 
    align-content: flex-start;
    /* Largeur maximale pour forcer le débordement et l'animation */
    width: max-content; 
    /* NOUVEAU: Marge réduite */
    margin: 20px 0; 
    perspective: 1000px; 
    text-align: center;
    
    /* Application de l'animation de défilement (maintenue active) */
    animation: autoScroll 40s linear infinite alternate;
}


/* 1. Keyframes d'apparition décalée */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px) rotateY(0deg); 
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateY(0deg);
    }
}

/* 2. Style du conteneur de carte 3D (Parent des faces) */
.skill-card-3d {
    position: relative;
    height: 180px;
    width: 180px; /* Largeur Fixe pour Flexbox */
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.6s;
    transform-style: preserve-3d; 
    cursor: pointer;
    /* CORRECTION: Ajout de translateZ(0) pour forcer l'accélération matérielle */
    transform: translateZ(0); 

    margin: 10px 12.5px; /* Marges entre les cartes */
    flex-shrink: 0; /* Empêche de rétrécir */

    opacity: 0; 
    animation: slideIn 0.5s ease-out forwards;
}

/* 3. Décalage (Stagger) de l'animation d'apparition */
.content1 .skill-card-3d:nth-child(1) { animation-delay: 0.1s; }
.content1 .skill-card-3d:nth-child(2) { animation-delay: 0.2s; }
.content1 .skill-card-3d:nth-child(3) { animation-delay: 0.3s; }
.content1 .skill-card-3d:nth-child(4) { animation-delay: 0.4s; }
.content1 .skill-card-3d:nth-child(5) { animation-delay: 0.5s; }
.content1 .skill-card-3d:nth-child(6) { animation-delay: 0.6s; }
.content1 .skill-card-3d:nth-child(7) { animation-delay: 0.7s; }
.content1 .skill-card-3d:nth-child(8) { animation-delay: 0.8s; }
.content1 .skill-card-3d:nth-child(9) { animation-delay: 0.9s; }
.content1 .skill-card-3d:nth-child(10) { animation-delay: 1.0s; }
.content1 .skill-card-3d:nth-child(11) { animation-delay: 1.1s; }
.content1 .skill-card-3d:nth-child(12) { animation-delay: 1.2s; }


/* 4. Rotation au clic via JavaScript (remplace :hover) */
.skill-card-3d.is-flipped {
    /* CORRECTION: Maintient la transformation 3D forcée */
    transform: rotateY(180deg) translateZ(0); 
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* 5. Styles des faces */
.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    padding: 10px;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

/* Face Avant */
.card-front {
    background-color: inherit; 
    color: var(--color-blue);
}
.card-front h4 {
    margin-bottom: 5px;
    font-size: 1.4rem;
}
.card-front .box {
    width: 70px;
    height: 70px;
    margin: 0 auto 10px auto;
}
.card-front .logo {
    max-width: 60px;
    max-height: 60px;
}

/* Face Arrière */
.card-back {
    background-color: var(--color-blue);
    color: #FFF9F0;
    transform: rotateY(180deg); 
    padding: 20px;
}
.card-back h4 {
    margin-bottom: 10px;
    font-weight: 700;
}
.card-back p.desc {
    font-size: 1rem;
    text-align: center;
    margin: 0;
}

/* 6. Couleurs de fond des cartes (Harmonisées aux couleurs thématiques) */
.flex-logo-pr { background-color: #5570ad; } /* Bleu foncé - Nuance 1 */
.flex-logo-ae { background-color: #cacaca; } /* Gris clair - Nuance 1 */
.flex-logo-dav { background-color: #3b5082; } /* Bleu foncé - Nuance 2 */
.flex-logo-lr { background-color: #d8d8d8; } /* Gris très clair - Nuance 1 */
.flex-logo-ai { background-color: #6a85c2; } /* Bleu clair - Nuance 1 */
.flex-logo-id { background-color: #e6e6e6; } /* Gris très très clair - Nuance 1 */
.flex-logo-ps { background-color: #496397; } /* Bleu foncé - Nuance 3 */
.flex-logo-fig { background-color: #bebebe; } /* Gris clair - Nuance 2 */
.flex-logo-html { background-color: #5570ad; } /* Répétition Nuance 1 */
.flex-logo-css { background-color: #cacaca; } /* Répétition Nuance 1 */
.flex-logo-js { background-color: #3b5082; } /* Répétition Nuance 2 */
.flex-logo-appareil { background-color: #6a85c2; } /* Répétition Nuance 1 */

/* 7. Customisation de la barre de défilement (Cachée) */
/* Customisation de la barre de défilement (Cachée) */
.div3::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
.div3 {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
/* ---------------------------------------------------- */
/* --- Styles pour les titres (About et Skills) --- */
/* ---------------------------------------------------- */
.about {
    display: flex;
    margin-left: 0; 
    font-size: 5vw; 
    font-family: "eight", sans-serif;
    font-weight: bold; 
    font-style: normal;
}

.skills {
    display: flex;
    margin-right: 0%;
    font-size: 4vw;
    font-family: "eight", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.titre {
    width: 100%;
    display: flex;
    justify-content: center; 
    align-items: center;
    text-align: center;
    color: var(--color-red);
    margin-bottom: 40px;
}

.parent {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    grid-column-gap: 20px;
    grid-row-gap: 20px;
    position: relative;
}

.parent2 {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column-gap: 20px;
    grid-row-gap: 20px;
    width: 100%;
    position: relative;
}

/* ---------------------------------------------------- */
/* --- FOOTER / CONTACT (main2 et div5) --- */
/* ---------------------------------------------------- */

.main2 {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    width: 60%;
    justify-content: space-between;
    align-items: center;
    margin-top: 50px;
}

.main2 .container1 {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin: 20px;
    padding: 10px 0;
    border-radius: 10px;
    background-image: none;
    background-color: transparent;
    color: black;
    font-size: 1.2vw;
    transition: background-color 0.3s, color 0.3s;
}

.main2 .container1:hover {
    background-color: #B3DEEF;
    color: white;
}

.main2 .container2 {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1/1;
    margin: 10px;
    border-radius: 100%;
    background-image: none;
    background-color: transparent;
    transition: background-color 0.3s, color 0.3s;
}

.main2 .container2:hover {
    background-color: #B3DEEF;
    color: white;
}

.main2 .container2 i, .main2 .container1 i {
    margin: 0 10px;
    font-size: 25px;
}

.div5 {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    border-radius: 0;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.footer {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}

.logo-about .container2 {
    transition: 0.5s;
}

.logo-about .container2:hover {
    background-color: #F4B2CB;
    color: white;
}

.logo-about .container2 i {
    margin: 0 10px;
    font-size: 25px;
}

.item3 .menu a {
    margin: 10px 0;
    color: black;
    font-size: 2vw;
    background-color: #B3DEEF;
    border-radius: 5px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.5s;
    font-family: "Altivo";
    font-weight: 500;
}

.item3 .menu a:hover {
    color: white;
    background-color: var(--color-blue);
}

.logo-footer .container2:hover {
    background-color: #B695B3;
    color: white;
}

.div5 p {
    color: black;
    text-align: center;
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 1.1em;
}

/* ---------------------------------------------------- */
/* --- Styles des Bandeaux Animés (Strips) --- */
/* ---------------------------------------------------- */

@keyframes slide-left {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

@keyframes slide-right {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.strips-container {
    width: 100%;
    margin-top: 40px; 
    margin-bottom: 40px;
}

.strips__strip {
    width: 100%;
    height: 100px; 
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    opacity: 0.9; 
    background-color: var(--color-gris); 
    border: 1px solid var(--border-color); 
    margin-bottom: var(--band-spacing); 
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.strips__strip:last-of-type {
    margin-bottom: 0;
}

.strip-content {
    white-space: nowrap;
    display: flex;
}

.strip-content p {
    font-family: 'Inter', sans-serif; 
    font-size: 5vw; 
    line-height: 100px;
    margin: 0;
    padding: 0 50px; 
    letter-spacing: 5px;
    font-weight: 700; 
    text-transform: uppercase;
}

/* Application Déformation et Animation */
.strips__strip-one,
.strips__strip-three {
    transform: skewY(calc(var(--skew-angle) * -1));
    margin-right: var(--seam-offset);
    margin-left: 0; 
}

.strips__strip-one .strip-content,
.strips__strip-three .strip-content {
    transform: skewY(var(--skew-angle));
    animation: slide-left var(--animation-duration) linear infinite;
    color: var(--color-blue); 
}

.strips__strip-two {
    transform: skewY(var(--skew-angle));
    margin-left: var(--seam-offset);
    margin-right: 0;
}

.strips__strip-two .strip-content {
    transform: skewY(calc(var(--skew-angle) * -1));
    animation: slide-right var(--animation-duration) linear infinite;
    color: var(--color-red); 
}


/* ---------------------------------------------------- */
/* --- MEDIA QUERIES (ADAPTATION MOBILE) --- */
/* ---------------------------------------------------- */
@media (max-width: 1300px) {
    /* Styles pour les écrans intermédiaires (iPad/Tablette) */
    .div1 {
        flex-direction: column;
        align-items: center;
    }
    .item1 {
        width: 100%;
        text-align: center;
    }
    .item2 {
        width: 90%;
        margin-top: 20px;
    }
    .item2 p {
        font-size: 1.8vw; 
    }
    .content1 {
        /* On conserve le scroll horizontal sur 2 lignes */
        height: 380px; 
    }
}

@media (max-width: 675px) {
    /* Styles pour les bandes en mobile */
    .strips__strip {
        height: 50px;
        opacity: 0.7;
    }
    .strip-content p {
        font-size: 8vw;
        line-height: 50px;
    }
    :root {
        --seam-offset: 0.9px; 
        --band-spacing: 10px;
    }
    
    .about-text h2 {
        font-size: 1.5rem;
    }
    
    /* Autres ajustements mobiles */
    .about {
        font-size: 8vw;
    }

    .main {
        flex-direction: column;
        width: 80%;
    }

    .container {
        height: 40%;
        width: auto;
        flex-direction: row;
        margin: 10px;
    }
    
    .container:nth-child(1), .container:nth-child(2), .container:nth-child(3) {
        background-image: none;
    }
    .container:nth-child(1) { background-color: #B3DEEF; }
    .container:nth-child(2) { background-color: #B695B3; }
    .container:nth-child(3) { background-color: #F4B2CB; }

    .main2 {
        flex-direction: column;
        width: 80%;
        margin-top: 20px;
    }

    .main2 .container1 { font-size: 3vw; }
    .main2 .container2 i, .main2 .container1 i { font-size: 20px; }

    .numbers { margin-left: 10px; }
    .vague { display: none; }
    .titre { margin-top: 20px; }

    /* Réorganisation de la section À PROPOS */
    .div1, .div3 { width: 90%; }
    .div1 { 
        flex-direction: column; 
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }

    .item1 img {
        width: 70%; 
        max-width: 200px;
        margin-top: 0;
    }
    .item2 {
        width: 100%;
        margin-top: 0;
        text-align: center;
        align-items: center;
    }
    .item2-1 h3 { font-size: 4vw; }
    .item2-1 p { font-size: 3vw; text-align: center; }
    .item3 { align-items: center; }
    .item3 .menu a { font-size: 4vw; }

    /* Règle pour les compétences en mobile: retour au défilement vertical */
    .div3 { 
        overflow-x: hidden;
        padding-bottom: 20px;
    }
    .content1 {
        height: auto; 
        width: 100%;
        justify-content: center;
        /* Désactive le défilement automatique en mobile */
        animation: none; 
    }
    .skill-card-3d {
        width: 100%;
        max-width: 300px;
        margin: 10px 0;
    }

    .un {
        height: 30%;
        text-align: center;
        justify-content: space-between;
    }
    .un h1 { font-size: 20vw; }
    .un .nom { font-size: 10vw; }
    .un .autre { font-size: 3.5vw; }

    .sec1::before {
        background-image: linear-gradient(30deg, rgba(54, 52, 52, 0.4), rgba(0, 0, 0, 0.3)), url('photos/moi_nav.jpg');
    }

    .nav-toggle {
        top: 10px;
        left: 10px;
        height: 30px;
        width: 30px;
    }

    .desc { font-size: 4vw; }
}
/* --- GALERIE DE PROJETS (STYLE SPÉCIFIQUE) --- */

.gallery {
    max-width: 90%;
    margin: 0 auto;
    display: grid;
    /* DÉFINITION DE LA GRILLE ASYMÉTRIQUE */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-auto-rows: 300px; /* Hauteur de base pour chaque rangée */
    grid-gap: 20px; /* Utilisation de gap pour l'espacement */
    padding: 2.5rem;
    margin-bottom: 50px;
    justify-items: center;
}

.project-card {
    /* Suppression de la taille fixe pour laisser la grille gérer */
    width: 100%; 
    height: 100%;
    
    background-color: #B695B3;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-base);
    transition: transform 0.3s ease;
    cursor: pointer;
    z-index: 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* NOUVEAU STYLE : CARTE GRANDE (prend 2 rangées en hauteur) */
.project-card.card-large {
    grid-row: span 2; 
    /* Prend 2 rangées, rendant la carte deux fois plus haute */
}

/* Ajustement du contenu pour les cartes doubles */
.project-card.card-large .thumbnail-container {
    height: 80%; /* Donne plus d'espace à l'image dans la grande carte */
}
.project-card.card-large .video-info {
    height: 20%;
    padding: 10px;
}

/* Media Query pour Mobile: On repasse à une seule colonne (ou une grille simple) */
@media (max-width: 1000px) {
    .gallery {
        grid-template-columns: 1fr; /* Une seule colonne pour la fluidité */
        grid-auto-rows: minmax(200px, auto); /* Hauteur minimale/flexible */
        gap: 15px;
    }
    .project-card.card-large {
        grid-row: span 1; /* Désactive la double hauteur sur mobile */
    }
    .project-card {
        width: 90%;
        height: auto;
    }
}
/* ---------------------------------------------------- */
/* --- NOUVELLES SECTIONS : PROJETS & MODALE --- */
/* ---------------------------------------------------- */

/* Grille des projets */
.projets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
    max-width: 1200px;
    width: 90%;
    margin: 0 auto 50px auto;
}

/* Carte projet individuelle */
.projet-card {
    background-color: #FFF9F0; 
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.projet-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.projet-img-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: var(--color-gris);
}

.projet-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.projet-card:hover .projet-img-container img {
    transform: scale(1.1);
}

.projet-info {
    padding: 20px;
}

.projet-info h3 {
    color: var(--color-blue);
    font-family: "eight", sans-serif;
    font-size: 1.5rem;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.projet-info p {
    color: var(--color-red);
    font-size: 0.9rem;
    margin: 0;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left; /* Pour contrer le justify global */
}

/* --- SYSTÈME DE MODALE (FENÊTRE SURGISSANTE) --- */

.modal {
    display: none; 
    position: fixed;
    z-index: 10000; /* Au-dessus du menu burger */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(29, 43, 78, 0.98); /* Ton bleu marine */
    backdrop-filter: blur(10px);
    overflow-y: auto;
}

.modal-content {
    background-color: #FFF9F0; /* Ton beige */
    margin: 5% auto;
    padding: 40px;
    width: 90%;
    max-width: 900px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    color: var(--color-blue);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: var(--color-red);
}

#modal-body h2 {
    font-family: "eight", sans-serif;
    color: var(--color-blue);
    font-size: clamp(1.5rem, 5vw, 3rem);
    margin-bottom: 20px;
}

#modal-body p {
    color: #333;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    text-align: justify;
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.modal-img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Adaptation mobile pour la nouvelle section */
@media (max-width: 675px) {
    .modal-content {
        padding: 20px;
        margin: 10% auto;
    }
    .projets-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 675px) {
    /* ... garde tes styles strips et titres ... */

    .main {
        flex-direction: column;
        width: 80%;
        height: 75%;
        gap: 20px;
    }

    .container {
        height: 48% !important; /* Force la hauteur pour les 2 blocs */
        width: 100% !important;
        background-size: cover !important;
        background-position: center !important;
        margin: 0;
    }
}
/* --- 1. LA GRILLE (Centrée) --- */
.projets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto; /* AJOUT IMPORTANT : Cela centre la grille sur la page */
}

/* --- 2. LES CARTES --- */
.projet-card {
    background: #FFF;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.projet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.projet-info {
    padding: 15px;
    text-align: center; /* Centre le titre et la catégorie sous l'image */
}

/* --- 3. LES IMAGES (Mode "Contain" pour ne rien couper) --- */
.projet-img-container {
    width: 100%;
    /* 1. J'ai augmenté la hauteur ici (tu peux mettre 450px si tu veux encore plus grand) */
    height: 400px; 
    
    background-color: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    
    /* 2. J'ai ajouté les bords arrondis ici (uniquement en haut pour coller à la carte) */
    border-radius: 15px 15px 0 0;
}

.projet-img-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    
    /* Optionnel : Si tu veux que l'image elle-même soit arrondie à l'intérieur du cadre gris, décommente la ligne dessous */
    /* border-radius: 10px; */
}

/* --- 4. LA MODALE --- */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(29, 43, 78, 0.95);
    backdrop-filter: blur(5px);
    overflow-y: auto; /* Permet de scroller si la modale est trop haute sur mobile */
}

.modal-content {
    background: #FFF9F0;
    margin: 5% auto;
    padding: 40px;
    width: 80%;
    max-width: 800px;
    border-radius: 20px;
    position: relative; /* Nécessaire pour placer la croix */
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

/* --- 5. LE BOUTON FERMER (La croix) --- */
/* (C'est ce qu'il manquait pour que ce soit joli) */
.close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #aaa;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #1d2b4e;
}

/* Une classe spéciale pour les photos qui doivent remplir tout le cadre */
.img-fill {
    object-fit: cover !important; /* Le !important force le changement */
    width: 100%;
    height: 100%;
}
/* Classe pour forcer une image à remplir TOUT le cadre (Zoom) */
.img-cover {
    width: 100% !important;   /* Force la largeur totale */
    height: 100% !important;  /* Force la hauteur totale */
    object-fit: cover !important; /* Coupe les bords pour remplir sans déformer */
    display: block !important;
}