/* ===========================================================
   ROUE DU ZODIAQUE — Carte Céleste
   =========================================================== */

:root {
  --bg-deep: #050414;
  --bg-mid: #0a0a24;
  --bg-soft: #131038;
  --gold: #d4af6e;
  --gold-bright: #f4d989;
  --gold-soft: rgba(212, 175, 110, 0.45);
  --ivory: #f3ead4;
  --text-muted: rgba(243, 234, 212, 0.65);
  --accent-violet: #6b5b95;
  --star-white: #fff8e7;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  background: radial-gradient(ellipse at top, var(--bg-soft) 0%, var(--bg-mid) 35%, var(--bg-deep) 100%);
  color: var(--ivory);
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===========================================================
   CIEL NOCTURNE
   =========================================================== */

.night-sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.stars {
  position: absolute;
  inset: 0;
}

.star {
  position: absolute;
  background: var(--star-white);
  border-radius: 50%;
  animation: twinkle var(--duration, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  box-shadow: 0 0 4px rgba(255, 248, 231, 0.6);
}

@keyframes twinkle {
  0%, 100% { opacity: var(--opacity-min, 0.3); transform: scale(1); }
  50% { opacity: var(--opacity-max, 1); transform: scale(1.3); }
}

.shooting-stars {
  position: absolute;
  inset: 0;
}

.shooting-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--star-white);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--star-white);
  animation: shoot 6s linear infinite;
  animation-delay: var(--shoot-delay, 0s);
  opacity: 0;
}

/* La traînée part DERRIÈRE l'étoile (en haut-gauche), elle suit donc le mouvement */
.shooting-star::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 90px;
  height: 1px;
  background: linear-gradient(to left, var(--star-white), transparent);
  transform: translateY(-50%) rotate(35deg);
  transform-origin: left center;
}

/* L'étoile filante part en haut et descend vers la droite-bas (mouvement naturel) */
@keyframes shoot {
  0% { transform: translate(0, 0); opacity: 0; }
  3% { opacity: 1; }
  15% { opacity: 1; }
  25% { transform: translate(320px, 220px); opacity: 0; }
  100% { transform: translate(320px, 220px); opacity: 0; }
}

.nebula {
  position: absolute;
  top: 20%;
  left: 60%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(107, 91, 149, 0.18) 0%, rgba(107, 91, 149, 0.05) 40%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
  animation: nebulaPulse 12s ease-in-out infinite;
}

.nebula::after {
  content: '';
  position: absolute;
  top: 30%;
  left: -40%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 175, 110, 0.08) 0%, transparent 60%);
  border-radius: 50%;
  filter: blur(50px);
}

@keyframes nebulaPulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* ===========================================================
   LAYOUT PRINCIPAL
   =========================================================== */

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.page-header {
  text-align: center;
  margin-bottom: 2.5rem;
  animation: fadeInDown 1.4s ease-out;
}

.overline {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0.85;
}

.title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--ivory) 20%, var(--gold-bright) 50%, var(--ivory) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  margin-bottom: 1rem;
  text-shadow: 0 0 30px rgba(244, 217, 137, 0.15);
}

.subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-style: italic;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===========================================================
   ROUE DU ZODIAQUE
   =========================================================== */

.zodiac-wheel-wrapper {
  width: 100%;
  max-width: 600px;
  aspect-ratio: 1 / 1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem 0;
  animation: fadeInScale 1.6s ease-out 0.3s both;
  position: relative;
}

.zodiac-wheel-wrapper::before {
  content: '';
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle, rgba(212, 175, 110, 0.08) 0%, transparent 60%);
  pointer-events: none;
  filter: blur(20px);
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.85) rotate(-5deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

.zodiac-wheel {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 40px rgba(212, 175, 110, 0.15));
}

/* Symboles du zodiaque */
.zodiac-symbol {
  font-family: 'Cinzel', serif;
  font-size: 28px;
  fill: var(--gold);
  text-anchor: middle;
  dominant-baseline: middle;
  cursor: pointer;
  transition: fill 0.4s ease, filter 0.4s ease;
  user-select: none;
  /* Force le rendu en mode texte plutôt qu'emoji coloré natif */
  font-variant-emoji: text;
}

.zodiac-name {
  font-family: 'Cinzel', serif;
  font-size: 8.5px;
  letter-spacing: 0.15em;
  fill: rgba(212, 175, 110, 0.7);
  text-anchor: middle;
  dominant-baseline: middle;
  text-transform: uppercase;
  pointer-events: none;
  transition: fill 0.4s ease;
}

.segment-zone {
  fill: transparent;
  cursor: pointer;
  transition: fill 0.4s ease;
}

/* État hover */
.zodiac-segment:hover .segment-zone,
.zodiac-segment.active .segment-zone {
  fill: rgba(212, 175, 110, 0.08);
}

.zodiac-segment:hover .zodiac-symbol,
.zodiac-segment.active .zodiac-symbol {
  fill: var(--gold-bright);
  filter: drop-shadow(0 0 8px rgba(244, 217, 137, 0.7));
}

.zodiac-segment:hover .zodiac-name,
.zodiac-segment.active .zodiac-name {
  fill: var(--gold-bright);
}

/* ===== Cas particulier : le Taureau en orange (cliquable, lien) ===== */
.zodiac-segment[data-sign="taurus"] .zodiac-symbol {
  fill: #ff8c2a;
  filter: drop-shadow(0 0 6px rgba(255, 140, 42, 0.5));
}

.zodiac-segment[data-sign="taurus"] .zodiac-name {
  fill: rgba(255, 140, 42, 0.85);
}

.zodiac-segment[data-sign="taurus"]:hover .zodiac-symbol,
.zodiac-segment[data-sign="taurus"].active .zodiac-symbol {
  fill: #ffb060;
  filter: drop-shadow(0 0 12px rgba(255, 176, 96, 0.9));
}

.zodiac-segment[data-sign="taurus"]:hover .zodiac-name,
.zodiac-segment[data-sign="taurus"].active .zodiac-name {
  fill: #ffb060;
}

.zodiac-segment[data-sign="taurus"]:hover .segment-zone,
.zodiac-segment[data-sign="taurus"].active .segment-zone {
  fill: rgba(255, 140, 42, 0.1);
}

/* Texte central par défaut */
.center-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  fill: var(--gold);
  font-style: italic;
}

.center-hint {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.2em;
  fill: var(--text-muted);
  text-transform: uppercase;
}

/* Affichage de la constellation au centre */
.constellation-display {
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.constellation-display.visible {
  opacity: 1;
}

.center-default {
  transition: opacity 0.4s ease;
}

.center-default.hidden {
  opacity: 0;
}

.constellation-star {
  fill: var(--star-white);
  filter: url(#starGlow);
  animation: starPulse 2s ease-in-out infinite;
}

@keyframes starPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

.constellation-line {
  stroke: rgba(244, 217, 137, 0.55);
  stroke-width: 0.7;
  fill: none;
  stroke-linecap: round;
}

.constellation-name {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 18px;
  fill: var(--gold-bright);
  text-anchor: middle;
  letter-spacing: 0.08em;
}

.constellation-name-fr {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.25em;
  fill: var(--ivory);
  text-anchor: middle;
  text-transform: uppercase;
  opacity: 0.85;
}

/* ===========================================================
   FOOTER
   =========================================================== */

.page-footer {
  margin-top: 2.5rem;
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--gold-soft);
  text-transform: uppercase;
  animation: fadeInUp 1.4s ease-out 0.8s both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===========================================================
   RESPONSIVE
   =========================================================== */

@media (max-width: 640px) {
  .container {
    padding: 2rem 1rem 1.5rem;
  }
  .page-header {
    margin-bottom: 1.5rem;
  }
  .overline {
    font-size: 0.65rem;
    letter-spacing: 0.35em;
  }
  .zodiac-wheel-wrapper {
    max-width: 100%;
  }
  .page-footer {
    margin-top: 1.5rem;
    font-size: 0.6rem;
  }
}

@media (max-width: 420px) {
  .zodiac-name {
    font-size: 7px;
  }
  .zodiac-symbol {
    font-size: 26px;
  }
}

/* Mode tactile : pas de hover, les clicks/taps se chargent du switch via JS */
@media (hover: none) {
  .subtitle::after {
    content: ' (touchez)';
  }
}
