:root {
  --bg: #020617;
  --text: #f9fafb;
  --muted: #9ca3af;

  --accent: #3a64ed;
  --accent-soft: rgba(58, 76, 237, 0.22);
  --accent-strong: #5565f7;

  --glass-bg: rgba(15, 23, 42, 0.45);
  --glass-border: rgba(148, 163, 184, 0.32);

  --radius-lg: 26px;
  --radius-md: 999px;
  --shadow-soft: 0 30px 90px rgba(0, 0, 0, 0.95);
  --blur: 26px;

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    Segoe UI, sans-serif;

  --stars-color: #e9d5ff;
}

/* Base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font-sans);
  background: radial-gradient(circle at top, var(--bg) 0, #000 55%, #000 100%);
  color: var(--text);
  overflow: hidden;
}

#stars-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.app {
  position: relative;
  z-index: 1;
  padding: 26px 24px 32px;
  width: 100%;
  max-width: 1120px;
}

/* Card profil unique */

.profile-card {
  border-radius: var(--radius-lg);
  background: linear-gradient(
      135deg,
      rgba(15, 23, 42, 0.64),
      rgba(15, 23, 42, 0.32)
    ),
    radial-gradient(circle at top left, rgba(148, 163, 184, 0.18), transparent 60%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  padding: 22px 30px 18px;
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  overflow: hidden;
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
    circle at 10% 0,
    rgba(255, 255, 255, 0.06),
    transparent 65%
  );
  opacity: 0.9;
  pointer-events: none;
}

/* Header */

.card-top {
  position: relative;
  display: grid;
  grid-template-columns: auto 1.2fr auto;
  column-gap: 26px;
  row-gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  z-index: 1;
}

.avatar-wrapper {
  width: 86px;
  height: 86px;
  border-radius: 26px;
  padding: 2px;
  background: radial-gradient(circle at top left, var(--accent-strong), #020617);
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  object-fit: cover;
}

.status-dot {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.9);
  border: 2px solid #020617;
}

.identity h1 {
  margin: 0;
  font-size: 1.7rem;
  letter-spacing: 0.06em;
}

.tagline {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag {
  font-size: 0.7rem;
  padding: 3px 9px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.9);
}

.top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.socials {
  display: flex;
  gap: 8px;
}

.social-btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e5e7eb;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
}

/* Tabs (Projets / Bio) */

.tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  margin-bottom: 14px;
  z-index: 1;
  position: relative;
}

.tab {
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #e5e7eb;
  font-size: 0.8rem;
  padding: 5px 14px;
  cursor: pointer;
}

.tab.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* Card content */

.card-content {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  padding: 14px;
  background: radial-gradient(
    circle at top,
    rgba(15, 23, 42, 0.94),
    rgba(15, 23, 42, 0.64)
  );
  min-height: 90px;
  z-index: 1;
}

.tab-panel {
  font-size: 0.9rem;
}

.hidden {
  display: none;
}

.placeholder {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
}

.badge-soft {
  border: 1px solid rgba(248, 113, 113, 0.75);
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
}

/* Footer */

.card-footer {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.4);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #6b7280;
}

/* Musique + mini section projets dans la card */

.music-section {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.32);
}

.music-section h2,
.projects-inline h2 {
  margin: 0 0 8px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.music-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) auto;
  gap: 10px;
  align-items: center;
}

.music-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.music-title {
  margin: 0;
  font-size: 0.9rem;
}

.music-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.music-btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 1);
  color: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.music-btn svg {
  width: 14px;
  height: 14px;
}


/* Player musique */

.music-player {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.volume-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f9fafb;
}

.volume-icon svg {
  width: 14px;
  height: 14px;
}

/* le slider reste caché hors hover */

.volume-wrapper {
  width: 0;
  opacity: 0;
  overflow: hidden;
  transition: width 160ms ease-out, opacity 160ms ease-out;
}

.music-player:hover .volume-wrapper {
  width: 110px;   /* barre plus longue, comme ton exemple */
  opacity: 1;
}

/* style du slider */

#volume-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.5);   /* barre gris clair */
  outline: none;
}

/* thumb rond blanc, centré */

#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #f9fafb;
  border: 1px solid rgba(15, 23, 42, 0.8);
  cursor: pointer;
  margin-top: -4px;  /* centre le rond sur la barre */
}

#volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #f9fafb;
  border: 1px solid rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

#volume-slider::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.5);
}


/* Mini bloc "Mes projets" dans la card */

.projects-inline {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.32);
}

.projects-inline-box {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.9);
  padding: 10px 12px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Responsive */

@media (max-width: 640px) {
  html,
  body {
    overflow: auto;
  }

  .app {
    padding: 18px 12px 24px;
  }

  .profile-card {
    padding: 18px 16px 14px;
  }

  .card-top {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .music-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* conteneur scrollable : 1 rangée visible (2 cards), plus haut */
#projects-grid {
  max-height: 310px;          /* avant 190px, tu peux ajuster 220–250 si besoin */
  overflow-y: auto;
  scroll-behavior: smooth;
  padding-right: 2px;
}

/* une ligne = 2 cards */
.projects-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

/* cards rectangles type screenshot */
.project-mini {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.96);
  overflow: hidden;
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
}

/* image 16:9 un peu plus grande */
.project-mini img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.project-mini-body {
  padding: 6px 10px 10px;
}

.project-mini-title {
  margin: 0;
  font-size: 0.86rem;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* scrollbar discrète inchangée */
#projects-grid::-webkit-scrollbar {
  width: 4px;
}
#projects-grid::-webkit-scrollbar-track {
  background: transparent;
}
#projects-grid::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}
#projects-grid {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}
