/* =============================================================
   ACCÈS AUX SOINS — CSS spécifique à la page
   /ressources/acces-soins-medecin-generaliste-2026/
   Explorateur de carte départementale + graphique enquête patients.
   Le CSS commun (base article, helpers, newsletter, closing) est
   dans ressources.css.
   ============================================================= */

/* ===== Palette des bandes de délai (carte + graph + tableau) ===== */
.acces-explorer {
    --band-1: #508084;   /* 1 à 3 jours  */
    --band-4: #EF8C26;   /* 4 à 5 jours  */
    --band-6: #F12309;   /* 6 à 7 jours  */
    --band-8: #941809;   /* 8 à 9 jours  */
    --band-off: #03245C;
}

/* ===== Explorer shell ===== */
.acces-explorer {
    background: var(--color-background-50);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-top: 8px;
}
.acces-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.acces-chip {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 8px 14px; border-radius: 100px; cursor: pointer;
    border: 1.5px solid var(--color-background-300);
    font-size: .82rem; font-weight: 600; color: var(--color-text-secondary);
    user-select: none; transition: border-color .15s, background .15s;
}
.acces-chip:hover { border-color: var(--color-background-700); }
.acces-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.acces-chip .dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.acces-chip[data-band="1-3"] .dot { background: var(--band-1); }
.acces-chip[data-band="4-5"] .dot { background: var(--band-4); }
.acces-chip[data-band="6-7"] .dot { background: var(--band-6); }
.acces-chip[data-band="8-9"] .dot { background: var(--band-8); }
.acces-chip .count { color: var(--color-text-muted); font-weight: 600; }
.acces-chip[aria-pressed="false"] { opacity: .4; }
.acces-chip[aria-pressed="true"] { background: var(--color-background-100); border-color: var(--color-background-600); }

.acces-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px;
}
.acces-stat {
    background: var(--color-background-100); border-radius: var(--radius-md); padding: 16px 18px;
}
.acces-stat-label { font-size: .74rem; color: var(--color-text-muted); margin-bottom: 4px; font-weight: 600; }
.acces-stat-value { font-size: 1.7rem; font-weight: 700; color: var(--color-foreground); line-height: 1.1; font-variant-numeric: tabular-nums; }

.acces-cols { display: grid; grid-template-columns: 1.7fr .85fr; gap: 26px; align-items: start; }
.acces-cols > * { min-width: 0; }

.acces-map-wrap { position: relative; }
.acces-map { width: 100%; max-width: 100%; height: auto; display: block; }
.acces-map path {
    stroke: var(--color-background-50); stroke-width: .6;
    cursor: pointer; transition: opacity .15s, fill .2s;
}
.acces-map path.is-off { fill: var(--band-off) !important; opacity: .5; }
.acces-map path.is-hi { stroke: var(--color-content-600); stroke-width: 1.4; }
.acces-bubbles circle {
    fill: var(--color-content-600); fill-opacity: .16;
    stroke: var(--color-content-600); stroke-opacity: .5; stroke-width: .8;
    pointer-events: none; transition: opacity .2s;
}
.acces-bubbles { opacity: 0; transition: opacity .25s; pointer-events: none; }
.acces-bubbles.on { opacity: 1; }
.acces-map-toggle {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;
    font-size: .8rem; color: var(--color-text-secondary); cursor: pointer; user-select: none;
}
.acces-map-toggle input { accent-color: var(--color-action-500); }

/* tooltip */
.acces-tip {
    position: fixed; z-index: 40; pointer-events: none; opacity: 0;
    background: var(--color-content-600); color: #fff; padding: 8px 12px;
    border-radius: 8px; font-size: .78rem; line-height: 1.4; max-width: 220px;
    box-shadow: 0 8px 24px rgba(3,36,92,.28); transition: opacity .12s; transform: translate(-50%, -115%);
}
.acces-tip b { display: block; font-size: .84rem; margin-bottom: 2px; }
.acces-tip .tip-delai { font-weight: 700; }

/* table */
.acces-table-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.acces-search {
    flex: 1; min-width: 0; padding: 9px 13px; font-size: .85rem; font-family: inherit;
    border: 1px solid var(--color-background-300); border-radius: 8px;
    background: var(--color-background-100); color: var(--color-foreground);
}
.acces-search:focus { outline: none; border-color: var(--color-action-500); }
.acces-sort {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .74rem; padding: 8px 11px; border-radius: 7px; cursor: pointer;
    border: 1px solid var(--color-background-300); background: var(--color-background-50);
    color: var(--color-text-secondary); font-weight: 600; white-space: nowrap;
}
.acces-sort[aria-pressed="true"] { border-color: var(--color-action-500); color: var(--color-action-500); }
.acces-sort .sort-rank {
    display: inline-flex; align-items: center; justify-content: center;
    width: 15px; height: 15px; border-radius: 50%;
    background: var(--color-action-500); color: #fff;
    font-size: .62rem; font-weight: 700; line-height: 1;
}
.acces-table-scroll {
    max-height: 520px; overflow-y: auto;
    border: 1px solid var(--color-border); border-radius: var(--radius-md);
}
table.acces-table { width: 100%; border-collapse: collapse; font-size: .82rem; table-layout: fixed; }
table.acces-table th:nth-child(1), table.acces-table td:nth-child(1) { width: 40%; }
table.acces-table th:nth-child(2), table.acces-table td:nth-child(2) { width: 34%; }
table.acces-table th:nth-child(3), table.acces-table td:nth-child(3) { width: 26%; }
table.acces-table thead th {
    position: sticky; top: 0; z-index: 1; background: var(--color-background-200);
    text-align: left; padding: 9px 12px; font-weight: 600; color: var(--color-text-secondary);
    font-size: .72rem; text-transform: uppercase; letter-spacing: .03em;
}
table.acces-table thead th.num { text-align: right; }
table.acces-table td { padding: 8px 12px; border-bottom: 1px solid var(--color-border); }
table.acces-table td.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--color-text-secondary); }
table.acces-table tbody tr { cursor: default; transition: background .12s; }
table.acces-table tbody tr:hover { background: var(--color-background-100); }
.delai-pill {
    display: inline-flex; align-items: center; gap: 7px; font-weight: 600; white-space: nowrap;
}
.delai-pill .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.acces-empty { padding: 30px; text-align: center; color: var(--color-text-muted); font-size: .85rem; }
.acces-source { font-size: .74rem; color: var(--color-text-muted); margin: 16px 0 0; line-height: 1.5; }

@media (max-width: 860px) {
    .acces-cols { grid-template-columns: 1fr; }
    .acces-explorer { padding: 20px; }
}
@media (max-width: 560px) {
    .acces-stats { grid-template-columns: 1fr; gap: 10px; }
    .acces-stat { display: flex; align-items: baseline; gap: 10px; }
    .acces-stat-label { margin-bottom: 0; }
}

/* ===== Patient survey chart ===== */
.pchart {
    --band-1: #508084; --band-4: #EF8C26; --band-6: #F12309; --band-8: #941809;
    margin: 26px auto 8px; max-width: 720px;
}
.pchart svg { width: 100%; height: auto; display: block; font-family: inherit; }
.pchart-lbl { font-size: 13px; fill: var(--color-foreground); font-weight: 600; }
.pchart-track { fill: var(--color-background-200); }
.pchart-val { font-size: 13px; font-weight: 700; fill: var(--color-foreground); }
.pchart-caption {
    font-size: .82rem; color: var(--color-text-secondary); opacity: .85;
    text-align: center; margin: 14px 0 0; line-height: 1.5;
}
.pchart-caption strong { color: var(--color-foreground); }
