/* ══════════════════════════════════════════════════════════
   COMPONENTS — ENCHANTED TOOLS
   Tokens exclusivement depuis tokens.css
   ══════════════════════════════════════════════════════════ */

/* ── Typography globale ──────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: condensed;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.02em;
}

.font-lead {
  font-family: var(--font-lead);
  font-weight: 400;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-tertiary);
  margin-bottom: var(--space-sm);
}

.hero__title-img {
  display: block;
  margin-inline: auto;
  width: min(100%, 640px);
  height: auto;
  margin-bottom: var(--space-lg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Boutons ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 14px var(--space-lg);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: opacity var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
  cursor: pointer;
  border: none;
}
.btn:hover  { opacity: 0.9; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* CTA primaire — jaune signature */
.btn-primary {
  background: var(--color-tertiary);
  color: var(--color-tertiary-fg);
  box-shadow: var(--shadow-big);
}

/* CTA secondaire — outline */
.btn-outline {
  background: transparent;
  color: var(--color-foreground);
  border: 1px solid var(--color-border);
}
.btn-outline:hover { border-color: rgba(255,255,255,0.3); }

/* CTA pre-order — gradient rose */
.btn-preorder {
  background: linear-gradient(40deg, #7a2a81 0%, #570a5e 100%);
  color: #fff;
  box-shadow: var(--shadow-big);
}

/* ── NAV ─────────────────────────────────────────────────── */

#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  background: rgba(12, 23, 65, 0.80);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: var(--space-sm) var(--container-pad);
  gap: var(--space-md);
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: condensed;
  text-transform: uppercase;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--color-foreground);
  flex-shrink: 0;
}

.nav__links {
  display: flex;
  gap: var(--space-lg);
}

.nav__link {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted-fg);
  transition: color var(--duration-fast) var(--ease-out);
}
.nav__link:hover { color: var(--color-foreground); }

.nav__cta {
  flex-shrink: 0;
  font-size: 0.8125rem;
  padding: 10px var(--space-md);
}

.nav__burger { display: none; flex-direction: column; gap: 5px; }
.nav__burger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--color-foreground);
  transition: transform var(--duration-fast) var(--ease-out);
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }

  .nav__links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--color-card);
    padding: var(--space-md);
    gap: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
  }
}

/* ── HERO ────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  overflow: hidden;
  padding-top: 80px; /* nav height */
  background: var(--color-background);
}

@media (min-width: 1024px) {
  .hero { grid-template-columns: 1fr 1fr; }
}

/* Halo derrière Mirokaï */
.hero__halo {
  pointer-events: none;
  position: absolute;
  right: -100px;
  top: 50%;
  transform: translateY(-50%);
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: var(--gradient-bleu-rose);
  filter: blur(80px);
  animation: haloPulse 6s var(--ease-smooth) infinite;
}

.hero__content {
  position: relative;
  padding: var(--space-xl) var(--container-pad);
  z-index: 1;
}

.hero__title {
  font-size: clamp(72px, 12vw, 160px);
  line-height: 0.88;
  margin-bottom: var(--space-md);
}

.hero__title-accent { color: var(--color-secondary); }

.hero__description {
  font-family: var(--font-lead);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  line-height: 1.5;
  color: var(--color-muted-fg);
  max-width: 520px;
  margin-bottom: var(--space-lg);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* Robot Mirokaï */
.hero__robot-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-md);
}

.hero__robot {
  position: relative;
  z-index: 1;
  max-height: 70vh;
  width: auto;
  filter: drop-shadow(-7.32px 36.61px 29.29px rgba(0,0,0,0.40));
  animation: mirokaiFloat 5s var(--ease-smooth) infinite;
}

/* ── MARQUEE ─────────────────────────────────────────────── */

.marquee {
  overflow: hidden;
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding-block: var(--space-sm);
}

.marquee__track {
  display: flex;
  white-space: nowrap;
  animation: marqueeScroll 20s linear infinite;
}

.marquee__item {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: condensed;
  text-transform: uppercase;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  padding-inline: var(--space-md);
  color: var(--color-foreground);
}

.marquee__sep {
  color: var(--color-tertiary);
  padding-inline: var(--space-xs);
}

/* ── FEATURES ────────────────────────────────────────────── */

.features {
  position: relative;
  overflow: hidden;
  background: var(--color-card);
}

.features__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.features__title {
  font-size: clamp(48px, 8vw, 120px);
}

.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .features__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .features__grid { grid-template-columns: repeat(4, 1fr); }
}

.feature-card {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-big);
  transition: transform var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.2);
}

.feature-card__icon {
  font-size: 1.25rem;
  color: var(--color-tertiary);
  margin-bottom: var(--space-sm);
}

.feature-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: condensed;
  font-size: 1.5rem;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
  line-height: 1;
}

.feature-card__body {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-muted-fg);
}

/* ── GALLERY ─────────────────────────────────────────────── */

.gallery {
  position: relative;
  overflow: hidden;
}

.gallery__header {
  margin-bottom: var(--space-lg);
}

.gallery__title {
  font-size: clamp(48px, 8vw, 120px);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-sm);
}

.gallery__item {
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.gallery__img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}
.gallery__item:hover .gallery__img { transform: scale(1.06); }

/* ── SPECS (tableau de comparaison signature) ────────────── */

.specs {
  position: relative;
  overflow: hidden;
  background: var(--color-card);
}

.specs__header {
  margin-bottom: var(--space-lg);
}

.specs__title {
  font-size: clamp(48px, 8vw, 120px);
}

.specs__table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.specs__table {
  width: 100%;
  border-collapse: collapse;
}

.specs__table th,
.specs__table td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border);
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.9375rem;
}

/* Première colonne — label feature */
.specs__table td:first-child,
.specs__table th:first-child {
  text-align: left;
  font-family: var(--font-display);
  font-stretch: condensed;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.1rem;
  color: var(--color-foreground);
}

/* Header colonnes */
.specs__table th {
  font-family: var(--font-display);
  font-stretch: condensed;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.25rem;
  background: var(--color-background);
  color: var(--color-foreground);
}
.specs__table th:first-of-type { color: var(--color-tertiary); }

/* Rows alternées */
.specs__table tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

/* Cercle plein — Mirokaï */
.spec-dot {
  display: inline-block;
  width: 20px; height: 20px;
  border-radius: 50%;
}
.spec-dot--full  { background: var(--color-tertiary); }
.spec-dot--empty {
  background: transparent;
  border: 1.5px solid var(--color-tertiary);
  opacity: 0.5;
}

/* ── PRE-ORDER ───────────────────────────────────────────── */

.preorder {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.preorder__title {
  font-size: clamp(60px, 10vw, 160px);
  margin-bottom: var(--space-md);
}

.preorder__description {
  font-family: var(--font-lead);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--color-muted-fg);
  max-width: 560px;
  margin: 0 auto var(--space-lg);
  line-height: 1.55;
}

.preorder__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 480px;
  margin-inline: auto;
}

.preorder__input {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px var(--space-md);
  color: var(--color-foreground);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  box-shadow: var(--shadow-interne);
  transition: border-color var(--duration-fast);
}
.preorder__input:focus {
  outline: none;
  border-color: var(--color-ring);
}
.preorder__input::placeholder { color: var(--color-muted-fg); }

.preorder__disclaimer {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--color-muted-fg);
  margin-top: var(--space-xs);
}

/* ── FOOTER ──────────────────────────────────────────────── */

#footer {
  background: var(--color-background);
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) var(--container-pad);
}

.footer__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-align: center;
}

@media (min-width: 640px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer__copy {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--color-muted-fg);
}

.footer__links {
  display: flex;
  gap: var(--space-md);
}

.footer__link {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-muted-fg);
  transition: color var(--duration-fast);
}
.footer__link:hover { color: var(--color-foreground); }
