/* ============================================================
   Mysik — mysik.app · charte du projet Claude Design « Mysik — site »
   Tokens : design-valide/CLAUDE.md (direction 6A « ticket flare · holo »)
   Sombre par défaut, clair via prefers-color-scheme.
   ============================================================ */

:root {
  --bg: #0A0A0A;
  --surface: #1A1815;
  --sunk: #141210;
  --border: #2A2620;
  --hair: #1C1A17;
  --thumb: #3A352E;
  --text: #F2EFE6;
  --text2: #A29D93;
  --label: #8A8579;
  --dim: #5E594F;
  --accent: #FF3B14;
  --accent-press: #C42B08;
  --success: #57C79A;
  --on-accent: #FFF1EC;
  --holo-1: #FF5EA8;
  --holo-2: #FFD36E;
  --holo-3: #7CF0E0;
  --holo-4: #8E7BFF;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #F2EFE6;
    --surface: #FAF8F2;
    --sunk: #EFEBDF;
    --border: #DCD6C6;
    --hair: #E6E1D2;
    --thumb: #CFC8B6;
    --text: #0A0A0A;
    --text2: #6E6A60;
    --label: #7A7568;
    --dim: #A8A296;
    --accent: #E5330F;
    --accent-press: #B7250A;
    --success: #2F8F68;
    --on-accent: #FFF6F3;
    --holo-1: #E5459A;
    --holo-2: #E0B14C;
    --holo-3: #4FC9B8;
    --holo-4: #7A66E0;
  }
}

/* ---------- base ---------- */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

::selection { background: var(--accent); color: var(--on-accent); }

/* la serif éditoriale des grands titres */
.serif,
h1, h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

/* la voix « machine à tickets » : étiquettes mono majuscules */
.mono {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--label);
}

.mono-xs { font-size: 10px; letter-spacing: 0.16em; }

/* mots de mood / mots-clés en dégradé nacré — titres uniquement */
.holo-word {
  background: linear-gradient(100deg, var(--holo-1), var(--holo-2), var(--holo-3), var(--holo-4));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- structure ---------- */

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 20px; }

.section { padding: 64px 0; }
@media (min-width: 768px) { .section { padding: 96px 0; } }

.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(30px, 4.5vw, 44px); }

/* ---------- navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 24px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
}

.nav-links { display: none; gap: 28px; }
@media (min-width: 768px) { .nav-links { display: flex; } }

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
}
.nav-links a:hover { color: var(--text); }

/* ---------- badge App Store « Bientôt disponible » ---------- */

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text);
}
.store-badge:hover { border-color: var(--thumb); }

.store-badge .apple {
  width: 20px;
  height: 20px;
  flex: none;
  fill: currentColor;
}

.store-badge .lines { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.store-badge .small { font-family: 'IBM Plex Mono', monospace; font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); }
.store-badge .big { font-size: 15px; font-weight: 600; }

.store-badge.compact { padding: 7px 14px; }
.store-badge.compact .big { font-size: 13px; }

/* ---------- boutons ---------- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--accent-press); }

/* ---------- le TICKET (composant signature) ----------
   Bord dentelé par mask : deux conic-gradient (haut/bas) + linear central.
   Liseré holo 1,5 px : couche conic-gradient sous le contenu (opacité .85),
   le contenu porte le même mask — décalé de 1,5 px, le nacré affleure. */

.ticket-mask {
  -webkit-mask:
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 16px 8px repeat-x,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 8px repeat-x,
    linear-gradient(#000 0 0) center / 100% calc(100% - 15px) no-repeat;
  mask:
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 16px 8px repeat-x,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 8px repeat-x,
    linear-gradient(#000 0 0) center / 100% calc(100% - 15px) no-repeat;
}

.ticket {
  position: relative;
  padding: 1.5px;
}

.ticket.holo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(from 210deg, var(--holo-1), var(--holo-2), var(--holo-3), var(--holo-4), var(--holo-1));
  opacity: 0.85;
}
.ticket.holo::before {
  -webkit-mask:
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 16px 8px repeat-x,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 8px repeat-x,
    linear-gradient(#000 0 0) center / 100% calc(100% - 15px) no-repeat;
  mask:
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 16px 8px repeat-x,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 8px repeat-x,
    linear-gradient(#000 0 0) center / 100% calc(100% - 15px) no-repeat;
}

.ticket-body {
  position: relative;
  background: var(--surface);
}

/* ticket sans liseré (offre gratuite) : simple bord dentelé + filet latéral */
.ticket.plain { padding: 0; }
.ticket.plain .ticket-body { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }

.ticket-inner { padding: 28px 24px; display: flex; flex-direction: column; gap: 18px; }

.ticket-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--hair);
}
.ticket-row:first-child { border-top: none; }

/* ---------- FAQ (details/summary, zéro JS obligatoire) ---------- */

.faq { border-top: 1px solid var(--border); }

.faq details { border-bottom: 1px solid var(--border); }

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 4px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }

.faq summary .tick {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  color: var(--label);
  flex: none;
  transition: transform 0.2s ease;
}
.faq details[open] summary .tick { transform: rotate(45deg); color: var(--accent); }

.faq .answer { padding: 0 4px 20px; color: var(--text2); max-width: 640px; }

/* ---------- pages légales ---------- */

.legal { padding: 64px 0 96px; }

.legal h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 8px; }

.legal .updated { margin-bottom: 48px; }

.legal section { margin-top: 40px; }

.legal h2.label-title {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 12px;
}

.legal p { color: var(--text2); margin-top: 12px; }
.legal p strong { color: var(--text); font-weight: 600; }
.legal ul { margin: 12px 0 0 20px; color: var(--text2); }
.legal li { margin-top: 8px; }
.legal a { color: var(--text); }

.toc {
  border: 1px solid var(--border);
  padding: 20px 24px;
  margin-bottom: 16px;
}
.toc ol { margin: 12px 0 0 20px; }
.toc li { margin-top: 6px; }
.toc a { color: var(--text2); text-decoration: none; font-size: 14px; }
.toc a:hover { color: var(--text); }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--border); padding: 56px 0 40px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }

.footer .tagline { color: var(--text2); margin-top: 8px; font-size: 15px; }

.footer h3 {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 14px;
}

.footer ul { list-style: none; }
.footer li { margin-top: 10px; }
.footer li a { color: var(--text2); text-decoration: none; font-size: 14px; }
.footer li a:hover { color: var(--text); }

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--hair);
  color: var(--dim);
  font-size: 13px;
  line-height: 1.6;
}
