/* ==========================================================================
   Questions-Trophées — style suisse rouge & blanc
   Inspiré du drapeau suisse et du « Swiss Style » typographique.
   Thème clair / sombre via le bouton « Thème ».
   ========================================================================== */

:root {
  --red: #da291c;          /* rouge drapeau suisse */
  --red-strong: #b81f13;
  --red-soft: #fdecea;
  --white: #ffffff;
  --bg: #ffffff;
  --bg-soft: #f6f4f2;
  --surface: #ffffff;
  --ink: #161616;
  --ink-soft: #464646;
  --muted: #747474;
  --line: #e7e2de;
  --ok: #1f7a4a;
  --shadow: 0 1px 2px rgba(22, 22, 22, .05), 0 12px 28px -16px rgba(22, 22, 22, .22);
  --radius: 4px;
  --wrap: 1180px;
  --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --red: #ef3b2d; --red-strong: #ff5a4d; --red-soft: #3a1714;
    --bg: #121212; --bg-soft: #1a1a1a; --surface: #1e1e1e;
    --ink: #f3f1ef; --ink-soft: #cfcbc7; --muted: #9a9692; --line: #2f2d2b; --ok: #6fcf97;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 32px -16px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --red: #ef3b2d; --red-strong: #ff5a4d; --red-soft: #3a1714;
  --bg: #121212; --bg-soft: #1a1a1a; --surface: #1e1e1e;
  --ink: #f3f1ef; --ink-soft: #cfcbc7; --muted: #9a9692; --line: #2f2d2b; --ok: #6fcf97;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 32px -16px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 1.0625rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--red-strong); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.08; letter-spacing: -.025em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.45rem, 2.8vw, 2rem); }
h3 { font-size: 1.2rem; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
strong { font-weight: 700; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 720px) { .wrap { padding-left: 28px; padding-right: 28px; } }
.skip { position: absolute; left: -999px; top: 8px; background: var(--red); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Drapeau suisse (SVG inline) */
.ch-flag { display: inline-block; flex: none; width: 1em; height: 1em; vertical-align: -.12em; }
.ch-flag rect.bg { fill: #da291c; }
.ch-flag rect.cross { fill: #fff; }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-top: 5px solid var(--red); border-bottom: 1px solid var(--line); }
.header-bar { position: relative; display: flex; align-items: center; gap: 14px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: -.02em; min-width: 0; }
.brand:hover { color: var(--ink); }
.brand .ch-flag { width: 32px; height: 32px; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1rem; }
.brand-tag { font-size: .68rem; font-weight: 800; letter-spacing: .08em; background: var(--red); color: #fff; padding: 3px 7px; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.main-nav a { display: block; padding: 9px 10px; color: var(--ink-soft); text-decoration: none; font-size: .9rem; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.main-nav a:hover { color: var(--red); }
.main-nav a[aria-current="page"] { color: var(--red); border-bottom-color: var(--red); }

.header-tools { display: flex; align-items: center; gap: 6px; flex: none; margin-left: auto; }
.btn-icon { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.btn-icon:hover { border-color: var(--red); color: var(--red); }
.btn-icon svg { width: 18px; height: 18px; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: inline; }
.menu-toggle { display: none; }

@media (min-width: 1061px) {
  .header-bar { flex-wrap: wrap; row-gap: 0; padding-top: 6px; }
  .main-nav { order: 3; flex-basis: 100%; margin: 0 -10px; }
  .main-nav ul { flex-wrap: wrap; }
}
@media (max-width: 1060px) {
  .brand { flex: 1; }
  .menu-toggle { display: inline-flex; }
  .main-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 4px solid var(--red); box-shadow: var(--shadow); display: none; padding: 8px 16px 16px; max-height: calc(100vh - 70px); overflow-y: auto; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: 12px 6px; font-size: 1.02rem; border-bottom: 1px solid var(--line); }
  .main-nav a[aria-current="page"] { border-bottom-color: var(--line); box-shadow: inset 4px 0 0 var(--red); padding-left: 14px; }
}
@media (max-width: 420px) { .theme-toggle .label, .brand-tag { display: none; } }

/* Bandeau rouge : mention éditeur + langues */
.notice-bar { background: var(--red); color: #fff; font-size: .84rem; }
.notice-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 18px; padding-top: 9px; padding-bottom: 9px; }
.notice-bar p { margin: 0; }
.notice-bar a { color: #fff; font-weight: 700; }
.lang-switch { display: flex; gap: 2px; align-items: center; white-space: nowrap; }
.lang-switch a, .lang-switch span { color: #fff; text-decoration: none; padding: 3px 8px; font-weight: 600; }
.lang-switch a:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.lang-switch .current { background: #fff; color: var(--red); font-weight: 800; }
:root[data-theme="dark"] .lang-switch .current { color: #b81f13; }

/* ---------- Fil d'Ariane ---------- */
.breadcrumb { font-size: .86rem; color: var(--muted); margin: 24px 0 0; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumb li + li::before { content: "›"; margin-right: 4px; color: var(--red); font-weight: 700; }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--red); text-decoration: underline; }

/* ---------- Héros ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 14px; }
.eyebrow .ch-flag { width: 14px; height: 14px; }
.hero { position: relative; background: var(--red); color: #fff; overflow: hidden; }
.hero::before { /* motif de croix suisses */
  content: ""; position: absolute; inset: 0; opacity: .08; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath fill='%23fff' d='M24 16h8v8h8v8h-8v8h-8v-8h-8v-8h8z'/%3E%3C/svg%3E");
}
.hero-grid { position: relative; display: grid; gap: 32px; align-items: center; padding: 44px 0 120px; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 56px; padding: 64px 0 150px; } }
.hero .eyebrow { color: #fff; }
.hero h1 { color: #fff; }
.hero .lead { font-size: 1.15rem; color: rgba(255, 255, 255, .92); max-width: 58ch; }
.hero .lead a { color: #fff; }
.alps { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 110px; color: var(--bg); }
@media (min-width: 900px) { .alps { height: 150px; } }
.alps .snow { fill: var(--red-soft); }

.hero-media { position: relative; margin: 0; aspect-ratio: 1 / 1; max-width: min(420px, 70vw); justify-self: center; width: 100%; }
.hero-media .big-flag { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .25)); }
.hero-media img { position: absolute; inset: 12%; width: 76%; height: 76%; object-fit: cover; border: 6px solid #fff; }
.hero-media figcaption { position: absolute; right: -6px; bottom: 18px; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: #fff; color: #b81f13; padding: 6px 12px; }

.page-head { position: relative; padding: 18px 0 30px; }
.page-head h1 { max-width: 22ch; }
.page-head .lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 62ch; }
.page-head .wrap::after { content: ""; display: block; width: 64px; height: 6px; background: var(--red); margin-top: 22px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; gap: 8px; justify-content: center; min-height: 48px; padding: 0 22px; font-weight: 700; font-size: .98rem; text-decoration: none; border: 2px solid transparent; transition: transform .15s ease, background-color .15s ease, color .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-strong); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.hero .btn-primary { background: #fff; color: #b81f13; }
.hero .btn-primary:hover { background: #fff3f2; color: #b81f13; }
.hero .btn-ghost { color: #fff; border-color: #fff; }
.hero .btn-ghost:hover { background: #fff; color: #b81f13; }

/* ---------- Sections & cartes ---------- */
.section { padding: 32px 0 48px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.section-head .meta { color: var(--muted); font-size: .9rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }

.transparency { display: flex; gap: 16px; align-items: flex-start; border-left: 6px solid var(--red); }
.transparency h2 { font-size: 1.25rem; margin-bottom: .3em; }
.transparency p { margin: 0; color: var(--ink-soft); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--red); background: var(--red-soft); padding: 4px 9px; }
.badge .ch-flag { width: 12px; height: 12px; }

/* Bande « Suisse » : chiffres clés */
.swiss-band { display: grid; gap: 0; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); background: var(--surface); }
@media (min-width: 820px) { .swiss-band { grid-template-columns: repeat(4, 1fr); } }
.swiss-band > div { padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.swiss-band .k { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; color: var(--red); letter-spacing: -.03em; line-height: 1.1; }
.swiss-band .v { color: var(--ink-soft); font-size: .92rem; }

.price-strip { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 24px 0; border: 2px solid var(--red); }
.price { padding: 18px 20px; background: var(--surface); }
.price + .price { border-left: 1px solid var(--line); }
@media (max-width: 640px) { .price + .price { border-left: 0; border-top: 1px solid var(--line); } }
.price .k { font-size: .82rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.price .v { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--ink); line-height: 1.15; letter-spacing: -.03em; }
.price .v small { font-family: var(--font); font-size: .85rem; color: var(--red); font-weight: 800; letter-spacing: .04em; }

.feature-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 20px; }
.feature { border-top: 4px solid var(--red); }
.feature h3 { display: flex; align-items: center; gap: 10px; }
.feature .ico { width: 38px; height: 38px; display: grid; place-items: center; background: var(--red); color: #fff; flex: none; }
.feature .ico svg { width: 20px; height: 20px; }
.feature p { color: var(--ink-soft); margin: 0; }

.prose { max-width: 72ch; }
.prose p, .prose li { color: var(--ink-soft); }
.prose strong { color: var(--ink); }
.prose h2 { margin-top: 1.6em; }

/* ---------- Catégories ---------- */
.cat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.cat-card { position: relative; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s ease, transform .15s ease; }
.cat-card:hover { border-color: var(--red); transform: translateY(-2px); }
.cat-card .badge { align-self: flex-start; }
.cat-card h2 { font-size: 1.2rem; margin: 8px 0 2px; }
.cat-card h2 a { color: var(--ink); text-decoration: none; }
.cat-card h2 a::after { content: ""; position: absolute; inset: 0; }
.cat-card:hover h2 a { color: var(--red); }
.cat-card p { color: var(--ink-soft); font-size: .95rem; margin: 0; }
.cat-card .count { margin-top: auto; padding-top: 12px; font-size: .82rem; font-weight: 700; color: var(--red); }

/* ---------- Listes de questions ---------- */
.search { position: relative; margin: 0 0 16px; max-width: 540px; }
.search input { width: 100%; height: 50px; padding: 0 16px 0 46px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; border-radius: 0; }
.search input:focus { outline: none; border-color: var(--red); }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--red); }
.search-empty { color: var(--muted); display: none; }

.q-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (min-width: 820px) { .q-list.cols { grid-template-columns: 1fr 1fr; } }
.q-list a { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; border: 1px solid var(--line); border-left: 4px solid var(--red); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.4; height: 100%; transition: background-color .15s ease, color .15s ease; }
.q-list a:hover { background: var(--red); color: #fff; border-color: var(--red); }
.q-list .q-text { flex: 1; }
.q-list .arrow { flex: none; color: var(--red); }
.q-list a:hover .arrow { color: #fff; }

/* ---------- Page question ---------- */
.article-grid { display: grid; gap: 32px; padding-bottom: 48px; }
@media (min-width: 980px) { .article-grid { grid-template-columns: minmax(0, 1fr) 310px; gap: 48px; } }
.answer-box { position: relative; background: var(--red); color: #fff; padding: 22px 24px 22px 76px; margin: 4px 0 30px; }
.answer-box .ch-flag { position: absolute; left: 22px; top: 24px; width: 36px; height: 36px; }
.answer-box .ch-flag rect.bg { fill: #fff; }
.answer-box .ch-flag rect.cross { fill: #da291c; }
.answer-box .k { font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .9; margin-bottom: 4px; }
.answer-box p { margin: 0; font-size: 1.08rem; font-weight: 500; }
.article section { margin-bottom: 36px; }
.article h2 { display: flex; align-items: center; gap: 12px; }
.article h2::before { content: ""; width: 14px; height: 14px; flex: none; background:
  linear-gradient(#fff, #fff) center / 8px 2.4px no-repeat, linear-gradient(#fff, #fff) center / 2.4px 8px no-repeat, var(--red); }

.check-list, .x-list, .tip-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li, .x-list li, .tip-list li { position: relative; padding-left: 32px; color: var(--ink-soft); }
.check-list li::before, .x-list li::before, .tip-list li::before { position: absolute; left: 0; top: .2em; width: 20px; height: 20px; display: grid; place-items: center; font-size: .75rem; font-weight: 900; }
/* puce = petite croix suisse */
.check-list li::before { content: ""; background:
  linear-gradient(#fff, #fff) center / 11px 3.5px no-repeat, linear-gradient(#fff, #fff) center / 3.5px 11px no-repeat, var(--red); }
.x-list li::before { content: "✕"; background: var(--ink); color: var(--bg); }
.tip-list li::before { content: "★"; background: var(--red-soft); color: var(--red); }

.two-col { display: grid; gap: 16px; }
@media (min-width: 700px) { .two-col { grid-template-columns: 1fr 1fr; } }
.two-col .card h3 { font-family: var(--font); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-bottom: 14px; }

.reco { display: flex; flex-direction: column; gap: 14px; background: #161616; color: #f3f1ef; border: 0; border-left: 8px solid var(--red); }
.reco p { color: #cfcbc7; margin: 0; }
.reco .btn { align-self: flex-start; background: var(--red); color: #fff; }
.reco .btn:hover { background: #fff; color: #b81f13; }
.reco .small { font-size: .82rem; color: #9a9692; }

.see-also { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); text-decoration: none; font-size: .88rem; font-weight: 700; }
.chip:hover { background: var(--red); border-color: var(--red); color: #fff; }

.aside-stack { display: grid; gap: 16px; align-content: start; }
@media (min-width: 980px) { .aside-stack { position: sticky; top: 130px; } }
.aside-stack h2 { font-family: var(--font); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-bottom: 12px; }
.aside-links { list-style: none; padding: 0; margin: 0; }
.aside-links a { display: block; padding: 8px 0; color: var(--ink-soft); text-decoration: none; font-size: .93rem; line-height: 1.4; border-bottom: 1px solid var(--line); }
.aside-links li:last-child a { border-bottom: 0; }
.aside-links a:hover { color: var(--red); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags .chip { font-size: .78rem; padding: 4px 10px; }
.mini-price { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .93rem; }
.mini-price li { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-soft); }
.mini-price strong { color: var(--ink); }
.swiss-note { display: flex; gap: 12px; align-items: flex-start; background: var(--red-soft); border: 0; box-shadow: none; }
.swiss-note .ch-flag { width: 28px; height: 28px; margin-top: 2px; }
.swiss-note p { margin: 0; font-size: .92rem; color: var(--ink-soft); }

/* ---------- Pied de page ---------- */
.site-footer { margin-top: 48px; background: #161616; color: #cfcbc7; font-size: .92rem; }
.footer-alps { display: block; width: 100%; height: 70px; color: #161616; background: var(--bg); }
.footer-grid { display: grid; gap: 28px; padding: 36px 0 26px; }
@media (min-width: 820px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer .brand { color: #fff; }
.site-footer h2 { font-family: var(--font); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: #ff6b5f; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: #e7e3df; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .btn-ghost { color: #fff; border-color: #fff; }
.site-footer .btn-ghost:hover { background: #fff; color: #161616; text-decoration: none; }
.footer-bottom { border-top: 1px solid #2f2d2b; padding: 18px 0 30px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; font-size: .84rem; color: #9a9692; }
.footer-bottom p { margin: 0; max-width: 80ch; }
.footer-bottom .made { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; white-space: nowrap; }

/* ---------- Divers ---------- */
.mt-0 { margin-top: 0; }
.deploy-note { font-size: .82rem; color: var(--muted); font-style: italic; margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .notice-bar, .site-footer, .aside-stack, .btn-row { display: none !important; } body { background: #fff; color: #000; } }
