/* Météo Bourg Saint Bernard — feuille de style */
:root{
  --bg:#F2F6FA; --card:#FFFFFF; --ink:#0F1B2D; --ink2:#2C3A4D; --muted:#566274;
  --line:#DDE5EE; --accent:#1A5FC9; --link:#1457C7; --navy:#0F3A7D; --soft:#E6EFFC;
  --surface2:#EDF2F8; --surface3:#F5F8FC; --hover:#E1E9F3; --grid:#E3EAF2; --note:#EEF4FD; --rowhover:#F8FAFD; --barbg:#E6EDF5;
  --linkhover:#0B3E96; --navtext:#0B3E96; --tagfg:#0E5A2C; --tagbg:#E9F7EE; --outline-hover:#9DBCEB;
  --hero1:#0F3A7D; --hero2:#1A5FC9; --maxc:#C2410C; --minc:#1A5FC9;
  --tipbg:#0F1B2D; --tipfg:#FFFFFF; --tipmuted:#C9D4E3;
  --gust:#1A5FC9;
  color-scheme:light;
  --font:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --font-display:'Space Grotesk','Inter',system-ui,sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--font);line-height:1.5;-webkit-text-size-adjust:100%}
a{color:var(--link);text-decoration:none}
a:hover{color:var(--linkhover);text-decoration:underline}
img{max-width:100%;height:auto}
:focus-visible{outline:3px solid #7FB0FF;outline-offset:2px;border-radius:6px}

.wrap{max-width:1200px;margin:0 auto;padding:0 32px}
.stack{display:flex;flex-direction:column;gap:24px;padding-top:32px;padding-bottom:40px}

/* En-tête */
.site-header{background:var(--card);border-bottom:1px solid var(--line)}
.topbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:12px 8px;min-height:72px}
.brand{margin-right:auto;display:flex;align-items:center;gap:12px;color:var(--link)}
.brand:hover{text-decoration:none}
.brand-text{display:flex;flex-direction:column;line-height:1.15}
.brand-name{font-family:var(--font-display);font-weight:700;font-size:18px;color:var(--ink)}
.brand-sub{font-size:13px;color:var(--muted)}
.nav{order:1;display:flex;flex-wrap:wrap;align-items:center;gap:4px}
.nav a{padding:10px 12px;border-radius:10px;color:var(--ink2);font-weight:500;font-size:15px}
.nav a:hover{background:var(--surface2);text-decoration:none}
.nav a[aria-current="page"]{background:var(--soft);color:var(--navtext);font-weight:600}
.menu-btn{order:3;display:none;width:44px;height:44px;border:1px solid var(--line);background:var(--card);border-radius:12px;align-items:center;justify-content:center;color:var(--ink);cursor:pointer;padding:0}


.card{background:var(--card);border:1px solid var(--line);border-radius:24px;padding:28px;display:flex;flex-direction:column;gap:12px}
.card-title{margin:0;font-family:var(--font-display);font-weight:600;font-size:22px}
.card-title.sm{font-size:18px}
.lead{margin:0;font-size:16px;line-height:1.6;color:var(--ink2)}
.small{margin:0;font-size:14px;line-height:1.6;color:var(--muted)}
.mid{margin:0;font-size:14px;color:var(--ink2)}
.more{font-size:14px;font-weight:600;display:inline-flex;align-items:center;min-height:44px}
.row-between{display:flex;align-items:center;justify-content:space-between;gap:12px}
.wrap-row{flex-wrap:wrap}
.grow{flex:1}

/* Bloc principal */
.top-grid{display:grid;grid-template-columns:2fr 1fr;gap:24px}
.hero{background:linear-gradient(135deg,var(--hero1) 0%,var(--hero2) 100%);border-radius:24px;padding:36px;color:#fff;display:flex;flex-direction:column;gap:28px;min-width:0}
.hero-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;font-size:14px}
.status{display:flex;align-items:center;gap:10px;font-weight:500}
.dot{width:10px;height:10px;border-radius:50%;background:#4ADE80;display:inline-block;flex:none}
.status.stale .dot{background:#FF8A7A}
.hero-date{color:#D6E4FA}
.hero-body{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:24px}
.temp{display:flex;align-items:flex-start;font-family:var(--font-display);font-weight:600;line-height:1;font-size:clamp(72px,12vw,112px);letter-spacing:-.03em}
.temp-unit{font-size:.36em;margin-top:.13em;margin-left:4px;letter-spacing:0}
.hero-sub{margin:4px 0 0;font-size:17px;color:#E1ECFB}
.hero-cond{margin:6px 0 0;font-size:17px;font-weight:600;color:#FFFFFF}
.strong{font-weight:600}
.minmax{display:flex;gap:16px;flex-wrap:wrap}
.pill{background:rgba(255,255,255,.14);border-radius:16px;padding:14px 20px;min-width:120px;display:flex;flex-direction:column}
.pill-label{font-size:13px;color:#D6E4FA}
.pill-value{font-family:var(--font-display);font-size:26px;font-weight:600}
.side{display:flex;flex-direction:column;gap:24px;min-width:0}
.vigi-link{display:block}
.vigi{display:block;margin:0 auto;border-radius:12px;max-height:220px;width:auto}

/* Mesures */
.measures{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:20px}
.m{border-radius:20px;padding:24px;gap:14px}
.m-title{margin:0;display:flex;align-items:center;gap:10px;color:var(--muted);font-size:14px;font-weight:500}
.ico{width:22px;height:22px;fill:none;stroke:var(--link);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.m-value{margin:0;font-family:var(--font-display);font-size:44px;font-weight:600;line-height:1}
.unit{font-size:22px;color:var(--muted)}
.bar{height:8px;border-radius:4px;background:var(--barbg)}
.bar-fill{height:8px;border-radius:4px;background:var(--accent);width:0;transition:width .4s}
.bar-fill.warm{background:#E8A317}
.tag{align-self:flex-start;font-size:14px;font-weight:500;color:var(--tagfg);background:var(--tagbg);border-radius:999px;padding:6px 12px}
.compass circle{fill:var(--bg);stroke:var(--line);stroke-width:2}
#wind-arrow path{fill:var(--accent)}
.brand svg path:last-child{fill:var(--card)}
.compass text{font-size:10px;font-weight:600;fill:var(--muted);font-family:var(--font)}
.records{margin:0;display:flex;flex-direction:column;gap:8px;font-size:14px;color:var(--ink2)}
.records div{display:flex;justify-content:space-between;gap:8px}
.records dt{margin:0}
.records dd{margin:0;font-weight:600}

/* Graphique */
.tabs{display:flex;flex-wrap:wrap;gap:8px}
.tabs button{font:inherit;font-size:14px;font-weight:500;padding:10px 16px;min-height:44px;border:0;border-radius:999px;background:var(--surface2);color:var(--ink2);cursor:pointer}
.tabs button:hover{background:var(--hover)}
.tabs button[aria-pressed="true"]{background:var(--navy);color:#fff;font-weight:600}
.chart-scroll{width:100%;overflow-x:auto}
#chart{position:relative}
#chart svg{display:block;width:100%;min-width:560px;height:auto;touch-action:pan-y}
#chart .grid{stroke:var(--grid);stroke-width:1}
#chart .lbl{font:12px var(--font);fill:var(--muted)}
#chart .line{fill:none;stroke:var(--accent);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
#chart .dot-end{fill:var(--accent)}
#chart .line2{fill:none;stroke:var(--maxc);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.chart-legend{margin-top:8px;flex-wrap:wrap}
#chart .barv{fill:var(--accent);opacity:.85}
#chart .barv.on{opacity:1;fill:var(--navy)}
#chart .guide{stroke:var(--muted);stroke-width:1;stroke-dasharray:4 4}
#chart .hover-dot{fill:var(--card);stroke:var(--accent);stroke-width:3}
.ranges{margin:4px 0 12px}
.ranges button{min-height:40px;padding:8px 14px}
.chart-tip{position:absolute;z-index:2;transform:translate(-50%,-100%);pointer-events:none;background:var(--tipbg);color:var(--tipfg);border-radius:10px;padding:6px 10px;font-size:13px;line-height:1.35;white-space:nowrap;box-shadow:0 4px 14px rgba(15,27,45,.25)}
.chart-tip strong{display:block;font-size:15px}
.chart-tip span{color:var(--tipmuted);font-size:12px}

/* Page Statistiques */
.selectors{display:flex;flex-wrap:wrap;gap:16px;margin-top:6px}
.field{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:500;color:var(--ink2)}
.field select{font:inherit;font-size:16px;min-height:44px;min-width:170px;padding:8px 36px 8px 14px;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--ink);cursor:pointer}
.msg[hidden]{display:none}
.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}
.tile{background:var(--surface3);border:1px solid var(--line);border-radius:16px;padding:16px;display:flex;flex-direction:column;gap:4px}
.tile-label{font-size:13px;font-weight:500;color:var(--muted)}
.tile-value{font-family:var(--font-display);font-weight:600;font-size:28px;line-height:1.1}
.tile-unit{font-size:15px;color:var(--muted);font-weight:500}
.tile-sub{font-size:13px;color:var(--ink2)}
.chart-block{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.chart-title{margin:8px 0 0;font-family:var(--font-display);font-weight:600;font-size:16px;color:var(--ink2)}
.legend{display:flex;gap:16px;font-size:13px;color:var(--muted)}
.legend span{display:inline-flex;align-items:center;gap:6px}
.sw{display:inline-block;width:18px;height:4px;border-radius:2px}
.sw-max{background:var(--maxc)}.sw-min{background:var(--minc)}
.ch svg{display:block;width:100%;min-width:560px;height:auto}
.ch .grid{stroke:var(--grid);stroke-width:1}
.ch .lbl{font:12px var(--font);fill:var(--muted)}
.ch .line{fill:none;stroke:var(--accent);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.ch .line.max{stroke:var(--maxc)}.ch .line.min{stroke:var(--minc)}
.ch .pt{fill:var(--card);stroke:var(--accent);stroke-width:2.5}
.ch .pt.max{stroke:var(--maxc)}.ch .pt.min{stroke:var(--minc)}
.ch .barv{fill:var(--accent);opacity:.85}
.table-scroll{width:100%;overflow-x:auto;border:1px solid var(--line);border-radius:14px}
.tbl{width:100%;border-collapse:collapse;font-size:14px;font-variant-numeric:tabular-nums}
.tbl th,.tbl td{padding:10px 12px;text-align:right;white-space:nowrap;border-bottom:1px solid var(--surface2)}
.tbl thead th{background:var(--surface3);font-weight:600;color:var(--ink2);position:sticky;top:0}
.tbl tbody th{text-align:left;font-weight:600;color:var(--ink)}
.tbl thead th:first-child{text-align:left}
.tbl tbody tr:last-child th,.tbl tbody tr:last-child td{border-bottom:0}
.tbl tbody tr:hover{background:var(--rowhover)}
.linkbtn{font:inherit;font-weight:600;color:var(--link);background:none;border:0;padding:6px 4px;min-height:44px;cursor:pointer;text-decoration:underline}

/* Sous-onglets de la page À propos */
.subnav{display:flex;flex-wrap:wrap;gap:8px}
.subnav a{display:inline-flex;align-items:center;min-height:44px;padding:10px 18px;border-radius:999px;background:var(--surface2);color:var(--ink2);font-weight:500;font-size:15px}
.subnav a:hover{background:var(--hover);text-decoration:none}
.subnav a[aria-current="page"]{background:var(--navy);color:#fff;font-weight:600}
.bullets{margin:0;padding-left:22px;display:flex;flex-direction:column;gap:6px;font-size:16px;line-height:1.6;color:var(--ink2)}
.gloss{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:20px}
.gloss .card{border-radius:20px;padding:24px}
.beaufort{margin:4px 0 0;display:flex;flex-direction:column;gap:8px}
.beaufort img{display:block;max-width:100%;height:auto;border-radius:12px;border:1px solid var(--line);background:#fff}
.note-box a{font-weight:600}

/* Texte long (Explications, Matériel) */
.prose{display:flex;flex-direction:column;gap:12px;font-size:16px;line-height:1.65;color:var(--ink2)}
.prose p{margin:0}
.prose .bullets{margin:0}
.card-title .sub{font-family:var(--font);font-weight:500;font-size:14px;color:var(--muted)}
.note-box.prose{padding:18px 20px}
.note-box.prose p{font-size:15px}
.specs{margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.specs div{background:var(--surface3);border:1px solid var(--line);border-radius:16px;padding:14px 16px;display:flex;flex-direction:column;gap:2px}
.specs dt{font-size:13px;font-weight:500;color:var(--muted)}
.specs dd{margin:0;font-weight:600;font-size:15px;line-height:1.5;color:var(--ink)}
.spec-block{display:flex;flex-direction:column;gap:6px}
.bullets.sub{margin:6px 0 4px;font-size:15px}
.photo{margin:0;display:flex;flex-direction:column;gap:14px}
.photo img{display:block;max-width:100%;height:auto;border-radius:14px;border:1px solid var(--line);background:#fff}
.photo-row{display:flex;flex-wrap:wrap;gap:14px}
.photo-row img{flex:1 1 280px;min-width:0;object-fit:cover}

/* Agrandissement d'image */
.zoom-btn{display:block;padding:0;border:0;background:none;cursor:zoom-in;border-radius:12px;max-width:100%}
.zoom-btn img{display:block}
.zoom-dlg{border:0;padding:0;margin:0;width:100vw;height:100vh;max-width:100vw;max-height:100vh;background:rgba(15,27,45,.88)}
.zoom-dlg::backdrop{background:rgba(15,27,45,.88)}
.zoom-scroll{width:100%;height:100%;overflow:auto;display:flex;padding:56px 16px 16px;box-sizing:border-box}
.zoom-scroll img{margin:auto;max-width:none;width:auto;height:auto;background:#fff;border-radius:8px;cursor:zoom-out;flex:none}
.zoom-close{position:fixed;top:12px;right:12px;width:44px;height:44px;border:0;border-radius:50%;background:#fff;color:#0F1B2D;font-size:28px;line-height:1;cursor:pointer}

/* Page À propos */
.village{display:flex;flex-wrap:wrap;align-items:center;gap:16px}
.village img{display:block;max-height:120px;width:auto;border-radius:12px;border:1px solid var(--line)}
.facts{margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}
.facts div{background:var(--surface3);border:1px solid var(--line);border-radius:16px;padding:14px 16px;display:flex;flex-direction:column;gap:2px}
.facts dt{font-size:13px;font-weight:500;color:var(--muted)}
.facts dd{margin:0;font-family:var(--font-display);font-weight:600;font-size:18px}
.mail{margin:0;font-family:var(--font-display);font-weight:600;font-size:20px;word-break:break-word}
.partners{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:20px}
.partner{background:var(--card);border:1px solid var(--line);border-radius:20px;padding:20px;display:flex;flex-direction:column;gap:14px}
.partner-logo{display:flex;align-items:center;justify-content:center;min-height:84px}
.partner-logo img{max-width:100%;max-height:72px;width:auto;height:auto}
.partner-go{font-size:14px;font-weight:600;min-height:44px;display:inline-flex;align-items:center;gap:6px;margin-top:auto}
.note-box{background:var(--note);border-radius:16px;padding:16px 20px}
.note-box p{margin:0;font-size:14px;line-height:1.6;color:var(--ink2)}

/* Page Vigilance */
.embed{background:var(--card);border:1px solid var(--line);border-radius:24px;overflow:hidden}
.embed iframe{display:block;width:100%;height:80vh;min-height:560px;border:0}
.btn-outline{align-self:flex-start;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:10px 18px;border:1px solid var(--line);border-radius:12px;font-weight:600;font-size:15px;color:var(--link);background:var(--card)}
.btn-outline:hover{border-color:var(--outline-hover);text-decoration:none}

/* Page Animation satellite */
.page-title{font-size:28px}
.section-label{margin:8px 0 12px;font-family:var(--font-display);font-weight:600;font-size:18px;color:var(--ink2)}
.sat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:20px;margin-bottom:12px}
.sat-card{background:var(--card);border:1px solid var(--line);border-radius:20px;padding:24px;display:flex;flex-direction:column;gap:10px;color:var(--ink);transition:border-color .2s,box-shadow .2s}
.sat-card:hover{border-color:var(--outline-hover);box-shadow:0 6px 20px rgba(15,58,125,.08);text-decoration:none;color:var(--ink)}
.sat-ico{width:36px;height:36px;fill:none;stroke:var(--link);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sat-title{font-family:var(--font-display);font-weight:600;font-size:22px}
.sat-desc{font-size:14px;line-height:1.6;color:var(--muted)}
.sat-go{margin-top:auto;padding-top:6px;font-size:14px;font-weight:600;color:var(--link);min-height:44px;display:inline-flex;align-items:center;gap:6px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Écran station */
.screen{flex-direction:row;flex-wrap:wrap;align-items:center;gap:28px}
.screen-text{flex:1 1 320px;min-width:0;display:flex;flex-direction:column;gap:12px}
.screen-img{flex:1 1 420px;min-width:0;display:flex;justify-content:center}
.screen-img img{display:block;max-width:520px;width:100%;border-radius:16px;border:1px solid var(--line)}
.note{margin:0;font-size:14px;line-height:1.55;color:var(--ink2);background:var(--note);border-radius:14px;padding:14px 16px}

/* Don */
.donate{background:var(--ink);color:#fff;border-radius:24px;padding:28px;display:flex;flex-direction:column;gap:12px}
.donate p{margin:0;font-size:14px;line-height:1.6;color:#C9D4E3}
.btn{align-self:flex-start;background:#fff;color:var(--ink);font-weight:600;font-size:15px;padding:12px 20px;border-radius:12px}
.btn:hover{background:#EDF2F8;color:var(--ink);text-decoration:none}

/* Pied de page */
.site-footer{background:var(--card);border-top:1px solid var(--line)}
.foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding-top:24px;padding-bottom:24px;font-size:13px;color:var(--muted)}
.counter{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px}
.c-item{display:inline-flex;align-items:center;gap:6px;background:var(--surface3);border:1px solid var(--line);border-radius:999px;padding:5px 12px;color:var(--muted);white-space:nowrap}
.c-item strong{font-family:var(--font-display);font-weight:600;font-size:14px;color:var(--ink);font-variant-numeric:tabular-nums}
.c-ico{width:15px;height:15px;flex:none;fill:none;stroke:var(--link);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
/* Avis pouce levé / baissé */
.avis{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px}
.avis-q{white-space:nowrap}
.avis-btn{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:5px 12px;border-radius:999px;border:1px solid var(--line);background:var(--surface3);color:var(--muted);font:inherit;cursor:pointer;transition:background .15s,border-color .15s,color .15s,transform .1s}
.avis-btn:hover{background:var(--hover)}
.avis-btn:active{transform:scale(.94)}
.avis-btn .avis-n{font-family:var(--font-display);font-weight:600;font-size:14px;color:var(--ink);font-variant-numeric:tabular-nums}
.avis-ico{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.avis-btn.up .avis-ico{stroke:#16A34A}
.avis-btn.down .avis-ico{stroke:#DC2626}
.avis-btn.up[aria-pressed="true"]{background:#E9F7EE;border-color:#86D3A0}
.avis-btn.down[aria-pressed="true"]{background:#FDECEC;border-color:#F2A7A7}
.avis-btn[aria-pressed="true"] .avis-ico{fill:currentColor;fill-opacity:.25}
.avis-btn.up[aria-pressed="true"] .avis-ico{color:#16A34A}
.avis-btn.down[aria-pressed="true"] .avis-ico{color:#DC2626}
.avis.busy .avis-btn{opacity:.6;pointer-events:none}
.avis.is-error .avis-btn{opacity:.5;cursor:default}
.avis-msg:empty{display:none}
.avis-msg{font-size:12px;color:var(--muted)}
:root[data-theme="dark"] .avis-btn.up[aria-pressed="true"]{background:#12321F;border-color:#2F7A4A}
:root[data-theme="dark"] .avis-btn.down[aria-pressed="true"]{background:#3A1717;border-color:#8A3434}
:root[data-theme="dark"] .avis-btn.up .avis-ico{stroke:#4ADE80}
:root[data-theme="dark"] .avis-btn.down .avis-ico{stroke:#F87171}
:root[data-theme="dark"] .avis-btn.up[aria-pressed="true"] .avis-ico{color:#4ADE80}
:root[data-theme="dark"] .avis-btn.down[aria-pressed="true"] .avis-ico{color:#F87171}
@media (prefers-reduced-motion:reduce){.avis-btn{transition:none}.avis-btn:active{transform:none}}

/* Tablette */
@media (max-width:900px){
  .top-grid{grid-template-columns:1fr}
}

/* Mobile */
@media (max-width:760px){
  .wrap{padding:0 16px}
  .stack{padding-top:16px;gap:16px}
  .topbar{min-height:64px}
  .menu-btn{display:flex}
  .topbar{gap:8px 8px}
  .brand{flex:1 1 0;min-width:0}
  .brand-name{font-size:16px}
  .nav{order:4;display:none;flex-basis:100%;flex-direction:column;align-items:stretch;padding-bottom:12px}
  .nav.open{display:flex}
  .nav a{min-height:44px;display:flex;align-items:center}
  .card{padding:18px;border-radius:20px}
  .card-title{font-size:18px}
  .hero{padding:24px;gap:20px}
  .hero-sub{font-size:15px}
  .minmax{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:12px}
  .pill{padding:12px 14px;min-width:0}
  .pill-value{font-size:22px}
  .measures{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .m{padding:16px;gap:10px}
  .m-value{font-size:32px}
  .unit{font-size:16px}
  .screen{gap:16px}
  .foot{flex-direction:column;align-items:center;text-align:center}
}
@media (max-width:420px){
  .measures{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .bar-fill{transition:none}
}

/* ===== Mode sombre ===== */
:root[data-theme="dark"]{
  --bg:#0A101C; --card:#131C2E; --ink:#E8EEF7; --ink2:#C5D0DF; --muted:#96A4B8;
  --line:#26324B; --accent:#5B9BFF; --link:#7DB1FF; --navy:#2F62BF; --soft:#1C2C4B;
  --surface2:#1B2740; --surface3:#16213A; --hover:#24334F; --grid:#26324B; --note:#172640; --rowhover:#18233B; --barbg:#26324B;
  --linkhover:#A9CBFF; --navtext:#BBD4FF; --tagfg:#8EE0AB; --tagbg:#173325; --outline-hover:#3E67B0;
  --hero1:#122B5E; --hero2:#1F4FA6; --maxc:#FB923C; --minc:#6AA6FF;
  --tipbg:#E8EEF7; --tipfg:#0F1B2D; --tipmuted:#566274;
  --gust:#7DB1FF;
  color-scheme:dark;
}
:root[data-theme="dark"] .partner-logo img,:root[data-theme="dark"] .village img{background:#fff;padding:6px;border-radius:12px}
:root[data-theme="dark"] .photo img,:root[data-theme="dark"] .beaufort img{background:#fff}
:root[data-theme="dark"] .vigi{background:#fff;border-radius:12px}
:root[data-theme="dark"] .field select{color-scheme:dark}

@media (max-width:1180px){
  .theme-label{display:none}
  .theme-btn{padding:0;width:44px;justify-content:center}
}
/* Bouton clair / sombre */
.theme-btn{order:2;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--ink);font:inherit;font-size:14px;font-weight:500;cursor:pointer}
.theme-btn:hover{background:var(--surface2)}
.theme-btn svg{flex:none}

/* Page Relevés : cartes */
.maps{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:24px}
.map .zoom-btn{width:100%}
.map-img{display:block;width:100%;height:auto;aspect-ratio:1/1;border-radius:12px;border:1px solid var(--line);background:#fff}

/* Jauges */
.gauges{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px}
.gauge-card{align-items:stretch}
.gauge{width:100%;max-width:280px;margin:0 auto}
.gauge svg{display:block;width:100%;height:auto}
.gauge .g-track{fill:none;stroke:var(--surface2);stroke-width:12;stroke-linecap:round}
.gauge .g-val{fill:none;stroke:var(--accent);stroke-width:12;stroke-linecap:round}
.gauge .g-val.cold{stroke:var(--minc)}
.gauge .g-val.hot{stroke:var(--maxc)}
.gauge .g-tick{stroke:var(--muted);stroke-width:1.2;stroke-linecap:round}
.gauge .g-tick.major{stroke:var(--ink2);stroke-width:2}
.gauge .g-lbl{font:10px var(--font);fill:var(--muted);text-anchor:middle;dominant-baseline:middle}
.gauge .g-needle{stroke:var(--ink);stroke-width:3;stroke-linecap:round;transform-origin:100px 100px}
.gauge .g-hub{fill:var(--ink)}
.gauge .g-num{font:600 23px var(--font-display);fill:var(--ink);text-anchor:middle}
.gauge .g-unit{font:500 12px var(--font);fill:var(--muted);text-anchor:middle}
.gauge-cap{text-align:center}
@media (max-width:1100px){.gauges{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.gauges{gap:12px}.gauge-card{padding:14px}}
@media (prefers-reduced-motion:reduce){.gauge .g-needle{transition:none}}
.gauge .g-gust{fill:var(--gust);transform-origin:100px 100px;transition:transform .8s cubic-bezier(.3,1.3,.5,1)}
.gust-mark{color:var(--gust);font-size:12px}
.gauge-dir{margin:0;display:flex;align-items:center;justify-content:center;gap:8px;font-size:14px;color:var(--ink2)}
.dir-arrow path{fill:var(--accent)}
.dir-arrow g{transition:transform .6s}
@media (prefers-reduced-motion:reduce){.gauge .g-gust,.dir-arrow g{transition:none}}
.trend-ico path{fill:var(--accent)}

/* Rose des vents agrandie */
.compass.big{display:block;width:min(100%,210px);height:auto;margin:4px auto}
.compass .rose-ticks line{stroke:var(--muted);stroke-width:1;stroke-linecap:round}
.compass .rose-main{font-size:7px;font-weight:700;fill:var(--ink)}
.compass .rose-sub{font-size:4.6px;font-weight:600;fill:var(--muted)}
.compass .rose-hub{fill:var(--ink)}
.wind-info{margin-top:4px}
.compass .rose-deg{font-size:4.4px;font-weight:500;fill:var(--muted)}

/* Carte Soleil : calendrier */
.sub-title{margin:10px 0 0;padding-top:12px;border-top:1px solid var(--line);font-family:var(--font-display);font-size:14px;font-weight:600;color:var(--ink)}
.records .strong{text-align:right}
.seasons .is-next{color:var(--ink);font-weight:600}
.seasons .is-next span:first-child::after{content:" ●";color:var(--accent);font-size:9px;vertical-align:middle}

/* Accueil : cadre Aéronautique */
.aero-link{flex-direction:row;align-items:center;gap:16px;color:var(--ink);transition:border-color .2s,box-shadow .2s}
.aero-link:hover{border-color:var(--outline-hover);box-shadow:0 6px 20px rgba(15,58,125,.08);text-decoration:none;color:var(--ink)}
.aero-ico{flex:none;width:52px;height:52px;border-radius:16px;background:var(--soft);display:flex;align-items:center;justify-content:center}
.aero-ico svg{width:28px;height:28px;fill:none;stroke:var(--link);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.aero-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.aero-go{flex:none;font-size:20px;font-weight:600;color:var(--link);transition:transform .2s}
.aero-link:hover .aero-go{transform:translateX(3px)}

/* Accueil : colonne de droite plus compacte */
.side{gap:16px}
.side .card{padding:18px 22px;gap:6px;border-radius:20px}
.side .vigi{max-height:140px}
.side .more{min-height:32px}
.side .aero-ico{width:44px;height:44px;border-radius:12px}
.side .aero-ico svg{width:24px;height:24px}

/* Page Aéronautique : images centrées */
.photo.center{align-items:center}
.photo.center .zoom-btn{margin:0 auto}

/* Page Aéronautique : METAR */
.metar-intro{margin:-4px 0 12px}
.metar-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,460px),1fr));gap:20px}
.metar{border-radius:20px;padding:24px}
.metar-box{background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden;display:flex;justify-content:center}
.metar-box iframe{display:block;width:100%;height:350px;border:0;background:#fff}
.metar-taf{display:block;width:100%;max-width:350px;min-height:278px;font-size:18px;font-weight:500;color:#000}

/* Carte Éphéméride : espacement resserré */
.ephem{gap:4px}
.ephem .m-title{margin-bottom:2px}
.ephem .records{gap:4px;line-height:1.35}
.ephem .sub-title{margin-top:8px;padding-top:10px}

/* Graphique 24 h au survol des jauges */
.has-hist{cursor:default;transition:border-color .2s,box-shadow .2s}
.has-hist:hover,.has-hist.hist-on{border-color:var(--outline-hover);box-shadow:0 6px 20px rgba(15,58,125,.08)}
.has-hist .m-title{flex-wrap:nowrap}
.h24-badge{margin-left:auto;display:inline-flex;align-items:center;gap:4px;font-size:12px;font-weight:600;color:var(--navtext);background:var(--soft);border-radius:999px;padding:3px 9px 3px 7px;white-space:nowrap;transition:background .2s,color .2s}
.h24-badge svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.has-hist:hover .h24-badge,.has-hist.hist-on .h24-badge{background:var(--navy);color:#fff}
.gpop{position:fixed;z-index:50;width:min(640px,calc(100vw - 24px));max-height:calc(100vh - 24px);overflow:auto;background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:20px;padding:18px 20px 14px;box-shadow:0 18px 48px rgba(15,27,45,.22),0 2px 6px rgba(15,27,45,.08);display:flex;flex-direction:column;gap:12px;opacity:0;transform:translateY(6px);transition:opacity .16s ease,transform .16s ease}
.gpop[data-side="top"]{transform:translateY(-6px)}
.gpop.in{opacity:1;transform:none}
.gpop[hidden]{display:none}
.gpop-head{display:flex;align-items:flex-start;gap:12px}
.gpop-tw{flex:1;min-width:0}
.gpop-title{margin:0;font-family:var(--font-display);font-weight:600;font-size:18px;line-height:1.25}
.gpop-sub{margin:2px 0 0;font-size:13px;color:var(--muted)}
.gpop-now{flex:none;font-family:var(--font-display);font-weight:600;font-size:17px;color:var(--navtext);background:var(--soft);border-radius:12px;padding:6px 12px;white-space:nowrap}
.gpop-now:empty{display:none}
.gpop-close{flex:none;width:36px;height:36px;margin:-4px -6px 0 0;border:0;border-radius:50%;background:var(--surface2);color:var(--ink2);font-size:22px;line-height:1;cursor:pointer}
.gpop-close:hover{background:var(--hover)}
.gpop-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px}
.gpop-stat{background:var(--surface3);border:1px solid var(--line);border-radius:14px;padding:10px 12px;display:flex;flex-direction:column;gap:1px;min-width:0}
.gpop-stat-label{font-size:12px;font-weight:500;color:var(--muted)}
.gpop-stat-value{font-family:var(--font-display);font-weight:600;font-size:19px;line-height:1.2}
.gpop-stat-sub{font-size:12px;color:var(--ink2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gpop-legend{flex-wrap:wrap;gap:6px 16px}
.gpop-legend .sw{width:16px;height:4px}
.sw-line{background:var(--accent)}.sw-gust{background:var(--maxc)}.sw-bar{background:var(--accent);height:10px!important;width:10px!important;border-radius:2px}.sw-cum{background:var(--navy)}
.gpop-chart{position:relative}
.gpop-chart svg{display:block;width:100%;height:auto;touch-action:pan-y}
.gpop-chart .grid{stroke:var(--grid);stroke-width:1}
.gpop-chart .lbl{font:12px var(--font);fill:var(--muted)}
.gpop-chart .line{fill:none;stroke:var(--accent);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.gpop-chart .gp-line2{fill:none;stroke:var(--maxc);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.gpop-chart .gp-zero{stroke:var(--minc);stroke-width:1.2;stroke-dasharray:3 3}
.gpop-chart .dot-end{fill:var(--accent)}
.gpop-chart .gp-mark{fill:var(--card);stroke-width:2.5}
.gpop-chart .gp-mark.max{stroke:var(--maxc)}.gpop-chart .gp-mark.min{stroke:var(--minc)}
.gpop-chart .gp-mark-lbl{font:600 12px var(--font)}
.gpop-chart .gp-mark-lbl.max{fill:var(--maxc)}.gpop-chart .gp-mark-lbl.min{fill:var(--minc)}
.gpop-chart .gp-pt{fill:var(--accent);opacity:.8}
.gpop-chart .barv{fill:var(--accent);opacity:.8}
.gpop-chart .barv.on{opacity:1;fill:var(--navy)}
.gpop-chart .gp-cum{fill:none;stroke:var(--navy);stroke-width:2;stroke-linejoin:round}
.gpop-chart .gp-lbl-cum{fill:var(--navy);font-weight:600}
:root[data-theme="dark"] .gpop-chart .gp-cum{stroke:var(--link)}
:root[data-theme="dark"] .gpop-chart .gp-lbl-cum{fill:var(--link)}
:root[data-theme="dark"] .sw-cum{background:var(--link)}
.gpop-chart .guide{stroke:var(--muted);stroke-width:1;stroke-dasharray:4 4}
.gpop-chart .hover-dot{fill:var(--card);stroke:var(--accent);stroke-width:3}
.gpop-msg{padding:24px 0;text-align:center}
:root[data-theme="dark"] .gpop{box-shadow:0 18px 48px rgba(0,0,0,.55)}
@media (max-width:760px){
  .gpop{padding:14px 14px 10px;border-radius:16px;gap:10px}
  .gpop-now{font-size:15px;padding:4px 10px}
  .gpop-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .gpop-stat-value{font-size:17px}
}
@media (prefers-reduced-motion:reduce){.gpop,.has-hist,.h24-badge{transition:none}}

/* Carte Précipitations : espacement resserré */
.pluie{gap:6px}
.pluie .records{gap:2px;line-height:1.3}
.pluie .records .small{line-height:1.3}
.pluie .records p{margin:0}
/* ===== Vigilance Météo-France (carte auto-actualisée + Haute-Garonne) ===== */
:root{--vg1:#CDEBC9;--vg1s:#8CCB86;--vg2:#FFE14D;--vg3:#FF9A1F;--vg4:#E5202E;--vgstroke:#FFFFFF;--vghome:#0F1B2D}
:root[data-theme="dark"]{--vg1:#3B6447;--vg1s:#5E9E6B;--vg2:#E8C92E;--vg3:#F08A1C;--vg4:#E0414B;--vgstroke:#1B2636;--vghome:#FFFFFF}
.vigi-card{gap:10px}
.vigi-card .row-between{flex-wrap:nowrap;gap:8px}
.vigi-card .card-title{white-space:nowrap;min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:clamp(14px,1.35vw,18px)}
.vigi-card .vigi-tab{padding:6px 8px;font-size:11.5px}
@media (max-width:900px){.vigi-card .card-title{font-size:18px}}
@media (max-width:420px){.vigi-card .row-between{flex-wrap:wrap}.vigi-card .card-title{overflow:visible}}
@media (min-width:901px) and (max-width:1060px){.vigi-card .row-between{flex-wrap:wrap}.vigi-card .card-title{overflow:visible}}
.vigi-tabs{display:inline-flex;background:var(--surface2);border-radius:10px;padding:3px;gap:2px;flex:none}
.vigi-tab{border:0;background:transparent;color:var(--muted);font:600 12px/1 var(--font);padding:7px 10px;border-radius:8px;cursor:pointer;min-height:28px}
.vigi-tab:hover{color:var(--ink)}
.vigi-tab[aria-pressed="true"]{background:var(--card);color:var(--ink);box-shadow:0 1px 2px rgba(15,27,45,.12)}
.vigi-dep{border-radius:14px;padding:10px 12px;font-size:14px;color:var(--ink2);background:var(--surface3);border:1px solid var(--line);border-left-width:5px}
.vigi-dep.vg-b1{border-color:var(--line);border-left-color:var(--vg1s);background:var(--tagbg)}
.vigi-dep.vg-b2{border-color:#F2D24A;border-left-color:var(--vg2);background:#FFF9D9}
.vigi-dep.vg-b3{border-color:#F7B56A;border-left-color:var(--vg3);background:#FFF0DE}
.vigi-dep.vg-b4{border-color:#F08A90;border-left-color:var(--vg4);background:#FDE7E8}
:root[data-theme="dark"] .vigi-dep.vg-b1{background:rgba(78,138,90,.16)}
:root[data-theme="dark"] .vigi-dep.vg-b2{background:rgba(232,201,46,.13);border-color:rgba(232,201,46,.45)}
:root[data-theme="dark"] .vigi-dep.vg-b3{background:rgba(240,138,28,.15);border-color:rgba(240,138,28,.5)}
:root[data-theme="dark"] .vigi-dep.vg-b4{background:rgba(224,65,75,.17);border-color:rgba(224,65,75,.55)}
.vigi-dep-head{display:flex;align-items:center;gap:10px}
.vigi-dot{width:14px;height:14px;border-radius:50%;flex:none;background:var(--vg1s);box-shadow:0 0 0 3px rgba(255,255,255,.6)}
.vg-b2 .vigi-dot{background:var(--vg2)}.vg-b3 .vigi-dot{background:var(--vg3)}.vg-b4 .vigi-dot{background:var(--vg4)}
.vg-b3 .vigi-dot,.vg-b4 .vigi-dot{animation:vgpulse 1.6s ease-in-out infinite}
@keyframes vgpulse{50%{box-shadow:0 0 0 6px rgba(255,255,255,0)}}
:root[data-theme="dark"] .vigi-dot{box-shadow:none}
.vigi-dep-tx{display:flex;flex-direction:column;line-height:1.25;min-width:0}
.vigi-dep-name{font-size:12px;color:var(--muted);font-weight:500}
.vigi-dep-lvl{font-family:var(--font-display);font-size:16px;font-weight:600;color:var(--ink)}
.vigi-risks{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:5px}
.vigi-risks li{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;font-size:13px;line-height:1.3}
.vigi-chip{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;padding:2px 7px;border-radius:6px;color:#3B2F00;background:var(--vg2)}
.vg-r3 .vigi-chip{background:var(--vg3);color:#3D1E00}
.vg-r4 .vigi-chip{background:var(--vg4);color:#FFFFFF}
.vigi-phen{font-weight:600;color:var(--ink)}
.vigi-when{color:var(--muted);font-size:12px}
.vigi-advice{margin:8px 0 0;font-size:12px;color:var(--ink2);line-height:1.4}
.vigi-map{display:block;position:relative;min-height:110px}
.vigi-svg{display:block;width:100%;max-width:150px;height:auto;margin:0 auto}
.vigi-svg path{stroke:var(--vgstroke);stroke-width:.8;stroke-linejoin:round;transition:filter .15s}
.vigi-svg path:hover{filter:brightness(.88)}
.vigi-svg .vg-l1{fill:var(--vg1)}.vigi-svg .vg-l2{fill:var(--vg2)}.vigi-svg .vg-l3{fill:var(--vg3)}.vigi-svg .vg-l4{fill:var(--vg4)}
.vigi-svg path.vg-home{stroke:var(--vghome);stroke-width:2.2}
.vigi-card.is-loading .vigi-map{background:var(--surface2);border-radius:12px;animation:vgload 1.2s ease-in-out infinite}
@keyframes vgload{50%{opacity:.55}}
.vigi-card.is-error .vigi-map,.vigi-card.is-error .vigi-legend{display:none}
.vigi-legend{display:flex;justify-content:center;flex-wrap:wrap;gap:4px 12px;font-size:12px;color:var(--muted)}
.vigi-legend span{display:inline-flex;align-items:center;gap:5px}
.vg-sw{width:10px;height:10px;border-radius:3px;display:inline-block}
.vg-sw.vg-l1{background:var(--vg1);box-shadow:inset 0 0 0 1px var(--vg1s)}.vg-sw.vg-l2{background:var(--vg2)}.vg-sw.vg-l3{background:var(--vg3)}.vg-sw.vg-l4{background:var(--vg4)}
.vigi-maj{margin:0;font-size:12px;color:var(--muted);text-align:center}
.vigi-maj:empty{display:none}
@media (prefers-reduced-motion:reduce){.vg-b3 .vigi-dot,.vg-b4 .vigi-dot,.vigi-card.is-loading .vigi-map{animation:none}}