/* Styles partagés du tableau de stats (admin + espace client) */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 12px 0 20px; }
.metric { background: #f0f4ff; padding: 10px 14px; border-radius: 8px; font-size: 0.85rem; }
.metric b { display: block; font-size: 1.3rem; margin-bottom: 2px; }
.trend { font-size: 0.75rem; font-weight: 600; margin-left: 6px; }
.trend.up { color: #188038; }
.trend.down { color: #c5221f; }
.trend.flat { color: #888; }

.overview-grid { margin-bottom: 20px; }
.pies-stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.tables-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.table-wrap { max-height: 260px; overflow-y: auto; }
.chart-title { font-size: 0.85rem; font-weight: 600; margin: 0 0 8px; }
.chart-wrap { position: relative; width: 100%; height: 220px; }
.chart-wrap.pie { height: 130px; }
.legend { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; font-size: 0.78rem; color: #555; }
.legend span.dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; flex-shrink: 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
td, th { text-align: left; padding: 4px 6px; border-bottom: 1px solid #eee; }
th { position: sticky; top: 0; background: #fff; }


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

@media (max-width: 520px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric b { font-size: 1.1rem; }
  .metric b .trend { display: block; margin-left: 0; }
  .chart-wrap { height: 180px; }
}

@media print {
  .table-wrap { max-height: none; overflow: visible; }
  .metrics, .overview-grid > div, .pies-stack > div, .tables-grid > div { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Mots-clés Google (Search Console) */
.keywords { margin-top: 20px; }
.kw-note { font-size: 0.85rem; color: #666; margin: 0; }
td.num, th.num { text-align: right; }
