*,: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);
    }
}

@keyframes letter-drop {
    0%   { opacity: 0; transform: translateY(-120px); }
    65%  { transform: translateY(10px); }
    85%  { transform: translateY(-4px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes frontend-float {
    0%, 100% { transform: translateY(-2px); }
    50%       { transform: translateY(-8px); }
}

@keyframes backend-sink {
    0%, 100% { transform: translateY(2px) scale(0.97); }
    50%       { transform: translateY(6px) scale(0.96); }
}

@keyframes arcade-pop {
    0%   { opacity: 0; transform: translateY(40px) scale(0.4); }
    65%  { transform: translateY(-6px) scale(1.08); }
    82%  { transform: translateY(3px) scale(0.97); }
    100% { opacity: 1; }
}

@keyframes projet-meteo-in {
    from { opacity: 0; transform: translate(-40rem, -6rem) translateZ(0px); }
    to   { opacity: 1; transform: translate(-6rem, -6rem) translateZ(0px); }
}

@keyframes projet-agency-in {
    from { opacity: 0; transform: translate(40rem, 6rem) translateZ(50px); }
    to   { opacity: 1; transform: translate(6rem, 6rem) translateZ(50px); }
}

@keyframes projet-cooknshare-in {
    from { opacity: 0; transform: translateX(40rem); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes card-enter-left {
    from { transform: translateX(-350px); }
    to   { transform: translateX(0); }
}

@keyframes card-enter-right {
    from { transform: translateX(350px); }
    to   { transform: translateX(0); }
}

@keyframes h2-wipe {
    from { clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0% 0 0); }
}

@keyframes bar-grow {
    from { width: 0; }
    to   { width: 5rem; }
}

/* 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: 900;
    padding: 3rem;
    letter-spacing: 0.08em;
    font-family: Montserrat, sans-serif;
    color: #000;
}

.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: #000;
    overflow: hidden;
}

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

.presentation-text {
    font-family: Montserrat, sans-serif;
    font-size: clamp(1rem, 1.3vw, 1.5rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 2;
    max-width: 70ch;
    text-align: left;
    color: #111;
    border-left: 3px solid #000;
    padding-left: 2.5rem;
    position: relative;
    animation: fade-in-up 0.9s ease both;
    animation-timeline: view();
    animation-range: entry 5% entry 55%;
}

.frontend, .backend {
    display: inline-block;
    font-weight: 800;
    padding: 0 0.2rem;
}

/* Frontend : relief vers l'avant — empilement d'ombres vers le bas-droite */
.frontend {
    color: #e63946;
    text-shadow:
        1px 1px 0 rgba(180, 0, 0, 0.7),
        2px 2px 0 rgba(150, 0, 0, 0.5),
        3px 3px 0 rgba(120, 0, 0, 0.35),
        4px 4px 8px rgba(0, 0, 0, 0.25);
    animation: frontend-float 3s ease-in-out infinite;
}

/* Backend : relief vers l'arrière — ombres inversées + couleur sombre */
.backend {
    color: #222;
    text-shadow:
        -1px -1px 0 rgba(255, 255, 255, 0.6),
        1px 1px 2px rgba(0, 0, 0, 0.5),
        0 0 6px rgba(0, 0, 0, 0.2);
    opacity: 0.75;
    animation: backend-sink 3s ease-in-out infinite 0.5s;
}

.button-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
    animation: fade-in-up 0.9s ease both;
    animation-timeline: view();
    animation-range: entry 20% entry 70%;
}

.button-about {
    position: relative;
    width: 150px;
    height: 150px;
    background: #fff;
    border-radius: 50%;
    border: 6px solid #000;
    box-shadow: 0 8px 0 #111, 0 15px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.1s ease;
    overflow: hidden;
    cursor: pointer;
}

/* Second bouton en rouge — accent de la DA */
.button-about:last-child {
    border-color: #e63946;
    box-shadow: 0 8px 0 #8b0000, 0 15px 20px rgba(230, 57, 70, 0.25);
}

.button-about a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    font-family: Montserrat, sans-serif;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #333;
    text-decoration: none;
}

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

.button-about:last-child:active {
    box-shadow: 0 2px 0 #8b0000, 0 5px 10px rgba(230, 57, 70, 0.25);
}

/* 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;
    font-size: 70px;
    font-weight: 900;
    padding: 3rem 3rem 2rem;
    color: #000;
    z-index: 5;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.competences h2::after {
    content: '';
    display: block;
    width: 0;
    height: 5px;
    background: #e63946;
    margin: 0.8rem auto 0;
    transition: width 0.6s ease 0.85s;
}

.competences h2.letters-active::after {
    width: 5rem;
}

.competences h2 .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(-120px);
}

.competences h2.letters-active .letter {
    animation: letter-drop 0.55s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    animation-delay: calc(var(--i) * 0.06s);
}

.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;
    opacity: 0;
}

.arcade-button.btn-visible {
    animation: arcade-pop 0.55s ease-out both;
    animation-delay: calc(var(--i) * 0.07s);
}

.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);
}

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

/* Barre de compétence arcade */

.skill-display {
    position: relative;
    z-index: 5;
    width: 65%;
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.skill-display-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.skill-name-label {
    font-family: Montserrat, sans-serif;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #aaa;
}

.skill-percent-label {
    font-family: Montserrat, sans-serif;
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: #e63946;
}

.skill-bar-track {
    width: 100%;
    height: 2.5rem;
    background: #111;
    border: 4px solid #444;
    border-radius: 4px;
    box-shadow: 0 6px 0 #000, inset 0 2px 6px rgba(0, 0, 0, 0.9);
    position: relative;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    width: 0%;
    background-color: #e63946;
    box-shadow: 0 0 18px rgba(230, 57, 70, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: width 0.7s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Séparateurs arcade (10 segments) */
.skill-bar-track::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to right,
        transparent 0%,
        transparent calc(10% - 3px),
        rgba(0, 0, 0, 0.75) calc(10% - 3px),
        rgba(0, 0, 0, 0.75) 10%
    );
    pointer-events: none;
    z-index: 2;
}

/* 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: block;
    text-align: center;
    font-size: 70px;
    font-weight: 900;
    padding: 3rem 3rem 2rem;
    font-family: Montserrat, sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: h2-wipe 0.9s cubic-bezier(0.77, 0, 0.175, 1) both;
    animation-timeline: view();
    animation-range: entry 0% entry 50%;
}

.projet h2::after {
    content: '';
    display: block;
    height: 5px;
    background: #e63946;
    margin: 0.8rem auto 0;
    animation: bar-grow 0.5s ease both;
    animation-timeline: view();
    animation-range: entry 30% entry 65%;
}

.liste-projet {
    display: grid;
    grid-template-columns: 1fr 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;
    opacity: 0;
    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);
}

.projet-meteo.proj-visible {
    animation: projet-meteo-in 1s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.projet-agency.proj-visible {
    animation: projet-agency-in 1s cubic-bezier(0.25, 0.8, 0.25, 1) 0.2s forwards;
}

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

.projet-cooknshare.proj-visible {
    animation: projet-cooknshare-in 1s cubic-bezier(0.25, 0.8, 0.25, 1) 0.4s forwards;
}

.projet-cooknshare:hover {
    transform: translateY(-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-cooknshare a {
    display: block;
    width: 100%;
}

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

.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;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    inset: 0;
    z-index: 0;
}

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

.video-overlay-rapport {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
        #F5F5F5 0%,
        rgba(255, 255, 255, 0.9) 20%,
        rgba(255, 255, 255, 0.9) 80%,
        #F5F5F5 100%
    );
    z-index: 1;
}

/* --- 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: card-enter-left;
    animation-range: entry 0% entry 80%;
}

.rapport-card article:last-child {
    animation-name: card-enter-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 {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    scale: calc(1 + (var(--hover, 0) / 5));
    transition: scale 0.3s ease;
}

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;
}

/* ========== BOUTON DARK MODE ========== */

.dark-toggle {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 4px solid #000;
    background: #fff;
    box-shadow: 0 5px 0 #111;
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 2rem;
    overflow: hidden;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    padding: 0;
}

/* Demi-cercle noir — indicateur visuel de l'état */
.dark-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: #000;
    transition: background-color 0.4s ease;
}

.dark-toggle:active {
    transform: translateY(5px);
    box-shadow: none;
}

/* ========== MODE SOMBRE ========== */

body {
    transition: background-color 0.4s ease, color 0.4s ease;
}

body.dark {
    background-color: #000;
    color: #f0f0f0;
}

body.dark h1,
body.dark h2,
body.dark h3 {
    color: #f0f0f0;
}

/* Bouton toggle en dark */
body.dark .dark-toggle {
    border-color: #f0f0f0;
    background: #000;
    box-shadow: 0 5px 0 #555;
}
body.dark .dark-toggle::before { background: #f0f0f0; }

/* Navbar */
body.dark .menu-nav a { color: #f0f0f0; }
body.dark .menu-nav a::after { background-color: #f0f0f0; }
body.dark .menu-toggle-bar { background-color: #f0f0f0; }

/* Hero */
body.dark .bilal { background-color: #000; }

/* Dragon & Logo */
body.dark .dragon { filter: invert(1) hue-rotate(180deg); }
body.dark .logo-video { filter: invert(1); }

/* À propos */
body.dark .about {
    background: linear-gradient(to bottom, #000 70%, #0d0d0d 100%);
}
body.dark .about::after { background: #0d0d0d; }
body.dark .presentation-text {
    color: #d0d0d0;
    border-left-color: #f0f0f0;
}

/* Boutons circulaires À propos — intérieur blanc, relief inversé */
body.dark .button-about {
    background-color: #fff;
    border-color: #fff;
    box-shadow: 0 8px 0 rgba(255,255,255,0.55), 0 15px 20px rgba(255,255,255,0.08);
}
body.dark .button-about:last-child {
    border-color: #e63946;
    box-shadow: 0 8px 0 rgba(230,57,70,0.6), 0 15px 20px rgba(230,57,70,0.1);
}
body.dark .button-about a { color: #000; }
body.dark .button-about:hover { background-color: #000; }
body.dark .button-about:hover a { color: #fff; }
body.dark .button-about:active {
    box-shadow: 0 2px 0 rgba(255,255,255,0.4);
}

/* Compétences */
body.dark .video-overlay {
    background: linear-gradient(to bottom,
        #0d0d0d 0%,
        rgba(0,0,0,0) 20%,
        rgba(0,0,0,0) 80%,
        #000 100%
    );
}
body.dark .video-overlay-rapport {
    background: linear-gradient(to bottom,
        #000 0%,
        rgba(0,0,0,0) 25%,
        rgba(0,0,0,0) 75%,
        #000 100%
    );
}
body.dark .stage { background-color: #000; }
body.dark .competences h2 { color: #f0f0f0; }
body.dark .competences h2::after { background: #e63946; }

/* Boutons arcade — intérieur blanc, relief inversé */
body.dark .arcade-button {
    background: #fff;
    box-shadow: 0 8px 0 rgba(255,255,255,0.45), 0 15px 20px rgba(255,255,255,0.06);
}
body.dark .arcade-button:active,
body.dark .arcade-button.selected {
    box-shadow: 0 2px 0 rgba(255,255,255,0.3), 0 5px 10px rgba(255,255,255,0.05);
}
body.dark .arcade-link span { color: #222; }
body.dark .skill-bar-track { border-color: #444; background: #0d0d0d; }
body.dark .skill-name-label { color: #666; }

/* Projets */
body.dark .projet { background-color: #000; }
body.dark .projet-meteo,
body.dark .projet-agency,
body.dark .projet-cooknshare {
    background-color: #111;
    border-color: #222;
    box-shadow: none;
}
body.dark .projet-meteo:hover,
body.dark .projet-agency:hover,
body.dark .projet-cooknshare:hover {
    border-color: #f0f0f0;
    box-shadow: 0 30px 40px -10px rgba(255,255,255,0.08);
}
body.dark .titre-dossier { background-color: #f0f0f0; color: #000; }

/* Rapports */
body.dark .rapport { background-color: #000; }
body.dark .rapport h2 { color: #f0f0f0; }
body.dark article {
    background: #111;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
}

/* Stage */
body.dark .stage h2 { color: #f0f0f0; }

/* ========== 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,
    .projet-cooknshare {
        grid-area: auto;
        position: relative;
        width: 90%;
        margin: 0;
        transform: none !important;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    /* Désactive les effets de survol complexes sur mobile/tablette */
    .projet-meteo:hover,
    .projet-agency:hover,
    .projet-cooknshare:hover {
        transform: scale(1.02) !important;
        z-index: 1;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    }

    .titre-dossier {
        font-size: 1rem;
        top: -2rem;
        left: 1rem;
    }

    .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,
    .projet-cooknshare {
        width: 95%;
        margin: 1.5rem;
    }

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

    .projet {
        padding: 2rem 1rem;
    }

    .projet-meteo,
    .projet-agency,
    .projet-cooknshare {
        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 */
    }
}
