/* Trend Détection — comparatif d'outils de détection de tendances
   Feuille de style partagée entre toutes les langues (/, /en/, /es/)
   Règle : aucune taille de texte sous 1rem (16px). */

:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-alt: #eeece4;
  --ink: #1c1d1b;
  --ink-soft: #55564d;
  --ink-faint: #85867b;
  --border: #dcdace;
  --accent: #2f6f62;
  --accent-ink: #1f4f45;
  --accent-soft: #e3efec;
  --warn: #93540f;
  --warn-soft: #f4e8d6;
  --warn-border: #dcbb87;
  --shadow: rgba(28, 29, 27, 0.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14161a; --surface: #1b1e23; --surface-alt: #21252b;
    --ink: #ece9e1; --ink-soft: #a9aca2; --ink-faint: #767a72;
    --border: #2e333a; --accent: #74c2b0; --accent-ink: #9fdccb;
    --accent-soft: #1c2a28; --warn: #e3a458; --warn-soft: #2b2417;
    --warn-border: #4a3a1f; --shadow: rgba(0, 0, 0, 0.35);
  }
}
:root[data-theme="dark"] {
  --bg: #14161a; --surface: #1b1e23; --surface-alt: #21252b;
  --ink: #ece9e1; --ink-soft: #a9aca2; --ink-faint: #767a72;
  --border: #2e333a; --accent: #74c2b0; --accent-ink: #9fdccb;
  --accent-soft: #1c2a28; --warn: #e3a458; --warn-soft: #2b2417;
  --warn-border: #4a3a1f; --shadow: rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-soft); color: var(--accent-ink); }
a { color: var(--accent-ink); text-decoration-color: var(--border); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent-ink); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: Georgia, "Iowan Old Style", "Times New Roman", serif; color: var(--ink); text-wrap: balance; font-weight: 600; line-height: 1.2; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 1.25em; }
li { margin-bottom: 5px; }
strong { font-weight: 600; color: var(--ink); }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 1em; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 4px; padding: 0.05em 0.35em; }
img { max-width: 100%; height: auto; display: block; }

/* ---------- site header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.site-header-inner { max-width: 900px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.site-logo { display: flex; flex-direction: column; text-decoration: none; line-height: 1.15; }
.site-logo-title { font-family: Georgia, serif; font-weight: 700; font-size: 2rem; color: var(--ink); letter-spacing: -0.01em; text-transform: uppercase; }
.site-logo-title .spark { color: var(--accent-ink); }
.site-logo-baseline { font-size: 1rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-ink); }
.header-right { display: flex; align-items: center; gap: 6px; }
.menu-toggle-input { display: none; }
.menu-toggle-label { display: none; flex-direction: column; gap: 4px; cursor: pointer; padding: 6px; }
.menu-toggle-label span { width: 20px; height: 2px; background: var(--ink); display: block; }
.site-nav ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; font-size: 1rem; }
.site-nav a { display: block; padding: 7px 10px; border-radius: 6px; color: var(--ink-soft); text-decoration: none; text-transform: uppercase; }
.site-nav a:hover { background: var(--surface-alt); color: var(--ink); }

.lang-switch { display: flex; gap: 2px; border: 1px solid var(--border); border-radius: 999px; padding: 2px; background: var(--surface); }
.lang-switch a { font-size: 1rem; font-weight: 600; letter-spacing: 0.02em; padding: 4px 10px; border-radius: 999px; text-decoration: none; color: var(--ink-faint); }
.lang-switch a[aria-current="true"] { background: var(--accent); color: #fff; }
.lang-switch a:hover:not([aria-current="true"]) { color: var(--ink); }

@media (max-width: 980px) {
  .menu-toggle-label { display: flex; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); max-height: 0; overflow: hidden; transition: max-height 0.2s ease; }
  .site-nav ol { flex-direction: column; padding: 8px 24px 16px; }
  .menu-toggle-input:checked ~ .site-nav { max-height: 480px; }
}

main { display: block; }
article { max-width: 900px; margin: 0 auto; padding: 0 24px 96px; }

/* ---------- page head ---------- */
.page-head { padding: 48px 0 12px; border-bottom: 1px solid var(--border); margin-bottom: 40px; }
.page-head h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.7rem); margin: 0 0 18px; letter-spacing: -0.01em; }
.page-head .answer { font-size: 1.1rem; color: var(--ink-soft); background: var(--accent-soft); border-left: 3px solid var(--accent); padding: 14px 18px; border-radius: 6px; }
.page-head .byline { font-size: 1rem; color: var(--ink-faint); margin: 16px 0 24px; display: flex; align-items: center; gap: 6px; }

.icon-person { flex-shrink: 0; color: var(--accent-ink); }
.foot-author { display: flex; align-items: center; gap: 6px; }
.foot-author .icon-person { width: 16px; height: 16px; }

nav.toc { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 18px 22px; margin-bottom: 44px; }
nav.toc h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; font-family: ui-monospace, monospace; color: var(--ink-faint); margin: 0 0 10px; font-weight: 600; }
nav.toc ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 24px; font-size: 1rem; }
nav.toc li { margin-bottom: 4px; break-inside: avoid; }
nav.toc a { text-decoration: none; color: var(--ink-soft); }
nav.toc a:hover { color: var(--accent-ink); }

section { scroll-margin-top: 20px; }
section + section { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--border); }
h2 { font-size: 1.5rem; margin: 0 0 18px; }
h3 { font-size: 1.15rem; margin: 30px 0 12px; }
h4 { font-size: 1rem; margin: 22px 0 8px; color: var(--accent-ink); }
.hint { color: var(--ink-faint); font-size: 1rem; margin-bottom: 20px; }

/* ---------- overview cards ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 18px 22px; box-shadow: 0 1px 2px var(--shadow); }
.card .head { display: flex; flex-direction: column; gap: 4px; }
.card .name { font-family: Georgia, serif; font-size: 1.15rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.card .name:hover { color: var(--accent-ink); }
.badge { display: inline-block; align-self: flex-start; font-size: 1rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 3px 11px; margin: 2px 0 4px; }
.card .tagline { font-size: 1rem; color: var(--ink); font-style: italic; }
.card .row-sum { font-size: 1rem; color: var(--ink-soft); }
.card .row-for { font-size: 1rem; color: var(--ink-faint); }

/* ---------- fiches ---------- */
.fiche { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 26px 28px; margin-bottom: 24px; }
.fiche-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 4px; }
.fiche-name { font-size: 1.4rem; margin: 0; }
.fiche .tagline { font-style: italic; color: var(--ink-soft); margin-bottom: 16px; }
.verdict { font-size: 1rem; color: var(--ink); background: var(--surface-alt); border-radius: 8px; padding: 14px 18px; margin-bottom: 18px; }

figure.shot { margin: 0 0 20px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface-alt); }
figure.shot img { width: 100%; height: auto; display: block; }
figure.shot figcaption { padding: 8px 14px; font-size: 1rem; color: var(--ink-faint); border-top: 1px solid var(--border); background: var(--surface); }

dl.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 20px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 16px 0; margin: 0 0 18px; }
dl.facts div { margin: 0; }
dl.facts dt { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); margin-bottom: 3px; }
dl.facts dd { margin: 0; font-size: 1rem; color: var(--ink); }

.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 18px 0; }
@media (max-width: 640px) { .proscons { grid-template-columns: 1fr; } }
.proscons h4 { margin-top: 0; }
.proscons ul { padding-left: 1.1em; margin-bottom: 0; }
.proscons li { font-size: 1rem; }
.pros li::marker { color: var(--accent-ink); }
.cons li::marker { color: var(--warn); }

.go { margin-top: 20px; }
.go a { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; padding: 9px 18px; border-radius: 6px; font-size: 1rem; font-weight: 600; }
.go a:hover { background: var(--accent-ink); }
.back { margin-top: 8px; }
.back a { font-size: 1rem; color: var(--ink-faint); text-decoration: none; }

/* ---------- callouts ---------- */
aside.callout { border: 1px solid var(--border); border-left: 3px solid var(--accent); background: var(--surface); border-radius: 6px; padding: 16px 20px; margin: 22px 0; }
aside.callout .callout-label { display: block; font-family: ui-monospace, monospace; font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 6px; }
aside.callout p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
aside.callout.warn { border-left-color: var(--warn); background: var(--warn-soft); border-color: var(--warn-border); }
aside.callout.warn .callout-label { color: var(--warn); }
aside.callout.warn p { color: var(--ink); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; margin: 20px 0 26px; background: var(--surface); box-shadow: 0 1px 2px var(--shadow); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 1rem; }
caption { text-align: left; padding: 12px 16px 0; font-size: 1rem; color: var(--ink-faint); }
thead th { background: var(--surface-alt); text-align: left; font-weight: 600; font-size: 1rem; color: var(--ink); padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody td, tbody th { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
tbody th { color: var(--ink); font-weight: 500; text-align: left; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: none; }
tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-alt) 45%, transparent); }
table.weights .crit-desc { color: var(--ink-faint); font-size: 1rem; }

/* ---------- FAQ ---------- */
details.qa { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: 4px 20px; margin-bottom: 12px; }
details.qa summary { cursor: pointer; padding: 15px 0; font-weight: 600; font-size: 1rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; color: var(--ink); }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; font-family: ui-monospace, monospace; color: var(--accent-ink); font-size: 1.15rem; flex-shrink: 0; }
details.qa[open] summary::after { content: "\2013"; }
details.qa > div { padding-bottom: 16px; }
details.qa p { color: var(--ink-soft); font-size: 1rem; margin: 0; }

ol.sources { padding-left: 1.2em; font-size: 1rem; }
ol.sources a { word-break: break-all; }

.page-foot { margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 1rem; color: var(--ink-faint); }
.page-foot h2 { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); margin: 0 0 14px; font-weight: 600; }
.page-foot .foot-summary { color: var(--ink-soft); font-size: 1rem; }
.page-foot .foot-summary strong { color: var(--ink); }
.page-foot .foot-author { margin-top: 4px; }
.page-foot .legal { margin-top: 10px; }
.page-foot .foot-langs { margin-top: 10px; display: flex; gap: 10px; }
.page-foot .foot-langs a { color: var(--ink-faint); text-decoration: underline; text-decoration-color: var(--border); }

@media (prefers-reduced-motion: no-preference) { a, details.qa summary::after { transition: color 0.15s ease; } }
