/* ============================================================
   base.css — Reset, layout, composants réutilisables
   ============================================================ */

@font-face {
  font-family: 'Angel Wish';
  src: url('../assets/Angel_wish.ttf') format('truetype');
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Courier New', monospace;
}

body {
  background-color: #000;
  color: #fff;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

/* --- Curseur custom ---------------------------------------- */

.custom-cursor {
  position: fixed;
  width: 40px;
  height: 40px;
  background: url('../assets/custom_cursor.png') no-repeat center / contain;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}

/* --- Fond & overlays --------------------------------------- */

.container {
  width: 100%;
  height: 100vh;
  position: relative;
}

#background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}

.glitch-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s;
}

#effect-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

/* --- Écran de démarrage ------------------------------------ */

#start-screen {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  cursor: pointer;
}

#start-text {
  font-size: 24px;
  color: #fff;
  text-align: center;
}

/* --- Carte profil ------------------------------------------ */

#profile-block,
#skills-block {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 820px;
  min-height: 332px;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 20px;
  border-radius: 15px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 15px;
  backdrop-filter: blur(10px);
  transform-style: preserve-3d;
  transition: transform 0.5s ease-out, opacity 0.5s;
}

#profile-block {
  opacity: 0; /* révélé après le start screen */
}

/* Photo de profil + orbite */

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.profile-container {
  position: relative;
  width: 150px;
  height: 150px;
  flex-shrink: 0;
}

.profile-container::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: radial-gradient(circle at 10px 10px, var(--primary-color, #00CED1) 10%, transparent 15%);
  animation: orbit 3s linear infinite;
  z-index: -1;
  filter: blur(1px);
}

.profile-container.fast-orbit::after {
  animation: fast-orbit 0.5s linear 4;
}

.profile-picture {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
}

/* Info profil */

.profile-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.name-and-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

#profile-name {
  font-family: 'Angel Wish', sans-serif;
  font-size: 32px;
  font-weight: bold;
  letter-spacing: 3px;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.7));
}

#profile-bio {
  color: rgba(255,255,255,0.8);
  font-size: 18px;
  line-height: 1.5;
}

/* Badges */

.badge-box {
  background: rgba(255,255,255,0.15);
  padding: 2px;
  border-radius: 15px;
  display: inline-block;
}

.badge-box-inner {
  background: rgba(0,0,0,0.5);
  padding: 5px;
  border-radius: 12px;
  display: flex;
  gap: 8px;
  box-shadow: inset 0 0 10px rgba(255,255,255,0.2);
}

.badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-container {
  position: relative;
}

.badge {
  width: 22px;
  height: 22px;
  transition: transform 0.3s;
  display: block;
}

.badge:hover { transform: scale(1.2); }

/* Tooltip générique */

.tooltip {
  visibility: hidden;
  width: 120px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  z-index: 100;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 12px;
  pointer-events: none;
}

.badge-container:hover .tooltip,
.visitor-counter:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

/* Séparateur */

.bio-separator {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.2);
  margin: 5px 0;
}

/* Footer : socials, boutons, sliders, compteur */

.profile-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.social-icon {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.7));
  transition: transform 0.3s ease;
  display: block;
}

.social-icon:hover { transform: scale(1.4) rotateY(15deg); }

/* Boutons de thème */

.controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  background: rgba(0,0,0,0.5);
  padding: 5px 10px;
  border-radius: 20px;
  backdrop-filter: blur(5px);
}

.theme-button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  transition: transform 0.3s, border-color 0.3s;
  user-select: none;
}

.theme-button:hover {
  transform: scale(1.1);
  border-color: rgba(255,255,255,0.8);
}

/* Sliders volume & transparence */

.top-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  background: rgba(0,0,0,0.5);
  padding: 8px 12px;
  border-radius: 20px;
  backdrop-filter: blur(5px);
}

.volume-control,
.transparency-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-icon,
.transparency-icon {
  width: 20px;
  height: 20px;
  color: white;
  flex-shrink: 0;
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 5px;
  border-radius: 5px;
  background: rgba(255,255,255,0.3);
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
}

/* Compteur de visites */

.visitor-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 14px;
  align-self: flex-start;
  position: relative;
  cursor: default;
}

.visitor-counter .tooltip {
  bottom: auto;
  top: -35px;
}

.visitor-icon {
  width: 18px;
  height: 18px;
  color: white;
  flex-shrink: 0;
}

/* --- Carte skills ------------------------------------------ */

.skills-title {
  text-align: center;
  font-size: 24px;
  margin-bottom: 10px;
}

.skill {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.skill-name {
  display: flex;
  justify-content: space-between;
}

.skill-bar-container {
  height: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 5px;
  overflow: hidden;
}

.skill-bar {
  height: 100%;
  border-radius: 5px;
  width: 0%;
}

/* --- Bouton résultats (haut de page) ----------------------- */

#results-button-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

#results-theme {
  background: rgba(0,0,0,0.7);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  backdrop-filter: blur(5px);
  transition: background 0.3s, border-color 0.3s;
}

#results-theme:hover {
  background: rgba(0,0,0,0.9);
  border-color: rgba(255,255,255,0.8);
}

#results-hint {
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(5px);
}

/* --- Animations -------------------------------------------- */

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

@keyframes fast-orbit {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes glitch {
  0%   { transform: translate(0); }
  20%  { transform: translate(-2px,  2px); }
  40%  { transform: translate(-2px, -2px); }
  60%  { transform: translate( 2px,  2px); }
  80%  { transform: translate( 2px, -2px); }
  100% { transform: translate(0); }
}

.glitch { animation: glitch 0.2s ease-in-out; }

/* --- Responsive mobile (≤ 430px) --------------------------- */

@media (max-width: 430px) {
  #profile-block,
  #skills-block {
    width: 90vw;
    max-width: 350px;
    min-height: 280px;
    padding: 15px;
  }

  .profile-header {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .profile-container,
  .profile-picture {
    width: 120px;
    height: 120px;
  }

  .profile-info { align-items: center; text-align: center; }

  .name-and-badges {
    flex-direction: column;
    align-items: center;
  }

  #profile-name { font-size: 24px; letter-spacing: 2px; }

  #profile-bio { font-size: 14px; }

  .badge-group { justify-content: center; }

  .badge { width: 18px; height: 18px; }

  .social-links { justify-content: center; }

  .social-icon { width: 32px; height: 32px; }

  .visitor-counter { font-size: 12px; align-self: center; }

  .slider { width: 60px; }

  .skills-title { font-size: 18px; }

  #start-text { font-size: 18px; padding: 0 20px; }

  #results-button-container { top: 10px; }
}
