.sia-shell:has(.weather-main) > .sia-sidebar {
    background: linear-gradient(155deg, #194c3f 0%, #103b35 65%, #0c302e 100%);
}

.sia-shell:has(.weather-main) .sia-nav a.active {
    border-left: 3px solid #d6a52d;
    background: rgba(218,235,218,.13);
    color: #fff;
}

.sia-shell:has(.weather-main) .sia-nav a:hover {
    background: rgba(218,235,218,.1);
}

.sia-shell:has(.weather-main) .national-public-nav a.data-domain-menu-link {
    gap: 10px;
    min-height: 34px;
    padding: 8px 9px;
}

.sia-shell:has(.weather-main) .national-public-nav .sia-nav-icon,
.sia-shell:has(.weather-main) .national-public-nav a.data-domain-menu-link:hover .sia-nav-icon,
.sia-shell:has(.weather-main) .national-public-nav a.data-domain-menu-link.active .sia-nav-icon {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
}

.sia-shell:has(.weather-main) .national-public-nav .sia-nav-icon svg {
    width: 15px;
    height: 15px;
}

.sia-shell:has(.weather-main) .national-public-nav .sia-nav-text small {
    display: none;
}

.weather-main {
    color: #153d45;
}

.weather-main .weather-studio-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    gap: 0;
    min-height: 174px;
    padding: 19px 26px 0;
    overflow: hidden;
    border: 1px solid #d7e5e5;
    border-radius: 6px;
    background: linear-gradient(90deg, #f9fcfb 0%, #f9fcfb 39%, rgba(249,252,251,.88) 53%, rgba(249,252,251,.08) 85%), url("img/weather-hero.png") right center / cover no-repeat !important;
}

.weather-studio-hero > div {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 100%;
    padding-bottom: 15px;
}

.weather-main .weather-studio-hero > div > span {
    color: #a67c23 !important;
    font-size: 11px;
}

.weather-main .weather-studio-hero h1 {
    color: #103d43;
    font-size: clamp(27px, 2.6vw, 37px);
    font-weight: 600;
}

.weather-main .weather-studio-hero p {
    color: #3d5962;
    font-size: 14px;
}

.weather-main .weather-studio-hero .public-domain-switcher {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 0 0 auto;
    align-self: flex-start;
    width: auto;
    min-width: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.weather-main .weather-studio-hero .public-domain-switcher a {
    min-height: 37px;
    padding: 9px 16px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #234d58;
}

.weather-main .weather-studio-hero .public-domain-switcher a.active {
    border-bottom-color: #bb912b;
    background: transparent;
    color: #0c3e49;
}

.weather-studio-hero .switcher-icon {
    display: none !important;
}

.weather-main .weather-decision-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.weather-main .weather-decision-kpis article {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 2px 11px;
    align-content: center;
    min-height: 90px;
    padding: 11px 13px;
    border: 1px solid #dce8e6;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(16,61,67,.045);
}

.weather-main .weather-decision-kpis .weather-kpi-icon {
    grid-column: 1;
    grid-row: 1 / 4;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 7px;
    background: #e9f5f1;
    color: #115269;
}

.weather-kpi-icon svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.weather-kpi-icon svg .solid {
    fill: currentColor;
    stroke: none;
}

.weather-main .weather-decision-kpis article > span:not(.weather-kpi-icon) {
    grid-column: 2;
    grid-row: 1;
    color: #23474f;
    font-size: 13px;
    font-weight: 600;
}

.weather-main .weather-decision-kpis article > strong {
    grid-column: 2;
    grid-row: 2;
    overflow-wrap: anywhere;
    color: #123f49;
    font-size: clamp(17px, 1.45vw, 22px);
    font-weight: 600;
    line-height: 1.2;
}

.weather-main .weather-decision-kpis article > small {
    grid-column: 2;
    grid-row: 3;
    color: #647980;
    font-size: 11px;
}

.weather-main .weather-filter {
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px 15px;
    border-color: #dce8e6;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(16,61,67,.035);
}

.weather-main .weather-filter label span {
    color: #23474f;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
}

.weather-main .weather-filter select,
.weather-main .weather-filter button,
.weather-main .weather-filter a {
    min-height: 38px;
    font-size: 12px;
}

.weather-main .weather-filter button {
    border-color: #0d5367;
    background: #0d5367;
}

.weather-main .weather-stats-workspace {
    display: grid;
    grid-template-columns: 1fr;
    gap: 11px;
}

.weather-main .weather-stats-workspace > .sima-stats-list {
    position: static;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    max-height: none;
    padding: 5px 8px;
    overflow: visible;
    border-radius: 6px;
}

.weather-main .weather-stats-workspace > .sima-stats-list strong {
    padding: 7px 10px;
    color: #45646b;
    font-size: 11px;
}

.weather-main .weather-stats-workspace > .sima-stats-list a {
    display: inline-flex !important;
    min-height: 31px !important;
    padding: 5px 10px !important;
    border: 0;
    border-radius: 4px;
    font-size: 11px !important;
}

.weather-main .weather-stats-workspace > .sima-stats-list a span {
    display: none;
}

.weather-main .weather-stat-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.weather-main .weather-stat-panels > .weather-map-row,
.weather-main .weather-stat-panels > .weather-insight-grid,
.weather-main .weather-stat-panels > #hydrologie {
    grid-column: 1 / -1;
}

.weather-main .weather-stat-panels > .weather-layout,
.weather-main .weather-stat-panels > .weather-linked-tables:not(#hydrologie) {
    display: contents;
}

.weather-main .weather-stat-panels #prix-pluie {
    grid-column: 1 / -1;
}

.weather-main .weather-map-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1.95fr) minmax(285px, .92fr) !important;
    gap: 12px;
    align-items: stretch;
    margin: 0 0 12px;
}

.weather-main .weather-map-card,
.weather-main .weather-alerts-card,
.weather-main .weather-table-card,
.weather-main .weather-linked-card,
.weather-main .weather-insight {
    min-width: 0;
    border: 1px solid #dce8e6;
    border-radius: 6px;
    box-shadow: 0 5px 16px rgba(16,61,67,.045);
}

.weather-main .sia-card-head.compact {
    align-items: center;
    min-height: 65px;
    padding: 13px 16px;
}

.weather-main .sia-card-head h2 {
    color: #143e48;
    font-size: 17px;
    font-weight: 600;
}

.weather-main .sia-card-head p {
    color: #667d82;
    font-size: 11px;
}

.weather-map-frame {
    position: relative;
    height: 410px;
    overflow: hidden;
    background: #b9dff0;
}

.weather-main .weather-stats-workspace .rainfall-map {
    width: 100%;
    height: 100%;
    background: #b9dff0;
}

.weather-map-heading,
.weather-map-basemaps,
.weather-map-legend {
    position: absolute;
    z-index: 500;
}

.weather-map-heading {
    top: 13px;
    left: 13px;
    display: grid;
    gap: 2px;
    padding: 9px 12px;
    border-radius: 5px;
    background: rgba(8,54,79,.91);
    color: #fff;
    pointer-events: none;
}

.weather-map-heading strong {
    font-size: 14px;
}

.weather-map-heading span {
    font-size: 11px;
}

.weather-map-basemaps {
    top: 13px;
    right: 13px;
    display: flex;
    overflow: hidden;
    border: 1px solid #d4e2e6;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(10,49,68,.16);
}

.weather-map-basemaps button {
    padding: 9px 13px;
    border: 0;
    background: #fff;
    color: #31525c;
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}

.weather-map-basemaps button.active {
    background: #eaf4f7;
    color: #0d5367;
    font-weight: 600;
}

.weather-map-legend {
    right: 12px;
    bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    width: 220px;
    padding: 10px;
    border-radius: 5px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 3px 12px rgba(10,49,68,.15);
    color: #264852;
}

.weather-map-legend strong,
.weather-map-legend small {
    flex-basis: 100%;
}

.weather-map-legend strong { font-size: 11px; }
.weather-map-legend span { display: flex; align-items: center; gap: 4px; font-size: 10px; }
.weather-map-legend i { width: 8px; height: 8px; border-radius: 50%; background: #6cb4d4; }
.weather-map-legend span:nth-of-type(2) i { width: 12px; height: 12px; background: #3185b1; }
.weather-map-legend span:nth-of-type(3) i { width: 16px; height: 16px; background: #174f82; }
.weather-map-legend small { color: #687d83; font-size: 9px; line-height: 1.3; }

.weather-main .weather-alerts-card {
    display: flex;
    flex-direction: column;
}

.weather-main .weather-alerts-card .sia-card-head a {
    color: #126078;
    font-size: 11px;
    white-space: nowrap;
    text-decoration: none;
}

.weather-main .weather-alert-list {
    align-content: start;
    gap: 0;
    padding: 7px 13px;
}

.weather-main .weather-alert {
    grid-template-columns: 13px minmax(0,1fr);
    gap: 11px;
    margin: 6px 0;
    padding: 12px;
    border: 1px solid #e0e9e8;
    border-left: 3px solid var(--rain-color);
    border-radius: 5px;
    background: #fff;
}

.weather-main .weather-alert > span {
    width: 11px;
    height: 11px;
    animation: none;
}

.weather-main .weather-alert strong { font-size: 13px; }
.weather-main .weather-alert small { font-size: 11px; }
.weather-alert-note {
    margin: auto 13px 13px;
    padding: 11px;
    border-radius: 5px;
    background: #eef6f7;
    color: #536e75;
    font-size: 11px;
    line-height: 1.4;
}

.weather-main .weather-insight-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px;
    margin: 0 0 12px;
}

.weather-main .weather-insight header { min-height: 58px; }
.weather-main .weather-insight h2 { font-size: 13px; }
.weather-main .weather-insight header p,
.weather-main .weather-insight small { font-size: 10px; }
.weather-main .weather-insight strong,
.weather-main .weather-insight em { font-size: 11px; }

.weather-main .weather-layout {
    margin-bottom: 12px;
}

.weather-main .weather-table-card .sima-price-stat-table th,
.weather-main .weather-linked-card .sima-price-stat-table th { font-size: 10px; }
.weather-main .weather-table-card .sima-price-stat-table td,
.weather-main .weather-linked-card .sima-price-stat-table td { font-size: 12px; }

@media (max-width: 1100px) {
    .weather-main .weather-stat-panels { grid-template-columns: 1fr; }
    .weather-main .weather-map-row { grid-template-columns: 1fr !important; }
    .weather-main .weather-insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 850px) {
    .weather-main .weather-decision-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .weather-main .weather-studio-hero { min-height: 0; }
    .weather-main .weather-studio-hero .public-domain-switcher { width: 100%; }
    .weather-map-frame { height: 350px; }
}

@media (max-width: 620px) {
    .weather-main .weather-studio-hero { padding: 20px 18px 0; background-position: 63% center !important; }
    .weather-main .weather-studio-hero .public-domain-switcher a { flex: 1; padding: 9px; }
    .weather-main .weather-decision-kpis { grid-template-columns: 1fr; }
    .weather-main .weather-decision-kpis article { min-height: 84px; }
    .weather-main .weather-filter { grid-template-columns: 1fr; }
    .weather-main .weather-insight-grid { grid-template-columns: 1fr !important; }
    .weather-map-frame { height: 320px; }
    .weather-map-heading { top: 8px; left: 8px; }
    .weather-map-basemaps { top: 8px; right: 8px; }
    .weather-map-legend { right: 8px; bottom: 8px; width: 200px; }
}

@media (prefers-reduced-motion: reduce) {
    .weather-main *, .weather-main *::before, .weather-main *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
