/* ============================================================
   TV Finder — feuille de style principale
   Typo : Geist (UI) + Geist Mono (prix, specs)
   Système : fond gris chaud, cartes blanches, accents sombres
   ============================================================ */

:root {
  --bg: #f5f5f2;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #6f6f6a;
  --border: #e7e6e1;
  --border-soft: #f0efeb;
  --dark: #141414;
  --dark-2: #1e1e1e;
  --dark-muted: #b5b5af;
  --amber: #d97706;
  --accent: #ea580c;
  --accent-strong: #c2410c;
  --accent-light: #fb923c;
  --accent-soft: #fff3ea;
  --accent-shadow: rgba(234, 88, 12, 0.32);
  --green: #15803d;
  --red: #b91c1c;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 3px rgba(20, 20, 20, 0.05);
  --shadow-hover: 0 4px 14px rgba(20, 20, 20, 0.09);
}

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

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

body {
  margin: 0;
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--text); }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 22px;
}

.mono { font-family: 'Geist Mono', monospace; }

/* ---------- Header sombre ---------- */

.site-header {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.brand {
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  color: #ffffff;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
  border-radius: 6px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.site-nav { display: flex; gap: 26px; }

.site-nav a {
  font-size: 14px;
  color: var(--dark-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-nav a:hover { color: #ffffff; }

/* Sélecteur de langue : reste visible sur mobile, contrairement à la nav. */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--dark-muted);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 4px 11px;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.lang-switch:hover { color: #ffffff; border-color: rgba(255, 255, 255, 0.5); }
.lang-switch .lang-active { color: #ffffff; }
.lang-switch .lang-sep { color: rgba(255, 255, 255, 0.28); }

@media (max-width: 640px) {
  .site-nav { display: none; }
}

/* ---------- Fil d'Ariane ---------- */

.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  padding: 26px 0 0;
}

.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Titres ---------- */

h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 14px 0 18px;
}

h2 {
  font-size: clamp(1.3rem, 3vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}

h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0 0 10px;
}

section { margin: 52px 0; }

.section-intro {
  max-width: 720px;
  color: #4a4a46;
  margin: 0 0 22px;
}

/* ---------- Réponse directe ---------- */

.direct-answer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  font-size: 1.12rem;
  line-height: 1.6;
  max-width: 780px;
  margin: 0 0 26px;
  padding: 20px 24px;
}

/* ---------- Intro article ---------- */

.article-intro {
  font-size: 1.075rem;
  max-width: 760px;
  color: #2c2c29;
}

.article-intro p { margin: 0 0 14px; }

.updated {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 8px;
}

/* ---------- Bandeau chiffres clés (sombre) ---------- */

.stats-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  background: var(--dark);
  border-radius: var(--radius);
  padding: 22px;
  margin: 30px 0 4px;
}

.stat { padding: 4px 2px; }

.stat-value {
  font-family: 'Geist Mono', monospace;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent-light);
}

.stat-label {
  font-size: 12.5px;
  color: var(--dark-muted);
  margin-top: 5px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .stats-strip { grid-template-columns: 1fr; padding: 18px; }
}

/* ---------- Cartes ---------- */

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

/* ---------- Carte recommandation ---------- */

.reco-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  padding: 26px;
  border-color: #f2d4bd;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.reco-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 600;
  border-radius: 99px;
  padding: 4px 13px;
  margin: 0 0 12px;
}

.reco-media .product-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.reco-lead {
  font-size: 1.06rem;
  margin: 0 0 14px;
  max-width: 560px;
}

.reco-reasons {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.reco-reasons li {
  font-size: 14.5px;
  padding: 5px 0 5px 22px;
  position: relative;
  color: #333;
}

.reco-reasons li::before {
  content: "+";
  position: absolute;
  left: 0;
  font-family: 'Geist Mono', monospace;
  font-weight: 600;
  color: var(--green);
}

.reco-honest {
  font-size: 14px;
  color: var(--muted);
  max-width: 720px;
  margin: 16px 0 0;
}

@media (max-width: 760px) {
  .reco-card { grid-template-columns: 1fr; padding: 20px; gap: 16px; }
}

/* ---------- Note et prix ---------- */

.rating {
  font-size: 13.5px;
  color: #4a4a46;
}

.rating .stars { color: var(--amber); letter-spacing: 1px; }

.price {
  font-family: 'Geist Mono', monospace;
  font-size: 1.3rem;
  font-weight: 600;
}

.price-old {
  font-family: 'Geist Mono', monospace;
  font-size: 0.85rem;
  color: #9a9a94;
  text-decoration: line-through;
  margin-left: 8px;
}

/* ---------- Boutons (sortie conversion, orange Amazon) ---------- */

.btn {
  display: inline-block;
  background: linear-gradient(180deg, #f97316, var(--accent));
  color: #ffffff;
  font-family: 'Geist', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: 12px;
  border: none;
  box-shadow: 0 2px 8px var(--accent-shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  text-align: center;
  cursor: pointer;
}

.btn::after {
  content: "→";
  margin-left: 9px;
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px var(--accent-shadow);
  filter: brightness(1.06);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px var(--accent-shadow);
}

.btn:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 2px;
}

.btn-lg { padding: 15px 30px; font-size: 15.5px; border-radius: 13px; }

.btn-block { display: block; width: 100%; }

.btn-sm {
  padding: 9px 16px;
  font-size: 13px;
  border-radius: 9px;
  box-shadow: 0 1px 5px var(--accent-shadow);
}

.btn-sm::after { margin-left: 7px; }

/* ---------- Tableaux (dans carte blanche) ---------- */

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 6px 18px;
}

table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.compare th {
  text-align: left;
  font-weight: 500;
  font-size: 12.5px;
  color: var(--muted);
  padding: 14px 12px 10px;
  border-bottom: 1px solid var(--border);
  white-space: normal;
}

table.compare td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}

table.compare tbody tr:last-child td { border-bottom: none; }

@media (min-width: 681px) {
  table.compare tbody tr { transition: background 0.12s ease; }
  table.compare tbody tr:hover { background: var(--accent-soft); }
}

table.compare .cell-model { font-weight: 600; }

table.compare .cell-spec {
  font-family: 'Geist Mono', monospace;
  font-size: 12.5px;
  color: #333;
}

table.compare .cell-price {
  font-family: 'Geist Mono', monospace;
  font-weight: 600;
  white-space: nowrap;
}

/* Transformation en cartes sur mobile */
@media (max-width: 680px) {
  .table-wrap { padding: 4px 14px; }
  table.compare thead { display: none; }
  table.compare, table.compare tbody,
  table.compare tr, table.compare td { display: block; width: 100%; }
  table.compare tr {
    border: 1px solid var(--border);
    border-radius: 12px;
    margin: 10px 0;
    padding: 6px 14px;
    background: var(--surface);
  }
  table.compare td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    border-bottom: 1px solid var(--border-soft);
    padding: 9px 0;
    text-align: right;
  }
  table.compare td:last-child { border-bottom: none; }
  table.compare td::before {
    content: attr(data-label);
    font-size: 12.5px;
    color: var(--muted);
    text-align: left;
    flex-shrink: 0;
  }
  table.compare td.cell-thumb { display: none; }
  table.compare td.cell-model { text-align: right; }
  table.compare td.cell-model::before { display: none; }
}

/* Miniature produit dans tableau */
.thumb {
  width: 64px;
  height: 44px;
  object-fit: contain;
  display: block;
}

/* ---------- Fiches produits ---------- */

.fiche {
  padding: 26px;
  margin: 0 0 20px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.fiche:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.fiche-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  margin-bottom: 18px;
}

@media (max-width: 680px) {
  .fiche-head { grid-template-columns: 1fr; }
  .fiche { padding: 20px; }
}

.fiche-head .product-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.fiche-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.fiche-title a { text-decoration: none; }

.fiche-sub {
  font-family: 'Geist Mono', monospace;
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 12px;
}

.fiche-buy {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.fiche-body p { margin: 0 0 12px; font-size: 15px; }

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 18px 0;
}

@media (max-width: 680px) {
  .pros-cons { grid-template-columns: 1fr; gap: 14px; }
}

.pros-cons ul { list-style: none; margin: 0; padding: 0; }

.pros-cons li {
  font-size: 14px;
  color: #333;
  padding: 4px 0 4px 22px;
  position: relative;
}

.pros li::before {
  content: "+";
  position: absolute;
  left: 0;
  font-family: 'Geist Mono', monospace;
  font-weight: 600;
  color: var(--green);
}

.cons li::before {
  content: "–";
  position: absolute;
  left: 0;
  font-family: 'Geist Mono', monospace;
  font-weight: 600;
  color: var(--red);
}

blockquote.review {
  margin: 18px 0 0;
  padding: 16px 20px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  color: #333;
}

blockquote.review p { margin: 0 0 6px; }

blockquote.review cite {
  font-style: normal;
  font-size: 12.5px;
  color: var(--muted);
}

.specs-line {
  font-family: 'Geist Mono', monospace;
  font-size: 12.5px;
  color: var(--muted);
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

/* ---------- Légende du comparateur ---------- */

.legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 20px 24px;
  margin: 0 0 18px;
}

.legend-item h3 {
  font-size: 13.5px;
  margin: 0 0 4px;
}

.legend-item p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 680px) {
  .legend { grid-template-columns: 1fr; }
}

/* ---------- Barre de filtres ---------- */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 14px 18px;
  margin: 0 0 16px;
}

.filter-bar label {
  font-size: 13px;
  color: #4a4a46;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-bar select {
  font-family: 'Geist', sans-serif;
  font-size: 13.5px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.filter-bar select:hover { border-color: #c9c8c2; }
.filter-bar select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.filter-count {
  font-family: 'Geist Mono', monospace;
  font-size: 12.5px;
  color: var(--muted);
  margin-left: auto;
}

@media (max-width: 680px) {
  .filter-count { margin-left: 0; width: 100%; }
}

tr.row-hidden { display: none !important; }

.no-result {
  display: none;
  font-size: 14px;
  color: var(--muted);
  padding: 18px 0;
}

.no-result.visible { display: block; }

/* ---------- FAQ (dans carte blanche) ---------- */

.faq details {
  border-bottom: 1px solid var(--border-soft);
}

.faq details:first-child { border-top: none; }
.faq details:last-child { border-bottom: none; }

.faq summary {
  font-size: 1.02rem;
  font-weight: 500;
  padding: 17px 40px 17px 0;
  cursor: pointer;
  list-style: none;
  position: relative;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Geist Mono', monospace;
  font-size: 1.2rem;
  color: #a3a29c;
  transition: color 0.15s ease;
}

.faq details[open] summary::after { content: "–"; color: var(--accent); }

.faq summary:hover::after { color: var(--accent); }

.faq .faq-answer {
  padding: 0 0 18px;
  font-size: 15px;
  color: #333;
  max-width: 720px;
}

/* Le conteneur FAQ devient une carte */
.faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 6px 24px;
}

/* ---------- Corps de texte ---------- */

.prose p { margin: 0 0 14px; font-size: 15.5px; max-width: 760px; }

.prose a { text-decoration: underline; text-underline-offset: 3px; }

.prose a:hover { color: var(--accent-strong); }

/* ---------- Tags modèles ---------- */

.tag {
  display: inline-block;
  font-size: 11.5px;
  color: #4a4a46;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 2px 10px;
  margin: 3px 4px 0 0;
  vertical-align: middle;
}

/* ---------- Footer sombre ---------- */

.site-footer {
  background: var(--dark);
  color: var(--dark-muted);
  margin-top: 72px;
  padding: 40px 0 44px;
  font-size: 13.5px;
}

.site-footer .container { max-width: 1100px; }

.site-footer .footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.site-footer a { color: var(--dark-muted); text-decoration: none; }
.site-footer a:hover { color: #ffffff; text-decoration: underline; }

.site-footer p { margin: 0 0 10px; max-width: 720px; line-height: 1.6; }

.footer-note {
  font-size: 12.5px;
  color: #8a8a84;
  margin-top: 20px;
}

/* ---------- Divers ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
  background: #fff;
  color: #000;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
}

::selection { background: #1a1a1a; color: #fff; }

/* ---------- Apparition au scroll ---------- */
/* html.js : n'active l'effet que si le JS tourne (fallback visible sinon) */

html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

html.js .reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn, .fiche, .reco-card { transition: none; }
}

/* ---------- Barre CTA fixe (mobile) ---------- */

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(20, 20, 20, 0.97);
  padding: 11px 18px;
  padding-bottom: calc(11px + env(safe-area-inset-bottom, 0px));
  transform: translateY(110%);
  transition: transform 0.3s ease;
  box-shadow: 0 -4px 20px rgba(20, 20, 20, 0.25);
}

.sticky-cta.visible { transform: translateY(0); }

.sticky-cta-info strong {
  display: block;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.sticky-cta-info span {
  color: var(--dark-muted);
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
}

@media (max-width: 760px) {
  .sticky-cta { display: flex; }
  body { padding-bottom: 66px; }
}