*,:after,:before{
	margin:0;
	padding:0;
	-webkit-box-sizing:border-box;
	-moz-box-sizing:border-box;
	box-sizing:border-box
}

/* Strucutre générale*/

body,html{
	font-family:Arial,sans-serif;
	font-size:15px;
	color:#000000;
	height:100%;
	background-color:#ffffff;
	-webkit-box-sizing:border-box;
	-moz-box-sizing:border-box;
	box-sizing:border-box;
  overflow-x: hidden;
    width: 100%;
    --scroll-behavior: smooth;
    scroll-behavior: smooth;
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.07;
    pointer-events: none; 
    z-index: 1;
}

h1 {
    font-size: 8rem;
    font-family: Montserrat; 
    color: black;
}

h2 {
  color: #000000;
  font-family: Montserrat; 
}

h3 {
  color: #000000;
  font-family: Montserrat;
}

/* curseur */
/* LE CERCLE OUTLINE */
.cursor-outline {
    pointer-events: none;
    position: fixed;
  
    top: -5rem; 
    left: -5rem;
    
    width: 10rem;
    height: 10rem;
    border-radius: 50%;
    background-color: rgba(0, 255, 255, 1);
    mix-blend-mode: difference;
    z-index: 9999;
    
    transform: translate(var(--x, 0px), var(--y, 0px)) scale(var(--scale, 1));
    
    transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1), background-color 0.2s ease-out;
}

/* L'EFFET AU SURVOL */
.cursor-hover {
    /* ATTENTION : INTERDICTION D'ÉCRIRE "TRANSFORM" ICI. 
       On modifie JUSTE la variable d'échelle et la couleur. */
    --scale: 1.3;
    background-color: rgba(255, 0, 0, 0.2);
}

/* Navbar */

.menu-nav {
    display: flex;
    text-align: center;
    align-items: center;
    width: 100%;
}

.nav-header {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding-left: 25rem;
}

.onglets-navbar {
    display: flex;
    justify-content:first baseline;
    align-items:center;
    flex: 1;
    text-align: center;
    list-style: none;
    font-size: 20px;
}

.logo-video {
  width: 12rem;
    height: auto;
    display: block;
}

.logo-video:hover {
  transition: transform 0.3s ease-in-out;
  transform: scale(1.05);
}


.menu-nav .onglets-navbar li {
  display: inline-flex;
}

.menu-nav a {
    position: relative;
  padding: 1rem 0 0.5rem;
  margin: 0 1.5rem;
  color: #000000;
  text-decoration: none;
  text-transform: uppercase;
  
  &::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) scaleX(0);
    transform-origin: 50% 50%;
    width: 100%;
    height: 1px;
    background-color: #000000;
    transition: transform 250ms;
  }
  
  &:hover {
    
    font-weight: bold;

    &::after {
      transform: translateX(-50%) scaleX(1);
    }
    
  }

}

.logo-anime {
    display: flex;
    justify-content: flex-start;
}

/* Bouton menu mobile - caché sur desktop */
.menu-toggle {
    display: none;
}

/* Section bilal */

.bilal {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7rem;
    margin: 5rem auto;
    background-color: #ffffff;
}

.bilal h1 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 15rem;
    line-height: 0.9;
    overflow: hidden; 
}

.bilal h3 {
  font-size: 5rem;
  padding: 1rem;
  color: #000;
  display: block;
   overflow: hidden;
   white-space: nowrap; 
  cursor: pointer;
  width: max-content;
  clip-path: inset(0 100% 0 0); 
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bilal.active h3 {
  animation: openText 1.5s ease-out 0.9s forwards;
}

.titre-texte {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.photo-bilal {
    width: 30rem;
    border-radius: 3rem;
    opacity: 0; 
    transform: scale(0.5);
    transition: all 0.7s ease-out;
    z-index: 0;
}


.reveal-text span {
    display: block; 
    opacity: 0;
    transition: all 0.8s ease-out;
}

.line1 { transform: translateX(-300px); padding-bottom: 2rem; }

.line2 { transform: translateX(300px); }


.active .photo-bilal {
    opacity: 1;
    transform: scale(1);
    transition-delay: 0.2s;
}

.active .line1 {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.2s;
}

.active .line2 {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.7s;
}

/* --- KEYFRAMES --- */

@keyframes fadeleft {
    0% {
        opacity: 0;
        transform: translateX(-300px); /* Arrive de la gauche */
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes faderight {
    0% {
        opacity: 0;
        transform: translateX(300px); /* Arrive de la droite */
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scale-up-center{ 
  0%{transform:scale(.5)} 
  100%{transform:scale(1)} }


@keyframes dragon {
    0% {
        transform: translateX(-35vw);
    }
   
    100% {
    
        transform: translateX(100vw);
    }
}
  
@keyframes reveal-left-to-right {
  0% {
    background-position-x: 100%; /* Texte masqué à droite */
  }
  100% {
    background-position-x: 0%; /* Texte entièrement révélé à gauche */
  }
}

@keyframes slide-in-left {
    0% {
        transform: translateX(-200%);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    0% {
        transform: translateX(200%);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes openText {
  0% { clip-path: inset(0 100% 0 0); } 
  100% { clip-path: inset(0 0 0 0); } 
}

@keyframes fade-in-up {
    from { 
        opacity: 0;
        transform: translateY(50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dragon : transition de section */

.dragon-container {
    position: relative; 
    width: 100%;
    overflow: visible;  
    display: flex;
    align-items: center;
    pointer-events: none;
}

.dragon {
    width: 40rem;
    animation: dragon 10s ease-in infinite;
}

/* Section à propos */ 

.about {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction:column ;
  background-color: #F5f5f5;
  padding: 15rem;
  position: relative;
  background: linear-gradient(to bottom, #ffffff 70%, #e6e6e6 100%);
}

.about::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px; /* La hauteur de la transition */
    background: #e6e6e6; /* La couleur de la section suivante */
    clip-path: polygon(0 100%, 100% 100%, 0 100%);
}

.about h2 {
  font-size: 70px;
  font-weight: bold;
  padding: 3rem ;
}

.text-part {
    display: inline-block;
    position: relative;
    transform: translateX(0);
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;
}

.text-part.left {
    transform: translateX(-200%);
    animation-name: slide-in-left;
    animation-timeline: scroll();
    animation-range: 10% 25%;
}

.text-part.right {
    transform: translateX(200%);
    animation-name: slide-in-right;
    animation-timeline: scroll();
    animation-range: 10% 25%;
}

.split-text-container {
    display: flex;
    font-size: 5rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #fff;
    overflow: hidden;
}

.presentation-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh; 
    width: 100%;
}

.presentation-text {
    text-align: center;
    font-family: 'Open Sans', sans-serif;
    font-size: 30px;
    max-width: 80%;
    margin: auto;
    line-height: 1.5; 
}

.frontend, .backend {
    display: inline-block;
    font-weight: 800;
    transform-style: preserve-3d;
    padding: 0.5rem;
}

.frontend {
    color: red;
    transform: perspective(500px) translateZ(50px) rotateY(-15deg);
    text-shadow: 
        5px 5px 15px rgba(0, 0, 0, 0.5), 
        0 0 5px rgba(227, 79, 38, 0.3);
}

.backend {
    display: inline-block;
    font-weight: 800;
    color: red;
    transform: perspective(500px) translateZ(-40px);
    text-shadow: 
        -1px -1px 1px rgba(0, 0, 0, 0.8), 
        1px 1px 1px rgba(255, 255, 255, 0.2);
    opacity: 0.6;
    filter: brightness(0.8) contrast(1.2);
    isolation: auto;
    mix-blend-mode: difference;
}

.button-info{
   display: flex;
  align-items: center;
  justify-content: center;
}

.button-about {
  border: 2px solid black;
  margin: 1rem;
  padding: 2rem;;
  background-color: #ffffff;
  text-decoration: none;
}

.button-about:hover{
  background-color: red;
  color: #ffffff;
}

/* Page competences*/

.competences {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    padding: 15rem;
    overflow: hidden;
}
.competences::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px; 
    background: #F5F5F5;
    clip-path: polygon(0 100%, 100% 100%, 0% 100%);
    z-index: 2; 
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    inset: 0;
    z-index: 0; 
}

#bg-video-competences {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Optionnel : Un léger voile pour que ton H2 noir reste bien lisible */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* On fait un dégradé direct sur l'overlay pour fondre la vidéo dans le blanc */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9) 70%, #F5F5F5 100%);
    z-index: 1;
}

.competences h2 {
    position: relative; /* Pour s'assurer qu'il reste au-dessus de l'overlay */
    font-size: 70px;
    font-weight: bold;
    padding: 3rem;
    color: #000000;
    z-index: 5;
}

.arcade-panel {
    display: grid;
    position: relative;
    /* Pour avoir 4 colonnes égales */
    grid-template-columns: repeat(4, 1fr); 
    /* Ou pour que les boutons s'adaptent tout seuls à la largeur disponible */
    /* grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); */
    gap: 2rem;
    padding: 1rem;
    z-index: 5;
    place-items: center; /* Centre les boutons dans leurs cellules */
}

.arcade-button {
    position: relative;
    width: 100px;
    height: 100px;
    background: #fff;
    border-radius: 50%;
    border: 6px solid #333;
    box-shadow: 0 8px 0 #222, 0 15px 20px rgba(0,0,0,0.3);    
    transition: all 0.1s ease; 
    overflow: hidden;
    padding: 0 !important;
}

.arcade-link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.arcade-link img {
    width: 35px;
    height: auto;
    margin-bottom: 5px;
    pointer-events: none;
}

.arcade-link span {
    font-size: 0.70rem;
    font-weight: 900;
    font-family: Montserrat, sans-serif;
    color: #333;
    text-transform: uppercase;
    pointer-events: none;
}

.arcade-button.html { border-color: #E34F26; }
.arcade-button.css  { border-color: #1572B6; }
.arcade-button.js   { border-color: #F7DF1E; }
.arcade-button.php  { border-color: #777BB4; }
.arcade-button.sql  { border-color: #00758F; }
.arcade-button.symfony  { border-color: #000000; }
.arcade-button.wordpress  { border-color: #21759B; }
.arcade-button.git  { border-color: #F05032; }
.arcade-button.github  { border-color: #181717; }
.arcade-button.linux  { border-color: #FCC624; }
.arcade-button.docker  { border-color: #2496ED; }
.arcade-button.api { border-color: #009688; }

.arcade-button:active {
    transform: translateY(6px);
    box-shadow: 0 2px 0 #222, 0 5px 10px rgba(0,0,0,0.3);
}

/* Page projet */

.projet {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%; 
  overflow: hidden;
  padding: 15rem;
  background-color: #F5F5F5;
}

.projet h2 {
  display: flex;
  justify-content: flex-start;
  font-size: 70px;
  font-weight: bold;
  padding: 3rem ;
  font-family: Montserrat, sans-serif;
  text-align:center;
}

.liste-projet {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    width: 100%;
    perspective: 1500px; 
    transform-style: preserve-3d;
    padding: 5rem 0; 
    overflow: hidden; 
}

.projet-meteo, .projet-agency {
    grid-area: 1 / 1; 
    position: relative; 
    width: 65%; 
    margin: 3.5rem;
    background-color: #f8f9fa;
    border-radius: 15px;
    border: 1px solid #e0e0e0;
    
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), 
                box-shadow 0.5s ease, 
                border-color 0.5s ease;
}
.projet-meteo {
    transform: translate(-6rem, -6rem) translateZ(0px); 
}

.projet-agency {
    transform: translate(6rem, 6rem) translateZ(50px); 
    box-shadow: -10px -10px 15px -5px rgba(0, 0, 0, 0.1);
}

.is-front {
    z-index: 5 !important;
}


.projet-meteo:hover, .projet-agency:hover {
    transform: translate(-1rem, -4rem) translateZ(80px) rotateX(2deg) !important;
    z-index: 10 !important; 
    box-shadow: 0 30px 40px -10px rgba(0, 0, 0, 0.3);
    border-color: #000;
}

.projet-agency:hover {
    transform: translate(1rem, 0rem) translateZ(80px) rotateX(2deg) !important;
}

.titre-dossier {
    position: absolute;
    top: -2.5rem;
    left: 2rem;
    background-color: #000;
    color: #fff;
    padding: 0.5rem 1.5rem;
    font-family: Montserrat, sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 10px 10px 0 0;
    font-size: 1.2rem;
    white-space: nowrap; 
    z-index: 5; 
}

.video-portfolio {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
    filter: brightness(0.85) grayscale(20%);
    transition: filter 0.4s ease;
}

/* page rapports */

.rapport {
    position: relative; /* Référentiel pour tout ce qui est à l'intérieur */
    width: 100%;
    min-height: 100vh; /* La section fait au moins la taille de l'écran */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15rem 2rem;
    overflow: hidden; /* Empêche le scroll horizontal dû aux animations */
    background-color: #fefefe;
}

.rapport::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px; 
    background: #F5F5F5; /* Couleur de la section suivante */
    clip-path: polygon(0 100%, 100% 100%, 0 100%); /* Pente inversée pour dynamisme */
    z-index: 2; 
}

/* --- LE FOND (Sorti du flux pour ne plus rien pousser) --- */
.video-background-rappport {
    position: absolute; /* LA CLÉ : La vidéo ne prend plus de place physique */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Couche la plus basse */
    pointer-events: none; /* Les clics passent à travers pour toucher les liens */
}

#bg-video-competences-rapport {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Remplit tout l'écran sans se déformer */
    filter: grayscale(100%) brightness(1);
    opacity: 0.1;
}

.video-overlay-rapport {
    position: absolute;
    top: 0;
    left: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    /* Ce dégradé noie la vidéo dans le blanc/gris en haut et en bas */
    background: linear-gradient(to bottom, 
        #F5F5F5 0%,             /* Blanc pur en haut */
        rgba(255, 255, 255, 0) 20%, /* Vidéo visible au milieu */
        rgba(255, 255, 255, 0) 80%, 
        #Ffffff 100%            /* Gris clair en bas pour la transition */
    );
    z-index: 1;
}

/* --- L'OVERLAY (Voile blanc pour la lisibilité) --- */
.video-background-rappport::after {
    display: none;
}

/* --- LE CONTENU (Forcé devant par z-index et position) --- */
.rapport h2,
.rapport-card {
    position: relative; /* Nécessaire pour que le z-index fonctionne */
    z-index: 10; /* Beaucoup plus haut que la vidéo */
}

.rapport h2 {
    font-size: 70px;
    font-weight: bold;
    color: #000;
    margin-bottom: 3rem;
    text-transform: uppercase;
}

.rapport-card {
    display: flex;
    justify-content: center;
    gap: 4rem;
}

/* --- ARTICLES (CARTES) --- */
article { 
    --hue: 0; /* Rouge pur pour ton style d'artiste */
    position: relative;
    width: 350px;
    aspect-ratio: 3/4;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border-radius: 12px;
    background: #fff;
    /* Scroll animation */
    animation-timeline: view();
    animation-fill-mode: both;
}

article:nth-of-type(even) {
    --hue: 180; /* Cyan opposé au rouge */
}

/* Animations Scroll-Driven */
.rapport-card article:first-child {
    animation-name: slide-in-left;
    animation-range: entry 0% entry 80%;
}

.rapport-card article:last-child {
    animation-name: slide-in-right;
    animation-range: entry 0% entry 80%;
}

/* Interactions */
article:hover { --hover: 1; }

article:focus-within {
    --hover: 1;
    outline: 4px solid hsl(var(--hue) 100% 50%);
    outline-offset: 4px;
}

/* --- DESIGN INTERNE --- */
article img {
    scale: calc(1 + (var(--hover, 0) / 5));
    transition: scale 0.3s ease;
    height: 100%;
    width: 100%;
    object-fit: cover;
}

article a {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: end;
    padding: 2rem;
    background: linear-gradient(transparent 40%, rgba(0,0,0,0.85));
    text-decoration: none;
    color: white;
}

article a span:first-of-type {
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 0.8rem;
    position: relative;
}

article a span:last-of-type {
    font-size: 0.85rem;
    text-transform: uppercase;
    opacity: 0.9;
    line-height: 1.4;
}

/* Barre de survol sous le titre */
article a span:first-of-type::after {
    content: "";
    height: 4px;
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    background: white;
    scale: var(--hover, 0) 1;
    transition: scale 0.3s ease;
    transform-origin: left;
}

/* page Stage */



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

.stage h2 {
  font-size: 70px;
  font-weight: bold;
  padding: 3rem ;
}


  footer {
    padding: 30px 0;
    background-color: #000000;
    margin-top: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.txt-footer {
  color: #ffffff;
}

/* ========== RESPONSIVE ========== */

/* Tablette */
@media (max-width: 1024px) {
    .menu-nav {
        flex-wrap: wrap;
        justify-content: center;
        padding: 1rem;
    }

    .nav-header {
        width: 100%;
        padding-left: 0;
        justify-content: center;
    }

    .logo-anime {
        margin-left: 0;
        justify-content: center;
    }

    .onglets-navbar {
        margin-left: 0;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .menu-nav a {
        margin: 0 0.75rem;
        padding: 0.5rem 0;
    }

    .logo-video {
        width: 8rem;
    }

    .bilal {
        flex-direction: column;
        gap: 3rem;
        margin: 3rem auto;
    }

    .bilal h1 {
        font-size: 10rem;
    }

    .bilal h3 {
        font-size: 3rem;
    }

    .photo-bilal {
        width: 22rem;
    }

    .line1 { transform: translateX(-150px); }
    .line2 { transform: translateX(150px); }

    .dragon {
        width: 25rem;
    }

    .about {
        padding: 5rem 2rem;
    }

    .about h2,
    .competences h2,
    .projet h2,
    .rapport h2,
    .stage h2 {
        font-size: 50px;
        padding: 2rem;
    }

    .presentation {
        font-size: 22px;
        max-width: 90%;
    }

    .split-text-container {
        font-size: 3.5rem;
    }

    .arcade-interface {
        flex-direction: column;
    }

    .joystick-img {
        width: 12rem;
    }

    .game-container {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .arcade-link img {
        width: 28px;
    }

    .arcade-link span {
        font-size: 0.55rem;
    }

   .liste-projet {
        display: flex; /* On passe de grid à flex pour empiler */
        flex-direction: column; 
        align-items: center;
        gap: 6rem; /* Espace entre les deux dossiers */
        perspective: none; /* On tue la 3D */
        padding: 2rem 0;
    }

    .projet-meteo,
    .projet-agency {
        grid-area: auto; /* On annule la superposition de la grille */
        position: relative;
        width: 90%; /* Prend plus de place sur petit écran */
        margin: 0; /* On reset les marges pour laisser le gap gérer l'espace */
        transform: none !important; /* Annule le décalage 3D */
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); /* Ombre simple à plat */
    }

    /* Désactive les effets de survol complexes sur mobile/tablette */
    .projet-meteo:hover,
    .projet-agency:hover {
        transform: scale(1.02) !important; /* Petit zoom simple uniquement */
        z-index: 1;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    }
    
    .titre-dossier {
        font-size: 1rem;
        top: -2rem;
        left: 1rem;
    }

    .projet-meteo {
        transform: none;
    }

    .projet-agency {
        transform: none;
        box-shadow: none;
    }

    .projet-meteo:hover,
    .projet-agency:hover {
        transform: scale(1.02) !important;
    }

    .projet-agency:hover {
        transform: scale(1.02) !important;
    }

    .rapport {
        padding: 5rem 2rem; /* On réduit l'énorme padding de 15rem */
    }

    .rapport-card {
        gap: 2rem;
    }

    .rapport-card article {
        width: 45%; /* Les cartes prennent plus de place en largeur */
    }
}

/* Cacher le curseur personnalisé sur écrans tactiles */
@media (hover: none) {
    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .cursor-dot,
    .cursor-outline {
        display: none;
    }

    .menu-nav {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
    }

    .nav-header {
        display: flex;
        padding-left: 0; 
        padding: 0 1rem;
         justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .nav-header .logo-anime {
        margin-left: 0;
    }

    /* Afficher le bouton hamburger */
    .menu-toggle {
        display: flex;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 44px;
        height: 44px;
        padding: 8px;
        background: transparent;
        border: 2px solid #000;
        border-radius: 6px;
        cursor: pointer;
        transition: background 0.3s ease;
    }

    .menu-toggle:hover {
        background: rgba(0, 0, 0, 0.05);
    }

    .menu-toggle-bar {
        display: block;
        width: 100%;
        height: 2px;
        background: #000;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    /* Animation hamburger -> X quand ouvert */
    .menu-nav.nav-open .menu-toggle-bar:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .menu-nav.nav-open .menu-toggle-bar:nth-child(2) {
        opacity: 0;
    }

    .menu-nav.nav-open .menu-toggle-bar:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    /* Menu déroulant */
    .onglets-navbar {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        margin: 0;
        padding: 0;
        opacity: 0;
        transition: max-height 0.4s ease, opacity 0.3s ease;
    }

    .menu-nav.nav-open .onglets-navbar {
        max-height: 400px;
        opacity: 1;
        padding-top: 1rem;
    }

    .onglets-navbar li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .onglets-navbar li:last-child {
        border-bottom: none;
    }

    .menu-nav a {
        margin: 0;
        padding: 1rem;
        display: block;
        width: 100%;
    }

    .menu-nav a:hover::after {
        display: none;
    }

    .bilal h1 {
        font-size: 5rem;
    }

    .bilal h3 {
        font-size: 1.8rem;
    }

    .photo-bilal {
        width: 18rem;
    }

    .line1 { transform: translateX(-80px); padding-bottom: 1rem; }
    .line2 { transform: translateX(80px); }

    .dragon {
        width: 18rem;
    }

    .competences h2,
    .projet h2,
    .rapport h2,
    .stage h2 {
        font-size: 36px;
        padding: 1.5rem;
    }


    .about {
        padding: 4rem 1.5rem;
    }

    .about h2 {
        font-size: 10px;
    }

/* Le paragraphe gère le texte et les span */
.presentation-text {
    font-size: 18px;
    max-width: 100%;
}

    .split-text-container {
        font-size: 2.5rem;
    }

    .button-about {
        padding: 1rem 1.5rem;
    }

    .button-info {
        flex-direction: column;
    }

    .competences {
        padding: 2rem 1rem;
    }

    .arcade-panel {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .arcade-button {
        width: 65px;
        height: 65px;
        border-width: 4px;
    }

    .arcade-link img {
        width: 22px;
    }

    .arcade-link span {
        font-size: 0.45rem;
    }

    .joystick-img {
        width: 8rem;
    }

    .projet-meteo,
    .projet-agency {
        width: 95%;
        margin: 1.5rem;
    }

    .titre-dossier {
        font-size: 1rem;
        padding: 0.4rem 1rem;
    }

    .projet {
        padding: 2rem 1rem;
    }
    
    .projet-meteo,
    .projet-agency {
        width: 100%;
    }

    .rapport h2 {
        font-size: 50px; /* Titre plus petit pour mobile */
        text-align: center;
    }

    .rapport-card {
        flex-direction: column; /* On empile les rapports verticalement */
        align-items: center;
        gap: 3rem;
    }

    .rapport-card article {
        width: 90%; /* Presque toute la largeur de l'écran */
        max-width: 350px;
    }

    /* Désactivation ou simplification des animations de côté sur mobile */
    .rapport-card article:first-child,
    .rapport-card article:last-child {
        animation-name: fade-in-up; 
        animation-range: entry 10% contain 40%;
        transform: translateY(50px);
    }
}

/* Petit mobile */
@media (max-width: 480px) {
    .logo-video {
        width: 6rem;
    }

    .bilal h1 {
        font-size: 3.5rem;
        padding: 0;
    }

    .bilal h3 {
        font-size: 1.2rem;
    }

    .photo-bilal {
        width: 14rem;
    }

    .line1 { transform: translateX(-50px); }
    .line2 { transform: translateX(50px); }

    .dragon {
        width: 14rem;
    }

    .competences h2,
    .projet h2,
    .rapport h2,
    .stage h2 {
        font-size: 28px;
        padding: 1rem;
    }

    .about h2{
        font-size: 22px;
    }

    .presentation {
        font-size: 15px;
    }

    .split-text-container {
        font-size: 1.8rem;
    }

    .arcade-button {
        width: 60px;
        height: 60px;
    }

    .arcade-link img {
        width: 20px;
    }

    .arcade-link span {
        font-size: 0.4rem;
    }

    .joystick-img {
        width: 6rem;
    }

    #game-status {
        font-size: 0.6rem;
        padding: 6px;
    }

    .rapport {
        padding: 3rem 1rem;
    }

    .rapport h2 {
        font-size: 35px;
    }

    article a {
        font-size: 1.5rem; /* Réduction du texte pour éviter les chevauchements */
    }

    .rapport-card article {
        width: 100%;
        aspect-ratio: 4/5; /* On allonge un peu pour laisser de la place au texte */
    }
}
