/* Uy Scuti Dev — feuille de style unique. Polices hébergées sur le site, aucune dépendance externe. */

@font-face {
  font-family: "Unbounded";
  src: url("/assets/fonts/unbounded-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}

:root {
  --night: #0c0f26;        /* fond : nuit indigo */
  --deep: #151a3d;         /* surfaces surélevées */
  --line: #262c57;         /* filets */
  --ink: #eceaf4;          /* texte */
  --muted: #9ea2c0;        /* texte secondaire */
  --photo: #ff8a5b;        /* photosphère de l'étoile : actions */
  --limb: #c8432a;         /* bord de l'étoile : survol */
  --starlight: #a9b4ff;    /* liens et focus */
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1160px;
  --gutter: 24px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--starlight); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--starlight); outline-offset: 3px; border-radius: 4px; }
img, svg, canvas { display: block; max-width: 100%; }

h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); line-height: 1.1; }
h3 { font-size: 1.2rem; line-height: 1.25; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 600px) { :root { --gutter: 16px; } body { font-size: 17px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--deep); color: var(--ink); padding: 8px 12px; z-index: 20; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(12, 15, 38, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(38, 44, 87, 0.6);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 500; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand img { width: 24px; height: 24px; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); }
.nav .lang { color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; font-size: 14px; }
.nav .lang:hover { border-color: var(--muted); }
@media (max-width: 760px) { .nav a:not(.lang) { display: none; } }

/* ---------- Boutons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions.center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 16px/1 var(--text); text-decoration: none;
  color: var(--ink); border: 1px solid var(--line); background: transparent; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { border-color: var(--muted); color: var(--ink); }
.btn-primary { background: var(--photo); border-color: var(--photo); color: #1b0d08; }
.btn-primary:hover { background: #ffa47e; border-color: #ffa47e; color: #1b0d08; }

/* ---------- Hero : UY Scuti en direct ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: calc(100svh - 68px); display: flex; align-items: center;
  padding: 96px 0;
}
.star-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-inner { position: relative; }
.hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.8rem); line-height: 1.06; max-width: 13ch; margin-bottom: 28px; }
.hero-lead { color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.2rem); max-width: 46ch; margin-bottom: 36px; }
.sun-label {
  position: absolute; z-index: 1; margin: 0; max-width: 22ch;
  font-size: 14px; line-height: 1.4; color: var(--muted);
  padding-left: 18px; transform: translate(10px, -50%);
}
.sun-label::before { content: ""; position: absolute; left: 0; top: 50%; width: 12px; height: 1px; background: var(--muted); }

@media (max-width: 760px) {
  .hero { align-items: flex-end; padding: 46vw 0 56px; min-height: auto; }
  .sun-label { position: static; transform: none; padding-left: 0; margin: 28px var(--gutter) 0; max-width: none; }
  .sun-label::before { display: none; }
  .hero { flex-direction: column; align-items: stretch; }
}

/* Une seule séquence d'entrée, au chargement */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.hero h1, .hero-lead, .hero .actions { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.hero-lead { animation-delay: .12s; }
.hero .actions { animation-delay: .24s; }
.star-canvas { animation: fade 1.6s ease both; }
.sun-label { animation: fade .8s ease 1.4s both; }
@media (prefers-reduced-motion: reduce) {
  .hero h1, .hero-lead, .hero .actions, .star-canvas, .sun-label { animation: none; }
}

/* ---------- Sections ---------- */
.band { padding: 112px 0; border-top: 1px solid var(--line); }
@media (max-width: 600px) { .band { padding: 72px 0; } }
.band-head { max-width: 640px; margin-bottom: 56px; }
.band-head h2 { margin-bottom: 14px; }
.band-head p { color: var(--muted); margin: 0; }

/* Produit : Mathemakidz */
.product { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.product-name { font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1; letter-spacing: -0.03em; margin: 0 0 14px; }
.product-tagline { font-size: 1.25rem; color: var(--ink); margin-bottom: 8px; }
.product-intro { color: var(--muted); max-width: 52ch; }
.steps { list-style: none; margin: 32px 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); counter-reset: step; }
.steps li { padding: 20px 20px 4px 0; counter-increment: step; }
.steps li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.steps strong { display: block; font-family: var(--display); font-weight: 500; font-size: 1rem; margin-bottom: 6px; }
.steps strong::before { content: counter(step) ". "; color: var(--photo); }
.steps span { color: var(--muted); font-size: 15px; line-height: 1.5; display: block; }
.product-facts { color: var(--muted); font-size: 16px; margin-bottom: 28px; }
.product-visual {
  justify-self: center; width: 100%; max-width: 400px;
  background: #fff; border-radius: 28px; padding: 18px;
  transform: rotate(-3deg);
  box-shadow: 0 30px 80px -30px rgba(255, 138, 91, 0.45);
}
.product-visual img { width: 100%; height: auto; }
.note { font-size: 14px; color: var(--muted); margin: 12px 0 0; }
@media (max-width: 900px) {
  .product { grid-template-columns: 1fr; gap: 48px; }
  .product-visual { max-width: 300px; order: -1; }
}
@media (max-width: 600px) {
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 16px 0 8px; border-left: 0; border-bottom: 1px solid var(--line); }
}

/* Services : lignes typographiques */
.services { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.services li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: baseline; padding: 32px 0; border-bottom: 1px solid var(--line); }
.services h3 { font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 400; letter-spacing: -0.025em; }
.services p { color: var(--muted); margin: 0; max-width: 44ch; }
@media (max-width: 700px) { .services li { grid-template-columns: 1fr; gap: 10px; padding: 24px 0; } }

/* À propos */
.about { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.about h2 { margin-bottom: 24px; }
.about p { color: var(--muted); max-width: 56ch; }
.facts { margin: 0; border-top: 1px solid var(--line); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; gap: 32px; } }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
.contact h2 { margin-bottom: 16px; }
.contact-intro p { color: var(--muted); }
.mail { font-family: var(--display); font-size: clamp(1rem, 1.8vw, 1.2rem); word-break: break-all; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; gap: 40px; } }

.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.contact-form .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 15px; font-weight: 600; }
.field input, .field textarea {
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--deep); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; width: 100%;
  transition: border-color .2s ease, background-color .2s ease;
}
.field input:hover, .field textarea:hover { border-color: #3a4178; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--starlight); outline-offset: 1px; border-color: transparent; background: #1a2048; }
.field textarea { resize: vertical; min-height: 160px; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.form-note { font-size: 14px; color: var(--muted); margin: 0; }
.form-alt { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 600px) { .contact-form { grid-template-columns: 1fr; } }

/* ---------- Pages légales ---------- */
.page { padding: 72px 0 112px; }
.page .container { max-width: 760px; }
.page h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; margin: 0 0 12px; }
.page .updated { color: var(--muted); font-size: 15px; margin: 0 0 48px; }
.page h2 { font-size: 1.2rem; margin: 44px 0 12px; }
.page p, .page li { color: var(--muted); }
.page strong { color: var(--ink); font-weight: 600; }
.todo { background: rgba(255, 138, 91, 0.15); color: var(--photo); padding: 0 4px; border-radius: 3px; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; font-size: 15px; color: var(--muted); }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- 404 et résultat du formulaire ---------- */
.notfound { min-height: 64vh; display: grid; place-items: center; text-align: center; padding: 96px 0; }
.notfound h1 { font-size: clamp(2.6rem, 8vw, 5rem); margin: 0 0 12px; }
.notfound p { color: var(--muted); }
.result h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.result .icon-big { width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; color: #1b0d08; background: radial-gradient(circle at 40% 38%, #ffd7a8, #ff8a5b 45%, #c8432a); }
