/* --- ANIMATION DE DÉMARRAGE (BOOT SCREEN) --- */

/* Le conteneur principal du site est caché au début */
#main-container {
  opacity: 0;
  transform: scale(0.95); /* Légèrement dézoomé */
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
}

/* Quand le chargement est fini, on affiche le site */
#main-container.loaded {
  opacity: 1;
  transform: scale(1);
}

/* L'écran blanc de démarrage */
#boot-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* Toujours au-dessus de tout */
  transition:
    opacity 0.8s ease-out,
    visibility 0.8s;
}

/* Classe pour cacher l'écran de démarrage */
#boot-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none; /* Empêche de cliquer dessus une fois invisible */
}

/* Style du Logo Wii U (Temporaire en CSS) */
.boot-logo {
  font-family: sans-serif;
  font-size: 4rem;
  font-weight: bold;
  color: #8e8e8e; /* Gris Wii U */
  animation: logoPulse 2s infinite ease-in-out;
}
.boot-logo .wii {
  color: #555;
}
.boot-logo .u {
  color: #009bf0;
  margin-left: 2px;
  font-weight: 900;
  letter-spacing: -1px;
}

/* Animation subtile du logo pendant le chargement */
@keyframes logoPulse {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

/* Si tu es en mode sombre, l'écran de boot est noir */
@media (prefers-color-scheme: dark) {
  #boot-screen {
    background-color: #0f172a;
  }
  .boot-logo .wii {
    color: #ccc;
  }
}

:root {
  /* Variables Mode Clair (Wii U Default) */
  --wii-blue: #009bf0;
  --bg-color: #f0f2f5;
  --text-color: #000000;
  --card-bg: white;
  --card-border: white;
  --window-bg: white;
  --header-text: #1a1a1a;
  --bottom-bar-bg: #e2e8f0;
  --grid-bg-image: radial-gradient(#cbd5e1 1px, transparent 1px);
  --text-secondary: #475569;
}

/* Mode Sombre */
body.dark-mode {
  --wii-blue: #38bdf8;
  --bg-color: #0f172a;
  --text-color: #e2e8f0;
  --card-bg: #1e293b;
  --card-border: #334155;
  --window-bg: #1e293b;
  --header-text: #94a3b8;
  --bottom-bar-bg: #334155;
  --grid-bg-image: radial-gradient(#334155 1px, transparent 1px);
}

body.dark-mode .bio-box,
body.dark-mode .info-card,
body.dark-mode .project-card,
body.dark-mode .stage-card,
body.dark-mode .quantum-box,
body.dark-mode .contact-form,
body.dark-mode .setting-card {
  /* Plus clair et transparent pour le contraste en mode sombre */
  background: rgba(255, 255, 255, 0.05); 
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

body {
  margin: 0;
  background-color: var(--bg-color);
  background-image: var(--grid-bg-image);
  background-size: 20px 20px;
  font-family: sans-serif;
  overflow: hidden;
  height: 100vh;
  color: var(--text-color);
  transition:
    background-color 0.3s,
    color 0.3s;
  /* Wii Custom Cursors - Main Bleue (Défaut) */
  cursor: url('../asset/wii-cursor.cur'), auto;
}

/* Cursor pointer pour éléments cliquables - Main Blue CCW (Select) */
a, button, .wii-icon, .stage-card, .start-btn, .wii-menu-btn,
.setting-card, .glow-btn, .download-btn, .submit-btn, .open-sheet-btn,
.gh-edit-btn, .gh-repo-link, .skill,
[onclick], [data-action] {
  cursor: url('../asset/wii-pointer-blue-ccw.cur'), pointer;
}

/* Force specific fix for View Profile button */
.gh-edit-btn {
  cursor: url('../asset/wii-pointer-blue-ccw.cur'), pointer !important;
}

/* --- CLICK / ACTIVE (Main Fermée / Bouton B) --- */
body:active, *:active {
  cursor: url('../asset/wii-grab.cur'), grabbing !important;
}

/* Autres curseurs Wii */
.cursor-help, [data-tooltip], [title] {
  cursor: url('../asset/wii-help.cur'), help;
}
.cursor-wait, .loading, .is-loading {
  cursor: url('../asset/wii-loading-ring.ani'), wait;
}
.cursor-grab {
  cursor: url('../asset/wii-open.cur'), grab;
}
.cursor-grabbing, .app-window:active {
  cursor: url('../asset/wii-grab.cur'), grabbing;
}

.wiiu-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  justify-content: space-between;
}

/* --- TOP BAR --- */
.top-bar {
  display: flex;
  justify-content: space-between;
  padding: 15px 30px;
  font-weight: bold;
  color: var(--header-text);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  padding: 5px 15px 5px 5px;
  border-radius: 50px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mii-avatar {
  width: 35px;
  height: 35px;
  background: var(--wii-blue);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  overflow: hidden;
}

.mii-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- LA GRILLE D'APPS --- */
.grid-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  width: 100%;
  perspective: 1000px;
  transition: opacity 0.3s;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(
    5,
    1fr
  ); /* Passé à 5 colonnes pour tout faire rentrer */
  gap: 20px;
  padding: 20px;
  max-width: 1000px;
}

/* --- LES ICÔNES --- */
.wii-icon {
  width: 100px; /* Un peu plus petit pour en mettre plus */
  height: 100px;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  /* cursor pointer removed */
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  border: 4px solid var(--card-border);
}

.wii-icon:hover {
  transform: scale(1.1);
  border-color: var(--wii-blue);
  box-shadow: 0 0 15px rgba(0, 155, 240, 0.6);
  z-index: 10;
}

.gloss {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), transparent);
  border-radius: 16px 16px 100% 100% / 20px 20px 10px 10px;
  opacity: 0.5;
  pointer-events: none;
}

.icon-inner {
  margin-bottom: 5px;
  color: var(--app-color);
}

.app-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--header-text);
}

/* --- BOTTOM CURVE --- */
.bottom-curve {
  height: 80px;
  width: 90%;
  max-width: 1000px;
  background: var(--bottom-bar-bg);
  border-top-left-radius: 50% 100%;
  border-top-right-radius: 50% 100%;
  align-self: center;
  margin-bottom: -10px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.05);
  transition: opacity 0.3s;
}

.wii-menu-btn,
.start-btn {
  background: var(--card-bg);
  padding: 10px 30px;
  border-radius: 50px;
  font-weight: bold;
  color: var(--header-text);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.wii-menu-btn:hover,
.start-btn:hover {
  color: var(--wii-blue);
}

/* --- ANIMATIONS --- */
.hidden {
  display: none !important;
}

/* Animation "Lancement de Jeu" (Zoom infini) */
.game-launch-animation {
  animation: gameLaunch 1.5s cubic-bezier(0.7, 0, 0.3, 1) forwards;
  pointer-events: none;
}

@keyframes gameLaunch {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.5);
    filter: brightness(2);
  }
  100% {
    transform: scale(8);
    filter: brightness(100); /* Flash blanc total */
    opacity: 0;
  }
}

.zoom-exit {
  animation: zoomExit 0.5s forwards ease-in;
}
@keyframes zoomExit {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.fade-in-up {
  animation: fadeInUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- APP WINDOW --- */
.main-stage {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.app-window {
  width: 90%;
  max-width: 900px;
  height: 70vh;
  background: var(--window-bg);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
  color: var(--text-color);
}

/* --- APP HEADER (Layout centré absolu pour le titre) --- */
.app-header {
  height: 70px;
  color: white;
  display: flex;
  align-items: center;
  position: relative; /* Pour le centrage absolu du h1 */
  padding: 0 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: #1a1a1a;
  flex-shrink: 0;
  cursor: url('../asset/wii-move.cur'), move;
}

.app-header h1 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 1.5rem;
  /* Pas de cursor move sur le texte si on veut pas */
}

.back-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  /* Cursur "B" (Grab) pour le retour */
  cursor: url('../asset/wii-move.cur'), pointer !important;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: bold;
  font-size: 1rem;
  transition: background 0.2s;
  z-index: 10; /* Au-dessus du titre centré si chevauchement */
}
.back-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}

.app-body {
  padding: 40px;
  overflow-y: auto;
  color: var(--text-color);
  text-align: left;
  flex: 1;
}
.no-padding {
  padding: 0 !important;
}

/* ===========================================
   STYLE GÉNÉRAL CONTENU (Soft Glass Premium)
   (S'applique à tout le contenu sauf GitHub spécifique)
   =========================================== */

/* Titres de section — clean avec accent line */
h2 {
  font-size: 1.8rem;
  margin-bottom: 5px;
  color: var(--text-color);
  margin-top: 0;
  font-weight: 700;
  letter-spacing: -0.3px;
  text-align: center; /* Centrage du titre demandé */
}

h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--wii-blue);
  border-radius: 2px;
  margin: 8px auto 16px auto; /* Centrage explicite : top auto bottom auto */
  transition: width 0.3s ease;
}

/* Pas de ligne bleue dans GitHub */
.gh-profile-layout h2::after,
.gh-readme h3::after {
  display: none;
}

.subtitle {
  color: var(--header-text);
  font-size: 1.05rem;
  margin-bottom: 25px;
  font-weight: 400;
}

.text-secondary {
  color: var(--header-text);
}

/* Paragraphs dans le contenu */
.app-body p {
  line-height: 1.7;
  font-size: 0.95rem;
}

/* Cards / boxes — style unifié soft glass premium */
.bio-box,
.info-card,
.project-card,
.stage-card,
.quantum-box,
.contact-form,
.setting-card {
  background: rgba(255, 255, 255, 0.6); /* Plus lumineux en mode clair */
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px; /* Plus arrondi */
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  backdrop-filter: blur(12px) saturate(160%); /* Blur plus fort + saturation */
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.03),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5); /* Inner border subtile */
}

body.dark-mode .bio-box,
body.dark-mode .info-card,
body.dark-mode .project-card,
body.dark-mode .stage-card,
body.dark-mode .quantum-box,
body.dark-mode .contact-form,
body.dark-mode .setting-card {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.bio-box {
  padding: 20px;
  border-left: 4px solid #ea580c;
}

/* --- STAGES (INTERACTIF) --- */
.stage-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.stage-card {
  background: var(--card-bg);
  border: 1px solid var(--header-text);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
/* removed cursor pointer */
}

.stage-card:hover {
  transform: translateX(5px);
  border-color: #f59e0b;
}

.stage-header {
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(245, 158, 11, 0.1);
}

.stage-logo {
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.stage-info h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-color);
}
.stage-role {
  font-size: 0.9rem;
  color: #f59e0b;
  font-weight: bold;
}

.stage-details {
  padding: 0 15px;
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    padding 0.3s ease;
  background: var(--card-bg);
  font-size: 0.9rem;
  color: var(--header-text);
}

.stage-card.open .stage-details {
  padding: 15px;
  max-height: 200px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* --- VEILLE SPECIFIC --- */
.news-title {
  margin: 0;
  font-size: 1.1rem;
}
.news-title a {
  text-decoration: none;
  color: #8b5cf6; /* Keep primary color for titles */
  transition: opacity 0.2s;
}
.news-title a:hover {
  opacity: 0.8;
}
.news-meta {
  display: flex;
  gap: 15px;
  margin-top: 5px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.tag-quantum {
  font-weight: bold;
  opacity: 0.9;
}
.news-date {
  opacity: 0.7;
}

body.dark-mode .news-title a {
  color: #a78bfa; /* Lighter purple for dark mode */
}

/* --- GOOGLE SHEET EMBED --- */
.sheet-embed-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sheet-frame {
  width: 100%;
  height: 600px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: white;
}
.open-sheet-btn {
  align-self: flex-end;
  background: #107c41;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
}
.open-sheet-btn:hover {
  background: #0c5e31;
}

/* --- PROJETS --- */
.project-list {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.project-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--header-text);
}
.tags {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.tag {
  display: inline-block;
  background: rgba(0, 0, 0, 0.1);
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  margin-right: 5px;
  color: var(--header-text);
}

/* --- SKILLS (Soft Glass Style) --- */
.skill-container {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.skill-section {
  margin-bottom: 0;
}

.skill-section h3 {
  font-size: 0.8rem;
  color: var(--header-text);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.7;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* --- Chaque skill = pill glass soft --- */
.skill {
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--skill-color, #333);
  background: var(--skill-bg, rgba(0, 0, 0, 0.05));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  /* Force custom Wii cursor on skills */
  cursor: url('../asset/wii-pointer-blue-ccw.cur'), pointer;
  border: 1px solid var(--skill-border, rgba(0, 0, 0, 0.08));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  line-height: 1;
  overflow: hidden;
  /* Entrance staggerée + idle breathing enchaîné */
  animation:
    skillFadeIn 0.4s ease-out both,
    skillBreathe 4s ease-in-out infinite;
  animation-delay:
    calc(var(--i, 0) * 0.06s),
    calc(0.5s + var(--i, 0) * 0.3s);
  /* Micro-interaction : transition douce */
  transition:
    transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.3s ease,
    background 0.3s ease,
    border-color 0.3s ease;
}

/* Entrance animation */
@keyframes skillFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Idle : subtile respiration décalée par skill */
@keyframes skillBreathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* Shimmer effect — light sweep au hover */
.skill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: none;
  pointer-events: none;
}

/* Hover : lift très léger + glow subtil + shimmer sweep */
.skill:hover {
  /* On garde un micro-mouvement pour le feedback visuel mais pas "bouton" */
  transform: translateY(-1px); 
  animation-play-state: paused; /* pause le breathing pendant le hover */
  box-shadow:
    0 4px 12px var(--skill-glow, rgba(0, 0, 0, 0.08)),
    0 0 0 1px var(--skill-border-hover, rgba(0, 0, 0, 0.08));
  /* Pas de changement de fond drastique */
  border-color: var(--skill-border-hover, var(--skill-border));
}

.skill:hover::after {
  animation: shimmerSweep 0.8s ease-out;
}

@keyframes shimmerSweep {
  from { left: -100%; }
  to { left: 200%; }
}

/* Skills ne sont pas des boutons — pas de press/active */

/* Hover sur les catégories — highlight toute la section */
.skill-section:hover h3 {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.skill-section h3 {
  transition: opacity 0.3s ease;
}

/* --- COULEURS : chaque techno est définie par ses variables --- */

/* Design */
.skill.figma {
  --skill-bg: rgba(242, 78, 30, 0.1);
  --skill-bg-hover: rgba(242, 78, 30, 0.18);
  --skill-color: #e04417;
  --skill-border: rgba(242, 78, 30, 0.2);
  --skill-border-hover: rgba(242, 78, 30, 0.4);
  --skill-glow: rgba(242, 78, 30, 0.15);
}

/* Front-end */
.skill.html {
  --skill-bg: rgba(227, 76, 38, 0.1);
  --skill-bg-hover: rgba(227, 76, 38, 0.18);
  --skill-color: #c43e1e;
  --skill-border: rgba(227, 76, 38, 0.2);
  --skill-border-hover: rgba(227, 76, 38, 0.4);
  --skill-glow: rgba(227, 76, 38, 0.15);
}
.skill.css {
  --skill-bg: rgba(21, 101, 192, 0.1);
  --skill-bg-hover: rgba(21, 101, 192, 0.18);
  --skill-color: #1565c0;
  --skill-border: rgba(21, 101, 192, 0.2);
  --skill-border-hover: rgba(21, 101, 192, 0.4);
  --skill-glow: rgba(21, 101, 192, 0.15);
}
.skill.tailwind {
  --skill-bg: rgba(6, 182, 212, 0.1);
  --skill-bg-hover: rgba(6, 182, 212, 0.18);
  --skill-color: #0891b2;
  --skill-border: rgba(6, 182, 212, 0.2);
  --skill-border-hover: rgba(6, 182, 212, 0.4);
  --skill-glow: rgba(6, 182, 212, 0.15);
}
.skill.js {
  --skill-bg: rgba(247, 223, 30, 0.12);
  --skill-bg-hover: rgba(247, 223, 30, 0.22);
  --skill-color: #a16807;
  --skill-border: rgba(247, 223, 30, 0.25);
  --skill-border-hover: rgba(247, 223, 30, 0.5);
  --skill-glow: rgba(247, 223, 30, 0.15);
}
.skill.react {
  --skill-bg: rgba(97, 218, 251, 0.1);
  --skill-bg-hover: rgba(97, 218, 251, 0.18);
  --skill-color: #0e7490;
  --skill-border: rgba(97, 218, 251, 0.25);
  --skill-border-hover: rgba(97, 218, 251, 0.5);
  --skill-glow: rgba(97, 218, 251, 0.15);
}
.skill.nextjs {
  --skill-bg: rgba(0, 0, 0, 0.07);
  --skill-bg-hover: rgba(0, 0, 0, 0.12);
  --skill-color: #111;
  --skill-border: rgba(0, 0, 0, 0.15);
  --skill-border-hover: rgba(0, 0, 0, 0.3);
  --skill-glow: rgba(0, 0, 0, 0.08);
}

/* Back-end */
.skill.csharp {
  --skill-bg: rgba(123, 31, 162, 0.1);
  --skill-bg-hover: rgba(123, 31, 162, 0.18);
  --skill-color: #7b1fa2;
  --skill-border: rgba(123, 31, 162, 0.2);
  --skill-border-hover: rgba(123, 31, 162, 0.4);
  --skill-glow: rgba(123, 31, 162, 0.15);
}
.skill.dotnet {
  --skill-bg: rgba(81, 43, 212, 0.1);
  --skill-bg-hover: rgba(81, 43, 212, 0.18);
  --skill-color: #512bd4;
  --skill-border: rgba(81, 43, 212, 0.2);
  --skill-border-hover: rgba(81, 43, 212, 0.4);
  --skill-glow: rgba(81, 43, 212, 0.15);
}
.skill.winform {
  --skill-bg: rgba(29, 78, 216, 0.1);
  --skill-bg-hover: rgba(29, 78, 216, 0.18);
  --skill-color: #1d4ed8;
  --skill-border: rgba(29, 78, 216, 0.2);
  --skill-border-hover: rgba(29, 78, 216, 0.4);
  --skill-glow: rgba(29, 78, 216, 0.15);
}
.skill.php {
  --skill-bg: rgba(119, 123, 179, 0.1);
  --skill-bg-hover: rgba(119, 123, 179, 0.18);
  --skill-color: #4a5899;
  --skill-border: rgba(119, 123, 179, 0.2);
  --skill-border-hover: rgba(119, 123, 179, 0.4);
  --skill-glow: rgba(119, 123, 179, 0.15);
}
.skill.python {
  --skill-bg: rgba(55, 118, 171, 0.1);
  --skill-bg-hover: rgba(55, 118, 171, 0.18);
  --skill-color: #306998;
  --skill-border: rgba(55, 118, 171, 0.2);
  --skill-border-hover: rgba(55, 118, 171, 0.4);
  --skill-glow: rgba(55, 118, 171, 0.15);
}
.skill.java {
  --skill-bg: rgba(176, 46, 31, 0.1);
  --skill-bg-hover: rgba(176, 46, 31, 0.18);
  --skill-color: #b02e1f;
  --skill-border: rgba(176, 46, 31, 0.2);
  --skill-border-hover: rgba(176, 46, 31, 0.4);
  --skill-glow: rgba(176, 46, 31, 0.15);
}
.skill.node {
  --skill-bg: rgba(46, 125, 50, 0.1);
  --skill-bg-hover: rgba(46, 125, 50, 0.18);
  --skill-color: #2e7d32;
  --skill-border: rgba(46, 125, 50, 0.2);
  --skill-border-hover: rgba(46, 125, 50, 0.4);
  --skill-glow: rgba(46, 125, 50, 0.15);
}
.skill.sql {
  --skill-bg: rgba(13, 71, 161, 0.1);
  --skill-bg-hover: rgba(13, 71, 161, 0.18);
  --skill-color: #0d47a1;
  --skill-border: rgba(13, 71, 161, 0.2);
  --skill-border-hover: rgba(13, 71, 161, 0.4);
  --skill-glow: rgba(13, 71, 161, 0.15);
}
.skill.mariadb {
  --skill-bg: rgba(27, 94, 32, 0.1);
  --skill-bg-hover: rgba(27, 94, 32, 0.18);
  --skill-color: #1b5e20;
  --skill-border: rgba(27, 94, 32, 0.2);
  --skill-border-hover: rgba(27, 94, 32, 0.4);
  --skill-glow: rgba(27, 94, 32, 0.15);
}

/* DevOps */
.skill.docker {
  --skill-bg: rgba(3, 105, 161, 0.1);
  --skill-bg-hover: rgba(3, 105, 161, 0.18);
  --skill-color: #0369a1;
  --skill-border: rgba(3, 105, 161, 0.2);
  --skill-border-hover: rgba(3, 105, 161, 0.4);
  --skill-glow: rgba(3, 105, 161, 0.15);
}
.skill.git {
  --skill-bg: rgba(240, 80, 51, 0.1);
  --skill-bg-hover: rgba(240, 80, 51, 0.18);
  --skill-color: #e04417;
  --skill-border: rgba(240, 80, 51, 0.2);
  --skill-border-hover: rgba(240, 80, 51, 0.4);
  --skill-glow: rgba(240, 80, 51, 0.15);
}
.skill.linux {
  --skill-bg: rgba(247, 186, 8, 0.1);
  --skill-bg-hover: rgba(247, 186, 8, 0.18);
  --skill-color: #a16807;
  --skill-border: rgba(247, 186, 8, 0.2);
  --skill-border-hover: rgba(247, 186, 8, 0.4);
  --skill-glow: rgba(247, 186, 8, 0.15);
}
.skill.postman {
  --skill-bg: rgba(255, 108, 55, 0.1);
  --skill-bg-hover: rgba(255, 108, 55, 0.18);
  --skill-color: #e65100;
  --skill-border: rgba(255, 108, 55, 0.2);
  --skill-border-hover: rgba(255, 108, 55, 0.4);
  --skill-glow: rgba(255, 108, 55, 0.15);
}

/* Infra & Réseau */
.skill.vmware {
  --skill-bg: rgba(100, 116, 139, 0.1);
  --skill-bg-hover: rgba(100, 116, 139, 0.18);
  --skill-color: #475569;
  --skill-border: rgba(100, 116, 139, 0.2);
  --skill-border-hover: rgba(100, 116, 139, 0.4);
  --skill-glow: rgba(100, 116, 139, 0.15);
}
.skill.selfhost {
  --skill-bg: rgba(46, 125, 50, 0.1);
  --skill-bg-hover: rgba(46, 125, 50, 0.18);
  --skill-color: #2e7d32;
  --skill-border: rgba(46, 125, 50, 0.2);
  --skill-border-hover: rgba(46, 125, 50, 0.4);
  --skill-glow: rgba(46, 125, 50, 0.15);
}
.skill.ssh {
  --skill-bg: rgba(78, 52, 46, 0.1);
  --skill-bg-hover: rgba(78, 52, 46, 0.18);
  --skill-color: #4e342e;
  --skill-border: rgba(78, 52, 46, 0.2);
  --skill-border-hover: rgba(78, 52, 46, 0.4);
  --skill-glow: rgba(78, 52, 46, 0.15);
}
.skill.sysadmin {
  --skill-bg: rgba(55, 71, 79, 0.1);
  --skill-bg-hover: rgba(55, 71, 79, 0.18);
  --skill-color: #37474f;
  --skill-border: rgba(55, 71, 79, 0.2);
  --skill-border-hover: rgba(55, 71, 79, 0.4);
  --skill-glow: rgba(55, 71, 79, 0.15);
}
.skill.network {
  --skill-bg: rgba(0, 105, 92, 0.1);
  --skill-bg-hover: rgba(0, 105, 92, 0.18);
  --skill-color: #00695c;
  --skill-border: rgba(0, 105, 92, 0.2);
  --skill-border-hover: rgba(0, 105, 92, 0.4);
  --skill-glow: rgba(0, 105, 92, 0.15);
}

/* Soft Skills — pills un peu plus grandes, style distinct */
.skill.soft {
  padding: 10px 22px;
  font-size: 0.78rem;
  letter-spacing: 0.3px;
  border-style: dashed;
}
.skill.soft.gestion {
  --skill-bg: rgba(109, 40, 217, 0.08);
  --skill-bg-hover: rgba(109, 40, 217, 0.15);
  --skill-color: #6d28d9;
  --skill-border: rgba(109, 40, 217, 0.2);
  --skill-border-hover: rgba(109, 40, 217, 0.4);
  --skill-glow: rgba(109, 40, 217, 0.12);
}
.skill.soft.veille {
  --skill-bg: rgba(14, 116, 144, 0.08);
  --skill-bg-hover: rgba(14, 116, 144, 0.15);
  --skill-color: #0e7490;
  --skill-border: rgba(14, 116, 144, 0.2);
  --skill-border-hover: rgba(14, 116, 144, 0.4);
  --skill-glow: rgba(14, 116, 144, 0.12);
}
.skill.soft.problem {
  --skill-bg: rgba(217, 119, 6, 0.08);
  --skill-bg-hover: rgba(217, 119, 6, 0.15);
  --skill-color: #b45309;
  --skill-border: rgba(217, 119, 6, 0.2);
  --skill-border-hover: rgba(217, 119, 6, 0.4);
  --skill-glow: rgba(217, 119, 6, 0.12);
}

/* === DARK MODE === */
body.dark-mode .skill {
  --skill-bg: color-mix(in srgb, var(--skill-color, #999) 12%, transparent);
  --skill-bg-hover: color-mix(in srgb, var(--skill-color, #999) 20%, transparent);
  color: color-mix(in srgb, var(--skill-color, #ccc) 40%, #e2e8f0);
  border-color: color-mix(in srgb, var(--skill-color, #999) 20%, transparent);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}
body.dark-mode .skill:hover {
  box-shadow:
    0 6px 25px color-mix(in srgb, var(--skill-color, #999) 20%, transparent);
}
body.dark-mode .skill.nextjs {
  color: #e2e8f0;
  --skill-bg: rgba(255, 255, 255, 0.08);
  --skill-bg-hover: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.12);
}
body.dark-mode .skill.js,
body.dark-mode .skill.linux {
  color: #fde68a;
}
body.dark-mode .skill::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.12),
    transparent
  );
}
body.dark-mode .skill.soft {
  border-color: color-mix(in srgb, var(--skill-color, #999) 25%, transparent);
}

/* --- VEILLE --- */
.center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.quantum-box {
  background: #f3e8ff;
  padding: 30px;
  border-radius: 20px;
  margin-top: 20px;
  border: 2px solid #a855f7;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #333;
}
.spin-icon {
  animation: spin 10s linear infinite;
  color: #7e22ce;
  margin-bottom: 20px;
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* --- CV --- */
.cv-preview {
  width: 100%;
  height: 400px;
  border: none;
  border-radius: 8px;
  background: #f1f5f9;
  margin-bottom: 20px;
}
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #db2777;
  color: white;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 30px;
  font-weight: bold;
  transition: transform 0.2s;
}
.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(219, 39, 119, 0.4);
}

/* --- GITHUB PROFILE --- */
.gh-profile-layout {
  display: flex;
  height: 100%;
  background-color: var(--window-bg);
  color: var(--text-color);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
.gh-sidebar-profile {
  width: 280px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  border-right: 1px solid var(--header-text);
  opacity: 0.9;
}
.gh-avatar-large {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  border: 1px solid var(--header-text);
  overflow: hidden;
  margin-bottom: 10px;
}
.gh-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gh-names h1 {
  font-size: 1.5rem;
  color: var(--text-color);
  margin: 0;
  line-height: 1;
}
.gh-names span {
  font-size: 1.1rem;
  color: var(--header-text);
}
.gh-edit-btn {
  width: 100%;
  background: var(--bottom-bar-bg);
  border: 1px solid var(--header-text);
  color: var(--text-color);
  padding: 5px 16px;
  border-radius: 6px;
  font-weight: 500;
  cursor: default;
  text-align: center;
  margin-top: 10px;
}
.gh-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}
.gh-readme {
  border: 1px solid var(--header-text);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 20px;
  background: var(--card-bg);
}
.gh-pinned-title {
  font-size: 1rem;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}
.gh-pinned-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
}
.gh-repo-card {
  border: 1px solid var(--header-text);
  border-radius: 6px;
  padding: 16px;
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gh-repo-link {
  font-weight: bold;
  color: #58a6ff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}
.gh-repo-desc {
  font-size: 0.8rem;
  color: #8b949e;
}
.gh-lang-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* --- PROJETS (Premium Glass) --- */
.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  width: 100%;
}

.project-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 25px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--wii-blue);
  box-shadow: 0 15px 30px -10px rgba(0, 155, 240, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.project-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.2rem;
  color: var(--wii-blue);
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  color: var(--text-color);
  opacity: 0.9;
  flex: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tag {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.2s;
}

.tag:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--wii-blue);
  color: white;
  transform: translateY(-1px);
}

/* ========================================
   RESPONSIVE MOBILE — Tablettes
   ======================================== */
@media (max-width: 800px) {
  .gh-profile-layout {
    flex-direction: column;
  }
  .gh-sidebar-profile {
    width: 100%;
    align-items: center;
    text-align: center;
    border-right: none;
    border-bottom: 1px solid #30363d;
    padding: 15px;
  }
  .gh-avatar-large {
    width: 150px;
    height: 150px;
  }
  .app-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 15px;
    max-width: 100%;
  }
  .wii-icon {
    width: 85px;
    height: 85px;
    border-radius: 16px;
  }
  .app-body {
    padding: 25px;
  }
  .settings-grid {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  .gh-pinned-grid {
    grid-template-columns: 1fr !important;
  }
  .project-list {
    grid-template-columns: 1fr;
  }
  .sheet-frame {
    height: 400px;
  }
}

/* ========================================
   RESPONSIVE MOBILE — Smartphones
   ======================================== */
@media (max-width: 520px) {

  /* --- BODY & CONTAINER --- */
  body {
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    min-height: 100vh;
    background-size: 16px 16px;
  }

  .wiiu-container {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh; /* dynamic viewport height pour mobile */
  }

  /* --- TOP BAR --- */
  .top-bar {
    padding: 10px 15px;
    font-size: 0.85rem;
  }

  .user-badge {
    padding: 4px 12px 4px 4px;
    font-size: 0.85rem;
  }

  .user-badge span {
    font-size: 0.8rem;
  }

  .mii-avatar {
    width: 30px;
    height: 30px;
  }

  .clock {
    font-size: 0.85rem;
  }

  /* --- GRILLE D'APPS --- */
  .grid-wrapper {
    align-items: flex-start;
    padding-top: 10px;
  }

  .app-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px;
    padding: 10px 15px;
    max-width: 100%;
    justify-items: center;
  }

  .wii-icon {
    width: 75px;
    height: 75px;
    border-radius: 14px;
    border-width: 3px;
  }

  .wii-icon:hover {
    transform: none; /* Pas de scale au hover sur mobile */
  }

  .icon-inner svg {
    width: 22px;
    height: 22px;
  }

  .app-label {
    font-size: 0.65rem;
  }

  /* --- MAIN STAGE --- */
  .main-stage {
    overflow: visible;
    min-height: 0;
  }

  /* --- APP WINDOW (PLEIN ÉCRAN MOBILE) --- */
  .app-window {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 50px;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
  }

  .app-header {
    height: 55px;
    padding: 0 12px;
    border-radius: 16px 16px 0 0;
  }

  .app-header h1 {
    font-size: 1rem;
  }

  .back-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    gap: 4px;
  }

  .back-btn svg {
    width: 16px;
    height: 16px;
  }

  .app-body {
    padding: 20px 15px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
  }

  /* --- BOTTOM BAR --- */
  .bottom-curve {
    height: 55px;
    width: 95%;
    margin-bottom: -5px;
    border-top-left-radius: 40% 100%;
    border-top-right-radius: 40% 100%;
  }

  .start-btn,
  .wii-menu-btn {
    padding: 8px 20px;
    font-size: 0.85rem;
  }

  /* --- BOOT SCREEN --- */
  .boot-logo {
    font-size: 2.5rem;
  }

  /* --- CONTENU : PROFIL --- */
  h2 {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .bio-box {
    padding: 15px;
    font-size: 0.9rem;
  }

  /* Grille Formation / Objectifs en 1 colonne */
  .app-body > div[style*="grid-template-columns: 1fr 1fr"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  .info-card {
    padding: 12px;
  }

  /* --- CONTENU : GITHUB --- */
  .gh-profile-layout {
    flex-direction: column;
    height: auto;
  }

  .gh-sidebar-profile {
    width: 100% !important;
    padding: 15px !important;
    align-items: center;
    text-align: center;
    border-right: none;
    border-bottom: 1px solid #30363d;
  }

  .gh-avatar-large {
    width: 100px !important;
    height: 100px !important;
  }

  .gh-names {
    text-align: center !important;
  }

  .gh-names h1 {
    font-size: 1.2rem !important;
  }

  .gh-names span {
    font-size: 0.95rem !important;
  }

  .gh-edit-btn {
    max-width: 200px;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .gh-content {
    padding: 15px;
  }

  .gh-readme {
    padding: 15px;
    font-size: 0.85rem;
  }

  .gh-readme h3 {
    font-size: 1.1rem !important;
  }

  .gh-readme ul {
    font-size: 0.8rem;
    line-height: 1.6 !important;
  }

  .gh-pinned-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .gh-repo-card {
    padding: 12px;
  }

  .gh-repo-link {
    font-size: 0.85rem;
  }

  /* --- CONTENU : STAGES --- */
  .stage-header {
    padding: 12px;
    gap: 10px;
  }

  .stage-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }

  .stage-info h3 {
    font-size: 0.95rem;
  }

  .stage-role {
    font-size: 0.8rem;
  }

  .stage-details {
    font-size: 0.85rem;
  }

  .stage-card.open .stage-details {
    padding: 12px;
    max-height: 300px; /* Plus de place sur mobile car texte wrappé */
  }

  /* --- CONTENU : COMPÉTENCES --- */
  .skill-container {
    gap: 18px;
  }

  .skill-section {
    margin-bottom: 0;
  }

  .skills-grid {
    gap: 8px;
  }

  .skill {
    padding: 8px 14px;
    font-size: 0.72rem;
  }

  .skill {
    /* Pas de breathing sur mobile pour les perfs */
    animation: skillFadeIn 0.3s ease-out both;
    animation-delay: calc(var(--i, 0) * 0.04s);
  }

  .skill:hover {
    transform: none;
  }

  .skill.soft {
    padding: 8px 14px;
    font-size: 0.7rem;
  }

  /* --- CONTENU : SYNTHÈSE --- */
  .sheet-embed-container {
    gap: 8px;
  }

  .sheet-frame {
    height: 300px;
    border-radius: 6px;
  }

  .open-sheet-btn {
    font-size: 0.8rem;
    padding: 6px 12px;
    align-self: center;
  }

  /* --- CONTENU : PROJETS --- */
  .project-list {
    grid-template-columns: 1fr !important;
    gap: 15px;
  }

  .project-card {
    padding: 15px;
  }

  .project-card h3 {
    font-size: 1rem;
  }

  .tags {
    flex-wrap: wrap;
    gap: 6px;
  }

  .tag {
    font-size: 0.7rem;
    padding: 3px 8px;
  }

  /* --- CONTENU : VEILLE --- */
  .quantum-box {
    padding: 20px 15px;
    border-radius: 15px;
  }

  #veille-content {
    max-width: 100% !important;
  }

  /* --- CONTENU : CV --- */
  .cv-preview {
    height: 280px;
    margin-bottom: 15px;
  }

  .download-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  /* --- CONTENU : CONTACT --- */
  .social-glow-row {
    gap: 15px;
    margin-bottom: 15px;
  }

  .glow-btn {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .contact-form {
    padding: 15px;
    gap: 12px;
    border-radius: 12px;
  }

  .form-group input,
  .form-group textarea {
    padding: 10px;
    font-size: 0.9rem;
  }

  .submit-btn {
    padding: 10px;
    font-size: 0.9rem;
  }

  /* --- CONTENU : PARAMÈTRES --- */
  .settings-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .setting-card {
    padding: 20px 12px;
    gap: 10px;
  }

  .setting-label {
    font-size: 0.9rem;
  }

  /* --- ANIMATIONS — plus subtiles sur mobile --- */
  .zoom-exit {
    animation: zoomExitMobile 0.35s forwards ease-in;
  }
  @keyframes zoomExitMobile {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
  }
}

/* ========================================
   RESPONSIVE MOBILE — Très petits écrans
   ======================================== */
@media (max-width: 360px) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }

  .wii-icon {
    width: 70px;
    height: 70px;
  }

  .app-label {
    font-size: 0.6rem;
  }

  .top-bar {
    padding: 8px 10px;
  }

  .app-body {
    padding: 15px 12px;
  }

  .gh-avatar-large {
    width: 80px !important;
    height: 80px !important;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .boot-logo {
    font-size: 2rem;
  }
}

/* ========================================
   TOUCH-FRIENDLY — Active states pour mobile
   ======================================== */
@media (hover: none) and (pointer: coarse) {
  .wii-icon:active {
    transform: scale(0.95);
    border-color: var(--wii-blue);
    box-shadow: 0 0 12px rgba(0, 155, 240, 0.5);
  }

  .wii-icon:hover {
    transform: none;
    border-color: var(--card-border);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  .stage-card:hover {
    transform: none;
  }

  .stage-card:active {
    transform: translateX(3px);
    border-color: #f59e0b;
  }

  .glow-btn:active {
    transform: scale(0.92);
  }

  .setting-card:hover {
    transform: none;
  }

  .setting-card:active {
    transform: scale(0.97);
  }

  .back-btn:active {
    background: rgba(255, 255, 255, 0.4);
  }

  .start-btn:active,
  .wii-menu-btn:active {
    color: var(--wii-blue);
  }

  .download-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(219, 39, 119, 0.3);
  }
}

.gh-sidebar-profile {
  width: 250px;
  padding-right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.gh-avatar-large {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 1px solid #30363d;
  overflow: hidden;
  margin-bottom: 10px;
}

.gh-names h1 {
  line-height: 1;
  margin-bottom: 0;
}

/* --- FIX VISIBILITÉ DARK MODE (Cartes Profil & Stats) --- */
.info-card {
  background: rgba(0, 0, 0, 0.05); /* Gris très léger pour mode clair */
  padding: 15px;
  border-radius: 10px;
  transition:
    background 0.3s,
    color 0.3s;
}

body.dark-mode .info-card {
  /* On hérite du style glass unifié défini plus haut */
  color: #f1f5f9;
}

/* --- CONTACT DE FOU (Style Néon) --- */
.contact-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
}

.social-glow-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.glow-btn {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #1e293b;
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Effet de lueur spécifique par réseau */
.glow-btn.linkedin:hover {
  box-shadow: 0 0 20px #0077b5;
  border-color: #0077b5;
  background: #0077b5;
}
.glow-btn.github:hover {
  box-shadow: 0 0 20px #6e5494;
  border-color: #6e5494;
  background: #6e5494;
}
.glow-btn.email:hover {
  box-shadow: 0 0 20px #ea580c;
  border-color: #ea580c;
  background: #ea580c;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: var(--card-bg);
  padding: 20px;
  border-radius: 15px;
  border: 1px solid var(--header-text);
}

/* On laisse le style partagé s'appliquer pour le fond glass */
body.dark-mode .contact-form {
  border-color: rgba(255, 255, 255, 0.1);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  box-sizing: border-box; 
  transition: border-color 0.3s, background 0.3s;
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
  /* Plus clair et transparent pour le contraste */
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group textarea:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--wii-blue);
  outline: none;
}

body.dark-mode ::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.submit-btn {
  background: linear-gradient(45deg, #0ea5e9, #6366f1);
  border: none;
  padding: 12px;
  border-radius: 8px;
  color: white;
  font-weight: bold;
  font-size: 1rem;
  transition: opacity 0.2s;
}
.submit-btn:hover {
  opacity: 0.9;
}

/* --- FIX BOUTON CHARGEMENT --- */
.submit-btn {
  /* On ajoute flexbox pour centrer texte + icône */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px; /* Espace entre le texte et l'icône */
}

/* Animation du spinner */
.spin-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* --- APP PARAMÈTRES --- */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.setting-card {
  background: rgba(0, 0, 0, 0.05);
  border: 2px solid transparent;
  border-radius: 15px;
  padding: 30px 20px;
  text-align: center;
/* removed cursor pointer */
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.setting-card:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.setting-card.active {
  border-color: var(--wii-blue);
  background: rgba(0, 155, 240, 0.1);
}

body.dark-mode .setting-card {
  background: rgba(255, 255, 255, 0.05);
}
body.dark-mode .setting-card:hover {
  background: rgba(255, 255, 255, 0.1);
}

.setting-label {
  font-weight: bold;
  font-size: 1.1rem;
}

/* Force l'affichage correct des news injectées */
#app-body .stage-card {
  color: white !important;
  text-align: left;
}

#app-body .stage-card h3 a {
  color: #8b5cf6 !important; /* Couleur violette pour tes liens news */
  text-decoration: none;
}

#app-body .stage-role {
  display: block;
  margin-top: 5px;
  opacity: 0.8;
}
