:root {
  --bg: #1a0c28;
  --bg-2: #2a1244;
  --line: #5c3178;
  --ink: #fbf7ff;
  --muted: #d7c4e6;
  --gold: #ff3c69;
  --gold-2: #ffd0dc;
  --moss: #5bc5f2;
  --clay: #f08159;
  --chip: #3a1860;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 10% -10%, color-mix(in srgb, var(--gold) 28%, transparent), transparent 60%),
    radial-gradient(700px 380px at 100% 0%, color-mix(in srgb, var(--moss) 18%, transparent), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  line-height: 1.45;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: Palatino, "Palatino Linotype", "Iowan Old Style", Georgia, serif; font-weight: 600; }

.top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  padding: 28px 28px 0;
  max-width: 1180px;
  margin: 0 auto;
}
.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
}
.mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  box-shadow: inset 0 0 0 7px var(--chip);
  flex: none;
}
.rhythm { color: var(--muted); font-size: 13px; margin-top: 2px; }
.eyebrow {
  color: var(--gold-2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
}
h1 { font-size: 34px; letter-spacing: -0.03em; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button, .ghost, .primary {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 8px 14px;
}
.tabs button.is-active, .primary {
  background: var(--gold);
  color: #241b0c;
  border-color: var(--gold);
}
.ghost:hover, .tabs button:hover { border-color: var(--gold); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 22px 28px 48px; }
.foot {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px 36px;
  color: var(--muted);
  font-size: 13px;
}

.hero, .card, .panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), transparent 40%), var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.hero { padding: 26px; display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 22px; }
.kicker { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.draw-date { font-size: 28px; margin-bottom: 16px; }
.balls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ball, .dream, .extra {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--chip);
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.ball.sm, .dream.sm { width: 34px; height: 34px; font-size: 14px; }
.ball.hit { background: color-mix(in srgb, var(--moss) 35%, var(--chip)); border-color: var(--moss); color: var(--ink); }
.dream, .extra {
  background: transparent;
  border: 2px dashed var(--gold);
  color: var(--gold-2);
}
.dream.hit, .extra.hit { background: rgba(228, 177, 90, 0.18); }
.games {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 1180px;
  margin: 16px auto 0;
  padding: 0 28px;
}
.games button {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 8px 14px 8px 12px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.games button::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
}
.games button[data-game="eurodreams"] { color: #ff3c69; }
.games button[data-game="loto"] { color: #00a0e1; }
.games button[data-game="euromillions"] { color: #eebb05; }
.games button[data-game="keno"] { color: #d70073; }
.games button.is-on { background: var(--ink); color: #1a160f; border-color: var(--ink); }
.multi {
  border-radius: 8px;
  padding: 4px 8px;
  border: 1px solid var(--gold);
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 700;
}
.jackpot {
  padding: 18px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg) 72%, black);
  border: 1px solid var(--line);
}
.jackpot strong { display: block; font-size: 28px; color: var(--gold-2); font-family: Palatino, Georgia, serif; }
.jackpot p { color: var(--muted); margin-top: 8px; font-size: 14px; }

.grid-2 { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; margin-top: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.card, .panel { padding: 18px; }
.card h2, .panel h2, .panel h3 { font-size: 22px; margin-bottom: 6px; }
.sub { color: var(--muted); margin-bottom: 14px; font-size: 14px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 550; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
th, td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.pos { color: var(--moss); }
.neg { color: var(--clay); }

.freq {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
}
.cell {
  background: #222a1b;
  border-radius: 12px;
  padding: 7px 4px 6px;
  text-align: center;
  border: 1px solid transparent;
}
.cell b { display: block; font-size: 15px; }
.cell span { color: var(--muted); font-size: 11px; }
.bar {
  height: 4px;
  margin-top: 6px;
  border-radius: 99px;
  background: #3a3324;
  overflow: hidden;
}
.bar i { display: block; height: 100%; background: var(--gold); }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar button[aria-pressed="true"] { background: var(--ink); color: #1a160f; border-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 8px 6px 6px;
  border-radius: 999px;
  background: #222a1b;
  border: 1px solid var(--line);
  font-size: 14px;
}
.stats { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.stats div { min-width: 120px; }
.stats b { display: block; font-size: 22px; font-family: Palatino, Georgia, serif; }

.draw-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--muted); margin: 4px 0 8px; }
.group { margin-top: 18px; }
.group header { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 8px; }
.pill {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.pill.win { color: #10210f; background: var(--moss); border-color: var(--moss); }
.grid-line {
  display: grid;
  grid-template-columns: 150px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.method { font-size: 14px; }
.method small { display: block; color: var(--muted); }
.gain { text-align: right; font-variant-numeric: tabular-nums; }
.gain small { display: block; color: var(--muted); font-size: 12px; }
.icon-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px;
}

.form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin-top: 8px;
}
label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
label.checkline { display: flex; align-items: center; gap: 8px; align-self: center; }
select, input[type="number"], input[type="text"] {
  background: #12180f;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  width: 72px;
}
select { width: auto; min-width: 92px; }
.notice, .error {
  padding: 10px 12px;
  border-radius: 12px;
  background: #2a2618;
  color: var(--gold-2);
  font-size: 14px;
  margin: 8px 0;
}
.error { background: #3a221c; color: #f0c2b6; }
.methods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.methods article { padding: 12px; border-radius: 16px; background: #222a1b; border: 1px solid var(--line); }
.methods h3 { font-size: 16px; margin-bottom: 6px; }
.methods p { color: var(--muted); font-size: 13px; }

.check { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.picker { display: flex; flex-wrap: wrap; gap: 6px; max-width: 520px; }
.picker button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--chip);
}
.picker button.on { background: var(--gold); color: #241b0c; border-color: var(--gold); }

html[data-game="eurodreams"] .extra {
  border-style: solid;
  background: #5bc5f2;
  color: #1a0c28;
  border-color: #ff3c69;
}
html[data-game="eurodreams"] .mark { border-color: #ff3c69; box-shadow: inset 0 0 0 7px #781ea6; }

html[data-game="loto"] {
  --bg: #03244a;
  --bg-2: #05356a;
  --line: #1d5f99;
  --ink: #f4f9ff;
  --muted: #b7d4ee;
  --gold: #e2001a;
  --gold-2: #ffd0d4;
  --moss: #00a0e1;
  --clay: #ffb088;
  --chip: #0a4c86;
}
html[data-game="loto"] .extra {
  border-style: solid;
  border-radius: 8px;
  background: #e2001a;
  color: white;
  border-color: #ffd0d4;
}
html[data-game="loto"] .mark { border-radius: 50%; background: #004492; border-color: #e2001a; box-shadow: inset 0 0 0 7px #00a0e1; }

html[data-game="euromillions"] {
  --bg: #041433;
  --bg-2: #072056;
  --line: #1d4f86;
  --ink: #f7fbff;
  --muted: #c5d7ea;
  --gold: #eebb05;
  --gold-2: #ffe267;
  --moss: #00a0e1;
  --clay: #e2001a;
  --chip: #0b3a78;
}
html[data-game="euromillions"] .extra {
  border-style: solid;
  background: #eebb05;
  color: #041433;
  border-color: #ffe267;
  box-shadow: 0 0 0 3px rgba(238, 187, 5, 0.28);
}
html[data-game="euromillions"] .mark { border-color: #eebb05; box-shadow: inset 0 0 0 7px #004492; }

html[data-game="keno"] {
  --bg: #2a0614;
  --bg-2: #4a1030;
  --line: #8a3a5c;
  --ink: #fff6f8;
  --muted: #f0c3d0;
  --gold: #d70073;
  --gold-2: #ffd0e2;
  --moss: #eb506e;
  --clay: #e1001a;
  --chip: #6e1844;
}
html[data-game="keno"] .ball,
html[data-game="keno"] .extra,
html[data-game="keno"] .mark { border-radius: 8px; }
html[data-game="keno"] .mark { background: #9e1050; border-color: #eb506e; box-shadow: inset 0 0 0 8px #5a328c; }
html[data-game="keno"] .ball.hit { background: #d70073; border-color: #ffe267; color: white; }

.studio { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 18px; align-items: start; }
.verdict { padding: 18px 18px 8px; border-radius: 18px; border: 1px solid var(--line); margin-bottom: 14px; }
.verdict.hit { border-color: var(--moss); background: color-mix(in srgb, var(--moss) 16%, transparent); }
.verdict strong { display: block; font-size: 32px; line-height: 1.1; margin: 4px 0 8px; }
.money { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.money div { padding: 12px; border-radius: 14px; background: color-mix(in srgb, var(--bg) 55%, transparent); border: 1px solid var(--line); }
.money span { display: block; color: var(--muted); font-size: 13px; }
.meter { display: grid; grid-template-columns: minmax(110px, 1.4fr) 1fr auto; gap: 8px; align-items: center; margin: 7px 0; font-size: 14px; }
.meter i { display: block; height: 8px; border-radius: 99px; background: var(--line); }
.meter b { display: block; height: 8px; border-radius: 99px; background: var(--gold); }
.exact-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.exact-list span { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.clock {
  max-width: 1180px;
  margin: 12px auto 0;
  padding: 0 28px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}
.clock strong { color: var(--ink); font-variant-numeric: tabular-nums; }
button.cell, button.ball, button.extra, button.chip { font: inherit; color: inherit; cursor: pointer; }
button.cell { width: 100%; }
button.chip { background: #222a1b; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.fiche { margin-bottom: 16px; }
.saved-line {
  display: grid;
  grid-template-columns: 1.4fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.saved-line small { display: block; color: var(--muted); }

html[data-game="accueil"] {
  --bg: #101114;
  --bg-2: #191c22;
  --line: #31363f;
  --ink: #f6f3ec;
  --muted: #b7b2a8;
  --gold: #f3efe4;
  --gold-2: #f3efe4;
  --moss: #d7c4a3;
  --clay: #e7b2a4;
  --chip: #242830;
}
html[data-view="accueil"] .tabs,
html[data-view="accueil"] .games,
html[data-view="accueil"] #clock { display: none; }
.land-hero {
  padding: 54px 48px 42px;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 36px;
  align-items: end;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent 42%),
    var(--bg-2);
}
.land-hero h2 {
  font-size: 58px;
  line-height: 0.96;
  letter-spacing: -0.035em;
  max-width: 14ch;
  margin: 10px 0 16px;
}
.lede { font-size: 18px; color: var(--muted); max-width: 46ch; }
.land-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.land-aside {
  border-left: 1px solid var(--line);
  padding-left: 28px;
}
.land-aside li { list-style: none; padding: 12px 0; border-bottom: 1px solid var(--line); }
.land-aside ul { margin: 0; padding: 0; }
.land-aside strong { display: block; font-size: 16px; }
.land-aside span { color: var(--muted); font-size: 14px; }
.land-block { margin-top: 28px; }
.land-block h2 { font-size: 32px; margin-bottom: 8px; }
.land-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.gcard {
  text-align: left;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  display: grid;
  gap: 10px;
}
.gcard:hover { border-color: var(--accent, var(--gold)); }
.gcard[data-game="eurodreams"] { --accent: #ff3c69; }
.gcard[data-game="loto"] { --accent: #00a0e1; }
.gcard[data-game="euromillions"] { --accent: #eebb05; }
.gcard[data-game="keno"] { --accent: #d70073; }
.gcard[data-game="keno"] .ball { border-radius: 8px; }
.gcard .ball, .gcard .extra { width: 34px; height: 34px; font-size: 14px; }
.gcard .extra { border-color: var(--accent); color: var(--accent); }
.gname { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.gname b { font-family: Palatino, Georgia, serif; font-size: 26px; font-weight: 600; }
.gname span, .gmeta { color: var(--muted); font-size: 13px; }
.gdot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; margin-right: 8px; }
.land-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.step { padding: 18px; border-top: 1px solid var(--line); }
.step b { display: block; font-family: Palatino, Georgia, serif; font-size: 22px; font-weight: 600; margin-bottom: 6px; }
.land-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.echo-dates { margin: 10px 0 0; padding-left: 18px; color: var(--muted); }
.pairs { display: grid; gap: 12px; margin: 14px 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); }
.pair b { display: block; margin-bottom: 8px; }
.plain { padding: 22px; border-radius: 22px; border: 1px solid var(--line); background: var(--bg-2); }
.plain h3 { margin-bottom: 8px; }
.plain p + p { margin-top: 8px; }

@media (max-width: 900px) {
  .top, .hero, .grid-2, .methods, .grid-line, .studio, .money, .compare, .saved-line { grid-template-columns: 1fr; }
  .top { flex-direction: column; align-items: flex-start; }
  .grid-3 { grid-template-columns: 1fr; }
  .freq { grid-template-columns: repeat(5, 1fr); }
  .hero { padding: 18px; }
  .wrap, .top, .foot, .games, .clock { padding-left: 16px; padding-right: 16px; }
  .land-hero, .land-grid, .land-steps, .land-split, .pair { grid-template-columns: 1fr; }
  .land-hero { padding: 28px 22px; }
  .land-hero h2 { font-size: 40px; }
}
