/* Back-office : lisibilité, densité raisonnable, aucun geste caché. */
:root { --a-ink: #1f2430; --a-soft: #5b6270; --a-line: #e2e5ea; --a-bg: #f4f5f7; --a-accent: #1f9ec4; --a-accent-dark: #167f9e; --a-ok: #1c7c3d; --a-warn: #b26a00; --a-bad: #b3261e; }
* { box-sizing: border-box; }
body.admin { margin: 0; font: 16px/1.5 Lato, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; color: var(--a-ink); background: var(--a-bg); }
a { color: var(--a-accent-dark); }
.admin-top { background: #fff; border-bottom: 1px solid var(--a-line); padding: 0 1.25rem; }
.admin-topbar { display: flex; align-items: center; gap: 1.5rem; max-width: 1440px; margin: auto; padding: .9rem 0; }
.admin-brand { flex-shrink: 0; font-weight: 800; font-size: 1.1rem; color: var(--a-ink); text-decoration: none; line-height: 1.3; }
.admin-brand span { display: block; color: var(--a-soft); font-size: .78rem; font-weight: 400; }
.admin-site { margin-left: auto; display: flex; flex-direction: column; min-width: 0; padding: .4rem .8rem; background: #edf6f8; border: 1px solid #d1e6eb; border-radius: 10px; }
.admin-site label { font-size: .7rem; font-weight: 700; color: #426671; text-transform: uppercase; letter-spacing: .06em; }
.admin-site select { width: 100%; max-width: 410px; min-height: 30px; padding: .1rem 1.4rem .1rem 0; border: 0; background: transparent; color: #204e5c; font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; }
.admin-user { color: var(--a-soft); display: flex; flex-direction: column; align-items: flex-end; gap: .1rem; font-size: .8rem; }
.admin-user a { text-decoration: none; }
.admin-nav { display: flex; align-items: center; gap: .35rem; max-width: 1440px; margin: auto; padding: .45rem 0; border-top: 1px solid #edf0f2; }
.admin-nav a, .admin-menu summary { display: flex; align-items: center; gap: .75rem; padding: .65rem .8rem; border-radius: 7px; text-decoration: none; color: var(--a-ink); font-size: .9rem; font-weight: 700; cursor: pointer; }
.admin-nav a[aria-current="page"], .admin-menu.is-current > summary { background: #eaf5f8; color: #14647b; }
.admin-nav a:hover, .admin-menu summary:hover, .admin-menu[open] > summary { background: var(--a-bg); color: var(--a-accent-dark); }
.admin-nav a:focus-visible, .admin-menu summary:focus-visible, .admin-site select:focus-visible { outline: 3px solid var(--a-accent); outline-offset: 2px; }
.admin-nav .admin-view-site { margin-left: auto; font-size: .8rem; font-weight: 400; white-space: nowrap; }
.admin-menu { position: relative; }
.admin-menu summary { list-style: none; }
.admin-menu summary::-webkit-details-marker { display: none; }
.admin-menu-chevron { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.admin-menu[open] .admin-menu-chevron { transform: rotate(225deg) translate(-2px, -1px); }
.admin-menu-panel { position: absolute; top: calc(100% + .35rem); left: 0; z-index: 100; width: max-content; min-width: 240px; padding: .45rem; background: white; border: 1px solid var(--a-line); border-radius: 10px; box-shadow: 0 12px 32px #1f243024; }
.admin-menu-panel a { padding: .75rem .8rem; font-weight: 500; }
.admin-menu-panel a[aria-current="page"] { font-weight: 700; }
@media (max-width: 1000px) {
  .admin-top { padding: 0 1rem; }
  .admin-topbar { flex-wrap: wrap; gap: .75rem; }
  .admin-user { margin-left: auto; }
  .admin-site { order: 3; flex: 1 0 100%; margin: 0; }
  .admin-site select { max-width: none; }
  .admin-nav { flex-wrap: wrap; align-items: flex-start; gap: .2rem; }
  .admin-nav-home { width: 100%; }
  .admin-nav .admin-view-site { margin-left: 0; }
  .admin-menu { flex: 1 0 calc(50% - .2rem); min-width: 0; }
  .admin-menu summary { justify-content: space-between; font-size: .83rem; padding: .7rem .5rem; }
  .admin-menu-panel { position: static; width: auto; min-width: 0; margin: .2rem 0 .5rem; box-shadow: none; }
  .admin-menu-panel a { font-size: .82rem; padding: .65rem .5rem; overflow-wrap: anywhere; }
}
.admin-main { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.admin-main h1 { font-size: 1.7rem; margin: 0 0 1rem; }
.admin-main h2 { font-size: 1.2rem; margin: 1.5rem 0 .75rem; }
.admin-flash { padding: .7rem 1rem; border-radius: 8px; background: #e6f4ea; color: var(--a-ok); font-weight: 700; }
.admin-flash--error { background: #fdecea; color: var(--a-bad); }
.admin-card { background: #fff; border-radius: 12px; border: 1px solid var(--a-line); padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.admin-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.admin-kpi { background: #fff; border: 1px solid var(--a-line); border-radius: 12px; padding: 1rem; }
.admin-kpi strong { display: block; font-size: 1.8rem; }
.admin-kpi--warn strong { color: var(--a-warn); }
.admin-kpi--bad strong { color: var(--a-bad); }
table.admin-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--a-line); border-radius: 12px; overflow: hidden; }
.admin-table th, .admin-table td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid var(--a-line); vertical-align: middle; }
.admin-table th { background: var(--a-bg); font-size: .9rem; color: var(--a-soft); }
.admin-table tr.is-past td { color: var(--a-soft); }
.admin-table .num { text-align: right; }
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .85rem; font-weight: 700; background: var(--a-bg); }
.badge--ok { background: #e6f4ea; color: var(--a-ok); }
.badge--warn { background: #fff4e0; color: var(--a-warn); }
.badge--bad { background: #fdecea; color: var(--a-bad); }
.badge--soft { color: var(--a-soft); }
.admin-form label { display: block; font-weight: 700; margin: .75rem 0 .25rem; }
.admin-form input[type="text"], .admin-form input.select-filter, .admin-form input[type="date"], .admin-form input[type="email"], .admin-form input[type="password"], .admin-form input[type="number"], .admin-form input[type="url"], .admin-form textarea, .admin-form select { width: 100%; font: inherit; padding: .55rem .7rem; border: 1px solid #c9ced6; border-radius: 8px; }
.admin-form textarea { min-height: 6rem; }
.admin-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.admin-form .check { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
.admin-form small { color: var(--a-soft); display: block; }
.btn { display: inline-block; padding: .5rem .9rem; border-radius: 8px; border: 1px solid var(--a-accent); background: var(--a-accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn--ghost { background: #fff; color: var(--a-accent-dark); }
.btn--small { padding: .25rem .6rem; font-size: .9rem; }
.btn--danger { border-color: var(--a-bad); background: #fff; color: var(--a-bad); }
.admin-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; }
.admin-toolbar { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-inline { display: inline; }
.admin-login { max-width: 420px; margin: 4rem auto; }
.tree { list-style: none; padding-left: 0; margin: 0; }
.tree ul { list-style: none; padding-left: 1.5rem; margin: 0; }
.tree li { padding: .25rem 0; border-bottom: 1px dotted var(--a-line); }
.tree .node { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.tree .node .name { font-weight: 700; min-width: 16rem; }
.tree .node.is-hidden .name { color: var(--a-soft); text-decoration: line-through; }
.tree .node.is-match .name { background: #fff3c4; border-radius: 4px; }
.category-search { margin: 1.5rem 0 1rem; }
.category-search input { flex: 1 1 22rem; max-width: 32rem; padding: .5rem .7rem; border: 1px solid var(--a-line); border-radius: 8px; font: inherit; }
/* Interrupteur vert (calendrier, menus, cartes). */
.menu-item-switch { appearance: none; width: 40px; height: 24px; padding: 3px; border: 0; border-radius: 20px; background: #9ca3af; cursor: pointer; align-self: center; flex-shrink: 0; }
.menu-item-switch span { display: block; width: 18px; height: 18px; border-radius: 50%; background: white; box-shadow: 0 1px 3px #0003; transition: transform .15s; }
.menu-item-switch[aria-checked=true] { background: #16805b; }
.menu-item-switch[aria-checked=true] span { transform: translateX(16px); }
.menu-item-switch:focus-visible { outline: 3px solid #126781; outline-offset: 3px; }
.menu-item-switch:disabled { cursor: wait; opacity: .65; }
.card-switch { display: inline-flex; align-items: center; gap: .4rem; }
.card-switch small { color: var(--a-soft); font-size: .8rem; }
/* Carte inactive dans une liste de cartes : couleurs gardées, contenu en transparence sur une bande plus grise
   (propriétaire, 14 novembre 2026 : « juste un alpha »). L'interrupteur, l'ordre et les boutons restent nets. */
.admin-table tr.is-inactive { background: #ebebeb; }
.admin-table tr.is-inactive td:not(.card-state):not(.card-order):not(:last-child) { opacity: .5; }
.admin-table tr.is-inactive td.card-order .rank, .admin-table tr.is-inactive td.card-order .drag-handle { opacity: .5; }
.card-order { white-space: nowrap; }
.card-categories a { color: inherit; text-decoration: none; border-bottom: 1px dotted #9aa3ae; }
.card-categories a:hover { color: var(--a-accent-dark); border-bottom-color: currentColor; }
.card-categories a[aria-current] { font-weight: 700; border-bottom: 0; }
.card-order .btn { padding: .1rem .45rem; }
.order-bubble { position: fixed; z-index: 50; max-width: 18rem; padding: .45rem .65rem; border: 1px solid #b8dcc9; border-radius: 8px; background: #eef8f3; box-shadow: 0 6px 16px #12303a22; font-size: .8rem; line-height: 1.35; color: #16805b; }
.order-bubble[hidden] { display: none; }
.order-bubble.is-error { border-color: #f0c2bd; background: #fdf1ef; color: #b3261e; font-weight: 700; }
.admin-table tr:not(.is-inactive) [data-card-bottom] { opacity: .45; }
.category-combo-label { position: relative; }
.category-combo { display: block; position: relative; font-weight: 400; }
.category-combo input[type=text] { width: 100%; }
.category-combo__list { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: max(100%, 30rem); max-height: 24rem; overflow-y: auto; margin: 0; padding: .35rem; list-style: none; border: 1px solid var(--a-line); border-radius: 12px; background: #fff; box-shadow: 0 16px 36px #12303a2e; font-size: .95rem; font-weight: 400; }
.category-combo__list li { list-style: none; margin: 0; }
.category-combo__list li[data-id] { display: flex; flex-direction: column; gap: .1rem; padding: .5rem .75rem; border-radius: 8px; cursor: pointer; line-height: 1.25; }
.category-combo__name { font-weight: 600; color: var(--a-ink); }
.category-combo__path { font-size: .8rem; color: var(--a-soft); }
.category-combo__list mark { background: #fff1b8; color: inherit; border-radius: 3px; padding: 0 1px; }
.category-combo__list li.category-combo__reset { flex-direction: row; margin-bottom: .25rem; border-bottom: 1px solid var(--a-line); border-radius: 8px 8px 0 0; }
.category-combo__list li.category-combo__reset .category-combo__name { font-weight: 400; color: var(--a-accent-dark); }
.category-combo__list li.is-active, .category-combo__list li[data-id]:hover { background: #e7f4f5; }
.category-combo__list li[aria-selected=true] .category-combo__name::after { content: " ✓"; color: var(--a-accent-dark); }
.category-combo__note { padding: .35rem .75rem .25rem; font-size: .78rem; color: var(--a-soft); text-transform: uppercase; letter-spacing: .04em; }
.muted { color: var(--a-soft); }

/* En-tête de page : titre + action à droite */
.admin-toolbar--head { justify-content: space-between; align-items: flex-start; margin-bottom: 1.25rem; }
.admin-toolbar--head h1 { margin-bottom: .15rem; }
.admin-toolbar--head p { margin: 0; }

/* À la une : état actuel + choix du mode */
.spot-now { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1.25rem; margin-bottom: 2rem; }
.spot-now__status { background: #fff; border: 1px solid var(--a-line); border-radius: 12px; padding: 1.25rem 1.5rem; }
.spot-now__label { margin: 0 0 .5rem; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; color: var(--a-soft); font-weight: 700; }
.spot-now__title { margin: 0; font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.spot-now__title span { color: var(--a-accent-dark); }
.spot-now__title--none { color: var(--a-soft); }
.spot-now__meta { margin: .5rem 0 0; color: var(--a-soft); }
.spot-now__why { margin: .9rem 0 0; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.spot-mode { background: #fff; border: 1px solid var(--a-line); border-radius: 12px; padding: 1.25rem 1.5rem; }
.spot-mode__rule { margin: 0 0 .9rem; color: var(--a-soft); }
.spot-mode__rule strong { display: inline-block; min-width: 1.3rem; text-align: center; background: var(--a-ink); color: #fff; border-radius: 50%; font-size: .8rem; }
.spot-option { display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: start; padding: .8rem .9rem; border: 1px solid var(--a-line); border-radius: 10px; margin-bottom: .6rem; cursor: pointer; }
.spot-option.is-selected { border-color: var(--a-accent); background: #f2fafd; }
.spot-option input[type="radio"] { width: 1.15rem; height: 1.15rem; margin-top: .25rem; }
.spot-option__body { display: block; }
.spot-option__title { display: flex; align-items: center; gap: .5rem; font-weight: 700; }
.spot-option__num { display: inline-flex; width: 1.4rem; height: 1.4rem; align-items: center; justify-content: center; border-radius: 50%; background: var(--a-ink); color: #fff; font-size: .8rem; }
.spot-option__help { display: block; color: var(--a-soft); font-size: .95rem; margin-top: .15rem; }
.spot-option__select { display: block; width: 100%; margin-top: .6rem; font: inherit; padding: .5rem .6rem; border: 1px solid #c9ced6; border-radius: 8px; }
.spot-mode .admin-actions { margin-top: .75rem; }

/* Tableau des mises en avant */
.spot-table__dates strong { display: block; }
.spot-table__dates span { display: block; color: var(--a-soft); font-size: .9rem; }
.spot-table__dates .badge { margin-top: .35rem; }
.spot-table__title { display: block; font-weight: 700; }
.spot-table__title + .muted { display: block; font-size: .9rem; }
.admin-table .spot-table__actions { text-align: right; white-space: nowrap; }
.spot-table__dates { min-width: 9.5rem; }
.spot-table__dates .badge { white-space: nowrap; }
.spot-table td code { white-space: nowrap; }
.spot-table__actions .admin-inline, .spot-table__actions .btn { margin-left: .25rem; }
tr.is-live td { background: #f7fcf8; }
.btn--link-danger { border: 0; background: none; color: var(--a-bad); font-weight: 400; text-decoration: underline; }
.btn[disabled] { opacity: .45; cursor: default; }
code { background: var(--a-bg); padding: .05rem .35rem; border-radius: 4px; font-size: .9em; }

/* Interrupteur oui/non */
.switch { display: inline-flex; align-items: center; gap: .45rem; border: 0; background: none; font: inherit; cursor: pointer; color: var(--a-soft); padding: 0; }
.switch span { width: 2.2rem; height: 1.25rem; border-radius: 999px; background: #c9ced6; position: relative; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: .15rem; left: .15rem; width: .95rem; height: .95rem; border-radius: 50%; background: #fff; transition: left .15s; }
.switch.is-on { color: var(--a-ok); font-weight: 700; }
.switch.is-on span { background: var(--a-ok); }
.switch.is-on span::after { left: 1.1rem; }
@media (max-width: 900px) { .spot-now { grid-template-columns: 1fr; } .spot-table__actions { white-space: normal; } }

/* Tableau de bord par ligne de produit */
.dash-lines { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-bottom: 1.5rem; }
.dash-line { background: #fff; border: 1px solid var(--a-line); border-radius: 12px; padding: 1.1rem 1.25rem; }
.dash-line h2 { margin: 0 0 .9rem; font-size: 1.15rem; }
.dash-line h2 small { display: block; font-size: .85rem; color: var(--a-soft); font-weight: 400; margin-top: .1rem; }
.dash-line--soon { background: var(--a-bg); border-style: dashed; }
.dash-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.dash-kpi { background: var(--a-bg); border-radius: 10px; padding: .6rem .75rem; }
.dash-kpi span { display: block; font-size: .85rem; color: var(--a-soft); }
.dash-kpi strong { font-size: 1.5rem; }
.dash-kpi.is-warn strong { color: var(--a-warn); }
.dash-kpi.is-bad strong { color: var(--a-bad); }
.dash-states { margin-top: .9rem; }
.dash-states summary { cursor: pointer; color: var(--a-accent-dark); font-weight: 700; }
.dash-states table { margin-top: .5rem; }
@media (max-width: 1000px) { .dash-lines { grid-template-columns: 1fr; } }

/* Aperçus de cartes dans les formulaires */
.card-previews { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .75rem; }
.card-previews figure { margin: 0; width: 120px; font-size: .8rem; color: var(--a-soft); }
.card-previews img { display: block; width: 120px; height: auto; border-radius: 6px; margin-bottom: .2rem; }
/* Page d'une catégorie : ordre des cartes par glisser-déposer */
.drag-handle { display: inline-block; vertical-align: middle; padding: .35rem .5rem; margin-right: .25rem; border-radius: 6px; color: var(--a-soft); font-size: 1.25rem; line-height: 1; cursor: grab; user-select: none; -webkit-user-select: none; }
.drag-handle:hover { background: var(--a-bg); color: var(--a-ink); }
#category-cards td.num { white-space: nowrap; }
#category-cards tr.is-dragging td, [data-cards-order] tr.is-dragging td { background: #e8f6fb; }
#category-cards tr.is-dragging .drag-handle, [data-cards-order] tr.is-dragging .drag-handle { cursor: grabbing; }
/* Fiche carte : aperçu de chaque fichier présent sur www.drostatic.com */
.file-preview { width: 184px; }
.file-preview img, .file-preview video { display: block; max-width: 160px; max-height: 120px; width: auto; height: auto; border-radius: 6px; border: 1px solid var(--a-line); background: var(--a-bg); }

/* Catégories et textes du bandeau, par site. */
.header-menu-slot{border:1px solid var(--a-line);border-radius:8px;margin:1rem 0;padding:.5rem 1rem 1rem}
.header-menu-slot legend{font-weight:700;padding:0 .3rem}
.dash-kpi strong a { color: inherit; text-decoration: none; }
.dash-kpi strong a:hover { text-decoration: underline; }
.dash-kpi small { display: block; font-size: .78rem; }

/* Filtres des envois : critères, période puis comptage. */
.sendings-filters { background: #fff; border: 1px solid #e1e5ea; border-radius: 12px; padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.sendings-filters__row { display: grid; grid-template-columns: 1fr .8fr 1.2fr 1.8fr; gap: 1rem; }
.sendings-filters label { margin: 0; font-size: .9rem; }
.sendings-filters select, .sendings-filters input { display: block; margin-top: .35rem; height: 2.75rem; min-width: 0; font-weight: 400; }
.sendings-filters select { -webkit-appearance: none; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23566373' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right .8rem center; padding-right: 2.2rem; color: #303946; }
.sendings-filters__row > label { min-width: 0; }
.sendings-filters input[type="search"] { width: 100%; font: inherit; padding: .55rem .7rem; border: 1px solid #c9ced6; border-radius: 8px; }
.sendings-period { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: .3rem; padding-bottom: .3rem; border-top: 1px solid #e1e5ea; padding-top: 1rem; margin-top: 1.25rem; }
.sendings-period__chip { flex: 0 0 auto; white-space: nowrap; font: inherit; font-size: .78rem; padding: .45rem .45rem; border: 1px solid #ccd3da; border-radius: 2rem; background: #f7f8fa; color: #303946; cursor: pointer; }
.sendings-period__chip.is-active { background: #137f9c; border-color: #137f9c; color: #fff; }
.sendings-period__chip:hover { border-color: #137f9c; }
.sendings-period__chip:focus-visible { outline: 2px solid #137f9c; outline-offset: 2px; }
.sendings-filters__dates { display: flex; align-items: end; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; }
.sendings-filters__dates > a, .sendings-filters__dates > span { padding-bottom: .7rem; }
.sendings-filters__dates > button { min-height: 2.75rem; }
.sendings-summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem 1rem; margin: 1.25rem 0; }
@media (max-width: 1000px) { .sendings-filters__row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .sendings-filters__row { grid-template-columns: 1fr; } .sendings-filters { padding: 1rem; } }
/* Cartes les plus envoyées : deux filtres, vignette et nom sur une ligne, part en barre. */
.sendings-filters__row--two { grid-template-columns: .8fr .7fr 1.6fr 1.4fr; }
.top-cards__check { display: flex; align-items: center; gap: .5rem; align-self: end; min-height: 2.75rem; }
.top-cards__check input { margin: 0; width: 1.1rem; height: 1.1rem; }
/* Filtre oui/non des listes de cartes (Club, à ranger) : interrupteur vert, appliqué dès qu'on le bascule. */
.admin-form .filter-switch, .filter-switch { display: inline-flex; align-items: center; gap: .6rem; align-self: end; min-height: 2.75rem; padding: 0 .9rem 0 .6rem; border: 1px solid var(--a-line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 400; user-select: none; }
.filter-switch:hover { border-color: #b9c2cc; }
.filter-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.filter-switch__track { position: relative; flex-shrink: 0; width: 40px; height: 24px; border-radius: 20px; background: #9ca3af; transition: background .15s; }
.filter-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0003; transition: transform .15s; }
.filter-switch input:checked + .filter-switch__track { background: #16805b; }
.filter-switch input:checked + .filter-switch__track::after { transform: translateX(16px); }
.filter-switch:has(input:checked) { border-color: #16805b; background: #eef8f3; }
.filter-switch input:focus-visible + .filter-switch__track { outline: 3px solid #126781; outline-offset: 2px; }
@media (max-width: 1000px) { .sendings-filters__row--two { grid-template-columns: 1fr 1fr; } }
.top-cards__card a { display: flex; align-items: center; gap: .75rem; color: inherit; text-decoration: none; }
.top-cards__card a:hover span { text-decoration: underline; }
.top-cards__card img { flex: 0 0 auto; border-radius: 4px; background: var(--a-bg); object-fit: contain; }
/* Vignette d'une carte papier : portrait (format A, 300 × 424), pas le 4:3 des cartes virtuelles. */
.top-cards__card img.thumb--paper { width: 48px; height: 68px; box-shadow: 0 1px 3px #0002; }
.top-cards__share { position: relative; min-width: 120px; }
.top-cards__share > span:last-child { position: relative; font-variant-numeric: tabular-nums; }
.top-cards__bar { position: absolute; left: 0; top: 50%; height: 1.4rem; transform: translateY(-50%); background: rgba(19, 127, 156, .15); border-radius: 4px; max-width: 100%; }
/* Filtre d'une liste déroulante (fiche carte : catégorie à ajouter) : le champ de recherche au-dessus de la liste,
   puis la liste, la place et le bouton sur une ligne. */
.admin-form input.select-filter { margin-bottom: .5rem; }
.admin-form input.select-filter + select { margin-top: 0; }
.add-category__row { display: grid; grid-template-columns: 1fr 13rem auto; gap: 1rem; align-items: start; }
.add-category__row .btn { padding-top: .6rem; padding-bottom: .6rem; }
@media (max-width: 760px) { .add-category__row { grid-template-columns: 1fr; } }
/* Liste des cartes papier : la lecture de la boutique, repliée au-dessus de la liste. */
.shop-reading summary { cursor: pointer; }
.shop-reading[open] summary { margin-bottom: .5rem; }
/* Reporting e-commerce : barre de période collante, cartes de chiffres, un tableau par carte avec son export, impression. */
.admin-main:has(.rpt) { max-width: 1400px; }
.rpt h1 small { font-size: .85rem; font-weight: 400; margin-left: .5rem; }
.rpt-bar { position: sticky; top: 0; z-index: 20; background: #fff; border: 1px solid var(--a-line); border-radius: 12px; padding: .7rem 1rem; margin: .75rem 0 1rem; box-shadow: 0 1px 4px rgba(0, 0, 0, .05); display: flex; flex-direction: column; gap: .6rem; }
.rpt-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.rpt-dates { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; font-size: .9rem; }
.rpt-dates label { margin: 0; font-weight: 400; display: inline-flex; align-items: center; gap: .35rem; }
.rpt-dates input, .rpt-dates select { font: inherit; padding: .3rem .45rem; border: 1px solid #c9ced6; border-radius: 8px; background: #fff; width: auto; margin: 0; }
.rpt-sep { flex: 1; }
.rpt-header { display: flex; flex-direction: column; gap: .15rem; margin-bottom: .9rem; }
.rpt-period { margin: 0; font-size: 1.3rem; }
.rpt-header .muted, .rpt-help, .rpt-foot { font-size: .82rem; color: var(--a-soft); }
.rpt-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .65rem; margin-bottom: 1rem; }
.rpt-kpi { background: #fff; border: 1px solid var(--a-line); border-radius: 12px; padding: .75rem .9rem; }
.rpt-kpi span { display: block; font-size: .75rem; color: var(--a-soft); text-transform: uppercase; letter-spacing: .03em; }
.rpt-kpi strong { display: block; font-size: 1.5rem; margin: .2rem 0 .1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rpt-kpi small { display: block; font-size: .78rem; color: var(--a-soft); font-variant-numeric: tabular-nums; }
.rpt-kpi--main { background: #137f9c; border-color: #137f9c; color: #fff; }
.rpt-kpi--main span, .rpt-kpi--main small { color: rgba(255, 255, 255, .88); }
.rpt-kpi--warn strong { color: #b45309; }
.rpt-card { background: #fff; border: 1px solid var(--a-line); border-radius: 12px; padding: .9rem 1rem; }
.rpt-section { margin-bottom: 1rem; }
.rpt-card__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .75rem; margin-bottom: .6rem; }
.rpt-card__head h2 { margin: 0; font-size: 1rem; }
.rpt-card__head .rpt-csv { margin-left: auto; }
.rpt-scroll { overflow-x: auto; }
.rpt-table { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
.rpt-table th, .rpt-table td { padding: .4rem .65rem; border-bottom: 1px solid #f0f1f3; white-space: nowrap; text-align: left; }
.rpt-table th { color: var(--a-soft); font-size: .78rem; background: var(--a-bg); }
.rpt-table .num { text-align: right; }
.rpt-table td:first-child { white-space: normal; }
.rpt-table[data-sortable] thead th { cursor: pointer; }
.rpt-table[data-sortable] thead th:hover, .rpt-table thead th[data-dir] { color: #137f9c; }
.rpt-table tbody tr:hover td { background: #f6fafc; }
.rpt-table tfoot td { font-weight: 700; border-top: 2px solid var(--a-line); background: var(--a-bg); }
.rpt-strong { font-weight: 700; }
/* Avoirs et montants négatifs : l'orange d'Aventers Statistiques, y compris dans les sous-lignes et le pied. */
.rpt-table td.rpt-neg, .rpt-table tr.rpt-sub td.rpt-neg, .rpt-table tfoot td.rpt-neg { color: #b45309; }
.rpt-level-1 td { font-weight: 700; }
.rpt-sub td { color: #3c4652; font-size: .82rem; background: #fbfcfd; }
.rpt-sub td:first-child { padding-left: 2rem; }
/* Ligne de regroupement (« Cartes papier ») : ses familles en retrait, leurs formats davantage. */
.rpt-group td { background: #f3f6f9; }
.rpt-table tr.rpt-in-group td:first-child { padding-left: 2rem; }
.rpt-table tr.rpt-sub.rpt-in-group td:first-child { padding-left: 3.5rem; }
.rpt-graph { width: 100%; height: 220px; display: block; }
.rpt-graph__grid { stroke: #eceef0; stroke-width: 1; }
.rpt-graph__axis { font-size: 11px; fill: var(--a-soft); }
.rpt-graph__axis--small { font-size: 10px; }
.rpt-graph__bar { fill: #137f9c; }
.rpt-graph__bar:hover { fill: #0f6a83; }
.rpt-days > summary { cursor: pointer; font-weight: 700; margin-bottom: .6rem; }
@media print {
  .admin:has(.rpt) .admin-top, .rpt-bar, .rpt-csv { display: none; }
  .admin-main:has(.rpt) { max-width: none; padding: 0; }
  .rpt-card, .rpt-kpi { break-inside: avoid; border-color: #bbb; }
  .rpt-kpi--main { background: #fff; color: #000; border: 2px solid #000; }
  .rpt-kpi--main span, .rpt-kpi--main small { color: #444; }
  .rpt-table { font-size: .7rem; }
}
