/* toptoon.fr: one stylesheet, no build. tokens first, then layout, then components. */

:root {
    --bg: #f4f6f9;
    --surface: #ffffff;
    --surface-2: #eceff4;
    --text: #0f1726;
    --text-2: #525e70;
    --border: #d9dee6;
    --border-strong: #aab3c2;

    --primary: #1f4fd8;
    --primary-hover: #183fae;
    --primary-soft: #e4ebfb;
    --on-primary: #ffffff;

    --success: #0b7a44;
    --success-soft: #dff3e7;
    --warn: #8a4b00;
    --warn-soft: #fbeedb;
    --danger: #b42318;
    --danger-soft: #fbe6e3;

    --radius: 10px;
    --radius-sm: 7px;
    --shadow: 0 1px 2px rgba(15, 23, 38, 0.06), 0 10px 28px -14px rgba(15, 23, 38, 0.22);
    --focus: 0 0 0 3px #c3d2f6;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 var(--font);
    -webkit-font-smoothing: antialiased;
    accent-color: var(--primary);
    caret-color: var(--primary);
}

::selection { background: var(--primary-soft); color: var(--text); }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }

a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
a:hover { color: var(--primary-hover); }

h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; letter-spacing: -0.015em; }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.125rem; font-weight: 650; }
p { margin: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -3rem; padding: 0.5rem 0.75rem; background: var(--surface); border-radius: var(--radius-sm); }
.skip:focus { top: 1rem; z-index: 10; }

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

.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.fineprint { color: var(--text-2); font-size: 0.875rem; line-height: 1.45; }
.overline { color: var(--text-2); font-size: 0.875rem; font-weight: 500; }

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

.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; border-radius: var(--radius-sm); }
.brand img { display: block; height: 36px; width: auto; }
.icon { flex: none; }
.masthead-side { display: flex; align-items: center; gap: 1.25rem; }
.secure { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-2); font-size: 0.8125rem; font-weight: 500; }

.site-footer { margin-top: auto; border-top: 1px solid var(--border); background: var(--surface); padding: 1.25rem 0 1.5rem; color: var(--text-2); font-size: 0.875rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.site-footer .brand img { height: 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.site-footer a { color: var(--text-2); }
.site-footer a:hover { color: var(--text); }

@media (min-width: 560px) {
    .site-footer nav { margin-left: auto; }
}

/* ---- page frames ---- */

.page { padding: 2rem 16px 3rem; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ---- checkout ---- */

.page-checkout { padding-top: 1.5rem; }

.checkout {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.summary { padding: 1.5rem 1.25rem; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.payment { padding: 1.5rem 1.25rem 1.75rem; }

.summary .product { margin-top: 0.25rem; font-size: 1.375rem; }
.summary .amount { margin-top: 0.75rem; font-size: 2.25rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.summary .muted { margin-top: 0.35rem; font-size: 0.9375rem; }

.facts { margin: 1.5rem 0 0; display: grid; gap: 0.6rem; }
.facts div { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9375rem; }
.facts dt { color: var(--text-2); }
.facts dd { margin: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; }
.facts .total { margin-top: 0.4rem; padding-top: 1rem; border-top: 1px solid var(--border-strong); font-size: 1.0625rem; }
.facts .total dt { color: var(--text); font-weight: 600; }
.facts .total dd { font-weight: 700; }
.facts-inline { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }

.payment h2 { margin-bottom: 1rem; }

.methods { margin: 0; padding: 0; border: 0; display: grid; gap: 0.6rem; }
.method { display: block; position: relative; cursor: pointer; }
.method input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.method-body {
    display: flex; align-items: center; gap: 0.9rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    transition: border-color 160ms var(--ease), background-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.method-body::before {
    content: ""; order: 2; margin-left: auto; flex: none;
    width: 20px; height: 20px; border-radius: 50%;
    border: 1.5px solid var(--border-strong); background: var(--surface);
    transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.method-icon { flex: none; color: var(--text-2); }
.method-text { display: grid; gap: 0.1rem; }
.method-name { font-weight: 600; }
.method-hint { color: var(--text-2); font-size: 0.875rem; line-height: 1.35; }
.method:hover .method-body { border-color: var(--text-2); }
.method input:checked + .method-body { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.method input:checked + .method-body::before { border-color: var(--primary); box-shadow: inset 0 0 0 5px var(--primary); }
.method input:checked + .method-body .method-icon { color: var(--primary); }
.method input:focus-visible + .method-body { box-shadow: var(--focus), inset 0 0 0 1px var(--primary); border-color: var(--primary); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    min-height: 48px; padding: 0 1.25rem;
    border-radius: var(--radius-sm); border: 1px solid transparent;
    font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
    transition: background-color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; margin-top: 1.25rem; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); color: var(--text); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.pay-form .fineprint { margin-top: 1rem; }
.pay-form .fineprint a { color: var(--text-2); }

.notice { padding: 0.8rem 1rem; border-radius: var(--radius-sm); font-size: 0.9375rem; margin-bottom: 1rem; border: 1px solid transparent; }
.notice-danger { background: var(--danger-soft); color: var(--danger); border-color: #f2c4bf; }
.notice-warn { background: var(--warn-soft); color: var(--warn); border-color: #efd3a6; }

@media (min-width: 820px) {
    .checkout { grid-template-columns: 5fr 6fr; }
    .summary { padding: 2rem; border-bottom: 0; border-right: 1px solid var(--border); }
    .payment { padding: 2rem; }
    .summary .amount { font-size: 2.5rem; }
}

/* ---- status pages ---- */

.status { max-width: 560px; margin: 1rem auto 0; padding: 2rem 1.5rem; text-align: center; }
.status h1 { font-size: 1.5rem; }
.status > p { margin-top: 0.75rem; color: var(--text-2); max-width: 44ch; margin-inline: auto; }
.status .facts { text-align: left; }
.status-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; margin-bottom: 1.25rem; border-radius: 50%;
    animation: pop 480ms var(--ease) both;
}
.status-ok { background: var(--success-soft); color: var(--success); }
.status-wait { background: var(--warn-soft); color: var(--warn); }
.status-neutral { background: var(--surface-2); color: var(--text-2); }
.actions { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1.5rem; }
.status .fineprint { margin-top: 1rem; }

@keyframes pop { from { transform: scale(0.72); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .status-icon { animation: none; } .btn, .method-body { transition: none; } }

@media (min-width: 560px) {
    .status { padding: 2.5rem 2.5rem; }
    .actions { flex-direction: row; justify-content: center; }
}

/* ---- news: masthead, sections bar, stories, slim footer ---- */

.wrap-wide { max-width: 1120px; }

.masthead { background: var(--surface); border-bottom: 1px solid var(--border); }
.masthead-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.masthead .brand img { height: 40px; }
.dateline { display: none; align-items: center; gap: 0.45rem; color: var(--text-2); font-size: 0.875rem; }
.dateline time::first-letter { text-transform: uppercase; }

.lang-switch {
    display: inline-flex; align-items: center; gap: 0.15rem; padding: 3px 3px 3px 0.6rem;
    border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
}
.lang-switch .icon { color: var(--text-2); margin-right: 0.3rem; }
.lang-switch a {
    padding: 0.35rem 0.7rem; border-radius: 999px;
    color: var(--text-2); font-size: 0.8125rem; font-weight: 600; line-height: 1.2; text-decoration: none;
    transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.lang-switch a:hover { color: var(--text); background: var(--surface-2); }
.lang-switch a[aria-current="true"] { background: var(--text); color: var(--surface); }
.lang-switch a:focus-visible { box-shadow: var(--focus); border-radius: 999px; }

.topics { position: sticky; top: 0; z-index: 5; background: var(--primary); }
.topics .wrap { display: flex; overflow-x: auto; scrollbar-width: none; }
.topics .wrap::-webkit-scrollbar { display: none; }
.topics a {
    flex: none; display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.8rem 0.8rem 0.65rem; border-bottom: 3px solid transparent;
    color: var(--on-primary); font-weight: 600; font-size: 0.9375rem; text-decoration: none; white-space: nowrap;
}
.topics a:hover { background: var(--primary-hover); color: var(--on-primary); }
.topics a[aria-current="page"] { border-bottom-color: var(--on-primary); }
.topics a:focus-visible { box-shadow: inset 0 0 0 3px #c3d2f6; border-radius: 0; }

.page-news { padding: 1.25rem 16px 3rem; }

.section-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
    margin-bottom: 1rem; padding-top: 0.6rem; border-top: 3px solid var(--text);
}
.section-head h1, .section-head h2 { font-size: 1.375rem; }
.section-head .more { font-size: 0.875rem; font-weight: 600; white-space: nowrap; }
.updated { color: var(--text-2); font-size: 0.8125rem; white-space: nowrap; }

.story { position: relative; display: grid; gap: 0.6rem; }
.story-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); }
.story-body { display: grid; gap: 0.35rem; align-content: start; min-width: 0; }
.story-title { font-size: 1.0625rem; font-weight: 650; line-height: 1.3; }
.story-title a { color: var(--text); text-decoration: none; }
.story-title a::after { content: ""; position: absolute; inset: 0; }
.story:hover .story-title a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.12em; }
.story-title a:focus-visible { box-shadow: none; }
.story:has(.story-title a:focus-visible) { box-shadow: var(--focus); border-radius: var(--radius-sm); }
.story-excerpt {
    color: var(--text-2); font-size: 0.9375rem; text-wrap: pretty;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.story-meta { display: flex; flex-wrap: wrap; gap: 0 0.4rem; color: var(--text-2); font-size: 0.8125rem; }
.story-source { font-weight: 600; }
.story-meta time::before { content: "·"; margin-right: 0.4rem; }

.story-lead .story-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.015em; }
.story-lead .story-excerpt { font-size: 1rem; }

.story-row {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "body img"; gap: 0.9rem;
    padding: 0.85rem 0; border-top: 1px solid var(--border);
}
.story-row .story-body { grid-area: body; }
.story-row .story-img { grid-area: img; width: 88px; aspect-ratio: 1; }
.story-row .story-title { font-size: 1rem; font-weight: 600; }

.front-top { display: grid; gap: 1.25rem; }
.story-list { display: grid; }
.rubric { margin-top: 2.5rem; }
.rubric .story-card + .story-list { margin-top: 1rem; }
.all-link { margin-top: 2.5rem; text-align: center; }

.ledger .day {
    margin: 2.5rem 0 0.25rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border-strong);
    color: var(--text-2); font-size: 0.875rem; font-weight: 600; letter-spacing: 0;
}
.ledger .day::first-letter { text-transform: uppercase; }
.ledger .day:first-child { margin-top: 0; }
.ledger .story-card { padding: 0.85rem 0; }
.ledger .day + .story-row { border-top: 0; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; color: var(--text-2); font-size: 0.9375rem; }
.pager .btn { min-height: 44px; }

@media (min-width: 720px) {
    .dateline { display: flex; }
    .masthead-row { min-height: 76px; }
    .masthead .brand img { height: 48px; }
    .topics a { padding: 0.9rem 1rem 0.75rem; font-size: 1rem; }
    .section-head h1, .section-head h2 { font-size: 1.625rem; }
    .front-top { grid-template-columns: 7fr 5fr; gap: 1rem 2.5rem; }
    .front-top .section-head { grid-column: 1 / -1; }
    .story-lead .story-title { font-size: 2rem; }
    .rubric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.5rem; }
    .rubric { margin-top: 3rem; }
}

@media (min-width: 1024px) {
    .page-news { padding-top: 1.75rem; }
    .story-lead .story-title { font-size: 2.25rem; }
    .story-row .story-img { width: 104px; }
}

/* ---- legal / prose ---- */

.prose { max-width: 68ch; margin: 0 auto; }
.prose h1 { font-size: 1.875rem; }
.prose h2 { margin-top: 2rem; margin-bottom: 0.5rem; }
.prose p, .prose li { color: var(--text); }
.prose p + p { margin-top: 0.75rem; }
.prose h1 + .muted { margin-top: 0.5rem; }
.prose ul, .prose ol { margin: 0.5rem 0 0; padding-left: 1.25rem; display: grid; gap: 0.5rem; }
.prose .facts { margin: 1.25rem 0 0; max-width: 32rem; }
.prose .facts dd { text-align: left; }
.prose .facts div { justify-content: flex-start; gap: 1.5rem; }
.prose .facts dt { min-width: 5.5rem; }
