/* Variables CSS */
:root {
  --footer-h: clamp(60px, 10vh, 80px);
}

/* Optimisations de performance */
.navbar,
.scroll-progress-bar,
.nav-menu a,
.skill-card,
.project-card,
.timeline-item {
  will-change: transform, opacity;
}

.navbar.scrolled {
  will-change: height, background, box-shadow;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  overflow-y: auto;                 /* scroll vertical natif */
  scrollbar-gutter: stable both-edges; /* réserve l’espace de la scrollbar, plus de flash */
  max-width: 100vw;
}

/* Fallback pour navigateurs sans scrollbar-gutter */
@supports not (scrollbar-gutter: stable) {
  html { overflow-y: scroll; }      /* force l’espace de scrollbar en permanence */
}

body {
  font-family: 'Arial', sans-serif;
  background-color: #0d0d0d;
  color: #f0f0f0;
  overflow-x: hidden;
  max-width: 100vw;
  /* On supprime scroll-behavior ici pour laisser Locomotive gérer le scroll */
}

/* ===== Futuristic Navbar ===== */
.navbar{
  position:fixed;
  top:0; left:0;
  width:100%;
  height:clamp(60px, 10vh, 80px);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 clamp(15px, 5vw, 40px);
  z-index:1000;
  
  /* glass‑morphism + néon */
  background:rgba(10,10,10,0.45);
  backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(39,121,167,0.35);
  box-shadow:0 0 15px rgba(39,121,167,0.25);

  /* transition fluide vers l'état réduit - optimisée */
  transition:height .25s ease-out, background .25s ease-out, box-shadow .25s ease-out;
}

/* titre à gauche */
.navbar .title{
  font-family:"Orbitron",sans-serif;
  font-weight:700;
  font-size:clamp(1.1em, 3.5vw, 1.4em);
  letter-spacing:clamp(1px, 0.6vw, 3px);
  color:#61dafb;
  user-select:none;
}

/* Navbar left side container */
.navbar-left {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 15px);
}

/* Sélecteur de langue */
.language-selector {
  position: relative;
  z-index: 1001;
}

/* Masquer le select natif */
#language-selector {
  display: none;
}

/* Select personnalisé */
.custom-select {
  position: relative;
  cursor: pointer;
}

.select-selected {
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(97, 218, 251, 0.3);
  border-radius: 6px;
  padding: clamp(6px, 1.5vw, 8px);
  font-size: clamp(16px, 4vw, 20px);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(32px, 8vw, 40px);
  height: clamp(32px, 8vw, 40px);
  backdrop-filter: blur(10px);
  transition: all 0.2s ease-out;
}

.select-selected:hover {
  border-color: rgba(97, 218, 251, 0.6);
  background: rgba(97, 218, 251, 0.1);
  transform: scale(1.05);
}

.select-selected.select-arrow-active {
  border-color: #61dafb;
  background: rgba(97, 218, 251, 0.2);
}

/* Options déroulantes */
.select-items {
  position: absolute;
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid rgba(97, 218, 251, 0.4);
  border-radius: 6px;
  backdrop-filter: blur(10px);
  top: 100%;
  left: 0;
  right: 0;
  z-index: 99;
  margin-top: 2px;
  overflow: hidden;
}

.select-items div {
  padding: clamp(6px, 1.5vw, 8px);
  font-size: clamp(16px, 4vw, 20px);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(32px, 8vw, 40px);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.select-items div:hover {
  background: rgba(97, 218, 251, 0.2);
}

.same-as-selected {
  background: rgba(97, 218, 251, 0.1);
}

.select-hide {
  display: none;
}

.select-items div:not(:last-child) {
  border-bottom: 1px solid rgba(97, 218, 251, 0.2);
}

/* Badge technologies */
.tech-badge {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(32px, 8vw, 40px);
  height: clamp(32px, 8vw, 40px);
  background: none;
  border: none;
  border-radius: 6px;
  color: #61dafb;
  cursor: pointer;
  transition: all 0.2s ease-out;
}

.tech-badge:hover {
  background: rgba(97, 218, 251, 0.1);
  transform: scale(1.1);
}

.tech-badge:hover .tech-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.tech-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: auto;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.2s ease-out;
  z-index: 1002;
}

/* Empêcher le tooltip de sortir de l'écran sur mobile */
@media (max-width: 480px) {
  .tech-tooltip {
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
  }
  
  .tech-badge:hover .tech-tooltip {
    transform: translateX(-50%) translateY(0);
  }
}

.tech-tooltip-content {
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid rgba(97, 218, 251, 0.4);
  border-radius: 8px;
  padding: 16px;
  backdrop-filter: blur(15px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  min-width: 240px;
  color: #f0f0f0;
}

.tech-tooltip-content h4 {
  margin: 0 0 12px 0;
  color: #61dafb;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.tech-tooltip-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tech-tooltip-content li {
  display: flex;
  align-items: center;
  padding: 4px 0;
  font-size: 13px;
  color: #d0d0d0;
}

.tech-icon {
  margin-right: 8px;
  font-size: 14px;
  width: 20px;
  text-align: center;
}

/* Menu hamburger (masqué par défaut) */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger-line {
  width: 25px;
  height: 3px;
  background: #61dafb;
  margin: 3px 0;
  transition: 0.3s ease;
  border-radius: 2px;
}

/* Animation hamburger vers X */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

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

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* liste de liens */
.nav-menu{
  list-style:none;
  display:flex;
  gap:clamp(20px, 4vw, 40px);
}

.nav-menu li a{
  position:relative;
  text-transform:uppercase;
  font-size:clamp(0.7rem, 2.5vw, 0.9rem);
  letter-spacing:clamp(0.5px, 0.3vw, 1px);
  font-weight:600;
  color:#f0f0f0;
  text-decoration:none;
  transition:color .25s ease;
}

/* underline dégradé animé */
.nav-menu li a::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(to right, #2779a7, #00c9ff);
  border-radius: 2px;
  transition: width 0.35s ease, left 0.35s ease;
}

.nav-menu li a.active.down::after {
  width: 100%;
  left: 0;
}

.nav-menu li a.active.up::after {
  width: 100%;
  left: auto;
  right: 0;
}

.nav-menu li a:hover,
.nav-menu li a.active{
  color:#00c9ff;
}
.nav-menu li a:hover::after,
.nav-menu li a.active::after{
  width:100%;
}

/* navbar "shrunk" après défilement */
.navbar.scrolled{
  height:60px;                       /* même transition que plus haut */
  background:rgba(10,10,10,0.80);
  box-shadow:0 4px 20px rgba(0,0,0,0.6);
}

/* Barre de progression du scroll */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(39, 121, 167, 0.1);
  z-index: 1001;
}

.scroll-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #61dafb, #2779a7, #00c9ff);
  width: 0%;
  box-shadow: 0 0 10px rgba(97, 218, 251, 0.6);
}

/* Responsive pour mobile */
@media (max-width: 1200px) {
  .navbar {
    padding: 0 20px;
  }
  
  .navbar-left {
    gap: 10px;
  }
  
  .nav-menu {
    gap: 15px;
  }
  
  .nav-menu li a {
    font-size: 0.75rem;
    letter-spacing: 0.5px;
  }
  
  .select-selected {
    font-size: 16px;
    min-width: 32px;
    height: 32px;
    padding: 6px;
  }
  
  .select-items div {
    font-size: 16px;
    min-height: 32px;
    padding: 6px;
  }
  
  .tech-badge {
    width: 32px;
    height: 32px;
  }
  
  .tech-badge svg {
    width: 16px;
    height: 16px;
  }
  
  .tech-tooltip {
    right: 0;
  }
  
  .tech-tooltip-content {
    min-width: 200px;
    padding: 12px;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: clamp(60px, 10vh, 80px); /* S'adapte à la hauteur de la navbar */
    left: 0;
    width: 100%;
    height: calc(100vh - clamp(60px, 10vh, 80px));
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 30px;
    padding-top: 60px;
    transform: translateX(-100%);
    transition: transform 0.3s ease, top 0.45s ease;
  }
  
  /* Ajustement quand la navbar est rétrécie */
  body.navbar-scrolled .nav-menu {
    top: 60px;
    height: calc(100vh - 60px);
  }
  
  .nav-menu.active {
    transform: translateX(0);
  }
  
  .nav-menu li a {
    font-size: 1.2em;
    padding: 15px;
  }
  
  /* Ajuster l'underline pour mobile */
  .nav-menu li a::after {
    bottom: 8px;
  }
  
  .navbar .title {
    font-size: 1.2em;
  }
}

/* Background Animation */
#constellation-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: #0d0d0d; /* fallback fond */
}

/* Section Styles */
.section {
  min-height: 100vh;
  padding: clamp(60px, 12vh, 100px) clamp(15px, 5vw, 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* Section Contact : même rythme que les autres sections */
#contact.section {
  min-height: auto;
  padding: clamp(80px, 15vh, 120px) clamp(15px, 5vw, 20px) clamp(80px, 15vh, 120px);
}

.content {
  max-width: 1600px;
  width: 100%;
  overflow-x: hidden;
}

/* === Materialization Effect === */
.materialization-container {
  position: relative;
  width: clamp(280px, 45vw, 400px);
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 16px;
}

/* Particules convergentes */
.convergence-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
}

.particle-stream {
  position: absolute;
  width: 2px;
  height: 2px;
  background: radial-gradient(circle, rgba(97, 218, 251, 1), transparent);
  border-radius: 50%;
  opacity: 0;
}

.stream-1 {
  top: -50px;
  left: 20%;
  animation: converge-particle 3s ease-out 0.5s forwards;
}

.stream-2 {
  top: 50%;
  left: -50px;
  animation: converge-particle 3s ease-out 0.8s forwards;
}

.stream-3 {
  top: -30px;
  right: 30%;
  animation: converge-particle 3s ease-out 1.1s forwards;
}

.stream-4 {
  bottom: -40px;
  left: 60%;
  animation: converge-particle 3s ease-out 1.4s forwards;
}

.stream-5 {
  top: 30%;
  right: -40px;
  animation: converge-particle 3s ease-out 1.7s forwards;
}

.stream-6 {
  bottom: -20px;
  right: 20%;
  animation: converge-particle 3s ease-out 2s forwards;
}

/* Grille de matérialisation */
.materialization-grid {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
}

.grid-overlay {
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(90deg, transparent 98%, rgba(97, 218, 251, 0.3) 100%),
    linear-gradient(0deg, transparent 98%, rgba(97, 218, 251, 0.3) 100%);
  background-size: 20px 20px;
  opacity: 0;
  animation: grid-materialize 2s ease-out 2.5s forwards;
}

/* Image principale */
.materializing-image {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 3;
  overflow: hidden;
  border-radius: 16px;
  box-shadow:
    0 0 30px rgba(97, 218, 251, 0.4),
    0 0 60px rgba(0, 201, 255, 0.2);
}

.materializing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(1.1) contrast(1.2) saturate(1.1);
  display: block;
  opacity: 0;
  transform: scale(0.8);
  animation: materialize-image 2s ease-out 2.2s forwards;
}

.energy-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, 
    rgba(97, 218, 251, 0.3) 0%, 
    transparent 50%);
  opacity: 0;
  animation: energy-pulse 1.5s ease-out 2s forwards;
}

/* Effets énergétiques */
.energy-field {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 4;
  pointer-events: none;
}

.energy-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(97, 218, 251, 0.6);
  border-radius: 16px;
  opacity: 0;
  transform: scale(0.8);
  animation: pulse-expand 1s ease-out 3.2s forwards;
}

.scan-line {
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(97, 218, 251, 0.8), 
    transparent);
  top: 0;
  opacity: 0;
  animation: scan-sweep 2s linear 2.5s forwards;
}

/* === Materialization Animations === */
@keyframes converge-particle {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  70% {
    opacity: 1;
    transform: scale(1.5) translate(var(--target-x, 0), var(--target-y, 0));
  }
  100% {
    opacity: 0;
    transform: scale(0.2) translate(calc(50vw - 50%), calc(50vh - 50%));
  }
}

@keyframes grid-materialize {
  0% {
    opacity: 0;
    transform: scale(1.2);
  }
  50% {
    opacity: 0.8;
    transform: scale(1);
  }
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
}

@keyframes materialize-image {
  0% {
    opacity: 0;
    transform: scale(0.9);
    filter: brightness(1.8) blur(8px) saturate(1.6);
  }
  20% {
    opacity: 0.2;
    transform: scale(0.95);
    filter: brightness(1.6) blur(6px) saturate(1.4);
  }
  40% {
    opacity: 0.5;
    transform: scale(0.98);
    filter: brightness(1.4) blur(4px) saturate(1.3);
  }
  60% {
    opacity: 0.7;
    transform: scale(1);
    filter: brightness(1.25) blur(2px) saturate(1.2);
  }
  80% {
    opacity: 0.9;
    transform: scale(1);
    filter: brightness(1.15) blur(0.5px) saturate(1.15);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1.1) contrast(1.2) saturate(1.1) blur(0px);
  }
}

@keyframes energy-pulse {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
  100% {
    opacity: 0.2;
    transform: scale(1);
  }
}

@keyframes pulse-expand {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  30% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

@keyframes scan-sweep {
  0% {
    opacity: 1;
    top: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    top: 100%;
  }
}

/* ============== TIMELINE BACKGROUND SECTION ============== */

.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 3em;
  text-align: center;
  margin: 0 0 60px 0;
  padding-top: 20px; /* Espace au-dessus du titre */
  background: linear-gradient(135deg, #61dafb, #2779a7);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(97, 218, 251, 0.3);
}

.timeline-container {
  position: relative;
  max-width: min(1200px, 95vw);
  margin: 0 auto;
  padding: clamp(20px, 5vw, 40px) 0;
  width: 100%;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  .timeline-container {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
}

/* Ligne centrale de la timeline */
.timeline-line {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  width: 4px;
  background: #333; /* Fallback - remplacé automatiquement par JavaScript */
  border-radius: 2px;
  z-index: 1;
  box-shadow: 0 0 20px rgba(97, 218, 251, 0.4);
}

/* Blocs de la timeline (Formation + Expériences associées) */
.timeline-block {
  display: flex;
  align-items: flex-start;
  margin-bottom: 100px;
  position: relative;
  width: 100%;
}

/* Formation (côté gauche) */
.education-item {
  flex: 0 0 calc(50% - 20px);
  margin-right: 20px;
  position: relative;
}

.education-item .timeline-content {
  text-align: right;
  min-height: auto; /* Hauteur normale */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 40px;
  width: 100%;
  max-width: none;
  /* Suppression de la bordure gauche et du dégradé de débordement */
  overflow: visible; /* Pour permettre aux marqueurs d'être visibles */
}

.education-item .timeline-marker {
  position: absolute;
  right: -14px; /* Côté droit de la carte formation */
  top: 40px;
  left: auto;
  z-index: 150;
}

/* Expériences (côté droit) */
.timeline-experiences {
  flex: 0 0 calc(50% - 20px);
  margin-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  position: relative;
}

.experience-item {
  position: relative;
}

.experience-item .timeline-content {
  text-align: left;
  width: 100%;
  max-width: none;
  padding: 30px;
  border: 1px solid rgba(97, 218, 251, 0.2); /* Bordure bleue cohérente */
}

.experience-item .timeline-content:hover {
  border-color: rgba(97, 218, 251, 0.4);
}

.experience-item .timeline-marker {
  position: absolute;
  left: -14px; /* Côté gauche de la carte expérience */
  top: 40px; /* Aligné avec les marqueurs de formation */
  z-index: 150;
}

/* Items de la timeline */
.timeline-item {
  position: relative;
  margin-bottom: 60px;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease;
}

/* Styles pour contenus des formations */
.formation-1-item .timeline-content {
  border: 1px solid rgba(97, 218, 251, 0.2);
}
.formation-1-item .timeline-content:hover {
  border-color: rgba(97, 218, 251, 0.4);
}
.formation-1-item .institution, .formation-1-item .timeline-date {
  color: #61dafb;
}

.formation-2-item .timeline-content {
  border: 1px solid rgba(156, 39, 176, 0.2);
}
.formation-2-item .timeline-content:hover {
  border-color: rgba(156, 39, 176, 0.4);
}
.formation-2-item .institution, .formation-2-item .timeline-date {
  color: #9c27b0;
}

.formation-3-item .timeline-content {
  border: 1px solid rgba(255, 107, 107, 0.2);
}
.formation-3-item .timeline-content:hover {
  border-color: rgba(255, 107, 107, 0.4);
}
.formation-3-item .institution, .formation-3-item .timeline-date {
  color: #ff6b6b;
}

.formation-4-item .timeline-content {
  border: 1px solid rgba(255, 152, 0, 0.2);
}
.formation-4-item .timeline-content:hover {
  border-color: rgba(255, 152, 0, 0.4);
}
.formation-4-item .institution, .formation-4-item .timeline-date {
  color: #ff9800;
}

.formation-5-item .timeline-content {
  border: 1px solid rgba(76, 175, 80, 0.2);
}
.formation-5-item .timeline-content:hover {
  border-color: rgba(76, 175, 80, 0.4);
}
.formation-5-item .institution, .formation-5-item .timeline-date {
  color: #4caf50;
}

/* Marqueurs de la timeline */
.timeline-marker {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 4px solid #0d0d0d;
  z-index: 100; /* Z-index élevé pour passer devant la ligne */
  transition: all 0.2s ease-out;
}

/* Couleurs automatiques pour les formations */
.timeline-marker.formation-1 {
  background: linear-gradient(135deg, #61dafb, #2779a7);
  box-shadow: 0 0 20px rgba(97, 218, 251, 0.6);
}

.timeline-marker.formation-2 {
  background: linear-gradient(135deg, #9c27b0, #673ab7);
  box-shadow: 0 0 20px rgba(156, 39, 176, 0.6);
}

.timeline-marker.formation-3 {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.6);
}

.timeline-marker.formation-4 {
  background: linear-gradient(135deg, #ff9800, #f57c00);
  box-shadow: 0 0 20px rgba(255, 152, 0, 0.6);
}

.timeline-marker.formation-5 {
  background: linear-gradient(135deg, #4caf50, #388e3c);
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
}

.timeline-marker.bac {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.6);
}

.timeline-marker.work {
  background: linear-gradient(135deg, #9c27b0, #673ab7);
  box-shadow: 0 0 20px rgba(156, 39, 176, 0.6);
}

.timeline-marker.project {
  background: linear-gradient(135deg, #ff9800, #f57c00);
  box-shadow: 0 0 20px rgba(255, 152, 0, 0.6);
}

.timeline-item:hover .timeline-marker {
  transform: scale(1.3);
}

/* Hover effects pour les formations */
.timeline-item:hover .timeline-marker.formation-1 {
  box-shadow: 0 0 30px rgba(97, 218, 251, 0.8);
}

.timeline-item:hover .timeline-marker.formation-2 {
  box-shadow: 0 0 30px rgba(156, 39, 176, 0.8);
}

.timeline-item:hover .timeline-marker.formation-3 {
  box-shadow: 0 0 30px rgba(255, 107, 107, 0.8);
}

.timeline-item:hover .timeline-marker.formation-4 {
  box-shadow: 0 0 30px rgba(255, 152, 0, 0.8);
}

.timeline-item:hover .timeline-marker.formation-5 {
  box-shadow: 0 0 30px rgba(76, 175, 80, 0.8);
}

.timeline-item:hover .timeline-marker.bac {
  box-shadow: 0 0 30px rgba(255, 107, 107, 0.8);
}

.timeline-item:hover .timeline-marker.work {
  box-shadow: 0 0 30px rgba(156, 39, 176, 0.8);
}

.timeline-item:hover .timeline-marker.project {
  box-shadow: 0 0 30px rgba(255, 152, 0, 0.8);
}

/* Contenu des items */
.timeline-content {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(97, 218, 251, 0.2);
  border-radius: 20px;
  position: relative;
  transition: all 0.2s ease-out;
  /* Effet de flou disponible immédiatement */
  will-change: transform, border-color, box-shadow;
}

.timeline-content:hover {
  transform: translateY(-5px);
  border-color: rgba(97, 218, 251, 0.4);
  box-shadow: 0 20px 40px rgba(97, 218, 251, 0.1);
}


/* Flèches pointant vers le centre - supprimées pour plus de clarté */

/* Contenu textuel */
.timeline-date {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9em;
  color: #61dafb;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.timeline-content h4 {
  font-size: 1.4em;
  color: #f0f0f0;
  margin-bottom: 8px;
  font-weight: 700;
}

.institution {
  font-size: 1.1em;
  color: #61dafb;
  font-weight: 600;
  margin-bottom: 15px;
  font-style: italic;
}

.timeline-content p {
  color: #ccc;
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: 1em;
}

/* Indicateur de durée pour les formations */
.duration-indicator {
  margin: 15px 0;
  padding: 10px 0;
}

.duration-bar {
  width: 100%;
  height: 6px;
  background: rgba(97, 218, 251, 0.2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
  position: relative;
}

.duration-progress {
  height: 100%;
  background: linear-gradient(90deg, #61dafb, #2779a7);
  border-radius: 3px;
  transition: width 2s ease;
  position: relative;
  overflow: hidden;
}

.duration-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: -20%;
  width: 20%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  animation: progress-shine 3s infinite ease-in-out;
}

@keyframes progress-shine {
  0% { transform: translateX(0); }
  50% { transform: translateX(600%); } /* Traverse la barre */
  100% { transform: translateX(0); } /* Retour fluide */
}

.duration-text {
  font-size: 0.85em;
  color: #61dafb;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Tags dans la timeline */
.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.education-item .timeline-tags {
  justify-content: flex-end;
}

.experience-item .timeline-tags {
  justify-content: flex-start;
}

/* Styles spécifiques pour le Baccalauréat (couleurs rouges) */
.bac-item {
  flex: 0 0 calc(50% - 20px);
  margin-right: 20px;
  position: relative;
}

.bac-item .timeline-content {
  text-align: right;
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 40px;
  width: 100%;
  max-width: none;
  overflow: visible; /* Pour permettre aux marqueurs d'être visibles */
  border: 1px solid rgba(255, 107, 107, 0.2); /* Rouge au lieu de bleu */
}

.bac-item .timeline-content:hover {
  border-color: rgba(255, 107, 107, 0.4);
}

.bac-item .timeline-marker {
  position: absolute;
  right: -14px;
  top: 40px;
  left: auto;
  z-index: 150;
}

.bac-item .timeline-tags {
  justify-content: flex-end;
}

.bac-item .institution {
  color: #ff6b6b; /* Rouge au lieu de bleu */
}

.bac-item .timeline-date {
  color: #ff6b6b; /* Rouge au lieu de bleu */
}

/* Styles spécifiques pour les projets (couleurs grises neutres) */
.project-item .timeline-content {
  text-align: left;
  width: 100%;
  max-width: none;
  padding: 30px;
  border: 1px solid rgba(200, 200, 200, 0.3); /* Bordure grise */
}

.project-item .timeline-content:hover {
  border-color: rgba(200, 200, 200, 0.5);
}

.project-item .timeline-marker {
  position: absolute;
  left: -12px;
  top: 40px;
}

.project-item .timeline-date {
  color: #bbb; /* Gris clair pour la date */
}

.project-item .institution {
  color: #999; /* Gris moyen pour l'institution */
}

.project-item .timeline-tags {
  justify-content: flex-start;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .timeline-line {
    left: 3vw;
  }
  
  .timeline-block {
    flex-direction: column;
    align-items: stretch;
  }
  
  .education-item,
  .bac-item {
    flex: none;
    margin-right: 0;
    margin-bottom: 40px;
  }
  
  .education-item .timeline-content,
  .bac-item .timeline-content {
    margin-left: clamp(7vw, 10vw, 12vw);
    margin-right: clamp(2.5vw, 3vw, 4vw);
    text-align: left;
    min-height: auto;
    border-left: none;
    background: rgba(255, 255, 255, 0.05);
  }
  
  .education-item .timeline-marker,
  .bac-item .timeline-marker {
    left: 3vw;
    right: auto;
  }
  
  .timeline-experiences {
    flex: none;
    margin-left: 0;
  }
  
  .experience-item .timeline-content,
  .project-item .timeline-content {
    margin-left: clamp(7vw, 10vw, 12vw);
    margin-right: clamp(2.5vw, 3vw, 4vw);
  }
  
  .experience-item .timeline-marker,
  .project-item .timeline-marker {
    left: 3vw;
  }
  
  .timeline-tags {
    justify-content: flex-start !important;
  }

  .education-item .timeline-content,
  .experience-item .timeline-content,
  .project-item .timeline-content,
  .bac-item .timeline-content {
    width: auto;            /* largeur = espace dispo - marges */
    box-sizing: border-box; /* safe */
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2.2em;
    margin-bottom: 40px;
  }
  
  .timeline-category {
    font-size: 1.6em;
    padding: 12px 20px;
  }
  
  #background {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  
  .timeline-line {
    left: 2vw;
  }
  
  .timeline-content {
    padding: 3vw;
    margin-left: 6vw;
    margin-right: 3vw;
    width: calc(100vw - 15vw);
    max-width: calc(100vw - 15vw);
    box-sizing: border-box;
    overflow-wrap: break-word;
  }
  
  .education-item .timeline-marker,
  .bac-item .timeline-marker,
  .experience-item .timeline-marker,
  .project-item .timeline-marker {
    left: 2vw;
  }
  
  .timeline-content h4 {
    font-size: 1.2em;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .timeline-content p {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .institution {
    font-size: 1em;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* === SKILLS ============================================ */

/* Wrapper : pile radar + liste en desktop (>900 px) */
.skills-wrapper{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:45px;
  min-height: clamp(600px, 80vh, 800px);
  overflow: hidden;
}

/* Tabs */
.skills-tabs{
  display:flex; flex-wrap:wrap; gap:clamp(8px, 2vw, 12px);
  margin-bottom:18px;
  justify-content: center; /* Centré globalement */
}
.skills-tabs .tab{
  padding: clamp(6px, 1.5vw, 8px) clamp(12px, 3vw, 16px);
  border:1px solid #61dafb;
  background:transparent;
  color:#61dafb;
  font:600 clamp(.8rem, 2.2vw, .9rem) "Orbitron",sans-serif;
  letter-spacing: clamp(0.5px, 0.2vw, 1px);
  cursor:pointer;
  transition:.25s;
  border-radius: 6px;
}
.skills-tabs .tab.active,
.skills-tabs .tab:hover{
  background:#61dafb;
  color:#000;
}

/* Radar canvas : plein largeurs, hauteur fixe pour laisser de l'air aux labels */
#skills-radar {
  width: 100%;         /* occupe toute la largeur du conteneur */
  height: clamp(400px, 70vw, 600px); /* hauteur responsive */
  display: block;      /* évite les petits décalages inline */

  /* anti “scroll interne” */
  overflow: hidden;
  contain: paint;              /* isole la peinture, évite des artefacts */
  overscroll-behavior: contain;/* iOS/Chrome mobile: pas de rebond/scroll */
}

/* Ajustements spécifiques mobile pour le radar */
@media (max-width: 768px) {
  #skills-radar {
    height: clamp(300px, 80vw, 450px);
  }
}

/* Cartes : grille responsive */
.skills-cards{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(min(260px, 85vw),1fr));
  gap:clamp(15px, 4vw, 26px);
  width:100%;
  max-width:min(1000px, 95vw);
}
.skill-card{
  background:rgba(255,255,255,.06);
  border:1px solid rgba(97,218,251,.25);
  border-radius:12px;
  padding:20px 24px;
  backdrop-filter:blur(6px);
  opacity: 1;
  transform: translateY(0);
  transition: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.skill-card:hover{ transform:translateY(-6px); box-shadow:0 0 18px rgba(97,218,251,.45); }
.skill-card h3{ 
  font-size: clamp(1.3rem, 3vw, 1.5rem); 
  margin-bottom: clamp(4px, 1vw, 6px); 
  font-weight: 600;
}

/* Masquage (JS) */
.skill-card.hidden{ display:none; }

/* --- Le petit cercle radial --- */
.skill-meter {
  --pct: 0%;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: conic-gradient(
    #61dafb var(--pct),
    rgba(255,255,255,0.1) 0
  );
  display: block;
  /* plus de texte à centrer… */
}

/* ==== Projets ==== */
.project-cards {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.project-card {
  display: flex;
  align-items: center;
  gap: 40px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(97, 218, 251, 0.2);
  border-radius: 20px;
  padding: 40px;
  padding-top: 80px;
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
}

.project-card:nth-child(even) {
  flex-direction: row-reverse;
}

.project-card:nth-child(even) .project-info {
  text-align: right;
}

.project-card:nth-child(even) .project-connection {
  justify-content: flex-end;
}

.project-card:nth-child(even) .project-tags {
  justify-content: flex-end;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(97, 218, 251, 0.4);
  box-shadow: 0 20px 40px rgba(97, 218, 251, 0.1);
}

.project-image {
  width: 55%;
  max-width: 500px;
  max-height: 350px;
  border-radius: 15px;
  object-fit: contain;
  box-shadow: 0 0 20px rgba(39, 121, 167, 0.4);
  cursor: zoom-in;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-image:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(97, 218, 251, 0.3);
}

.project-links {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 15px;
  z-index: 2;
}

.project-card:nth-child(even) .project-links {
  right: auto;
  left: 20px;
}

.project-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(97, 218, 251, 0.2);
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  transition: all 0.2s ease-out;
  cursor: pointer;
}

.project-link:hover {
  background: rgba(97, 218, 251, 0.2);
  border-color: rgba(97, 218, 251, 0.5);
  transform: scale(1.1);
}

.project-link.disabled {
  color: #666;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  cursor: not-allowed;
}

.project-link.disabled:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}


.project-info {
  flex: 1;
}

.project-info h3 {
  font-size: 2em;
  margin-bottom: 15px;
}

.project-info p {
  font-size: 1.1em;
  margin-bottom: 15px;
  color: #ccc;
}

.project-connection {
  margin-bottom: 20px;
  font-size: 0.95em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.connection-icon {
  color: #61dafb;
  flex-shrink: 0;
}

.connection-link {
  color: #61dafb;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease-out;
  cursor: pointer;
}

.connection-link:hover {
  color: #fff;
  border-bottom-color: #61dafb;
}

/* Animation de mise en valeur pour les éléments liés */
.highlight-element {
  background: rgba(97, 218, 251, 0.1) !important;
  position: relative;
}

.highlight-element .timeline-content::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: rgba(97, 218, 251, 0.2);
  border-radius: inherit;
  animation: highlightPulse 2s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
}

/* Pour les éléments sans .timeline-content */
.highlight-element:not(.timeline-item)::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: rgba(97, 218, 251, 0.2);
  border-radius: inherit;
  animation: highlightPulse 2s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
}

@keyframes highlightPulse {
  0%, 100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.5;
  }
}

/* ==== Modal ==== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(4px);
  background: rgba(0, 0, 0, 0.8);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.4s ease;
}

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

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease;
}

#close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2.2em;
  font-weight: bold;
  color: #fff;
  background: rgba(0, 0, 0, 0.65); /* fond sombre semi-transparent */
  border: none;
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s ease, transform 0.2s ease;
}

#close-modal:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: scale(1.1);
}

.carousel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  height: 100%;
  position: relative;
}

.carousel img {
  max-width: 80vw;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(39, 121, 167, 0.6);
}

/* Zones de clic gauche/droite */
.carousel::before,
.carousel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  z-index: 2;
}

.carousel::before {
  left: 0;
}

.carousel::after {
  right: 0;
}

/* Points d’indication de navigation */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.carousel-indicators span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #555;
  display: block;
  transition: background 0.3s;
  cursor: pointer;
}

.carousel-indicators .active {
  background: #2779a7;
}

.project-tags {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  font-size: 0.85em;
  padding: 5px 10px;
  border-radius: 20px;
  background: #444;
  color: white;
  font-weight: bold;
  text-transform: uppercase;
}

/* === Couleurs par techno === */
.tag.react {
  background-color: #61dafb;
  color: #000;
}

.tag.nodejs {
  background-color: #3c873a;
}

.tag.socketio {
  background-color: #010101;
}

.tag.python {
  background-color: #3673a5;
}

.tag.javascript {
  background-color: #f7df1e;
  color: #000;
}

.tag.typescript {
  background-color: #3178c6;
}

.tag.html {
  background-color: #e44d26;
}

.tag.css {
  background-color: #264de4;
}

.tag.java {
  background-color: #b07219;
}

.tag.php {
  background-color: #8892be;
}

/* === Nouvelles catégories de tags === */
.tag.field {
  background-color: #2e7d32;
  color: #fff;
}

.tag.degree {
  background-color: #1976d2;
  color: #fff;
}

.tag.rhythm {
  background-color: #7b1fa2;
  color: #fff;
}

.tag.language {
  background-color: #d32f2f;
  color: #fff;
}

.tag.domain {
  background-color: #ff5722;
  color: #fff;
}

.tag.interface {
  background-color: #795548;
  color: #fff;
}

/* Contact Section */
.contact-list {
  list-style: none;
  font-size: 1.2em;
}

.contact-list li a {
  color: #2779a7;
}

/* Verrou sans position:fixed (évite les jumps iOS) */
html.loading, body.loading {
  overflow: hidden !important;
  overscroll-behavior: none;   /* bloque le rubber-banding */
  touch-action: none;          /* bloque les gestures */
}

/* Preloader plein écran qui capte les events */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: #0d0d0d;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity .4s ease;
  pointer-events: auto; /* capte tous les clics/molette/touch */
}

html.menu-open, body.menu-open {
  overflow: hidden !important;
  overscroll-behavior: contain;
  touch-action: none;
}
#preloader.fade-out {
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  #preloader { transition: none; }
}


/* Conteneur du loader */
.loader {
  position: relative;
  width: clamp(60px, 15vw, 100px);
  height: clamp(60px, 15vw, 100px);
}

/* Anneaux concentriques */
.ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: clamp(2px, 0.5vw, 3px) solid transparent;
  border-radius: 50%;
  box-sizing: border-box;
}
.ring1 {
  border-top: clamp(2px, 0.5vw, 3px) solid #2779a7;
  animation: spin1 2s linear infinite;
}
.ring2 {
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  border-top: clamp(2px, 0.5vw, 3px) solid #f0f0f0;
  animation: spin2 2.5s linear reverse infinite;
}
.ring3 {
  width: 60%;
  height: 60%;
  top: 20%;
  left: 20%;
  border-top: clamp(2px, 0.5vw, 3px) solid #2779a7;
  animation: spin3 3s linear infinite;
}

/* Cercle central pulsant */
.pulse {
  position: absolute;
  top: 35%;
  left: 35%;
  width: 30%;
  height: 30%;
  background: #2779a7;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 clamp(10px, 3vw, 20px) rgba(39,121,167,0.8);
}

/* Texte avec effet glitch */
.loader-text {
  margin-top: clamp(15px, 4vw, 20px);
  color: #f0f0f0;
  font-family: 'Orbitron', sans-serif; /* Pour un look futuriste, pensez à intégrer Orbitron via Google Fonts */
  font-size: clamp(0.9em, 3vw, 1.2em);
  letter-spacing: clamp(1px, 0.4vw, 2px);
  animation: glitch 2s infinite;
  text-align: center;
}

/* Keyframes de rotation des anneaux */
@keyframes spin1 {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes spin2 {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}
@keyframes spin3 {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Keyframes de pulsation */
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

/* Mobile responsive adjustments for loader */
@media (max-width: 480px) {
  .loader {
    width: 80px;
    height: 80px;
  }
  
  .loader-text {
    font-size: 0.9em;
    letter-spacing: 1px;
    margin-top: 15px;
  }
}

@media (max-width: 320px) {
  .loader {
    width: 60px;
    height: 60px;
  }
  
  .loader-text {
    font-size: 0.8em;
    letter-spacing: 0.5px;
    margin-top: 12px;
  }
}

/* Home Section Layout - Modification */
#home .home-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  flex-wrap: wrap;
  gap: clamp(20px, 5vw, 40px);
  overflow: hidden;
}

#home .home-text {
  flex: 0 0 auto;
  min-width: 0;
  padding: clamp(10px, 3vw, 20px);
  max-width: 100%;
}

#home .home-text .welcome {
  font-size: clamp(3em, 12vw, 8em);
  line-height: 1.2;
  margin: 0;
  word-break: break-word;
}

#home .home-text .developer {
  font-size: clamp(1.2em, 4vw, 2em); /* Sera surchargé par JavaScript */
  margin: clamp(5px, 2vw, 10px) 0 0 0;
  min-height: clamp(2.4em, 8vw, 4em);
  display: flex;
  align-items: center;
  line-height: 1.2;
}

/* === STATUS BADGE === */
.status-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
  padding: 12px 20px;
  background: rgba(97, 218, 251, 0.05);
  border: 1px solid rgba(97, 218, 251, 0.2);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  animation: fadeInUp 1s ease-out 2s both;
  max-width: fit-content;
}

.status-indicator {
  width: 8px;
  height: 8px;
  background: #61dafb;
  border-radius: 50%;
  animation: pulse 2s infinite;
  box-shadow: 0 0 10px rgba(97, 218, 251, 0.5);
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2);
  }
}

.status-text {
  font-size: 0.9rem;
  color: rgba(240, 240, 240, 0.8);
  font-weight: 500;
}

.status-link {
  font-size: 0.85rem;
  color: #61dafb;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid rgba(97, 218, 251, 0.3);
  border-radius: 4px;
  transition: all 0.2s ease-out;
  background: rgba(97, 218, 251, 0.05);
}

.status-link:hover {
  background: rgba(97, 218, 251, 0.1);
  border-color: #61dafb;
  box-shadow: 0 2px 8px rgba(97, 218, 251, 0.2);
}

/* Responsive pour status badge */
@media (max-width: 768px) {
  .status-badge {
    margin-top: 20px;
    padding: 10px 16px;
    gap: 10px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .status-text {
    font-size: 0.85rem;
  }
  
  .status-link {
    font-size: 0.8rem;
    padding: 5px 10px;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* === RECOMMENDATIONS === */
#recommendations {
  padding: 120px 0;
  background: linear-gradient(135deg, rgba(97, 218, 251, 0.02) 0%, rgba(0, 201, 255, 0.01) 100%);
  position: relative;
}

/* Carousel de recommandations 3D moderne */
.recommendations-carousel {
  position: relative;
  width: min(1100px, 92vw);
  height: clamp(480px, 60vh, 620px);
  margin: 60px auto;
  perspective: 1400px;
}

/* Zones de clic invisibles */
.click-zone {
  position: absolute;
  top: 0;
  height: 100%;
  cursor: pointer;
  z-index: 10;
  /* Couleur transparente, mais visible pour debug si besoin */
  background: transparent;
}

.left-zone {
  left: 0;
  right: 60%; /* Zone de gauche : du bord gauche jusqu'à 60% de la largeur */
}

.right-zone {
  left: 60%; /* Zone de droite : de 60% jusqu'au bord droit */
  right: 0;
}

.recommendations-track {
  position: relative;
  height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
}

.recommendation-card {
  position: absolute;
  left: 50%;
  top: 0;
  width: clamp(280px, 42vw, 420px);
  height: auto;
  min-height: clamp(400px, 60vh, 480px);
  transform: translate(-50%, -50%);
  border-radius: 28px;
  padding: 28px 26px 28px;
  background: linear-gradient(180deg, rgba(4,16,24,.9), rgba(8,20,28,.88));
  box-shadow: 0 20px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(82,209,255,.18) inset;
  color: #dff6ff;
  transition: transform .55s cubic-bezier(.2,.8,.2,1), filter .45s ease, opacity .45s ease, box-shadow .45s ease;
  transform-style: preserve-3d;
  opacity: .35;
  filter: blur(1.5px) saturate(.9);
  user-select: none;
  display: flex;
  flex-direction: column;
}

.recommendation-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(82,209,255,.16), rgba(0,224,255,.05) 35%, transparent 70%);
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 18px rgba(82,209,255,.35));
}

.recommendation-card.active {
  opacity: 1;
  filter: none;
  box-shadow: 0 40px 120px rgba(0,0,0,.65), 0 0 0 1px rgba(82,209,255,.25) inset, 0 0 42px rgba(82,209,255,.12) inset;
}

.recommendation-header {
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.recommender-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  filter: contrast(1.02);
}

.recommendation-header::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.25), rgba(255,255,255,0) 60%),
              conic-gradient(from 0deg, rgba(82,209,255,.7), rgba(0,224,255,.4), rgba(82,209,255,.7));
  filter: blur(6px);
  opacity: .45;
  z-index: -1;
}

.recommender-name {
  font-weight: 800;
  font-size: clamp(20px, 2.6vw, 28px);
  text-align: center;
  letter-spacing: .3px;
  color: #7bd8ff;
  margin: 4px 0 0 0;
}

.recommender-title {
  font-weight: 700;
  opacity: .9;
  text-align: center;
  margin: 2px 0;
  color: #dff6ff;
  font-size: clamp(16px, 2.1vw, 22px);
}

.recommender-relation {
  font-weight: 500;
  color: #9ad0ecb0;
  text-align: center;
  margin: 2px 0 0;
  font-size: clamp(14px, 1.8vw, 18px);
}

.recommendation-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
}

.recommendation-text {
  max-width: 55ch;
  line-height: 1.65;
  font-size: clamp(14px, 1.6vw, 18px);
  color: #e8fbff;
  text-align: center;
  margin: 0;
  font-style: italic;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}




/* Responsive */
@media (max-width: 768px) {
  #recommendations {
    padding: 80px 0;
  }
  
  .recommendations-carousel {
    height: 450px;
    margin: 40px auto;
  }
  
  .recommendation-card {
    width: min(300px, 90vw);
    min-height: 420px;
    height: auto;
    margin-left: calc(-1 * min(150px, 45vw));
    margin-top: -210px;
    padding: 25px 20px 25px;
    top: 50%;
    transform: translate(-50%, -50%);
  }
  
  .recommender-photo {
    width: 80px;
    height: 80px;
  }
  
  .recommender-info h3 {
    font-size: 1.1rem;
  }
  
  .recommender-title {
    font-size: 1.1rem;
  }
  
  .recommender-relation {
    font-size: 1rem;
  }
  
  .recommendation-text {
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 0 5px;
  }
}

@media (max-width: 480px) {
  .recommendations-carousel {
    height: 380px;
  }
  
  .recommendation-card {
    width: 260px;
    height: 350px;
    margin-left: -130px;
    margin-top: -175px;
    padding: 20px 15px;
  }
  
  .recommendation-header {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
  }
  
  .recommendation-header::after {
    inset: -3px;
    filter: blur(4px);
    opacity: .4;
  }
  
  .recommender-name {
    margin-top: 2px;
  }
  
  .recommendation-text {
    font-size: 0.85rem;
    padding: 0;
  }
}

/* === PROJECTS CTA === */
.projects-cta {
  margin-top: 60px;
  padding: 40px 20px;
  background: linear-gradient(135deg, rgba(97, 218, 251, 0.08) 0%, rgba(0, 201, 255, 0.05) 100%);
  border-radius: 16px;
  border: 1px solid rgba(97, 218, 251, 0.2);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.projects-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(97, 218, 251, 0.1), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.projects-cta-content {
  position: relative;
  z-index: 1;
}

.projects-cta-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 600;
  color: #61dafb;
  margin-bottom: 12px;
  line-height: 1.2;
}

.projects-cta-subtitle {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  color: rgba(240, 240, 240, 0.8);
  margin-bottom: 28px;
  line-height: 1.4;
}

.projects-cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.projects-cta-primary,
.projects-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease-out;
  border: 2px solid transparent;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
}

.projects-cta-primary {
  background: linear-gradient(135deg, #61dafb 0%, #00c9ff 100%);
  color: #0a0a0a;
  box-shadow: 0 4px 20px rgba(97, 218, 251, 0.3);
}

.projects-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(97, 218, 251, 0.4);
  background: linear-gradient(135deg, #00c9ff 0%, #61dafb 100%);
}

.projects-cta-secondary {
  background: rgba(97, 218, 251, 0.1);
  color: #61dafb;
  border-color: rgba(97, 218, 251, 0.4);
  backdrop-filter: blur(10px);
}

.projects-cta-secondary:hover {
  background: rgba(97, 218, 251, 0.2);
  border-color: #61dafb;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(97, 218, 251, 0.2);
}

.projects-cta-primary svg,
.projects-cta-secondary svg {
  transition: transform 0.3s ease;
}

.projects-cta-primary:hover svg,
.projects-cta-secondary:hover svg {
  transform: scale(1.1);
}

/* Responsive pour projects CTA */
@media (max-width: 768px) {
  .projects-cta {
    margin-top: 40px;
    padding: 30px 16px;
  }
  
  .projects-cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .projects-cta-primary,
  .projects-cta-secondary {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

#home .home-image {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 3vw, 20px);
  max-width: 100%;
}

#home .home-image .profile-photo {
  height: clamp(40vh, 60vw, 70vh);
  width: auto;
  max-width: 100%;
  object-fit: cover;
  border-radius: 20%;
  border: clamp(2px, 0.5vw, 3px) solid #2779a7;
}

/* Mobile layout for home section */
@media (max-width: 768px) {
  #home .home-content {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: clamp(15px, 5vw, 30px);
  }
  
  #home .home-text {
    order: 1;
    width: 100%;
    max-width: 100%;
    text-align: center; /* Force l'alignement centré sur mobile */
  }
  
  #home .home-text .developer {
    justify-content: center; /* Centrer le flex au lieu de text-align */
    width: 100%;
  }
  
  #home .home-image {
    order: 2;
    width: 100%;
    max-width: 100%;
  }
  
  #home .home-image .profile-photo {
    height: clamp(30vh, 50vw, 50vh);
  }
}

/* Container principal avec espace réservé pour le footer */
#main-container {
  padding-bottom: calc(var(--footer-h) + 24px);
}

/* Footer Styles */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--footer-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(15px, 5vw, 40px);
  z-index: 1000;
  
  /* glass‑morphism + néon (même style que navbar) */
  background: rgba(10, 10, 10, 0.45);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(39, 121, 167, 0.35);
  box-shadow: 0 0 15px rgba(39, 121, 167, 0.25);
}

.footer-icons {
  display: flex;
  gap: 20px;
}

.footer-icon {
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease;
}

.footer-icon:hover {
  transform: scale(1.1);
}

/* Style uniforme pour toutes les icônes footer au hover */
svg.footer-icon:hover path[stroke],
svg.footer-icon:hover polyline {
  stroke: #f0f0f0;
}

svg.footer-icon:hover path[fill="#61dafb"] {
  fill: #f0f0f0;
}

/* Style spécifique pour le SVG GitHub */
svg.footer-icon[fill="currentColor"] {
  color: #61dafb; /* Couleur de base bleu cyan */
}

svg.footer-icon[fill="currentColor"]:hover {
  color: #f0f0f0; /* Couleur blanche au hover pour le contraste */
}

/* Contact Section - Modern Grid Layout */
.contact-content {
  text-align: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin: 60px 0;
}


.contact-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(97, 218, 251, 0.2);
  border-radius: 20px;
  padding: 30px;
  transition: all 0.2s ease-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.contact-card:hover {
  transform: translateY(-5px);
  border-color: rgba(97, 218, 251, 0.4);
  box-shadow: 0 20px 40px rgba(97, 218, 251, 0.1);
}

.contact-card.primary {
  border-color: rgba(97, 218, 251, 0.4);
  background: rgba(97, 218, 251, 0.08);
}

.contact-icon {
  color: #61dafb;
  margin-bottom: 10px;
}

.contact-info h3 {
  font-size: 1.4em;
  margin: 0 0 8px 0;
  color: #f0f0f0;
}

.contact-info p {
  color: #ccc;
  margin: 0;
  font-size: 1em;
}

.contact-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95em;
  transition: all 0.2s ease-out;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #2779a7, #61dafb);
  color: #000;
  flex: 1;
  min-width: 140px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(97, 218, 251, 0.3);
}

.btn-secondary {
  background: rgba(97, 218, 251, 0.1);
  border: 1px solid rgba(97, 218, 251, 0.3);
  color: #61dafb;
  width: 90px; /* Largeur fixe pour éviter la variation */
  text-align: center;
}

.btn-secondary:hover {
  background: rgba(97, 218, 251, 0.2);
  border-color: #61dafb;
}


.availability,
.location {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ccc;
  font-size: 0.95em;
}

.contact-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.contact-link {
  color: #61dafb;
  transition: all 0.2s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(97, 218, 251, 0.1);
  border: 1px solid rgba(97, 218, 251, 0.2);
}

.contact-link:hover {
  background: rgba(97, 218, 251, 0.2);
  border-color: #61dafb;
  transform: translateY(-2px);
  color: #f0f0f0;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4caf50;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.6);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0%, 100% { 
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.6);
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.8);
    transform: scale(1.1);
  }
}

.location svg {
  color: #61dafb;
}

/* Responsive pour contact */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 40px 0;
  }
  
  .contact-card {
    padding: 25px 20px;
  }
  
  .contact-actions {
    flex-direction: column;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
    min-width: auto;
  }
  
  
  .contact-links {
    gap: 15px;
  }
}

/* Contact Form - Enhanced Layout (legacy) */
#contact form {
  display: flex;
  gap: 40px;
  /* Hauteur totale : ajustez cette valeur pour correspondre au cumul Prénom+Nom+Email+Téléphone */
  height: 500px;
}

/* Colonnes gauche & droite en flex vertical */
#contact .form-left,
#contact .form-right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

/* Groupe de champs (gauche) */
#contact .form-group {
  display: flex;
  flex-direction: column;
}

/* Labels */
#contact label {
  font-size: 1em;
  margin-bottom: 5px;
}

/* Styles communs inputs & textarea */
#contact input,
#contact textarea {
  padding: 10px;
  border: none;
  border-radius: 5px;
  font-size: 1.2em;
}

#contact textarea {
  font-size: 1.5em;
}

/* Focus effect */
#contact input:focus,
#contact textarea:focus {
  outline: none;
  box-shadow: 0 0 5px #2779a7;
}

/* Textarea “Message” : prend tout l’espace restant,
   on ajoute un espace de 20 px sous lui pour décoller le bouton */
#contact .form-right textarea {
  flex: 1;
  resize: none;   /* interdit le redimensionnement manuel */
  min-height: 0;  /* nécessaire pour que le flex‑shrink fonctionne */
  margin-bottom: 20px; /* --> espace entre Message et Envoyer */
}

/* Bouton full‑width dans la colonne droite
   même « hauteur visuelle » qu’un input (padding identique) */
#contact .form-right button {
  width: 100%;
  padding: 10px;            /* même padding que les inputs → même hauteur perçue */
  cursor: pointer;
  border: none;
  border-radius: 5px;
  background: #2779a7;
  color: #f0f0f0;
  font-size: 1.2em;
  transition: background 0.3s ease;
}

#contact .form-right button:hover {
  background: #1b5c7a;
}

/* Indicateurs obligatoire / optionnel */
.required {
  color: red;
}

.optional {
  font-size: 0.9em;
  color: #ccc;
}

/* Effet glitch (pour d’autres textes si besoin) */
@keyframes glitch {
  0%   { text-shadow: 2px 2px #2779a7,  -2px -2px #f0f0f0; }
  20%  { text-shadow: -2px 2px #2779a7,  2px -2px #f0f0f0; }
  40%  { text-shadow: 2px -2px #2779a7,  -2px 2px  #f0f0f0; }
  60%  { text-shadow: -2px -2px #2779a7, 2px 2px   #f0f0f0; }
  80%  { text-shadow: 2px 2px #2779a7,  -2px -2px #f0f0f0; }
  100% { text-shadow: -2px 2px #2779a7,  2px -2px  #f0f0f0; }
}

/* Lazy Loading Styles */
.lazy {
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.lazy-loaded {
  opacity: 1;
}

/* Animations d'entrée - Seulement pour les éléments qui le demandent */
.fade-in-element {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-element.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced Form Styles */
#contact .form-group {
  margin-bottom: 20px;
}

#contact input,
#contact textarea {
  border: 2px solid rgba(97, 218, 251, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: #f0f0f0;
  padding: 12px;
  border-radius: 8px;
}

#contact input:focus,
#contact textarea:focus {
  border-color: #61dafb;
  box-shadow: 0 0 10px rgba(97, 218, 251, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.error-message {
  color: #f44336;
  font-size: 0.85em;
  margin-top: 5px;
  min-height: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.error-message.show {
  opacity: 1;
}

.character-count {
  font-size: 0.85em;
  color: #999;
  margin-bottom: 10px;
  text-align: right;
}

.form-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#contact button {
  background: linear-gradient(135deg, #2779a7, #61dafb);
  color: #000;
  font-weight: 600;
  border-radius: 8px;
  padding: 12px;
}

#contact button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(97, 218, 251, 0.3);
}

.form-feedback {
  margin-top: 20px;
}

.success-message,
.error-message-global {
  padding: 15px;
  border-radius: 8px;
  font-weight: 600;
  display: none;
}

.success-message {
  background: rgba(76, 175, 80, 0.2);
  border: 1px solid #4caf50;
  color: #4caf50;
}

.error-message-global {
  background: rgba(244, 67, 54, 0.2);
  border: 1px solid #f44336;
  color: #f44336;
}

.success-message.show,
.error-message-global.show {
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  #contact form {
    flex-direction: column;
    height: auto;
  }
  #contact .form-left,
  #contact .form-right {
    justify-content: flex-start;
    gap: 20px;
  }
  #contact .form-right textarea {
    min-height: 200px;
    margin-bottom: 20px;
  }
  #contact .form-right button {
    padding: 15px;
  }
  
  /* Responsive projects */
  .project-cards {
    gap: 40px;
  }
  
  .project-card {
    flex-direction: column !important;
    padding: 70px 20px 30px 20px;
    gap: 30px;
  }
  
  .project-card:nth-child(even) {
    flex-direction: column !important;
  }
  
  .project-image {
    width: 100%;
    max-width: 450px;
    max-height: 280px;
    object-fit: contain;
    margin: 0 auto;
  }
  
  .project-links {
    top: 15px;
    right: 50% !important;
    left: auto !important;
    transform: translateX(50%);
    justify-content: center;
  }
  
  .project-card:nth-child(even) .project-links {
    right: 50% !important;
    left: auto !important;
    transform: translateX(50%);
  }
  
  .project-link {
    width: 50px;
    height: 50px;
  }
  
  .project-info {
    text-align: center !important;
  }
  
  .project-info h3 {
    font-size: 1.6em;
    margin-bottom: 10px;
  }
  
  .project-tags {
    justify-content: center !important;
  }
  
  .project-connection {
    justify-content: center !important;
    margin-bottom: 15px;
  }
}


/* === FIX Recommandations - mobile === */
@media (max-width: 768px) {

  /* 2) Conteneur carrousel : plein écran (avec marges de sécurité), pas de débordement */
  .recommendations-carousel {
    width: 100%;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    height: 420px; /* aligne la hauteur conteneur/carte */
    margin: 20px auto 0;
    overflow: visible; /* on laisse respirer les ombres */
  }

  /* 3) Cartes : suppression des marges négatives qui cassaient tout */
  .recommendation-card {
    width: min(320px, 90vw);
    height: 100%;               /* occupe la hauteur du conteneur */
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    margin-left: 0 !important;  /* override des règles existantes */
    margin-top: 0 !important;   /* override des règles existantes */
  }
}

/* Petits mobiles */
@media (max-width: 480px) {
  .recommendations-carousel { height: 360px; }
  .recommendation-card { width: min(300px, 92vw); }
}

/* === PERF FIX — Recommandations (anti-jank mobile & desktop) === */
.recommendations-carousel{
  overscroll-behavior: contain;   /* évite les rebonds */
  touch-action: pan-y;            /* le geste horizontal ne déclenche pas le scroll */
}

.recommendations-track{
  will-change: transform;
  contain: layout paint;          /* isole le layout/paint du track */
}

/* Mettez les cartes sur leur propre couche, évitez les repaints inutiles */
.recommendation-card{
  backface-visibility: hidden;
  will-change: transform, opacity;
  /* On évite d'animer filter/box-shadow (coûteux sur mobile) */
  transition: transform .38s cubic-bezier(.2,.8,.2,1), opacity .28s ease;
  filter: none !important;        /* on supprime le blur animé des cartes non actives */
}

/* L’overlay décoratif était en drop-shadow + blend-mode : on l’allège */
.recommendation-card::before{
  filter: none !important;        /* évite le drop-shadow filtré pendant l’anim */
}

/* L’ombre énorme animée est remplacée par une ombre plus légère (composite-friendly) */
.recommendation-card.active{
  box-shadow: 0 24px 60px rgba(0,0,0,.55),
              0 0 0 1px rgba(82,209,255,.25) inset;
}

/* Sur mobile : on « aplatit » la 3D et on neutralise les blend-modes coûteux */
@media (max-width: 768px){
  .recommendations-track{ transform-style: flat; } /* au lieu de preserve-3d en mouvement */
  .recommendation-card::before{ mix-blend-mode: normal; }
}

/* Hygiene interactions - Recommendations */
.recommendations-carousel,
.recommendations-track,
.recommendation-card{
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.recommendations-carousel{ touch-action: pan-y; } /* laisse le scroll vertical natif */