/* Plugin Orages & Foudre — Météo-Kit.
   Tout est préfixé « oro- » et limité à .oro pour ne pas interférer avec le reste du site. */

.oro {
    --oro-bg: #14182a;
    --oro-card: #1c2240;
    --oro-text: #e8eaf0;
    --oro-muted: #8b93b0;
    --oro-line: rgba(255, 255, 255, .09);
    --oro-track: #0a0f1e;
    --oro-grid: rgba(255, 255, 255, .06);
    --oro-red: #e06b6b;
    --oro-amber: #ef9f27;
    --oro-teal: #4dbfa0;
    --oro-blue: #5b9ee8;
    --oro-sand: #e8c870;
    color: var(--oro-text);
    font: 13px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.oro[data-theme="light"] {
    --oro-bg: #ffffff; --oro-card: #f1f3f9; --oro-text: #1b2033; --oro-muted: #5f6785;
    --oro-line: rgba(0, 0, 0, .1); --oro-track: #dfe3ee; --oro-grid: rgba(0, 0, 0, .07);
    --oro-red: #c94545; --oro-amber: #b9770e; --oro-teal: #1d8f72; --oro-blue: #2f6fc0; --oro-sand: #9a7a1e;
}
@media (prefers-color-scheme: light) {
    .oro[data-theme="auto"] {
        --oro-bg: #ffffff; --oro-card: #f1f3f9; --oro-text: #1b2033; --oro-muted: #5f6785;
        --oro-line: rgba(0, 0, 0, .1); --oro-track: #dfe3ee; --oro-grid: rgba(0, 0, 0, .07);
        --oro-red: #c94545; --oro-amber: #b9770e; --oro-teal: #1d8f72; --oro-blue: #2f6fc0; --oro-sand: #9a7a1e;
    }
}
.oro *, .oro *::before, .oro *::after { box-sizing: border-box; }

/* ── Carte conteneur ─────────────────────────────────────────────── */
.oro-card { background: var(--oro-bg); border-radius: 12px; padding: 12px; margin: 0 0 12px; }
.oro-head, .oro-foot, .oro-split { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.oro-head { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--oro-line); }
.oro-head h3 { margin: 0; font-size: 14px; font-weight: 500; color: var(--oro-text); }
.oro-foot { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--oro-line); font-size: 10px; color: var(--oro-muted); flex-wrap: wrap; }
.oro-sub { margin: 14px 0 6px; font-size: 10px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--oro-muted); }
.oro-status { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; }
.oro-link { color: var(--oro-blue); font-size: 11px; text-decoration: none; }
.oro-link:hover { text-decoration: underline; }

/* ── Couleurs utilitaires ────────────────────────────────────────── */
.oro .oro-red { color: var(--oro-red); }   .oro .oro-amber { color: var(--oro-amber); }
.oro .oro-teal { color: var(--oro-teal); } .oro .oro-blue { color: var(--oro-blue); }
.oro .oro-sand { color: var(--oro-sand); } .oro .oro-muted { color: var(--oro-muted); }
.oro .oro-i0 { color: var(--oro-muted); } .oro .oro-i1 { color: var(--oro-blue); }
.oro .oro-i2 { color: var(--oro-teal); }  .oro .oro-i3 { color: var(--oro-amber); } .oro .oro-i4 { color: var(--oro-red); }
.oro .oro-center { text-align: center; } .oro .oro-right { text-align: right; }

/* ── Grilles et tuiles ───────────────────────────────────────────── */
.oro-grid { display: grid; gap: 8px; margin-bottom: 8px; }
.oro-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.oro-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.oro-tile { background: var(--oro-card); border-radius: 8px; padding: 10px 12px; }
.oro-tile .oro-grid { margin-bottom: 0; }
.oro-label { margin-bottom: 4px; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--oro-muted); }
.oro-big { font-size: 26px; font-weight: 500; line-height: 1; }
.oro-mid { font-size: 18px; font-weight: 500; line-height: 1.15; }
.oro-mid small { font-size: 11px; font-weight: 400; }
.oro-hint { margin-top: 2px; font-size: 10px; color: var(--oro-muted); }
.oro-empty { padding: 16px; text-align: center; color: var(--oro-muted); background: var(--oro-card); border-radius: 8px; }
.oro-empty code { font-size: 11px; }

button.oro-click, button.oro-year, button.oro-x, button.oro-tab, button.oro-pill {
    font: inherit; color: inherit; cursor: pointer; text-align: left; border: 0; appearance: none; -webkit-appearance: none;
}
button.oro-click { width: 100%; display: block; }
button.oro-click:hover, button.oro-year:hover { filter: brightness(1.15); }
.oro-caret { font-size: 9px; opacity: .5; }

/* ── Indicateurs ─────────────────────────────────────────────────── */
.oro-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--oro-muted); }
.oro-dot.is-on { background: var(--oro-teal); animation: oro-pulse 2s infinite; }
.oro-dot.is-off { background: var(--oro-red); }
@keyframes oro-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .oro-dot.is-on { animation: none; } }

.oro-meter { margin: 10px 0 12px; }
.oro-meter-track, .oro-bar { height: 5px; background: var(--oro-track); border-radius: 3px; overflow: hidden; }
.oro-bar { height: 4px; }
.oro-meter-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--oro-teal), var(--oro-amber) 60%, var(--oro-red)); transition: width .6s ease; }
.oro-meter-fill.is-active { background: var(--oro-red); }
.oro-meter-scale { display: flex; justify-content: space-between; margin-top: 2px; font-size: 9px; color: var(--oro-muted); }
.oro-bar i { display: block; height: 100%; border-radius: 3px; background: currentColor; }

/* ── Listes ──────────────────────────────────────────────────────── */
.oro-list { border: 1px solid var(--oro-line); border-radius: 8px; overflow: hidden; margin-bottom: 4px; }
.oro-list > * + * { border-top: 1px solid var(--oro-line); }
.oro-list > :nth-child(odd) { background: rgba(127, 135, 170, .06); }
.oro-row { display: block; width: 100%; padding: 7px 10px; }
.oro-row-main { display: grid; grid-template-columns: minmax(118px, auto) minmax(0, 1fr) auto auto; align-items: center; gap: 8px; }
.oro-when { font-size: 10px; }
.oro-place { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 500; }
.oro-dist { font-size: 12px; font-weight: 500; }
.oro-row-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 3px; font-size: 10px; }
.oro-row-sub strong { font-size: 12px; font-weight: 700; }
.oro-hour { display: grid; grid-template-columns: 38px minmax(0, 1fr) 46px 74px; align-items: center; gap: 8px; padding: 6px 10px; font-size: 10px; }
.oro-hour strong { font-size: 11px; }
.oro-hour > span:nth-child(3) { text-align: right; font-weight: 500; }
.oro-hour > span:last-child { text-align: right; }
.oro-hour-dir { grid-template-columns: 34px minmax(0, 1fr) 46px; padding: 0; margin-bottom: 6px; }
.oro-hour .oro-bar { background: var(--oro-card); }
button.oro-year { display: grid; grid-template-columns: 56px minmax(0, 1fr) 96px 62px; align-items: center; gap: 8px; padding: 7px 10px; background: transparent; }
button.oro-year strong { font-size: 13px; }
button.oro-year span { text-align: right; font-size: 11px; font-weight: 500; }
button.oro-year span:last-child { font-size: 10px; font-weight: 400; }

/* ── Carte Leaflet ───────────────────────────────────────────────── */
.oro-map { width: 100%; border-radius: 10px; overflow: hidden; border: 1px solid var(--oro-line); margin-bottom: 10px; background: var(--oro-card); z-index: 0; }
.oro[data-theme="dark"] .oro-map .leaflet-tile { filter: brightness(.85) saturate(.9); }
.oro-map .leaflet-popup-content { margin: 10px 14px; font: 12px/1.45 system-ui, sans-serif; }
.oro-legend { margin-bottom: 4px; }
.oro-legend .oro-grid { gap: 3px 8px; font-size: 10px; }

/* ── Graphiques, rose, détail ────────────────────────────────────── */
.oro-chart { position: relative; width: 100%; margin-bottom: 4px; }
.oro-rose { display: flex; align-items: center; gap: 12px; }
.oro-rose canvas { flex: 0 0 auto; max-width: 160px; width: 160px; height: 160px; }
.oro-rose-list { flex: 1; min-width: 0; }
.oro-detail { margin-bottom: 8px; border: 1px solid var(--oro-line); }
.oro-detail[hidden] { display: none; }
button.oro-x { background: transparent; font-size: 14px; color: var(--oro-muted); padding: 2px 6px; }
.oro-d-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0 10px; text-align: center; }
.oro-d-stats b { display: block; font-size: 20px; font-weight: 500; }
.oro-d-stats small { font-size: 9px; color: var(--oro-muted); }
.oro-d-record { margin-bottom: 8px; padding: 7px 10px; border-radius: 6px; background: var(--oro-track); font-size: 10px; }
.oro-d-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--oro-line); font-size: 11px; }
.oro-d-line > span:last-child { display: flex; gap: 8px; align-items: center; }
.oro-d-days { padding: 2px 0 6px 8px; }
.oro-detail details { border-bottom: 1px solid var(--oro-line); }
.oro-detail summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 0; cursor: pointer; list-style: none; font-size: 12px; font-weight: 500; }
.oro-detail summary::-webkit-details-marker { display: none; }
.oro-detail summary > span { display: flex; gap: 8px; align-items: center; font-weight: 400; font-size: 10px; }

/* ── ESTOFEX ─────────────────────────────────────────────────────── */
.oro-figure { margin: 0 0 10px; text-align: center; }
.oro-figure img { display: block; width: 100%; height: auto; border-radius: 8px; background: #fff; }
.oro-figure figcaption { margin-top: 4px; font-size: 10px; }
.oro-switch { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.oro-pill { display: inline-block; padding: 5px 11px; border-radius: 999px; background: var(--oro-card); font-size: 11px; color: var(--oro-text); text-decoration: none; }
.oro-pill.is-active { background: var(--oro-blue); color: #fff; }
.oro-chip { display: inline-block; width: 11px; height: 11px; margin-right: 4px; border-radius: 3px; vertical-align: -1px; }

/* ── Carte en direct ─────────────────────────────────────────────── */
.oro-live { position: relative; border-radius: 10px; overflow: hidden; background: var(--oro-card); }
.oro-live iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── Onglets et page ─────────────────────────────────────────────── */
.oro-page { max-width: 980px; margin: 0 auto; }
.oro-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: thin; }
button.oro-tab {
    flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
    background: #1c2240; color: #e8eaf0; white-space: nowrap;
}
button.oro-tab:hover { filter: brightness(1.2); }
button.oro-tab.is-active { background: #5b9ee8; color: #fff; }
button.oro-tab:focus-visible, .oro-pill:focus-visible, button.oro-click:focus-visible, button.oro-year:focus-visible { outline: 2px solid var(--oro-blue, #5b9ee8); outline-offset: 2px; }
.oro-panel[hidden] { display: none; }
body.oro-standalone { margin: 0; background: #0d1020; font-family: system-ui, sans-serif; }
.oro-main { padding: 16px; }
body.oro-embed { margin: 0; background: transparent; }

@media (max-width: 560px) {
    .oro-row-main { grid-template-columns: minmax(0, 1fr) auto auto; }
    .oro-when { grid-column: 1 / -1; }
    .oro-hour { grid-template-columns: 34px minmax(0, 1fr) 40px; }
    .oro-hour > span:last-child { display: none; }
    button.oro-year { grid-template-columns: 50px minmax(0, 1fr) 84px; }
    button.oro-year span:last-child { display: none; }
    .oro-rose { flex-direction: column; align-items: stretch; }
    .oro-rose canvas { align-self: center; }
    .oro-grid-3 .oro-big { font-size: 22px; }
}
