/* =====================================================
   best.css — Pages "Meilleurs..."
   Commun à tous les fichiers best-*.php
   ===================================================== */

/* ── Conteneur ───────────────────────────────────── */
#best {
  max-width: var(--max-width, 1280px);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* ══════════════════════════════════════════════════
   EN-TÊTE
   ══════════════════════════════════════════════════ */
.best__header {
  padding: 1.5rem 0 0;
}

.best__header h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
  margin: 0 0 1rem;
}

/* Texte introductif */
.best__intro {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text-secondary);
  margin: 0 0 1rem;
}

/* Date de mise à jour */
.best__meta-date {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--color-text-secondary);
  opacity: .7;
  margin: 0 0 1.5rem;
}

/* ── Sommaire ────────────────────────────────────── */
.best__toc {
  background: #fff;
  border-left: 4px solid var(--color-primary);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem;
  margin: 0 0 0.5rem;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}

.best__toc-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-secondary);
  margin: 0 0 0.65rem;
}

.best__toc-list {
  margin: 0;
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.best__toc-list li {
  font-size: 0.88rem;
}

.best__toc-list a {
  color: var(--color-text);
  text-decoration: none;
  transition: color .15s;
}

.best__toc-list a:hover {
  color: var(--color-primary);
}

/* ══════════════════════════════════════════════════
   SECTIONS GÉNÉRIQUES
   ══════════════════════════════════════════════════ */
.best__section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0,0,0,.08);
}

.best__section h2 {
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 1.5rem;
}

/* ══════════════════════════════════════════════════
   TOP 3 — PICKS
   ══════════════════════════════════════════════════ */
.best__picks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.best__pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  padding: 1.25rem 1rem 1rem;
  background: #fff;
  border-radius: 10px;
  border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  transition: box-shadow .2s, transform .2s;
}

.best__pick:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

.best__pick--global { border-color: #d4af37; }
.best__pick--value  { border-color: var(--color-primary); }
.best__pick--budget { border-color: var(--color-secondary); }

.best__pick-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-secondary);
}

.best__pick-img {
  width: 90px;
  height: 90px;
}

.best__pick-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.best__pick-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}

.best__pick-phrase {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.best__pick-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
}

.best__pick-price-old {
  font-size: 0.8rem;
  font-weight: 400;
  text-decoration: line-through;
  color: var(--color-text-secondary);
  margin-right: 0.3em;
}

.best__pick-cta {
  display: inline-block;
  padding: 0.45em 1.1em;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  transition: opacity .2s;
}

.best__pick-cta:hover { opacity: .85; }

/* ══════════════════════════════════════════════════
   PROFILS
   ══════════════════════════════════════════════════ */
.best__profils {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.best__profil {
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(0,0,0,.07);
}

.best__profil:last-child { border-bottom: none; }

.best__profil h3 {
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.75rem;
}

.best__profil p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--color-text-secondary);
  margin: 0 0 0.5rem;
}

.best__profil-cta {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  margin: 0.75rem 0 0 !important;
}

.best__profil-cta a {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(55,237,74,.4);
  transition: border-color .15s;
}

.best__profil-cta a:hover {
  border-color: var(--color-primary);
}

/* ══════════════════════════════════════════════════
   TABLEAU COMPARATIF
   ══════════════════════════════════════════════════ */
.best__table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.best__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: #fff;
}

.best__table thead th {
  background: var(--color-text);
  color: #fff;
  padding: 0.65rem 0.85rem;
  text-align: left;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  user-select: none;
}

.best__table thead th:hover { background: #2a2a2a; }

.best__table thead th[aria-sort="ascending"]::after  { content: ' ↑'; opacity: .7; }
.best__table thead th[aria-sort="descending"]::after { content: ' ↓'; opacity: .7; }

.best__table tbody tr {
  border-bottom: 1px solid rgba(0,0,0,.06);
  transition: background .12s;
}

.best__table tbody tr:last-child { border-bottom: none; }
.best__table tbody tr:hover      { background: rgba(55,237,74,.07); }

.best__table td {
  padding: 0.6rem 0.85rem;
  color: var(--color-text);
  vertical-align: middle;
}

.col-rank       { color: var(--color-text-secondary); text-align: center; width: 2.2rem; font-size: 0.8rem; }
.col-center     { text-align: center; }
.col-nowrap     { white-space: nowrap; }
.col-price      { font-weight: 600; white-space: nowrap; }
.col-note       { white-space: nowrap; text-align: center; }
.col-note strong { color: var(--color-primary); font-size: 0.95rem; }
.col-note-head  { text-align: center; }

.tbl-link {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(0,0,0,.15);
  transition: color .15s, border-color .15s;
}
.tbl-link:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.tbl-name  { font-weight: 600; color: var(--color-text); }

.tbl-badge { margin-left: 0.3em; font-size: 0.9em; }

.best__table-legend {
  font-size: 0.78rem;
  color: var(--color-text-secondary);
  text-align: center;
  margin: 0.25rem 0 0;
}

/* ══════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════ */
@media (max-width: 640px) {
  #best           { padding: 0 1rem 3rem; }
  .best__header   { padding: 1rem 0 0; }
  .best__picks    { grid-template-columns: 1fr; }
}
