/* ===============================
   PAGE LAYOUT
================================= */

.hero {
  margin: 20px 0 30px;
}

.hero h1 {
  margin-bottom: 12px;
}

.lead {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: 14px;
}

.kicker {
  margin: 0 0 6px;
  color: #666;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===============================
   BADGES / PILLS
================================= */

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}

.badges li a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  background: #f3f3f3;
  font-size: 0.9rem;
  text-decoration: none;
  color: #333;
  transition: background 0.2s ease;
}

.badges li a:hover {
  background: #e8e8e8;
}

/* ===============================
   MEDIA (images)
================================= */

.media {
  margin: 18px 0 0;
}

.media img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid #eee;
}

.media figcaption {
  color: #666;
  font-size: 0.95rem;
  margin-top: 8px;
}

/* ===============================
   TABLES (classements)
================================= */

.table-wrap {
  overflow-x: auto;
  margin-top: 14px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  text-align: left;
  vertical-align: top;
}

.table th {
  background: #fafafa;
  font-weight: 700;
}

.table tr:hover {
  background: #fcfcfc;
}

/* ===============================
   LISTES
================================= */

.list {
  margin: 0;
  padding-left: 18px;
}

.muted {
  color: #666;
}

/* ===============================
   NOTES & CALLOUTS
================================= */

.note {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #eee;
  border-radius: 14px;
  background: #fafafa;
}

.callout {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #e6f2e6;
  border-radius: 18px;
  background: #f6fff6;
}

/* ===============================
   FAQ
================================= */

.faq {
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff;
  margin-bottom: 10px;
  transition: background 0.2s ease;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
}

.faq[open] {
  background: #fafafa;
}

/* ===============================
   GRID
================================= */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

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

/* ===============================
   SOFT CARDS
================================= */

.card-soft {
  background: #fafafa;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #eee;
}

/* ===============================
   ADS (DEV)
================================= */

.ad {
  border: 1px dashed #cfcfcf;
  border-radius: 18px;
  padding: 18px;
  margin: 24px 0;
  background: #fff;
}

.ad::before {
  content: "Emplacement pub (DEV)";
  display: block;
  color: #777;
  font-weight: 600;
  margin-bottom: 6px;
}

/* ===============================
   DETAILS RESPONSIVE IMPROVEMENTS
================================= */

@media (max-width: 600px) {

  .lead {
    font-size: 1rem;
  }

  .badges li a {
    font-size: 0.8rem;
  }

  .table th,
  .table td {
    padding: 8px;
    font-size: 0.85rem;
  }
}

/* ===== Classements (énergie, protéines, etc.) ===== */

.badges {
  list-style: none;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0;
  margin: 14px 0 0;
}
.badges a, .badges li {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #eee;
  background: #fff;
  color: #333;
  text-decoration: none;
}

/* KPI (scan rapide) */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.kpi {
  border: 1px solid #eee;
  border-radius: 18px;
  padding: 14px;
  background: #fff;
}
.kpi strong { display:block; font-size: 1.05rem; }
.kpi span { color: #666; font-size: .95rem; }

@media (max-width: 900px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .kpis { grid-template-columns: 1fr; }
}

/* Sommaire sur les pages longues */
.toc-box {
  border: 1px solid #eee;
  border-radius: 18px;
  padding: 14px;
  background: #fafafa;
  margin: 14px 0 0;
}
.toc-box ul { margin: 8px 0 0; padding-left: 18px; }
.toc-box a { color: #333; }

/* Listes de classement */
.rank-list {
  padding-left: 22px;
}
.rank-list li {
  margin: 8px 0;
  line-height: 1.45;
}
.rank-kcal {
  color: #444;
  font-weight: 700;
}

/* Retour haut */
.back-top {
  display: inline-flex;
  margin-top: 10px;
  text-decoration: none;
  border: 1px solid #eee;
  border-radius: 999px;
  padding: 8px 12px;
  color: #333;
  background: #fff;
}
.back-top:hover { border-color: #ddd; }