/* ═══════════════════════════════════════════════════════════
   LYRICX MATRIX — shared account UI
   Matches the design language of LYRICX Matrix.dc.html
   ═══════════════════════════════════════════════════════════ */

:root {
  --paper: #F5F5F3;
  --white: #FFFFFF;
  --ink: #111111;
  --muted: #6b6b68;
  --soft: #8a8a86;
  --faint: #9a9a96;
  --line: #ECECEA;
  --line-mid: #E3E3E0;
  --dark: #070707;
  --panel-dark: #0f0f0f;
  --line-dark: #1d1d1d;
  --green: #1ED760;
  --red: #ff5c50;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-hard: cubic-bezier(0.83, 0, 0.17, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Mazzard L', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--ink); text-decoration: none; }
::selection { background: var(--ink); color: var(--white); }

.lx-shell {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

/* ── Keyframes ─────────────────────────────────────────── */
@keyframes lxFadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes lxMaskUp { from { transform: translateY(112%); } to { transform: none; } }
@keyframes lxPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes lxShimmer { from { background-position: -460px 0; } to { background-position: 460px 0; } }
@keyframes lxRingPulse {
  0% { box-shadow: 0 0 0 0 rgba(30, 215, 96, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(30, 215, 96, 0); }
  100% { box-shadow: 0 0 0 0 rgba(30, 215, 96, 0); }
}

.lx-fade-up { animation: lxFadeUp 0.9s var(--ease) both; }
.lx-mask { display: block; overflow: hidden; }
.lx-mask > * { display: block; animation: lxMaskUp 0.8s var(--ease) both; }

/* ── Nav ───────────────────────────────────────────────── */
.lx-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  height: 68px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(250, 250, 249, 0.78);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.lx-nav__inner {
  max-width: 1360px;
  margin: 0 auto;
  height: 100%;
  padding: 0 clamp(20px, 5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.lx-wordmark { display: flex; flex-direction: column; line-height: 1; }
.lx-wordmark b { font-weight: 700; letter-spacing: 0.34em; font-size: 15px; color: var(--ink); }
.lx-wordmark span { font-weight: 500; letter-spacing: 0.56em; font-size: 8px; color: #999; margin-top: 3px; }

.lx-nav__links { display: flex; align-items: center; gap: 32px; font-size: 13.5px; font-weight: 500; }
.lx-nav__links a { color: #555; transition: color 0.2s ease; }
.lx-nav__links a:hover { color: #000; }
.lx-nav__links a.is-active { color: #000; }

.lx-nav__cta { display: flex; align-items: center; gap: 14px; }

/* ── Labels & headings ─────────────────────────────────── */
.lx-label {
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--soft);
  font-weight: 500;
  text-transform: uppercase;
}
.lx-label--dark { color: #7a7a76; }

.lx-h1 {
  font-size: clamp(34px, 4.6vw, 55px);
  line-height: 1.07;
  font-weight: 600;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin: 22px 0 0;
}

.lx-h2 {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 18px 0 0;
}

.lx-lead {
  margin: 24px 0 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 360px;
}

/* ── Buttons ───────────────────────────────────────────── */
.lx-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.2s ease, box-shadow 0.25s var(--ease), color 0.2s ease, border-color 0.2s ease;
}
.lx-btn:hover { background: #000; color: #fff; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18); }
.lx-btn:active { transform: translateY(0); }

.lx-btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid #c9c9c5;
  box-shadow: none;
}
.lx-btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.lx-btn--ghost-dark {
  background: transparent;
  color: #fff;
  border: 1px solid #2e2e2c;
}
.lx-btn--ghost-dark:hover { background: #fff; color: var(--ink); border-color: #fff; }

.lx-btn--danger { background: transparent; border: 1px solid #e5c9c6; color: #b3423a; }
.lx-btn--danger:hover { background: #b3423a; border-color: #b3423a; color: #fff; box-shadow: 0 12px 28px rgba(179, 66, 58, 0.25); }

.lx-btn--sm { padding: 10px 20px; font-size: 13px; }

.lx-btn--spotify .lx-spotify-mark { color: var(--green); flex: none; }

/* ── Chips / badges ────────────────────────────────────── */
.lx-badges { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.lx-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--line-mid);
  background: var(--white);
  color: #444;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.lx-badge:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.07); }
.lx-badge svg, .lx-badge i { flex: none; }

.lx-badge--premium { border-color: rgba(30, 215, 96, 0.4); background: rgba(30, 215, 96, 0.09); color: #0e7a38; }
.lx-badge--flag { font-size: 13px; }

/* ── Meta strip (features-row style) ───────────────────── */
.lx-strip {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.lx-strip__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.lx-strip__cell {
  padding: 44px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  min-width: 0;
}
.lx-strip__cell + .lx-strip__cell { border-left: 1px solid var(--line); }
.lx-strip__cell i { color: var(--ink); }
.lx-strip__k { font-size: 11px; letter-spacing: 0.24em; color: var(--faint); font-weight: 500; text-transform: uppercase; }
.lx-strip__v { font-size: 15px; font-weight: 600; color: var(--ink); margin-top: -4px; overflow-wrap: anywhere; max-width: 100%; }

/* ── Dark section ──────────────────────────────────────── */
.lx-dark { background: var(--dark); color: #fff; }

.lx-card-dark {
  background: var(--panel-dark);
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.35s var(--ease), border-color 0.3s ease, box-shadow 0.35s var(--ease);
}
.lx-card-dark:hover { transform: translateY(-4px); border-color: #2c2c2a; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5); }

/* ── Status dot ────────────────────────────────────────── */
.lx-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.lx-dot--on { background: var(--green); animation: lxRingPulse 2.4s var(--ease) infinite; }
.lx-dot--off { background: #3a3a38; }

/* ── Forms ─────────────────────────────────────────────── */
.lx-field { display: flex; flex-direction: column; gap: 10px; }
.lx-field__label { font-size: 11px; letter-spacing: 0.24em; color: var(--faint); font-weight: 500; text-transform: uppercase; }

.lx-input-wrap {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line-mid);
  border-radius: 14px;
  padding: 0 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.lx-input-wrap:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.07); }
.lx-input-wrap.is-invalid { border-color: #d4574c; box-shadow: 0 0 0 3px rgba(212, 87, 76, 0.12); }
.lx-input-wrap .at { color: #b5b5b0; font-weight: 600; font-size: 15px; margin-right: 2px; }

.lx-input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  padding: 15px 0;
  min-width: 0;
}
.lx-input::placeholder { color: #c2c2be; font-weight: 400; }

.lx-hint { font-size: 12px; color: var(--faint); line-height: 1.6; }

/* toggle switch */
.lx-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line-mid);
  border-radius: 14px;
  background: var(--white);
}
.lx-switch-row__txt { display: flex; flex-direction: column; gap: 4px; }
.lx-switch-row__title { font-size: 14px; font-weight: 600; color: var(--ink); }
.lx-switch-row__sub { font-size: 12px; color: var(--soft); line-height: 1.55; }

.lx-switch { position: relative; width: 46px; height: 27px; flex: none; cursor: pointer; }
.lx-switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.lx-switch .track {
  position: absolute; inset: 0;
  border-radius: 999px;
  background: #dcdcd8;
  transition: background 0.25s ease;
}
.lx-switch .thumb {
  position: absolute; top: 3px; left: 3px;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  transition: transform 0.3s var(--ease);
}
.lx-switch input:checked ~ .track { background: var(--ink); }
.lx-switch input:checked ~ .thumb { transform: translateX(19px); }
.lx-switch input:focus-visible ~ .track { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ── Banners ───────────────────────────────────────────── */
.lx-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
}
.lx-banner--ok { background: rgba(30, 215, 96, 0.1); border: 1px solid rgba(30, 215, 96, 0.35); color: #0e7a38; }
.lx-banner--info { background: rgba(17, 17, 17, 0.05); border: 1px solid var(--line-mid); color: #444; }
.lx-banner--err { background: rgba(212, 87, 76, 0.08); border: 1px solid rgba(212, 87, 76, 0.4); color: #b3423a; }

/* ── Skeleton ──────────────────────────────────────────── */
.lx-skel {
  border-radius: 10px;
  background: linear-gradient(90deg, #ebebe8 25%, #f6f6f4 50%, #ebebe8 75%);
  background-size: 920px 100%;
  animation: lxShimmer 1.4s linear infinite;
}

/* ── 3D device ─────────────────────────────────────────── */
.lx-dev3d-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 2000px;
  perspective-origin: 50% 42%;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  /* le scaler 644px ne doit jamais élargir la page : on clippe,
     fit() garantit que le device tient dans la stage */
  overflow: hidden;
}
.lx-dev3d-scaler {
  /* absolu + centré : le device (644px) ne contribue jamais à la largeur
     de la page, le scale() se charge de le faire tenir dans la stage */
  position: absolute;
  left: 50%;
  top: 50%;
  width: 644px;
  height: 348px;
  margin: -174px 0 0 -322px;
  transform-style: preserve-3d;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Footer ────────────────────────────────────────────── */
.lx-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0;
  font-size: 12px;
  color: var(--faint);
  letter-spacing: 0.08em;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  .lx-nav__links { display: none; }
  .lx-strip__grid { grid-template-columns: repeat(2, 1fr); }
  .lx-strip__cell { padding: 32px 12px; }
  .lx-strip__cell:nth-child(odd) { border-left: 0; }
  .lx-strip__cell:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 560px) {
  .lx-strip__grid { grid-template-columns: 1fr 1fr; }
  .lx-hide-sm { display: none !important; }
  .lx-nav__inner { gap: 16px; }
}

/* ── Reduced motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
