
/* ====================================================
   CSS VARIABLES — Couleurs et valeurs globales du site
   ==================================================== */
:root {
  --bg: #030308;
  --surface: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.18);
  --text: #f0f0f5;
  --text-dim: #7a7a8c;
  --text-muted: #4a4a5a;
  --accent: #6c63ff;
  --accent2: #ff6584;
  --accent3: #43e8d8;
  --green: #22c55e;
  --yellow: #f59e0b;
  --red: #ef4444;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 12px;
  --dock-height: 72px;
  --menubar-height: 32px;
}

/* ====================================================
   RESET — Remise à zéro des styles navigateur
   ==================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--bg); }
body { font-family: var(--font-body); color: var(--text); user-select: none; cursor: default; -webkit-font-smoothing: antialiased; }
button { all: unset; cursor: pointer; }
input, textarea { font-family: var(--font-body); }

/* ====================================================
   SCROLLBAR — Style macOS pour les zones défilantes
   ==================================================== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* ====================================================
   ÉCRAN D'INTRO — Écriture manuscrite style iPhone "Hello"
   SVG stroke-dashoffset animé — Dancing Script 700
   ==================================================== */
#intro-screen {
  position: fixed; inset: 0;
  z-index: 9999;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  will-change: opacity;
}

/* Fond flou : le wallpaper Sequoia, agrandi pour cacher les bords du blur */
#intro-bg {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(28px) brightness(0.52) saturate(1.2);
  z-index: 0;
}
/* Voile sombre pour la lisibilité du texte blanc */
#intro-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}
#intro-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Conteneur principal */
#hello-outer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* SVG : responsif, débordement visible pour le halo */
#hello-svg {
  width: min(88vw, 860px);
  height: auto;
  overflow: visible;
}

/* Sous-titre — fade-in après l'écriture */
#hello-sub {
  font-family: var(--font-body);
  font-size: clamp(0.8rem, 2vw, 1.05rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
#hello-sub.visible {
  opacity: 1;
  transform: translateY(0);
}

/* CTA : discret pendant l'animation, pulse une fois terminé */
#hello-skip {
  bottom: 34px;
  font-family: var(--font-body);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.22);
  letter-spacing: 0.14em;
  pointer-events: none;
  opacity: 0;
  animation: skipFadeIn 0.8s ease 2.5s both;
}
@keyframes skipFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
/* Une fois l'animation d'écriture terminée : le texte change et pulse */
#hello-skip.ready {
  color: rgba(255, 255, 255, 0.55);
  animation: skipPulse 2s ease-in-out infinite;
}
@keyframes skipPulse {
  0%, 100% { opacity: 0.45; }
  50%       { opacity: 0.85; }
}

/* ====================================================
   BUREAU (DESKTOP) — Affiché après l'intro
   ==================================================== */
#desktop {
  position: fixed; inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0.9s ease;
  overflow: hidden;
}
#desktop.visible {
  opacity: 1;
  visibility: visible;
}

/* Fond d'écran du bureau — toujours cover pour les images 4K */
#wallpaper {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0a0a1a 0%, #0d1b3e 35%, #1a0a2e 65%, #0a1a1a 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* Pas de transition ici : le crossfade est géré par #wallpaper-ov en JS */
  z-index: 0;
}
/* Overlay de crossfade (créé dynamiquement par applyWallpaper) */
#wallpaper-ov {
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
#wallpaper::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 20%, rgba(108,99,255,0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 80%, rgba(67,232,216,0.06) 0%, transparent 50%);
  animation: ambientShift 8s ease-in-out infinite alternate;
  /* Couche GPU dédiée : l'animation opacity ne déclenche plus de recomposition parent */
  will-change: opacity;
  transform: translateZ(0);
}
@keyframes ambientShift {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

/* ====================================================
   MENUBAR — Barre de menus en haut (style macOS)
   ==================================================== */
#menubar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--menubar-height);
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  z-index: 1000;
  font-size: 13px;
  transition: opacity 0.22s ease;
}
/* Menubar cachée quand une fenêtre est en plein écran */
#desktop.has-fullscreen #menubar {
  opacity: 0;
  pointer-events: none;
}
.menubar-left {
  display: flex;
  align-items: center;
  gap: 4px;
}
#menubar-logo {
  height: 32px;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 4px;
  margin-right: 4px;
  flex-shrink: 0;
}
#menubar-logo img {
  width: 54px;
  height: 54px;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
  transform: translateY(4px);
  filter: invert(1) brightness(2) opacity(0.9);
}
.menubar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.75);
  font-size: 12px;
}
.menu-item {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 5px;
  transition: background 0.1s;
  color: rgba(255,255,255,0.85);
  position: relative;
}
.menu-item:hover, .menu-item.active {
  background: rgba(255,255,255,0.12);
}
.menu-item.bold { font-weight: 600; }

/* Dropdown menu */
.dropdown {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  min-width: 180px;
  background: rgba(28,28,35,0.97);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9px;
  padding: 5px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.7);
  display: none;
  z-index: 10000;
}
.menu-item:hover .dropdown, .menu-item.active .dropdown {
  display: block;
}
.dropdown-item {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  transition: background 0.1s;
  text-align: left;
}
.dropdown-item:hover {
  background: rgba(108,99,255,0.5);
  color: #fff;
}
.dropdown-sep {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 4px 5px;
}
#menubar-time {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

/* ====================================================
   ICÔNES DE BUREAU — Peuvent être déplacées au curseur
   ==================================================== */
#desktop-icons {
  position: absolute;
  inset: var(--menubar-height) 0 var(--dock-height) 0;
  z-index: 10;
  pointer-events: none; /* Les icônes elles-mêmes ont pointer-events:auto */
}
.desk-icon {
  position: absolute;
  width: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 6px;
  border-radius: 10px;
  cursor: default;
  pointer-events: auto;
  transition: background 0.1s;
  text-align: center;
}
.desk-icon:hover {
  background: rgba(255,255,255,0.05);
}
.desk-icon.selected {
  background: rgba(108,99,255,0.2);
  outline: 1px solid rgba(108,99,255,0.4);
}
.desk-icon .icon-img {
  width: 60px; height: 60px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.28);
  border: none;
  transition: transform 0.15s;
  overflow: hidden;
  position: relative;
}
/* Reflet style macOS */
.desk-icon .icon-img::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 48%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.28) 0%, transparent 100%);
  border-radius: 16px 16px 0 0;
  pointer-events: none;
}
.desk-icon:active .icon-img {
  transform: scale(0.92);
}
.desk-icon .icon-label {
  font-size: 11px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.8);
  line-height: 1.2;
  max-width: 70px;
  word-break: break-word;
}

/* ====================================================
   DOCK — Barre d'applications en bas (style macOS)
   ==================================================== */
#dock {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  display: flex;
  align-items: flex-end;
  gap: 7px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.12);
  z-index: 900;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s ease;
}
/* Dock caché vers le bas quand une fenêtre est en plein écran */
#desktop.has-fullscreen #dock {
  transform: translateX(-50%) translateY(calc(100% + 20px));
  opacity: 0;
  pointer-events: none;
}
.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
}
.dock-btn {
  width: 56px; height: 56px;
  border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.32);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  will-change: transform; /* GPU : crée un calque dédié → transform scale sans recomposition */
}
/* Reflet brillant style macOS en haut de l'icône */
.dock-btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 48%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.30) 0%, rgba(255,255,255,0.05) 100%);
  border-radius: 15px 15px 0 0;
  pointer-events: none;
  z-index: 1;
}
/* Effet de grossissement au survol */
.dock-btn:hover {
  transform: translateY(-12px) scale(1.42);
  box-shadow: 0 16px 40px rgba(0,0,0,0.55), 0 0 24px rgba(255,255,255,0.12), inset 0 1px 0 rgba(255,255,255,0.4);
  z-index: 1;
}
/* Propagation vers les voisins - JS gère ça */
.dock-btn .dock-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20,20,28,0.92);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 7px;
  padding: 4px 10px;
  font-size: 11px;
  white-space: nowrap;
  color: #e5e7eb;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.dock-btn:hover .dock-tooltip {
  opacity: 1;
}
/* Animation bounce au clic — style macOS */
@keyframes dockPulse {
  0%   { filter: brightness(1); }
  25%  { filter: brightness(0.75); }
  60%  { filter: brightness(1.18); }
  100% { filter: brightness(1); }
}
.dock-btn.clicked {
  animation: dockPulse 0.28s ease-out forwards;
}

/* Indicateur point = app ouverte */
.dock-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
  margin-top: 1px;
  opacity: 0;
  transition: opacity 0.2s;
}
.dock-dot.visible {
  opacity: 1;
}

/* ====================================================
   FENÊTRES — Composant de fenêtre macOS réutilisable
   ==================================================== */
.window {
  position: fixed;
  display: flex;
  flex-direction: column;
  background: rgba(14,14,22,0.98);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 0 0.5px rgba(255,255,255,0.05);
  overflow: hidden;
  will-change: transform; /* GPU : le drag (transform) ne redessine pas le reste de la page */
  contain: layout paint; /* isole le reflow/repaint de la fenêtre des autres éléments */
  transition: box-shadow 0.15s, border-color 0.15s;
  animation: windowOpen 0.25s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.window.focused {
  border-color: rgba(255,255,255,0.16);
  box-shadow: 0 30px 90px rgba(0,0,0,0.85), 0 0 0 0.5px rgba(255,255,255,0.08);
}
@keyframes windowOpen {
  from { transform: scale(0.88) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Barre de titre de la fenêtre */
.window-titlebar {
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.055) 0%, rgba(255,255,255,0.018) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
  cursor: default;
  gap: 10px;
}
.window-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.01em;
  pointer-events: none;
}

/* Feux tricolores (traffic lights) */
.traffic-lights {
  display: flex;
  gap: 7px;
}
.tl {
  width: 12px; height: 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: filter 0.1s, transform 0.1s;
  border: none;
  flex-shrink: 0;
}
.tl:hover { filter: brightness(1.3); transform: scale(1.1); }
.tl-close { background: #ff5f57; box-shadow: 0 0 4px rgba(255,95,87,0.4); }
.tl-min { background: #ffbd2e; box-shadow: 0 0 4px rgba(255,189,46,0.4); }
.tl-max { background: #28c840; box-shadow: 0 0 4px rgba(40,200,64,0.4); }

/* Zone de contenu de la fenêtre */
.window-body {
  flex: 1;
  overflow: auto;
  position: relative;
}

/* Fenêtre en plein écran — couvre tout l'écran, menubar cachée via JS */
.window.fullscreen {
  left: 0 !important;
  top: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0;
}
/* Conteneur de jeu en plein écran : centrage du canvas scalé */
.window.fullscreen #snake-container {
  justify-content: center;
  align-items: center;
  gap: 24px;
}
.window.fullscreen #tetris-container {
  justify-content: center;
  align-items: center;
}

/* ====================================================
   CONTENU DES FENÊTRES — Styles internes communs
   ==================================================== */
.win-content {
  height: 100%;
  overflow-y: auto;
  padding: 28px 32px;
  color: var(--text);
  font-family: var(--font-body);
}
/* ── Animations d'entrée au scroll (profil) ── */
.scroll-anim {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.scroll-anim.visible {
  opacity: 1;
  transform: translateY(0);
}

.win-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 14px;
}
.win-h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}
.win-p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-dim);
}

/* ====================================================
   FENÊTRE PROFIL — À propos de moi
   ==================================================== */
.profile-header {
  position: relative;
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 28px 32px 24px;
  background: linear-gradient(135deg, rgba(108,99,255,0.1) 0%, rgba(67,232,216,0.05) 100%);
  border-bottom: 1px solid var(--border);
}
.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  display: flex; align-items: center; justify-content: center;
  font-size: 38px;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.12), 0 0 0 4px rgba(108,99,255,0.35), 0 10px 32px rgba(108,99,255,0.45);
  border: none;
  overflow: hidden;
}

/* ====================================================
   FENÊTRE PROJETS — Grille des réalisations
   ==================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 20px 24px;
}
.project-card {
  border-radius: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255,255,255,0.03);
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.2s;
}
.project-card:hover {
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.project-card:hover::before { opacity: 1; }
.project-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  margin: 2px 2px 2px 0;
}

/* ====================================================
   FENÊTRE CONTACT — Formulaire et liens
   ==================================================== */
.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 10px;
  text-decoration: none;
  color: var(--text);
}
.contact-link:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.15);
  transform: translateX(4px);
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border 0.15s;
  margin-bottom: 12px;
  user-select: text;
}
.form-input:focus {
  border-color: rgba(108,99,255,0.5);
  background: rgba(108,99,255,0.06);
}
.btn-primary {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border: none;
  border-radius: 9px;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  box-shadow: 0 4px 20px rgba(108,99,255,0.35);
}
.btn-primary:hover { opacity: 0.92; }
.btn-primary:active { transform: scale(0.98); }

/* ====================================================
   FENÊTRE FOND D'ÉCRAN — Sélecteur de wallpaper
   ==================================================== */
.wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 20px;
}
.wallpaper-thumb {
  height: 90px;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.18s;
  position: relative;
  overflow: hidden;
  background-color: #1a1a2e; /* placeholder pendant le chargement */
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
.wallpaper-thumb:hover { transform: scale(1.03); }
.wallpaper-thumb.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.3);
}
.wallpaper-thumb .wp-check {
  position: absolute; top: 6px; right: 6px;
  width: 18px; height: 18px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.15s;
}
.wallpaper-thumb.active .wp-check { opacity: 1; }
.wallpaper-label {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 5px;
}

/* ====================================================
   FENÊTRE SNAKE — Jeu Snake classique
   ==================================================== */
#snake-board {
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 8px;
  display: block;
  box-shadow: 0 0 40px rgba(34,197,94,0.08);
}

/* ====================================================
   FENÊTRE MUSIQUE — Lecteur style Spotify
   ==================================================== */
.music-artwork {
  width: 160px; height: 160px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 64px;
  margin: 0 auto 20px;
  box-shadow: 0 16px 50px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.5s;
  flex-shrink: 0;
  will-change: transform; /* GPU : l'animation de rotation (artworkSpin) reste sur un calque dédié */
}
.music-artwork.playing {
  animation: artworkSpin 20s linear infinite;
}
@keyframes artworkSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  margin: 14px 0 6px;
}
.progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s linear;
  position: relative;
}
.progress-fill::after {
  content: '';
  position: absolute;
  right: -5px; top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.ctrl-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.1s, transform 0.1s;
  color: var(--text);
}
.ctrl-btn:hover { background: rgba(255,255,255,0.13); }
.ctrl-btn:active { transform: scale(0.9); }
.ctrl-play {
  width: 52px; height: 52px;
  font-size: 20px;
  border-radius: 50%;
  border: none;
}
.track-item {
  display: flex; align-items: center;
  gap: 12px; padding: 9px 12px;
  border-radius: 9px; cursor: pointer;
  transition: background 0.1s;
}
.track-item:hover { background: rgba(255,255,255,0.05); }
.track-item.active { background: rgba(108,99,255,0.15); border: 1px solid rgba(108,99,255,0.25); }

/* ====================================================
   FENÊTRE FINDER — Navigateur de fichiers
   ==================================================== */
.finder-sidebar {
  width: 170px;
  background: rgba(0,0,0,0.25);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 10px 0;
  flex-shrink: 0;
}
.finder-sidebar-section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 14px 3px;
}
.finder-sidebar-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px; font-size: 13px;
  color: var(--text-dim); cursor: pointer;
  border-radius: 6px; margin: 1px 4px;
  transition: all 0.1s;
}
.finder-sidebar-item:hover { background: rgba(255,255,255,0.05); }
.finder-sidebar-item.active { background: rgba(108,99,255,0.2); color: #c4b5fd; }
.finder-file {
  display: grid; grid-template-columns: 1fr 80px 110px;
  align-items: center;
  padding: 7px 14px; border-radius: 7px;
  font-size: 13px; cursor: pointer;
  transition: background 0.1s;
}
.finder-file:hover { background: rgba(255,255,255,0.04); }
.finder-file.selected { background: rgba(108,99,255,0.2); border: 1px solid rgba(108,99,255,0.3); }

/* ====================================================
   LECTEUR MUSIQUE FLOTTANT — Mini widget en bas à droite
   ==================================================== */
#mini-player {
  position: fixed;
  bottom: 90px;
  right: 20px;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  z-index: 899;
  cursor: pointer;
  transform: translateY(80px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
#mini-player.visible {
  transform: translateY(0);
  opacity: 1;
}
/* Désactiver backdrop-filter et pointer-events quand invisible */
#mini-player:not(.visible) {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
}
.mini-bars {
  display: flex; align-items: flex-end; gap: 2px; height: 16px;
}
.mini-bar {
  width: 2.5px;
  background: #a78bfa;
  border-radius: 2px;
  /* Pause par défaut — animé seulement quand le mini-player est visible */
  animation: barBounce 0.8s ease-in-out infinite;
  animation-play-state: paused;
}
#mini-player.visible .mini-bar {
  animation-play-state: running;
}
@keyframes barBounce {
  0%, 100% { height: 3px; }
  50% { height: 14px; }
}

/* ====================================================
   MENUBAR — Recherche Spotlight + sélecteur de langue
   ==================================================== */
#menubar-search {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  color: rgba(255,255,255,0.75);
  padding: 3px 5px;
  border-radius: 5px;
  transition: background 0.1s;
}
#menubar-search:hover { background: rgba(255,255,255,0.12); }
#lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 5px;
  transition: background 0.1s;
}
#lang-toggle:hover { background: rgba(255,255,255,0.12); }
#lang-toggle i { font-style: normal; color: rgba(255,255,255,0.3); }
#lang-toggle span { color: rgba(255,255,255,0.38); transition: color 0.15s; }
#lang-toggle span.active { color: #fff; }

/* ====================================================
   SPOTLIGHT — Recherche globale (Ctrl/Cmd+K)
   ==================================================== */
#spotlight {
  position: fixed; inset: 0;
  z-index: 5000;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(3px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}
#spotlight.open { display: flex; }
#spotlight-panel {
  width: min(620px, 92vw);
  max-height: 64vh;
  display: flex;
  flex-direction: column;
  background: rgba(24,24,32,0.97);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.8);
  overflow: hidden;
  animation: windowOpen 0.18s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.sp-inputrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
}
#sp-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 16px;
  font-family: var(--font-body);
  user-select: text;
}
#sp-input::placeholder { color: rgba(255,255,255,0.3); }
.sp-inputrow kbd {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: var(--font-body);
}
.sp-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sp-chips-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-right: 2px;
}
.sp-chip {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.12s;
}
.sp-chip:hover { border-color: rgba(255,255,255,0.3); color: #fff; }
.sp-chip.active {
  background: rgba(108,99,255,0.25);
  border-color: rgba(108,99,255,0.6);
  color: #c4b5fd;
}
#sp-results { flex: 1; overflow-y: auto; padding: 6px; }
.sp-section {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 8px 10px 4px;
}
.sp-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.08s;
}
.sp-row:hover, .sp-row.sel { background: rgba(108,99,255,0.18); }
.sp-row img {
  width: 36px; height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
}
.sp-emoji {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.sp-row-main { flex: 1; min-width: 0; }
.sp-row-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sp-row-sub { font-size: 11px; color: var(--text-dim); margin-top: 1px; }
.sp-row-tags { display: flex; gap: 4px; flex-shrink: 0; }
.sp-row-tags span {
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid;
  white-space: nowrap;
}
.sp-empty {
  text-align: center;
  padding: 28px;
  color: var(--text-muted);
  font-size: 13px;
}
.sp-foot {
  padding: 7px 16px;
  font-size: 10px;
  color: var(--text-muted);
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: right;
}

/* ====================================================
   PROJETS — Visuel hero et vignettes de galerie
   ==================================================== */
.proj-hero {
  flex: 0 0 auto;
  position: relative;
  max-height: 240px;
  overflow: hidden;
  cursor: zoom-in;
  background: rgba(0,0,0,0.4);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.proj-hero img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.3s ease;
}
.proj-hero:hover img { transform: scale(1.025); }
.proj-hero-zoom {
  position: absolute;
  bottom: 10px; right: 12px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.15s;
}
.proj-hero:hover .proj-hero-zoom { opacity: 1; }
.proj-thumb {
  width: 84px; height: 84px;
  border-radius: 9px;
  object-fit: cover;
  cursor: zoom-in;
  border: 1px solid rgba(255,255,255,0.12);
  transition: transform 0.15s, border-color 0.15s;
}
.proj-thumb:hover {
  transform: scale(1.05);
  border-color: rgba(255,255,255,0.35);
}

/* ====================================================
   APP PHOTOS — Galerie des créations
   ==================================================== */
.photos-grid {
  flex: 1;
  column-count: 3;
  column-gap: 10px;
  padding: 16px;
}
.photo-item {
  break-inside: avoid;
  margin: 0 0 10px;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}
.photo-item img {
  width: 100%;
  display: block;
  transition: transform 0.3s ease;
}
.photo-item:hover img { transform: scale(1.04); }
.photo-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px 10px 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  font-size: 11px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 1px;
  opacity: 0;
  transition: opacity 0.18s;
}
.photo-item:hover figcaption { opacity: 1; }

/* ====================================================
   LIGHTBOX — Visionneuse plein écran
   ==================================================== */
#lightbox {
  position: fixed; inset: 0;
  z-index: 6000;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 30px;
}
#lightbox.open { display: flex; }
#lightbox figure {
  max-width: calc(100% - 130px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0;
}
#lb-img {
  max-width: 100%;
  max-height: calc(100vh - 130px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.8);
}
#lb-cap {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  text-align: center;
}
#lb-close {
  position: absolute;
  top: 18px; right: 22px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.12s;
}
#lb-close:hover { background: rgba(255,255,255,0.22); }
.lb-nav {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s;
  padding-bottom: 4px;
}
.lb-nav:hover { background: rgba(255,255,255,0.2); }

/* ====================================================
   VERSION MOBILE — Page verticale simplifiée
   ==================================================== */
#mobile-view { display: none; }
body.is-mobile {
  overflow-y: auto;
  height: auto;
  background: linear-gradient(180deg, #0a0a14 0%, #10101e 50%, #0a0a14 100%);
}
body.is-mobile #intro-screen,
body.is-mobile #desktop,
body.is-mobile #mini-player { display: none !important; }
body.is-mobile #mobile-view {
  display: block;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 20px 30px;
}
.mb-header {
  text-align: center;
  padding: 52px 0 8px;
  position: relative;
}
.mb-lang {
  position: absolute;
  top: 14px; right: 0;
  display: flex;
  gap: 2px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  padding: 2px;
}
.mb-lang button {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--text-dim);
}
.mb-lang button.active {
  background: rgba(108,99,255,0.3);
  color: #fff;
}
.mb-photo {
  width: 108px; height: 108px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid rgba(108,99,255,0.5);
  box-shadow: 0 10px 40px rgba(108,99,255,0.35);
  margin-bottom: 14px;
}
.mb-header h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: #fff;
}
.mb-title { color: #a78bfa; font-size: 15px; margin-top: 4px; }
.mb-subtitle { color: var(--text-dim); font-size: 12px; margin-top: 3px; }
.mb-cta {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}
.mb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 10px;
  padding: 9px 16px;
  background: rgba(255,255,255,0.05);
}
.mb-btn-primary {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border: none;
  color: #fff;
  box-shadow: 0 6px 20px rgba(108,99,255,0.4);
}
.mb-section { padding: 26px 0 4px; }
.mb-section h2 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 14px;
}
.mb-about { font-size: 14px; line-height: 1.75; color: var(--text-dim); }
.mb-skills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
}
.mb-skill-name { font-size: 13px; font-weight: 600; color: #e5e7eb; }
.mb-skill-detail { font-size: 11px; color: #6b7280; margin-top: 2px; line-height: 1.4; }
.mb-exp {
  padding: 0 0 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mb-exp:last-child { border-bottom: none; }
.mb-exp-period { font-size: 11px; color: #6366f1; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.mb-badge {
  font-size: 9px;
  background: #6366f120;
  color: #818cf8;
  border: 1px solid #6366f140;
  border-radius: 4px;
  padding: 1px 6px;
}
.mb-exp-role { font-size: 14px; font-weight: 600; color: #e5e7eb; margin-top: 3px; }
.mb-exp-company { font-size: 12px; color: #a78bfa; font-weight: 500; margin-top: 1px; }
.mb-exp-desc { font-size: 12px; color: #9ca3af; line-height: 1.6; margin-top: 6px; }
.mb-cards { display: flex; flex-direction: column; gap: 16px; }
.mb-card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.03);
}
.mb-card-img {
  width: 100%;
  max-height: 210px;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.mb-card-body { padding: 14px 16px 16px; }
.mb-card-title { font-size: 15px; font-weight: 700; color: #fff; }
.mb-card-meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.mb-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.mb-card-tags span {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid;
}
.mb-card-desc { font-size: 12px; color: #9ca3af; line-height: 1.65; margin-top: 10px; }
.mb-card-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  text-decoration: none;
  border: 1px solid;
  border-radius: 8px;
  padding: 5px 12px;
}
.mb-video {
  position: relative;
  padding-top: 56.25%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  background: #000;
}
.mb-video iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.mb-video-cap { font-size: 11px; color: var(--text-dim); margin-top: 8px; text-align: center; }
.mb-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}
.mb-links a {
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 11px 14px;
  background: rgba(255,255,255,0.04);
}
.mb-footer {
  text-align: center;
  padding: 30px 0 10px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Confort tactile et petits écrans en mode bureau réduit */
@media (max-width: 820px) {
  .projects-grid { grid-template-columns: 1fr; }
  .photos-grid { column-count: 2; }
}

/* Respect des préférences d'animations réduites */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}

/* ====================================================
   UTILITAIRES — Classes helper réutilisables
   ==================================================== */
.hidden { display: none !important; }
.overflow-auto { overflow: auto; }
