/* Observatoire intercommunal — fiches communales et comparaison */
.fc-crumbs { margin: 0.25rem 0 0.4rem; font-size: 0.82rem; }
.fc-crumbs a { color: var(--bleu-clair); text-decoration: none; font-weight: 600; }
.fc-crumbs a:hover { text-decoration: underline; }
.fc-toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; margin: 0.4rem 0 1rem; }
.fc-search { display: flex; flex-direction: column; gap: 3px; font-size: 0.76rem; color: var(--texte-clair); font-weight: 600; flex: 1 1 220px; max-width: 340px; }
.fc-search input { padding: 7px 10px; border: 1px solid #d5d8dd; border-radius: 7px; font-size: 0.86rem; color: var(--texte); background: #fff; }
.fc-btn { appearance: none; border: 1px solid var(--bleu); background: var(--bleu); color: #fff; border-radius: 7px; padding: 7px 12px; font-size: 0.8rem; font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.3; font-family: inherit; }
.fc-btn:hover { background: var(--bleu-clair); border-color: var(--bleu-clair); }
.fc-btn-ghost { background: #fff; color: var(--bleu); }
.fc-btn-ghost:hover { background: #eef2f7; color: var(--bleu); }
.fc-btn[disabled] { opacity: 0.45; cursor: default; }
.fc-select { padding: 3px 8px; border: 1px solid #d5d8dd; border-radius: 6px; font-size: 0.78rem; background: #fff; color: var(--texte); }
.fc-note { background: #f8fafc; border: 1px solid #e2e8f0; border-left: 4px solid #94a3b8; border-radius: 10px; padding: 0.8rem 1.1rem; margin: 0 0 1rem; font-size: 0.86rem; color: #334155; line-height: 1.55; }
.fc-note-info { background: #f0f9ff; border-color: #bae6fd; border-left-color: #0284c7; color: #075985; }
.fc-chart { position: relative; height: 280px; width: 100%; }
.fc-chart-tall { height: 380px; }
.fc-two-tables { align-items: start; }
.fc-two-tables .table-card { margin: 0; }
.fc-defs { margin: -0.4rem 0 1rem; font-size: 0.82rem; color: var(--texte); }
.fc-defs summary { cursor: pointer; color: var(--bleu-clair); font-weight: 600; padding: 0.3rem 0; }
.fc-defs dl { margin: 0.4rem 0 0; display: grid; grid-template-columns: minmax(180px, 30%) 1fr; gap: 0.35rem 1rem; }
.fc-defs dt { font-weight: 700; }
.fc-defs dd { margin: 0; color: var(--texte-clair); }
.fc-sources { padding: 1rem 1.25rem; font-size: 0.83rem; line-height: 1.65; color: var(--texte); }
.fc-sources ul { margin: 0.3rem 0 0.8rem; padding-left: 1.1rem; }
.fc-sources a { color: var(--bleu-clair); }
.fc-up { color: #b45309; } .fc-down { color: #047857; }
.fc-muted { color: var(--texte-clair); font-size: 0.78rem; }
.fc-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; flex: 2 1 260px; }
.fc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 11px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; color: #fff; }
.fc-chip a { color: #fff; text-decoration: none; }
.fc-chip button { appearance: none; border: 0; background: rgba(255,255,255,0.25); color: #fff; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; font-size: 0.8rem; line-height: 20px; padding: 0; }
.fc-cmp-table th:first-child, .fc-cmp-table td:first-child { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 190px; }
.fc-cmp-table thead th:first-child { background: var(--bleu); }
.fc-cmp-table tr.fc-grp td { background: var(--gris-clair) !important; font-weight: 800; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--bleu); }
.cw-table-zone { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cw-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.cw-table thead th { background: var(--bleu); color: #fff; font-family: 'Montserrat', sans-serif; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; padding: 9px 12px; text-align: left; white-space: nowrap; }
.cw-table thead th.r { text-align: right; }
.cw-table tbody td { padding: 7px 12px; border-bottom: 1px solid #f0f1f3; vertical-align: middle; }
.cw-table tbody tr:nth-child(even) { background: #fafbfc; }
.cw-num { text-align: right; font-family: 'Courier New', monospace; font-size: 0.82rem; white-space: nowrap; color: var(--texte); }
.cw-dash { text-align: right; color: var(--texte-clair); font-size: 0.8rem; }
.cw-footer { padding: 0.5rem 1.25rem; font-size: 0.73rem; color: var(--texte-clair); border-top: 2px solid var(--bleu); background: var(--gris-clair); font-weight: 500; line-height: 1.5; }
.fc-tot td { background: var(--gris-clair) !important; font-weight: 800; }
.kpi-sub .fc-rank { font-weight: 700; color: var(--texte); }
@media (max-width: 600px) {
  .fc-search { max-width: none; }
  .fc-chart { height: 240px; }
  .fc-chart-tall { height: 460px; }
  .fc-defs dl { grid-template-columns: 1fr; }
  .fc-defs dd { margin-bottom: 0.4rem; }
}
/* page principale : lignes cliquables et sélection pour comparer */
.i-link { color: var(--bleu); font-weight: 600; text-decoration: none; border-bottom: 1px dotted rgba(27,58,107,0.4); }
.i-link:hover { color: var(--bleu-clair); border-bottom-style: solid; }
.i-cmp { width: 16px; height: 16px; cursor: pointer; accent-color: var(--bleu); vertical-align: middle; }
.i-cmpbar { position: sticky; bottom: 12px; z-index: 20; display: none; margin: 0.6rem auto 0; max-width: 560px; background: var(--bleu); color: #fff; border-radius: 12px; padding: 0.6rem 0.8rem 0.6rem 1.1rem; box-shadow: 0 6px 22px rgba(0,0,0,0.18); align-items: center; gap: 0.7rem; font-size: 0.84rem; }
.i-cmpbar.on { display: flex; }
.i-cmpbar span { flex: 1; }
.i-cmpbar a, .i-cmpbar button { appearance: none; border: 0; border-radius: 7px; padding: 6px 12px; font-weight: 700; font-size: 0.8rem; cursor: pointer; text-decoration: none; font-family: inherit; }
.i-cmpbar a { background: var(--or); color: #1b1b1b; }
.i-cmpbar a[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.i-cmpbar button { background: rgba(255,255,255,0.15); color: #fff; }
.charts-row > * { min-width: 0; }
#fcRoot .cw-table-zone { min-height: 0 !important; }
