/* Administration : tableau de bord (vue d'ensemble, fréquentation, classements) */
.adm-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin: 1.4rem 0 .7rem; }
.adm-block-head:first-child { margin-top: .4rem; }
.adm-block-head h2 { margin: 0; font-size: 1.15rem; letter-spacing: -.01em; }
.adm-block-head span { font-size: .78rem; color: var(--color-muted); }

.adm-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin: 0 0 .4rem; }
.adm-kpis .ribbon-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .25rem; padding: .85rem 1rem; border-radius: var(--r-md, 14px); border: 1px solid var(--stroke-line); background: var(--bg-surface); min-width: 0; }
.adm-kpis .ribbon-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); opacity: .7; }
.adm-kpis .ribbon-key { order: 1; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--color-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-kpis .ribbon-value { order: 2; font-family: var(--font-display); font-size: 1.85rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
@media (min-width: 860px) { .adm-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.dash-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
@media (min-width: 700px) { .dash-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .dash-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.dash-kpi { display: flex; flex-direction: column; gap: .2rem; padding: .85rem 1rem; border-radius: var(--r-md, 14px); border: 1px solid var(--stroke-line); background: var(--bg-surface); color: inherit; text-decoration: none; min-width: 0; }
.dash-kpi span { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--color-muted); }
.dash-kpi b { font-family: var(--font-display); font-size: 1.9rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.dash-kpi.alert { border-color: color-mix(in srgb, #f87171 55%, var(--stroke-line)); }
.dash-kpi.alert b { color: #f87171; }
a.dash-kpi:hover { border-color: var(--accent); }
.dd { font-style: normal; font-size: .74rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px; align-self: flex-start; background: color-mix(in srgb, var(--color-muted) 18%, transparent); color: var(--color-muted); }
.dd.up { background: color-mix(in srgb, #34d399 20%, transparent); color: #34d399; }
.dd.down { background: color-mix(in srgb, #f87171 20%, transparent); color: #f87171; }

.dash-card2 { margin-top: .9rem; padding: 1rem 1.1rem 1.1rem; border-radius: var(--r-lg, 18px); border: 1px solid var(--stroke-line); background: var(--bg-surface); min-width: 0; }
.dash-card2 > header { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .6rem; }
.dash-card2 h3 { margin: 0; font-size: 1rem; }
.dash-card2 small { display: block; margin-top: .15rem; font-size: .76rem; color: var(--color-muted); }
.dash-card2 .seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: color-mix(in srgb, var(--color-muted) 14%, transparent); }
.dash-card2 .seg button { border: 0; background: transparent; color: var(--color-muted); font: inherit; font-size: .78rem; font-weight: 700; padding: .3rem .75rem; border-radius: 999px; cursor: pointer; min-height: 32px; }
.dash-card2 .seg button.on { background: var(--accent); color: var(--on-accent, #fff); }
.dash-chart { width: 100%; }
.dash-svg { width: 100%; height: auto; display: block; overflow: visible; }
.dash-svg .dg { stroke: var(--stroke-line); stroke-width: 1; }
.dash-svg .dt { fill: var(--color-muted); font-size: 10px; }
.dash-svg .dl { stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.dash-svg .ds { fill: #34d399; opacity: .85; }
.dash-svg .dh { fill: transparent; }
.dash-svg .dp { fill: var(--accent); opacity: 0; transition: opacity .12s; }
.dash-svg g:hover .dp { opacity: 1; }
.dash-legend { display: flex; gap: 1rem; margin-top: .4rem; font-size: .76rem; color: var(--color-muted); }
.dash-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.dash-legend .l1 { background: var(--accent); } .dash-legend .l2 { background: #34d399; }

.dash-two { display: grid; grid-template-columns: 1fr; gap: 0 .9rem; }
@media (min-width: 860px) { .dash-two { grid-template-columns: 1fr 1fr; } }
.dash-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.dash-rank li { position: relative; border-radius: 10px; overflow: hidden; }
.dash-rank li > a, .dash-rank li > .row { position: relative; z-index: 1; display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; align-items: center; gap: .5rem; padding: .5rem .65rem; color: inherit; text-decoration: none; min-height: 40px; }
.dash-rank li > i { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--accent) 16%, transparent); border-radius: 10px; z-index: 0; }
.dash-rank .rk { font-size: .78rem; font-weight: 800; color: var(--color-muted); font-variant-numeric: tabular-nums; }
.dash-rank .nm { font-size: .88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-rank .vl { font-size: .85rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.dash-rank li.empty { padding: .8rem; font-size: .85rem; color: var(--color-muted); }
.dash-rank a:hover .nm { color: var(--accent); }

.dash-skel { display: grid; gap: .65rem; margin-top: .6rem; }
.dash-skel i { display: block; height: 84px; border-radius: 14px; background: linear-gradient(90deg, var(--bg-surface), color-mix(in srgb, var(--accent) 8%, var(--bg-surface)), var(--bg-surface)); background-size: 200% 100%; animation: dashsk 1.2s linear infinite; }
@keyframes dashsk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .dash-skel i { animation: none; } }

/* À traiter : tuiles cliquables */
.todo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
@media (min-width: 700px) { .todo-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.todo-tile { display: flex; flex-direction: column; gap: .2rem; padding: .95rem 1rem; border-radius: var(--r-md, 14px); border: 1px solid var(--stroke-line); background: var(--bg-surface); color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.todo-tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.todo-tile b { font-family: var(--font-display); font-size: 2.1rem; line-height: 1; font-variant-numeric: tabular-nums; }
.todo-tile span { font-size: .78rem; font-weight: 700; color: var(--color-muted); }
.todo-tile.zero b { color: var(--color-muted); opacity: .55; }
.todo-tile.warm { border-color: color-mix(in srgb, #fbbf24 50%, var(--stroke-line)); } .todo-tile.warm b { color: #fbbf24; }
.todo-tile.hot { border-color: color-mix(in srgb, #f87171 60%, var(--stroke-line)); background: color-mix(in srgb, #f87171 7%, var(--bg-surface)); } .todo-tile.hot b { color: #f87171; }
.todo-list { margin-top: .8rem; }
.todo-clear { text-align: center; }
.todo-more { margin: .6rem 0 0; font-size: .85rem; }
.dash-activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dash-activity li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .6rem; padding: .5rem 0; border-top: 1px solid var(--stroke-line); font-size: .85rem; }
.dash-activity li:first-child { border-top: 0; }
.dash-activity time { color: var(--color-muted); font-size: .76rem; padding-top: .1rem; }
.dash-activity .empty { display: block; color: var(--color-muted); }
@media (max-width: 520px) { .dash-activity li { grid-template-columns: 1fr; gap: .1rem; } }

/* Erreurs du navigateur */
.err-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.err-count { display: flex; align-items: baseline; gap: .5rem; } .err-count b { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; } .err-count span { font-size: .85rem; color: var(--color-muted); }
.err-count.bad b { color: #f87171; } .err-count.ok b { color: #34d399; }
.err-head .seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: color-mix(in srgb, var(--color-muted) 14%, transparent); }
.err-head .seg button { border: 0; background: transparent; color: var(--color-muted); font: inherit; font-size: .8rem; font-weight: 700; padding: .35rem .8rem; border-radius: 999px; cursor: pointer; min-height: 34px; }
.err-head .seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent, #fff); }
.err-list { display: flex; flex-direction: column; gap: .5rem; }
.err-row { display: grid; grid-template-columns: 4rem minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .7rem .85rem; border-radius: 12px; border: 1px solid var(--stroke-line); background: var(--bg-surface); }
.err-n { text-align: center; } .err-n b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; } .err-n small { font-size: .68rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: .04em; }
.err-main { min-width: 0; } .err-main b { display: block; font-size: .88rem; word-break: break-word; } .err-main small { display: block; margin-top: .15rem; font-size: .74rem; color: var(--color-muted); word-break: break-word; }
.err-act { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 620px) { .err-row { grid-template-columns: 3rem minmax(0, 1fr); } .err-act { grid-column: 1 / -1; justify-content: flex-start; } }
