/* ==========================================================================
   Feuille de style du squelette — les couleurs et la typographie se changent ici (variables :root).
   Aucun style « inline » dans le HTML : la CSP du site l'interdit.
   ========================================================================== */
:root {
  --ink:          #0f172a;
  --ink-soft:     #334155;
  --muted:        #64748b;
  --bg:           #f8fafc;
  --surface:      #ffffff;
  --border:       #e2e8f0;
  --night:        #0b1020;
  --night-2:      #151b33;
  --accent:       #7c3aed;   /* couleur de marque : boutons d'action, liens, partie accentuée du logo */
  --accent-hover: #6d28d9;
  --accent-soft:  #ede9fe;
  --accent-light: #a78bfa;
  --gold:         #f5c451;   /* touche chaude : anneaux de planète, étoiles, petits accents — casse le tout-violet */
  --gold-soft:    #fde9b8;
  --teal:         #38d4c4;   /* seconde touche froide : atmosphère, fenêtres éclairées */
  --rose:         #fb7185;   /* accent rare, très dosé (feux de navire) */
  --success:      #059669;
  --danger:       #dc2626;
  --radius:       14px;
  --radius-sm:    8px;
  --shadow:       0 10px 30px rgba(15, 23, 42, 0.10);
  --font:         'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 12px; }
p { margin: 0 0 12px; }
a { color: var(--accent); }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(11, 16, 32, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(255,255,255,0.06); }
.nav-container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em; color: #fff; text-decoration: none; }
.brand-logo > span { color: var(--accent-light); margin-left: -10px; } /* « Astr » + « elle » forment un seul mot malgré l'espace du flex */
.brand-mark { flex-shrink: 0; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-link { color: #cbd5e1; text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.nav-link:hover { color: #fff; }

/* Les deux badges de langue (FR puis EN, toujours dans cet ordre et toujours tous les deux visibles) : leur
   position ne dépend jamais de la langue affichée, contrairement à un unique lien « passer à l'autre langue »
   dont la largeur — donc la position, une fois centrée — variait avec la longueur du texte traduit. */
.lang-badges { display: flex; align-items: center; gap: 6px; }
.lang-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; text-decoration: none; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em; color: #94a3b8; border: 1px solid transparent; }
.lang-badge svg { border-radius: 2px; flex-shrink: 0; }
.lang-badge:hover { color: #fff; }
.lang-badge.is-active { color: #fff; background: rgba(167, 139, 250, 0.16); border-color: rgba(167, 139, 250, 0.35); }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border: 1.5px solid transparent; border-radius: 10px; font: inherit; font-weight: 600; font-size: 0.97rem; cursor: pointer; text-decoration: none; transition: background 0.15s, transform 0.15s, box-shadow 0.15s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #1e293b; }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(124, 58, 237, 0.35); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-outline { background: transparent; color: var(--ink); border-color: #cbd5e1; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-large { padding: 15px 30px; font-size: 1.05rem; border-radius: 12px; }

/* ---------- Héros : un ciel avec des planètes, une ville, un navire, des silhouettes ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 82% 6%, rgba(245, 196, 81, 0.16), transparent 60%),
    radial-gradient(1200px 550px at 18% -10%, rgba(124, 58, 237, 0.40), transparent 62%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
  color: #fff;
  padding: 76px 0 0;
  text-align: center;
}
.hero-inner { position: relative; z-index: 2; padding-bottom: 48px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; max-width: 820px; margin: 18px auto 16px; }
.hero-lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: #cbd5e1; max-width: 680px; margin: 0 auto 30px; }
.badge-pill { display: inline-block; padding: 6px 16px; border-radius: 999px; background: rgba(167, 139, 250, 0.16); border: 1px solid rgba(167, 139, 250, 0.35); color: #ddd6fe; font-size: 0.88rem; font-weight: 600; }

/* Le tableau : planètes, étoiles, une ville, un navire, des silhouettes — purement décoratif (aria-hidden). */
.hero-scene { position: relative; z-index: 1; width: 100%; height: clamp(200px, 28vw, 340px); display: block; }
.hero-scene .twinkle { animation: twinkle 3.6s ease-in-out infinite; transform-origin: center; }
.hero-scene .twinkle:nth-child(3n) { animation-delay: 0.6s; }
.hero-scene .twinkle:nth-child(4n) { animation-delay: 1.4s; }
.hero-scene .drift { animation: drift 12s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  .hero-scene .twinkle, .hero-scene .drift { animation: none; }
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-white { background: var(--surface); }
.section-title { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-title h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 800; }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.how-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.how-num { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; display: grid; place-items: center; margin-bottom: 14px; }
.how-step h3 { font-size: 1.15rem; }
.how-step p { color: var(--muted); margin: 0; }

/* ---------- Formulaire de commande ---------- */
.order-card { max-width: 640px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 34px; box-shadow: var(--shadow); }
.order-card h2 { text-align: center; font-size: 1.6rem; font-weight: 800; }
.price-tag { text-align: center; font-size: 2.2rem; font-weight: 800; margin: 4px 0 6px; }
.price-tag small { font-size: 0.9rem; color: var(--muted); font-weight: 500; }
.bullets { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 6px; justify-items: center; color: var(--ink-soft); }
.bullets li::before { content: '✓'; color: var(--success); font-weight: 800; margin-right: 8px; }
.field { margin-bottom: 18px; }
label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; color: var(--ink-soft); }
.opt { font-weight: 400; color: var(--muted); }
input[type='text'], input[type='date'], input[type='time'], input[type='number'], input[type='email'], select, textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid #cbd5e1; border-radius: 10px; font: inherit; color: var(--ink); background: #fff;
}
textarea { resize: vertical; min-height: 110px; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.help { font-size: 0.82rem; color: var(--muted); margin: 6px 0 0; }
.field-error { font-size: 0.85rem; color: var(--danger); margin: 6px 0 0; font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 0.88rem; color: var(--ink-soft); margin: 4px 0 6px; cursor: pointer; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--accent); }
.order-card .btn-large { width: 100%; margin-top: 12px; }
.price-note { text-align: center; font-size: 0.85rem; color: var(--muted); margin: 12px 0 0; }
.disclaimer { font-size: 0.85rem; color: var(--muted); border-left: 3px solid var(--accent-light); padding-left: 12px; margin: 22px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* champ piège anti-robots */
.inline-alert { padding: 11px 15px; border-radius: var(--radius-sm); font-size: 0.92rem; margin-bottom: 16px; }
.inline-alert.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.inline-alert.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.inline-alert.info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ---------- FAQ ---------- */
.faq { max-width: 720px; margin: 0 auto; display: grid; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 18px; }
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item p { margin: 10px 0 0; color: var(--muted); }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--night); color: #94a3b8; padding: 34px 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: #cbd5e1; text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-legal { margin-top: 14px; font-size: 0.82rem; }

/* ---------- Page de résultat ---------- */
.result-page { max-width: 800px; padding-top: 48px; padding-bottom: 80px; }
.state { text-align: center; padding: 30px 0; }
.spinner { width: 46px; height: 46px; border: 4px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; margin: 0 auto 22px; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } html { scroll-behavior: auto; } }
.result-meta { color: var(--muted); font-size: 0.9rem; }
.prose { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 30px; margin: 18px 0; color: var(--ink-soft); }
.prose h2, .prose h3, .prose h4 { color: var(--ink); margin: 22px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 14px; }
.prose li { margin-bottom: 8px; }
.prose blockquote { margin: 0 0 14px; padding: 6px 14px; border-left: 3px solid var(--accent-light); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* ---------- Pages légales et contact ---------- */
.legal-body { background: var(--surface); }
.legal-header { background: var(--night); }
.legal-header-inner { display: flex; justify-content: space-between; align-items: center; height: 68px; }
.legal-header-links { display: flex; align-items: center; gap: 18px; }
.legal-back { color: #ddd6fe; text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.legal-back:hover { text-decoration: underline; }
.legal-page { max-width: 820px; padding-top: 44px; padding-bottom: 72px; }
.legal-page h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 800; margin-bottom: 6px; }
.legal-page h2 { font-size: 1.15rem; margin: 30px 0 10px; }
.legal-page p, .legal-page li { color: var(--ink-soft); line-height: 1.75; margin-bottom: 10px; }
.legal-page ul { padding-left: 22px; margin-bottom: 10px; }
.legal-updated { color: var(--muted); font-size: 0.85rem; margin-bottom: 20px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 8px 0 14px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 9px 12px; border: 1px solid var(--border); color: var(--ink-soft); }
.legal-table thead th, .legal-table tbody th { background: #f1f5f9; color: var(--ink); }
.legal-table tbody th { width: 34%; }
.legal-footer { background: var(--night); padding: 26px 0; }
.form-stack { display: grid; gap: 14px; max-width: 440px; }
@media (max-width: 640px) { .legal-table { display: block; overflow-x: auto; } }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 40px 20px; }
.notfound .code { font-size: 5rem; font-weight: 900; color: var(--accent); letter-spacing: -0.04em; line-height: 1; }

/* ---------- Notifications (ui.js) ---------- */
.toast-container { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 200; }
.toast-item { display: flex; gap: 10px; align-items: center; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: 0.92rem; transition: opacity 0.3s; }
.toast-item.fade-out { opacity: 0; }
.toast-icon { font-weight: 800; }
.toast-success .toast-icon { color: #34d399; }
.toast-error .toast-icon { color: #f87171; }

/* ---------- Petits écrans ---------- */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .nav-link { display: none; }
  .hero { padding: 56px 0 64px; }
  .section { padding: 52px 0; }
  .order-card { padding: 22px 18px; border-radius: 16px; }
  .prose { padding: 20px 18px; }
  .badge-pill { padding: 5px 10px; font-size: 0.72rem; white-space: nowrap; }
  .lang-badge span { display: none; } /* sur petit écran, le drapeau seul suffit à distinguer les deux badges */
  .nav-container .btn-accent { display: none; } /* débordait sur petit écran ; le bouton du bandeau, juste en dessous, suffit */
}

/* ---------- Impression : seul le résultat est imprimé ---------- */
@media print {
  body { background: #fff; }
  .site-header, .site-footer, .result-actions, .skip-link, .toast-container, .disclaimer-hide { display: none !important; }
  .prose { border: 0; padding: 0; }
  .result-page { padding: 0; max-width: none; }
}
