/* ═══════════════════════════════════════════════════════════
   COLS DES PYRÉNÉES — design « aube en montagne »
   écru neige · ardoise · terracotta · crêtes bleu brume
   ═══════════════════════════════════════════════════════════ */
:root {
  --paper: #f6f4ee;
  --paper2: #edeae0;
  --card: #ffffff;
  --card2: #fffdf7;
  --tint: var(--tint);
  --ink: #232b33;
  --ink2: #46525c;
  --muted: #8a939c;
  --line: rgba(35, 43, 51, .12);
  --accent: #c8400e;
  --accent-fill: #c8400e; /* aplats : reste profond en mode nuit (texte blanc lisible) */
  --accent-soft: rgba(200,64,14,.09);
  --green: #2a9d3a;
  --green-fill: #2a9d3a;
  --night: #242e37;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(35, 43, 51, .08);
  --font-d: 'Barlow Condensed', 'Inter', sans-serif;
  --font-s: 'Caveat', 'Segoe Script', cursive;
  font-size: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--paper);
  /* quadrillage de cahier, très léger */
  background-image:
    linear-gradient(rgba(35, 43, 51, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 43, 51, .045) 1px, transparent 1px);
  background-size: 26px 26px, 26px 26px;
  background-position: 0 0, 0 0;
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-d); text-transform: uppercase; letter-spacing: .015em; line-height: .95; }
::selection { background: #d8ccb8; color: var(--ink); }

/* ── surlignage marqueur (col gravi, façon fluo de cahier) ── */
.hl {
  background: linear-gradient(100deg,
    rgba(74, 189, 106, 0) 0.8%, rgba(74, 189, 106, .38) 3%,
    rgba(74, 189, 106, .32) 50%,
    rgba(74, 189, 106, .38) 97%, rgba(74, 189, 106, 0) 99.2%);
  border-radius: .35em .6em .4em .5em;
  padding: 0 .18em; margin: 0 -.08em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.rough-annotation { pointer-events: none; }

/* ── doodles « dessins d'enfant » en fond ── */
.doodle {
  position: absolute; pointer-events: none; user-select: none;
  color: rgba(35, 43, 51, .30); z-index: 0;
}
main section { position: relative; }
.sd { color: rgba(35, 43, 51, .26); }
.dd-sun { top: 11%; right: 7%; width: 120px; color: rgba(200,64,14, .5); transform: rotate(9deg); animation: bob 6s ease-in-out infinite; }
.dd-cloud1 { top: 17%; left: 5%; width: 130px; color: rgba(35, 43, 51, .22); }
.dd-cloud2 { top: 30%; right: 22%; width: 85px; color: rgba(35, 43, 51, .16); transform: scaleX(-1); }
.dd-ossau-wrap { bottom: 37%; right: 6%; width: 180px; color: rgba(35, 43, 51, .34); transform: rotate(-2deg); }
.dd-ossau-wrap .dd-ossau { width: 100%; }
.doodle-label {
  display: block; text-align: center; margin-top: -6px;
  font-family: var(--font-s); font-size: 1.3rem; font-weight: 600;
  color: rgba(200,64,14, .65); transform: rotate(-4deg);
}
@keyframes bob { 0%, 100% { transform: rotate(9deg) translateY(0); } 50% { transform: rotate(7deg) translateY(-7px); } }
@media (prefers-reduced-motion: reduce) { .dd-sun { animation: none; } }

/* ── soulignement crayon en pur CSS (position toujours juste) ── */
.sec-head h2, .hero h1 .fancy {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M3 6.5 Q30 3 60 5.5 T120 5 T197 5.5' fill='none' stroke='%23c8400e' stroke-width='3' stroke-linecap='round' opacity='.95'/%3E%3Cpath d='M5 8.2 Q40 5.5 80 7 T196 6.8' fill='none' stroke='%23c8400e' stroke-width='1.8' stroke-linecap='round' opacity='.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 100%;
  background-size: 100% .16em;
  padding-bottom: .12em;
}
.hero-inner { position: relative; z-index: 2; }
@media (max-width: 900px) {
  .sd, .dd-cloud2, .dd-ossau-wrap { display: none; }
  .dd-sun { width: 80px; right: 4%; }
}

/* ── Révélations au scroll ── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .8s cubic-bezier(.22,1,.36,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; } .reveal.d2 { transition-delay: .22s; } .reveal.d3 { transition-delay: .34s; }
/* Le hero n'attend PAS le JS : ses textes (dont p.lead, l'élément LCP mesuré
   par Lighthouse) entrent en animation CSS pure dès le parsing — même geste
   visuel que .reveal.in, sans la dépendance aux scripts en fin de body. */
.hero .reveal { animation: hero-in .8s cubic-bezier(.22,1,.36,1) both; transition: none; }
.hero .reveal.d1 { animation-delay: .1s; } .hero .reveal.d2 { animation-delay: .22s; } .hero .reveal.d3 { animation-delay: .34s; }
@keyframes hero-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero .reveal { animation: none; }
  html { scroll-behavior: auto; }
}

/* ═══ Navigation ═══ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 3000;
  display: flex; align-items: center; gap: 1.4rem;
  padding: .8rem clamp(1rem, 4vw, 2.4rem);
  transition: background .35s, box-shadow .35s, padding .35s;
}
.nav.scrolled {
  background: rgba(246, 244, 238, .92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
  padding-top: .55rem; padding-bottom: .55rem;
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand-logo { height: 52px; width: auto; display: block; }
.brand-mk { width: 30px; flex: none; color: var(--accent); }
.brand-txt { font-family: var(--font-d); font-weight: 700; text-transform: uppercase; font-size: 1.15rem; letter-spacing: .04em; white-space: nowrap; }
.brand-txt em { font-family: var(--font-s); font-style: italic; text-transform: lowercase; letter-spacing: 0; font-size: .95em; }
.nav-links { display: flex; gap: 1.3rem; margin-left: auto; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  position: relative; text-decoration: none; color: var(--ink2);
  font-size: .82rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  padding: .3rem .6rem; border-radius: 8px; white-space: nowrap;
  transition: color .25s, background .25s;
}
.nav-links a::after {
  content: ''; position: absolute; left: .6rem; right: .6rem; bottom: 0; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.nav-links a:hover { color: var(--accent); background: var(--accent-soft); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--accent); }
.nav-links a.nav-lang { border: 1.5px solid var(--line); border-radius: 14px; padding: .2rem .55rem; }
.nav-links a.nav-lang::after { display: none; }
.nav-burger { display: none; }
/* pastille « nouveau » sur un onglet fraîchement lancé */
.nav-new {
  font-size: .5rem; font-weight: 700; letter-spacing: .06em;
  background: var(--accent-fill); color: #fff; border-radius: 99px;
  padding: .12rem .34rem; margin-left: .3rem;
  vertical-align: text-top; position: relative; top: -.35em;
}
.nav-links a:hover .nav-new { color: #fff; }
/* nav posée sur le hero (non scrollée) : l'encre suit le ciel (--hs-navink, ui.js),
   pas le thème du site — sinon thème nuit + ciel de jour = liens gris clair illisibles
   (et inversement thème jour sur ciel de nuit) */
.nav:not(.scrolled):not(.menu-open) .nav-links a:not(:hover):not(.active) { color: var(--hs-navink, var(--ink2)); }
.nav:not(.scrolled) .nav-theme:not(:hover),
.nav:not(.scrolled) .nav-insta:not(:hover) { color: var(--hs-navink, var(--ink2)); }
.nav:not(.scrolled) .strava-user { color: var(--hs-navink, var(--ink)); }

/* ═══ Hero — le ciel suit l'heure locale (voir heroSky dans ui.js) ═══ */
:root {
  --hero-sky1: #f2f3f2; --hero-sky2: #e4e9ec; --hero-sky3: #cfdae2; --hero-sky4: #b9c9d5;
  --hs-m1: #3a4a58; --hs-m2: #7d92a5; --hs-m3: #aebfce;
  --hs-ground: #8fa3b3; --hs-road: #c3cdd6; --hs-sun: #f2b134; --hs-bike: #14181f;
}
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(180deg, var(--hero-sky1) 0%, var(--hero-sky2) 40%, var(--hero-sky3) 75%, var(--hero-sky4) 100%);
  color: var(--ink); overflow: hidden;
  transition: background 1.5s ease;
}
.hero-scene { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1;
  object-fit: cover; object-position: center bottom;
  filter: var(--hs-imgf, none); transition: filter 1.5s ease;
}
/* étoiles filantes (nuit seulement) */
.hs-filante { opacity: 0; }
.hero.hs-night .hs-filante.f1 { animation: filante1 11s linear infinite; }
.hero.hs-night .hs-filante.f2 { animation: filante2 17s linear infinite 6s; }
@keyframes filante1 {
  0%, 84% { opacity: 0; transform: translate(190px, 45px); }
  86% { opacity: 1; }
  93% { opacity: 0; transform: translate(520px, 170px); }
  100% { opacity: 0; transform: translate(520px, 170px); }
}
@keyframes filante2 {
  0%, 88% { opacity: 0; transform: translate(1280px, 55px); }
  90% { opacity: 1; }
  96% { opacity: 0; transform: translate(980px, 190px); }
  100% { opacity: 0; transform: translate(980px, 190px); }
}
@media (prefers-reduced-motion: reduce) { .hero.hs-night .hs-filante { animation: none; } }

/* dérive lente des nuages */
#hs-cloud-1, #hs-cloud-3, #hs-cloud-5 { animation: derive 46s ease-in-out infinite alternate; }
#hs-cloud-2, #hs-cloud-4, #hs-cloud-6 { animation: derive 58s ease-in-out infinite alternate-reverse; }
@keyframes derive { from { transform: translateX(-22px); } to { transform: translateX(22px); } }
@media (prefers-reduced-motion: reduce) { #hs-cloud-1, #hs-cloud-2, #hs-cloud-3, #hs-cloud-4, #hs-cloud-5, #hs-cloud-6 { animation: none; } }

/* météo vivante : rideau de pluie et neige en boucle sans couture
   (2 champs identiques empilés ; le déplacement par cycle = exactement une tuile) */
#hs-rain { animation: hsRain 1.5s linear infinite; }
@keyframes hsRain { from { transform: translate(72px, 0); } to { transform: translate(-124px, 672px); } }
#hs-snowfall { animation: hsSnow 13s linear infinite; }
@keyframes hsSnow { from { transform: translate(72px, 0); } to { transform: translate(-8px, 672px); } }

/* orage : ciel qui gronde, éclairs en zigzag (or maison), flash bref */
.hero.hs-storm .hero-img { filter: brightness(.78) saturate(.8); }
.hero.hs-storm .hero-tint { background: rgba(70, 76, 96, .3); }
.hero.hs-storm #hs-storm { opacity: 1; }
#hs-storm .hs-bolt { opacity: 0; }
.hero.hs-storm .hs-bolt.b1 { animation: hsBolt 7.5s steps(1) infinite; }
.hero.hs-storm .hs-bolt.b2 { animation: hsBolt 11s steps(1) infinite 4.2s; }
@keyframes hsBolt {
  0%, 100% { opacity: 0; }
  81% { opacity: 1; }
  83% { opacity: 0; }
  85% { opacity: .9; }
  90% { opacity: 0; }
}
.hero.hs-storm #hs-flash { animation: hsFlash 7.5s steps(1) infinite; }
@keyframes hsFlash {
  0%, 100% { opacity: 0; }
  81% { opacity: .2; }
  83% { opacity: 0; }
  85% { opacity: .1; }
  88% { opacity: 0; }
}

/* brouillard : nappes qui dérivent sur les pentes */
.hero.hs-fog #hs-fog { opacity: 1; }
#hs-fog .hs-nappe.n1 { animation: nappe 34s ease-in-out infinite alternate; }
#hs-fog .hs-nappe.n2 { animation: nappe 46s ease-in-out infinite alternate-reverse; }
#hs-fog .hs-nappe.n3 { animation: nappe 40s ease-in-out infinite alternate; }
@keyframes nappe { from { transform: translateX(-34px); } to { transform: translateX(34px); } }

@media (prefers-reduced-motion: reduce) {
  #hs-rain, #hs-snowfall, #hs-fog .hs-nappe { animation: none; }
  .hero.hs-storm .hs-bolt, .hero.hs-storm #hs-flash { animation: none; }
  #hs-storm .hs-bolt.b1 { opacity: .85; } /* éclair posé, sans flash (le groupe reste masqué hors orage) */
}

.hero-tint { position: absolute; inset: 0; z-index: 3; background: var(--hs-tint, transparent); mix-blend-mode: multiply; transition: background 1.5s ease; }
.hero-sky-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; }
/* silhouette découpée au-dessus du ciel : soleil/lune passent derrière les crêtes.
   Mêmes règles de cadrage que .hero-img pour un alignement pixel-perfect. */
.hero-fg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4;
  object-fit: cover; object-position: center bottom; pointer-events: none;
  filter: var(--hs-imgf, none); transition: filter 1.5s ease; }
.hero-fg-tint { position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: var(--hs-tint, transparent); mix-blend-mode: multiply; transition: background 1.5s ease;
  -webkit-mask-image: url('hero-fg.webp?v=3'); mask-image: url('hero-fg.webp?v=3');
  -webkit-mask-size: cover; mask-size: cover;
  -webkit-mask-position: center bottom; mask-position: center bottom; }
.hero-sky-fx circle, .hero-sky-fx ellipse { transition: fill 1.5s ease, opacity 1.5s ease; }
#hs-sun { transition: transform 1.5s ease; }
/* lueurs du soleil : halo doux qui respire lentement, plus discret sur la lune */
.hs-lueur { transform-box: fill-box; transform-origin: center; transition: opacity 1.5s ease; }
.hs-lueur.l1 { animation: hsLueur 9s ease-in-out infinite alternate; }
.hero.hs-night .hs-lueur { opacity: .45; }
@keyframes hsLueur { from { transform: scale(1); } to { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .hs-lueur.l1 { animation: none; } }
#hs-stars { fill: #e9e6da; }
/* la petite vie du col, selon l'heure */
.hs-critter { position: absolute; z-index: 5; opacity: 0; transition: opacity 2s ease; pointer-events: none; }
.hs-oiseau { top: 16%; left: -6%; width: 34px; }
.hero.hs-day .hs-oiseau { opacity: 1; }
.hero.hs-day .hs-oiseau { animation: volero 42s linear infinite; }
.hs-oiseau svg { animation: battement 1.6s ease-in-out infinite; }
@keyframes volero { 0% { transform: translateX(0); } 100% { transform: translateX(118vw); } }
@keyframes battement { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) {
  .hs-oiseau svg { animation: none; }
  .hero.hs-day .hs-oiseau { animation: none; left: 30%; }
}
/* nuit : textes clairs pour rester lisibles */
.hero.hs-night, .hero.hs-night h1, .hero.hs-night .hero-stats .stat b { color: #efece4; }
.hero.hs-night .lead, .hero.hs-night .hero-stats .stat span { color: #c3c8d2; }
.hero.hs-night .hero-stats { border-top-color: rgba(240, 237, 230, .28); }
.hero.hs-night .doodle { opacity: .35; }
.hero-inner {
  position: relative; z-index: 5;
  max-width: 1150px; width: 100%; margin: 0 auto;
  padding: 7rem clamp(1.2rem, 4vw, 2.4rem) 10rem;
}
.kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-s); font-size: 1.25rem; font-weight: 600;
  color: var(--accent); margin-bottom: 1.2rem;
}
.hero h1 {
  font-size: clamp(3.4rem, 10.5vw, 8rem);
  font-weight: 700;
  /* la couleur suit le ciel du hero (jour/soir/nuit), pas le thème du site,
     sinon thème nuit + ciel de jour = titre crème illisible */
  color: var(--hs-titre, var(--ink));
  transition: color 1.5s ease;
}
.hero h1 .fancy, .hero h1 em.fancy {
  display: block;
  font-family: var(--font-s); font-style: normal; font-weight: 600;
  text-transform: lowercase; letter-spacing: 0;
  font-size: .78em; color: var(--accent);
}
.hero .lead {
  max-width: 580px; margin: 1.6rem 0 2.6rem;
  font-family: var(--font-s); font-size: 1.5rem; line-height: 1.3;
  color: #fff; text-shadow: 0 1px 14px rgba(20,24,31,.55), 0 1px 3px rgba(20,24,31,.4);
}
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 2.2rem 3rem;
  padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,.4);
  max-width: 820px;
}
.hero-stats .stat b { display: block; font-family: var(--font-d); font-weight: 700; font-size: 2.3rem; line-height: 1; color: #fff; text-shadow: 0 1px 14px rgba(20,24,31,.55), 0 1px 3px rgba(20,24,31,.4); }
.hero-stats .stat span { font-size: .7rem; color: rgba(255,255,255,.92); text-transform: uppercase; letter-spacing: .14em; text-shadow: 0 1px 8px rgba(20,24,31,.5); }
.scroll-cue {
  position: absolute; left: 50%; bottom: 2.4rem; transform: translateX(-50%);
  z-index: 6; width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.75); border-radius: 14px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: var(--card); animation: cue 1.8s infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ═══ Barre de filtres ═══ */
.toolbar {
  position: sticky; top: 52px; z-index: 2500;
  background: rgba(246, 244, 238, .93); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: .65rem clamp(1rem, 4vw, 2.4rem);
}
.toolbar-inner { max-width: 1150px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.searchbox {
  display: inline-flex; align-items: center; gap: .5rem;
  flex: 1 1 170px; max-width: 250px;
  border: 1.5px solid var(--line); border-radius: 99px; background: var(--card);
  padding: .45rem .9rem; color: var(--muted);
  transition: border-color .25s;
}
.searchbox:focus-within { border-color: var(--ink); }
.searchbox input { border: 0; outline: 0; background: none; font: inherit; font-size: .88rem; width: 100%; color: var(--ink); }
.chip {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 99px;
  padding: .42rem .8rem; font: inherit; font-size: .8rem; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: .4rem;
  transition: all .22s cubic-bezier(.22,1,.36,1);
}
.chip:hover { transform: translateY(-1px); }
.chip .swatch { width: 10px; height: 10px; border-radius: 50%; }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.toolbar .count { margin-left: auto; font-size: 1.05rem; color: var(--muted); white-space: nowrap; font-family: var(--font-s); font-weight: 500; }

/* menu déroulant custom */
.dd { position: relative; }
.dd-btn {
  display: inline-flex; align-items: center; gap: .55rem;
  border: 1.5px solid var(--line); background: var(--card); border-radius: 99px;
  padding: .45rem 1rem; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer;
  transition: all .22s;
}
.dd-btn:hover { transform: translateY(-1px); }
.dd-btn svg { transition: transform .3s; }
.dd.open .dd-btn svg { transform: rotate(180deg); }
.dd-panel {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px; z-index: 50;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 46px rgba(35,43,51,.16);
  padding: .4rem; opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98);
  transition: all .28s cubic-bezier(.22,1,.36,1);
}
.dd.open .dd-panel { opacity: 1; visibility: visible; transform: none; }
.dd-item {
  display: block; width: 100%; text-align: left; border: 0; background: none;
  font: inherit; font-size: .85rem; padding: .5rem .8rem; border-radius: 9px; cursor: pointer;
  color: var(--ink2); transition: background .15s, color .15s, padding-left .2s;
}
.dd-item:hover { background: var(--paper2); padding-left: 1rem; }
.dd-item.sel { color: var(--accent); font-weight: 700; }

/* pilule de progression */
.progress-pill {
  position: relative; overflow: hidden; border: 1.5px solid var(--line); border-radius: 99px;
  background: var(--card); font: inherit; font-size: .78rem; font-weight: 700;
  padding: .42rem .9rem; cursor: pointer; color: var(--ink); transition: all .2s;
}
.progress-pill:hover { transform: translateY(-1px); }
.progress-pill i {
  position: absolute; left: 0; top: 0; bottom: 0; background: rgba(42,157,58,.16);
  transition: width .6s cubic-bezier(.22,1,.36,1);
}
.progress-pill span { position: relative; }

/* ═══ Sections ═══ */
main section { max-width: 1150px; margin: 0 auto; padding: clamp(3.2rem, 7vw, 5rem) clamp(1.2rem, 4vw, 2.4rem) 1rem; }
.sec-head { display: flex; align-items: baseline; gap: 1rem; }
.sec-num { font-family: var(--font-s); font-size: 1.25rem; font-weight: 600; color: var(--accent); flex: none; text-transform: lowercase; }
.sec-head h2 { font-size: clamp(2.1rem, 5vw, 3.1rem); font-weight: 700; }
.sec-rule { flex: 1; height: 1.5px; background: var(--line); transform-origin: left; }
.reveal.in .sec-rule { animation: rule 1s cubic-bezier(.22,1,.36,1); }
@keyframes rule { from { transform: scaleX(0); } }
section .sub { color: var(--muted); font-size: .95rem; margin: .5rem 0 1.6rem; max-width: 720px; }
section .sub em { font-family: var(--font-s); }

/* ═══ Carte ═══ */
.map-wrap {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  position: relative;
}
#map { height: min(72vh, 640px); z-index: 1; }
.map-wrap.fullscreen { position: fixed; inset: 0; z-index: 3400; border-radius: 0; border: 0; }
.map-wrap.fullscreen #map { height: 100vh; height: 100svh; }
.map-ctl-btn {
  font-size: 15px; line-height: 30px; text-align: center; width: 30px; height: 30px;
  display: block; text-decoration: none; color: #333; background: var(--card); cursor: pointer;
}
.leaflet-tooltip {
  font-family: 'Inter', sans-serif; font-size: .76rem; font-weight: 600;
  border-radius: 8px; border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.14);
}
.marker-col {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; border-radius: 50%;
  color: #fff; font-weight: 700; font-size: 10px; font-family: var(--font-d);
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35);
  animation: pop .45s cubic-bezier(.34,1.56,.64,1) backwards;
  transition: transform .2s;
}
.marker-col:hover { transform: scale(1.25); }
.marker-col.closed { filter: grayscale(.85); opacity: .9; border-color: #b3402e; }
.marker-cluster-col {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--paper); color: var(--ink);
  font-weight: 700; font-size: 12px; font-family: var(--font-d);
  border: 2.5px solid var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.28);
  transition: transform .2s;
}
.marker-cluster-col:hover { transform: scale(1.15); }

/* ═══ Dernières infos route ═══ */
.roadnews {
  margin-top: 1.2rem; background: var(--card2); border: 1.5px solid var(--line);
  border-radius: 14px; box-shadow: 2px 3px 0 rgba(35,43,51,.08); padding: 1rem 1.2rem 1.1rem;
}
.roadnews h3 { font-family: var(--font-d); text-transform: uppercase; font-size: 1.25rem; letter-spacing: .04em; margin-bottom: .5rem; }
.roadnews ul { list-style: none; padding: 0; margin: 0; }
.roadnews li {
  display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap;
  padding: .5rem 0; border-bottom: 1px dashed var(--line); font-size: .88rem;
}
.roadnews li:last-child { border-bottom: 0; }
.roadnews li.rn-important {
  background: #e8f3ea; border: 1.5px solid rgba(46,125,71,.35); border-radius: 10px;
  padding: .55rem .7rem; margin: .4rem 0;
}
.rn-flag {
  background: #2e7d47; color: #fff; font-size: .6rem; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; padding: .14rem .5rem; border-radius: 999px; white-space: nowrap;
  position: relative; top: -1px;
}
.rn-ico { flex: none; }
.rn-col {
  border: 0; background: none; padding: 0; cursor: pointer;
  font-family: var(--font-d); font-weight: 700; font-size: 1rem; color: var(--ink);
  text-decoration: underline dashed rgba(200,64,14,.5); text-underline-offset: 3px;
}
.rn-col:hover { color: var(--accent); }
.rn-txt { color: var(--ink2); flex: 1 1 240px; }
.rn-txt b { color: #b3402e; }
.rn-date { margin-left: auto; font-size: .7rem; color: var(--muted); white-space: nowrap; }
.rn-empty { color: #2e7d47; font-weight: 600; }
.rn-src { margin-top: .6rem; font-size: .7rem; color: var(--muted); line-height: 1.5; }

/* ═══ Calculateur de temps ═══ */
/* calculateur unifié (temps estimé + puissance réelle) */
.calc2 { margin: .6rem 1.4rem 0; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card2); padding: .85rem 1rem 1rem; }
.calc2-head { display: flex; align-items: baseline; gap: .5rem; cursor: pointer; user-select: none; }
.calc2-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.calc2-body { margin-top: .7rem; }
.calc2-head h4 { font-family: var(--font-d); font-weight: 700; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .03em; }
.calc2-wkg { font-size: .76rem; color: var(--muted); white-space: nowrap; margin-left: auto; }
.calc2-chev { font-size: .8rem; color: var(--muted); width: 1em; text-align: center; }
.calc2-set { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .9rem; font-size: .82rem; color: var(--ink2); margin-bottom: .8rem; }
.calc2-set label { display: inline-flex; align-items: baseline; gap: .35rem; }
.calc2-set input { width: 4rem; border: 1.5px solid var(--line); border-radius: 8px; padding: .28rem .45rem; font: inherit; text-align: right; background: var(--card); }
.calc2-lvl { display: inline-flex; align-items: center; gap: .3rem; flex-wrap: wrap; color: var(--muted); font-size: .74rem; }
.calc2-lvl button { border: 1.5px solid var(--line); background: var(--paper); border-radius: 99px; font: inherit; font-size: .73rem; font-weight: 600; padding: .22rem .6rem; cursor: pointer; color: var(--ink2); transition: all .15s; }
.calc2-lvl button:hover { border-color: var(--accent); color: var(--accent); }
.calc2-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.calc2-tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .75rem .85rem; display: flex; flex-direction: column; gap: .12rem; }
.calc2-lbl { font-family: var(--font-s); font-weight: 700; font-size: .82rem; color: var(--ink2); }
.calc2-big { font-family: var(--font-d); font-weight: 700; font-size: 2.05rem; color: var(--accent); line-height: 1.02; }
.calc2-big.calc2-dash { color: var(--line); }
.calc2-note { font-size: .72rem; color: var(--muted); line-height: 1.35; }
.calc2-time { display: flex; align-items: center; gap: .28rem; flex-wrap: wrap; font-size: .74rem; color: var(--ink2); margin-top: .35rem; }
.calc2-time input { width: 2.7rem; border: 1.5px solid var(--line); border-radius: 7px; padding: .22rem .3rem; font: inherit; text-align: center; background: var(--card); }
.calc2-go { border: 1.5px solid var(--accent); background: var(--accent-fill); color: #fff; border-radius: 99px; font: inherit; font-weight: 700; font-size: .72rem; padding: .24rem .7rem; cursor: pointer; }
.calc2-detail { margin-top: .75rem; }
.calc2-detail summary { cursor: pointer; font-size: .78rem; color: var(--accent); font-weight: 600; list-style: none; }
.calc2-detail summary::-webkit-details-marker { display: none; }
.calc2-detail summary::before { content: '▸ '; }
.calc2-detail[open] summary::before { content: '▾ '; }
.calc2-fine { font-size: .68rem; color: var(--muted); line-height: 1.5; margin-top: .65rem; }
@media (max-width: 480px) { .calc2-grid { grid-template-columns: 1fr; } }
.calc-table { max-height: 220px; overflow-y: auto; margin: .5rem 0 0; border: 1px solid var(--line); border-radius: 8px; }
.calc-table table { width: 100%; border-collapse: collapse; font-size: .76rem; min-width: 0; }
.calc-table th, .calc-table td { padding: .25rem .55rem; text-align: right; border-bottom: 1px solid rgba(35,43,51,.08); }
.calc-table th:first-child, .calc-table td:first-child { text-align: left; }
.calc-table thead th { position: sticky; top: 0; background: var(--card2); font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* ═══ Badges du carnet ═══ */
.badges-title { margin-top: 1.2rem; }
.badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .55rem; margin-top: .5rem; }
.badge-card {
  position: relative; cursor: help;
  display: flex; flex-direction: column; align-items: center; gap: .15rem; text-align: center;
  border: 1.5px dashed var(--line); border-radius: 12px; padding: .6rem .4rem .55rem;
  background: rgba(246,244,238,.6); filter: grayscale(.9); opacity: .62;
}
.bd-tip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px);
  width: max-content; max-width: 230px; z-index: 20; pointer-events: none;
  background: #242e37; color: #f0ede4; font-size: .72rem; line-height: 1.45; font-weight: 400;
  padding: .5rem .7rem; border-radius: 9px; box-shadow: 0 8px 22px rgba(0,0,0,.28);
  opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s;
  font-family: 'Inter', sans-serif; filter: grayscale(0);
}
.bd-tip::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #242e37;
}
.badge-card:hover .bd-tip, .badge-card:focus-visible .bd-tip, .badge-card:focus .bd-tip {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
/* la carte survolée passe devant ses voisines : sans ça, les puces de rareté
   (« 28 % », « TOP 1 % ») des cartes d'à côté se peignent par-dessus la bulle,
   chaque carte créant son propre contexte d'empilement (filter / opacity). */
.badge-card:hover, .badge-card:focus-visible, .badge-card:focus { z-index: 30; }
.badges-grid .badge-card:nth-child(-n+3) .bd-tip { bottom: auto; top: calc(100% + 8px); }
.badges-grid .badge-card:nth-child(-n+3) .bd-tip::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #242e37; }
.badge-card.earned {
  filter: none; opacity: 1; background: var(--card2); border-style: solid;
  border-color: rgba(200,64,14,.45); box-shadow: 2px 3px 0 rgba(35,43,51,.08);
}
.bd-ico { line-height: 0; }
/* le bouton « Survol 3D » est un lien mais s'habille comme ses voisins boutons */
a.fly-btn { text-decoration: none; display: inline-flex; align-items: center; }

/* carte mystère : les succès secrets encore à découvrir */
.badge-card.bd-secret { filter: none; opacity: .8; }
.bd-q { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  font-family: var(--font-s); font-size: 2.3rem; font-weight: 700; color: var(--accent); line-height: 1; }
.bd-ico svg { width: 42px; height: 42px; display: block; }
.badge-card:not(.earned) .bd-ico svg { filter: grayscale(1) opacity(.42); }
/* trophée légendaire : L'Intégrale PyCol (tous les cols) */
.badge-card.legendary {
  filter: none; opacity: .9; border-style: solid; border-color: #e0b048;
  background: linear-gradient(145deg, #fff6df, #ffe7b0);
}
.badge-card.legendary:not(.earned) .bd-ico svg { filter: none; opacity: .55; }
.badge-card.legendary .bd-name { color: #9a6b12; }
.badge-card.legendary.earned {
  opacity: 1; border-color: #d4972a;
  box-shadow: 0 0 0 2px rgba(212,151,42,.35), 0 6px 22px rgba(212,151,42,.45);
  animation: legendGlow 2.6s ease-in-out infinite;
}
.badge-card.legendary.earned .bd-progress { color: #b8860b; }
.bd-crown {
  position: absolute; top: -11px; right: -7px; font-size: 1.15rem; color: #e9b73f;
  transform: rotate(14deg); filter: drop-shadow(0 1px 2px rgba(120,80,10,.55));
}
/* puce de rareté (% des grimpeurs qui l'ont décroché) */
.bd-rarity {
  position: absolute; top: -8px; left: -6px; z-index: 2;
  font-size: .6rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  padding: .12rem .38rem; border-radius: 7px; color: #fff; white-space: nowrap;
  box-shadow: 0 1px 3px rgba(20,24,31,.28);
}
.bd-rarity.common { background: #8a939c; }
.bd-rarity.rare   { background: #3a7bd5; }
.bd-rarity.epic   { background: #8a4fd0; }
.bd-rarity.leg    { background: linear-gradient(120deg, #e0952a, #f4b833); color: #3a2606; }

/* ══ Passeport des cols : une carte-tampon par col ══ */
.pp-intro { color: #6a6152; font-size: .9rem; margin: .1rem 0 .6rem; }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 14px; }
.pp {
  container-type: inline-size;
  position: relative; aspect-ratio: 430 / 610; border-radius: 14px; overflow: hidden; cursor: pointer;
  background: radial-gradient(120% 90% at 20% 0%, #f6efdc 0%, #efe4c9 55%, #e7dabb 100%);
  box-shadow: 0 10px 26px rgba(20,24,31,.22), inset 0 0 0 1px rgba(120,90,40,.14);
  color: #26313f; transition: transform .18s ease, box-shadow .18s ease;
}
.pp:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(20,24,31,.3), inset 0 0 0 1px rgba(120,90,40,.2); }
.pp::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(120,90,40,.05) 1px, transparent 1px), radial-gradient(rgba(120,90,40,.04) 1px, transparent 1px);
  background-size: 4px 4px, 7px 7px; background-position: 0 0, 2px 3px;
}
.pp-frame { position: absolute; inset: 3.3cqw; border: 1.5px solid rgba(120,80,35,.5); border-radius: 2cqw; }
.pp-frame2 { position: absolute; inset: 4.6cqw; border: 1px solid rgba(120,80,35,.32); border-radius: 1.4cqw; }
.pp-guilloche { position: absolute; inset: 4.6cqw; border-radius: 1.4cqw; opacity: .16; pointer-events: none; }
.pp-wm { position: absolute; left: 50%; top: 54%; transform: translate(-50%,-50%); width: 68cqw; height: auto;
  opacity: .07; pointer-events: none; filter: grayscale(1); }
.pp-inner { position: absolute; inset: 4.6cqw; padding: 4.4cqw 5.4cqw; display: flex; flex-direction: column; }
.pp-head { display: flex; align-items: flex-start; justify-content: space-between; }
.pp-doc { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; letter-spacing: .16em;
  font-size: 3cqw; text-transform: uppercase; color: #7a5a2e; line-height: 1.2; }
.pp-doc small { display: block; font-size: 2.4cqw; letter-spacing: .28em; color: #a98b56; font-weight: 500; }
.pp-brand { display: flex; align-items: center; gap: 1.2cqw; font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; font-size: 4.4cqw; color: #26313f; }
.pp-brand svg { width: 6cqw; height: 4cqw; }
.pp-rule { height: 1px; background: linear-gradient(90deg, transparent, rgba(120,80,35,.5), transparent); margin-top: 2.8cqw; }
.pp-no { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .1em; font-size: 2.7cqw;
  color: #a98b56; margin-top: 3.2cqw; text-transform: uppercase; }
.pp-name { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 9.4cqw; line-height: .98;
  color: #1d2735; margin-top: .4cqw; }
.pp-sub { font-size: 3cqw; color: #5b6572; margin-top: 1.8cqw; font-weight: 500; }
.pp-stats { display: flex; gap: 1.8cqw; margin-top: 4cqw; }
.pp-stat { flex: 1; background: rgba(255,251,240,.66); border: 1px solid rgba(120,80,35,.2);
  border-radius: 2cqw; padding: 2cqw 1cqw; text-align: center; }
.pp-stat b { display: block; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 5.2cqw; color: #1d2735; }
.pp-stat span { font-size: 2.1cqw; letter-spacing: .06em; text-transform: uppercase; color: #93805c; }
.pp-versants { display: flex; gap: 1.6cqw; margin-top: 3.2cqw; flex-wrap: wrap; }
.pp-vs { font-size: 2.5cqw; padding: .9cqw 2cqw; border-radius: 999px; font-weight: 600;
  background: rgba(200,64,14,.12); color: #a8360c; border: 1px solid rgba(200,64,14,.28); }
.pp-vs.off { background: rgba(120,120,120,.08); color: #8a8a8a; border-color: rgba(120,120,120,.22); }
.pp-spacer { flex: 1; min-height: 4cqw; }
.pp-mrz { font-family: 'Courier New', monospace; font-size: 2.9cqw; letter-spacing: .04em;
  color: #6a5637; background: rgba(255,251,240,.5); border-top: 1px dashed rgba(120,80,35,.4);
  padding: 1.8cqw 1cqw .4cqw; white-space: nowrap; overflow: hidden; }
.pp-mrz div { line-height: 1.5; }
.pp-stamp { position: absolute; right: 6cqw; bottom: 21cqw; width: 40cqw; height: 40cqw; transform: rotate(-13deg); pointer-events: none; }
.pp-todo-badge { position: absolute; right: 7cqw; bottom: 24cqw; transform: rotate(-8deg);
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; letter-spacing: .12em;
  font-size: 5cqw; color: rgba(120,80,35,.32); border: 3px solid rgba(120,80,35,.28);
  padding: 1.4cqw 3.6cqw; border-radius: 2cqw; text-transform: uppercase; }
.pp.todo { filter: saturate(.55); }
.pp.todo .pp-name, .pp.todo .pp-stat b { color: #7c8794; }

/* ══ Chronos d'ascension (fiche col) ══ */
.chrono-block { margin: .8rem 0 0; padding: .7rem .9rem .6rem; background: var(--card2);
  border: 1.5px solid var(--line); border-radius: 12px; box-shadow: 2px 3px 0 rgba(35,43,51,.08); }
.chrono-block.empty { font-size: .85rem; color: #6a6152; background: #f6f2e8; border-style: dashed; box-shadow: none; }
.chrono-head { font-family: var(--font-s); font-weight: 600; font-size: 1.15rem; color: var(--ink); }
.chrono-best { margin-top: .25rem; font-size: .95rem; color: #46525c; }
.chrono-best b { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 1.5rem; color: var(--accent); }
.chrono-list { list-style: none; margin: .45rem 0 0; padding: 0; }
.chrono-list li { display: flex; align-items: baseline; gap: .7rem; padding: .18rem 0;
  border-top: 1px dashed rgba(35,43,51,.12); font-size: .88rem; color: #46525c; }
.chrono-list li span { min-width: 5.4rem; }
.chrono-list li b { font-family: 'Barlow Condensed', sans-serif; font-size: 1.1rem; color: var(--ink); }
.chrono-list li i { font-style: normal; color: #9a917f; font-size: .8rem; margin-left: auto; }
.chrono-list li.is-best i { color: var(--accent); font-weight: 600; }
.chrono-more { font-size: .78rem; color: #9a917f; margin-top: .2rem; }

/* ligne « X % des cyclistes connectés l'ont gravi » sur la fiche col */
.col-rarity {
  display: inline-flex; align-items: center; gap: .3rem;
  /* même gouttière que .zone / .state-line / .wx-line de la fiche modale */
  margin: .5rem 1.4rem .1rem; max-width: calc(100% - 2.8rem); padding: .28rem .6rem;
  font-size: .82rem; font-weight: 600; color: #4a4034;
  background: #f3efe6; border: 1px solid #e6ddcc; border-radius: 999px;
}
.col-rarity b { font-weight: 800; }
.col-rarity::before { content: "🚵"; font-size: .9em; }
.col-rarity.common { color: #4a4034; }
.col-rarity.rare   b { color: #2f6bc0; }
.col-rarity.epic   b { color: #7a41c0; }
.col-rarity.leg    { background: linear-gradient(120deg, #fbf1dc, #f7e6bf); border-color: #eacf8f; }
.col-rarity.leg    b { color: #9a6a10; }
@keyframes legendGlow {
  0%, 100% { box-shadow: 0 0 0 2px rgba(212,151,42,.3), 0 4px 16px rgba(212,151,42,.33); }
  50% { box-shadow: 0 0 0 3px rgba(212,151,42,.55), 0 9px 28px rgba(212,151,42,.6); }
}
@media (prefers-reduced-motion: reduce) { .badge-card.legendary.earned { animation: none; } }
.bd-name { font-family: var(--font-d); font-weight: 700; font-size: .82rem; line-height: 1.15; }
.bd-progress { font-family: var(--font-s); font-size: .95rem; color: var(--muted); }
.badge-card.earned .bd-progress { color: #2e7d47; font-weight: 600; }

/* ═══ Météo du week-end ═══ */
.wkweather {
  margin-top: 1.2rem; background: var(--card2); border: 1.5px solid var(--line);
  border-radius: 14px; box-shadow: 2px 3px 0 rgba(35,43,51,.08); padding: 1rem 1.2rem 1.1rem;
}
.wkweather h3 { font-family: var(--font-d); text-transform: uppercase; font-size: 1.25rem; letter-spacing: .04em; margin-bottom: .5rem; }
.wk-row {
  display: grid; grid-template-columns: 1fr 172px 172px; gap: .6rem; align-items: baseline;
  padding: .4rem 0; border-bottom: 1px dashed var(--line); font-size: .85rem;
}
.wk-row:last-child { border-bottom: 0; }
.wk-head { font-family: var(--font-d); text-transform: uppercase; font-size: .8rem; letter-spacing: .06em; color: var(--muted); border-bottom: 1.5px solid var(--line); }
.wk-zone { font-weight: 600; }
.wk-zone small { font-weight: 400; color: var(--muted); font-size: .72rem; }
.wk-cell { white-space: normal; line-height: 1.5; }
@media (max-width: 640px) {
  .wk-row { grid-template-columns: 1.15fr 1fr 1fr; font-size: .74rem; gap: .3rem; }
  .wk-row > * { min-width: 0; }
  .wk-zone small { display: none; }
}
.marker-col.done { box-shadow: 0 0 0 3px var(--green), 0 2px 6px rgba(0,0,0,.35); }
@keyframes pop { from { transform: scale(0); } }
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: 0 16px 40px rgba(35,43,51,.28); font-family: 'Inter', sans-serif; }
.leaflet-popup-content { margin: 14px 18px; }
.popup h3 { font-size: 1.3rem; margin-bottom: .15rem; }
.popup .meta { color: var(--muted); font-size: .78rem; }
.popup a.btn {
  display: inline-block; margin-top: .55rem; background: var(--ink); color: #fff; text-decoration: none;
  font-size: .76rem; font-weight: 600; padding: .38rem .85rem; border-radius: 99px; transition: background .2s;
}
.popup a.btn:hover { background: var(--accent-fill); }
.legend { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-top: .9rem; font-size: .8rem; color: var(--muted); }
.legend i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; margin-right: .4rem; vertical-align: -1px; }

/* ═══ Le carnet ═══ */
.carnet { position: relative; }
.carnet-tabs {
  display: flex; gap: .5rem; padding-left: 3.2rem; flex-wrap: wrap;
  position: relative; z-index: 2;
}
.carnet-tab {
  border: 1px solid rgba(35,43,51,.22); border-bottom: none;
  border-radius: 10px 10px 0 0;
  font-family: var(--font-s); font-size: 1.12rem; font-weight: 600; color: var(--ink);
  padding: .4rem 1.1rem .55rem; cursor: pointer;
  transform: translateY(6px); opacity: .82;
  transition: transform .25s cubic-bezier(.22,1,.36,1), opacity .25s;
  box-shadow: 0 -3px 8px rgba(35,43,51,.05);
}
.carnet-tab:hover { transform: translateY(2px); opacity: 1; }
.carnet-tab.active { transform: translateY(0); opacity: 1; font-weight: 700; box-shadow: 0 -5px 12px rgba(35,43,51,.09); }
.carnet-book {
  position: relative; perspective: 2200px;
  background: var(--card2);
  border: 1px solid rgba(35,43,51,.22); border-radius: 6px 14px 14px 6px;
  box-shadow: 0 16px 44px rgba(35,43,51,.14), inset 4px 0 12px rgba(35,43,51,.05);
  min-height: 460px; overflow: hidden;
}
.carnet-rings {
  position: absolute; left: 12px; top: 0; bottom: 0; width: 20px; z-index: 3;
  background-image: radial-gradient(circle at 50% 50%, #fffdf7 5px, #8a939c 6px, #8a939c 7.5px, transparent 8.5px);
  background-size: 20px 42px; background-position: 0 14px; background-repeat: repeat-y;
  pointer-events: none;
}
.carnet-page {
  position: relative; z-index: 1;
  max-height: 580px; overflow-y: auto;
  padding: 1.7rem 2.2rem 1.8rem 4.2rem;
  /* marge rouge de cahier, sans lignes derrière le texte */
  background-image:
    linear-gradient(90deg, transparent 52px, rgba(216,38,28,.22) 52px, rgba(216,38,28,.22) 53.5px, transparent 53.5px);
  transform-origin: left center;
}
.carnet-page.turn-out { transition: transform .3s cubic-bezier(.6,0,.9,.6), opacity .3s; transform: rotateY(-78deg); opacity: .25; }
.carnet-page.turn-in { animation: pagein .42s cubic-bezier(.16,.8,.3,1); }
@keyframes pagein { from { transform: rotateY(55deg); opacity: .3; } to { transform: rotateY(0); opacity: 1; } }
.carnet-page h4 {
  font-family: var(--font-s); font-size: 2rem; font-weight: 700; color: var(--ink);
  text-transform: none; letter-spacing: 0; margin-bottom: 1.1rem;
  text-decoration: underline wavy rgba(200,64,14,.5) 2px; text-underline-offset: 7px;
}
.carnet-page h5 {
  font-family: 'Inter', sans-serif; font-size: .78rem; font-weight: 700; color: var(--ink2);
  text-transform: uppercase; letter-spacing: .12em;
  margin: 1.4rem 0 .5rem; display: flex; align-items: center; gap: .6rem;
}
.carnet-massif { display: flex; align-items: center; gap: .55rem; }
.carnet-massif .carnet-emblem { width: 1.9rem; height: 1.9rem; flex: none; }
.carnet-list { list-style: none; column-width: 340px; column-gap: 3rem; }
.carnet-list li {
  font-family: 'Inter', sans-serif; font-size: .92rem; color: var(--ink);
  padding: .3rem .4rem; border-radius: 8px; cursor: pointer; break-inside: avoid;
  display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap;
  transition: background .15s;
}
.carnet-list li:hover { background: rgba(200,64,14, .07); }
.carnet-list li > span:nth-child(2) { font-weight: 600; }
.carnet-list li .cb { flex: none; width: 1.25rem; color: var(--muted); font-size: 1rem; }
.carnet-list li.is-done .cb { color: #1e7c2c; }
.carnet-list .ce-extra { color: var(--muted); font-size: .8rem; }
.carnet-list.tour { column-width: 420px; }
.carnet-list.tour li { display: block; padding: .45rem .4rem; }
.carnet-list.tour .ce-extra { display: block; margin-top: .1rem; line-height: 1.45; }
.carnet-note {
  font-family: var(--font-s); font-size: 1.45rem; font-weight: 600; color: var(--accent);
  margin-top: 1.3rem; transform: rotate(-.6deg);
}
.carnet-note.big { font-size: 1.6rem; line-height: 1.4; }
@media (max-width: 640px) {
  .carnet-page { padding: 1.2rem 1rem 1.4rem 3.4rem; max-height: 65vh; }
  .carnet-tabs {
    padding-left: 1.3rem; gap: .3rem;
    flex-wrap: nowrap; overflow-x: auto;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    padding-bottom: 8px; margin-bottom: -8px;
  }
  .carnet-tabs::-webkit-scrollbar { display: none; }
  .carnet-tab { flex: 0 0 auto; white-space: nowrap; font-size: .92rem; padding: .3rem .62rem .5rem; }
  .carnet-list { column-width: auto; }
}

/* ═══ Classement ═══ */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: .89rem; min-width: 760px; }
thead th {
  position: sticky; top: 0; background: var(--card);
  text-align: left; font-family: var(--font-d); text-transform: uppercase;
  font-size: .88rem; letter-spacing: .06em; color: var(--muted);
  padding: .9rem 1rem; border-bottom: 2px solid var(--ink);
  cursor: pointer; user-select: none; white-space: nowrap; transition: color .2s;
}
thead th:hover { color: var(--ink); }
thead th.sorted { color: var(--accent); }
tbody td { padding: .68rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr { transition: background .18s; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--paper); cursor: pointer; }
td.rank { font-family: var(--font-s); font-weight: 600; font-size: 1.15rem; width: 3.2rem; color: var(--ink2); }
td .colname { font-weight: 600; }
td .side { color: var(--muted); font-size: .98rem; display: block; font-family: var(--font-s); }
.badge { display: inline-block; font-family: var(--font-d); font-weight: 700; font-size: .78rem; color: #fff; border-radius: 7px; padding: .12rem .5rem; letter-spacing: .05em; }
.score-bar { display: inline-block; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #d9a441, var(--accent)); vertical-align: middle; margin-right: .5rem; }
/* mobile : le classement tient dans l'écran. Les colonnes secondaires
   (altitude, longueur, % max, D+) se replient — elles restent sur la fiche —
   sinon le défilement latéral cachait jusqu'au bouton « Afficher les versants ». */
@media (max-width: 640px) {
  .table-wrap table { min-width: 0; font-size: .84rem; }
  .table-wrap th:nth-child(4), .table-wrap td:nth-child(4),
  .table-wrap th:nth-child(5), .table-wrap td:nth-child(5),
  .table-wrap th:nth-child(7), .table-wrap td:nth-child(7),
  .table-wrap th:nth-child(8), .table-wrap td:nth-child(8) { display: none; }
  .table-wrap tbody td { padding: .6rem .5rem; }
  .table-wrap thead th { padding-left: .5rem; padding-right: .5rem; }
  .table-wrap td.rank { width: 2rem; }
  .table-wrap .score-bar { max-width: 34px; }
  /* les noms longs (« Hourquette d'Ancizan ») reviennent à la ligne au lieu
     d'élargir le tableau au-delà de l'écran */
  .table-wrap tbody td:nth-child(2) { white-space: normal; overflow-wrap: anywhere; }
}

/* ═══ Fiches ═══ */
.grid { margin-top: 1rem; }
/* massifs en colonnes : chaque massif est un bloc INSÉCABLE encadré,
   les blocs entiers se rangent côte à côte — un massif n'est jamais coupé */
.massif-flow { columns: 340px; column-gap: 1.2rem; }
.massif-block {
  break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid;
  display: inline-block; width: 100%;
  margin: 0 0 1.2rem; padding: .9rem .9rem .1rem;
  border: 1.5px dashed rgba(35, 43, 51, .22); border-radius: 16px;
  scroll-margin-top: 130px;
}
.massif-block .card { box-shadow: 0 2px 8px rgba(35, 43, 51, .07); }
.massif-toggle {
  margin-left: auto; flex: none; border: 1.5px solid rgba(35,43,51,.2); background: rgba(255,255,255,.65);
  border-radius: 999px; padding: .18rem .6rem; font-size: .68rem; font-weight: 700;
  font-family: 'Inter', sans-serif; text-transform: none; letter-spacing: 0; color: var(--ink2); cursor: pointer;
}
.massif-toggle:hover { border-color: var(--accent); color: var(--accent); }
.col-chips { display: flex; flex-wrap: wrap; gap: .4rem; padding-bottom: .9rem; }
.col-chip {
  border: 1.5px solid rgba(35,43,51,.18); background: var(--card2); border-radius: 10px;
  padding: .32rem .6rem; font-size: .78rem; font-weight: 600; color: var(--ink);
  cursor: pointer; font-family: 'Inter', sans-serif; text-align: left;
  transition: border-color .15s, transform .15s;
}
.col-chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.col-chip small { color: var(--muted); font-weight: 400; }
.col-chip.done { background: #e8f3ea; border-color: rgba(46,125,71,.4); }
.massif-grid { display: block; }
.massif-grid .card { break-inside: avoid; margin-bottom: .9rem; }
.massif-head {
  font-family: var(--font-d); text-transform: uppercase; letter-spacing: .04em;
  font-size: 1.5rem; margin: 0 0 .8rem; display: flex; align-items: baseline; gap: .7rem;
}
.massif-head::after { content: ''; flex: 1; border-bottom: 2px dashed var(--line); transform: translateY(-4px); }
.massif-emblem {
  width: 30px; height: 30px; flex: none; align-self: center;
  transform: rotate(-4deg); opacity: .92;
  filter: drop-shadow(1px 1.5px 0 rgba(35,43,51,.14));
}
.emblem-bg { opacity: .2; filter: saturate(.7); }
.decor-doodle { color: rgba(35, 43, 51, .18); }
/* doodles & panneaux de col générés (images), estompés en fond */
.decor-doodle-img { opacity: .34; }
.decor-sign { opacity: .3; }
.decor-color { opacity: .58; }
.decor-stick { opacity: .5; }
#decor-layer img { pointer-events: none; user-select: none; height: auto; max-height: 200px; display: block; }
.rank-more td { text-align: center; padding: .6rem; }
.rank-more button {
  border: 1.5px dashed var(--line); background: var(--paper); border-radius: 999px;
  padding: .45rem 1.2rem; font-size: .82rem; font-weight: 700; cursor: pointer;
  font-family: 'Inter', sans-serif; color: var(--ink2);
}
.rank-more button:hover { border-color: var(--accent); color: var(--accent); }
.rank-more:hover { background: none !important; cursor: default; }
#decor-layer svg { pointer-events: none; user-select: none; }
.massif-count { font-family: var(--font-s); font-size: 1.1rem; color: var(--muted); text-transform: none; letter-spacing: 0; }
.massif-anchors { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .4rem; }
.massif-anchors a {
  text-decoration: none; color: var(--ink); background: var(--card);
  border: 1.5px solid var(--line); border-radius: 999px; padding: .3rem .8rem;
  font-size: .8rem; font-weight: 600; transition: border-color .2s, color .2s;
}
.massif-anchors a:hover { border-color: var(--accent); color: var(--accent); }
.massif-anchors a small { color: var(--muted); font-weight: 400; }
.card.compact { cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s; }
.card.compact:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(35,43,51,.11); border-color: var(--accent); }
.card.compact:hover .ks-open { opacity: 1; }
.card.compact .blurb {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.key-stats {
  display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap;
  padding: .5rem 1.15rem .95rem; font-family: var(--font-d); font-size: 1.06rem; font-weight: 600;
}
.key-stats .ks-sides {
  font-family: 'Inter', sans-serif; font-size: .68rem; font-weight: 600; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 999px; padding: .1rem .5rem;
}
.key-stats .ks-open {
  margin-left: auto; font-family: 'Inter', sans-serif; font-size: .72rem; font-weight: 600;
  color: var(--accent); opacity: 0; transition: opacity .2s;
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 3px 12px rgba(35,43,51,.05);
  scroll-margin-top: 120px;
  display: flex; flex-direction: column;
  transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 18px 38px rgba(35,43,51,.12); }
.card.highlight { outline: 3px solid var(--accent); }
.card.is-done { border-color: rgba(42,157,58,.5); }
.done-ribbon {
  font-family: var(--font-s); font-size: 1.12rem; font-weight: 600; color: #1e7c2c;
  padding: .35rem 1.15rem 0; transform: rotate(-.8deg);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* col dont la route est fermée : carte au fond rouge */
.card.is-closed { border-color: rgba(201,42,42,.6); background: #fdeceb; box-shadow: 0 3px 12px rgba(201,42,42,.12); }
.card.is-closed:hover { box-shadow: 0 14px 32px rgba(201,42,42,.2); border-color: #c92a2a; }
.closed-ribbon {
  font-family: var(--font-s); font-size: 1.12rem; font-weight: 700; color: #b3261e;
  padding: .35rem 1.15rem 0; transform: rotate(-.8deg);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-head { padding: 1.1rem 1.15rem .5rem; display: flex; align-items: start; gap: .7rem; }
.card-head h3 { font-size: 1.5rem; flex: 1; }
.col-link { cursor: pointer; transition: color .2s; }
.col-link:hover { color: var(--accent); }
.card-head .alt { font-family: var(--font-d); font-weight: 700; font-size: 1.3rem; color: var(--ink); white-space: nowrap; }
.modal-head .alt { font-family: var(--font-d) !important; font-weight: 700; color: var(--ink) !important; }
.card .zone { padding: 0 1.15rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); font-weight: 700; display: flex; align-items: baseline; gap: .5rem; }
.card .zone .wx {
  margin-left: auto; font-family: 'Inter', sans-serif; letter-spacing: 0;
  font-size: .72rem; font-weight: 600; color: var(--ink2); text-transform: none; white-space: nowrap;
}
.tdf {
  padding: .1rem 1.15rem .2rem; font-family: var(--font-s); font-size: 1.05rem;
  line-height: 1.3; color: #8a6a2f;
}
.modal-card .tdf { padding: .1rem 1.4rem .2rem; font-size: 1.15rem; }
.wx-line {
  margin: .3rem 1.4rem 0; padding: .35rem .7rem; border-radius: 10px;
  background: var(--tint); border: 1px dashed rgba(35,43,51,.18);
  font-size: .82rem; color: var(--ink2);
}
/* « Ma prochaine ascension » : une ligne de carnet, pas une carte de plus */
.plan-line {
  margin: .5rem 1.4rem 0; padding: .45rem .75rem; border-radius: 10px;
  border: 1.5px dashed var(--line); background: var(--card2);
  font-size: .82rem; color: var(--ink2); display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem;
}
.plan-line label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--ink); }
.plan-line input[type="date"] {
  border: 1.5px solid var(--line); border-radius: 8px; background: var(--paper);
  padding: .25rem .5rem; font: inherit; font-size: .8rem; color: var(--ink);
}
.plan-line small { flex-basis: 100%; font-size: .7rem; opacity: .75; line-height: 1.3; }
.plan-go, .plan-x {
  cursor: pointer; border-radius: 999px; font-family: 'Inter', sans-serif; font-weight: 700; font-size: .74rem;
  padding: .28rem .75rem; border: 1.5px solid var(--accent); background: var(--accent-fill); color: #fff;
}
.plan-go:hover { filter: brightness(1.08); }
.plan-x { background: none; color: var(--muted); border-color: var(--line); font-weight: 600; margin-left: auto; }
.plan-x:hover { color: var(--accent); border-color: var(--accent); }
.plan-line.on { border-style: solid; border-color: rgba(42, 157, 58, .45); background: rgba(42, 157, 58, .08); color: var(--ink); }
.plan-line.on b { color: #2e7d47; }
html[data-theme="night"] .plan-line.on b { color: #5fd17a; }
.plan-when, .plan-side, .plan-brief { font-size: .74rem; color: var(--ink2); }
.plan-brief::before { content: '·'; margin-right: .4rem; opacity: .5; }
/* objectif de l'année + défi du mois : une ligne de carnet, la jauge au crayon */
.obj-box { margin: .2rem 0 1rem; padding: .55rem .85rem .6rem; border: 1.5px dashed var(--line); border-radius: 12px; background: var(--card2); }
.obj-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .5rem; font-size: .88rem; }
.obj-lab { font-family: var(--font-d); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; color: var(--accent); }
.obj-n { font-family: var(--font-d); font-size: 1.45rem; line-height: 1; color: var(--ink); }
.obj-edit, .obj-ok {
  cursor: pointer; border: 0; background: none; font: inherit; font-weight: 700; color: var(--ink);
  border-bottom: 1.5px dashed var(--accent); padding: 0 .1rem;
}
.obj-edit:hover { color: var(--accent); }
.obj-ok { border: 1.5px solid var(--accent); background: var(--accent-fill); color: #fff; border-radius: 999px; padding: .15rem .6rem; font-size: .76rem; }
.obj-row input[type="number"] { width: 4.2rem; border: 1.5px solid var(--line); border-radius: 8px; background: var(--paper); padding: .2rem .4rem; font: inherit; font-size: .85rem; color: var(--ink); }
.obj-rest { font-size: .76rem; color: var(--ink2); }
.obj-bar { flex-basis: 100%; height: 7px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: .2rem; }
.obj-bar i { display: block; height: 100%; background: var(--green-fill); border-radius: 99px; transition: width .5s; }
.defi-row { display: flex; gap: .55rem; align-items: flex-start; margin-top: .55rem; padding-top: .5rem; border-top: 1px dashed var(--line); font-size: .84rem; color: var(--ink); }
.defi-ico { width: 34px; height: 34px; flex: none; }
.defi-lab { font-family: var(--font-s); font-size: 1.05rem; color: var(--accent); margin-right: .2rem; }
.defi-row small { display: block; font-size: .72rem; color: var(--ink2); line-height: 1.35; margin-top: .1rem; }
.defi-row.earned b::after { content: ''; }
.defi-row.earned { color: #2e7d47; }
html[data-theme="night"] .defi-row.earned { color: #5fd17a; }
.badge-card.defi { border-color: rgba(200,64,14, .45); }
.badge-card.defi .bd-name::before { content: '⏳ '; }
.badge-card.defi.earned .bd-name::before { content: ''; }
/* après chaque sortie : l'interrupteur de la boucle post-sortie */
.watch-row { display: flex; gap: .8rem; align-items: center; margin: 0 0 1rem; padding: .55rem .85rem; border: 1.5px dashed var(--line); border-radius: 12px; background: var(--card2); }
.watch-row.on { border-style: solid; border-color: rgba(42, 157, 58, .45); background: rgba(42, 157, 58, .07); }
.watch-txt { flex: 1; font-size: .86rem; color: var(--ink); }
.watch-txt small { display: block; font-size: .72rem; color: var(--ink2); line-height: 1.35; margin-top: .15rem; }
.watch-btn {
  flex: none; cursor: pointer; border-radius: 999px; font-family: 'Inter', sans-serif; font-weight: 700; font-size: .76rem;
  padding: .35rem .85rem; border: 1.5px solid var(--accent); background: var(--accent-fill); color: #fff;
}
.watch-btn.on { background: none; color: var(--ink2); border-color: var(--line); font-weight: 600; }
.watch-btn.on:hover { color: var(--accent); border-color: var(--accent); }
.watch-btn:disabled { opacity: .6; cursor: wait; }
/* encart du carnet */
.plans-next { margin: .2rem 0 .9rem; padding: .5rem .8rem .6rem; border-left: 3px solid var(--accent); background: rgba(200,64,14, .06); border-radius: 0 10px 10px 0; }
.plans-next h5 { font-family: var(--font-s); font-size: 1.15rem; font-weight: 400; color: var(--accent); margin: 0 0 .25rem; }
.plans-next ul { list-style: none; margin: 0; padding: 0; }
.plans-next li { display: flex; gap: .6rem; align-items: baseline; padding: .18rem 0; cursor: pointer; font-size: .86rem; }
.plans-next li:hover .pn-col { color: var(--accent); }
.plans-next .pn-date { font-family: var(--font-d); font-weight: 700; text-transform: capitalize; min-width: 6.2rem; }
.plans-next .pn-col { font-weight: 600; flex: 1; }
.plans-next .pn-when { font-size: .72rem; color: var(--muted); }
.wx-forecast { display: flex; gap: .45rem; margin: .45rem 1.4rem 0; flex-wrap: wrap; }
.wx-day {
  flex: 1 1 0; min-width: 72px; display: flex; flex-direction: column; gap: .1rem;
  background: var(--tint); border: 1px dashed rgba(35,43,51,.18); border-radius: 10px;
  padding: .35rem .3rem; text-align: center; font-size: .74rem; color: var(--ink2);
}
.wx-day .d { font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: .62rem; opacity: .6; }
.wx-day .i { font-size: 1.15rem; line-height: 1.2; }
.wx-day .t { font-weight: 600; }
.wx-day .w { font-size: .66rem; opacity: .7; }
.colstate {
  margin-left: .5rem; font-family: 'Inter', sans-serif; letter-spacing: 0; text-transform: none;
  font-size: .7rem; font-weight: 700; white-space: nowrap;
}
.colstate.ouvert { color: #2e7d47; }
.colstate.conditions { color: #b57b1e; }
.colstate.ferme { color: #b3402e; }
.colstate.velo { color: #2e7d47; }
.rn-velo { color: #2e7d47; }
.state-line {
  margin: .3rem 1.4rem 0; padding: .35rem .7rem; border-radius: 10px;
  font-size: .82rem; font-weight: 600; border: 1px dashed rgba(35,43,51,.18);
}
.state-line.ouvert { background: #e8f3ea; color: #2e7d47; }
.state-line.conditions { background: #f8efdd; color: #8a5f14; }
.state-line.ferme { background: #f7e5e1; color: #a03422; }
.state-line.velo { background: #e8f3ea; color: #2e7d47; }
.state-line .state-src { float: right; font-weight: 400; font-size: .68rem; opacity: .6; }
.push-bell {
  display: inline-block; margin-left: .6rem; cursor: pointer;
  border: 1.5px solid rgba(160,52,34,.4); background: var(--card); color: #a03422;
  border-radius: 999px; padding: .2rem .65rem; font-size: .72rem; font-weight: 700;
  font-family: 'Inter', sans-serif;
}
.push-bell.on { background: #e8f3ea; border-color: rgba(46,125,71,.5); color: #2e7d47; }
.push-bell:hover { filter: brightness(1.05); }

/* ═══ Le mot des grimpeurs (signalements & avis) ═══ */
.community { margin: .6rem 1.4rem 0; border: 1.5px dashed var(--line); border-radius: 12px; background: var(--card2); padding: .6rem .9rem .7rem; }
.com-head { font-family: var(--font-d); font-weight: 700; font-size: 1.05rem; }
.com-note { color: #b57b1e; letter-spacing: .1em; font-size: .85rem; }
.com-conditions, .com-avis { list-style: none; padding: 0; margin: .45rem 0 0; }
.com-conditions li, .com-avis li { padding: .25rem 0; font-size: .82rem; color: var(--ink2); border-bottom: 1px dashed rgba(35,43,51,.1); }
.com-conditions li:last-child, .com-avis li:last-child { border-bottom: 0; }
.com-avis li { font-family: var(--font-s); font-size: 1.05rem; }
.com-date { float: right; font-size: .68rem; color: var(--muted); }
.com-actions { display: flex; gap: .5rem; margin-top: .55rem; flex-wrap: wrap; }
.com-btn {
  border: 1.5px solid var(--line); background: var(--paper); border-radius: 999px;
  padding: .3rem .75rem; font-size: .76rem; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif;
}
.com-btn:hover { border-color: var(--accent); color: var(--accent); }
.com-cancel { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .76rem; text-decoration: underline; }
.com-form { margin-top: .55rem; display: flex; flex-direction: column; gap: .45rem; }
.com-form select, .com-form textarea {
  border: 1.5px solid var(--line); border-radius: 8px; background: var(--paper);
  padding: .4rem .6rem; font: inherit; font-size: .82rem; resize: vertical;
}
.com-stars { display: flex; gap: .15rem; }
.com-stars button { border: 0; background: none; font-size: 1.5rem; cursor: pointer; color: rgba(35,43,51,.25); padding: 0 .1rem; }
.com-stars button.on { color: #e8a20c; }
.com-resolve {
  border: 0; background: none; cursor: pointer; padding: 0 .2rem;
  font-size: .7rem; color: var(--muted); text-decoration: underline dashed; font-family: 'Inter', sans-serif;
}
.com-resolve:hover { color: var(--accent); }
.com-resolved { font-size: .7rem; color: #2e7d47; font-weight: 600; }
/* « signaler ce contenu » : discret mais présent (modération UGC, App Store) */
.com-flag {
  border: 0; background: none; cursor: pointer; padding: 0 .25rem;
  font-size: .72rem; color: var(--muted); opacity: .55; font-family: inherit;
}
.com-flag:hover, .com-flag:focus-visible { opacity: 1; color: #b3402e; }
.rn-updated { color: var(--muted); }
.wdir {
  display: inline-block; font-style: normal; font-weight: 700; line-height: 1;
  transform-origin: 50% 50%; cursor: help;
}

/* ═══ Planificateur de boucle ═══ */
.planner {
  margin-top: 1.6rem; background: var(--card2); border: 1.5px solid var(--line);
  border-radius: 14px; box-shadow: 2px 3px 0 rgba(35,43,51,.08); padding: 1rem 1.2rem 1.1rem;
}
.planner h3 { font-family: var(--font-d); text-transform: uppercase; font-size: 1.25rem; letter-spacing: .04em; }
.planner-sub { font-size: .85rem; color: var(--ink2); margin: .25rem 0 .7rem; }
/* planificateur mis en avant (feature maison) */
.planner-hero { position: relative; margin-top: 1.2rem; border: 2px solid var(--accent); box-shadow: 3px 4px 0 rgba(200,64,14,.16); padding: 1.5rem 1.4rem 1.3rem; }
.planner-tag { position: absolute; top: -.72rem; left: 1.2rem; background: var(--accent-fill); color: #fff5ee; font-family: var(--font-s); font-weight: 700; font-size: .82rem; letter-spacing: .02em; padding: .12rem .6rem; border-radius: 999px; box-shadow: 0 2px 5px rgba(200,64,14,.25); }
.loops-aside { margin-top: 2.8rem; padding-top: 1.6rem; border-top: 1px dashed var(--line); }
.loops-aside-title { font-family: var(--font-d); text-transform: uppercase; font-size: 1.1rem; letter-spacing: .04em; color: var(--ink2); }
/* section Guides */
.guides-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1.2rem; margin-top: 1rem; }
.guide-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem 1rem; text-decoration: none; color: inherit; box-shadow: 0 3px 12px rgba(35,43,51,.05); transition: transform .2s, box-shadow .2s, border-color .2s; }
.guide-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(35,43,51,.12); border-color: var(--accent); }
.guide-card { overflow: hidden; padding-top: 0; }
.guide-thumb { width: calc(100% + 2.4rem); margin: 0 -1.2rem .8rem; height: auto; display: block; }
.guide-card h3 { font-size: 1.35rem; margin-bottom: .35rem; }
.carnet-list .times {
  font-family: var(--font-s); font-weight: 700; color: var(--accent);
  font-size: .95em; margin-left: .15rem;
}
.guide-card p { font-family: var(--font-s); font-size: 1.12rem; line-height: 1.35; color: var(--ink2); margin-bottom: .55rem; }
.guide-go { font-family: var(--font-s); font-weight: 700; color: var(--accent); font-size: .98rem; }
/* section Communauté */
.club-box {
  display: flex; flex-wrap: wrap; gap: 2.4rem; align-items: center; justify-content: center;
  margin-top: 1.6rem;
}
.club-visual {
  flex: 1 1 380px; max-width: 520px; margin: 0; transform: rotate(-2deg);
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: .9rem .9rem .5rem; box-shadow: 4px 6px 0 rgba(35,43,51,.12);
  transition: transform .25s;
}
.club-visual:hover { transform: rotate(-.5deg) scale(1.015); }
.club-visual img { display: block; width: 100%; height: auto; border-radius: 3px; }
.club-visual figcaption {
  font-family: var(--font-s); font-size: 1.5rem; color: var(--accent);
  text-align: center; padding: .45rem 0 .3rem; transform: rotate(.5deg);
}
.club-cta { flex: 1 1 320px; max-width: 460px; min-width: 260px; }
.club-perks { list-style: none; padding: 0; margin: 0 0 1.1rem; }
.club-perks li {
  display: flex; gap: .6rem; align-items: baseline;
  font-family: var(--font-s); font-size: 1.18rem; line-height: 1.35; color: var(--ink2);
  padding: .3rem 0; border-bottom: 1px dashed var(--line);
}
.club-perks li:last-child { border-bottom: 0; }
.club-perks li span { flex: none; }
.club-card {
  display: flex; align-items: center; gap: .8rem; width: fit-content; max-width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: .8rem 1.1rem; margin-bottom: 1.2rem; text-decoration: none; color: inherit;
  box-shadow: 0 3px 12px rgba(35,43,51,.06); transition: transform .2s, border-color .2s;
}
.club-card:hover { transform: translateY(-2px); border-color: #fc4c02; }
.club-card-mk { width: 40px; flex: none; color: #fc4c02; }
.club-card-txt { font-family: var(--font-s); font-size: 1.1rem; line-height: 1.3; color: var(--ink); }
.club-card-txt small { color: var(--muted); font-size: .92rem; }
.club-join {
  display: inline-flex; align-items: center; gap: .45rem; background: #fc4c02; color: #fff;
  font-family: var(--font-d); font-weight: 700; font-size: 1.15rem; letter-spacing: .02em;
  text-transform: uppercase; padding: .7rem 1.4rem; border-radius: 999px; text-decoration: none;
  box-shadow: 3px 4px 0 rgba(35,43,51,.15); transition: transform .2s, box-shadow .2s;
}
.club-join:hover { transform: translate(-1px,-2px); box-shadow: 5px 7px 0 rgba(252,76,2,.28); }
@media (max-width: 640px) {
  .club-box { gap: 1.6rem; }
  .club-visual { transform: rotate(-1deg); }
  .club-card { margin-left: auto; margin-right: auto; }
}
.plan-picker { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; }
.plan-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 1.5px solid rgba(200,64,14,.45); background: var(--paper); border-radius: 999px;
  padding: .3rem .4rem .3rem .75rem; font-size: .82rem; font-weight: 600;
}
.plan-chip[draggable] { cursor: grab; }
.plan-chip.dragging { opacity: .35; }
.plan-chip.drop-cible { border-style: dashed; border-color: var(--green); }
.plan-chip button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: .8rem; padding: 0 .25rem; }
.plan-chip button:hover { color: #b3402e; }
#plan-input {
  border: 1.5px dashed var(--line); border-radius: 999px; background: transparent;
  padding: .35rem .8rem; font: inherit; font-size: .82rem; min-width: 170px;
}
.plan-actions { margin-top: .7rem; display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.plan-actions .share-btn:disabled { opacity: .5; cursor: default; }
.plan-hint { font-family: var(--font-s); font-size: 1rem; color: var(--muted); }
.plan-start { margin-top: .7rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.plan-start label { font-family: var(--font-s); font-weight: 600; color: var(--ink); }
.plan-start select { font: inherit; padding: .3rem .5rem; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); cursor: pointer; }
.plan-start-hint { font-family: var(--font-s); font-size: .95rem; color: var(--muted); margin: .4rem 0 0; }
.plan-start-pin { font-size: 22px; line-height: 1; text-align: center; filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
.plan-pick { font: inherit; font-size: .9rem; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--ink); cursor: pointer; transition: background .15s, border-color .15s; }
.plan-pick:hover { border-color: var(--accent); color: var(--accent); }
.plan-pick.on { background: var(--accent-fill); color: #fff; border-color: var(--accent); }
.plan-start-custom { display: inline-flex; align-items: center; gap: .35rem; font-family: var(--font-s); font-weight: 600;
  color: #a8360c; background: rgba(200,64,14,.1); border: 1px solid rgba(200,64,14,.28); border-radius: 999px; padding: .22rem .6rem; }
.plan-start-custom button { border: none; background: none; color: #a8360c; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0; }
.plan-col-pin { background: var(--accent-fill); color: #fff; border: 2px solid #fff; border-radius: 50%; text-align: center; line-height: 18px; font-weight: 700; font-size: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.plan-endpoint { color: #fff; border: 2px solid #fff; border-radius: 50%; text-align: center; font-weight: 800;
  line-height: 22px; font-size: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.45); }
.plan-endpoint.start { background: #2a9d3a; }
.plan-endpoint.end { background: #c92a2a; }
.plan-endpoint.startend { background: linear-gradient(135deg, #2a9d3a 50%, #c92a2a 50%); line-height: 30px; font-size: 12px; }
.pe-dot { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  border-radius: 50%; color: #fff; font-size: 11px; font-weight: 800; vertical-align: middle; }
.pe-dot.start { background: #2a9d3a; } .pe-dot.end { background: #c92a2a; } .pe-dot.via { background: #1d6fb8; }
.plan-endpoint.via { background: #1d6fb8; line-height: 20px; }
.plan-start-custom.loop { background: var(--tint); color: #46525c; border-color: rgba(35,43,51,.14); }
/* bascule boucle / aller-retour (quand pas d'arrivée distincte) */
.plan-mode { font: inherit; font-family: var(--font-s); font-weight: 600; font-size: .88rem;
  padding: .22rem .65rem; border: 1px solid rgba(35,43,51,.14); border-radius: 999px;
  background: var(--tint); color: #46525c; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.plan-mode:hover { border-color: var(--accent); color: var(--accent); }
.plan-mode.on { background: var(--accent-fill); border-color: var(--accent); color: #fff; }
.plan-start-custom.via { background: rgba(29,111,184,.1); color: #175680; border-color: rgba(29,111,184,.3); }
.plan-start-custom.via button { color: #175680; }
.plan-via-input { font: inherit; font-size: .9rem; padding: .3rem .6rem; border: 1.5px dashed var(--line);
  border-radius: 999px; background: var(--card2); width: 150px; }
.plan-via-input:focus { outline: none; border-color: #1d6fb8; }
.plan-km { background: var(--card2); border: 1.5px solid #46525c; border-radius: 999px; color: #232b33;
  font-weight: 700; font-size: 10px; line-height: 14px; text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.plan-arrow { background: none; border: 0; }
.plan-arrow svg { width: 20px; height: 20px; display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.plan-legend { display: inline-flex; align-items: center; gap: .4rem; margin-top: .3rem; font-size: .85rem; color: var(--muted); }
.plan-legend i { width: 46px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #2a9d3a, #efaf1e, #c92a2a); }
.plan-result {
  margin-top: .8rem; padding: .7rem .9rem; border: 1px dashed var(--line);
  border-radius: 10px; background: var(--tint); font-size: .88rem; line-height: 1.5;
}
.plan-result-actions { display: flex; gap: .5rem; margin-top: .55rem; flex-wrap: wrap; }
.plan-warn {
  margin-top: .5rem; padding: .45rem .7rem; border-radius: 10px;
  background: #fbf0e4; border: 1px dashed rgba(200,64,14,.35);
  font-size: .82rem; color: #8a4a22; line-height: 1.45;
}
.carnet-share { margin-top: .5rem; }
/* les deux tickets d'action du carnet : partage du palmarès, film de saison */
.carnet-actions { display: flex; gap: .6rem; margin-top: .8rem; flex-wrap: wrap; }
.ca-btn {
  flex: 1 1 150px; display: flex; align-items: center; gap: .65rem; text-align: left;
  background: var(--card2, #fffdf7); border: 1.5px dashed var(--line);
  border-radius: 13px; padding: .62rem .8rem; cursor: pointer; font-family: inherit;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.ca-btn:hover, .ca-btn:focus-visible {
  transform: translateY(-2px); border-color: var(--accent);
  box-shadow: 0 6px 16px rgba(35,43,51,.12);
}
.ca-btn:active { transform: none; }
.ca-ico {
  flex: none; width: 2.15rem; height: 2.15rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
  background: rgba(200,64,14,.12);
}
.ca-lab {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  font-size: 1.02rem; line-height: 1.05; text-transform: uppercase;
  letter-spacing: .02em; color: var(--ink);
}
.ca-lab small {
  display: block; font-family: 'Caveat', cursive; font-weight: 600;
  font-size: .95rem; text-transform: none; letter-spacing: 0; color: var(--ink2);
}
.share-btn {
  border: 1.5px solid var(--line); background: var(--accent); color: #fff;
  border-radius: 9px; padding: .45rem .9rem; font-weight: 600; font-size: .85rem;
  cursor: pointer; font-family: 'Inter', sans-serif;
}
.share-btn:hover { filter: brightness(1.08); }
.card .blurb { padding: .5rem 1.15rem .3rem; font-family: var(--font-s); font-size: 1.18rem; line-height: 1.32; color: var(--ink2); flex: 1; }
.side-tabs { display: flex; gap: .4rem; padding: .65rem 1.15rem 0; flex-wrap: wrap; }
.side-tabs button {
  border: 1.5px solid var(--line); background: var(--paper); border-radius: 9px;
  font: inherit; font-size: .73rem; font-weight: 600; padding: .3rem .6rem; cursor: pointer;
  transition: all .2s;
}
.side-tabs button:hover { border-color: var(--ink); }
.side-tabs button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.side-tabs button.done-side { border-color: rgba(42,157,58,.55); color: #1e7c2c; }
.side-tabs button.done-side.active { background: var(--green-fill); color: #fff; border-color: var(--green-fill); }
.profile { padding: .45rem .65rem 0; }
.profile svg { display: block; width: 100%; height: auto; }
.profile .pline { stroke-dasharray: 1400; stroke-dashoffset: 1400; }
.card.in .profile .pline, .reveal.in .profile .pline { animation: draw 1.6s .25s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
/* pastilles ravito du profil : étiquette maison au survol / focus (tap mobile) */
.rvdot { cursor: pointer; outline: none; }
/* clic sur une pastille : petit panneau pour ouvrir le point dans son appli carto */
.geo-pop {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 4500;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 44px rgba(35, 43, 51, .3);
  padding: .75rem 2.3rem .8rem 1rem; width: max-content; max-width: calc(100vw - 1.6rem);
  display: flex; flex-direction: column; gap: .4rem; font-size: .9rem;
}
.geo-pop small { color: var(--muted); font-size: .72rem; }
.geo-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.geo-links a {
  border: 1.5px solid var(--line); border-radius: 99px; padding: .35rem .85rem;
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .82rem; background: var(--card2);
}
.geo-links a:hover { border-color: var(--accent); color: var(--accent); }
.geo-x { position: absolute; top: .3rem; right: .35rem; background: none; border: none; cursor: pointer; opacity: .55; font-size: .95rem; padding: .3rem .4rem; }
.geo-x:hover { opacity: 1; }
.rvdot .rv-c { transition: r .15s; }
.rvdot:hover .rv-c, .rvdot:focus .rv-c { r: 4; }
.rvdot .rvtip { opacity: 0; pointer-events: none; transition: opacity .15s; }
.rvdot:hover .rvtip, .rvdot:focus .rvtip { opacity: 1; }
.side-stats { display: flex; justify-content: space-between; gap: .3rem; padding: .55rem 1.15rem .8rem; text-align: center; }
.side-stats div b { display: block; font-family: var(--font-d); font-size: 1.3rem; }
.side-stats div span { font-size: .64rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.card-foot {
  display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center;
  padding: .65rem 1.15rem .95rem; gap: .45rem;
  border-top: 1px solid var(--line);
}
.card-foot a.strava { margin-left: auto; }
.compare-btn, .fly-btn, .done-btn {
  border: 1.5px solid var(--line); background: var(--paper); border-radius: 99px;
  font: inherit; font-size: .73rem; font-weight: 600; padding: .32rem .7rem; cursor: pointer;
  transition: all .2s; color: var(--ink2);
}
.compare-btn:hover, .fly-btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.story-btn {
  border: 1.5px solid var(--accent); background: var(--paper); color: var(--accent);
  border-radius: 99px; font: inherit; font-size: .73rem; font-weight: 700;
  padding: .32rem .8rem; cursor: pointer; transition: all .2s;
}
.story-btn:hover { background: var(--accent-fill); color: #fff; transform: translateY(-1px); }
.compare-btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.done-btn:hover { border-color: var(--green); color: var(--green); transform: translateY(-1px); }
.done-btn.on { background: var(--green-fill); border-color: var(--green-fill); color: #fff; }
.done-btn.big { font-size: .8rem; padding: .45rem .9rem; }
a.strava { font-size: .73rem; font-weight: 700; color: #fc4c02; text-decoration: none; }
a.strava:hover { text-decoration: underline; }

/* pastille communauté dans la nav (à côté du logo) */
.nav-commu {
  display: inline-flex; align-items: center; gap: .35rem; flex: none; text-decoration: none;
  background: rgba(42,157,58,.12); border: 1px solid rgba(42,157,58,.3); border-radius: 99px;
  padding: .2rem .5rem .2rem .45rem; margin-left: -.2rem;
  font-size: .78rem; font-weight: 700; color: #1e6e2c; line-height: 1;
  transition: background .18s;
}
.nav-commu[hidden] { display: none; }
/* Instagram, à droite du compteur : le glyphe en trait, pas le carré dégradé */
.nav-insta {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 28px; height: 28px; border-radius: 99px; text-decoration: none;
  color: var(--ink2); border: 1px solid var(--line);
  transition: color .18s, border-color .18s, background .18s;
}
.nav-insta:hover, .nav-insta:focus-visible {
  color: var(--accent); border-color: var(--accent); background: rgba(200,64,14,.09);
}
@media (max-width: 340px) { .nav-insta { display: none; } }
.nav-commu:hover { background: rgba(42,157,58,.2); }
.nav-commu b { font-family: var(--font-d, inherit); font-size: .92rem; }
@media (max-width: 340px) { .nav-commu { display: none; } }

/* ═══ Compteur communauté ═══ */
.community-count {
  display: inline-flex; align-items: center; gap: .5rem; margin: -.4rem 0 1.4rem;
  font-size: .95rem; color: var(--ink2); background: rgba(42,157,58,.1);
  border: 1px solid rgba(42,157,58,.28); border-radius: 99px; padding: .4rem .9rem;
}
.community-count b { color: var(--green, #2a9d3a); font-size: 1.15rem; font-family: var(--font-d); }
.cc-dot { width: 9px; height: 9px; border-radius: 50%; background: #2a9d3a; box-shadow: 0 0 0 0 rgba(42,157,58,.5); animation: ccPulse 2s infinite; }
@keyframes ccPulse { 0% { box-shadow: 0 0 0 0 rgba(42,157,58,.5); } 70% { box-shadow: 0 0 0 8px rgba(42,157,58,0); } 100% { box-shadow: 0 0 0 0 rgba(42,157,58,0); } }
@media (prefers-reduced-motion: reduce) { .cc-dot { animation: none; } }

/* ═══ Social rides du coin ═══ */
.sr-block { margin-top: 2.6rem; }
.sr-title { font-family: 'Barlow Condensed', sans-serif; font-size: 1.5rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink); margin: 0 0 .4rem; }
.sr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; margin-top: 1rem; }
.sr-card {
  display: flex; align-items: center; gap: .75rem; text-decoration: none;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: .8rem 1rem;
  color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.sr-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(20,24,31,.12); border-color: var(--accent); }
.sr-ig {
  width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; color: #fff;
  background: linear-gradient(45deg, #f09433, #e6683c 35%, #dc2743 60%, #bc1888);
}
.sr-add .sr-ig { background: rgba(200,64,14,.12); color: var(--accent); font-size: 1.1rem; }
/* photo de profil du collectif à la place du logo Instagram générique ; le dégradé
   Instagram se replie sur une pastille d'angle pour garder le repère. Carré arrondi
   et pas rond : ces avatars sont des logos larges déjà recadrés au carré par
   Instagram, un masque circulaire leur rogne le lettrage. */
.sr-ig.sr-av { background: none; position: relative; overflow: visible; }
.sr-ig.sr-av img { width: 100%; height: 100%; border-radius: 12px; object-fit: cover; display: block;
  background: var(--paper2); box-shadow: 0 0 0 1px var(--line); }
.sr-ig-badge {
  position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; padding: 2px;
  border-radius: 6px; color: #fff; box-sizing: content-box;
  background: linear-gradient(45deg, #f09433, #e6683c 35%, #dc2743 60%, #bc1888);
  box-shadow: 0 0 0 2px var(--paper);
}
.sr-txt { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.sr-txt b { font-size: .95rem; }
.sr-txt small { font-size: .78rem; color: var(--ink2); }
.sr-go { margin-left: auto; color: var(--accent); font-weight: 700; }

/* ═══ Partenaires de grimpe ═══ */
.pt-bar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.2rem; }
.pt-bar select {
  font: inherit; font-size: .85rem; padding: .5rem .7rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
}
.pt-cta {
  margin-left: auto; border: none; background: var(--accent-fill); color: #fff; font: inherit; font-weight: 700;
  font-size: .9rem; padding: .6rem 1.1rem; border-radius: 12px; cursor: pointer;
}
.pt-cta:hover { filter: brightness(1.07); }
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.pt-empty { grid-column: 1 / -1; text-align: center; color: var(--ink2); padding: 2rem 1rem; font-size: 1rem; }
.pt-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.1rem;
  border-left: 6px solid var(--lv, var(--line));
  display: flex; flex-direction: column; gap: .45rem; box-shadow: 0 1px 4px rgba(20,24,31,.05);
}
.pt-card.mine { border-color: var(--accent); border-left-color: var(--lv, var(--accent)); box-shadow: 0 0 0 2px rgba(200,64,14,.14); }
.pt-zone { display: inline-flex; align-items: center; gap: .3rem; margin-right: .7rem; }
.pt-zone svg { width: 24px; height: 24px; flex: none; }
.pt-outing { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.pt-out-date {
  font-size: .84rem; font-weight: 700; color: var(--accent);
  background: rgba(200,64,14,.12); border-radius: 10px; padding: .32rem .6rem;
}
.pt-out-colchip {
  border: none; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer;
  color: #1e6e2c; background: rgba(42,157,58,.13); border-radius: 10px; padding: .32rem .6rem;
  transition: background .15s;
}
.pt-out-colchip:hover { background: rgba(42,157,58,.24); }
.pt-out-count {
  font-size: .8rem; font-weight: 700; color: var(--ink2);
  background: rgba(35,43,51,.07); border-radius: 10px; padding: .32rem .6rem;
}
.pt-join-btn {
  border: 1.5px solid var(--accent); background: transparent; color: var(--accent);
  font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer;
  border-radius: 10px; padding: .26rem .6rem; transition: all .15s;
}
.pt-join-btn:hover { background: rgba(200,64,14,.1); }
.pt-join-btn.on { background: var(--green, #2a9d3a); border-color: var(--green, #2a9d3a); color: #fff; }
.pt-outing-row {
  display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end;
  background: rgba(200,64,14,.05); border: 1px dashed rgba(200,64,14,.32);
  border-radius: 14px; padding: .7rem .8rem .8rem;
}
.pt-out-field { display: flex; flex-direction: column; gap: .28rem; }
.pt-out-field span {
  font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent);
}
.pt-out-field input, .pt-out-field select {
  font: inherit; font-size: .9rem; font-weight: 600; padding: .5rem .65rem;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink);
  accent-color: var(--accent); transition: border-color .15s, box-shadow .15s;
}
.pt-out-field input:focus, .pt-out-field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200,64,14,.15);
}
.pt-out-field input[type=date] { min-width: 150px; }
.pt-out-field input[type=time] { min-width: 92px; }
.pt-out-grow { flex: 1; min-width: 170px; }
.pt-out-grow select { width: 100%; }
@media (max-width: 520px) { .pt-out-field { flex: 1 1 100%; } .pt-out-field input { width: 100%; } }
/* sélecteur de col custom (armoiries par massif) */
.ptdd { position: relative; width: 100%; }
.ptdd .dd-btn {
  width: 100%; justify-content: space-between; border-radius: 10px;
  font-size: .9rem; padding: .5rem .65rem; background: var(--card); border-width: 1px;
}
.ptdd .dd-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptdd .dd-panel { left: 0; right: 0; max-height: 300px; overflow-y: auto; padding: 0 .35rem .35rem; }
.ptdd-zone {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: .45rem;
  background: var(--card); padding: .5rem .45rem .35rem; margin: 0 -.35rem;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent); border-bottom: 1px solid var(--line);
}
.ptdd-zone svg { width: 22px; height: 22px; flex: none; }
.ptdd-item { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.ptdd-item small { color: var(--muted, #8a939c); font-size: .74rem; flex: none; }
.pt-card header { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.pt-card header b { font-size: 1.05rem; }
.pt-level {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: #fff; background: var(--lv, #8a939c); padding: .22rem .6rem; border-radius: 12px; white-space: nowrap;
}
.pt-zones { font-size: .85rem; color: var(--ink2); }
.pt-palmares { font-size: .84rem; font-weight: 700; color: var(--ink2); }
/* classement communautaire (opt-in) */
.lb-list { list-style: none; margin: 1rem 0 .8rem; padding: 0; display: flex; flex-direction: column; gap: .35rem; max-width: 560px; }
.lb-list:empty { display: none; }
.lb-row { display: flex; align-items: center; gap: .6rem; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: .5rem .8rem; }
.lb-row.me { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(200,64,14,.14); }
/* carnet public : une ligne du classement s'ouvre, une fiche compagnon aussi */
.lb-row.clickable { cursor: pointer; transition: transform .15s, border-color .15s; }
.lb-row.clickable:hover { border-color: var(--accent); transform: translateX(2px); }
.lb-row.clickable::after { content: '›'; margin-left: auto; color: var(--muted); font-weight: 700; }
.pt-carnet { border: 0; background: none; cursor: pointer; font: inherit; font-size: .8rem; color: var(--accent); font-weight: 600; padding: 0; text-decoration: underline dashed; }
.pf-head h3 { font-size: 1.9rem; }
.pf-section { margin: .9rem 1.4rem 0; }
.pf-section h5, .pf-compare h5 { font-family: var(--font-s); font-size: 1.25rem; font-weight: 400; color: var(--accent); margin: 0 0 .35rem; }
.pf-zone { margin-bottom: .5rem; }
.pf-zone-h { font-family: var(--font-d); font-weight: 700; font-size: .95rem; letter-spacing: .03em; padding-left: .5rem; border-left: 3px solid var(--zt); margin: .35rem 0 .3rem; }
.pf-zone-h small { color: var(--muted); font-weight: 600; }
.pf-zone .col-chips { padding-bottom: .2rem; }
.pf-compare { margin: .7rem 1.4rem 0; padding: .55rem .8rem .5rem; border: 1.5px dashed var(--line); border-radius: 12px; background: var(--card2); font-size: .86rem; }
.pf-compare p { margin: 0 0 .35rem; }
.pf-more { align-self: center; font-size: .76rem; color: var(--muted); }
.pf-fine { margin: 1rem 1.4rem 1.2rem; }
.modal-card .badges-grid { margin-bottom: .4rem; }
.lb-rank { font-weight: 700; min-width: 2.1rem; text-align: center; }
.lb-pseudo { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-count { font-size: .85rem; color: var(--ink2); white-space: nowrap; }
.lb-empty { justify-content: center; color: var(--ink2); font-size: .9rem; }
.lb-ask-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.lb-anon {
  background: none; border: 1.5px solid var(--line); color: var(--ink2);
  border-radius: 999px; padding: .55rem 1.1rem; font-weight: 600; cursor: pointer;
}
.lb-anon:hover { border-color: var(--ink2); color: var(--ink); }
.pt-out-chips { flex: 1 1 100%; margin-top: .1rem; }
.pt-out-chips:empty { display: none; }
.pt-msg { font-size: .88rem; font-style: italic; color: var(--ink); }
.pt-links { margin-top: auto; display: flex; gap: .45rem; flex-wrap: wrap; }
.pt-strava, .pt-insta {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem; font-weight: 700; text-decoration: none;
  border-radius: 10px; padding: .38rem .75rem; border: 1.5px solid;
}
.pt-strava { color: #fc4c02; border-color: rgba(252,76,2,.45); }
.pt-strava:hover { background: rgba(252,76,2,.08); }
.pt-insta { color: #c13584; border-color: rgba(193,53,132,.45); }
.pt-insta:hover { background: rgba(193,53,132,.08); }
/* formulaire */
.pt-form { max-width: 520px; }
.pt-lab { display: block; font-size: .85rem; font-weight: 600; color: var(--ink2); margin-top: .7rem; }
.pt-lab input, .pt-lab textarea, .pt-lab select {
  display: block; width: 100%; margin-top: .3rem; font: inherit; font-size: .9rem;
  padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink);
}
.pt-lab-t { font-size: .85rem; font-weight: 600; color: var(--ink2); margin: .7rem 0 .35rem; }
.pt-chip-row { display: flex; gap: .35rem; flex-wrap: wrap; }
.pt-chip {
  border: 1px solid var(--line); background: var(--card); color: var(--ink2); font: inherit; font-size: .8rem;
  font-weight: 600; padding: .32rem .7rem; border-radius: 16px; cursor: pointer; transition: all .15s;
}
.pt-chip.on { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.pt-form-actions { display: flex; gap: .6rem; margin-top: 1rem; justify-content: flex-end; }
.pt-del { border: 1px solid var(--line); background: transparent; color: var(--ink2); font: inherit; font-size: .82rem; padding: .5rem .8rem; border-radius: 10px; cursor: pointer; }
.pt-del:hover { color: #c92a2a; border-color: #c92a2a; }
.pt-form-msg { font-size: .85rem; color: #c92a2a; min-height: 1.2em; margin-top: .4rem; }
@media (max-width: 640px) {
  .pt-bar { gap: .4rem; }
  .pt-bar select { flex: 1; min-width: 100px; }
  .pt-cta { margin-left: 0; width: 100%; }
}

/* ═══ Composeur de palmarès (partage) ═══ */
.pal-modal { position: fixed; inset: 0; z-index: 5000; background: rgba(20,24,31,.72); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.pal-modal[hidden] { display: none; }
.pal-sheet { position: relative; background: var(--ecru, #f6f4ee); border-radius: 20px; padding: 1rem; max-width: 460px; width: 100%; max-height: 96vh; display: flex; flex-direction: column; gap: .8rem; box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.pal-x { position: absolute; top: -.5rem; right: -.5rem; width: 40px; height: 40px; border-radius: 50%; border: none; background: #232e37; color: #fff; font-size: 1rem; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.3); }
.pal-canvas-wrap { position: relative; display: flex; justify-content: center; }
#pal-canvas { height: min(64vh, 560px); width: auto; max-width: 100%; border-radius: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.18); background: #dfe9f0; }
#pal-canvas.transp { background: repeating-conic-gradient(#cfd4d8 0% 25%, #eef1f3 0% 50%) 0 0 / 26px 26px; }
.pal-busy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--accent); }
.pal-busy[hidden] { display: none; }
.pal-controls { display: flex; flex-direction: column; gap: .6rem; }
.pal-seg { display: flex; gap: .4rem; background: rgba(35,43,51,.07); border-radius: 12px; padding: .3rem; }
.pal-seg button { flex: 1; border: none; background: transparent; padding: .55rem .3rem; border-radius: 9px; font: inherit; font-weight: 600; font-size: .82rem; color: var(--ink2, #3d4650); cursor: pointer; transition: background .2s, color .2s; }
.pal-seg button.on { background: var(--card); color: var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
/* la rangée d'ambiances porte 5 boutons : un cran plus serré pour tenir sur mobile */
#pal-amb button { font-size: .76rem; padding-left: .15rem; padding-right: .15rem; }
.pal-do { border: none; background: var(--accent); color: #fff; padding: .85rem; border-radius: 12px; font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; }
.pal-do:hover { filter: brightness(1.06); }

/* ═══ Strava (nav) ═══ */
.strava-zone { display: inline-flex; align-items: center; gap: .4rem; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.strava-connect {
  display: inline-flex; align-items: center; gap: .4rem;
  background: #fc4c02; color: #fff !important; text-decoration: none;
  font-size: .74rem; font-weight: 700; padding: .42rem .85rem; border-radius: 99px;
  transition: transform .2s, box-shadow .2s;
}
.strava-connect:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(252,76,2,.35); }
.strava-user { font-size: .76rem; white-space: nowrap; color: var(--ink); }
.strava-user b { color: #fc4c02; }
.strava-filter, .strava-sync, .strava-out {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 99px;
  font: inherit; font-size: .72rem; font-weight: 600; padding: .3rem .55rem; cursor: pointer;
}
.strava-sync { background: #fc4c02; color: #fff; border-color: #fc4c02; }
.strava-sync:disabled { opacity: .6; cursor: wait; }
.strava-out { color: var(--muted); }

/* ═══ Fiche modale ═══ */
.modal { position: fixed; inset: 0; z-index: 4000; display: flex; align-items: center; justify-content: center; padding: 1.2rem; visibility: hidden; }
.modal.open { visibility: visible; }
.modal-bg { position: absolute; inset: 0; background: rgba(36,46,55,.55); backdrop-filter: blur(6px); opacity: 0; transition: opacity .35s; }
.modal.open .modal-bg { opacity: 1; }
.modal-card {
  position: relative; width: min(680px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--card); border-radius: 20px; box-shadow: 0 36px 80px rgba(0,0,0,.35);
  transform: translateY(40px) scale(.96); opacity: 0;
  transition: transform .4s cubic-bezier(.22,1,.36,1), opacity .4s;
}
.modal.open .modal-card { transform: none; opacity: 1; }
.modal-close {
  position: absolute; top: .8rem; right: .8rem; z-index: 5;
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line);
  background: var(--card); font-size: .95rem; cursor: pointer; color: var(--ink2);
  transition: all .2s;
}
.modal-close:hover { background: var(--ink); color: #fff; }
.modal-head { padding: 1.4rem 3.2rem .4rem 1.4rem; display: flex; align-items: start; gap: .8rem; }
.modal-head h3 { font-size: 2rem; flex: 1; line-height: .95; }
.modal-head .alt { font-family: var(--font-s); font-weight: 600; font-size: 1.5rem; color: var(--muted); white-space: nowrap; }
.modal-card .zone { padding: 0 1.4rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); font-weight: 700; }
.modal-card .blurb { padding: .5rem 1.4rem .2rem; font-family: var(--font-s); font-size: 1.25rem; line-height: 1.3; color: var(--ink2); }
.modal-card .side-tabs { padding: .7rem 1.4rem 0; }
.modal-profile { padding: .5rem .9rem 0; }
.modal-card .pline { animation: draw 1.4s .15s cubic-bezier(.4,0,.2,1) forwards; }
.modal-card .side-stats { padding: .6rem 1.4rem .4rem; }
.water-line {
  margin: .3rem 1.4rem 0; padding: .35rem .7rem; border-radius: 10px;
  background: #e6eef5; border: 1px dashed rgba(35,43,51,.18);
  font-size: .82rem; color: #2a5a7a; font-weight: 600;
}
.water-line .state-src { float: right; font-weight: 400; font-size: .68rem; opacity: .6; }
/* km cliquable dans les lignes eau / borne : ouvre le panneau Maps / Plans / Waze */
.km-go { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; outline: none; }
.km-go:hover, .km-go:focus-visible { color: var(--accent); }
.water-line.ravito-line { background: #f5eee0; color: #7a4a25; border-color: rgba(200,64,14,.22); }
.water-line.repair-line { background: #e7f3e8; color: #1e7c2c; border-color: rgba(42,157,58,.28); }
.water-line.toilets-line { background: #efeaf6; color: #61478f; border-color: rgba(122,90,165,.28); }
/* lien Instagram : le glyphe en trait, sans le carré dégradé de la marque */
.insta-link {
  display: inline-flex; align-items: center; gap: .38rem;
  font-weight: 700; font-size: .82rem; text-decoration: none; color: var(--ink2);
  padding: .18rem .5rem .18rem .38rem; border: 1px solid var(--line); border-radius: 999px;
  transition: color .2s, border-color .2s, background .2s;
}
.insta-link:hover, .insta-link:focus-visible { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
/* ── Ravitaillement : les commerces le long du versant ── */
.ravito-block {
  margin: .5rem 1.4rem 0; padding: .6rem .8rem .5rem;
  background: var(--card2); border: 1.5px solid var(--line); border-radius: 12px;
  box-shadow: 2px 3px 0 rgba(35,43,51,.08);
}
.ravito-head {
  font-family: var(--font-s); font-weight: 600; font-size: 1.05rem; color: var(--ink);
  cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: .35rem;
}
.ravito-head::-webkit-details-marker { display: none; }
.ravito-head::after { content: '▾'; margin-left: auto; font-size: .7rem; color: var(--muted); transition: transform .2s; }
.ravito-block[open] .ravito-head::after { transform: rotate(180deg); }
.ravito-head .ce-extra { font-family: 'Inter', sans-serif; font-weight: 400; color: var(--muted); font-size: .78rem; }
.ravito-list { list-style: none; margin: .35rem 0 0; padding: 0; }
.ravito-list li {
  display: flex; align-items: baseline; gap: .5rem; padding: .2rem 0;
  border-top: 1px dashed rgba(35,43,51,.12); font-size: .86rem; color: #46525c;
}
/* ligne cliquable : ouvre le panneau Maps / Plans / Waze (data-ll) */
.ravito-list li[data-ll] { cursor: pointer; border-radius: 7px; outline: none; }
.ravito-list li[data-ll]:hover, .ravito-list li[data-ll]:focus-visible { background: rgba(200,64,14,.07); }
.ravito-list li[data-ll]:hover b { color: var(--accent); }
.ravito-list .rv-km {
  min-width: 4.6rem; font-family: 'Barlow Condensed', sans-serif; font-weight: 600;
  font-size: .95rem; color: #9a917f; white-space: nowrap;
}
.ravito-list .rv-ico { font-size: .95rem; line-height: 1; }
.ravito-list li b { color: var(--ink); font-weight: 600; }
/* coup de cœur : le mot personnel passe sous l'adresse, aligné sur les libellés */
.ravito-list li.is-coeur { flex-wrap: wrap; }
.rv-coeur { color: var(--accent); font-size: .92em; }
/* pas de margin-left ici : une base flex de 100 % PLUS une marge déborde le
   conteneur de la marge exacte. L'encart prend donc toute la largeur de la
   ligne, et son filet se cale sur le bord gauche. */
.ravito-list .rv-mot {
  flex: 0 0 100%; margin: .3rem 0 .4rem; font-style: normal;
  font-size: .8rem; line-height: 1.45; color: #7a4a25;
  background: #f8f1e6; border-left: 2px solid var(--accent);
  padding: .4rem .6rem; border-radius: 0 8px 8px 0;
}
.ravito-list .rv-mot b { color: var(--accent); font-weight: 700; }
.ravito-list li i {
  font-style: normal; color: #9a917f; font-size: .72rem; margin-left: auto;
  text-align: right; max-width: 46%; overflow-wrap: anywhere;
}
.ravito-list li.is-summit .rv-km { color: var(--accent); }
.ravito-src { margin-top: .35rem; font-size: .68rem; color: #9a917f; }
@media (max-width: 480px) {
  .ravito-list li { flex-wrap: wrap; }
  .ravito-list li i { margin-left: 5.1rem; max-width: none; text-align: left; }
}
html[data-theme="night"] .ravito-list .rv-mot { background: #2c2318; color: #e0c9a8; }
/* pastille gourmande sur la carte */
.rv-pin {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; font-size: 12px; line-height: 1;
  background: var(--card2); border: 1.5px solid var(--accent); border-radius: 50%;
  box-shadow: 0 1px 3px rgba(20,24,31,.3);
}
.rv-pin.wc { border-color: #7a5aa5; }
.prof-legend {
  padding: .1rem 1.4rem 0; font-size: .68rem; color: var(--muted);
  display: flex; align-items: center; gap: .35rem; flex-wrap: wrap;
}
.prof-legend i { display: inline-block; width: 14px; height: 8px; border-radius: 2px; margin-left: .3rem; }
.modal-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  padding: .8rem 1.4rem 1.3rem; border-top: 1px solid var(--line); margin-top: .5rem;
}

/* ═══ Comparateur ═══ */
.compare-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); }
.compare-box svg { width: 100%; height: auto; display: block; }
.compare-box svg path.cline { stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: draw 2s .2s cubic-bezier(.4,0,.2,1) forwards; }
.compare-empty { text-align: center; padding: 2.2rem 1rem; color: var(--muted); font-family: var(--font-s); font-size: 1.25rem; }
.compare-empty .mnt { font-size: 2rem; letter-spacing: .3em; opacity: .45; }
.compare-legend { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; }
.cmp-ctrl { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .7rem; }
.cmp-lab { font-size: .78rem; color: var(--ink2); font-weight: 600; }
.cmp-mode {
  border: 1px solid var(--line); background: var(--card); color: var(--ink2);
  font: inherit; font-size: .78rem; font-weight: 600; padding: .3rem .7rem; border-radius: 99px; cursor: pointer;
  transition: all .15s;
}
.cmp-mode.on { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.cmp-mode:not(.on):hover { border-color: var(--accent); color: var(--accent); }
.compare-legend .leg { font-size: .84rem; color: var(--ink2); }
.compare-legend .leg i { display: inline-block; width: 20px; height: 4px; border-radius: 2px; margin-right: .55rem; vertical-align: 3px; }
.compare-bar {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  z-index: 2800; display: flex; gap: .45rem; align-items: center; flex-wrap: wrap;
  background: rgba(36,46,55,.95); backdrop-filter: blur(8px);
  padding: .55rem .8rem; border-radius: 99px; box-shadow: 0 14px 36px rgba(0,0,0,.35);
  max-width: min(94vw, 820px);
  animation: barin .4s cubic-bezier(.22,1,.36,1);
}
@keyframes barin { from { transform: translate(-50%, 80px); opacity: 0; } }
.compare-bar .pill {
  border: 2px solid transparent; border-radius: 99px; background: #38444f; color: #e8ebee;
  font-size: .73rem; font-weight: 600; padding: .28rem .7rem; white-space: nowrap;
  text-decoration: none; cursor: default; font-family: inherit;
}
.compare-bar .pill.rm { cursor: pointer; transition: background .2s; }
.compare-bar .pill.rm:hover { background: #4a5762; }
.compare-hint {
  margin-top: .6rem; text-align: center;
  font-family: var(--font-s); font-size: 1.05rem; color: var(--muted);
}
#compare-hover { cursor: crosshair; }
.compare-bar .pill.go { background: var(--accent-fill); color: #fff; cursor: pointer; transition: transform .2s; }
.compare-bar .pill.go:hover { transform: scale(1.05); }
.compare-bar .pill.clear { background: transparent; border-color: #56626d; color: #a6afb8; cursor: pointer; font: inherit; font-size: .73rem; }

/* ═══ Boucles ═══ */
.loops-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1.4rem; margin-top: 1rem; counter-reset: loop; }
.loop {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.35rem 1.2rem; box-shadow: 0 3px 12px rgba(35,43,51,.05);
  overflow: hidden;
  transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s;
}
.loop:hover { transform: translateY(-5px); box-shadow: 0 18px 38px rgba(35,43,51,.12); }
.loop::before {
  counter-increment: loop; content: counter(loop, decimal-leading-zero);
  position: absolute; top: -.4rem; right: .7rem;
  font-family: var(--font-s); font-weight: 600;
  font-size: 4.2rem; color: rgba(35,43,51,.08); pointer-events: none;
}
.loop h3 { font-size: 1.45rem; }
.loop-meta { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 700; margin: .2rem 0 .55rem; }
.loop p { font-family: var(--font-s); font-size: 1.18rem; line-height: 1.32; color: var(--ink2); margin-bottom: .8rem; }
.loop-cols { display: flex; flex-wrap: wrap; gap: .4rem; }
.loop-col {
  border: 2px solid; border-radius: 99px; padding: .18rem .6rem;
  font-size: .73rem; font-weight: 600; color: var(--ink); text-decoration: none; background: var(--card);
  transition: transform .2s, box-shadow .2s;
}
/* au doigt, 28 px de haut c'est trop peu : on remonte au minimum tactile */
@media (max-width: 640px) {
  .loop-col { padding: .42rem .75rem; font-size: .8rem; }
  .loop-cols { gap: .5rem; }
}

/* profil altimétrique de la sortie tracée */
.plan-profil { margin: .8rem 0 .2rem; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: .45rem .45rem .2rem; }
.plan-profil svg { display: block; width: 100%; height: auto; }
.plan-cotes { font-size: .85rem; color: var(--ink2); margin: .35rem 0 .2rem; }
.plan-cotes b { color: var(--ink); }

/* ── écran de progression de la synchronisation Strava ── */
#sync-veil {
  position: fixed; inset: 0; z-index: 9800;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: svIn .25s ease;
}
@keyframes svIn { from { opacity: 0; } }
.sv-card {
  width: min(88vw, 380px); text-align: center;
  background: var(--card2, #fffdf7); border: 1.5px solid var(--line);
  border-radius: 18px; padding: 1.6rem 1.5rem 1.4rem;
  box-shadow: 0 14px 44px rgba(35,43,51,.18);
}
.sv-titre { font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  font-size: 1.45rem; text-transform: uppercase; letter-spacing: .02em; color: var(--ink); }
.sv-track { position: relative; height: 10px; margin: 1.5rem 0 .7rem;
  background: var(--paper2, #edeae0); border-radius: 6px; overflow: visible; }
.sv-fill { height: 100%; width: 2%; border-radius: 6px;
  background: linear-gradient(90deg, #d9a441, var(--accent));
  transition: width .35s ease; }
.sv-fill.indet { width: 38% !important; animation: svVaEtVient 1.1s ease-in-out infinite alternate; }
@keyframes svVaEtVient { from { margin-left: 0; } to { margin-left: 62%; } }
.sv-rider { position: absolute; top: -21px; left: -15px; font-size: 1.35rem;
  transition: left .35s ease; transform: scaleX(-1); }
.sv-pct { font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  font-size: 2rem; color: var(--accent); min-height: 2.4rem; }
.sv-sous { font-family: 'Caveat', cursive; font-size: 1.15rem; color: var(--ink2); min-height: 1.5rem; }
#sync-veil.fin { animation: svOut .5s ease 1.2s forwards; }
@keyframes svOut { to { opacity: 0; visibility: hidden; } }
#sync-veil.fin .sv-card { animation: svPop .45s cubic-bezier(.2,1.6,.4,1); }
@keyframes svPop { 0% { transform: scale(1); } 40% { transform: scale(1.05); } 100% { transform: scale(1); } }

/* sélecteur du comparateur : composer sa comparaison sur place */
.cmp-add-wrap { margin: .2rem 0 .9rem; }
.cmp-add {
  width: 100%; max-width: 430px; padding: .6rem .8rem;
  border: 1.5px dashed var(--accent); border-radius: 12px;
  background: var(--card2, #fffdf7); color: var(--ink);
  font-family: 'Inter', sans-serif; font-size: .9rem; font-weight: 600; cursor: pointer;
}

.loop-col:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(35,43,51,.13); }

/* ═══ Footer ═══ */
.foot-ridge { display: block; width: 100%; height: 60px; margin-top: 5rem; margin-bottom: -1px; }
footer {
  background: var(--night); color: #98a3ac;
  padding: 2.6rem clamp(1.2rem, 4vw, 2.4rem) 3rem; font-size: .85rem;
}
footer .inner { max-width: 1150px; margin: 0 auto; }
footer strong { color: #fff; }
footer .fine { margin-top: .7rem; font-size: .78rem; line-height: 1.7; max-width: 860px; }
footer a { color: #d09a7f; }
.cols-links-grid { column-count: 4; column-gap: 2rem; margin-top: .3rem; }
.cols-links-grid a { display: block; padding: .1rem 0; text-decoration: none; }
.cols-links-grid a:hover { text-decoration: underline; }
@media (max-width: 760px) { .cols-links-grid { column-count: 2; } }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ═══ Responsive ═══ */
/* écrans intermédiaires : liens resserrés pour que les 9 entrées tiennent */
@media (max-width: 1600px) {
  .nav-links { gap: .75rem; }
  .nav-links a { font-size: .78rem; padding: .3rem .45rem; }
}
/* dès que les liens ne tiennent plus : burger (sinon ils débordaient, invisibles).
   Seuil mesuré avec bouton Strava déconnecté + pastille « nouveau » : ~1483px. */
@media (max-width: 1500px) {
  .nav-burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; margin-left: auto; flex: none;
    border: 1.5px solid var(--line); border-radius: 9px;
    background: var(--card); color: var(--ink); cursor: pointer;
  }
  .nav.menu-open .nav-burger { color: var(--accent); border-color: var(--accent); }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; margin: 0; overflow: visible;
    background: rgba(246, 244, 238, .98); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px rgba(35,43,51,.14);
    padding: .3rem 0 .5rem;
  }
  .nav.menu-open .nav-links { display: flex; }
  .nav-links a { padding: .7rem 1.4rem; font-size: .9rem; }
  .nav-links a::after { display: none; }
  .nav-links a.active { background: rgba(200,64,14, .08); }
}
@media (max-width: 860px) {
  .nav { gap: .8rem; }
  .brand-txt { display: none; }
  .toolbar { top: 46px; }
}
@media (max-width: 640px) {
  #map { height: 62vh; }
  .dd-panel { left: auto; right: 0; min-width: 190px; }
  .nav { gap: .6rem; }
  /* le bouton « Connect with Strava » (libellé imposé par la charte) débordait
     du viewport : version compacte, et la zone accepte enfin de rétrécir */
  .strava-zone { flex: 0 1 auto; min-width: 0; }
  .strava-connect { font-size: .64rem; padding: .34rem .55rem; gap: .3rem; }
  .strava-user { font-size: .7rem; }
  .hero-inner { padding-bottom: 8rem; }
  .hero-stats { gap: 1.3rem 1.8rem; }
  .hero-stats .stat b { font-size: 1.8rem; }
  .scroll-cue { display: none; }
  .toolbar .count { display: none; }
  /* deux rangées : la recherche pleine largeur, les filtres dessous — la
     rangée unique à défilement horizontal cachait la moitié des filtres.
     16px minimum sur le champ, sinon iOS zoome de force au focus. */
  .toolbar { position: sticky; padding: .5rem 1rem .5rem; }
  .toolbar-inner { flex-wrap: wrap; gap: .4rem; }
  .searchbox { flex: 1 1 100%; max-width: none; }
  .searchbox input { font-size: 16px; }
  .toolbar .chip, .toolbar .dd-btn { white-space: nowrap; flex-shrink: 0; }
  .toolbar .chip { font-size: .74rem; padding: .38rem .6rem; }
  .key-stats .ks-open { opacity: .85; }
  .strava-user { display: none; }
  .grid, .loops-grid, .massif-grid { grid-template-columns: 1fr; }
  .side-stats div b { font-size: 1.15rem; }
  .massif-anchors { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: .3rem; }
  .massif-anchors::-webkit-scrollbar { display: none; }
  .massif-anchors a { white-space: nowrap; flex-shrink: 0; }
  /* fiche modale plein écran : lecture confortable au bord de la route */
  .modal { padding: 0; align-items: stretch; }
  .modal-card { max-height: none; height: 100%; border-radius: 0; border: 0; }
  .wx-forecast { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .wx-forecast::-webkit-scrollbar { display: none; }
  .wx-day { min-width: 84px; flex-shrink: 0; }
  .modal-actions button, .modal-actions a { padding: .6rem .9rem; }
}

/* ── Sélecteur de templates de story ─────────────────────── */
.story-picker {
  position: fixed; inset: 0; z-index: 4000;
  background: rgba(20, 24, 31, .82);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.story-picker-panel {
  background: var(--card); color: var(--ink); border-radius: var(--radius);
  max-width: 760px; width: 100%; max-height: 90vh; overflow: auto;
  padding: 1.5rem 1.6rem 1.7rem; position: relative; box-shadow: 0 24px 64px rgba(20, 24, 31, .45);
}
.story-picker-panel h4 { margin: 0 0 .1rem; font-family: var(--font-d); font-size: 1.5rem; letter-spacing: .01em; }
.story-picker-sub { margin: 0 0 1.2rem; color: var(--muted); font-size: .95rem; }
.story-picker-hint { margin: 1.2rem 0 0; color: var(--muted); font-size: .82rem; }
.story-picker-x {
  position: absolute; top: .7rem; right: .8rem; width: 2rem; height: 2rem;
  border: 0; background: transparent; font-size: 1.1rem; cursor: pointer; color: var(--muted); border-radius: 50%;
}
.story-picker-x:hover { background: var(--paper2); color: var(--ink); }
.story-theme-row { display: flex; gap: .45rem; flex-wrap: wrap; justify-content: center; margin: -.2rem 0 .3rem; }
.story-theme {
  display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); background: var(--paper);
  border-radius: 20px; padding: .28rem .75rem .28rem .4rem; font: inherit; font-size: .78rem; font-weight: 600;
  color: var(--ink2); cursor: pointer; transition: border-color .15s, color .15s;
}
.story-theme i {
  width: 17px; height: 17px; border-radius: 50%; display: inline-block;
  background: linear-gradient(135deg, var(--sw1, #fff) 50%, var(--sw2, #f0955a) 50%);
  border: 1px solid rgba(20,24,31,.25); box-shadow: 0 1px 2px rgba(20,24,31,.15);
}
.story-theme:hover { border-color: var(--accent); }
.story-theme.on { border-color: var(--accent); color: var(--accent); background: var(--card); box-shadow: 0 1px 4px rgba(20,24,31,.12); }
/* 3 colonnes : les affiches sont des pleines stories, très hautes en aperçu */
.story-tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.story-tpl {
  position: relative; border: 1px solid var(--line); background: var(--paper); border-radius: 12px;
  padding: .55rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .5rem;
  font: inherit; color: var(--ink); transition: transform .12s, box-shadow .12s, border-color .12s;
}
.story-tpl-copy {
  position: absolute; top: .35rem; right: .35rem; width: 34px; height: 34px;
  border: none; border-radius: 9px; background: rgba(255, 255, 255, .92); cursor: pointer;
  font-size: .9rem; line-height: 1; box-shadow: 0 1px 4px rgba(20, 24, 31, .25); z-index: 2;
}
.story-tpl-copy:hover { background: var(--card); transform: scale(1.08); }
.story-tpl:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(20, 24, 31, .18); border-color: var(--accent); }
.story-tpl-prev { width: 100%; height: auto; border-radius: 7px; display: block; box-shadow: 0 1px 4px rgba(20, 24, 31, .15); }
.story-tpl span { font-size: .88rem; font-weight: 600; }
/* damier derrière l'aperçu transparent, pour montrer qu'il n'a pas de fond */
.story-tpl.is-alpha .story-tpl-prev {
  background-color: #e7e5df;
  background-image:
    linear-gradient(45deg, #cfccc4 25%, transparent 25%), linear-gradient(-45deg, #cfccc4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #cfccc4 75%), linear-gradient(-45deg, transparent 75%, #cfccc4 75%);
  background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}
@media (max-width: 640px) {
  .story-tpl-grid { grid-template-columns: repeat(2, 1fr); }
  .story-picker-panel { padding: 1.2rem 1.1rem 1.4rem; }
}
/* CTA « ajoute ta photo » + éditeur de composition */
.photo-cta {
  width: 100%; display: flex; align-items: center; gap: .9rem; text-align: left;
  padding: 1rem 1.2rem; border: 2px dashed var(--accent); background: var(--paper2);
  border-radius: 12px; cursor: pointer; font: inherit; color: var(--ink); transition: background .12s;
}
.photo-cta:hover { background: #f3e7df; }
.photo-cta .ph-ic { font-size: 2rem; line-height: 1; }
.photo-cta .ph-tx { display: flex; flex-direction: column; }
.photo-cta strong { font-family: var(--font-d); font-size: 1.2rem; }
.photo-cta small { color: var(--muted); font-size: .85rem; }
.story-or { text-align: center; color: var(--muted); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; margin: 1.1rem 0 .8rem; }
/* collections : on ne choisit pas dans onze vignettes en vrac */
.story-coll-row { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin: 0 0 .9rem; }
.story-coll {
  flex: 1 1 8rem; min-width: 8rem; max-width: 13rem; text-align: left;
  display: flex; flex-direction: column; gap: .12rem; font: inherit; cursor: pointer;
  padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper2); color: var(--ink2); transition: border-color .12s, background .12s, color .12s;
}
.story-coll b { font-family: var(--font-d); font-size: 1.12rem; line-height: 1; }
.story-coll small { font-size: .7rem; color: var(--muted); line-height: 1.25; }
.story-coll:hover { border-color: var(--accent); }
.story-coll.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.story-coll.on small { color: rgba(255, 255, 255, .82); }
/* Bloc à garder ICI, après les règles ci-dessus : à égalité de spécificité,
   c'est la dernière déclarée qui gagne — placé plus haut dans le fichier il
   était réécrit par le flex-basis de 8rem. */
@media (max-width: 640px) {
  /* trois collections sur une ligne de pastilles : à cette largeur, les
     descriptions tombaient en 2+1 et mangeaient un tiers de l'écran */
  .story-coll { flex: 1 1 0; min-width: 0; text-align: center; align-items: center; padding: .45rem .3rem; }
  .story-coll small { display: none; }
}
/* bascule fond plein / transparent des affiches */
.story-paper-row { display: flex; gap: .4rem; justify-content: center; margin: .1rem 0 .7rem; }
.story-paper {
  font: inherit; font-size: .78rem; font-weight: 600; color: var(--muted);
  padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; cursor: pointer; transition: color .12s, border-color .12s, background .12s;
}
.story-paper:hover { color: var(--ink2); }
.story-paper.on { color: var(--accent); border-color: var(--accent); background: rgba(200,64,14, .07); }
.photo-editor-canvas {
  display: block; margin: .2rem auto 0; width: 100%; max-width: 288px; aspect-ratio: 1080 / 1920;
  border-radius: 10px; background: #0d1117; touch-action: none; cursor: grab; box-shadow: 0 6px 22px rgba(20, 24, 31, .3);
}
.photo-editor-canvas:active { cursor: grabbing; }
.photo-hint { text-align: center; color: var(--muted); font-size: .8rem; margin: .5rem 0 0; }
.photo-editor-controls { display: flex; align-items: center; gap: .7rem; margin: .8rem auto 0; max-width: 340px; }
.photo-editor-controls input[type=range] { flex: 1; accent-color: var(--accent); }
.photo-editor-actions { display: flex; gap: .6rem; margin: 1rem auto 0; max-width: 400px; }
.photo-editor-actions button {
  flex: 1; padding: .7rem 1rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
}
.photo-editor-actions .primary { background: var(--accent-fill); color: #fff; border-color: var(--accent); }
.photo-editor-actions button:hover { filter: brightness(.97); }

/* ═══ « Ta saison » : bilan plein écran slide par slide ═══ */
.wr-modal { position: fixed; inset: 0; z-index: 5200; background: #14181f; display: flex; align-items: center; justify-content: center; }
.wr-modal[hidden] { display: none; }
.wr-stage {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  transition: background .45s ease; -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
@media (min-width: 700px) {
  .wr-stage { width: min(430px, 100vw); height: min(92vh, 764px); border-radius: 20px; box-shadow: 0 36px 80px rgba(0,0,0,.55); }
}
.wr-bars { position: absolute; top: max(.8rem, env(safe-area-inset-top)); left: .8rem; right: 3.6rem; display: flex; gap: 5px; z-index: 4; }
.wr-bar { flex: 1; height: 3px; border-radius: 2px; background: color-mix(in srgb, currentColor 25%, transparent); overflow: hidden; }
.wr-bar i { display: block; height: 100%; background: currentColor; transform-origin: left; transform: scaleX(0); }
.wr-x {
  position: absolute; top: max(.35rem, env(safe-area-inset-top)); right: .45rem; z-index: 5;
  width: 42px; height: 42px; border: none; background: transparent; color: inherit;
  font-size: 1.15rem; cursor: pointer; opacity: .85;
}
.wr-x:hover { opacity: 1; }
.wr-x:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 50%; opacity: 1; }
.wr-x:focus:not(:focus-visible) { outline: none; }
.wr-deco { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.wr-scene { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 26%; }
.wr-stars { position: absolute; inset: 0 0 auto 0; width: 100%; height: 24%; }
.wr-tap { position: absolute; top: 0; bottom: 0; left: 0; width: 34%; z-index: 2; border: none; background: transparent; cursor: pointer; }
.wr-tap-r { left: auto; right: 0; width: 66%; }
.wr-slide {
  position: relative; z-index: 3; pointer-events: none;
  width: 100%; max-width: 350px; padding: 0 1.5rem 7vh;
  display: flex; flex-direction: column; align-items: center; gap: .55rem; text-align: center;
}
.wr-slide .wr-btn { pointer-events: auto; }
@keyframes wr-in { from { opacity: 0; transform: translateY(16px); } }
.wr-slide > * { animation: wr-in .6s cubic-bezier(.22, 1, .36, 1) both; }
.wr-slide > :nth-child(2) { animation-delay: .14s; }
.wr-slide > :nth-child(3) { animation-delay: .28s; }
.wr-slide > :nth-child(4) { animation-delay: .42s; }
.wr-slide > :nth-child(5) { animation-delay: .56s; }
.wr-brand { font-family: var(--font-s); font-size: 1.6rem; opacity: .92; }
.wr-kick { font-family: var(--font-d); font-weight: 600; font-size: 1rem; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.wr-title { font-family: var(--font-d); font-weight: 700; font-size: clamp(2.3rem, 9vw, 3.1rem); line-height: 1; letter-spacing: .02em; }
.wr-big { font-family: var(--font-d); font-weight: 700; font-size: clamp(5.6rem, 27vw, 9rem); line-height: .95; font-variant-numeric: tabular-nums; }
.wr-big-s { font-size: clamp(3.6rem, 17vw, 5.6rem); }
.wr-den { font-size: .38em; font-weight: 600; opacity: .75; }
.wr-label { font-family: var(--font-d); font-weight: 600; font-size: clamp(1.35rem, 5vw, 1.7rem); line-height: 1.15; text-wrap: balance; }
.wr-label-b { font-size: clamp(1.7rem, 6vw, 2.1rem); font-weight: 700; }
.wr-sub { font-weight: 600; font-size: .95rem; opacity: .85; }
.wr-hand { font-family: var(--font-s); font-weight: 600; font-size: clamp(1.45rem, 5.5vw, 1.75rem); color: #eec463; margin-top: .3rem; }
.wr-recap { font-weight: 600; font-size: 1.05rem; line-height: 1.55; max-width: 28ch; }
.wr-top { width: 100%; max-width: 330px; display: flex; flex-direction: column; gap: .7rem; margin: .5rem 0 .2rem; }
.wr-top-row { display: flex; align-items: baseline; gap: .75rem; font-family: var(--font-d); text-align: left; animation: wr-in .55s cubic-bezier(.22, 1, .36, 1) both; }
.wr-top-row:nth-child(2) { animation-delay: .12s; }
.wr-top-row:nth-child(3) { animation-delay: .24s; }
.wr-top-row:nth-child(4) { animation-delay: .36s; }
.wr-top-row:nth-child(5) { animation-delay: .48s; }
.wr-top-rank { font-weight: 700; font-size: 1.75rem; min-width: 1.4rem; text-align: right; }
.wr-top-name { font-weight: 700; font-size: 1.3rem; line-height: 1.05; flex: 1; }
.wr-top-n { font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wr-top-row.first .wr-top-rank { font-size: 2.3rem; }
.wr-top-row.first .wr-top-name { font-size: 1.7rem; }
.wr-top-row.first .wr-top-n { font-size: 1.4rem; }
.wr-badge { width: clamp(110px, 32vw, 150px); height: auto; margin: .4rem 0; }
.wr-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: 1.1rem; }
.wr-card { width: min(42vw, 224px); margin: .35rem 0 .1rem; }
.wr-card img { display: block; width: 100%; aspect-ratio: 9 / 16; border-radius: 14px; background: #232b33; box-shadow: 0 18px 44px rgba(0, 0, 0, .5); transform: rotate(-2deg); }
.wr-badges { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .65rem; max-width: 330px; margin: .5rem 0 .2rem; }
.wr-badges > * { animation: wr-in .5s cubic-bezier(.22, 1, .36, 1) both; }
.wr-badges > :nth-child(2) { animation-delay: .07s; }
.wr-badges > :nth-child(3) { animation-delay: .14s; }
.wr-badges > :nth-child(4) { animation-delay: .21s; }
.wr-badges > :nth-child(5) { animation-delay: .28s; }
.wr-badges > :nth-child(6) { animation-delay: .35s; }
.wr-badges > :nth-child(7) { animation-delay: .42s; }
.wr-badges > :nth-child(8) { animation-delay: .49s; }
.wr-badges > :nth-child(9) { animation-delay: .56s; }
.wr-badges > :nth-child(10) { animation-delay: .63s; }
.wr-badges > :nth-child(11) { animation-delay: .7s; }
.wr-bwall { width: 62px; height: 62px; }
.wr-bwall.leg { filter: drop-shadow(0 0 7px rgba(238, 196, 99, .85)); }
.wr-bmore { font-family: var(--font-d); font-weight: 700; font-size: 1.1rem; background: rgba(35, 43, 51, .1); border-radius: 99px; padding: .35rem .7rem; }
.wr-banner {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 4000;
  display: flex; align-items: center; gap: .8rem; max-width: calc(100vw - 2rem);
  background: #1c242d; color: #f4f1e8; border: 1px solid rgba(244, 241, 232, .15);
  padding: .6rem .7rem .6rem 1.2rem; border-radius: 99px; box-shadow: 0 14px 36px rgba(0, 0, 0, .45);
  font-weight: 600; font-size: .95rem;
}
.wr-banner .wr-btn { padding: .55rem 1rem; font-size: .88rem; white-space: nowrap; }
.wr-banner-x { background: none; border: none; color: inherit; opacity: .7; cursor: pointer; font-size: 1rem; padding: .3rem .4rem; }
.wr-banner-x:hover { opacity: 1; }
/* mobile : la pilule devient une carte, le texte passe à la ligne au lieu
   de déborder des coins arrondis (après la règle de base pour la surcharger) */
@media (max-width: 640px) {
  .wr-banner {
    left: .8rem; right: .8rem; transform: none; max-width: none;
    flex-wrap: wrap; justify-content: flex-end; gap: .55rem .6rem;
    border-radius: 16px; padding: .75rem .9rem; font-size: .88rem;
  }
  .wr-banner > span { flex: 1 1 100%; }
}
.wr-btn { border: none; background: #f4f1e8; color: #14181f; font: inherit; font-weight: 700; font-size: .95rem; padding: .8rem 1.5rem; border-radius: 99px; cursor: pointer; }
.wr-btn:hover { filter: brightness(1.05); }
.wr-btn-ghost { background: transparent; color: inherit; border: 2px solid color-mix(in srgb, currentColor 45%, transparent); }
@media (prefers-reduced-motion: reduce) {
  .wr-stage { transition: none; }
  .wr-slide > *, .wr-top-row, .wr-badges > * { animation: none; }
}

/* bouton jour/nuit dans la nav */
.nav-theme {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--line); background: transparent;
  color: var(--ink2); cursor: pointer; padding: 0;
  transition: color .2s, border-color .2s, transform .2s;
}
.nav-theme:hover { color: var(--accent); border-color: var(--accent); transform: rotate(-12deg); }
.nav-theme .ic-sun { display: none; }
html[data-theme="night"] .nav-theme .ic-moon { display: none; }
html[data-theme="night"] .nav-theme .ic-sun { display: block; }

/* ═══════════════════════════════════════════════════════════
   MODE NUIT — mêmes tokens, palette ardoise ; activé par
   data-theme="night" sur <html> (choix mémorisé, sinon système)
   ═══════════════════════════════════════════════════════════ */
html[data-theme="night"] {
  color-scheme: dark; /* contrôles de formulaire, scrollbars et placeholders natifs sombres */
  --paper: #171e26;
  --paper2: #121820;
  --card: #232d38;
  --card2: #26303b;
  --tint: #1f2a35;
  --ink: #e9e6dd;
  --ink2: #b6bfc7;
  --muted: #8b959e;
  --line: rgba(233, 230, 221, .15);
  --accent: #f0743a;
  --accent-soft: rgba(240,116,58,.14);
  --green: #3fb954;
  --shadow: 0 8px 28px rgba(0, 0, 0, .42);
  /* profils SVG (textes/ligne dessinés inline dans app.js) */
  --pf-ink: #e9e6dd;
  --pf-sep: rgba(18, 24, 32, .55);
  --pf-mut: #98a2ab;
}
html[data-theme="night"] body {
  background-image:
    linear-gradient(rgba(233, 230, 221, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 230, 221, .04) 1px, transparent 1px);
}
html[data-theme="night"] ::selection { background: #45525f; color: #f2efe7; }
html[data-theme="night"] .doodle { color: rgba(233, 230, 221, .17); }
html[data-theme="night"] .sd { color: rgba(233, 230, 221, .14); }
html[data-theme="night"] .nav.scrolled { background: rgba(18, 24, 32, .92); }
html[data-theme="night"] .nav.menu-open .nav-links { background: rgba(18, 24, 32, .96); }
html[data-theme="night"] .map-ctl-btn { color: var(--ink); }
/* carte : tuiles assombries (inversion + teinte bleutée), habillage Leaflet assorti */
html[data-theme="night"] .leaflet-tile-pane { filter: invert(1) hue-rotate(190deg) brightness(.9) contrast(.9) saturate(.5); }
html[data-theme="night"] .leaflet-container { background: #121820; }
html[data-theme="night"] .leaflet-bar a,
html[data-theme="night"] .leaflet-control-layers,
html[data-theme="night"] .leaflet-popup-content-wrapper,
html[data-theme="night"] .leaflet-popup-tip,
html[data-theme="night"] .leaflet-tooltip { background: var(--card); color: var(--ink); }
html[data-theme="night"] .leaflet-bar a { border-bottom-color: var(--line); }
html[data-theme="night"] .leaflet-control-attribution { background: rgba(18, 24, 32, .8); color: var(--muted); }
html[data-theme="night"] .leaflet-control-attribution a { color: var(--ink2); }
/* fiches : les pastels des massifs (styles inline) laissent place aux cartes sombres */
html[data-theme="night"] .massif-block { background: rgba(35, 45, 56, .55) !important; }
html[data-theme="night"] .massif-anchors a { background: var(--card2) !important; color: var(--ink); }
/* lisibilité nuit : les composants restés sur fond clair gardent une encre sombre… */
html[data-theme="night"] .carnet-tab { color: #232b33; opacity: .92; }
html[data-theme="night"] .carnet-tab:hover, html[data-theme="night"] .carnet-tab.active { opacity: 1; }
/* …les inversés (fond encre + texte blanc) repassent le texte en sombre… */
html[data-theme="night"] .chip.active,
html[data-theme="night"] .side-tabs button.active,
html[data-theme="night"] .compare-btn.on,
html[data-theme="night"] .modal-close:hover,
html[data-theme="night"] .popup a.btn { color: #14181f; }
html[data-theme="night"] .popup a.btn:hover { color: #fff; }
/* …et les pastilles « col fait » passent en vert sombre */
html[data-theme="night"] .col-chip.done { background: #24382a; border-color: rgba(111, 207, 133, .45); }
html[data-theme="night"] .massif-toggle { background: rgba(18, 24, 32, .55); }
html[data-theme="night"] .side-tabs button.done-side { color: #6fcf85; }
html[data-theme="night"] .com-btn { background: var(--card2); }
/* bouton désactivé : l'opacité .5 devient boueuse sur fond sombre → état posé, lisible */
html[data-theme="night"] .plan-actions .share-btn:disabled { opacity: 1; background: #3e2c24; border-color: transparent; color: rgba(233, 230, 221, .45); }
html[data-theme="night"] .roadnews li.rn-important { background: #24382a; border-color: rgba(111, 207, 133, .4); }
html[data-theme="night"] .card.is-closed { background: #33272a; }
html[data-theme="night"] .water-line { background: #1d2b38; color: #9cc4e0; }
html[data-theme="night"] .pp-intro { color: var(--muted); }
/* badges : le « reste à faire » doit rester lisible sur les cartes non gagnées */
html[data-theme="night"] .badge-card { background: rgba(35, 45, 56, .55); opacity: .82; }
html[data-theme="night"] .bd-progress { color: var(--ink2); }
html[data-theme="night"] .badge-card.earned .bd-progress { color: #6fcf85; }

