/* Plugin Climatologie Météo-France - le thème (couleurs, police, arrondis) vient de config/site_settings.json via les variables --cmf-* */
.cmf { max-width: 1200px; margin: 0 auto; padding: 24px 16px 48px; box-sizing: border-box; color: var(--cmf-text, #f1f5f9); }
.cmf *, .cmf *::before, .cmf *::after { box-sizing: border-box; }
.cmf-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.cmf-kicker { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--cmf-accent, #f59e0b); font-weight: 600; }
.cmf-head h1 { margin: 4px 0 0; font-weight: 700; line-height: 1.15; }
.cmf-sub, .cmf-muted { color: #94a3b8; font-size: 13px; }
.cmf-pill { font-size: 12px; color: #94a3b8; background: var(--cmf-card); border: var(--cmf-border); border-radius: 999px; padding: 6px 12px; }

.cmf-msg { background: var(--cmf-card); border: var(--cmf-border); border-radius: var(--cmf-radius); padding: 36px 20px; text-align: center; color: #94a3b8; }
.cmf-msg.err { color: #fca5a5; }
.cmf-msg a { color: var(--cmf-accent, #f59e0b); }

.cmf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cmf-chips.stations { margin-bottom: 14px; gap: 8px; }
.cmf-chip { font-family: inherit; cursor: pointer; border-radius: 10px; border: 1px solid var(--cmf-line); background: var(--cmf-card); color: var(--cmf-text); font-size: 13px; min-height: 44px; padding: 0 14px; }
.cmf-chip.sm { min-width: 44px; padding: 0 8px; font-size: 12px; border-radius: 8px; }
.cmf-chip.st { text-align: left; padding: 6px 14px; display: flex; flex-direction: column; justify-content: center; line-height: 1.25; }
.cmf-chip.st small { color: #94a3b8; font-size: 12px; }
.cmf-chip.on { border-color: var(--cmf-accent, #f59e0b); box-shadow: inset 0 0 0 100px rgba(245,158,11,.16); }
.cmf-chip:focus-visible, .cmf-tabs button:focus-visible, .cmf-t tr.pick:focus-visible { outline: 2px solid var(--cmf-accent, #f59e0b); outline-offset: 2px; }
.cmf-chips.wrap { margin-bottom: 12px; }

.cmf-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--cmf-line); margin-bottom: 18px; }
.cmf-tabs button { font-family: inherit; cursor: pointer; background: none; border: none; border-bottom: 3px solid transparent; color: #94a3b8; font-size: 14px; font-weight: 600; padding: 12px 16px; min-height: 44px; }
.cmf-tabs button.on { color: var(--cmf-accent, #f59e0b); border-bottom-color: var(--cmf-accent, #f59e0b); }

.cmf-view { display: flex; flex-direction: column; gap: 18px; }
.cmf-card { background: var(--cmf-card); border: var(--cmf-border); border-radius: var(--cmf-radius); box-shadow: var(--cmf-shadow); padding: var(--cmf-pad); min-width: 0; }
.cmf-card.mini { padding: 16px; }
.cmf-ch { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.cmf-ch h2 { margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--cmf-title); }
.cmf-h3 { margin: 22px 0 6px; font-size: 1rem; font-weight: 600; color: var(--cmf-title); }
.cmf-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.cmf-foot { margin-top: 18px; font-size: 12px; color: #64748b; line-height: 1.5; }
.note { margin-top: 10px; line-height: 1.5; }

.cmf-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.cmf-kpis.big { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cmf-kpi { background: var(--cmf-card); border: var(--cmf-border); border-radius: var(--cmf-radius); padding: 16px; }
.cmf-kv { font-size: 28px; font-weight: 700; margin: 4px 0 2px; }
.cmf-kv.sm { font-size: 22px; margin: 2px 0; }
.cmf-ins { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cmf-ins li { position: relative; padding-left: 16px; font-size: 14px; line-height: 1.5; color: #cbd5e1; }
.cmf-ins li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--cmf-accent, #f59e0b); }

.cmf-stripes { display: flex; height: 150px; border-radius: 8px; overflow: hidden; }
.cmf-stripes div { flex: 1 1 0; min-width: 0; }
.cmf-axis { display: flex; justify-content: space-between; font-size: 12px; color: #94a3b8; margin-top: 6px; }

.cmf-bars { position: relative; display: flex; align-items: flex-end; gap: 2px; }
.cmf-bar { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.cmf-bar i { display: block; width: 100%; border-radius: 2px 2px 0 0; }
.cmf-bar.v i { width: 100%; }
.cmf-bl { font-size: 10px; color: #cbd5e1; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; margin-bottom: 2px; }
.cmf-bl.h { writing-mode: horizontal-tb; transform: none; font-size: 11px; color: var(--cmf-text); }
.cmf-ref { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--cmf-accent, #f59e0b); pointer-events: none; }
.cmf-bars.gauss { border-bottom: 1px solid #475569; }
.cmf-bars.gauss svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cmf-months { display: flex; margin-top: 6px; font-size: 12px; color: #94a3b8; }
.cmf-months span { flex: 1 1 0; text-align: center; }

.cmf-cum { display: flex; gap: 8px; }
.cmf-yax { display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: #94a3b8; text-align: right; min-width: 56px; }
.cmf-plot { position: relative; flex: 1; height: 230px; border-left: 1px solid #475569; border-bottom: 1px solid #475569; }
.cmf-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cmf-cum + .cmf-months { margin-left: 64px; }
.cmf-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 12px; color: #cbd5e1; }
.cmf-legend span { display: flex; align-items: center; gap: 6px; }
.cmf-legend i { width: 16px; height: 4px; border-radius: 2px; display: inline-block; }

.cmf-pairs { display: flex; gap: 4px; }
.cmf-pair { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.cmf-pp { height: 180px; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.cmf-pp .cmf-bar { width: 38%; flex: none; }
.cmf-pair small { font-size: 12px; color: #94a3b8; margin-top: 6px; }

.cmf-minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.cmf-mini { background: rgba(0,0,0,.2); border: 1px solid var(--cmf-line); border-radius: 10px; padding: 12px; font-size: 13px; }
.cmf-rank { display: flex; flex-direction: column; margin-top: 8px; font-size: 13px; }
.cmf-rank > div { display: grid; grid-template-columns: 36px 1fr 1fr; padding: 8px 4px; border-top: 1px solid var(--cmf-line); }

.cmf-scroll { overflow-x: auto; }
.cmf-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmf-t th { text-align: left; color: #94a3b8; font-size: 12px; font-weight: 600; padding: 6px 8px; white-space: nowrap; }
.cmf-t td { padding: 9px 8px; border-top: 1px solid var(--cmf-line); vertical-align: top; }
.cmf-t td small { font-size: 12px; color: #94a3b8; }
.cmf-t tr.pick { cursor: pointer; }
.cmf-t tr.pick:hover, .cmf-t tr.pick.on { background: rgba(255,255,255,.07); }
.cmf-t th:first-child, .cmf-t td:first-child { position: sticky; left: 0; background: var(--cmf-card); }

.cmf-map { height: 380px; border-radius: 10px; overflow: hidden; border: 1px solid var(--cmf-line); background: #0f172a; }

@media (max-width: 640px) {
  .cmf-two { grid-template-columns: 1fr; }
  .cmf-kv { font-size: 24px; }
  .cmf-plot { height: 190px; }
}
