.am-forest-app{
  --blue:#3d5f9f;
  --blue-dark:#315388;
  --panel:#f1f5fa;
  --border:#dfe6ef;
  --text:#111827;
  --muted:#58708f;
  font-family:Arial,Helvetica,sans-serif;
  color:var(--text);
  position:relative;
  line-height:1.35;
}
.am-forest-app *{box-sizing:border-box}
.am-forest-page-head{margin:0 0 28px}
.am-forest-page-head h2{
  font-size:26px;
  line-height:1.15;
  margin:0 0 8px;
  font-weight:800;
  display:flex;
  align-items:center;
  gap:10px;
}
.am-forest-bluebar{
  width:4px;
  height:28px;
  background:#315da8;
  border-radius:3px;
  display:inline-block;
  flex:0 0 auto;
}
.am-forest-page-head p{
  margin:0 0 7px 15px;
  color:#5d7191;
  font-size:15px;
}
.am-forest-summary{
  margin-left:15px;
  color:#526987;
  font-size:14px;
}
.am-forest-summary-bulletin{
  display:block;
  color:#2c3e5c;
  font-weight:800;
  margin-bottom:4px;
}
.am-forest-summary-counts .chip{
  margin:0 2px;
  font-weight:700;
}
.am-forest-grid{
  display:grid;
  grid-template-columns:minmax(0,3.15fr) minmax(300px,1fr);
  gap:24px;
  align-items:stretch;
}
.am-forest-main-card,
.am-forest-side{
  background:var(--panel);
  border-radius:8px;
  overflow:hidden;
}
.am-forest-main-card{padding:18px}
.am-forest-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  margin-bottom:16px;
}
.am-forest-toolbar h3{
  font-size:22px;
  margin:0;
  display:flex;
  align-items:center;
  gap:9px;
}
.am-forest-firebar{
  width:4px;
  height:25px;
  background:linear-gradient(#f04923,#ffd21f);
  border-radius:3px;
  flex:0 0 auto;
}
.am-forest-toolbar-actions{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.am-forest-updated{
  font-size:14px;
  color:#57708d;
  white-space:nowrap;
}
.am-forest-day-switch{display:flex}
.am-forest-day-switch button,
.am-forest-history-btn,
.am-forest-history button{
  border:1px solid #d5deea;
  background:#fff;
  color:#35527f;
  padding:10px 14px;
  font-weight:700;
  cursor:pointer;
}
.am-forest-day-switch button{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:2px;
  line-height:1.2;
}
.am-forest-day-switch button small{
  font-weight:600;
  font-size:11px;
  color:#7183a0;
}
.am-forest-day-switch button.is-active small{color:rgba(255,255,255,.85)}
.am-forest-day-switch button:first-child{border-radius:8px 0 0 8px}
.am-forest-day-switch button:last-child{
  border-radius:0 8px 8px 0;
  margin-left:-1px;
}
.am-forest-day-switch button.is-active{
  background:var(--blue);
  color:#fff;
  border-color:var(--blue);
}
.am-forest-history-btn{
  background:var(--blue);
  color:#fff;
  border-color:var(--blue);
  border-radius:8px;
}
.am-forest-map-wrap{
  background:#fff;
  border-radius:7px;
  min-height:560px;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.am-forest-map{
  width:100%;
  height:auto;
  max-height:650px;
  display:block;
}
.am-forest-paths path{
  stroke:#176b25;
  stroke-width:1.15;
  vector-effect:non-scaling-stroke;
  cursor:pointer;
  transition:filter .12s,opacity .12s,stroke-width .12s;
}
.am-forest-paths path:hover,
.am-forest-paths path:focus{
  filter:brightness(.92);
  stroke:#111;
  stroke-width:2;
  outline:none;
}
.am-forest-paths path.is-selected{
  stroke:#173b74;
  stroke-width:4;
  filter:brightness(.95);
}
.am-forest-icons{pointer-events:none}
.am-forest-flame-marker{
  filter:drop-shadow(0 1px 1px rgba(0,0,0,.15));
}
.am-forest-map-loader{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  gap:6px;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.92);
  z-index:4;
  color:#425c80;
  padding:20px;
  text-align:center;
}
.am-forest-map-loader[hidden]{display:none}
.am-forest-tooltip{
  position:absolute;
  z-index:10;
  pointer-events:none;
  background:#fff;
  border:1px solid #d5deea;
  border-radius:8px;
  box-shadow:0 7px 24px rgba(17,24,39,.16);
  padding:9px 11px;
  font-size:13px;
  min-width:180px;
  max-width:250px;
}
.am-forest-legend{
  display:flex;
  justify-content:center;
  gap:20px 24px;
  flex-wrap:wrap;
  padding:15px 4px 0;
  color:#475c7a;
  font-size:14px;
}
.am-forest-legend span,
.am-forest-history-legend span{
  display:flex;
  align-items:center;
  gap:8px;
}
.am-forest-legend i,
.am-forest-history-legend i{
  display:inline-block;
  width:19px;
  height:19px;
  border-radius:4px;
  border:1px solid rgba(0,0,0,.12);
}
.lvl-1{background:#2eaf3a!important}
.lvl-2{background:#ffe400!important}
.lvl-3{background:#f5a000!important}
.lvl-4{background:#d80f18!important}
.lvl-0{background:#e5e7eb!important}
.am-forest-side{
  display:flex;
  flex-direction:column;
  min-height:690px;
}
.am-forest-side-head{
  background:var(--blue);
  color:#fff;
  padding:15px 18px;
}
.am-forest-side-head h3{
  font-size:20px;
  margin:0 0 7px;
}
.am-forest-side-head p{
  font-size:13px;
  margin:0;
  max-width:330px;
}
.am-forest-filters{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  padding:12px 14px;
  border-bottom:1px solid var(--border);
  background:#f7f9fc;
}
.am-forest-filters button{
  border:1px solid #d6dfeb;
  background:#fff;
  color:#354b6d;
  border-radius:7px;
  padding:7px 10px;
  font-size:12px;
  cursor:pointer;
  font-weight:700;
}
.am-forest-filters button.is-active{
  background:var(--blue);
  border-color:var(--blue);
  color:#fff;
}
.am-forest-filters b{
  margin-left:4px;
  background:#7187a8;
  color:#fff;
  border-radius:999px;
  padding:2px 6px;
  font-size:10px;
}
.am-forest-filters b.red{background:#d80f18}
.am-forest-filters b.orange{
  background:#f5a000;
  color:#111;
}
.am-forest-filters b.yellow{
  background:#ffe400;
  color:#111;
}
.am-forest-list{
  padding:14px;
  overflow:auto;
  max-height:630px;
}
.am-forest-dep-card{
  width:100%;
  border:1px solid #dce4ed;
  border-radius:8px;
  background:#fff;
  margin:0 0 8px;
  padding:12px 13px;
  display:block;
  text-align:left;
  cursor:pointer;
  color:#111;
  transition:border-color .12s,box-shadow .12s,transform .12s;
}
.am-forest-dep-card:hover,
.am-forest-dep-card.is-selected{
  border-color:#7893bd;
  box-shadow:0 3px 12px rgba(41,68,107,.12);
  transform:translateY(-1px);
}
.am-forest-dep-title{
  display:flex;
  align-items:center;
  gap:4px;
  font-size:15px;
}
.am-forest-dep-title strong{font-size:15px}
.am-forest-dep-title em{
  font-style:normal;
  color:#667a98;
  font-weight:700;
  font-size:12px;
}
.am-forest-dep-title .badge{
  margin-left:auto;
  font-size:10px;
  padding:4px 8px;
  border-radius:4px;
}
.badge-2{background:#ffe400}
.badge-3{
  background:#f5a000;
  color:#fff;
}
.badge-4{
  background:#d80f18;
  color:#fff;
}
.am-forest-chips{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin-top:10px;
}
.chip{
  font-size:11px;
  border-radius:6px;
  padding:5px 8px;
  background:#eef2f7;
}
.chip-1{background:#dff3df}
.chip-2{background:#fff4a9}
.chip-3{background:#ffe2a9}
.chip-4{background:#ffd2d4}
.am-forest-empty{
  padding:22px;
  text-align:center;
  color:#657893;
}
.am-forest-history{
  margin-top:24px;
  background:#f4f7fb;
  border:1px solid var(--border);
  border-radius:9px;
  padding:18px;
}
.am-forest-history[hidden]{display:none}
.am-forest-history-top{
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:flex-start;
}
.am-forest-history-top h3{
  margin:0 0 5px;
  font-size:20px;
}
.am-forest-history-top p{
  margin:0;
  color:#617390;
  font-size:13px;
}
.am-forest-history-top button{border-radius:7px}
.am-forest-calendar-nav{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:15px;
  margin:18px 0 10px;
}
.am-forest-calendar-nav button{
  border-radius:6px;
  padding:4px 12px;
  font-size:20px;
}
.am-forest-calendar{
  display:grid;
  grid-template-columns:repeat(7,minmax(34px,1fr));
  gap:6px;
  max-width:760px;
  margin:0 auto;
}
.am-forest-calendar .dow{
  text-align:center;
  font-size:12px;
  font-weight:700;
  color:#6a7d99;
  padding:6px;
}
.am-forest-calendar .blank{min-height:38px}
.am-forest-calendar .day{
  border:1px solid rgba(0,0,0,.08);
  border-radius:7px;
  min-height:40px;
  cursor:pointer;
  font-weight:800;
  color:#111;
}
.am-forest-calendar .day.lvl-4{color:#fff}
.am-forest-calendar .day:disabled{
  cursor:default;
  opacity:.72;
}
.am-forest-calendar .day.is-active{
  outline:3px solid #315da8;
  outline-offset:1px;
}
.am-forest-history-legend{
  display:flex;
  justify-content:center;
  gap:18px;
  flex-wrap:wrap;
  margin-top:14px;
  font-size:12px;
  color:#60728e;
}
.am-forest-history-legend i{
  width:13px;
  height:13px;
}
.am-forest-plugin-meta{
  margin-top:22px;
  padding-top:12px;
  border-top:1px solid #e0e6ef;
  font-size:11px;
  color:#93a2ba;
  text-align:right;
}

@media(max-width:1050px){
  .am-forest-grid{grid-template-columns:1fr}
  .am-forest-side{min-height:0}
  .am-forest-list{max-height:420px}
  .am-forest-map-wrap{min-height:460px}
}

@media(max-width:700px){
  .am-forest-page-head h2{font-size:22px}
  .am-forest-page-head p,
  .am-forest-summary{margin-left:0}
  .am-forest-main-card{padding:12px}
  .am-forest-toolbar{
    align-items:flex-start;
    flex-direction:column;
  }
  .am-forest-toolbar-actions{
    justify-content:flex-start;
    gap:9px;
  }
  .am-forest-updated{width:100%}
  .am-forest-map-wrap{min-height:360px}
  .am-forest-legend{
    gap:10px 16px;
    justify-content:flex-start;
  }
  .am-forest-legend span{
    width:calc(50% - 8px);
    font-size:12px;
  }
  .am-forest-history-top{flex-direction:column}
  .am-forest-calendar{gap:3px}
  .am-forest-calendar .day{min-height:34px}
  .am-forest-side-head h3{font-size:18px}
}


/* v1.2.0 - navigation et panneau départemental */
.am-forest-side-head [hidden],
.am-forest-detail[hidden],
.am-forest-list[hidden]{
  display:none!important;
}
.am-forest-back-btn{
  appearance:none;
  border:0;
  background:rgba(255,255,255,.14);
  color:#fff;
  border-radius:5px;
  padding:6px 9px;
  margin:0 0 10px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}
.am-forest-detail{
  padding:15px 14px 18px;
  background:#f7f9fc;
  min-height:240px;
}
.am-forest-detail-section{
  border-top:1px solid #e1e7f0;
  padding-top:14px;
  margin-top:2px;
}
.am-forest-detail-section:first-child{
  border-top:0;
  padding-top:0;
}
.am-forest-detail-section h4{
  margin:0 0 12px;
  color:#536b8e;
  font-size:13px;
  font-weight:800;
}
.am-forest-current-level{
  display:flex;
  align-items:center;
  gap:10px;
  background:#fff;
  border-radius:7px;
  padding:12px;
  border:1px solid #e1e7ef;
}
.am-forest-level-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:68px;
  min-height:30px;
  border-radius:4px;
  padding:5px 10px;
  font-size:11px;
  font-weight:900;
}
.am-forest-level-badge.level-1{background:#2eaf3a;color:#fff}
.am-forest-level-badge.level-2{background:#ffe400;color:#111}
.am-forest-level-badge.level-3{background:#f5a000;color:#fff}
.am-forest-level-badge.level-4{background:#d80f18;color:#fff}
.am-forest-level-text{color:#5d6f89;font-size:13px}
.am-forest-day-cards{display:grid;gap:9px}
.am-forest-day-card{
  width:100%;
  border:1px solid #e1e7ef;
  background:#fff;
  border-radius:7px;
  padding:11px;
  display:flex;
  align-items:center;
  gap:10px;
  text-align:left;
  cursor:pointer;
}
.am-forest-day-card:hover,
.am-forest-day-card.is-current{
  border-color:#7592bf;
  box-shadow:0 2px 10px rgba(49,83,136,.10);
}
.am-forest-day-card span:last-child{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.am-forest-day-card strong{color:#111827;font-size:13px}
.am-forest-day-card small{color:#6c7d96;font-size:11px}
.am-forest-day-icon{
  width:30px;
  height:30px;
  border-radius:6px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}
.am-forest-day-icon.level-1{background:#dff3df}
.am-forest-day-icon.level-2{background:#fff4a9}
.am-forest-day-icon.level-3{background:#ffe2a9}
.am-forest-day-icon.level-4{background:#ffd2d4}

/* v1.5.0 - vue "duo" (2 cartes cote a cote, style bulletin officiel) */
.am-forest-duo{
  --blue:#3d5f9f;
  --text:#111827;
  font-family:Arial,Helvetica,sans-serif;
  color:var(--text);
  position:relative;
  line-height:1.35;
}
.am-forest-duo *{box-sizing:border-box}
.am-forest-duo .am-forest-page-head{margin:0 0 24px}
.am-forest-duo .am-forest-page-head h2{
  font-size:24px;
  line-height:1.15;
  margin:0 0 8px;
  font-weight:800;
  display:flex;
  align-items:center;
  gap:10px;
}
.am-forest-duo .am-forest-page-head p{
  margin:0 0 0 15px;
  color:#5d7191;
  font-size:14px;
}
.am-forest-duo-loader{
  padding:40px 20px;
  text-align:center;
  color:#526987;
  background:#f7f9fc;
  border-radius:8px;
}
.am-forest-duo-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}
.am-forest-duo-panel{
  background:#fff;
  border:1px solid #dfe6ef;
  border-radius:8px;
  padding:16px;
}
.am-forest-duo-date{
  text-align:center;
  font-size:18px;
  font-weight:800;
  margin:0 0 14px;
  color:#111827;
}
.am-forest-duo-body{
  display:flex;
  align-items:center;
  gap:12px;
}
.am-forest-duo-legend{
  display:flex;
  flex-direction:column;
  gap:6px;
  flex:0 0 auto;
}
.am-forest-duo-legend-item{
  min-width:44px;
  text-align:center;
  border-radius:5px;
  padding:8px 6px;
  font-size:18px;
  font-weight:900;
  border:1px solid rgba(0,0,0,.12);
}
.am-forest-duo-legend-item.lvl-1{background:#2eaf3a;color:#fff}
.am-forest-duo-legend-item.lvl-2{background:#ffe400;color:#111}
.am-forest-duo-legend-item.lvl-3{background:#f5a000;color:#fff}
.am-forest-duo-legend-item.lvl-4{background:#d80f18;color:#fff}
.am-forest-duo-map{
  flex:1 1 auto;
  width:100%;
  height:auto;
  max-height:520px;
  display:block;
}
.am-forest-duo-map path{
  stroke:#176b25;
  stroke-width:1;
  vector-effect:non-scaling-stroke;
}
.am-forest-duo .am-forest-flame-marker{
  filter:drop-shadow(0 1px 1px rgba(0,0,0,.15));
}

@media(max-width:900px){
  .am-forest-duo-grid{grid-template-columns:1fr}
}
