:root {
  /* === Tailles === */
  --size-title: 42px;
  --size-menu: 18px;
  --size-label: 16px;
  --size-input: 20px;
  --size-section-title: 20px;
  --size-sign: 20px;
  --size-compat-item: 18px;
  --size-stars: 18px;

  /* === Graisses === */
  --weight-light: 300;
  --weight-bold: 800;

  /* === Couleurs === */
  /* Palette Astrolune */
  --bg: #C5D6FB;      /* light blue (header) */
  --ink: #21295C;     /* dark navy for text */
  --muted: #5e6a79;   /* muted grey */
  --panel: #21295C;   /* dark background panels */
  --accent: #C4B0FF;  /* lavender accent */
  --white: #ffffff;
  --yellow: #21295C;  /* utilisé comme fond sombre global */
  --maxw: 1100px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--white); /* texte par défaut blanc */
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* ===== FOND COSMIQUE GLOBAL ===== */
.cosmic-bg {
  position: fixed;
  inset: 0;
  z-index: -10;
  overflow: hidden;
  isolation: isolate;
}

.cosmic-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(1200px 600px at 80% 10%, rgba(196,176,255,.25), transparent 60%),
    radial-gradient(900px 500px at 15% 20%, rgba(111,86,255,.22), transparent 55%),
    linear-gradient(180deg, #1a1740 0%, #151233 40%, #0e0b24 100%);
}

/* Étoiles fixes qui bougent lentement */
.cosmic-bg .stars {
  position: absolute;
  inset: 0;
  background-repeat: repeat;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,.9) 40%, transparent 41%),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 40% 80%, rgba(255,255,255,.85) 50%, transparent 51%),
    radial-gradient(1px 1px at 85% 25%, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 10% 70%, rgba(255,255,255,.85) 50%, transparent 51%);
  background-size: 400px 400px, 420px 420px, 360px 360px, 500px 500px, 380px 380px;
  animation: driftStars 46s linear infinite;
  opacity: .9;
}

/* Petites étoiles qui scintillent */
.cosmic-bg .twinkles {
  position: absolute;
  inset: 0;
  background-repeat: repeat;
  background-image:
    radial-gradient(2px 2px at 30% 40%, rgba(255,255,255,1) 40%, transparent 41%),
    radial-gradient(2px 2px at 60% 20%, rgba(255,255,255,1) 40%, transparent 41%),
    radial-gradient(2px 2px at 80% 75%, rgba(255,255,255,1) 40%, transparent 41%);
  background-size: 520px 520px, 600px 600px, 480px 480px;
  animation: twinkle 2.6s ease-in-out infinite;
  opacity: .7;
  mix-blend-mode: screen;
}

/* Étoile filante */
.cosmic-bg .shooting {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cosmic-bg .shooting::before {
  content: "";
  position: absolute;
  top: 22%;
  left: -12%;
  width: 160px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, #fff 40%, rgba(255,255,255,0) 100%);
  border-radius: 2px;
  filter: drop-shadow(0 0 6px rgba(255,255,255,.95));
  transform: rotate(11deg);
  animation: shooting 7s cubic-bezier(.2,.6,.2,1) infinite;
}

/* ===== Animations ===== */
@keyframes driftStars {
  0% { transform: translateY(0) }
  100% { transform: translateY(-40px) }
}

@keyframes twinkle {
  0%, 100% { opacity: .35; transform: scale(1) }
  50% { opacity: 1; transform: scale(1.07) }
}

@keyframes shooting {
  0%   { transform: translate3d(0,0,0) rotate(12deg); opacity:0 }
  8%   { opacity:1 }
  40%  { transform: translate3d(120vw, 22vh, 0) rotate(12deg); opacity:0 }
  100% { opacity:0 }
}

/* Désactive les animations si "réduire les mouvements" est activé */
@media (prefers-reduced-motion: reduce) {
  .cosmic-bg .stars,
  .cosmic-bg .twinkles,
  .cosmic-bg .shooting::before {
    animation: none !important;
  }
}

/* ======= HEADER ======= */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(197, 214, 251, 0.85); /* ta couleur bleue avec transparence */
  backdrop-filter: saturate(120%) blur(6px); /* effet verre */
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.container{max-width:var(--maxw);margin-inline:auto;padding:14px 20px;}
header .container{padding:24px 20px;}
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:20px}
.brand{display:flex;align-items:center;gap:14px;}
.brand img{height:80px;width:auto;display:block}
nav ul{list-style:none;margin:0;padding:0;display:flex;gap:32px}
nav a{color:#20304F;text-decoration:none;font-weight:600;font-size:18px}
nav a:hover{opacity:.9;text-decoration:underline}
@media (max-width: 980px){
  nav a{font-size:16px}
}

/* Masquer la croix par défaut (desktop) */
.menu-close { display: none; }

/* ======= BASE ======= */
h1 {
  font-weight: var(--weight-bold);
  font-size: var(--size-title);
  text-align: center;
  margin: 30px 0;
  color: var(--white);
}
h2 {
  color: var(--white); /* sous-titres visibles */
}

/* ======= BLOC DATE ======= */
.birth-input {
  background: #ffffff;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.birth-input label {
  color: var(--ink); /* texte sombre sur fond clair */
  font-weight: var(--weight-bold);
  font-size: var(--size-label);
}
.birth-input input[type="date"] {
  width: 100%;
  height: 48px;
  padding: 0 12px;
  border-radius: 8px;
  border: none;
  outline: none;
  background: #f9f9f9;
  font-weight: var(--weight-light);
  font-size: var(--size-input);
  color: #2F3555;
  box-sizing: border-box;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
  transition: box-shadow 0.2s ease;
}
.birth-input input[type="date"]:focus {
  box-shadow: 0 0 0 3px rgba(196,176,255,0.4);
}
.birth-input button {
  width: 100%;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  font-weight: var(--weight-bold);
  font-size: var(--size-menu);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.birth-input button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* ======= RÉSULTATS ======= */
.result .sign-box,
.result .compat-box {
  background: var(--white);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  color: var(--ink);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.sign-box span,
.sign-box strong {
  font-weight: var(--weight-bold);
  font-size: var(--size-sign);
}
.compat-box h2 {
  font-weight: var(--weight-bold);
  font-size: var(--size-section-title);
  color: var(--ink); /* lisible sur fond clair */
}
.compat-item {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #ccc;
  padding: 10px 0;
  align-items: center;
  transition: background 0.2s ease;
}
.compat-item:hover {
  background: rgba(0,0,0,0.05);
}
.compat-item span:first-child {
  font-weight: var(--weight-bold);
  font-size: var(--size-compat-item);
}
.stars {
  color: var(--accent);
  font-size: var(--size-stars);
}

/* ===== FOOTER — COSMIC (full-bleed) ===== */
.footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 0;
  border-top: none;
  background: transparent; /* on gère le fond via couches */
}
.footer-wave {
  position: absolute;
  top: -1px; left: 0; width: 100%; height: 72px;
  display: block; z-index: 0;
}
.footer-wave path {
  fill: rgba(197, 214, 251, 0.85);
  opacity: 1;
}  
.footer--cosmic::before,
.footer--cosmic::after {
  content:"";
  position: absolute; inset: 0;
  z-index: -2;
}
.footer--cosmic::before {
  background:
    radial-gradient(1200px 600px at 80% 10%, rgba(196,176,255,.30), transparent 60%),
    radial-gradient(900px 500px at 15% 20%, rgba(111,86,255,.25), transparent 55%),
    linear-gradient(180deg, #1a1740 0%, #151233 40%, #0e0b24 100%);
}
.footer--cosmic::after {
  pointer-events: none;
  background: radial-gradient(60% 80% at 50% -10%, rgba(196,176,255,.35), transparent 60%);
  mix-blend-mode: screen;
  opacity:.8;
}
.sky { position: absolute; inset: 0; z-index: -1; }
.footer .sky .stars, .footer .sky .twinkles {
  position: absolute; inset: 0;
  background-repeat: repeat;
  transform: translateZ(0);
}
.footer .sky .stars {
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,.9) 40%, transparent 41%),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 40% 80%, rgba(255,255,255,.85) 50%, transparent 51%),
    radial-gradient(1px 1px at 85% 25%, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 10% 70%, rgba(255,255,255,.85) 50%, transparent 51%);
  background-size: 400px 400px, 420px 420px, 360px 360px, 500px 500px, 380px 380px;
  animation: driftStars 45s linear infinite;
  opacity:.9;
}
.footer .sky .twinkles {
  background-image:
    radial-gradient(2px 2px at 30% 40%, rgba(255,255,255,1) 40%, transparent 41%),
    radial-gradient(2px 2px at 60% 20%, rgba(255,255,255,1) 40%, transparent 41%),
    radial-gradient(2px 2px at 80% 75%, rgba(255,255,255,1) 40%, transparent 41%);
  background-size: 520px 520px, 600px 600px, 480px 480px;
  animation: twinkle 2.6s ease-in-out infinite;
  opacity:.7;
  mix-blend-mode: screen;
}
.footer .sky .shooting {
  position: absolute; inset: 0; overflow: visible; pointer-events: none;
}
.footer .sky .shooting::before {
  content:"";
  position: absolute;
  top: 20%; left: -10%;
  width: 140px; height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, #fff 40%, rgba(255,255,255,0) 100%);
  border-radius: 2px;
  filter: drop-shadow(0 0 6px rgba(255,255,255,.9));
  transform: rotate(12deg);
  animation: shooting 6.5s cubic-bezier(.2,.6,.2,1) infinite;
}
.footer-content {
  position: relative; z-index: 1;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 72px 20px 36px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 40px;
  color: var(--white);
}
.footer .footer-section h2 { color: #C4B0FF; letter-spacing: .6px; }
.footer-section ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.menu-nav { margin-left: 40px; }
.footer a { color: #EAE8FF; opacity: .95; text-decoration: none; }
.footer a:hover { opacity: 1; text-decoration: underline; }
.contact-list li { display: flex; align-items: center; gap: 5px; }
.contact-list li span i { color: #EAE8FF; }
.menu-nav ul li a { font-weight: 600; }
.footer-brand img {
  height: 160px; width: auto; display: block;
  filter: drop-shadow(0 10px 28px rgba(196,176,255,.35));
}
.footer--cosmic .footer-brand { margin-left: 0; }
.footer-bottom {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto; padding: 16px 20px 28px;
  border-top: 1px solid rgba(255,255,255,.15);
}
.footer-bottom p { margin: 0; color: #E0DEFF; }

@media (max-width: 980px) {
  .footer-content { flex-direction: column; gap: 24px; padding: 64px 20px 28px; }
  .footer-brand img { height: 96px; }
  .menu-nav { margin-left: 0; }
}


/* Animations */
@keyframes driftStars { 0% { transform: translateY(0) } 100% { transform: translateY(-40px) } }
@keyframes twinkle { 0%, 100% { opacity:.35; transform: scale(1) } 50% { opacity:1; transform: scale(1.08) } }
@keyframes shooting {
  0%   { transform: translate3d(0,0,0) rotate(12deg); opacity:0 }
  8%   { opacity:1 }
  40%  { transform: translate3d(120vw, 22vh, 0) rotate(12deg); opacity:0 }
  100% { opacity:0 }
}

/* Accessibilité motion */
@media (prefers-reduced-motion: reduce){
  .footer .sky .stars, .footer .sky .twinkles, .footer .sky .shooting::before { animation: none !important }
}

/* ===== MENU BURGER ===== */
.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.burger-menu span {
  width: 100%;
  height: 3px;
  background: #20304F;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.burger-menu[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.burger-menu[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.burger-menu[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== RESPONSIVE TOUS IPHONES ===== */
@media (max-width: 1024px) {
  html, body {
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100vw;
    position: relative;
  }
  
  /* Header responsive */
  .container { padding: 12px 16px; max-width: 100vw; overflow-x: hidden; }
  header .container { padding: 16px 16px; max-width: 100vw; overflow-x: hidden; }
  .brand img { height: 60px; }
  
  /* Menu burger responsive */
  .burger-menu {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(26, 23, 64, 0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transition: right 0.3s ease;
    z-index: 1000;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  /* Bouton de fermeture (croix) */
  .menu-close {
    position: fixed;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(234, 232, 255, 0.28);
    background: rgba(234, 232, 255, 0.08);
    color: #EAE8FF;
    font-size: 26px;
    line-height: 1;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1002;
    backdrop-filter: blur(6px);
  }
  .nav-menu.active + .menu-close {
    display: flex;
  }
  .menu-close:active { transform: scale(0.98); }
  
  .nav-menu li a {
    color: #EAE8FF;
    font-size: 24px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 10px 20px;
    border-radius: 8px;
  }
  
  .nav-menu li a:hover,
  .nav-menu li a.active {
    color: #C4B0FF;
    background: rgba(196, 176, 255, 0.1);
  }
  
  /* Hero section responsive */
  .hero { padding: 30px 16px; }
  .hero-inner { 
    flex-direction: column; 
    gap: 20px; 
    text-align: center;
  }
  .hero-box { width: 180px; }
  .hero-text .title { 
    font-size: 28px; 
    margin-bottom: 12px;
  }
  .subtitle { 
    font-size: 18px; 
    margin-bottom: 12px;
  }
  .desc { 
    font-size: 14px; 
    margin-bottom: 20px;
  }
  .btn-game { 
    font-size: 16px; 
    padding: 10px 20px;
  }
  
  /* Form section responsive */
  .form-section { padding: 30px 16px; }
  .form-inner { 
    flex-direction: column; 
    gap: 20px; 
    text-align: center;
  }
  .form-text h2 { 
    font-size: 24px; 
    margin-bottom: 12px;
  }
  .form-text p { 
    font-size: 14px; 
    margin-bottom: 20px;
  }
  .form-container { 
    max-width: 100%; 
    padding: 20px 16px;
  }
  .form-group label { 
    font-size: 14px; 
    margin-bottom: 8px;
  }
  .form-group input, .form-group select { 
    font-size: 16px; 
    padding: 12px 16px;
  }
  #discover { 
    font-size: 16px; 
    padding: 12px 24px;
  }
  
  /* Footer responsive */
  .footer-content { 
    flex-direction: column; 
    gap: 20px; 
    padding: 40px 16px 24px;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .footer-section ul { align-items: center; }
  .menu-nav { margin-left: 0; }
  .footer-bottom { text-align: center; }
  .footer-brand { display: flex; justify-content: center; }
  .footer-brand img { height: 80px; }
  .footer-section h2 { font-size: 14px; }
  .footer-section ul { gap: 8px; }
  .footer a { font-size: 14px; }
  .contact-list li span { font-size: 16px; }
  .footer-bottom { padding: 12px 16px 20px; }
  .footer-bottom p { font-size: 12px; }
}

/* Override bouton Découvrir couleur */
#discover {
  background: var(--accent) !important;
  color: #ffffff !important;
}
