html{scroll-behavior:smooth}
.cavl-meteo-app{
  --red:#d00000;
  --red2:#ed1212;
  --green:#4CAF50;
  --yellow:#FFC107;
  --bad:#F44336;
  --ink:#111;
  --muted:#66717c;
  --line:#e4e4e4;
  width:100vw;
  max-width:none!important;
  margin-left:calc(50% - 50vw);
  margin-right:calc(50% - 50vw);
  background:#f4f4f4;
  color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  min-height:100vh;
}
.cavl-meteo-app *{box-sizing:border-box}
.cavl-shell{
  width:min(100%,950px);
  min-height:100vh;
  margin:0 auto;
  background:#f7f7f7;
  box-shadow:0 0 35px rgba(0,0,0,.08);
}
.cavl-header{
  height:92px;
  background:linear-gradient(90deg,#c90000,#e00000);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 30px;
  position:sticky;
  top:0;
  z-index:50;
}
.cavl-brand{
  display:flex;
  align-items:center;
  gap:16px;
  font-size:42px;
  font-weight:400;
  letter-spacing:-1.5px;
}
.cavl-sun-logo{
  width:58px;height:58px;
  display:flex;align-items:center;justify-content:center;
  font-size:54px;line-height:1;color:#fff;
}
.cavl-menu-button{
  border:0;background:transparent;color:#fff;
  font-size:42px;line-height:1;cursor:pointer;padding:8px;
}
.cavl-menu{
  position:absolute;
  right:22px;top:82px;
  display:none;
  flex-direction:column;
  min-width:190px;
  background:#fff;
  box-shadow:0 12px 30px rgba(0,0,0,.18);
  border-radius:12px;
  overflow:hidden;
}
.cavl-menu.open{display:flex}
.cavl-menu a{
  color:#111;text-decoration:none;padding:14px 18px;border-bottom:1px solid #eee;font-weight:700;
}
.cavl-content{padding:0 18px 18px}
.cavl-measured{
  text-align:center;font-size:25px;padding:12px 0 9px;
}
.cavl-card{
  background:#fff;
  border:1px solid #e6e6e6;
  border-radius:13px;
  box-shadow:0 2px 7px rgba(0,0,0,.04);
}
.cavl-top-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.cavl-temperature,.cavl-direction{
  min-height:175px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  padding:18px;
}
.cavl-thermo{font-size:55px}
.cavl-temp-value{
  font-size:68px;
  font-weight:800;
  letter-spacing:-3px;
  white-space:nowrap;
}
.cavl-temp-value span{font-size:.52em;font-weight:500;letter-spacing:0}
.cavl-wave{font-size:48px}
.cavl-direction strong{
  display:block;font-size:36px;line-height:1.08;margin-bottom:12px;
}
.cavl-direction span{display:block;font-size:23px;line-height:1.35}
.cavl-gauge-grid{
  display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px;
}
.cavl-gauge-card{padding:18px 20px 15px;min-height:350px}
.cavl-gauge-card h2{font-size:24px;margin:0 0 3px}
.cavl-gauge{
  position:relative;height:250px;margin-top:4px;
}
.cavl-gauge svg{width:100%;height:210px;overflow:visible}
.cavl-gauge-track,.cavl-gauge-value{
  fill:none;stroke-width:13;stroke-linecap:butt;
}
.cavl-gauge-track{stroke:#ddd}
.cavl-gauge-value{stroke:#ffab00;transition:stroke-dashoffset .5s ease}
.cavl-gauge-gust .cavl-gauge-value{stroke:#cf0000}
.cavl-gauge-number{
  position:absolute;left:0;right:0;top:112px;text-align:center;
  font-size:43px;font-weight:700;
}
.cavl-gauge-number small{display:block;font-size:17px;font-weight:500;margin-top:-3px}
.cavl-gauge-scale{
  position:absolute;left:16%;right:16%;top:188px;
  display:flex;justify-content:space-between;font-size:15px;
}
.cavl-direction-foot{text-align:center;font-size:20px;margin-top:-16px}
.cavl-mini-grid{
  display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:12px;
}
.cavl-mini{
  min-height:120px;padding:17px 13px;
  display:flex;align-items:center;gap:13px;
}
.cavl-mini-icon{font-size:40px}
.cavl-mini span{display:block;font-size:16px;margin-bottom:5px}
.cavl-mini strong{display:block;font-size:27px}
.cavl-section{margin-top:12px;padding:16px 18px}
.cavl-section h3,.cavl-live-section h3{
  margin:0 0 12px;color:#c80000;font-size:18px;letter-spacing:.02em;
}
.cavl-hours{
  display:grid;grid-template-columns:repeat(8,minmax(85px,1fr));
  overflow-x:auto;
}
.cavl-hour{
  min-width:85px;text-align:center;padding:9px 6px;
  border-right:1px solid #e6e6e6;position:relative;
}
.cavl-hour:last-child{border-right:0}
.cavl-hour strong{display:block;font-size:14px;color:#222}
.cavl-hour-wind{display:block;font-size:24px;margin:10px 0 4px}
.cavl-hour b{font-size:21px}
.cavl-hour small{display:block;font-size:11px}
.cavl-dot{
  display:block;width:8px;height:8px;border-radius:50%;margin:7px auto 0;background:#bbb;
}
.cavl-dot-good{background:var(--green)}
.cavl-dot-medium{background:var(--yellow)}
.cavl-dot-bad{background:var(--bad)}
.cavl-days-section{padding:15px 0 10px;overflow:hidden}
.cavl-days-section h3{padding:0 18px}
.cavl-days{border-top:1px solid #ddd}
.cavl-day{
  min-height:58px;
  display:grid;
  grid-template-columns:145px 55px minmax(180px,1.4fr) 130px 105px;
  align-items:center;
  gap:8px;
  padding:7px 17px;
  border-bottom:1px solid rgba(255,255,255,.75);
}
.cavl-day.cavl-good{background:var(--green);color:#fff}
.cavl-day.cavl-medium{background:var(--yellow);color:#000}
.cavl-day.cavl-bad{background:var(--bad);color:#fff}
.cavl-day.cavl-unknown{background:#eee;color:#111}
.cavl-day-date strong{display:block;text-transform:capitalize;font-size:17px}
.cavl-day-date span{font-size:12px}
.cavl-day-icon{font-size:31px;text-align:center}
.cavl-day-temp{display:flex;align-items:center;gap:10px}
.cavl-day-temp .min{font-size:21px;color:#087df0;font-weight:700}
.cavl-day-temp .max{font-size:21px;color:#d71912}
.temp-bar{
  height:7px;min-width:90px;flex:1;border-radius:10px;
  background:linear-gradient(90deg,#3189ff,#ffc12b,#ff2c13);
}
.cavl-day-wind,.cavl-day-rain{font-size:14px;white-space:nowrap}
.cavl-legend{
  display:flex;justify-content:center;gap:16px;flex-wrap:wrap;
  padding:10px 10px 0;font-weight:800;font-size:13px;
}
.cavl-legend span{padding:6px 10px;border-radius:4px}
.legend-good{background:var(--green);color:#fff}
.legend-medium{background:var(--yellow);color:#000}
.legend-bad{background:var(--bad);color:#fff}
.cavl-live-section{margin-top:12px;padding:15px 18px 18px}
.cavl-video{
  width:100%;aspect-ratio:16/9;background:#000;border-radius:6px;overflow:hidden;
}
.cavl-video iframe{width:100%;height:100%;border:0;display:block}
.cavl-footer{
  min-height:58px;background:linear-gradient(90deg,#c90000,#e00000);
  color:#fff;padding:0 28px;
  display:flex;align-items:center;justify-content:space-between;
  font-size:14px;gap:20px;
}
.cavl-loading,.cavl-error{
  min-height:100vh;display:flex;align-items:center;justify-content:center;
  flex-direction:column;gap:8px;text-align:center;padding:30px;font-size:18px;
}
.cavl-unavailable{padding:20px;color:#666}

@media(max-width:700px){
  .cavl-shell{width:100%}
  .cavl-header{height:72px;padding:0 15px}
  .cavl-brand{font-size:30px;gap:10px}
  .cavl-sun-logo{width:42px;height:42px;font-size:40px}
  .cavl-menu-button{font-size:34px}
  .cavl-menu{top:64px;right:10px}
  .cavl-content{padding:0 8px 10px}
  .cavl-measured{font-size:19px;padding:9px 0}
  .cavl-top-grid{grid-template-columns:1fr 1.65fr;gap:7px}
  .cavl-temperature,.cavl-direction{min-height:130px;padding:10px;gap:7px}
  .cavl-thermo{display:none}
  .cavl-temp-value{font-size:43px;letter-spacing:-2px}
  .cavl-wave{font-size:27px}
  .cavl-direction strong{font-size:24px;margin-bottom:6px}
  .cavl-direction span{font-size:16px}
  .cavl-gauge-grid{gap:7px;margin-top:7px}
  .cavl-gauge-card{padding:13px 10px 9px;min-height:270px}
  .cavl-gauge-card h2{font-size:20px}
  .cavl-gauge{height:185px}
  .cavl-gauge svg{height:165px}
  .cavl-gauge-number{top:87px;font-size:30px}
  .cavl-gauge-number small{font-size:13px}
  .cavl-gauge-scale{top:146px;left:10%;right:10%;font-size:12px}
  .cavl-direction-foot{font-size:14px;margin-top:-4px}
  .cavl-mini-grid{grid-template-columns:repeat(2,1fr);gap:7px;margin-top:7px}
  .cavl-mini{min-height:85px;padding:11px 9px}
  .cavl-mini-icon{font-size:27px}
  .cavl-mini span{font-size:12px}
  .cavl-mini strong{font-size:20px}
  .cavl-section{margin-top:7px;padding:12px 9px}
  .cavl-section h3,.cavl-live-section h3{font-size:15px}
  .cavl-day{
    grid-template-columns:88px 40px minmax(118px,1fr) 98px;
    gap:4px;padding:7px 9px;
  }
  .cavl-day-rain{display:none}
  .cavl-day-date strong{font-size:14px}
  .cavl-day-date span{font-size:10px}
  .cavl-day-icon{font-size:24px}
  .cavl-day-temp{gap:5px}
  .cavl-day-temp .min,.cavl-day-temp .max{font-size:16px}
  .temp-bar{min-width:45px;height:6px}
  .cavl-day-wind{font-size:12px}
  .cavl-legend{gap:5px;font-size:10px}
  .cavl-legend span{padding:5px 7px}
  .cavl-live-section{margin-top:7px;padding:11px 9px}
  .cavl-footer{padding:0 11px;font-size:11px;min-height:46px}
}
@media(max-width:390px){
  .cavl-brand{font-size:27px}
  .cavl-temp-value{font-size:38px}
  .cavl-direction strong{font-size:20px}
  .cavl-direction span{font-size:14px}
  .cavl-day{grid-template-columns:78px 35px minmax(108px,1fr) 88px}
  .cavl-day-wind{font-size:11px}
}


/* ==========================================================
   CAVL METEO 4.2 — MODE APPLICATION PLEIN ÉCRAN
   ========================================================== */

/* Neutralise la mise en page du thème WordPress sur la page météo */
body.cavl-meteo-fullscreen-page,
html.cavl-meteo-running,
body.cavl-meteo-running{
  margin:0!important;
  padding:0!important;
  width:100%!important;
  min-width:100%!important;
  max-width:none!important;
  overflow-x:hidden!important;
  background:#f4f4f4!important;
}

/* Cache les éléments de thème les plus courants uniquement sur cette page */
body.cavl-meteo-fullscreen-page > header,
body.cavl-meteo-fullscreen-page > footer,
body.cavl-meteo-fullscreen-page #masthead,
body.cavl-meteo-fullscreen-page #colophon,
body.cavl-meteo-fullscreen-page .site-header,
body.cavl-meteo-fullscreen-page .site-footer,
body.cavl-meteo-fullscreen-page .wp-site-blocks > header,
body.cavl-meteo-fullscreen-page .wp-site-blocks > footer{
  display:none!important;
}

/* Supprime marges/largeurs du contenu WordPress */
body.cavl-meteo-fullscreen-page .site,
body.cavl-meteo-fullscreen-page .site-content,
body.cavl-meteo-fullscreen-page .content-area,
body.cavl-meteo-fullscreen-page main,
body.cavl-meteo-fullscreen-page article,
body.cavl-meteo-fullscreen-page .entry-content,
body.cavl-meteo-fullscreen-page .wp-site-blocks,
body.cavl-meteo-fullscreen-page .wp-block-post-content{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
}

body.cavl-meteo-fullscreen-page .entry-header,
body.cavl-meteo-fullscreen-page .page-header,
body.cavl-meteo-fullscreen-page .wp-block-post-title{
  display:none!important;
}

.cavl-meteo-app{
  position:relative;
  width:100%!important;
  min-height:100dvh!important;
  margin:0!important;
  padding:0!important;
  background:#f4f4f4;
}

.cavl-shell{
  width:100%!important;
  max-width:950px!important;
  min-height:100dvh!important;
  margin:0 auto!important;
}

.cavl-header{
  top:0;
  padding-top:env(safe-area-inset-top);
  height:calc(72px + env(safe-area-inset-top));
}

.cavl-content{
  padding-bottom:calc(14px + env(safe-area-inset-bottom));
}

.cavl-footer{
  padding-bottom:env(safe-area-inset-bottom);
  min-height:calc(46px + env(safe-area-inset-bottom));
}

.cavl-header-actions{
  display:flex;
  align-items:center;
  gap:6px;
}

.cavl-fullscreen-button{
  border:0;
  background:transparent;
  color:#fff;
  font-size:30px;
  line-height:1;
  cursor:pointer;
  padding:8px;
}

@media (display-mode: standalone){
  .cavl-fullscreen-button{display:none}
}

@media(max-width:700px){
  .cavl-shell{
    width:100%!important;
    max-width:none!important;
  }
  .cavl-header{
    height:calc(68px + env(safe-area-inset-top));
  }
  .cavl-brand{
    font-size:28px;
  }
  .cavl-fullscreen-button{
    font-size:26px;
  }
}

/* Safari iPhone : pas d'espace parasite sous l'app */
@supports (-webkit-touch-callout:none){
  .cavl-meteo-app,
  .cavl-shell{
    min-height:-webkit-fill-available!important;
  }
}

.cavl-not-measured{
  display:block;
  margin-top:3px;
  font-size:10px;
  line-height:1.1;
  font-weight:600;
  color:#8a8a8a;
  letter-spacing:0;
}
.cavl-temp-value .cavl-not-measured{
  font-size:11px;
  text-align:center;
  margin-top:7px;
}


/* ==========================================================
   CAVL METEO 4.5 — MODE STANDALONE STRICT
   ========================================================== */

/* Masque navigation / menus / barres de thème sur la page météo */
body.cavl-meteo-fullscreen-page nav,
body.cavl-meteo-fullscreen-page .navigation,
body.cavl-meteo-fullscreen-page .main-navigation,
body.cavl-meteo-fullscreen-page .primary-navigation,
body.cavl-meteo-fullscreen-page .secondary-navigation,
body.cavl-meteo-fullscreen-page .site-navigation,
body.cavl-meteo-fullscreen-page .menu,
body.cavl-meteo-fullscreen-page .menu-wrapper,
body.cavl-meteo-fullscreen-page .navbar,
body.cavl-meteo-fullscreen-page .nav-bar,
body.cavl-meteo-fullscreen-page .top-bar,
body.cavl-meteo-fullscreen-page .header-navigation,
body.cavl-meteo-fullscreen-page .mobile-navigation,
body.cavl-meteo-fullscreen-page .mobile-menu,
body.cavl-meteo-fullscreen-page .offcanvas,
body.cavl-meteo-fullscreen-page .off-canvas,
body.cavl-meteo-fullscreen-page .site-branding,
body.cavl-meteo-fullscreen-page .site-title,
body.cavl-meteo-fullscreen-page .site-description,
body.cavl-meteo-fullscreen-page .sidebar,
body.cavl-meteo-fullscreen-page aside,
body.cavl-meteo-fullscreen-page .widget-area,
body.cavl-meteo-fullscreen-page .breadcrumbs,
body.cavl-meteo-fullscreen-page .breadcrumb,
body.cavl-meteo-fullscreen-page #wpadminbar{
  display:none!important;
}

/* Gutenberg / thèmes blocs */
body.cavl-meteo-fullscreen-page .wp-block-template-part,
body.cavl-meteo-fullscreen-page .wp-block-navigation,
body.cavl-meteo-fullscreen-page .wp-block-site-title,
body.cavl-meteo-fullscreen-page .wp-block-site-logo{
  display:none!important;
}

/* Certains thèmes enveloppent le contenu dans des conteneurs limités */
body.cavl-meteo-fullscreen-page .container,
body.cavl-meteo-fullscreen-page .site-container,
body.cavl-meteo-fullscreen-page .page-container,
body.cavl-meteo-fullscreen-page .content-container,
body.cavl-meteo-fullscreen-page .wrap,
body.cavl-meteo-fullscreen-page .wrapper,
body.cavl-meteo-fullscreen-page .inside-article,
body.cavl-meteo-fullscreen-page .inside-site-info,
body.cavl-meteo-fullscreen-page .grid-container,
body.cavl-meteo-fullscreen-page .elementor,
body.cavl-meteo-fullscreen-page .elementor-section,
body.cavl-meteo-fullscreen-page .elementor-container{
  max-width:none!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
}

/* L'application doit rester au-dessus de tout ce que le thème pourrait laisser */
.cavl-meteo-app{
  position:relative!important;
  z-index:999999!important;
}


/* CAVL METEO 4.7 — application autonome, sans interface WordPress */
body.cavl-meteo-standalone{
  margin:0!important;
  padding:0!important;
  width:100%!important;
  min-height:100dvh!important;
  background:#f4f4f4!important;
}
body.cavl-meteo-standalone .cavl-meteo-app{
  width:100%!important;
  min-height:100dvh!important;
  margin:0!important;
}
body.cavl-meteo-standalone .cavl-shell{
  width:100%!important;
  max-width:950px!important;
  min-height:100dvh!important;
  margin:0 auto!important;
}
.cavl-header{
  justify-content:flex-start!important;
}
.cavl-header-actions,
.cavl-menu,
.cavl-menu-button,
.cavl-fullscreen-button{
  display:none!important;
}
@media(max-width:700px){
  body.cavl-meteo-standalone .cavl-shell{
    max-width:none!important;
  }
}


/* CAVL METEO 4.8 */
.cavl-mini-grid{
  grid-template-columns:repeat(3,1fr)!important;
}
@media(max-width:700px){
  .cavl-mini-grid{
    grid-template-columns:repeat(3,1fr)!important;
  }
}
@media(max-width:520px){
  .cavl-mini-grid{
    grid-template-columns:1fr!important;
  }
}


/* CAVL METEO 4.9 — pluie forte avec vent bon */
.cavl-day.cavl-rainy{
  background:#2196F3;
  color:#fff;
}
.legend-rainy{
  background:#2196F3;
  color:#fff;
}
