/* Game Duo — feuille commune à toutes les pages (générées par outils/genere.mjs). */

:root {
  --bg: #0c090b;
  --bg-2: #140f12;
  --surface: rgb(255 255 255 / 3.5%);
  --surface-2: rgb(255 255 255 / 6%);
  --line: rgb(255 255 255 / 9%);
  --line-2: rgb(255 255 255 / 16%);
  --text: #f5eee7;
  --muted: #b9ada3;
  --faint: #847870;
  --coral: #f06a4f;
  --gold: #f0b452;
  --gold-soft: #f7d79a;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 28px;
  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;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Lueurs et grain du fond, fixés derrière tout le contenu. */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vmax 45vmax at 12% -8%, rgb(240 106 79 / 17%), transparent 62%),
    radial-gradient(55vmax 40vmax at 100% 18%, rgb(240 180 82 / 11%), transparent 60%),
    radial-gradient(70vmax 50vmax at 50% 110%, rgb(150 60 110 / 12%), transparent 65%),
    var(--bg);
}
.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--gold-soft); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ─── En-tête ─────────────────────────────────────────── */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 22px;
  position: relative;
  z-index: 5;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}
.brand img { width: 42px; height: 42px; flex: none; }
.wordmark {
  font: 500 23px/1 var(--serif);
  letter-spacing: -0.01em;
}
.wordmark i { color: var(--gold); }

/* Sélecteur de langue : un <details>, sans JavaScript. */
.langs { position: relative; }
.langs summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 7px 14px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.langs[open] summary, .langs summary:hover { color: var(--text); border-color: var(--line-2); }
.langs ul {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  margin: 0;
  padding: 6px;
  list-style: none;
  min-width: 170px;
  background: #1b1418;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgb(0 0 0 / 50%);
}
.langs li a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}
.langs li a:hover { background: var(--surface-2); color: var(--text); }
.langs li a[aria-current] { color: var(--gold-soft); }

/* ─── Accroche ────────────────────────────────────────── */
.hero { padding-top: 64px; padding-bottom: 72px; }
/* Bloc (et non flex) : sur deux lignes, le trait reste au début du texte. */
.eyebrow {
  display: block;
  margin: 0 0 22px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  vertical-align: middle;
  margin: -2px 10px 0 0;
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.hero h1 {
  margin: 0 0 24px;
  font: 400 clamp(44px, 8.4vw, 96px)/1.0 var(--serif);
  letter-spacing: -0.03em;
  max-width: 13ch;
}
.hero h1 em {
  font-style: italic;
  background: linear-gradient(100deg, var(--coral) 10%, var(--gold) 70%, var(--gold-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.02em;
}
.hero p {
  margin: 0 0 34px;
  max-width: 50ch;
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--muted);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  color: #1a1012;
  background: linear-gradient(180deg, #fbe2b0, var(--gold));
  box-shadow: 0 8px 24px rgb(240 180 82 / 22%), inset 0 1px 0 rgb(255 255 255 / 50%);
}
.btn-primary:hover { color: #1a1012; }
.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line-2);
  background: var(--surface);
}
.btn-ghost:hover { border-color: rgb(255 255 255 / 30%); }
.arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateY(2px); }

/* ─── Sections ────────────────────────────────────────── */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin: 0 0 26px;
}
.section-head h2 {
  margin: 0;
  font: 400 clamp(30px, 4.4vw, 44px)/1.1 var(--serif);
  letter-spacing: -0.02em;
}
.section-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-2), transparent);
}

/* ─── Jeux ────────────────────────────────────────────── */
.games {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 760px) {
  .games { grid-template-columns: 1fr 1fr; }
}
.game {
  --tint: 240 106 79;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 80% at 0% 0%, rgb(var(--tint) / 16%), transparent 55%),
    linear-gradient(180deg, rgb(255 255 255 / 4.5%), rgb(255 255 255 / 1.5%));
  box-shadow: 0 1px 0 rgb(255 255 255 / 6%) inset, 0 30px 60px -30px rgb(0 0 0 / 70%);
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease;
}
.game:hover { transform: translateY(-3px); border-color: rgb(var(--tint) / 35%); }
.game--flam { --tint: 236 84 92; }
.game--tat { --tint: 232 118 52; }
.game-head { display: flex; align-items: center; gap: 20px; }
.game-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  flex: none;
  box-shadow: 0 14px 34px -10px rgb(var(--tint) / 55%), 0 0 0 1px rgb(255 255 255 / 10%);
}
.game h3 {
  margin: 0 0 4px;
  font: 500 clamp(28px, 3.4vw, 34px)/1.1 var(--serif);
  letter-spacing: -0.015em;
}
.game .sub {
  margin: 0;
  font: italic 17px/1.35 var(--serif);
  color: var(--gold-soft);
}
.game .desc { margin: 0; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgb(0 0 0 / 20%);
  color: var(--muted);
  white-space: nowrap;
}
.badge--age { color: #ffb4a3; border-color: rgb(240 106 79 / 40%); }
.badge--soon { color: var(--gold-soft); border-color: rgb(240 180 82 / 35%); }
.game .links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: auto;
  padding-top: 6px;
}
.link-more { font-weight: 600; font-size: 15px; }

/* Jeux à venir : toujours sur sa propre ligne, sous les jeux. */
.future {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 30px;
  border-radius: var(--radius);
  border: 1px dashed var(--line-2);
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / 3%) 50%, transparent 70%) 0 0 / 250% 100%;
  animation: shimmer 6s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 130% 0; } to { background-position: -30% 0; } }
@media (prefers-reduced-motion: reduce) { .future { animation: none; } }
.future-icon {
  width: 72px;
  height: 72px;
  flex: none;
  opacity: 0.55;
  filter: grayscale(0.4);
}
.future h3 {
  margin: 8px 0 4px;
  font: 500 26px/1.15 var(--serif);
}
.future p { margin: 0; color: var(--muted); }

/* ─── Principes ───────────────────────────────────────── */
.values {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding-top: 96px;
  padding-bottom: 24px;
}
@media (min-width: 760px) {
  .values { grid-template-columns: repeat(3, 1fr); gap: 36px; }
}
.value { border-top: 1px solid var(--line-2); padding-top: 20px; }
.value .num {
  display: block;
  font: italic 15px/1 var(--serif);
  color: var(--gold);
  margin-bottom: 14px;
}
.value h3 { margin: 0 0 8px; font: 500 22px/1.25 var(--serif); }
.value p { margin: 0; color: var(--muted); font-size: 16px; }

/* ─── Contact ─────────────────────────────────────────── */
.contact { padding-top: 72px; }
.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    radial-gradient(90% 140% at 100% 0%, rgb(240 180 82 / 14%), transparent 60%),
    radial-gradient(80% 120% at 0% 100%, rgb(240 106 79 / 12%), transparent 60%),
    var(--bg-2);
}
.contact-card > div { flex: 1 1 320px; }
.contact h2 {
  margin: 0 0 10px;
  font: 400 clamp(30px, 4.4vw, 42px)/1.1 var(--serif);
  letter-spacing: -0.02em;
}
.contact p { margin: 0; color: var(--muted); max-width: 48ch; }

/* ─── Pied de page ────────────────────────────────────── */
.foot {
  margin-top: 80px;
  padding-top: 28px;
  padding-bottom: 44px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  font-size: 14px;
  color: var(--faint);
}
.foot-brand { display: inline-flex; align-items: center; gap: 10px; }
.foot-brand img { width: 26px; height: 26px; }
.foot a { color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: var(--text); }
.foot nav a[aria-current] { color: var(--gold-soft); }

/* ─── Pages de texte (mentions légales, 404) ──────────── */
.doc { max-width: 760px; padding-top: 30px; }
.doc h1 {
  font: 400 clamp(38px, 6vw, 60px)/1.05 var(--serif);
  letter-spacing: -0.025em;
  margin: 10px 0 30px;
}
.doc h2 {
  font: 500 22px/1.3 var(--serif);
  margin: 34px 0 8px;
  color: var(--gold-soft);
}
.doc p { color: var(--muted); margin: 8px 0; }
.doc strong { color: var(--text); font-weight: 600; }

/* ─── Petits écrans et paysage sur téléphone ──────────── */
@media (max-width: 520px) {
  .hero { padding-top: 34px; padding-bottom: 52px; }
  .game { padding: 24px; }
  .game-icon { width: 78px; height: 78px; border-radius: 18px; }
  .future { flex-direction: column; align-items: flex-start; padding: 24px; }
  .contact-card { padding: 28px 24px; }
  .wordmark { font-size: 21px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .top { padding-top: 12px; padding-bottom: 12px; }
  .hero { padding-top: 22px; padding-bottom: 40px; }
  .hero h1 { font-size: clamp(40px, 7vw, 64px); }
  .values { padding-top: 64px; }
}
