
:root{--ink:#203027;--muted:#69766e;--forest:#31463a;--forest2:#486452;--paper:#f4efe3;--card:#fffdf7;--ochre:#a56f2a;--line:#d8d4c8;--shadow:0 10px 30px rgba(33,49,40,.08);font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",sans-serif;color:var(--ink);background:var(--paper)}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 20% 0,#faf7ef 0,var(--paper) 45%);color:var(--ink)}button,input{font:inherit}button{cursor:pointer}.hidden{display:none!important}
.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;padding:calc(.75rem + env(safe-area-inset-top)) 1rem .75rem;background:rgba(244,239,227,.92);backdrop-filter:blur(18px);border-bottom:1px solid rgba(216,212,200,.8)}
.brand{display:flex;gap:.7rem;align-items:center;border:0;background:none;text-align:left;color:var(--ink);padding:0}.brand-mark{font-size:1.6rem}.brand b,.brand small{display:block}.brand small{color:var(--muted);font-size:.72rem}.install{border:0;border-radius:999px;background:var(--forest);color:white;padding:.65rem .9rem;font-weight:700}
main{max-width:900px;margin:auto;padding:1rem 1rem calc(6rem + env(safe-area-inset-bottom))}.screen{display:none}.screen.active{display:block}.hero{padding:1.4rem 0 1.1rem}.kicker{margin:0 0 .3rem;text-transform:uppercase;letter-spacing:.1em;font-weight:800;font-size:.7rem;color:var(--ochre)}h1,h2{font-family:Georgia,"Times New Roman",serif}.hero h1{font-size:clamp(2rem,7vw,3.35rem);line-height:1.04;margin:.2rem 0 .8rem;max-width:720px}.hero>p:last-child{font-family:Georgia,serif;line-height:1.55;color:#4d584f;max-width:700px}
.soon-panel{background:linear-gradient(145deg,var(--forest),#22362a);color:white;border-radius:24px;padding:1.2rem;box-shadow:var(--shadow);margin-bottom:1rem}.soon-panel .date{opacity:.78;font-size:.84rem}.soon-panel h2{margin:.25rem 0}.soon-panel p{margin:.25rem 0;opacity:.88}.soon-panel button{margin-top:.75rem;border:1px solid rgba(255,255,255,.3);background:rgba(255,255,255,.12);color:white;border-radius:12px;padding:.65rem .8rem;font-weight:700}
.home-actions{display:grid;grid-template-columns:repeat(2,1fr);gap:.75rem}.home-actions button{border:1px solid var(--line);background:var(--card);border-radius:20px;padding:1rem;text-align:left;box-shadow:0 4px 16px rgba(33,49,40,.04);color:var(--ink)}.home-actions span{display:block;font-size:1.6rem;margin-bottom:.5rem}.home-actions b,.home-actions small{display:block}.home-actions small{color:var(--muted);margin-top:.25rem;line-height:1.3}
.home-section{margin-top:1.6rem}.section-heading{display:flex;justify-content:space-between;align-items:end;margin-bottom:.7rem}.section-heading h2{margin:.1rem 0}.section-heading button{border:0;background:none;color:var(--forest2);font-weight:800}.horizontal-cards{display:flex;gap:.75rem;overflow:auto;padding:.1rem .1rem .8rem;scroll-snap-type:x mandatory}.mini-card{min-width:260px;scroll-snap-align:start;background:var(--card);border:1px solid var(--line);border-radius:18px;padding:1rem}.mini-card h3{margin:.35rem 0}.mini-card p{margin:.25rem 0;color:var(--muted);font-size:.88rem}.journal-preview,.paper-panel{background:var(--card);border:1px solid var(--line);border-radius:20px;padding:1rem}.journal-item+ .journal-item{border-top:1px solid var(--line);margin-top:.75rem;padding-top:.75rem}.journal-item time{color:var(--ochre);font-size:.78rem;font-weight:800}.journal-item h3{margin:.2rem 0}.journal-item p{margin:.25rem 0;color:var(--muted)}
.page-head{display:flex;gap:.8rem;align-items:center;margin:.6rem 0 1.2rem}.page-head h1{margin:.1rem 0}.back{border:1px solid var(--line);background:var(--card);border-radius:50%;width:42px;height:42px}.search span{display:block;font-weight:800;margin-bottom:.35rem}.search input{width:100%;border:1px solid var(--line);background:white;border-radius:15px;padding:.85rem 1rem}.chips{display:flex;gap:.5rem;overflow:auto;margin:.8rem 0}.chip{white-space:nowrap;border:1px solid var(--line);background:var(--card);border-radius:999px;padding:.6rem .85rem}.chip.active{background:var(--forest);color:white;border-color:var(--forest)}
.card-grid{display:grid;gap:.8rem}.notice-card{background:var(--card);border:1px solid var(--line);border-radius:20px;padding:1rem;box-shadow:0 4px 18px rgba(30,45,35,.04)}.notice-card .top{display:flex;justify-content:space-between}.badge{display:inline-block;border-radius:999px;background:#e1e8df;color:var(--forest);padding:.25rem .5rem;font-size:.72rem;font-weight:800}.notice-card h2{font-size:1.25rem;margin:.45rem 0 .2rem}.notice-card p{color:var(--muted);line-height:1.4}.notice-actions{display:flex;gap:.45rem;flex-wrap:wrap}.notice-actions button,.notice-actions a,.row-actions button,.file-label{border:1px solid var(--line);background:white;color:var(--ink);border-radius:12px;padding:.62rem .75rem;text-decoration:none;font-weight:750}.notice-actions .primary{background:var(--forest);color:white;border-color:var(--forest)}
.collection-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:.75rem}.collection-card{border:1px solid var(--line);background:var(--card);border-radius:20px;padding:1rem;text-align:left;color:var(--ink)}.collection-card span{font-size:1.5rem}.collection-card b,.collection-card small{display:block}.collection-card b{margin:.45rem 0 .2rem}.collection-card small{color:var(--muted)}.collection-content{margin-top:1rem}.intro{color:var(--muted);line-height:1.5}.metrics{display:grid;grid-template-columns:repeat(2,1fr);gap:.7rem;margin-bottom:1rem}.metric{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:1rem}.metric strong{display:block;font-size:1.7rem;color:var(--forest)}.metric span{color:var(--muted)}.paper-panel{margin-bottom:1rem}.paper-panel h2{margin-top:0}.enrich-row{padding:.65rem 0;border-bottom:1px solid var(--line)}.enrich-row:last-child{border:0}.row-actions{display:flex;gap:.5rem}.file-label input{display:none}.timeline{border-left:2px solid #c8bfaa;margin-left:.5rem;padding-left:1.2rem}.timeline .journal-item{position:relative;margin-bottom:1.25rem}.timeline .journal-item:before{content:"";position:absolute;width:10px;height:10px;background:var(--ochre);border-radius:50%;left:-1.58rem;top:.3rem}
.bottom-nav{position:fixed;z-index:30;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(4,1fr);padding:.45rem .45rem calc(.45rem + env(safe-area-inset-bottom));background:rgba(255,253,247,.95);backdrop-filter:blur(18px);border-top:1px solid var(--line)}.bottom-nav button{border:0;background:none;color:var(--muted);font-size:.68rem;padding:.3rem}.bottom-nav span{display:block;font-size:1.25rem}.bottom-nav button.active{color:var(--forest);font-weight:800}
dialog{border:0;border-radius:24px;padding:0;width:min(94vw,680px);max-height:90vh;background:var(--card);color:var(--ink)}dialog::backdrop{background:rgba(20,30,24,.58);backdrop-filter:blur(3px)}.dialog-card{position:relative;padding:1.2rem;max-height:90vh;overflow:auto}.close{position:absolute;right:.6rem;top:.4rem;border:0;background:none;font-size:2rem}.dialog-card h2{font-size:1.7rem;margin:.2rem 2rem .5rem 0}.why{background:#f3eee3;border-radius:14px;padding:.8rem;line-height:1.5}.detail-list{color:var(--muted)}textarea,select,input[type=date]{width:100%;border:1px solid var(--line);border-radius:12px;padding:.7rem;background:white}.field{display:block;margin:.8rem 0}.field span{display:block;font-weight:800;margin-bottom:.3rem}.save-note{color:var(--forest);font-weight:800}
@media(min-width:720px){.home-actions{grid-template-columns:repeat(4,1fr)}.card-grid{grid-template-columns:repeat(2,1fr)}.collection-grid{grid-template-columns:repeat(3,1fr)}.metrics{grid-template-columns:repeat(4,1fr)}}


/* V0.5.2 — Atlas cartographique */
.atlas-toolbar{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:.75rem;
  align-items:end;
  margin-bottom:.8rem;
}
.atlas-mode{
  display:flex;
  padding:.2rem;
  border:1px solid var(--line);
  background:var(--paper);
  border-radius:14px;
}
.atlas-mode button{
  border:0;
  background:transparent;
  color:var(--muted);
  padding:.7rem .9rem;
  border-radius:11px;
  font-weight:800;
}
.atlas-mode button.active{
  background:var(--forest);
  color:white;
}
.atlas-filters{margin-bottom:.8rem}
.atlas-map-panel{
  position:relative;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:22px;
  padding:.55rem;
  box-shadow:var(--shadow);
}
#atlasMap{
  min-height:62vh;
  height:620px;
  max-height:760px;
  border-radius:17px;
  overflow:hidden;
  background:#dfe7df;
}
.map-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.45rem;
  padding:.15rem 0 .65rem;
}
.map-actions button{
  border:1px solid var(--line);
  border-radius:999px;
  background:white;
  color:var(--ink);
  padding:.58rem .8rem;
  font-weight:750;
}
.map-caption{
  margin:.6rem .3rem .15rem;
  color:var(--muted);
  font-size:.78rem;
  line-height:1.35;
}
.hidden-panel{display:none}
.leaflet-container{
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",sans-serif;
  color:var(--ink);
}
.leaflet-popup-content-wrapper{
  border-radius:16px;
  box-shadow:0 8px 24px rgba(28,45,34,.18);
}
.leaflet-popup-content{margin:13px 15px;line-height:1.35}
.map-popup .map-kind{
  display:inline-block;
  margin-bottom:.35rem;
  padding:.2rem .45rem;
  border-radius:999px;
  background:#e3ecdf;
  color:var(--forest);
  font-size:.68rem;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.map-popup h3{margin:.1rem 0 .25rem;font-size:1rem}
.map-popup p{margin:.22rem 0;color:var(--muted)}
.map-popup button{
  margin-top:.45rem;
  border:0;
  border-radius:999px;
  padding:.52rem .7rem;
  background:var(--forest);
  color:#fff;
  font-weight:800;
}
.terrier-marker{
  display:flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border:3px solid #fff;
  border-radius:50% 50% 50% 12%;
  transform:rotate(-45deg);
  box-shadow:0 3px 9px rgba(21,37,27,.3);
}
.terrier-marker span{transform:rotate(45deg);font-size:16px}
.terrier-marker.event-a{background:#31463a}
.terrier-marker.event-b{background:#687c6e}
.terrier-marker.event-c{background:#8c795c}
.terrier-marker.place{background:#b07632}
.terrier-marker.favorite{box-shadow:0 0 0 4px #e5bd55,0 3px 9px rgba(21,37,27,.3)}
.user-location{
  width:18px;height:18px;border:4px solid white;border-radius:50%;
  background:#2c78a0;box-shadow:0 0 0 3px rgba(44,120,160,.3)
}
@media(max-width:650px){
  .atlas-toolbar{grid-template-columns:1fr}
  .atlas-mode{justify-self:stretch}
  .atlas-mode button{flex:1}
  #atlasMap{height:64vh;min-height:430px}
}


/* V0.5.3 — Bibliothèque */
.library-search-panel{
  display:grid;
  gap:.8rem;
  margin-bottom:1rem;
  padding:1rem;
  border:1px solid var(--line);
  border-radius:20px;
  background:var(--paper);
  box-shadow:var(--shadow);
}
.library-filters{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.65rem;
}
.library-filters label span{
  display:block;
  margin-bottom:.3rem;
  color:var(--muted);
  font-size:.76rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.library-filters select{
  width:100%;
  padding:.72rem .75rem;
  border:1px solid var(--line);
  border-radius:12px;
  background:white;
  color:var(--ink);
}
.library-results-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:.7rem;
  margin:1rem 0 .7rem;
}
.library-results-head p{margin:0;color:var(--muted);font-weight:750}
.library-results-head button{
  border:1px solid var(--line);
  border-radius:999px;
  background:white;
  padding:.55rem .75rem;
  color:var(--ink);
  font-weight:750;
}
.notice-meta{
  display:flex;
  flex-wrap:wrap;
  gap:.35rem;
  margin:.45rem 0;
}
.notice-meta span,.tag{
  display:inline-flex;
  padding:.22rem .48rem;
  border-radius:999px;
  background:#ece9df;
  color:#5e5b50;
  font-size:.7rem;
  font-weight:750;
}
.maturity-spotted{background:#f1ebd8!important;color:#745c27!important}
.maturity-documented{background:#e4eddf!important;color:#3f5a43!important}
.maturity-explored{background:#e1ece9!important;color:#315e57!important}
.maturity-enriched{background:#dde9d9!important;color:#294d31!important}
.maturity-reference{background:#eadfc8!important;color:#684c1e!important}
.source-list{padding-left:1.15rem}
.source-list li{margin:.38rem 0}
.verify-list{padding-left:1.15rem;color:var(--muted)}
.library-empty{
  padding:2rem 1rem;
  text-align:center;
  color:var(--muted);
  border:1px dashed var(--line);
  border-radius:18px;
}
@media(max-width:650px){
  .library-filters{grid-template-columns:1fr}
}


/* V0.5.4 — Expéditions */
.expedition-hero{
  display:flex;
  justify-content:space-between;
  gap:1rem;
  align-items:center;
  padding:1.1rem;
  margin-bottom:1rem;
  border:1px solid var(--line);
  border-radius:22px;
  background:linear-gradient(145deg,#fbf7ec,#eee7d7);
  box-shadow:var(--shadow);
}
.expedition-hero h2{margin:.2rem 0 .4rem;font-family:Georgia,serif}
.expedition-hero p{margin:.2rem 0;color:var(--muted)}
.expedition-tabs{
  display:flex;
  gap:.45rem;
  overflow:auto;
  margin-bottom:1rem;
}
.expedition-tabs button{
  white-space:nowrap;
  border:1px solid var(--line);
  border-radius:999px;
  background:white;
  padding:.65rem .9rem;
  color:var(--ink);
  font-weight:800;
}
.expedition-tabs button.active{
  background:var(--forest);
  color:white;
  border-color:var(--forest);
}
.exp-panel{display:grid;gap:.8rem}
.tour-card,.expedition-card,.find-card{
  padding:1rem;
  border:1px solid var(--line);
  border-radius:20px;
  background:var(--paper);
  box-shadow:var(--shadow);
}
.tour-card h2,.expedition-card h2,.find-card h2{margin:.2rem 0}
.tour-stops{
  margin:.75rem 0;
  padding-left:0;
  list-style:none;
}
.tour-stops li{
  position:relative;
  padding:.55rem .6rem .55rem 1.65rem;
  border-left:2px solid #c5d2c3;
  margin-left:.45rem;
}
.tour-stops li::before{
  content:"";
  position:absolute;
  left:-6px;
  top:1rem;
  width:10px;height:10px;
  border-radius:50%;
  background:var(--forest);
  border:2px solid white;
}
.mission-grid,.quick-checks{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.5rem;
}
.mission-option,.quick-check{
  display:flex;
  align-items:flex-start;
  gap:.5rem;
  padding:.65rem;
  border:1px solid var(--line);
  border-radius:13px;
  background:#faf9f4;
}
.expedition-form{
  display:grid;
  gap:.8rem;
}
.expedition-form label>span{
  display:block;
  margin-bottom:.35rem;
  font-weight:800;
}
.expedition-form input,
.expedition-form textarea,
.expedition-form select{
  width:100%;
  padding:.75rem;
  border:1px solid var(--line);
  border-radius:13px;
  background:white;
  color:var(--ink);
}
.stop-picker{
  max-height:280px;
  overflow:auto;
  display:grid;
  gap:.4rem;
  padding:.5rem;
  border:1px solid var(--line);
  border-radius:14px;
  background:#faf9f4;
}
.stop-picker label{
  display:flex;
  gap:.55rem;
  align-items:flex-start;
  padding:.5rem;
  border-radius:10px;
}
.stop-picker label:hover{background:white}
.expedition-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  margin-top:.8rem;
}
.expedition-actions button,.expedition-actions a{
  border:1px solid var(--line);
  border-radius:999px;
  padding:.65rem .85rem;
  background:white;
  color:var(--ink);
  font-weight:800;
  text-decoration:none;
}
.expedition-actions .primary{
  border-color:var(--forest);
  background:var(--forest);
  color:white;
}
.exp-status{
  display:inline-flex;
  padding:.22rem .48rem;
  border-radius:999px;
  background:#e5ece2;
  color:var(--forest);
  font-size:.72rem;
  font-weight:850;
}
.find-form{
  display:grid;
  gap:.65rem;
  padding:1rem;
  border:1px dashed var(--line);
  border-radius:18px;
}
.find-form input,.find-form textarea{
  width:100%;
  padding:.72rem;
  border:1px solid var(--line);
  border-radius:12px;
}
.find-meta{color:var(--muted);font-size:.82rem}
@media(max-width:650px){
  .expedition-hero{align-items:flex-start;flex-direction:column}
  .mission-grid,.quick-checks{grid-template-columns:1fr}
}


/* V0.5.5 — Villages et calendrier */
.local-gem-badge{
  display:inline-flex;
  align-items:center;
  gap:.25rem;
  padding:.22rem .5rem;
  border-radius:999px;
  background:#f3e7c7;
  color:#6e511d;
  font-size:.72rem;
  font-weight:850;
}
.calendar-inline{
  border:1px solid var(--line);
  border-radius:999px;
  padding:.62rem .78rem;
  background:white;
  color:var(--ink);
  font-weight:800;
}
.calendar-inline:hover{background:#f4f1e7}


/* V0.5.6 — Actualisation par tirage et informations de version */
.topbar-actions{
  display:flex;
  align-items:center;
  gap:.45rem;
}
.version-button{
  border:1px solid rgba(49,70,58,.22);
  border-radius:999px;
  padding:.48rem .68rem;
  background:rgba(255,255,255,.72);
  color:var(--forest);
  font-size:.76rem;
  font-weight:850;
  letter-spacing:.02em;
}
.version-button:active{transform:scale(.97)}
.pull-refresh{
  position:fixed;
  z-index:1200;
  top:calc(env(safe-area-inset-top) - 54px);
  left:50%;
  transform:translate(-50%,-64px);
  display:flex;
  align-items:center;
  gap:.45rem;
  min-width:190px;
  justify-content:center;
  padding:.6rem .85rem;
  border:1px solid rgba(49,70,58,.18);
  border-radius:999px;
  background:rgba(255,253,247,.96);
  color:var(--forest);
  box-shadow:0 7px 24px rgba(28,45,34,.17);
  font-size:.78rem;
  font-weight:820;
  opacity:0;
  pointer-events:none;
  transition:opacity .16s ease,transform .18s ease;
  backdrop-filter:blur(12px);
}
.pull-refresh.visible{opacity:1}
.pull-refresh.ready .pull-refresh-icon{transform:rotate(180deg)}
.pull-refresh.loading .pull-refresh-icon{
  animation:pull-spin .8s linear infinite;
}
.pull-refresh-icon{
  display:inline-flex;
  transition:transform .18s ease;
  font-size:1rem;
}
@keyframes pull-spin{to{transform:rotate(360deg)}}
.version-dialog-card{max-width:520px}
.version-summary{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.65rem;
  margin:1rem 0;
}
.version-summary>div{
  padding:.8rem;
  border:1px solid var(--line);
  border-radius:14px;
  background:#faf8f1;
}
.version-summary span,.version-summary strong{display:block}
.version-summary span{
  margin-bottom:.25rem;
  color:var(--muted);
  font-size:.72rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.version-summary strong{font-size:1rem;color:var(--forest)}
.update-status{
  padding:.75rem .85rem;
  border-radius:13px;
  background:#edf1eb;
  color:#405544;
  line-height:1.4;
}
.update-status.success{background:#e2eee2;color:#31573a}
.update-status.warning{background:#f4ead2;color:#72551e}
.update-status.error{background:#f5dfda;color:#7a382f}
.version-help{
  margin-top:1rem;
  color:var(--muted);
  font-size:.82rem;
  line-height:1.45;
}
@media(max-width:480px){
  .version-summary{grid-template-columns:1fr}
  .version-button{padding:.43rem .58rem}
}


/* V0.5.7 — Chronologie et Observatoire */
.timeline-group{
  margin:0 0 1.25rem;
}
.timeline-group-head{
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:.6rem;
  margin:.2rem 0 .65rem;
  padding-bottom:.45rem;
  border-bottom:1px solid var(--line);
}
.timeline-group-head h2{margin:0;font-family:Georgia,serif;font-size:1.22rem}
.timeline-group-head span{color:var(--muted);font-size:.78rem;font-weight:750}
.relative-date{
  display:inline-flex;
  padding:.24rem .5rem;
  border-radius:999px;
  background:#e6ede3;
  color:var(--forest);
  font-size:.72rem;
  font-weight:850;
}
.relative-date.past{background:#ece8e0;color:#6d665c}
.relative-date.today{background:#f1dfae;color:#684c12}
.relative-date.uncertain{background:#f1e3d5;color:#774b26}
.recurrence-note{
  display:block;
  margin-top:.3rem;
  color:var(--muted);
  font-size:.78rem;
}
.observatory-filters{
  display:flex;
  gap:.4rem;
  overflow:auto;
  margin-bottom:.8rem;
}
.observatory-filters button{
  white-space:nowrap;
  border:1px solid var(--line);
  border-radius:999px;
  background:white;
  padding:.55rem .72rem;
  color:var(--ink);
  font-weight:800;
}
.observatory-filters button.active{
  background:var(--forest);
  color:white;
  border-color:var(--forest);
}
.watch-table{display:grid;gap:.55rem}
.watch-row{
  display:grid;
  grid-template-columns:minmax(150px,1.2fr) minmax(110px,.7fr) minmax(70px,.35fr) minmax(170px,1.2fr);
  gap:.7rem;
  align-items:start;
  padding:.75rem;
  border:1px solid var(--line);
  border-radius:14px;
  background:#faf9f4;
}
.watch-row strong,.watch-row span,.watch-row small{display:block}
.watch-row small{color:var(--muted);line-height:1.35}
.watch-status{
  display:inline-flex!important;
  width:max-content;
  padding:.22rem .5rem;
  border-radius:999px;
  font-size:.7rem;
  font-weight:850;
}
.watch-status.to-search{background:#f2e6d0;color:#71501e}
.watch-status.partial{background:#e5ece2;color:#3f5b43}
.watch-status.documented{background:#dbeadd;color:#2f5738}
.source-count{font-weight:850;color:var(--forest)}
@media(max-width:720px){
  .watch-row{grid-template-columns:1fr 1fr}
}
@media(max-width:460px){
  .watch-row{grid-template-columns:1fr}
}


/* V0.6.0 — Saisons et accueil vivant */
:root{
  --season-accent:#b78432;
  --season-soft:#efe4cb;
  --season-deep:#31463a;
  --season-wash:#f7f1e4;
}
body.season-spring{
  --season-accent:#6f9168;
  --season-soft:#e3eddc;
  --season-deep:#39543d;
  --season-wash:#f1f6ed;
}
body.season-summer{
  --season-accent:#c18a35;
  --season-soft:#f3e6c4;
  --season-deep:#485b3f;
  --season-wash:#fbf5e8;
}
body.season-autumn{
  --season-accent:#a15f33;
  --season-soft:#efddce;
  --season-deep:#553f31;
  --season-wash:#f8efe7;
}
body.season-winter{
  --season-accent:#667f88;
  --season-soft:#dfe9eb;
  --season-deep:#334b53;
  --season-wash:#f0f5f6;
}
.season-hero{
  position:relative;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:1rem;
  align-items:center;
  padding:1.2rem;
  margin-bottom:1rem;
  border:1px solid color-mix(in srgb,var(--season-accent) 25%,var(--line));
  border-radius:25px;
  background:
    radial-gradient(circle at 92% 8%,color-mix(in srgb,var(--season-soft) 72%,transparent),transparent 42%),
    linear-gradient(145deg,var(--season-wash),var(--paper));
  box-shadow:var(--shadow);
  overflow:hidden;
}
.season-hero::after{
  content:"";
  position:absolute;
  right:-28px;
  bottom:-42px;
  width:145px;height:145px;
  border:1px solid color-mix(in srgb,var(--season-accent) 24%,transparent);
  border-radius:50%;
}
.season-hero h1{
  margin:.16rem 0 .45rem;
  font-family:Georgia,serif;
  font-size:clamp(1.65rem,4vw,2.55rem);
  line-height:1.07;
  color:var(--season-deep);
}
.season-hero p{margin:.2rem 0;max-width:730px;color:var(--muted);line-height:1.48}
.season-ornament{
  display:flex;
  align-items:center;
  justify-content:center;
  width:66px;height:66px;
  border-radius:50% 50% 50% 18%;
  transform:rotate(-12deg);
  background:var(--season-soft);
  color:var(--season-deep);
  font-size:2rem;
}
.season-ornament span{transform:rotate(12deg)}
.weekend-dashboard{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) repeat(3,minmax(110px,.55fr));
  gap:.7rem;
  margin-bottom:1rem;
}
.weekend-lead,.weekend-stat{
  padding:1rem;
  border:1px solid var(--line);
  border-radius:19px;
  background:var(--paper);
  box-shadow:var(--shadow);
}
.weekend-lead{
  background:linear-gradient(145deg,var(--season-deep),color-mix(in srgb,var(--season-deep) 78%,#000));
  color:white;
}
.weekend-lead .kicker{color:rgba(255,255,255,.7)}
.weekend-lead h2{margin:.25rem 0 .35rem;font-family:Georgia,serif}
.weekend-lead p{margin:.2rem 0;color:rgba(255,255,255,.82)}
.weekend-lead button{
  margin-top:.65rem;
  border:1px solid rgba(255,255,255,.4);
  border-radius:999px;
  background:rgba(255,255,255,.1);
  color:white;
  padding:.58rem .75rem;
  font-weight:800;
}
.weekend-stat strong,.weekend-stat span{display:block}
.weekend-stat strong{
  font-family:Georgia,serif;
  font-size:1.7rem;
  color:var(--season-deep);
}
.weekend-stat span{
  margin-top:.2rem;
  color:var(--muted);
  font-size:.78rem;
  line-height:1.3;
}
.editorial-pick-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:1rem;
  align-items:center;
  padding:1rem;
  border:1px solid color-mix(in srgb,var(--season-accent) 28%,var(--line));
  border-radius:20px;
  background:linear-gradient(145deg,var(--paper),var(--season-wash));
}
.editorial-pick-card h3{margin:.2rem 0;font-family:Georgia,serif;font-size:1.25rem}
.editorial-pick-card p{margin:.35rem 0;color:var(--muted);line-height:1.45}
.editorial-pick-card button{
  border:0;
  border-radius:999px;
  padding:.7rem .85rem;
  background:var(--season-deep);
  color:white;
  font-weight:800;
}
.season-metrics{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:.65rem;
}
.season-metric{
  padding:.9rem;
  border:1px solid var(--line);
  border-radius:17px;
  background:var(--paper);
}
.season-metric strong,.season-metric span{display:block}
.season-metric strong{
  font-family:Georgia,serif;
  font-size:1.45rem;
  color:var(--season-deep);
}
.season-metric span{
  margin-top:.2rem;
  color:var(--muted);
  font-size:.76rem;
  line-height:1.3;
}
@media(max-width:760px){
  .weekend-dashboard{grid-template-columns:repeat(3,1fr)}
  .weekend-lead{grid-column:1/-1}
}
@media(max-width:560px){
  .season-hero{grid-template-columns:1fr}
  .season-ornament{width:54px;height:54px;font-size:1.55rem}
  .weekend-dashboard{grid-template-columns:1fr 1fr}
  .weekend-lead{grid-column:1/-1}
  .editorial-pick-card{grid-template-columns:1fr}
  .season-metrics{grid-template-columns:1fr 1fr}
}


/* V0.6.1 — Corrections iPhone et collection Personnes/Lieux */
.screen{
  scroll-margin-top:calc(92px + env(safe-area-inset-top));
}
main{
  padding-top:1rem;
}
.topbar{
  position:sticky;
  top:0;
  z-index:1000;
}
dialog{
  padding:0;
  max-height:100dvh;
  overflow:hidden;
}
.dialog-shell,
.dialog-card{
  position:relative;
  width:min(92vw,720px);
  max-width:720px;
  max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 28px);
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding:3.8rem 1rem 1.25rem;
  margin:auto;
  border-radius:24px;
}
.close-dialog,
.dialog-card .close,
.dialog-shell .close{
  position:sticky;
  top:.35rem;
  z-index:20;
  float:right;
  width:44px;
  height:44px;
  margin:-3.25rem 0 .5rem;
  border-radius:50%;
  background:#f3f3f1;
  box-shadow:0 2px 9px rgba(0,0,0,.12);
}
.expedition-dialog-shell{
  padding-top:3.8rem;
}
#expeditionContent h2,
#detailContent h2{
  margin-top:.2rem;
}
.person-card,.venue-card{
  padding:1rem;
  border:1px solid var(--line);
  border-radius:20px;
  background:var(--paper);
  box-shadow:var(--shadow);
}
.person-card h2,.venue-card h2{margin:.2rem 0}
.contact-list{display:grid;gap:.4rem;margin-top:.7rem}
.contact-list a{word-break:break-word}
@media(max-width:520px){
  .dialog-shell,
  .dialog-card{
    width:calc(100vw - 18px);
    max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 12px);
    border-radius:22px;
    padding-left:.9rem;
    padding-right:.9rem;
  }
}


/* V0.6.2 — Graphe du Terrier */
.notice-breadcrumb{
  display:flex;
  flex-wrap:wrap;
  gap:.3rem;
  align-items:center;
  margin:0 0 .75rem;
  color:var(--muted);
  font-size:.75rem;
}
.notice-breadcrumb button{
  border:0;
  background:transparent;
  color:var(--forest);
  padding:0;
  font-weight:800;
}
.document-panel{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.5rem;
  margin:.8rem 0 1rem;
}
.document-stat{
  padding:.65rem;
  border:1px solid var(--line);
  border-radius:13px;
  background:#faf8f1;
}
.document-stat span,.document-stat strong{display:block}
.document-stat span{font-size:.67rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);font-weight:800}
.document-stat strong{margin-top:.18rem;color:var(--forest);font-size:.9rem}
.completeness-bar{
  height:8px;
  margin-top:.4rem;
  border-radius:999px;
  background:#e6e3da;
  overflow:hidden;
}
.completeness-bar i{
  display:block;
  height:100%;
  background:var(--season-accent,var(--forest));
  border-radius:inherit;
}
.explore-around{
  margin:1rem 0;
  padding:1rem;
  border:1px solid color-mix(in srgb,var(--season-accent) 25%,var(--line));
  border-radius:20px;
  background:linear-gradient(145deg,var(--paper),var(--season-wash,#f8f4e9));
}
.explore-around h3{margin:.1rem 0 .65rem;font-family:Georgia,serif}
.relation-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.5rem;
}
.relation-card{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  min-height:86px;
  padding:.7rem;
  border:1px solid var(--line);
  border-radius:14px;
  background:white;
  color:var(--ink);
  text-align:left;
}
.relation-card small{color:var(--muted);margin-bottom:.25rem}
.relation-card b{line-height:1.2}
.seed-card{
  padding:1rem;
  border:1px dashed var(--season-accent,var(--line));
  border-radius:20px;
  background:var(--season-wash,#faf8f1);
}
.seed-card h2{margin:.25rem 0}
.field-mission{
  margin:1rem 0;
  padding:1rem;
  border-radius:18px;
  background:#edf1eb;
}
.field-mission h3{margin:.1rem 0 .5rem}
.field-mission ul{margin:.3rem 0;padding-left:1.1rem}
.presence-button{
  width:100%;
  margin:.8rem 0;
  border:0;
  border-radius:16px;
  padding:.9rem 1rem;
  background:var(--forest);
  color:white;
  font-size:1rem;
  font-weight:900;
}
@media(max-width:520px){
  .document-panel{grid-template-columns:1fr}
  .relation-grid{grid-template-columns:1fr}
}


/* V0.6.2.1 — Polissage graphique */
:root{
  --control-height:44px;
  --control-radius:14px;
  --control-font-size:.92rem;
  --space-1:8px;
  --space-2:16px;
  --space-3:24px;
  --space-4:32px;
}

button,
.button,
.primary,
.secondary,
.calendar-inline,
.notice-actions a,
.expedition-actions a,
.expedition-actions button{
  min-height:var(--control-height);
  border-radius:var(--control-radius);
  padding:.68rem 1rem;
  font-size:var(--control-font-size);
  line-height:1.05;
  font-weight:800;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.45rem;
  box-sizing:border-box;
}

.relative-date,
.badge,
.local-gem-badge,
.exp-status,
.watch-status{
  min-height:34px;
  padding:.45rem .72rem;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  line-height:1;
  font-size:.8rem;
  font-weight:850;
}

.soon-panel .relative-date + button,
.mini-card .relative-date + button{
  margin-left:.6rem;
}

.notice-actions,
.expedition-actions,
.row-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.65rem;
  align-items:center;
}

dialog{
  width:min(96vw,1040px);
  max-width:none;
  max-height:94dvh;
  overflow:hidden;
  border:0;
  padding:0;
  border-radius:26px;
}

.dialog-shell,
.dialog-card{
  width:100%;
  max-width:none;
  max-height:94dvh;
  overflow:auto;
  padding:40px 32px 32px;
  border-radius:26px;
  box-sizing:border-box;
}

.close-dialog,
.dialog-card .close,
.dialog-shell .close{
  position:absolute;
  top:18px;
  right:18px;
  float:none;
  margin:0;
  width:46px;
  height:46px;
  min-width:46px;
  min-height:46px;
  border-radius:50%;
  z-index:30;
}

.expedition-dialog-shell{
  width:min(96vw,1180px);
  max-width:none;
  padding:40px 32px 32px;
}

.expedition-form{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:24px;
}

.expedition-form > label,
.expedition-form > fieldset{
  min-width:0;
}

.expedition-form textarea,
.expedition-form input,
.expedition-form select{
  min-height:46px;
  font-size:1rem;
  line-height:1.4;
}

.expedition-form textarea{
  min-height:120px;
}

.fieldset{
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  min-width:0;
}

.fieldset legend{
  padding:0 .45rem;
  font-weight:850;
  color:var(--forest);
}

.stop-picker{
  max-height:360px;
}

.stop-picker label,
.mission-option,
.quick-check{
  align-items:flex-start;
  gap:.7rem;
}

.stop-picker input,
.mission-option input,
.quick-check input{
  flex:0 0 auto;
  width:20px;
  height:20px;
  margin-top:.15rem;
}

.stop-picker span,
.mission-option span,
.quick-check span{
  min-width:0;
  overflow-wrap:anywhere;
}

.mission-grid,
.quick-checks{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

#expeditionContent > .expedition-actions{
  position:sticky;
  bottom:-1px;
  margin:24px -32px -32px;
  padding:16px 32px;
  background:rgba(255,253,247,.96);
  backdrop-filter:blur(12px);
  border-top:1px solid var(--line);
  z-index:20;
}

#atlasMap,
.atlas-map{
  width:100%;
  min-height:540px;
  height:min(68dvh,760px);
  border-radius:20px;
  overflow:hidden;
  position:relative;
}

.leaflet-container{
  width:100% !important;
  height:100% !important;
  min-height:540px;
  background:#dfe8df;
}

@media(max-width:720px){
  dialog{
    width:100vw;
    max-height:100dvh;
    border-radius:0;
  }
  .dialog-shell,
  .dialog-card,
  .expedition-dialog-shell{
    width:100%;
    max-height:100dvh;
    border-radius:0;
    padding:72px 18px 24px;
  }
  .close-dialog,
  .dialog-card .close,
  .dialog-shell .close{
    top:14px;
    right:14px;
  }
  .expedition-form{
    grid-template-columns:1fr;
    gap:18px;
  }
  .mission-grid,
  .quick-checks{
    grid-template-columns:1fr;
  }
  #expeditionContent > .expedition-actions{
    margin:24px -18px -24px;
    padding:14px 18px calc(14px + env(safe-area-inset-bottom));
  }
  #atlasMap,
  .atlas-map,
  .leaflet-container{
    min-height:460px;
    height:62dvh;
  }
}


/* V0.6.2.2 — Finition visuelle */
:root{
  --forest:#173f31;
  --forest-2:#275844;
  --moss:#6f9868;
  --lichen:#a9bea4;
  --argile:#b96f43;
  --lin:#f3ead8;
  --brume:#eef2ef;
  --gold:#f1bf4a;
  --ink:#183328;
  --muted:#6e7d75;
  --line:#d8d2c5;
  --paper:#fffdf8;
}

/* Éliminer les débordements horizontaux */
html,body{
  max-width:100%;
  overflow-x:hidden;
}
.screen,
.home-actions,
.horizontal-cards,
.card-grid,
.atlas-shell,
.paper-panel,
.notice-card{
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
.horizontal-cards{
  overflow-x:auto;
  overflow-y:hidden;
  padding-right:12px;
  scrollbar-width:none;
}
.horizontal-cards::-webkit-scrollbar{display:none}

/* Boutons : palette naturelle, sans gris massif */
button,
.button,
.secondary,
.calendar-inline,
.notice-actions a,
.expedition-actions a,
.expedition-actions button{
  background:var(--paper);
  color:var(--forest);
  border:1px solid color-mix(in srgb,var(--forest) 36%,var(--line));
  box-shadow:none;
  transition:background .16s ease,color .16s ease,border-color .16s ease,transform .12s ease;
}
button:hover,
.button:hover,
.secondary:hover,
.calendar-inline:hover,
.notice-actions a:hover,
.expedition-actions a:hover,
.expedition-actions button:hover{
  background:var(--brume);
  border-color:var(--forest-2);
}
button:active,
.button:active{transform:translateY(1px)}

.primary,
.presence-button,
#saveExpedition{
  background:var(--forest);
  color:white;
  border-color:var(--forest);
}
.primary:hover,
.presence-button:hover,
#saveExpedition:hover{
  background:var(--forest-2);
  color:white;
}

/* Boutons Voir */
.mini-card button,
[data-mini],
[data-open]:not(.primary){
  background:transparent;
  color:var(--forest);
  border:1px solid var(--forest-2);
  min-width:74px;
  position:relative;
}
.mini-card button::after,
[data-mini]::after{
  content:"›";
  font-size:1.15em;
  line-height:1;
  margin-left:.25rem;
}

/* Favoris : bouton léger et coloré */
.favorite-button,
.fav{
  width:44px;
  min-width:44px;
  height:44px;
  min-height:44px;
  padding:0;
  border-radius:50%;
  background:#fff8e7;
  color:#c18416;
  border:1px solid #e9c86a;
  font-size:1.35rem;
  box-shadow:none;
}
.favorite-button:hover,
.fav:hover{
  background:#fff1bf;
  color:#9b6810;
}
.favorite-button[data-active="true"],
.fav.active{
  background:var(--gold);
  color:var(--forest);
}

/* Cartes de raccourcis plus aérées */
.home-actions{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
}
.home-actions button{
  min-height:150px;
  padding:22px;
  align-items:flex-start;
  justify-content:flex-start;
  text-align:left;
  background:var(--paper);
}
.home-actions button span{font-size:1.8rem}
.home-actions button b{font-size:1.06rem;line-height:1.15}
.home-actions button small{color:var(--muted);line-height:1.35}

/* Fermeture légère, fixe dans la fenêtre */
dialog{
  position:fixed;
  inset:0;
  margin:auto;
}
.close-dialog,
.dialog-card .close,
.dialog-shell .close{
  position:fixed;
  top:max(18px,calc(env(safe-area-inset-top) + 10px));
  right:max(18px,calc(env(safe-area-inset-right) + 10px));
  width:42px;
  height:42px;
  min-width:42px;
  min-height:42px;
  padding:0;
  background:rgba(255,253,248,.92);
  color:var(--forest);
  border:1px solid rgba(23,63,49,.22);
  box-shadow:0 4px 14px rgba(25,48,38,.12);
  backdrop-filter:blur(10px);
  font-size:1.2rem;
  font-weight:700;
  z-index:9999;
}
.close-dialog:hover,
.dialog-card .close:hover,
.dialog-shell .close:hover{
  background:white;
  border-color:var(--forest);
}

/* Modale : respiration et contenu intégral */
.dialog-shell,
.dialog-card,
.expedition-dialog-shell{
  padding-top:56px;
}
#detailContent,
#expeditionContent{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}
#detailContent > *,
#expeditionContent > *{
  max-width:100%;
  box-sizing:border-box;
}

/* Mode terrain : cartes claires, sections distinctes */
.expedition-form{
  align-items:start;
}
.expedition-form > label,
.expedition-form > fieldset{
  background:var(--paper);
  border-radius:18px;
}
.expedition-form > label{
  padding:0;
}
.expedition-form label > span{
  color:var(--forest);
}
.fieldset{
  background:#fffdf8;
  border-color:#ddd4c3;
}
.stop-picker,
.mission-option,
.quick-check{
  background:#fffdf8;
}
.stop-picker label,
.mission-option,
.quick-check{
  border:1px solid #e2dacb;
  border-radius:13px;
  padding:12px;
}
.stop-picker label:hover,
.mission-option:hover,
.quick-check:hover{
  background:#f6f1e5;
}
#expeditionContent > .expedition-actions{
  display:flex;
  justify-content:flex-end;
  gap:12px;
}
#completeExpedition{
  color:#7d4d28;
  border-color:#c99d75;
}
#addFindFromExp{
  color:var(--forest);
  border-color:var(--moss);
}

/* Atlas : conteneur strict, pas de transformation CSS héritée */
#atlasMap{
  contain:layout paint size;
  isolation:isolate;
}
#atlasMap .leaflet-map-pane,
#atlasMap .leaflet-tile-pane,
#atlasMap .leaflet-overlay-pane,
#atlasMap .leaflet-marker-pane,
#atlasMap .leaflet-shadow-pane{
  will-change:transform;
}
#atlasMap .leaflet-tile{
  max-width:none !important;
  max-height:none !important;
  image-rendering:auto;
}
#atlasMap img{
  max-width:none !important;
}

/* Badges plus chaleureux */
.badge{
  background:#e4efe1;
  color:var(--forest);
  border:1px solid #c9ddc4;
}
.relative-date.today{
  background:#f7dda1;
  color:#684708;
  border-color:#e4bd5a;
}
.local-gem-badge{
  background:#f6e5c8;
  color:#7b4b18;
  border-color:#e0bd85;
}

@media(max-width:980px){
  .home-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:620px){
  .home-actions{grid-template-columns:1fr}
  .home-actions button{min-height:112px}
  .close-dialog,
  .dialog-card .close,
  .dialog-shell .close{
    top:max(12px,calc(env(safe-area-inset-top) + 6px));
    right:12px;
  }
}

/* V0.6.2.3 — UX Foundation */
:root{--ui-forest:#123b2d;--ui-forest2:#2e654d;--ui-linen:#fffdf8;--ui-bg:#faf6ed;--ui-line:#d9d1c2;--ui-muted:#6d7d75;--ui-gold:#f2c458;--ui-radius:18px;--ui-control:46px;--ui-max:1540px}
html,body{overflow-x:hidden}body{background:var(--ui-bg)}main{width:min(calc(100% - 32px),var(--ui-max));max-width:var(--ui-max);margin-inline:auto}.screen{width:100%;min-width:0}
button,.button,.notice-actions a{box-sizing:border-box;min-height:var(--ui-control);padding:0 18px;border-radius:14px;border:1px solid var(--ui-line);font:800 .94rem/1 system-ui,-apple-system,sans-serif;display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;box-shadow:none!important;text-decoration:none}.button-primary,.primary{background:var(--ui-forest)!important;color:#fff!important;border-color:var(--ui-forest)!important}.button-secondary,.secondary,.calendar-inline,.notice-actions a{background:var(--ui-linen)!important;color:var(--ui-forest)!important;border-color:var(--ui-forest2)!important}.button-on-dark{background:rgba(255,255,255,.08)!important;color:#fff!important;border-color:rgba(255,255,255,.45)!important}.button-danger-quiet{color:#9a563c!important;background:var(--ui-linen)!important;border-color:#d8a48f!important}button.compact{min-height:40px;padding-inline:16px}
.badge,.relative-date,.local-gem-badge,.tag,.notice-meta span{box-sizing:border-box;min-height:32px;margin:0;padding:7px 12px;display:inline-flex;align-items:center;border-radius:999px;font:800 .78rem/1.1 system-ui,-apple-system,sans-serif}.relative-date.today{margin-top:8px}.notice-meta{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
input,select,textarea{width:100%;max-width:100%;box-sizing:border-box;min-height:var(--ui-control);border:1px solid var(--ui-line);border-radius:14px;background:var(--ui-linen);padding:11px 14px;font:500 1rem/1.45 system-ui,-apple-system,sans-serif}select{appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--ui-forest2) 50%),linear-gradient(135deg,var(--ui-forest2) 50%,transparent 50%);background-position:calc(100% - 19px) 20px,calc(100% - 14px) 20px;background-size:5px 5px;background-repeat:no-repeat;padding-right:42px}label>span,.field>span{display:block;margin-bottom:8px;color:var(--ui-forest);font-weight:800}
@media(min-width:1100px){#homeView{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:24px;align-items:start}#homeView>.season-hero{grid-column:1/9;grid-row:1}#homeView>#weekendDashboard{grid-column:9/13;grid-row:1/3;display:grid;grid-template-columns:1fr 1fr}#homeView>#soonPanel{grid-column:1/9;grid-row:2}#homeView>.home-actions{grid-column:1/13;grid-row:3}#homeView>.editorial-pick{grid-column:1/6;grid-row:4}#homeView>.home-section:nth-of-type(5){grid-column:6/13;grid-row:4/6}#homeView>.home-section:nth-of-type(6){grid-column:1/6;grid-row:5}#homeView>.home-section:nth-of-type(7){grid-column:1/13;grid-row:6}.weekend-lead{grid-column:1/-1}}
.home-actions{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:18px!important}.home-actions button{min-width:0!important;min-height:142px!important;display:grid!important;grid-template-columns:auto 1fr!important;grid-template-rows:auto 1fr!important;gap:8px 14px!important;align-content:start!important;padding:22px!important;text-align:left!important;white-space:normal!important;overflow:hidden!important}.home-actions button>span{grid-row:1/3;font-size:1.8rem}.home-actions button>b{grid-column:2;font-size:1.05rem;line-height:1.18;overflow-wrap:anywhere}.home-actions button>small{grid-column:2;color:var(--ui-muted);line-height:1.35;overflow-wrap:anywhere}.soon-panel>.relative-date,.soon-panel>button{width:max-content}.soon-panel>button{margin-top:12px}
.notice-card,.mini-card,.collection-card,.person-card,.venue-card,.seed-card{min-width:0;overflow:hidden;border:1px solid var(--ui-line);border-radius:var(--ui-radius);background:var(--ui-linen)}.notice-card{display:flex!important;flex-direction:column!important;height:100%;padding:22px!important}.notice-card>.top{display:flex;gap:12px;justify-content:space-between;align-items:flex-start}.notice-card h2{overflow-wrap:anywhere}.notice-card>.notice-actions{margin-top:auto!important;padding-top:20px;display:flex;flex-direction:column;align-items:stretch;gap:10px}.notice-card>.notice-actions>*{width:100%}.favorite-button,.fav{flex:0 0 44px;width:44px!important;min-width:44px!important;height:44px!important;padding:0!important;border-radius:50%!important}
.library-filters{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:16px!important}#collectionGrid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:18px!important}.collection-card{min-height:148px!important;padding:22px!important;display:grid!important;grid-template-columns:auto 1fr!important;grid-template-rows:auto 1fr!important;gap:10px 14px!important;text-align:left!important;align-items:start!important;white-space:normal!important}.collection-card>span{grid-row:1/3;font-size:1.65rem}.collection-card>b{font-size:1.05rem;line-height:1.16;overflow-wrap:anywhere}.collection-card>small{color:var(--ui-muted);line-height:1.35;overflow-wrap:anywhere}.collection-card.active{background:#dfead9!important;border-color:var(--ui-forest2)!important}
#atlasList{display:block!important;width:100%}.timeline-group{display:block!important;width:100%;grid-column:1/-1!important;margin-bottom:34px}.atlas-event-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:stretch}@media(min-width:1500px){.atlas-event-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:1050px){.atlas-event-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:680px){.atlas-event-grid{grid-template-columns:1fr}}
#atlasMap{width:100%!important;height:clamp(480px,66vh,820px)!important;min-height:480px!important;display:block;position:relative;overflow:hidden;contain:layout paint;background:#dbe7dc}#atlasMap img.leaflet-tile{width:512px!important;height:512px!important;max-width:none!important;max-height:none!important}
.close-dialog,.dialog-card .close,.dialog-shell .close{position:fixed!important;top:max(14px,calc(env(safe-area-inset-top) + 8px))!important;right:max(14px,calc(env(safe-area-inset-right) + 8px))!important;width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;padding:0!important;border-radius:50%!important;background:rgba(255,253,248,.94)!important;color:var(--ui-forest)!important;border:1px solid rgba(18,59,45,.25)!important;box-shadow:0 5px 16px rgba(20,50,38,.12)!important;z-index:10000!important}
#expeditionDialog{width:min(96vw,1280px)!important;max-width:1280px!important;max-height:94vh!important}.expedition-dialog-shell{width:100%!important;max-width:none!important;height:min(94vh,980px);max-height:94vh!important;padding:0!important;overflow:hidden!important;display:flex;flex-direction:column}#expeditionContent{min-height:0;height:100%;display:flex;flex-direction:column}.workspace-header{padding:32px 34px 18px;flex:0 0 auto}.expedition-workspace{flex:1 1 auto;min-height:0;overflow:auto;padding:0 34px 30px;display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:20px;align-items:start}.workspace-card{min-width:0;padding:20px;border:1px solid var(--ui-line);border-radius:var(--ui-radius);background:var(--ui-linen)}.identity-card{grid-column:1/7}.stops-card{grid-column:7/13;grid-row:1/3}.missions-card{grid-column:1/7}.questions-card{grid-column:1/7}.terrain-card{grid-column:7/13}.notes-card{grid-column:1/13}.form-grid.two-columns{display:grid;grid-template-columns:1fr 220px;gap:14px}.field{display:block;margin-bottom:14px;min-width:0}.check-list,.check-grid{display:grid;gap:10px}.check-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.scroll-list{max-height:360px;overflow:auto;padding-right:6px}.check-card{min-width:0;padding:12px 14px;border:1px solid var(--ui-line);border-radius:13px;background:#fff;display:flex;align-items:flex-start;gap:11px}.check-card input{flex:0 0 auto;width:20px;height:20px;min-height:20px;margin-top:1px}.check-card span{min-width:0;line-height:1.25}.check-card small{display:block;margin-top:3px;color:var(--ui-muted)}.workspace-card-head{display:flex;justify-content:space-between;gap:14px;align-items:center}.workspace-actions{flex:0 0 auto;position:static!important;margin:0!important;padding:16px 34px calc(16px + env(safe-area-inset-bottom))!important;border-top:1px solid var(--ui-line);background:rgba(255,253,248,.98);display:flex!important;justify-content:flex-end!important;gap:10px!important}
@media(max-width:900px){.expedition-workspace{grid-template-columns:1fr;padding-inline:18px}.identity-card,.stops-card,.missions-card,.questions-card,.terrain-card,.notes-card{grid-column:1!important;grid-row:auto!important}.form-grid.two-columns{grid-template-columns:1fr}.workspace-header{padding:72px 18px 18px}.workspace-actions{padding-inline:18px!important;flex-wrap:wrap}}
@media(max-width:700px){main{width:min(calc(100% - 20px),var(--ui-max))}#homeView{display:block}#homeView>*{margin-bottom:18px}.home-actions{grid-template-columns:1fr!important}.library-filters,#collectionGrid{grid-template-columns:1fr!important}.check-grid{grid-template-columns:1fr}.workspace-actions>*{flex:1 1 100%}}


/* ================================================================
   V0.6.2.4 — STABILISATION ET CONTRÔLE QUALITÉ
   ================================================================ */
*,*::before,*::after{box-sizing:border-box}
img,svg,video,canvas{max-width:100%;height:auto}
p,h1,h2,h3,h4,small,b,strong,span{overflow-wrap:anywhere}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
button:disabled,.button:disabled{
  opacity:.5;
  cursor:not-allowed;
  filter:saturate(.55);
}

/* Éviter les règles historiques qui masqueraient le texte des actions. */
.button-on-dark,
.button-on-dark *{
  color:#fff!important;
  opacity:1!important;
  visibility:visible!important;
}
.soon-panel button,
.mini-card button{
  color:var(--ui-forest)!important;
}

/* Contrôles actifs et sélecteurs. */
select,
.exploration-select{
  font-weight:650;
}
select:hover,
input:hover,
textarea:hover{
  border-color:color-mix(in srgb,var(--ui-forest2) 55%,var(--ui-line));
}
select:focus,
input:focus,
textarea:focus{
  border-color:var(--ui-forest2);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--ui-gold) 38%,transparent);
}

/* Rythme vertical cohérent dans les notices. */
#detailContent>h3{
  margin-top:28px;
  margin-bottom:12px;
}
#detailContent>.relative-date{
  margin-top:12px;
  margin-bottom:4px;
}
#detailContent .notice-meta{
  margin-top:18px;
  margin-bottom:24px;
}

/* Les cartes n’étirent plus leur texte au-delà des limites. */
.home-actions button,
.collection-card,
.notice-card,
.mini-card{
  isolation:isolate;
}
.home-actions button>*,
.collection-card>*,
.notice-card>*,
.mini-card>*{
  min-width:0;
  max-width:100%;
}

/* Barre d’actions stable sur les cartes. */
.notice-actions{
  width:100%;
}
.notice-actions button,
.notice-actions a{
  min-width:0;
}
@media(min-width:760px){
  .notice-card .notice-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
  }
}

/* Animation sobre, désactivable. */
.screen.active{
  animation:terrier-enter .18s ease-out both;
}
.notice-card,
.collection-card,
.home-actions button,
.workspace-card{
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
@media(hover:hover){
  .notice-card:hover,
  .collection-card:hover,
  .home-actions button:hover{
    transform:translateY(-2px);
    box-shadow:0 12px 30px rgba(31,55,43,.09);
  }
}
@keyframes terrier-enter{
  from{opacity:.65;transform:translateY(4px)}
  to{opacity:1;transform:none}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{
    scroll-behavior:auto!important;
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}

/* Focus clavier visible et cohérent. */
:where(button,a,input,select,textarea,[tabindex]):focus-visible{
  outline:3px solid var(--ui-gold)!important;
  outline-offset:3px!important;
}

/* Panneau QA. */
.qa-panel{
  margin-top:24px;
  padding:20px;
  border:1px solid var(--ui-line);
  border-radius:var(--ui-radius);
  background:var(--ui-linen);
}
.qa-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.qa-panel-head h3{margin:.12rem 0 0}
.qa-summary{
  margin:16px 0;
  padding:14px 16px;
  border-radius:14px;
  background:#eef4ec;
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:16px;
}
.qa-summary strong{font-family:Georgia,serif;font-size:1.12rem}
.qa-summary span{color:var(--ui-muted);font-size:.84rem}
.qa-details{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.qa-item{
  min-width:0;
  padding:12px;
  border:1px solid var(--ui-line);
  border-radius:12px;
  background:#fff;
  display:flex;
  align-items:flex-start;
  gap:10px;
}
.qa-item .qa-dot{
  flex:0 0 10px;
  width:10px;
  height:10px;
  margin-top:5px;
  border-radius:50%;
  background:#71956b;
}
.qa-item.warning .qa-dot{background:#d2a13c}
.qa-item.fail .qa-dot{background:#aa5842}
.qa-item b,.qa-item small{display:block}
.qa-item small{
  margin-top:3px;
  color:var(--ui-muted);
  line-height:1.3;
}
.version-dialog-card{
  width:min(94vw,780px)!important;
}
@media(max-width:620px){
  .qa-panel-head,.qa-summary{
    align-items:stretch;
    flex-direction:column;
  }
  .qa-panel-head button{width:100%}
  .qa-details{grid-template-columns:1fr}
}

/* Garde-fous desktop : utilisation plus riche de la largeur. */
@media(min-width:1200px){
  #libraryView .library-search-panel{
    display:grid;
    grid-template-columns:2fr 1fr 1fr 1fr;
    gap:16px;
    align-items:end;
  }
  #libraryView .library-search-panel>label:first-child{
    grid-column:1/-1;
  }
  #observatoryView .observatory-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

/* La carte Leaflet ne doit jamais hériter de filtres ou de rayons d’image. */
#atlasMap .leaflet-tile,
#atlasMap .leaflet-marker-icon,
#atlasMap .leaflet-marker-shadow{
  border-radius:0!important;
  box-shadow:none!important;
  filter:none!important;
}
#atlasMap .leaflet-control{
  font-family:system-ui,-apple-system,sans-serif;
}


/* ================================================================
   V0.6.2.5 — NAVIGATION, CARTES ET MODALES
   ================================================================ */

/* Une seule vue peut être affichée.
   Les règles par identifiant de l’accueil ne doivent jamais vaincre .screen. */
.screen{
  display:none!important;
}
.screen.active{
  display:block!important;
}
@media(min-width:1100px){
  .screen.active#homeView{
    display:grid!important;
    grid-template-columns:repeat(12,minmax(0,1fr));
    gap:24px;
    align-items:start;
  }
}
@media(max-width:700px){
  .screen.active#homeView{
    display:block!important;
  }
}
.app-initializing .screen{
  visibility:hidden;
}

/* Navigation toujours interactive et au-dessus du contenu. */
.bottom-nav{
  z-index:500!important;
  pointer-events:auto;
}
.bottom-nav button{
  pointer-events:auto;
  min-width:0;
  min-height:54px;
}

/* Prochains rendez-vous :
   largeur utilisable, texte horizontal et défilement latéral prévisible. */
.horizontal-cards{
  display:flex!important;
  flex-wrap:nowrap!important;
  gap:14px!important;
  width:100%;
  max-width:100%;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scroll-snap-type:x proximity;
  scroll-padding-inline:2px;
  padding:2px 2px 14px!important;
}
.horizontal-cards>.mini-card{
  flex:0 0 clamp(220px,22vw,276px)!important;
  width:clamp(220px,22vw,276px)!important;
  min-width:220px!important;
  max-width:276px!important;
  scroll-snap-align:start;
  display:flex;
  flex-direction:column;
  padding:18px!important;
}
.horizontal-cards>.mini-card h3,
.horizontal-cards>.mini-card p,
.horizontal-cards>.mini-card b,
.horizontal-cards>.mini-card span{
  writing-mode:horizontal-tb!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
  white-space:normal!important;
}
.horizontal-cards>.mini-card h3{
  font-size:1.08rem;
  line-height:1.16;
}
.horizontal-cards>.mini-card button{
  margin-top:auto;
  align-self:flex-start;
}
@media(max-width:620px){
  .horizontal-cards{
    margin-inline:0;
    padding-right:18px!important;
  }
  .horizontal-cards>.mini-card{
    flex-basis:min(76vw,248px)!important;
    width:min(76vw,248px)!important;
    min-width:min(76vw,248px)!important;
    max-width:248px!important;
  }
}
@media(min-width:1500px){
  .horizontal-cards>.mini-card{
    flex-basis:240px!important;
    width:240px!important;
    min-width:240px!important;
    max-width:240px!important;
  }
}

/* Fenêtres : la fermeture reste dans le cadre de la notice,
   tandis que seul le contenu défile. */
dialog{
  overflow:hidden!important;
}
.dialog-card,
.dialog-shell,
.expedition-dialog-shell{
  position:relative!important;
}
#detailDialog .dialog-card{
  height:min(92dvh,960px);
  max-height:92dvh!important;
  padding:0!important;
  display:flex;
  flex-direction:column;
  overflow:hidden!important;
}
#detailContent{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:58px 32px 32px;
}
#detailDialog .close,
#expeditionDialog .close-dialog,
#versionDialog .close{
  position:absolute!important;
  top:16px!important;
  right:16px!important;
  left:auto!important;
  margin:0!important;
  z-index:40!important;
}
#expeditionDialog .expedition-dialog-shell{
  position:relative!important;
}
@media(max-width:720px){
  #detailDialog .dialog-card{
    height:100dvh;
    max-height:100dvh!important;
  }
  #detailContent{
    padding:68px 18px calc(92px + env(safe-area-inset-bottom));
  }
  #detailDialog .close,
  #expeditionDialog .close-dialog,
  #versionDialog .close{
    top:calc(12px + env(safe-area-inset-top))!important;
    right:14px!important;
  }
}

/* Action principale persistante dans les notices d’événement. */
#detailContent .presence-button{
  position:sticky;
  bottom:-1px;
  z-index:25;
  width:calc(100% + 64px);
  margin:28px -32px -32px;
  min-height:58px;
  border-radius:0 0 24px 24px;
  box-shadow:0 -8px 22px rgba(21,52,40,.1)!important;
}
@media(max-width:720px){
  #detailContent .presence-button{
    width:calc(100% + 36px);
    margin:28px -18px calc(-92px - env(safe-area-inset-bottom));
    padding-bottom:env(safe-area-inset-bottom);
    min-height:calc(62px + env(safe-area-inset-bottom));
    border-radius:0;
  }
}

/* Les cartes éditoriales et statistiques ne réduisent pas les rendez-vous. */
@media(min-width:1100px){
  .screen.active#homeView>.home-section{
    min-width:0;
  }
  .screen.active#homeView .horizontal-cards{
    min-width:0;
  }
}

/* Audit : les défilements horizontaux intentionnels ne sont pas des erreurs. */
.horizontal-cards,
.horizontal-cards *{
  max-height:none;
}


/* V0.6.2.6 — Diagnostic et mise à jour */
#hardRefreshBtn{
  margin-left:auto;
}
.version-actions,
.dialog-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
html[data-terrier-version]::after{
  content:attr(data-terrier-build);
  position:fixed;
  left:8px;
  bottom:calc(76px + env(safe-area-inset-bottom));
  z-index:2;
  padding:3px 7px;
  border-radius:999px;
  background:rgba(255,253,248,.72);
  color:rgba(18,59,45,.48);
  font:600 9px/1 system-ui,-apple-system,sans-serif;
  pointer-events:none;
  opacity:.55;
}
@media(max-width:620px){
  #hardRefreshBtn{width:100%;margin-left:0}
  html[data-terrier-version]::after{display:none}
}

/* V0.6.2.8 — Stabilisation Leaflet / MapTiler */
#atlasMap{position:relative!important;width:100%!important;height:clamp(500px,68vh,820px)!important;min-height:500px!important;overflow:hidden!important;contain:layout paint!important;transform:none!important}
#atlasMap .leaflet-container{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;overflow:hidden!important;background:#dbe7dc!important}
#atlasMap .leaflet-map-pane,#atlasMap .leaflet-tile-pane,#atlasMap .leaflet-overlay-pane,#atlasMap .leaflet-shadow-pane,#atlasMap .leaflet-marker-pane{width:auto!important;height:auto!important;max-width:none!important;max-height:none!important}
#atlasMap img.leaflet-tile{width:256px!important;height:256px!important;min-width:256px!important;min-height:256px!important;max-width:none!important;max-height:none!important;object-fit:fill!important;border:0!important;border-radius:0!important;box-shadow:none!important;filter:none!important}
#atlasMap .leaflet-tile-container{pointer-events:none}
#atlasMap .leaflet-control-container{position:relative;z-index:800}
@media(max-width:720px){#atlasMap{height:62dvh!important;min-height:460px!important}}


/* ================================================================
   V0.6.2.9 — GÉOMÉTRIE NATIVE DES TUILES LEAFLET
   ================================================================ */

/*
 * Leaflet positionne maintenant des tuiles de 256 × 256 px et MapTiler
 * fournit exactement ce format. Aucun redimensionnement Retina ou CSS
 * supplémentaire n'est appliqué.
 */
#atlasMap img.leaflet-tile{
  width:256px!important;
  height:256px!important;
  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  padding:0!important;
  margin:0!important;
  transform-origin:0 0!important;
}
#atlasMap .leaflet-tile-container{
  width:auto!important;
  height:auto!important;
  transform-origin:0 0!important;
}
#atlasMap .leaflet-pane,
#atlasMap .leaflet-map-pane,
#atlasMap .leaflet-tile-pane{
  transform-origin:0 0!important;
}

/* Empêcher les transitions globales de perturber les translations Leaflet. */
#atlasMap *,
#atlasMap *::before,
#atlasMap *::after{
  transition:none!important;
  animation:none!important;
}


/* ================================================================
   V0.6.3.0 — INTÉGRATION LEAFLET PROPRE
   Cette couche annule les anciennes surcharges cartographiques.
   ================================================================ */

#atlasMap{
  display:block!important;
  position:relative!important;
  width:100%!important;
  height:clamp(500px,68dvh,820px)!important;
  min-height:500px!important;
  overflow:hidden!important;
  contain:none!important;
  isolation:auto!important;
  transform:none!important;
  background:#dbe7dc!important;
}

/* Leaflet gère seul la position et les dimensions de ses éléments. */
#atlasMap.leaflet-container{
  position:relative!important;
  inset:auto!important;
  width:100%!important;
  height:clamp(500px,68dvh,820px)!important;
  min-height:500px!important;
  overflow:hidden!important;
}

#atlasMap .leaflet-pane,
#atlasMap .leaflet-map-pane,
#atlasMap .leaflet-tile-pane,
#atlasMap .leaflet-overlay-pane,
#atlasMap .leaflet-shadow-pane,
#atlasMap .leaflet-marker-pane,
#atlasMap .leaflet-tooltip-pane,
#atlasMap .leaflet-popup-pane,
#atlasMap .leaflet-tile-container{
  width:auto!important;
  height:auto!important;
  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  transform-origin:0 0!important;
}

#atlasMap img.leaflet-tile{
  width:256px!important;
  height:256px!important;
  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  object-fit:fill!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  filter:none!important;
}

#atlasMap .leaflet-control-container,
#atlasMap .leaflet-control{
  position:relative;
  z-index:800;
}

/* Aucun effet applicatif global dans le moteur cartographique. */
#atlasMap .leaflet-pane *,
#atlasMap .leaflet-control-container *{
  animation:none!important;
  transition:none!important;
}

@media(max-width:720px){
  #atlasMap,
  #atlasMap.leaflet-container{
    height:62dvh!important;
    min-height:460px!important;
  }
}


/* ================================================================
   V0.6.3.1 — ATLAS VECTORIEL MAPLIBRE
   ================================================================ */
#atlasMap{
  position:relative!important;
  width:100%!important;
  height:clamp(520px,68dvh,840px)!important;
  min-height:520px!important;
  overflow:hidden!important;
  contain:layout paint!important;
  background:#dbe7dc!important;
}

#atlasMap.maplibregl-map{
  font:inherit;
}

#atlasMap .maplibregl-canvas-container,
#atlasMap .maplibregl-canvas{
  width:100%!important;
  height:100%!important;
}

#atlasMap .maplibregl-canvas{
  position:absolute!important;
  inset:0!important;
  max-width:none!important;
  border-radius:0!important;
}

#atlasMap .maplibregl-control-container{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:20;
}

#atlasMap .maplibregl-ctrl{
  pointer-events:auto;
}

#atlasMap .maplibregl-ctrl-group{
  border-radius:13px;
  overflow:hidden;
  box-shadow:0 6px 20px rgba(22,54,42,.16);
}

#atlasMap .maplibregl-ctrl button{
  min-height:38px;
  width:38px;
  padding:0;
  border:0;
  border-radius:0;
  background-color:#fffdf8;
}

#atlasMap .maplibregl-popup{
  z-index:40;
}

#atlasMap .maplibregl-popup-content{
  min-width:min(310px,78vw);
  padding:18px;
  border-radius:18px;
  background:#fffdf8;
  color:#173429;
  box-shadow:0 18px 48px rgba(18,50,38,.22);
}

#atlasMap .maplibregl-popup-close-button{
  width:36px;
  height:36px;
  min-height:36px;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:#173f31;
  font-size:1.3rem;
}

#atlasMap .maplibregl-popup-tip{
  border-top-color:#fffdf8!important;
  border-bottom-color:#fffdf8!important;
}

.map-popup-vector h3{
  margin:.35rem 2rem .55rem 0;
  font-family:Georgia,serif;
  font-size:1.18rem;
  line-height:1.18;
}

.map-popup-vector p{
  margin:.45rem 0 .9rem;
  color:#52665c;
  line-height:1.4;
}

.map-popup-vector .map-kind{
  color:#a36824;
  font-size:.72rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.map-popup-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.map-popup-actions .button,
.map-popup-vector>.button{
  min-height:40px;
  font-size:.84rem;
}

.maplibre-user-location{
  width:18px;
  height:18px;
  border:3px solid #fff;
  border-radius:50%;
  background:#2876d2;
  box-shadow:0 2px 10px rgba(0,0,0,.28);
}

.map-error{
  padding:24px;
  color:#8c3f31;
  font-weight:800;
}

@media(max-width:720px){
  #atlasMap{
    height:62dvh!important;
    min-height:480px!important;
  }
}

/* Neutralisation explicite des anciennes règles Leaflet. */
#atlasMap .leaflet-pane,
#atlasMap .leaflet-map-pane,
#atlasMap .leaflet-tile,
#atlasMap .leaflet-control-container{
  display:none!important;
}


/* ================================================================
   V0.6.3.2 — EN-TÊTE BUREAU, NAVIGATION ET LISIBILITÉ
   ================================================================ */

.sr-only{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

/* Action sur fond sombre : contraste garanti. */
.soon-panel .button-on-dark,
.soon-panel button.button-on-dark,
.button-on-dark{
  background:#fffdf8!important;
  color:#123b2d!important;
  border-color:rgba(255,255,255,.88)!important;
  box-shadow:0 5px 18px rgba(0,0,0,.14)!important;
  opacity:1!important;
}
.soon-panel .button-on-dark *,
.soon-panel button.button-on-dark *,
.button-on-dark *{
  color:#123b2d!important;
  opacity:1!important;
}
.soon-panel .button-on-dark:hover,
.button-on-dark:hover{
  background:#f5dfab!important;
  color:#4e3708!important;
  border-color:#f5dfab!important;
  transform:translateY(-1px);
}
.soon-panel .button-on-dark:focus-visible,
.button-on-dark:focus-visible{
  outline-color:#f2c458!important;
}

/* En-tête commun. */
.topbar{
  position:sticky;
  top:0;
  z-index:1200;
  width:100%;
  min-height:72px;
  padding:10px max(18px,calc((100vw - var(--ui-page-max))/2));
  display:flex;
  align-items:center;
  gap:18px;
  background:rgba(250,246,237,.96);
  border-bottom:1px solid rgba(40,65,51,.12);
  backdrop-filter:blur(18px) saturate(1.1);
  transition:min-height .18s ease,padding .18s ease,box-shadow .18s ease,background .18s ease;
}
.topbar.is-compact{
  min-height:58px;
  padding-top:6px;
  padding-bottom:6px;
  background:rgba(250,246,237,.985);
  box-shadow:0 8px 28px rgba(28,50,39,.10);
}

.brand{
  flex:0 0 auto;
  min-height:48px;
  padding:6px 10px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  border:0!important;
  background:transparent!important;
  color:#123b2d!important;
  text-align:left;
}
.brand:hover{background:rgba(223,234,217,.5)!important}
.brand-mark{
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:12px;
  background:#e4efe1;
  font-size:1.2rem;
}
.brand-copy{
  display:flex;
  flex-direction:column;
  gap:1px;
}
.brand-copy b{
  font-size:.98rem;
  line-height:1.05;
}
.brand-copy small{
  color:#6d7d75;
  font-size:.7rem;
  line-height:1.05;
}
.topbar.is-compact .brand-copy small{display:none}

.desktop-nav{
  flex:0 1 auto;
  display:flex;
  align-items:center;
  gap:4px;
}
.desktop-nav button{
  min-height:42px;
  padding:0 13px;
  border:1px solid transparent;
  border-radius:12px;
  background:transparent;
  color:#40584c;
  font-size:.84rem;
  font-weight:800;
}
.desktop-nav button span{font-size:1rem}
.desktop-nav button:hover{
  background:#edf2e9;
  color:#123b2d;
}
.desktop-nav button.active{
  background:#173f31;
  color:#fff;
  border-color:#173f31;
}

.desktop-global-search{
  flex:1 1 260px;
  max-width:360px;
  min-width:190px;
  height:44px;
  margin-left:auto;
  padding:0 6px 0 13px;
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid rgba(38,79,60,.2);
  border-radius:14px;
  background:#fffdf8;
}
.desktop-global-search>span{
  color:#65796e;
  font-size:1rem;
}
.desktop-global-search input{
  flex:1;
  min-width:0;
  min-height:40px;
  padding:0;
  border:0!important;
  border-radius:0;
  background:transparent;
  box-shadow:none!important;
  font-size:.88rem;
}
.desktop-global-search button{
  flex:0 0 34px;
  width:34px;
  min-width:34px;
  min-height:34px;
  height:34px;
  padding:0;
  border:0;
  border-radius:10px;
  background:#e6eee2;
  color:#173f31;
}
.desktop-global-search:focus-within{
  border-color:#2e654d;
  box-shadow:0 0 0 3px rgba(242,196,88,.28);
}

.topbar-actions{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:8px;
}
.header-icon-button{
  width:40px;
  min-width:40px;
  height:40px;
  min-height:40px;
  padding:0;
  border-radius:12px;
  background:transparent;
  color:#173f31;
  border-color:rgba(23,63,49,.16);
}
.version-button{
  min-height:40px!important;
  height:40px;
  padding:0 12px!important;
  border-radius:12px!important;
  font-size:.75rem!important;
  background:#fffdf8!important;
  color:#173f31!important;
}

/* Bureau : la navigation du bas devient inutile. */
@media(min-width:1100px){
  body{
    padding-bottom:0!important;
  }
  .bottom-nav{
    display:none!important;
  }
  main{
    padding-bottom:40px;
  }
  .page-head .back{
    display:none;
  }
}

/* Tablette et mobile : conserver l'interface tactile existante. */
@media(max-width:1099px){
  .desktop-nav,
  .desktop-global-search,
  .desktop-only{
    display:none!important;
  }
  .topbar{
    min-height:62px;
    padding:7px 14px;
  }
  .brand{
    min-height:46px;
    padding-left:2px;
  }
  .brand-copy b{font-size:.92rem}
  .version-button{
    min-height:38px!important;
    height:38px;
  }
}

/* Limites et alignements des actions. */
.soon-panel{
  overflow:hidden;
}
.soon-panel .button-on-dark{
  width:max-content!important;
  max-width:100%;
  min-width:0;
  padding-inline:20px!important;
  white-space:normal!important;
  text-align:center;
}
.section-heading>button{
  min-height:40px;
  color:#173f31!important;
  background:transparent!important;
  border-color:transparent!important;
}
.section-heading>button:hover{
  background:#e8efe4!important;
  border-color:#d4dfd0!important;
}

/* État actif uniforme des groupes d’onglets. */
.atlas-mode button.active,
.chip.active,
.desktop-nav button.active{
  background:#173f31!important;
  color:#fff!important;
  border-color:#173f31!important;
}

/* V0.6.3.3 — Grille d’accueil, en-tête fixe et modale contenue */
@media(min-width:1100px){
  .topbar{position:fixed!important;top:0!important;left:0!important;right:0!important;width:100%!important;min-height:72px;padding-inline:clamp(20px,2.2vw,38px)!important;margin:0!important;z-index:5000!important}
  .topbar.is-compact{min-height:58px}
  body{padding-top:72px!important}
  .topbar-actions{margin-left:0!important;margin-right:0!important;padding-right:2px}
  .version-button{margin-right:0!important}
  .screen.active#homeView{grid-template-columns:repeat(12,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(248px,auto)) auto auto auto!important;column-gap:24px!important;row-gap:24px!important}
  .screen.active#homeView>.season-hero{grid-column:1/9!important;grid-row:1!important;height:100%!important;min-height:248px;margin:0!important}
  .screen.active#homeView>#soonPanel{grid-column:1/9!important;grid-row:2!important;height:100%!important;min-height:248px;margin:0!important}
  .screen.active#homeView>#weekendDashboard{grid-column:9/13!important;grid-row:1/3!important;height:100%!important;min-height:520px;margin:0!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:minmax(248px,1fr) minmax(248px,1fr)!important;gap:24px!important;align-items:stretch!important}
  #weekendDashboard>.weekend-lead{grid-column:1/-1!important;grid-row:1!important;height:100%!important;min-height:0!important;margin:0!important;display:flex;flex-direction:column;justify-content:center}
  #weekendDashboard>.weekend-stat{grid-row:2!important;height:100%!important;min-height:0!important;margin:0!important;display:flex;flex-direction:column;justify-content:center}
  #weekendDashboard>.weekend-stat:nth-of-type(2){grid-column:1!important}
  #weekendDashboard>.weekend-stat:nth-of-type(3){grid-column:2!important}
  #weekendDashboard>.weekend-stat:nth-of-type(4){grid-column:3!important}
  .screen.active#homeView>.home-actions{grid-column:1/13!important;grid-row:3!important}
  .screen.active#homeView>.editorial-pick{grid-column:1/6!important;grid-row:4!important}
  .screen.active#homeView>.home-section:nth-of-type(5){grid-column:6/13!important;grid-row:4/6!important}
  .screen.active#homeView>.home-section:nth-of-type(6){grid-column:1/6!important;grid-row:5!important}
  .screen.active#homeView>.home-section:nth-of-type(7){grid-column:1/13!important;grid-row:6!important}
}
.soon-panel{justify-content:center;padding:clamp(24px,3vw,40px)!important}
.soon-panel h2{max-width:100%;margin:.25rem 0 .35rem}
.soon-panel .button-on-dark{margin-top:18px!important}
html[data-terrier-version]::after{display:none!important;content:none!important}

#detailDialog .dialog-card{position:relative!important;display:flex!important;flex-direction:column!important;width:min(94vw,1120px)!important;max-width:1120px!important;height:min(92dvh,980px)!important;max-height:92dvh!important;padding:0!important;overflow:hidden!important}
#detailContent.detail-scroll{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding:68px 36px 36px!important;overscroll-behavior:contain}
.detail-action-bar{position:relative!important;flex:0 0 auto!important;width:100%!important;margin:0!important;padding:14px 36px calc(14px + env(safe-area-inset-bottom))!important;border-top:1px solid var(--ui-line);background:rgba(255,253,248,.985);box-shadow:0 -10px 28px rgba(25,54,42,.10);z-index:30}
.detail-action-bar[hidden]{display:none!important}
.detail-action-bar .presence-button{position:static!important;display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;max-width:none!important;min-height:58px!important;margin:0!important;padding:12px 20px!important;border-radius:16px!important;background:#18543f!important;color:#fff!important;border:1px solid #18543f!important;box-shadow:none!important;text-align:center}
.detail-action-bar .presence-button:hover{background:#103f30!important;border-color:#103f30!important}
#detailContent .presence-button{display:none!important}
@media(max-width:720px){
  #detailDialog .dialog-card{width:100vw!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important}
  #detailContent.detail-scroll{padding:68px 18px 28px!important}
  .detail-action-bar{padding:12px 18px calc(12px + env(safe-area-inset-bottom))!important}
  .detail-action-bar .presence-button{min-height:54px!important;border-radius:14px!important}
}


/* ================================================================
   V0.6.3.4 — TUILES, CARTES À VENIR ET NOTICES
   ================================================================ */

/* 1. Le groupe de droite retrouve sa composition précédente :
      une grande tuile, puis deux petites et une troisième en dessous. */
@media(min-width:1100px){
  .screen.active#homeView>#weekendDashboard{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:minmax(248px,1fr) repeat(2,minmax(112px,1fr))!important;
    gap:18px!important;
    min-height:520px!important;
  }

  #weekendDashboard>.weekend-lead{
    grid-column:1/-1!important;
    grid-row:1!important;
  }

  #weekendDashboard>.weekend-stat{
    width:100%!important;
    min-width:0!important;
    min-height:112px!important;
    height:100%!important;
    padding:20px!important;
    border-radius:22px!important;
    align-items:flex-start!important;
    justify-content:center!important;
    text-align:left!important;
  }

  #weekendDashboard>.weekend-stat:nth-of-type(2){
    grid-column:1!important;
    grid-row:2!important;
  }
  #weekendDashboard>.weekend-stat:nth-of-type(3){
    grid-column:2!important;
    grid-row:2!important;
  }
  #weekendDashboard>.weekend-stat:nth-of-type(4){
    grid-column:1!important;
    grid-row:3!important;
  }

  #weekendDashboard>.weekend-stat strong{
    font-size:2rem!important;
    line-height:1!important;
  }
  #weekendDashboard>.weekend-stat span{
    max-width:15ch;
    font-size:.86rem!important;
    line-height:1.22!important;
  }
}

/* Sur très grands écrans, la troisième statistique peut occuper deux colonnes
   sans devenir démesurément large : son contenu reste compact. */
@media(min-width:1700px){
  #weekendDashboard>.weekend-stat:nth-of-type(4){
    grid-column:1/2!important;
  }
}

/* 2. Cartes Prochains rendez-vous : pied uniforme et un seul chevron. */
.horizontal-cards>.mini-card{
  display:flex!important;
  flex-direction:column!important;
  padding:20px!important;
}
.horizontal-cards>.mini-card>.badge{
  align-self:stretch!important;
  width:100%!important;
  justify-content:flex-start!important;
  min-height:40px!important;
  padding:9px 14px!important;
}
.horizontal-cards>.mini-card h3{
  margin:16px 0 10px!important;
}
.horizontal-cards>.mini-card .mini-place,
.horizontal-cards>.mini-card .mini-date{
  margin:0 0 8px!important;
}
.horizontal-cards>.mini-card .mini-date{
  margin-bottom:16px!important;
}

.mini-card-actions{
  margin-top:auto!important;
  padding-top:4px;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:10px!important;
}

.mini-card-actions .relative-date{
  width:auto!important;
  max-width:100%;
  min-height:44px!important;
  margin:0!important;
  padding:9px 14px!important;
  justify-content:flex-start!important;
  white-space:normal!important;
  line-height:1.15!important;
}

.mini-card-actions button{
  width:auto!important;
  min-width:116px!important;
  min-height:44px!important;
  height:44px!important;
  margin:0!important;
  padding-inline:18px!important;
  align-self:center!important;
}

.mini-card-actions button::after{
  content:none!important;
  display:none!important;
}
.mini-card-actions .single-chevron{
  display:inline-block!important;
  font-size:1.15em;
  line-height:1;
  margin-left:2px;
}

/* Éviter tout ancien pseudo-élément ou chevron injecté. */
[data-mini]::before,
[data-mini]::after{
  content:none!important;
}

/* Mobile : garder une action lisible sans comprimer l'étiquette. */
@media(max-width:620px){
  .mini-card-actions{
    grid-template-columns:1fr!important;
  }
  .mini-card-actions button{
    width:100%!important;
    min-width:0!important;
  }
}

/* 3. Réparation structurelle de la modale :
      le dialog porte lui-même la largeur; le formulaire remplit le dialog. */
#detailDialog{
  width:min(94vw,1120px)!important;
  max-width:1120px!important;
  height:min(92dvh,980px)!important;
  max-height:92dvh!important;
  margin:auto!important;
  padding:0!important;
  border:0!important;
  border-radius:26px!important;
  overflow:hidden!important;
  background:#fffdf8!important;
  box-shadow:0 28px 90px rgba(18,43,33,.28)!important;
}

#detailDialog .dialog-card{
  width:100%!important;
  max-width:none!important;
  height:100%!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:inherit!important;
  overflow:hidden!important;
}

#detailContent.detail-scroll{
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  padding:68px 36px 36px!important;
  transform:none!important;
}

#detailContent.detail-scroll>*{
  max-width:100%;
}

#detailDialog .close{
  position:absolute!important;
  top:16px!important;
  right:16px!important;
  left:auto!important;
  transform:none!important;
}

.detail-action-bar{
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  left:auto!important;
  right:auto!important;
  transform:none!important;
}

/* Le backdrop ne doit jamais influer sur le positionnement du dialog. */
#detailDialog::backdrop{
  background:rgba(30,42,35,.55);
  backdrop-filter:blur(3px);
}

@media(max-width:720px){
  #detailDialog{
    width:100vw!important;
    max-width:100vw!important;
    height:100dvh!important;
    max-height:100dvh!important;
    margin:0!important;
    border-radius:0!important;
  }
  #detailContent.detail-scroll{
    padding:68px 18px 28px!important;
  }
}


/* ================================================================
   V0.6.4.0 — DESIGN SYSTEM DU TERRIER
   ================================================================ */
:root{
  --terrier-control-h:44px;
  --terrier-control-h-compact:38px;
  --terrier-radius-sm:12px;
  --terrier-radius-md:18px;
  --terrier-radius-lg:26px;
  --terrier-gap-1:8px;
  --terrier-gap-2:12px;
  --terrier-gap-3:18px;
  --terrier-gap-4:24px;
  --terrier-icon:24px;
  --terrier-stroke:1.8;
}

/* Symboles communs. */
.icon-sprite{
  position:absolute;
  width:0;
  height:0;
  overflow:hidden;
}
.ui-icon,
.nav-icon,
.action-icon,
.button-icon,
.button-chevron{
  display:block;
  flex:0 0 auto;
  width:var(--terrier-icon);
  height:var(--terrier-icon);
  fill:none;
  stroke:currentColor;
  stroke-width:var(--terrier-stroke);
  stroke-linecap:round;
  stroke-linejoin:round;
}
.button-chevron{
  width:18px;
  height:18px;
}
.button-icon{
  width:20px;
  height:20px;
}

/* Navigation desktop et mobile : une seule famille d'icônes. */
.desktop-nav button{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
}
.desktop-nav .ui-icon{
  width:20px;
  height:20px;
}
.bottom-nav button{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
}
.bottom-nav .nav-icon{
  width:23px;
  height:23px;
}
.bottom-nav button.active .nav-icon,
.desktop-nav button.active .ui-icon{
  stroke:currentColor;
}

/* Actions rapides. */
.home-actions button{
  display:grid!important;
  grid-template-columns:46px minmax(0,1fr)!important;
  grid-template-rows:auto auto!important;
  column-gap:16px!important;
  row-gap:5px!important;
  align-content:center!important;
  min-height:150px!important;
  padding:24px!important;
}
.home-actions .action-icon{
  grid-column:1!important;
  grid-row:1/3!important;
  align-self:start;
  width:34px;
  height:34px;
  color:#214d3b;
}
.home-actions button b{
  grid-column:2!important;
  grid-row:1!important;
  align-self:end;
}
.home-actions button small,
.home-actions button span:not(.action-icon){
  grid-column:2!important;
  grid-row:2!important;
}

/* Soleil éditorial réinterprété dans la même famille. */
.season-icon,
.season-hero .season-symbol{
  display:grid!important;
  place-items:center!important;
}
.season-icon .ui-icon,
.season-hero .season-symbol .ui-icon{
  width:36px;
  height:36px;
  color:#385743;
}

/* Grille demandée :
   rangée 1 = deux grands blocs;
   rangée 2 = grand bloc gauche + bloc statistique droit de même hauteur. */
@media(min-width:1100px){
  .screen.active#homeView{
    grid-template-columns:repeat(12,minmax(0,1fr))!important;
    grid-template-rows:minmax(300px,auto) minmax(300px,auto) auto auto auto!important;
    gap:24px!important;
  }

  .screen.active#homeView>.season-hero{
    grid-column:1/7!important;
    grid-row:1!important;
    height:100%!important;
    min-height:300px!important;
  }

  .screen.active#homeView>#weekendDashboard{
    display:block!important;
    grid-column:7/13!important;
    grid-row:1/3!important;
    min-height:0!important;
    height:auto!important;
    margin:0!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
  }

  /* On recompose visuellement les éléments du tableau de bord. */
  #weekendDashboard{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:minmax(300px,auto) minmax(138px,1fr) minmax(138px,1fr)!important;
    gap:24px!important;
  }

  #weekendDashboard>.weekend-lead{
    grid-column:1/-1!important;
    grid-row:1!important;
    height:100%!important;
    min-height:300px!important;
  }

  #weekendDashboard>.weekend-stat{
    min-height:0!important;
    height:100%!important;
    width:100%!important;
    padding:22px!important;
    border-radius:24px!important;
    justify-content:center!important;
  }

  #weekendDashboard>.weekend-stat:nth-of-type(2){
    grid-column:1!important;
    grid-row:2!important;
  }
  #weekendDashboard>.weekend-stat:nth-of-type(3){
    grid-column:2!important;
    grid-row:2!important;
  }
  #weekendDashboard>.weekend-stat:nth-of-type(4){
    grid-column:1!important;
    grid-row:3!important;
  }

  .screen.active#homeView>#soonPanel{
    grid-column:1/7!important;
    grid-row:2!important;
    min-height:300px!important;
    height:100%!important;
  }

  /* Le bloc des trois statistiques, considéré comme un ensemble, a exactement
     la même hauteur que la grande tuile de gauche de la seconde rangée. */
  #weekendDashboard{
    grid-template-rows:minmax(300px,auto) calc((300px - 24px)/2) calc((300px - 24px)/2)!important;
  }

  .screen.active#homeView>.home-actions{
    grid-column:1/13!important;
    grid-row:3!important;
  }
}

/* Sur écrans intermédiaires, conserver le même rapport sans tuiles écrasées. */
@media(min-width:1100px) and (max-width:1399px){
  .screen.active#homeView{
    grid-template-rows:minmax(280px,auto) minmax(280px,auto) auto auto auto!important;
  }
  .screen.active#homeView>.season-hero,
  #weekendDashboard>.weekend-lead,
  .screen.active#homeView>#soonPanel{
    min-height:280px!important;
  }
  #weekendDashboard{
    grid-template-rows:minmax(280px,auto) calc((280px - 20px)/2) calc((280px - 20px)/2)!important;
    gap:20px!important;
  }
}

/* Bouton Mode terrain : présent mais secondaire. */
.detail-action-bar{
  display:flex!important;
  justify-content:flex-end!important;
  padding-top:10px!important;
  padding-bottom:10px!important;
}
.detail-action-bar .presence-button{
  width:auto!important;
  min-width:170px!important;
  max-width:260px!important;
  min-height:44px!important;
  height:44px!important;
  padding:0 18px!important;
  gap:8px!important;
  border-radius:999px!important;
  font-size:.86rem!important;
  font-weight:800!important;
}
@media(max-width:720px){
  .detail-action-bar{
    justify-content:center!important;
  }
  .detail-action-bar .presence-button{
    width:100%!important;
    max-width:none!important;
  }
}

/* Boutons et contrôles harmonisés. */
.button,
button,
select,
input,
textarea{
  border-radius:var(--terrier-radius-sm);
}
.button{
  min-height:var(--terrier-control-h);
}
.button.compact{
  min-height:var(--terrier-control-h-compact);
}
.mini-card-actions button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
}

/* Icônes monochromes, aucune couleur emoji résiduelle dans les actions. */
.action-emoji{
  display:none!important;
}


/* ================================================================
   V0.6.4.1 — CONSOLIDATION DE L’IDENTITÉ VISUELLE
   ================================================================ */

/* Accueil desktop : 2/3 à gauche, 1/3 à droite.
   La seconde rangée contient une grille 2 × 2, trois slots utilisés. */
@media(min-width:1100px){
  .screen.active#homeView{
    display:grid!important;
    grid-template-columns:repeat(18,minmax(0,1fr))!important;
    grid-template-rows:minmax(300px,auto) minmax(138px,1fr) minmax(138px,1fr) auto auto auto!important;
    gap:24px!important;
  }

  .screen.active#homeView>.season-hero{
    grid-column:1/13!important;
    grid-row:1!important;
    min-height:300px!important;
    height:100%!important;
    margin:0!important;
  }

  /* display:contents permet aux quatre éléments du dashboard
     de participer directement à la grille principale. */
  .screen.active#homeView>#weekendDashboard{
    display:contents!important;
  }

  #weekendDashboard>.weekend-lead{
    grid-column:13/19!important;
    grid-row:1!important;
    min-height:300px!important;
    height:100%!important;
    margin:0!important;
  }

  .screen.active#homeView>#soonPanel{
    grid-column:1/13!important;
    grid-row:2/4!important;
    min-height:300px!important;
    height:100%!important;
    margin:0!important;
  }

  #weekendDashboard>.weekend-stat{
    min-width:0!important;
    min-height:0!important;
    width:100%!important;
    height:100%!important;
    margin:0!important;
    padding:22px!important;
    border-radius:24px!important;
    display:flex!important;
    align-items:flex-start!important;
    justify-content:center!important;
    text-align:left!important;
  }

  #weekendDashboard>.weekend-stat:nth-of-type(2){
    grid-column:13/16!important;
    grid-row:2!important;
  }
  #weekendDashboard>.weekend-stat:nth-of-type(3){
    grid-column:16/19!important;
    grid-row:2!important;
  }
  #weekendDashboard>.weekend-stat:nth-of-type(4){
    grid-column:13/16!important;
    grid-row:3!important;
  }

  #weekendDashboard>.weekend-stat strong{
    font-size:2rem!important;
    line-height:1!important;
  }
  #weekendDashboard>.weekend-stat span{
    max-width:14ch;
    font-size:.86rem!important;
    line-height:1.2!important;
  }

  .screen.active#homeView>.home-actions{
    grid-column:1/19!important;
    grid-row:4!important;
  }
}

/* Action cards: no overlap, permanent icon column, stable typography. */
.home-actions{
  gap:18px!important;
}
.home-actions button{
  display:grid!important;
  grid-template-columns:48px minmax(0,1fr)!important;
  grid-template-rows:1fr!important;
  align-items:center!important;
  column-gap:18px!important;
  min-height:150px!important;
  padding:24px!important;
  text-align:left!important;
  overflow:hidden!important;
}
.home-actions .action-icon{
  grid-column:1!important;
  grid-row:1!important;
  width:36px!important;
  height:36px!important;
  align-self:center!important;
  color:#214d3b!important;
}
.home-actions .action-copy{
  grid-column:2!important;
  grid-row:1!important;
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  gap:8px!important;
}
.home-actions .action-copy b{
  margin:0!important;
  font-size:1.08rem!important;
  line-height:1.1!important;
}
.home-actions .action-copy small{
  margin:0!important;
  color:#6b7b72!important;
  font-size:.86rem!important;
  line-height:1.25!important;
}

/* Consistent nav icon dimensions. */
.desktop-nav .ui-icon{
  width:21px!important;
  height:21px!important;
}
.bottom-nav .nav-icon{
  width:25px!important;
  height:25px!important;
}
.bottom-nav button{
  min-width:0!important;
}

/* New brand/app icon. */
.brand-mark{
  overflow:hidden!important;
  background:#fffdf8!important;
  border:1px solid rgba(23,63,49,.12);
}
.brand-mark img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

/* All event actions occupy the same stable footer. */
.detail-action-bar{
  display:block!important;
  padding:12px 24px calc(12px + env(safe-area-inset-bottom))!important;
}
.detail-action-grid{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;
}
.detail-action-grid>button,
.detail-action-grid>a{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  min-width:140px!important;
  min-height:44px!important;
  height:44px!important;
  margin:0!important;
  padding:0 18px!important;
  border-radius:12px!important;
  text-decoration:none!important;
  white-space:nowrap!important;
}
.detail-action-grid .presence-button{
  margin-left:auto!important;
  min-width:170px!important;
  border-radius:999px!important;
}

@media(max-width:900px){
  .detail-action-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .detail-action-grid>button,
  .detail-action-grid>a,
  .detail-action-grid .presence-button{
    width:100%!important;
    min-width:0!important;
    margin-left:0!important;
  }
}
@media(max-width:560px){
  .detail-action-grid{
    grid-template-columns:1fr!important;
  }
}

/* Ensure old emoji spans cannot reappear in access cards. */
.home-actions button>span:not(.action-copy){
  display:none!important;
}


/* ================================================================
   V0.6.4.3 — RESTAURATION STRUCTURELLE DE L’ACCUEIL
   ================================================================ */

/* The screen is a vertical document again. */
#homeView.screen.active{
  display:flex!important;
  flex-direction:column!important;
  gap:28px!important;
  width:100%!important;
  min-width:0!important;
}

.home-dashboard,
.home-actions,
.home-editorial-grid{
  width:100%!important;
  min-width:0!important;
}

/* Approved top composition, isolated from all following content. */
@media(min-width:1100px){
  .home-dashboard{
    display:grid!important;
    grid-template-columns:minmax(0,2fr) minmax(330px,1fr)!important;
    grid-template-rows:minmax(300px,auto) minmax(300px,auto)!important;
    gap:24px!important;
    align-items:stretch!important;
  }

  .home-dashboard>.season-hero{
    grid-column:1!important;
    grid-row:1!important;
    width:100%!important;
    height:100%!important;
    min-height:300px!important;
    margin:0!important;
  }

  .home-dashboard>#soonPanel{
    grid-column:1!important;
    grid-row:2!important;
    width:100%!important;
    height:100%!important;
    min-height:300px!important;
    margin:0!important;
  }

  .home-dashboard>#weekendDashboard{
    grid-column:2!important;
    grid-row:1/3!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:minmax(300px,1fr) repeat(2,minmax(138px,1fr))!important;
    gap:24px!important;
    width:100%!important;
    min-width:0!important;
    height:100%!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }

  #weekendDashboard>.weekend-lead{
    grid-column:1/-1!important;
    grid-row:1!important;
    width:100%!important;
    height:100%!important;
    min-height:300px!important;
    margin:0!important;
  }

  #weekendDashboard>.weekend-stat:nth-of-type(2){
    grid-column:1!important;
    grid-row:2!important;
  }
  #weekendDashboard>.weekend-stat:nth-of-type(3){
    grid-column:2!important;
    grid-row:2!important;
  }
  #weekendDashboard>.weekend-stat:nth-of-type(4){
    grid-column:1!important;
    grid-row:3!important;
  }
}

/* KPI cards stay compact, readable and clickable. */
#weekendDashboard>.weekend-stat{
  appearance:none!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  width:100%!important;
  min-width:0!important;
  min-height:0!important;
  height:100%!important;
  margin:0!important;
  padding:20px!important;
  border:1px solid var(--ui-line)!important;
  border-radius:22px!important;
  background:#fffdf8!important;
  color:inherit!important;
  text-align:left!important;
  cursor:pointer!important;
  box-shadow:0 10px 26px rgba(29,54,43,.06)!important;
}
#weekendDashboard>.weekend-stat:hover{
  transform:translateY(-2px)!important;
  border-color:#7d9b84!important;
}
#weekendDashboard>.weekend-stat strong{
  font-size:2rem!important;
  line-height:1!important;
  margin-bottom:6px!important;
}
#weekendDashboard>.weekend-stat span{
  max-width:100%!important;
  font-size:.86rem!important;
  line-height:1.2!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
}
#weekendDashboard>.weekend-stat small{
  margin-top:10px!important;
  color:#276049!important;
  font-size:.7rem!important;
  font-weight:900!important;
  letter-spacing:.04em;
  text-transform:uppercase;
}

/* Access row: fully independent and never overlaps following content. */
.home-actions{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:18px!important;
  position:relative!important;
  z-index:1!important;
}
.home-actions button{
  position:relative!important;
  display:grid!important;
  grid-template-columns:44px minmax(0,1fr)!important;
  align-items:center!important;
  gap:16px!important;
  width:100%!important;
  min-width:0!important;
  min-height:144px!important;
  margin:0!important;
  padding:22px!important;
  transform:none!important;
  overflow:hidden!important;
}
.home-actions .action-icon{
  position:static!important;
  width:34px!important;
  height:34px!important;
  margin:0!important;
  transform:none!important;
}
.home-actions .action-copy{
  position:static!important;
  min-width:0!important;
  margin:0!important;
  transform:none!important;
}
.home-actions .action-copy b,
.home-actions .action-copy small{
  display:block!important;
  max-width:100%!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
}

/* Lower desktop content uses its own editorial grid. */
.home-editorial-grid{
  display:grid!important;
  grid-template-columns:minmax(0,5fr) minmax(0,7fr)!important;
  gap:28px 24px!important;
  align-items:start!important;
}
.home-editorial-grid>.home-section{
  width:100%!important;
  min-width:0!important;
  margin:0!important;
}
.home-editorial-grid>.editorial-pick{
  grid-column:1!important;
  grid-row:1!important;
}
.home-editorial-grid>.upcoming-home-section{
  grid-column:2!important;
  grid-row:1/3!important;
}
.home-editorial-grid>.metrics-home-section{
  grid-column:1!important;
  grid-row:2!important;
}
.home-editorial-grid>.journal-home-section{
  grid-column:1/-1!important;
  grid-row:3!important;
}

.upcoming-home-section .horizontal-cards{
  display:flex!important;
  width:100%!important;
  min-width:0!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  gap:16px!important;
  padding-bottom:8px!important;
  scroll-snap-type:x proximity;
}
.upcoming-home-section .mini-card{
  flex:0 0 clamp(245px,31%,320px)!important;
  width:auto!important;
  min-width:245px!important;
  max-width:320px!important;
  scroll-snap-align:start;
}

.metrics-home-section .season-metrics{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px!important;
}
.metrics-home-section .season-metric{
  width:100%!important;
  min-width:0!important;
  min-height:112px!important;
  margin:0!important;
  padding:18px!important;
}
.metrics-home-section .season-metric span{
  word-break:normal!important;
  overflow-wrap:break-word!important;
  hyphens:none!important;
}

.journal-home-section .journal-preview{
  width:100%!important;
  max-width:none!important;
}

/* Responsive fallback: never preserve a desktop grid when space is insufficient. */
@media(max-width:1399px){
  .home-editorial-grid{
    grid-template-columns:1fr!important;
  }
  .home-editorial-grid>.editorial-pick,
  .home-editorial-grid>.upcoming-home-section,
  .home-editorial-grid>.metrics-home-section,
  .home-editorial-grid>.journal-home-section{
    grid-column:1!important;
    grid-row:auto!important;
  }
  .metrics-home-section .season-metrics{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
}

@media(max-width:1099px){
  .home-dashboard{
    display:flex!important;
    flex-direction:column!important;
    gap:20px!important;
  }
  #weekendDashboard{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:14px!important;
  }
  #weekendDashboard>.weekend-lead{
    grid-column:1/-1!important;
  }
  .home-actions{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .metrics-home-section .season-metrics{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media(max-width:620px){
  .home-actions{
    grid-template-columns:1fr!important;
  }
  #weekendDashboard{
    grid-template-columns:1fr!important;
  }
  #weekendDashboard>.weekend-lead,
  #weekendDashboard>.weekend-stat{
    grid-column:1!important;
    grid-row:auto!important;
  }
}

/* Header: predictable flex layout, no version overflow. */
@media(min-width:1100px){
  .topbar{
    display:flex!important;
    align-items:center!important;
    gap:12px!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  .brand{
    flex:0 1 230px!important;
    min-width:48px!important;
  }
  .desktop-nav{
    flex:1 1 auto!important;
    min-width:0!important;
    overflow:hidden!important;
  }
  .desktop-nav button{
    flex:0 1 auto!important;
    min-width:0!important;
    white-space:nowrap!important;
    padding-inline:clamp(7px,.75vw,13px)!important;
  }
  .desktop-global-search{
    flex:0 1 300px!important;
    min-width:170px!important;
    max-width:300px!important;
    margin-left:auto!important;
  }
  .topbar-actions{
    flex:0 0 auto!important;
    min-width:0!important;
  }
  .version-button{
    flex:0 0 auto!important;
    white-space:nowrap!important;
    margin-right:0!important;
  }
}
@media(min-width:1100px) and (max-width:1450px){
  .desktop-global-search,
  .header-icon-button{
    display:none!important;
  }
}
@media(min-width:1100px) and (max-width:1220px){
  .brand-copy{
    display:none!important;
  }
  .brand{
    flex-basis:48px!important;
    max-width:48px!important;
  }
  .desktop-nav button{
    font-size:.74rem!important;
    padding-inline:7px!important;
  }
}


/* ================================================================
   V0.7.0.0 — LE CARNET VIVANT · CONTINUITÉ DU TABLEAU DE BORD
   ================================================================ */

#homeView .home-dashboard,
#homeView .home-dashboard > *,
#homeView #weekendDashboard,
#homeView #weekendDashboard > *{
  box-sizing:border-box!important;
  float:none!important;
  clear:none!important;
  position:relative!important;
  inset:auto!important;
  transform:none!important;
  margin-left:0!important;
  margin-right:0!important;
  max-width:none!important;
}

@media(min-width:1100px){
  #homeView .home-dashboard{
    display:grid!important;
    grid-template-columns:minmax(0,2fr) minmax(360px,1fr)!important;
    grid-template-rows:320px 320px!important;
    gap:24px!important;
    width:100%!important;
    min-width:0!important;
    height:auto!important;
    align-items:stretch!important;
    overflow:visible!important;
  }

  #homeView .home-dashboard > .season-hero{
    grid-column:1!important;
    grid-row:1!important;
    width:100%!important;
    min-width:0!important;
    height:320px!important;
    min-height:320px!important;
    max-height:320px!important;
    margin:0!important;
    overflow:hidden!important;
  }

  #homeView .home-dashboard > #soonPanel{
    grid-column:1!important;
    grid-row:2!important;
    width:100%!important;
    min-width:0!important;
    height:320px!important;
    min-height:320px!important;
    max-height:320px!important;
    margin:0!important;
    overflow:hidden!important;
  }

  #homeView .home-dashboard > #weekendDashboard{
    grid-column:2!important;
    grid-row:1/3!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:320px 148px 148px!important;
    gap:24px!important;
    width:100%!important;
    min-width:0!important;
    height:664px!important;
    min-height:664px!important;
    max-height:664px!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
  }

  #homeView #weekendDashboard > .weekend-lead{
    grid-column:1/3!important;
    grid-row:1!important;
    width:100%!important;
    min-width:0!important;
    height:320px!important;
    min-height:320px!important;
    max-height:320px!important;
    margin:0!important;
    padding:28px!important;
    overflow:hidden!important;
  }

  #homeView #weekendDashboard > .weekend-stat{
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:148px!important;
    min-height:148px!important;
    max-height:148px!important;
    margin:0!important;
    padding:20px!important;
    overflow:hidden!important;
    white-space:normal!important;
  }

  #homeView #weekendDashboard > .weekend-stat:nth-child(2){
    grid-column:1!important;
    grid-row:2!important;
  }
  #homeView #weekendDashboard > .weekend-stat:nth-child(3){
    grid-column:2!important;
    grid-row:2!important;
  }
  #homeView #weekendDashboard > .weekend-stat:nth-child(4){
    grid-column:1!important;
    grid-row:3!important;
  }

  #homeView #weekendDashboard > .weekend-stat strong{
    display:block!important;
    width:auto!important;
    margin:0 0 7px!important;
    font-size:2rem!important;
    line-height:1!important;
  }

  #homeView #weekendDashboard > .weekend-stat span{
    display:block!important;
    width:auto!important;
    max-width:18ch!important;
    margin:0!important;
    font-size:.86rem!important;
    line-height:1.2!important;
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:normal!important;
    hyphens:none!important;
  }

  #homeView #weekendDashboard > .weekend-stat small{
    display:block!important;
    width:auto!important;
    margin-top:10px!important;
  }
}

@media(min-width:1100px) and (max-width:1399px){
  #homeView .home-dashboard{
    grid-template-columns:minmax(0,2fr) minmax(320px,1fr)!important;
    grid-template-rows:290px 290px!important;
    gap:20px!important;
  }

  #homeView .home-dashboard > .season-hero,
  #homeView .home-dashboard > #soonPanel{
    height:290px!important;
    min-height:290px!important;
    max-height:290px!important;
  }

  #homeView .home-dashboard > #weekendDashboard{
    grid-template-rows:290px 135px 135px!important;
    gap:20px!important;
    height:600px!important;
    min-height:600px!important;
    max-height:600px!important;
  }

  #homeView #weekendDashboard > .weekend-lead{
    height:290px!important;
    min-height:290px!important;
    max-height:290px!important;
    padding:24px!important;
  }

  #homeView #weekendDashboard > .weekend-stat{
    height:135px!important;
    min-height:135px!important;
    max-height:135px!important;
    padding:18px!important;
  }
}

@media(max-width:1099px){
  #homeView .home-dashboard{
    display:flex!important;
    flex-direction:column!important;
    gap:20px!important;
    width:100%!important;
  }

  #homeView .home-dashboard > .season-hero,
  #homeView .home-dashboard > #soonPanel,
  #homeView .home-dashboard > #weekendDashboard,
  #homeView #weekendDashboard > .weekend-lead,
  #homeView #weekendDashboard > .weekend-stat{
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
  }

  #homeView .home-dashboard > #weekendDashboard{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:14px!important;
  }

  #homeView #weekendDashboard > .weekend-lead{
    grid-column:1/-1!important;
  }
}

#homeView #weekendDashboard > .weekend-lead button{
  width:100%!important;
  max-width:100%!important;
  margin-top:18px!important;
  white-space:normal!important;
}

#homeView #weekendDashboard h2,
#homeView #weekendDashboard p{
  max-width:100%!important;
  overflow-wrap:break-word!important;
  word-break:normal!important;
}


/* V0.7 — Circuits et Carnet vivant */
.route-stops{display:grid;gap:.65rem;margin:1rem 0 1.5rem}
.route-stop{display:grid;grid-template-columns:2.2rem 1fr;gap:.1rem .75rem;align-items:center;width:100%;padding:.8rem 1rem;border:1px solid var(--line,#d7cfbd);border-radius:14px;background:var(--paper,#fffdf7);text-align:left;color:inherit}
.route-stop span{grid-row:1 / span 2;display:grid;place-items:center;width:2rem;height:2rem;border-radius:999px;background:var(--green,#31463a);color:white;font-weight:700}
.route-stop small{grid-column:2;opacity:.72}.route-stop:not(.static){cursor:pointer}.route-stop:not(.static):hover{transform:translateY(-1px)}
.route-card{border-left:4px solid #8c6a3d}

/* V0.7.0.1 — consolidation des contenus longs et repères d’Atlas */
.topbar > *,
.home-actions > *,
.section-heading > *,
.notice-card,
.notice-card .top,
.notice-card h2,
.notice-card p,
.atlas-poi-button,
.atlas-poi-button b,
.atlas-poi-button small,
.map-popup,
.map-popup h3,
.map-popup p,
.expedition-card,
.tour-card,
.route-stop,
.watch-row > *{
  min-width:0;
}

.notice-card h2,
.notice-card p,
.atlas-poi-button b,
.atlas-poi-button small,
.map-popup h3,
.map-popup p,
.tour-stops li,
.watch-row strong,
.watch-row small{
  overflow-wrap:anywhere;
}

.atlas-poi-rail{
  display:flex;
  gap:.55rem;
  overflow-x:auto;
  padding:.15rem .15rem .55rem;
  scroll-snap-type:x mandatory;
}
.atlas-poi-button{
  flex:0 0 min(260px,78vw);
  display:grid;
  gap:.22rem;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--card);
  color:var(--ink);
  padding:.72rem;
  text-align:left;
  scroll-snap-align:start;
}
.atlas-poi-button:hover,.atlas-poi-button:focus-visible{
  border-color:var(--forest);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--forest) 15%,transparent);
}
.atlas-poi-button span{
  color:var(--ochre);
  font-size:.67rem;
  font-weight:850;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.atlas-poi-button b{font-family:Georgia,serif;font-size:.96rem;line-height:1.18}
.atlas-poi-button small{color:var(--muted);font-size:.74rem;line-height:1.28}
.atlas-poi-empty{margin:.2rem;color:var(--muted);font-size:.84rem}
.map-popup-actions{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.55rem}
.map-popup .map-popup-actions button{margin-top:0}
.map-error{display:grid;place-content:center;gap:.45rem;min-height:100%;padding:1.2rem;text-align:center;background:linear-gradient(145deg,#e8eee6,#f7f3e9);color:var(--forest);line-height:1.4}
.map-error span{color:var(--muted);font-size:.9rem}

@media(max-width:560px){
  .page-head{align-items:flex-start}
  .page-head h1{font-size:clamp(1.55rem,8vw,2.1rem);overflow-wrap:anywhere}
  .section-heading{align-items:flex-start;gap:.65rem}
  .section-heading button{flex:0 0 auto}
  .notice-actions,.expedition-actions{align-items:stretch}
  .notice-actions button,.notice-actions a,.expedition-actions button,.expedition-actions a{flex:1 1 130px;text-align:center;white-space:normal}
  .map-actions button{flex:1 1 145px;white-space:normal}
  .detail-action-grid{grid-template-columns:1fr!important}
}

/* V0.7.0.3 — lecture mobile et accès rapide */
.home-actions{
  align-items:stretch!important;
}
.home-actions button{
  display:flex!important;
  align-items:center!important;
  gap:18px!important;
  min-height:132px!important;
  padding:22px!important;
}
.home-actions .action-icon{
  flex:0 0 40px!important;
  width:40px!important;
  height:40px!important;
  margin:0!important;
  align-self:center!important;
}
.home-actions .action-copy{
  flex:1 1 auto!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  gap:6px!important;
  min-width:0!important;
}
.home-actions .action-copy b,
.home-actions .action-copy small{
  display:block!important;
  margin:0!important;
  max-width:none!important;
  overflow-wrap:anywhere!important;
}
.home-actions .action-copy b{font-size:clamp(1rem,1.25vw,1.15rem)!important;line-height:1.15!important}
.home-actions .action-copy small{font-size:clamp(.82rem,1vw,.92rem)!important;line-height:1.32!important}

.detail-actions-disclosure{display:block;width:100%}
.detail-actions-disclosure>summary{display:none}

@media(max-width:620px){
  #homeView .home-dashboard > #weekendDashboard{
    grid-template-columns:1fr!important;
    width:100%!important;
  }
  #homeView #weekendDashboard>.weekend-stat{
    display:grid!important;
    grid-template-columns:minmax(62px,auto) minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    column-gap:14px!important;
    row-gap:3px!important;
    align-items:center!important;
    min-height:112px!important;
    height:auto!important;
    padding:16px 18px!important;
  }
  #homeView #weekendDashboard>.weekend-stat strong{
    grid-column:1!important;
    grid-row:1/3!important;
    align-self:center!important;
    margin:0!important;
    font-size:clamp(2rem,12vw,2.65rem)!important;
  }
  #homeView #weekendDashboard>.weekend-stat span{
    grid-column:2!important;
    grid-row:1!important;
    max-width:none!important;
    font-size:.96rem!important;
    line-height:1.22!important;
    overflow-wrap:anywhere!important;
  }
  #homeView #weekendDashboard>.weekend-stat small{
    grid-column:2!important;
    grid-row:2!important;
    margin:0!important;
  }
  .detail-action-bar{padding:10px 16px calc(10px + env(safe-area-inset-bottom))!important}
  .detail-actions-disclosure{
    border:1px solid var(--line)!important;
    border-radius:15px!important;
    background:var(--card)!important;
    overflow:hidden!important;
  }
  .detail-actions-disclosure>summary{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:12px!important;
    min-height:52px!important;
    padding:13px 16px!important;
    color:var(--forest)!important;
    font-weight:850!important;
    cursor:pointer!important;
    list-style:none!important;
  }
  .detail-actions-disclosure>summary::-webkit-details-marker{display:none}
  .detail-actions-state{color:var(--muted)!important;font-size:.82rem!important;font-weight:750!important}
  .detail-actions-disclosure[open]>summary{border-bottom:1px solid var(--line)!important}
  .detail-actions-disclosure .detail-action-grid{padding:12px!important}
}

@media(max-width:480px){
  .home-actions button{gap:15px!important;min-height:118px!important;padding:18px!important}
  .home-actions .action-icon{flex-basis:36px!important;width:36px!important;height:36px!important}
}

/* V0.7.0.4 — Atlas mobile : carte pour repérer, page pour lire */
.atlas-map-detail[hidden]{display:none!important}
.atlas-map-detail-card{
  margin:.8rem 0 .7rem;
  padding:1rem;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--card);
  box-shadow:0 10px 26px rgba(25,54,42,.09);
}
.atlas-map-detail-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
}
.atlas-map-detail-head .kicker{margin:.15rem 0 .55rem}
.atlas-map-detail-close{
  flex:0 0 36px;
  width:36px;
  height:36px;
  padding:0;
  border:1px solid var(--line);
  border-radius:50%;
  background:var(--paper);
  color:var(--forest);
  font-size:1.55rem;
  line-height:1;
}
.atlas-map-detail .map-popup{max-width:none!important}
.atlas-map-detail .map-popup h3{margin-right:0!important;font-size:clamp(1.25rem,5vw,1.55rem)!important}
.atlas-map-detail .map-popup-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem!important}
.atlas-map-detail .map-popup-actions button,.atlas-map-detail .map-popup-vector>.button{width:100%!important;min-height:46px!important;margin:0!important}
.atlas-poi-title{display:none}

@media(max-width:700px){
  #atlasMap{height:clamp(360px,54dvh,520px)!important;min-height:360px!important}
  #atlasMap .maplibregl-popup{display:none!important}
  .atlas-poi-rail{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:.6rem!important;
    overflow:visible!important;
    padding:.75rem 0 .1rem!important;
    scroll-snap-type:none!important;
  }
  .atlas-poi-title{
    display:block!important;
    margin:.25rem 0 .05rem!important;
    color:var(--forest)!important;
    font-family:Georgia,serif;
    font-size:1.1rem!important;
    font-weight:700!important;
  }
  .atlas-poi-button{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    column-gap:.7rem!important;
    align-items:start!important;
    width:100%!important;
    max-width:none!important;
    min-height:0!important;
    padding:.82rem .9rem!important;
  }
  .atlas-poi-button span{
    grid-column:1!important;
    grid-row:1/3!important;
    align-self:center!important;
    padding:.28rem .45rem!important;
    border-radius:999px!important;
    background:var(--paper)!important;
    font-size:.6rem!important;
  }
  .atlas-poi-button b{grid-column:2!important;grid-row:1!important;font-size:1rem!important}
  .atlas-poi-button small{grid-column:2!important;grid-row:2!important;font-size:.8rem!important}
}

@media(max-width:420px){
  .atlas-map-detail .map-popup-actions{grid-template-columns:1fr!important}
}

/* V0.7.0.6 — L’Atlas aide à décider d’une sortie. */
.atlas-orientation{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:.8rem 1rem;
  align-items:center;
  margin:0 0 .85rem;
  padding:1rem;
  border:1px solid var(--line);
  border-radius:18px;
  background:linear-gradient(135deg,#fffdf7 0%,#edf2ea 100%);
  box-shadow:0 8px 22px rgba(25,54,42,.06);
}
.atlas-orientation-copy h2{margin:.05rem 0 .28rem;font-size:clamp(1.1rem,2vw,1.35rem);line-height:1.12}
.atlas-orientation-copy p:last-child{margin:0;color:var(--muted);line-height:1.35}
.atlas-orientation-action{
  border:1px solid var(--forest);
  border-radius:999px;
  background:var(--forest);
  color:#fff;
  padding:.68rem .88rem;
  font-weight:850;
  white-space:normal;
}
.atlas-map-legend{
  grid-column:1/-1;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.4rem .8rem;
  padding-top:.65rem;
  border-top:1px solid color-mix(in srgb,var(--line) 82%,transparent);
  color:var(--muted);
  font-size:.76rem;
  line-height:1.3;
}
.atlas-map-legend span{display:inline-flex;align-items:center;gap:.32rem;font-weight:750}
.atlas-map-legend small{flex:1 1 250px}
.legend-dot{display:inline-block;width:.72rem;height:.72rem;border:2px solid #fffdf7;border-radius:50%;box-shadow:0 0 0 1px rgba(32,48,39,.16)}
.legend-dot.priority-a{background:#173f31}.legend-dot.event-b{background:#6f9868}.legend-dot.territory{background:#b7772d}

@media(max-width:700px){
  .atlas-orientation{grid-template-columns:1fr;padding:.9rem}
  .atlas-orientation-action{width:100%}
  .atlas-map-legend{gap:.38rem .65rem}
  .atlas-map-legend small{flex-basis:100%;margin-top:.08rem}
}

/* V0.7.0.5 — Les repères gardent leur texte dans leur carte. */
.atlas-poi-rail{align-items:stretch!important}
.atlas-poi-button{
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
  white-space:normal!important;
  align-content:start!important;
}
.atlas-poi-button span,
.atlas-poi-button b,
.atlas-poi-button small{
  min-width:0!important;
  max-width:100%!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
}
.atlas-poi-button b,.atlas-poi-button small{display:block!important}

@media(min-width:701px){
  .atlas-poi-button{
    flex:0 0 clamp(280px,22vw,330px)!important;
    min-height:126px!important;
    grid-template-rows:auto minmax(0,1fr) auto!important;
  }
  .atlas-poi-button b{font-size:1.02rem!important;line-height:1.15!important}
  .atlas-poi-button small{font-size:.78rem!important;line-height:1.28!important}
}

@media(max-width:700px){
  .atlas-poi-button{
    grid-template-columns:100px minmax(0,1fr)!important;
    overflow:hidden!important;
  }
  .atlas-poi-button span{
    white-space:normal!important;
    line-height:1.15!important;
    text-align:left!important;
  }
  .atlas-poi-button b,.atlas-poi-button small{
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
}

/* V0.7.0.7 — actions de sélection compactes et contrastées. */
.atlas-orientation-action,
.atlas-orientation-action:hover,
.atlas-orientation-action:focus-visible,
.atlas-orientation-action:active{
  display:inline-flex!important;
  min-height:44px!important;
  background:var(--ui-forest)!important;
  color:#fff!important;
  border-color:var(--ui-forest)!important;
  box-shadow:none!important;
  text-decoration:none!important;
}
.atlas-orientation-action:focus-visible{outline:3px solid color-mix(in srgb,var(--ui-gold) 68%,transparent);outline-offset:3px}

/* Les trois gestes d’une notice restent disponibles sans devenir des affiches. */
#atlasList .notice-card>.notice-actions{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
  padding-top:14px!important;
}
#atlasList .notice-card>.notice-actions>*{
  width:100%!important;
  min-width:0!important;
  min-height:44px!important;
  padding:0 10px!important;
  font-size:.84rem!important;
  line-height:1.12!important;
  white-space:normal!important;
}
@media(max-width:360px){
  #atlasList .notice-card>.notice-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #atlasList .notice-card>.notice-actions>*:last-child{grid-column:1/-1}
}


/* V0.7.1.1 — filet de sécurité sans régression des actions compactes. */
.home-dashboard>*,#weekendDashboard>*,.weekend-stat>*,.notice-card>*,.notice-card .top>*,.detail-action-grid>*{min-width:0;max-width:100%}
.weekend-stat strong,.weekend-stat span,.weekend-stat button,.notice-card h2,.notice-card p,.notice-card small{overflow-wrap:anywhere;word-break:normal}
.detail-actions-disclosure summary span,.detail-action-grid button,.detail-action-grid a{white-space:normal;text-align:center}
