/* MeteoFlash France — Avalanches V4 : finalisation technique de la V3 validée. */
:root{--av-navy:#152f48;--av-blue:#235b81;--av-ice:#0d859f;--av-cyan:#50c9d8;--av-pale:#eff8fc;--av-border:#d5e5ed}
html{scroll-behavior:smooth;scroll-padding-top:115px}
body.avalanches-body{background:linear-gradient(180deg,#eaf4fa 0%,#f5faff 38%,#fff 100%)}
.avalanches-page{max-width:1540px;min-width:0;padding-top:1.5rem}
/* Bandeau panoramique final, pleine largeur, sans effet au survol. */
.avalanches-hero{position:relative;isolation:isolate;display:flex;align-items:center;min-height:315px;margin:0;overflow:hidden;border-radius:0;border-bottom:5px solid #67cddf;background:linear-gradient(90deg,rgba(12,32,53,.98) 0%,rgba(18,57,84,.93) 43%,rgba(24,79,105,.40) 100%),image-set(url('images/guides/avalanches/avalanches-bandeau.jpg') 1x, url('images/guides/avalanches/avalanches-bandeau-hd.jpg') 2x) center 53%/cover no-repeat;color:#fff;box-shadow:none}
.avalanches-hero-inner{position:relative;z-index:1;width:min(1500px,100%);margin:auto;padding:36px max(23px,calc((100vw - 1450px)/2))}
.avalanches-eyebrow{font-size:.78rem;text-transform:uppercase;letter-spacing:.14em;font-weight:800;color:#beeef8;margin:0 0 .8rem}
.avalanches-hero-title{font-size:clamp(1.95rem,3.3vw,3.45rem);font-weight:900;line-height:1.17;max-width:1100px;margin:0 0 .75rem;text-shadow:0 3px 14px #102637bd;letter-spacing:-.02em}
.avalanches-hero-desc{max-width:850px;font-size:clamp(.98rem,1.35vw,1.12rem);line-height:1.7;color:#ecf9ff;margin:0 0 1.15rem}
.avalanches-hero-action{display:inline-flex;justify-content:center;align-items:center;min-height:44px;padding:.7rem 1.15rem;border-radius:999px;background:#cbf6ff;color:#164258;text-decoration:none!important;font-weight:800;transition:background .22s,color .22s,transform .22s}
.avalanches-hero-action:hover{background:#fff;color:#0e3951;text-decoration:none!important;transform:translateY(-2px)}
.avalanches-layout{display:grid;grid-template-columns:minmax(255px,325px) minmax(0,1fr);gap:clamp(1rem,2vw,2rem);align-items:start}
.avalanches-sidebar{position:sticky;top:105px;align-self:start;max-height:calc(100vh - 125px);overflow-y:auto;scrollbar-width:thin;min-width:0}
.avalanches-toc{background:#fff;border:1px solid var(--av-border);border-radius:17px;overflow:hidden;box-shadow:0 10px 30px #133e5a14}
.avalanches-toc-heading{margin:0;padding:1rem 1.15rem;font-size:1.13rem;font-weight:850;line-height:1.35;color:#fff;background:linear-gradient(115deg,#1b4263,#208ca6)}
.avalanches-toc-help{margin:.7rem 1rem .4rem;font-size:.82rem;color:#60798b}
.avalanches-toc-items{display:grid;grid-template-columns:1fr;gap:0;list-style:none;padding:.35rem .55rem .75rem;margin:0}
.avalanches-toc-items li{min-width:0}
.avalanches-toc-link{display:flex;align-items:center;gap:.65rem;min-height:44px;border-radius:9px;border-bottom:1px solid #e9f2f7;padding:.45rem .5rem;color:#214c68;text-decoration:none!important;transition:background .2s,color .2s}
.avalanches-toc-link:hover{background:#eaf7fd;text-decoration:none!important;color:#08677f}
.avalanches-toc-number{display:flex;align-items:center;justify-content:center;flex:0 0 1.85rem;height:1.85rem;border-radius:7px;background:linear-gradient(135deg,#245a84,#1c9eb6);color:#fff;font-size:.8rem;font-weight:850}
.avalanches-toc-label{flex:1;min-width:0;line-height:1.36;font-size:.85rem;font-weight:700;overflow-wrap:anywhere}
.avalanches-article{min-width:0;background:#fff;border:1px solid #dce9f1;border-radius:19px;padding:clamp(1.05rem,2.2vw,2rem);box-shadow:0 12px 32px #16475b12;color:#304b5d;line-height:1.8}
.avalanches-back-link{display:inline-flex;align-items:center;column-gap:.55rem;min-height:44px;font-size:.87rem;font-weight:800;color:#127b9b;margin-bottom:.8rem;text-decoration:none!important;transition:color .2s}
.avalanches-back-link:hover,.avalanches-back-link:focus-visible{color:#083e60;text-decoration:none!important}
.avalanches-back-link i,.avalanches-back-button i{flex-shrink:0}
.avalanches-intro{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(240px,.95fr);gap:1.2rem;align-items:start;margin:.9rem 0 1.8rem;padding:1rem 0 1.55rem;border-bottom:1px solid #dce8f0}
.avalanches-intro-copy h2{font-size:clamp(1.35rem,2.1vw,1.8rem);color:#1e587a;font-weight:850;line-height:1.3;margin:0 0 .7rem}
.avalanches-intro-copy p{font-size:1rem;color:#506d7e;line-height:1.8}
.avalanches-keypoint{border:1px solid #b8e4ed;border-left:4px solid #17a6bd;border-radius:15px;background:linear-gradient(135deg,#e7f7fc,#f7fcff);padding:1.1rem 1.2rem;box-shadow:0 8px 18px #1c697814}
.avalanches-keypoint h2{font-size:1.12rem;font-weight:850;color:#165671;margin:0 0 .55rem}
.avalanches-keypoint p{font-size:.95rem;color:#315c6f;line-height:1.75}
.avalanches-chapter{min-width:0;margin:0 0 1.25rem;padding:clamp(1.05rem,2.15vw,1.7rem);border:1px solid #dce8ef;border-radius:17px;background:#fff;box-shadow:0 8px 25px #16485b11;scroll-margin-top:115px}
.avalanches-chapter-heading{display:flex;align-items:center;gap:.75rem;border-bottom:2px solid #dcebf4;padding:0 0 .8rem;margin:0 0 1.2rem;font-size:clamp(1.25rem,2vw,1.75rem);color:#174868;font-weight:850;line-height:1.35}
.avalanches-heading-num{display:flex;align-items:center;justify-content:center;flex:0 0 2.35rem;height:2.35rem;border-radius:9px;background:linear-gradient(135deg,#244f7b,#16a0b6);color:#fff;font-size:1.1rem;font-weight:900}
.avalanches-heading-text{min-width:0;flex:1;overflow-wrap:anywhere}
.avalanches-chapter p,.avalanches-chapter li{line-height:1.82;overflow-wrap:break-word}
.avalanches-chapter h3{line-height:1.4}
.avalanches-chapter ul,.avalanches-chapter ol{padding-left:1.2rem}
.avalanches-chapter ul{list-style:disc}.avalanches-chapter ol{list-style:decimal}
.avalanches-chapter li{padding-left:.15rem;margin:.25rem 0}
.avalanches-chapter p + p{margin-top:.75rem}
.avalanches-chapter table{min-width:560px}
/* Sept illustrations : alternance stricte droite-gauche, avec hover. */
.avalanches-illustrated-row{display:grid;grid-template-columns:minmax(0,1.06fr) minmax(220px,.94fr);gap:1.25rem;align-items:start;margin:0 0 1.15rem}
.avalanches-illustrated-row>*{min-width:0}
.avalanches-row-copy{grid-column:1;grid-row:1}
.avalanches-illustrated-row .avalanches-figure{grid-column:2;grid-row:1}
.avalanches-illustration-left .avalanches-figure{grid-column:1;grid-row:1}
.avalanches-illustration-left .avalanches-row-copy{grid-column:2;grid-row:1}
.avalanches-figure{margin:0;overflow:hidden;border:1px solid #cfe5f1;border-radius:14px;background:#f1faff;box-shadow:0 7px 20px #164c611a;transition:transform .3s,box-shadow .3s}
.avalanches-hover-image{display:block;width:100%;height:auto;max-height:none;aspect-ratio:16/9;object-fit:cover;transition:transform .42s ease,filter .42s ease}
.avalanches-hover-figure:hover{box-shadow:0 15px 32px #12475c40;transform:translateY(-3px)}
.avalanches-hover-figure:hover .avalanches-hover-image{transform:scale(1.055);filter:saturate(1.07)}
.avalanches-figcaption{padding:.65rem .75rem;font-size:.78rem;color:#345d73;text-align:center;background:#f0f8fd;position:relative;z-index:1;line-height:1.5}
.avalanches-back-button{display:inline-flex;align-items:center;justify-content:center;column-gap:.6rem;min-height:44px;background:#147d9e;color:#fff!important;border-radius:999px;padding:.8rem 1.5rem;font-weight:800;text-decoration:none!important;transition:background .2s,transform .2s}
.avalanches-back-button:hover,.avalanches-back-button:focus-visible{background:#0b4c73;color:#fff!important;text-decoration:none!important;transform:translateY(-1px)}
.avalanches-sources{border-top:1px solid #dce9ef;padding-top:1.5rem;margin-top:2rem}
.avalanches-article a:focus-visible,.avalanches-toc a:focus-visible,.avalanches-hero a:focus-visible{outline:3px solid #0d96b1;outline-offset:3px;border-radius:4px}
@media(max-width:1050px){.avalanches-layout{grid-template-columns:1fr}.avalanches-sidebar{position:static;max-height:none}.avalanches-toc-items{grid-template-columns:repeat(2,minmax(0,1fr));gap:.15rem .45rem}}
@media(max-width:780px){.avalanches-hero{min-height:280px}.avalanches-hero-inner{padding:30px 22px}.avalanches-intro{grid-template-columns:1fr}.avalanches-illustrated-row{grid-template-columns:minmax(0,1fr)}.avalanches-row-copy,.avalanches-illustrated-row .avalanches-figure,.avalanches-illustration-left .avalanches-row-copy,.avalanches-illustration-left .avalanches-figure{grid-column:1;grid-row:auto}.avalanches-row-copy{grid-row:1!important}.avalanches-illustrated-row .avalanches-figure{grid-row:2!important}.avalanches-article{padding:1.1rem}}
@media(max-width:560px){.avalanches-toc-items{grid-template-columns:1fr}.avalanches-hero-title{font-size:1.9rem}.avalanches-hero-desc{font-size:.94rem}.avalanches-hero{min-height:330px}.avalanches-chapter-heading{gap:.6rem;font-size:1.2rem}.avalanches-heading-num{flex-basis:2.05rem;height:2.05rem;font-size:1rem}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.avalanches-hero-action,.avalanches-figure,.avalanches-hover-image,.avalanches-back-button{transition:none!important}.avalanches-hover-figure:hover,.avalanches-hover-figure:hover .avalanches-hover-image{transform:none!important}}

/* V4 — Navigation accessible et repère clavier */
.avalanches-skip-link{position:absolute;top:-100px;left:12px;z-index:1000;padding:.7rem 1.1rem;background:#fff;color:#063b59;border:3px solid #0c869e;border-radius:8px;font-weight:800;text-decoration:none}
.avalanches-skip-link:focus{top:12px;outline:3px solid #fff;outline-offset:3px}
#contenu:focus{outline:none}
.avalanches-toc-link:focus-visible,.avalanches-back-link:focus-visible,.avalanches-back-button:focus-visible,.avalanches-hero-action:focus-visible,.avalanches-chapter a:focus-visible,.avalanches-sources a:focus-visible{outline:3px solid #007a98;outline-offset:3px}
.avalanches-chapter [role="region"][tabindex="0"]:focus-visible{outline:3px solid #007a98;outline-offset:2px}
.avalanches-chapter [role="region"]{max-width:100%;overscroll-behavior-inline:contain}
.avalanches-chapter table{width:100%;min-width:600px}
.avalanches-hero{background-color:#152f48}
.avalanches-hero-inner,.avalanches-page,.avalanches-article,.avalanches-chapter{min-width:0}
@media(max-width:480px){.avalanches-hero-inner{padding:1.7rem 1rem}.avalanches-hero-title{font-size:clamp(1.55rem,7vw,1.9rem)}.avalanches-hero-desc{line-height:1.5}.avalanches-chapter{padding:.9rem}.avalanches-article{padding:.8rem}.avalanches-figure{max-width:100%}.avalanches-toc-link{min-height:44px}}
@media(prefers-reduced-motion:reduce){.avalanches-toc-link,.avalanches-back-link,.avalanches-skip-link{transition:none!important}.avalanches-hover-figure:hover .avalanches-hover-image{filter:none!important}}
@media print{
  @page{margin:14mm}
  html{scroll-behavior:auto}
  body.avalanches-body{background:#fff!important;color:#000!important;display:block!important}
  #global-header,#global-footer,#toast-container,.avalanches-sidebar,.avalanches-skip-link,.avalanches-hero-action,.avalanches-back-link,.avalanches-back-button{display:none!important}
  .avalanches-hero{min-height:0!important;display:block!important;background:none!important;box-shadow:none!important;border-bottom:2px solid #607e8b!important;color:#000!important;page-break-after:avoid}
  .avalanches-hero-inner{width:auto!important;max-width:none!important;padding:0 0 9mm!important}
  .avalanches-eyebrow,.avalanches-hero-title,.avalanches-hero-desc{color:#000!important;text-shadow:none!important}
  .avalanches-page{padding:0!important;max-width:none!important;width:100%!important;margin:0!important}
  .avalanches-layout{display:block!important}
  .avalanches-article,.avalanches-chapter,.avalanches-intro,.avalanches-keypoint,.avalanches-figure{box-shadow:none!important;background:#fff!important}
  .avalanches-article{border:0!important;padding:0!important}
  .avalanches-chapter{border:1px solid #ddd!important;margin:0 0 6mm!important;padding:4mm!important;break-inside:auto}
  .avalanches-chapter-heading{break-after:avoid;page-break-after:avoid;color:#173e58!important}
  .avalanches-illustrated-row{break-inside:avoid;page-break-inside:avoid}
  .avalanches-figure{break-inside:avoid;page-break-inside:avoid}
  .avalanches-hover-image{max-height:75mm;object-fit:contain!important;transform:none!important}
  .avalanches-intro{break-inside:avoid}
  .avalanches-chapter [role="region"]{overflow:visible!important}
  .avalanches-chapter table{min-width:0!important;font-size:9pt}
  .avalanches-chapter th,.avalanches-chapter td{padding:4pt!important}
  a{color:inherit!important;text-decoration:underline!important}
  a[href^="http"]:after{content:""}
}
