/* ORBITAL.CSS — Système planétaire 3D interactif */

/*  ORBITAL SECTION  */
#orbital-section {
  height: 600vh;
  position: relative;
}

.orbital-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* 3D SCENE  */
.orbital-perspective {
  perspective: 1100px;
  perspective-origin: 50% 50%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbital-world {
  transform-style: preserve-3d;
  position: relative;
  width: 0;
  height: 0;
  transform: rotateX(-8deg);
}

/* ===== ORBIT PATHS (decorative ellipses) ===== */
.orbit-path-ring {
  position: absolute;
  border-radius: 50%;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%) rotateX(78deg);
  pointer-events: none;
  border: 1px solid rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.04) inset;
}

/* ===== CENTER CARD — DevSkill Future ===== */
.orbit-center {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 200;
}

.center-card {
  width: 250px;
  background: var(--bg-card);
  border: 2px solid rgba(124,58,237,0.55);
  border-radius: 22px;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  cursor: pointer;
  text-align: center;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  animation: centerPulse 3s ease-in-out infinite;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px var(--card-shadow);
}

.center-img-box {
  width: 100%;
  height: 120px;
  overflow: hidden;
  background: #000;
}

.center-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}

.center-info {
  padding: 1.25rem 1rem;
}

.center-card:hover {
  transform: scale(1.07);
}

@keyframes centerPulse {
  0%, 100% { box-shadow: 0 0 40px rgba(124,58,237,0.35), 0 0 80px rgba(124,58,237,0.1); }
  50%       { box-shadow: 0 0 80px rgba(124,58,237,0.6), 0 0 140px rgba(124,58,237,0.2); }
}

.center-star-badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-radius: 50px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

.center-emoji { font-size: 2.2rem; display: block; margin-bottom: 0.5rem; }

.center-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  background: linear-gradient(135deg, #a78bfa, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.35rem;
}

.center-sub {
  font-size: 0.68rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ===== ORBIT RINGS ===== */
.orbit-ring {
  position: absolute;
  transform-style: preserve-3d;
  top: 0;
  left: 0;
}

/* ===== ORBIT CARDS ===== */
.orbit-card {
  position: absolute;
  transform-style: preserve-3d;
  top: 0;
  left: 0;
}

.orbit-card-inner {
  position: absolute;
  transform: translate(-50%, -50%);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 140px;
  box-shadow: 0 10px 30px var(--card-shadow);
}

.card-img-container {
  width: 100%;
  height: 90px;
  overflow: hidden;
  position: relative;
  background: #0d1117;
}

.card-project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.orbit-card-inner:hover .card-project-img {
  opacity: 1;
  transform: scale(1.1);
}

.card-info-overlay {
  padding: 0.8rem 0.5rem;
  position: relative;
  z-index: 2;
  background: linear-gradient(to top, rgba(5,8,16,0.95), rgba(5,8,16,0.4));
}

#ring-1 .orbit-card-inner { width: 180px; }
#ring-2 .orbit-card-inner { width: 165px; }
#ring-3 .orbit-card-inner { width: 155px; }

.orbit-card-inner:hover {
  border-color: var(--card-color, rgba(99,102,241,0.5));
  box-shadow: 0 0 30px var(--card-glow, rgba(99,102,241,0.2));
  transform: translate(-50%, -50%) scale(1.1);
}

.orbit-card-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 16px 16px 0 0;
  background: var(--card-color, rgba(99,102,241,0.5));
  opacity: 0;
  transition: opacity 0.3s;
}

.orbit-card-inner:hover::before { opacity: 1; }

.card-emoji  { font-size: 1.4rem; display: block; margin-bottom: 0.25rem; }
.card-name   { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 0.8rem; margin-bottom: 0.2rem; }
.card-tech   { font-size: 0.62rem; color: var(--text-secondary); letter-spacing: 0.04em; }

/* ===== DETAIL PANEL ===== */
#detail-panel {
  position: fixed;
  top: 0;
  right: -480px;
  width: 420px;
  height: 100vh;
  background: var(--nav-bg);
  border-left: 1px solid var(--border-glass);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  z-index: 1100;
  padding: 2.5rem 2rem;
  overflow-y: auto;
  transition: right 0.5s cubic-bezier(0.34, 1.1, 0.64, 1);
}

#detail-panel.open { right: 0; }

.detail-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.1rem;
  transition: all 0.3s;
}

.detail-close:hover {
  border-color: rgba(239,68,68,0.5);
  color: #ef4444;
  background: rgba(239,68,68,0.1);
}

.detail-image-box {
  width: 100%;
  height: 200px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255,255,255,0.1);
  background: #0d1117;
}

.detail-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-accent { height: 3px; border-radius: 2px; margin-bottom: 1.5rem; margin-top: 1rem; }
.detail-emoji  { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; }

.detail-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.7rem; font-weight: 900;
  letter-spacing: -0.02em; margin-bottom: 0.3rem;
}

.detail-subtitle {
  font-size: 0.72rem; color: var(--text-secondary);
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.detail-section       { margin-bottom: 1.25rem; }
.detail-label         { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.45; margin-bottom: 0.4rem; }
.detail-text          { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.7; }
.detail-tags          { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.detail-tag           { padding: 0.25rem 0.65rem; border-radius: 50px; font-size: 0.68rem; font-weight: 600; border: 1px solid; }
.detail-features      { display: flex; flex-direction: column; gap: 0.4rem; }
.detail-feature       { display: flex; gap: 0.5rem; font-size: 0.82rem; color: var(--text-secondary); align-items: flex-start; }
.detail-feature::before { content: '→'; flex-shrink: 0; }

/* ===== SIDEBAR DOTS ===== */
.orbit-sidebar {
  position: fixed;
  left: 2rem; top: 50%;
  transform: translateY(-50%);
  z-index: 300;
  display: flex; flex-direction: column;
  gap: 0.75rem; align-items: center;
}

.orbit-dot-btn {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  cursor: pointer; border: none;
  transition: all 0.3s;
  position: relative;
}

.orbit-dot-btn::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 1rem); top: 50%;
  transform: translateY(-50%);
  font-size: 0.68rem; font-family: 'Space Grotesk', sans-serif;
  color: var(--text-secondary); white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}

.orbit-dot-btn:hover::after { opacity: 1; }

.orbit-dot-btn.active {
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  width: 9px; height: 9px;
}

/* ===== SCROLL PROGRESS BAR ===== */
.scroll-progress-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 2px; background: rgba(255,255,255,0.05); z-index: 200;
}

.scroll-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  transition: width 0.08s linear;
}

/* ===== DYNAMIC PAGE BG ===== */
.page-bg-layer {
  position: fixed; inset: 0; z-index: -1;
  transition: background 1s ease;
  background: var(--bg-dark);
}

/* ===== SCROLL HINT ===== */
.scroll-hint {
  position: absolute; bottom: 2rem;
  left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column;
  align-items: center; gap: 0.5rem;
  font-size: 0.68rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--text-secondary);
  animation: hintPulse 2s ease-in-out infinite;
  pointer-events: none;
}

.scroll-hint-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--primary), transparent);
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1; }
}

/* ===== MOBILE FALLBACK ===== */
.mobile-cards-grid {
  display: none;
  padding: 6rem 1.25rem 4rem;
  display: none;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (max-width: 900px) {
  #orbital-section { height: 400vh; }
  .orbital-perspective {
    transform: scale(0.65);
    perspective: 800px;
  }
  .orbit-center .center-card {
    width: 200px;
  }
  .orbit-card-inner {
    min-width: 120px;
  }
  #ring-1 .orbit-card-inner { width: 140px; }
  #ring-2 .orbit-card-inner { width: 130px; }
  #ring-3 .orbit-card-inner { width: 120px; }
  
  .orbit-sidebar { display: none; }
  #detail-panel { width: 100%; right: -100%; }
  #detail-panel.open { right: 0; }
}

@media (max-width: 600px) {
  .orbital-perspective {
    transform: scale(0.45);
  }
}

@media (min-width: 901px) {
  .mobile-cards-grid { display: none !important; }
}
