/* Reset minimal */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Mise en page : une colonne aérée ; le paquet de cartes Taktuk en éventail porte toute l'identité, le reste reste sobre. */
:root {
  --bg: #f7f7fb;
  --surface: #ffffff;
  --fg: #18181b;
  --muted: #52525b;
  --line: #e4e4ec;
  --accent: #6366f1;
  --accent-2: #d946ef;
  --grad-a: #8360c3;
  --grad-b: #2ebf91;
  --grad-text-a: #8360c3;
  --spread: 40px;
  --on-accent: #ffffff;
  --card-ink: #18181b;
  --font-display: 'Unbounded', 'Arial Rounded MT Bold', 'Trebuchet MS', sans-serif;
  --font-body: 'Figtree', 'Segoe UI', system-ui, sans-serif;
  --radius: 18px;
  --max: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090b; --surface: #18181b; --fg: #fafafa; --muted: #b4b4bd; --line: #2e2e36;
    --accent: #f88181; --accent-2: #e879f9; --grad-a: #5a189a; --grad-b: #ff9e00; --grad-text-a: #e879f9;
    --on-accent: #18181b; --card-ink: #fafafa; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09090b; --surface: #18181b; --fg: #fafafa; --muted: #b4b4bd; --line: #2e2e36;
  --accent: #f88181; --accent-2: #e879f9; --grad-a: #5a189a; --grad-b: #ff9e00; --grad-text-a: #e879f9;
  --on-accent: #18181b; --card-ink: #fafafa; color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* En-tête */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 10; background: var(--bg);
}
header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.9rem; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: var(--accent); }
nav { display: flex; gap: 1.25rem; font-weight: 500; font-size: 0.95rem; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--fg); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; text-wrap: balance; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
.eyebrow { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }

/* Héros */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 3rem; padding-block: 4.5rem 4rem; }
.hero > * { min-width: 0; }
.hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.6rem); margin-top: 0.75rem; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--grad-text-a), var(--grad-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lede { margin-top: 1.25rem; max-width: 34rem; color: var(--muted); font-size: 1.15rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.85rem 1.4rem; border-radius: 999px;
  font-weight: 600; text-decoration: none; border: 1px solid var(--line); background: var(--surface);
  transition: transform 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* Paquet de cartes en éventail */
.deck { position: relative; height: 340px; max-width: 100%; }
.card {
  position: absolute; left: 50%; top: 50%; width: 210px; max-width: 70%; aspect-ratio: 5 / 7;
  border-radius: 20px; padding: 1.25rem; display: flex; flex-direction: column; justify-content: space-between;
  background: var(--surface); color: var(--card-ink); border: 1px solid var(--line);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--grad-a) 22%, transparent);
  transform-origin: 50% 120%;
  transition: transform 0.5s cubic-bezier(.2,.8,.2,1);
}
.card small { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.card p { font-family: var(--font-display); font-weight: 500; font-size: 1.02rem; line-height: 1.3; }
.card .tag { font-size: 0.8rem; color: var(--muted); }
.card.c1 { transform: translate(-50%, -50%) rotate(-16deg) translateX(calc(var(--spread) * -1)); }
.card.c2 { transform: translate(-50%, -50%) rotate(-3deg); }
.card.c3 {
  transform: translate(-50%, -50%) rotate(12deg) translateX(var(--spread));
  background: linear-gradient(150deg, var(--grad-a), var(--grad-b)); color: #fff; border-color: transparent;
}
.card.c3 small, .card.c3 .tag { color: rgba(255,255,255,0.85); }
.deck:hover .card.c1 { transform: translate(-50%, -50%) rotate(-22deg) translateX(calc(var(--spread) * -1.6)); }
.deck:hover .card.c3 { transform: translate(-50%, -50%) rotate(18deg) translateX(calc(var(--spread) * 1.6)); }

section { padding-block: 4rem; }
section + section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 0.75rem; max-width: 40rem; }
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.section-head p { color: var(--muted); }

/* Taktuk */
.games { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: 2.5rem; }
.game { padding: 1.25rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 0.4rem; align-content: start; }
.game h3 { font-size: 1rem; }
.game p { color: var(--muted); font-size: 0.95rem; }
.game .kind { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-2); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-top: 3rem; }
.feature { display: grid; gap: 0.5rem; align-content: start; }
.feature h3 { font-size: 1.05rem; }
.feature p { color: var(--muted); font-size: 0.98rem; }
.feature .dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); }

.status { margin-top: 2.5rem; display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.55rem 1rem; border-radius: 999px; border: 1px dashed var(--line); font-weight: 500; font-size: 0.95rem; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grad-b); }

/* Studio */
.studio { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 3rem; align-items: start; }
.studio > * { min-width: 0; }
.principles { display: grid; gap: 1.5rem; }
.principle { display: grid; gap: 0.35rem; padding-left: 1rem; border-left: 2px solid var(--line); }
.principle h3 { font-size: 1.05rem; }
.principle p { color: var(--muted); }

/* Contact */
.contact { text-align: left; display: grid; gap: 1.25rem; justify-items: start; }
.mail { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.mail code {
  font-family: var(--font-display); font-size: clamp(1.1rem, 3vw, 1.6rem); font-weight: 500;
  user-select: all; overflow-wrap: anywhere;
}
.copy { cursor: pointer; font: inherit; }
.copied { color: var(--accent); font-weight: 600; font-size: 0.9rem; }

footer { border-top: 1px solid var(--line); padding-block: 2rem; color: var(--muted); font-size: 0.9rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }

@media (max-width: 860px) {
  .hero, .studio { grid-template-columns: 1fr; }
  .hero { padding-block: 3rem; gap: 2rem; }
  .games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 480px) {
  nav { gap: 0.9rem; font-size: 0.9rem; }
  nav a.optional { display: none; }
  .games { grid-template-columns: 1fr; }
  .deck { height: 290px; --spread: 22px; }
  .card { width: 158px; padding: 1rem; }
  .card p { font-size: 0.92rem; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .btn { transition: none; }
}
