/* ============================================================
   G159 — design system (adapted from Espacejeux/Loto-Québec)
   Blue primary, green accent, light surfaces, dark text.
   ============================================================ */

:root {
    --blue:        #0a4c9c;
    --blue-dark:   #073a78;
    --blue-light:  #e8f1fc;
    --green:       #1a8a4a;
    --green-light: #e4f4ea;
    --gold:        #f2b705;
    --ink:         #1c2733;
    --muted:       #5a6b7b;
    --line:        #dde3ea;
    --bg:          #f4f7fb;
    --white:       #ffffff;
    --radius:      10px;
    --radius-sm:   6px;
    --shadow:      0 2px 10px rgba(13, 38, 76, .08);
    --shadow-lg:   0 8px 28px rgba(13, 38, 76, .14);
    --maxw:        1200px;
    --font:        "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
p  { margin: 0 0 1rem; }
a  { color: var(--blue); }

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

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.skip-link {
    position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff;
    padding: 10px 16px; z-index: 1000;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block; padding: 10px 18px; border-radius: var(--radius-sm);
    font-weight: 600; text-decoration: none; cursor: pointer; border: 2px solid transparent;
    font-size: .95rem; line-height: 1.2; transition: background .15s, color .15s;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-ghost:hover { background: var(--blue-light); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { filter: brightness(.92); }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- Header ---------- */
.site-header { background: var(--white); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { text-decoration: none; }
.brand-mark {
    font-weight: 800; font-size: 1.6rem; color: var(--blue); letter-spacing: 1px;
    background: linear-gradient(135deg, var(--blue), var(--green)); -webkit-background-clip: text;
    background-clip: text; color: transparent;
}
.primary-nav { margin-left: auto; }
.primary-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.primary-nav a {
    display: block; padding: 8px 12px; border-radius: var(--radius-sm); text-decoration: none;
    color: var(--ink); font-weight: 600; font-size: .92rem;
}
.primary-nav a:hover { background: var(--blue-light); color: var(--blue); }
.primary-nav a.is-active { color: var(--blue); box-shadow: inset 0 -3px 0 var(--blue); }

.header-utility { display: flex; align-items: center; gap: 8px; }
.age-badge {
    background: var(--ink); color: #fff; font-weight: 700; font-size: .75rem;
    border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center;
}
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(120deg, var(--blue-dark), var(--blue));
    color: #fff; padding: 56px 0; position: relative; overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.hero h1 { color: #fff; }
.hero .jackpot { font-size: clamp(2.4rem, 7vw, 4rem); font-weight: 800; color: var(--gold); }
.hero p { color: #d8e6f7; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.hero-img img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 24px; flex-wrap: wrap; gap: 8px; }

/* ---------- Card grid ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; }
.card .logo-slot img { width: 100%; height: 160px; object-fit: cover; background: var(--blue-light); }
.card .jackpot-amt { font-size: 1.6rem; font-weight: 800; color: var(--blue); }
.card .draw-date { color: var(--muted); font-size: .88rem; }
.card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.card-actions .btn { flex: 1; text-align: center; }

/* ---------- Results balls ---------- */
.balls { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.ball {
    width: 42px; height: 42px; border-radius: 50%; background: var(--blue); color: #fff;
    display: grid; place-items: center; font-weight: 700;
}
.ball.bonus { background: var(--gold); color: var(--ink); }
.result-row { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.result-row .meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Tables ---------- */
table.data { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
table.data th { background: var(--blue-light); color: var(--blue-dark); }

/* ---------- Forms / auth ---------- */
.auth-wrap { max-width: 460px; margin: 48px auto; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field select, .field textarea {
    width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    font: inherit; background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; }
.checkbox input { margin-top: 4px; }
.form-note { font-size: .85rem; color: var(--muted); }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; }
.alert-error { background: #fdecec; border: 1px solid #f3b4b4; color: #97231f; }
.alert-success { background: var(--green-light); border: 1px solid #a8d8ba; color: #15683a; }
.alert-info { background: var(--blue-light); border: 1px solid #b9d4f2; color: var(--blue-dark); }

/* ---------- Account dashboard ---------- */
.account-layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; padding: 36px 0; }
.account-nav { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); align-self: start; }
.account-nav ul { list-style: none; margin: 0; padding: 0; }
.account-nav a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); font-weight: 600; }
.account-nav a:hover { background: var(--blue-light); }
.account-nav a.is-active { background: var(--blue); color: #fff; }
.balance-card { background: linear-gradient(120deg, var(--blue), var(--green)); color: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.balance-card .amt { font-size: 2.2rem; font-weight: 800; }

/* ---------- Misc content ---------- */
.prose { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); max-width: 820px; }
.prose h2 { margin-top: 1.6em; }
.lead { font-size: 1.15rem; color: var(--muted); }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.faq-item summary { font-weight: 700; cursor: pointer; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 18px 64px; margin-bottom: 14px; position: relative; box-shadow: var(--shadow); }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 16px; top: 16px; width: 34px; height: 34px; background: var(--blue); color: #fff; border-radius: 50%; display: grid; place-items: center; font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero-grid, .account-layout { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .account-nav { position: static; }
}
@media (max-width: 768px) {
    .nav-toggle { display: block; order: 3; margin-left: auto; }
    .header-utility { order: 2; }
    .primary-nav { order: 4; flex-basis: 100%; margin-left: 0; display: none; }
    .primary-nav.open { display: block; }
    .primary-nav ul { flex-direction: column; }
    .primary-nav a { padding: 12px; border-radius: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .header-utility .btn { padding: 8px 12px; font-size: .85rem; }
}

.footer-legal p, .form-note { line-height: 1.5; }
