/* Design Lagon — onglet Kitesurf, version web */
:root {
  --page: #E3F5F7;
  --card: #ffffff;
  --line: #D3EEF2;
  --main: #0AA6B8;
  --main-ink: #077C8A;
  --ink: #0B3B45;
  --ink-2: #4A6E76;
  --ink-3: #8AA5AB;
  --good: #17B26A;
  --bad: #FF5A5F;
  --chop: #E8431F;
  --orange: #FF8A3D;
  --grey: #9E9E9E;
  --off: #d5d9dc;
  --shadow: 0 4px 14px rgba(10, 166, 184, 0.13);
  --r: 20px;
  --r-s: 12px;
  --gut: 16px;
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-variation-settings: 'wdth' 100;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); overflow-x: hidden; }
body { font-size: 15px; line-height: 1.4; font-variant-numeric: tabular-nums; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
a { color: var(--main-ink); }
:focus-visible { outline: 2px solid var(--main); outline-offset: 2px; border-radius: 6px; }
svg { display: block; }

.wrap { max-width: 860px; margin: 0 auto; padding: 14px var(--gut) 48px; display: flex; flex-direction: column; gap: 14px; }
.top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 4px 2px 0; }
.top h1 { margin: 0; font-size: 22px; font-weight: 800; font-variation-settings: 'wdth' 118; letter-spacing: -0.01em; }
.top .meta { font-size: 12px; color: var(--ink-2); text-align: right; }
.top .meta a { font-weight: 600; }

.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; min-width: 0; overflow: hidden; }
.card > h2 { margin: 0 0 10px; font-size: 16px; font-weight: 750; font-variation-settings: 'wdth' 110; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.card > h2 small { font-size: 12px; font-weight: 500; color: var(--ink-2); font-variation-settings: 'wdth' 100; }
.sub { margin: 14px 0 8px; font-size: 14px; font-weight: 700; }
.muted { color: var(--ink-2); }
.small { font-size: 12px; }
.err { font-size: 13px; color: var(--ink-2); padding: 8px 0; }
.err b { color: var(--bad); }
.skel { height: 60px; border-radius: var(--r-s); background: linear-gradient(90deg, #eef9fa, #f7fdfd, #eef9fa); background-size: 200% 100%; animation: sk 1.4s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* Pastilles et défilement horizontal isolé */
.scroller { display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; touch-action: pan-x pan-y; padding-bottom: 2px; min-width: 0; }
.scroller::-webkit-scrollbar { display: none; }
.scroller.two { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: max-content; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--page); white-space: nowrap; flex-shrink: 0; }
.chip.on { background: var(--main); color: #fff; }
.chip .star { color: #F5B700; }
.chip.on .star { color: #fff; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bad); flex-shrink: 0; }
.row-gap { margin-top: 8px; }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill.kite { background: var(--main); color: #fff; }
.pill.foil { background: #E3F5F7; color: var(--main-ink); box-shadow: inset 0 0 0 1.5px var(--main); }
.pill.good { background: rgba(23, 178, 106, 0.16); color: #0E7A48; }
.pill.bad { background: rgba(255, 90, 95, 0.16); color: #C9353A; }
.pill.chop { background: rgba(255, 138, 61, 0.16); color: var(--chop); }
.pill.grey { background: #eef1f2; color: var(--ink-2); }
.pill.off { background: var(--off); color: var(--ink-2); }
.pill.main { background: rgba(10, 166, 184, 0.14); color: var(--main-ink); }
.stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.stat { background: var(--page); border-radius: 10px; padding: 6px 10px; font-size: 12px; color: var(--ink-2); }
.stat b { display: block; font-size: 15px; color: var(--ink); font-variation-settings: 'wdth' 110; }

/* S / L */
.who { display: inline-flex; gap: 4px; }
.who span { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 800; padding: 2px 6px; border-radius: 999px; }
.who .y { background: rgba(23, 178, 106, 0.16); color: #0E7A48; }
.who .n { background: rgba(255, 90, 95, 0.16); color: #C9353A; }

/* ---------- 1. Où aller ? ---------- */
.go { background: var(--main); color: #fff; padding: 16px; }
.go .eve { font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, 0.18); border-radius: 10px; padding: 6px 10px; margin-bottom: 12px; }
.go .win { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.go .ico { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22); }
.go .ico svg { width: 34px; height: 34px; }
.go .name { font-size: clamp(24px, 7vw, 34px); line-height: 1.02; font-weight: 850; font-variation-settings: 'wdth' 125; letter-spacing: -0.015em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.go .name .pill { background: #fff; color: var(--main-ink); font-size: 13px; font-variation-settings: 'wdth' 100; letter-spacing: 0; }
.go .line { font-size: 13px; margin-top: 4px; opacity: 0.95; overflow-wrap: anywhere; }
.go .who .y { background: rgba(255, 255, 255, 0.25); color: #fff; }
.go .who .n { background: rgba(11, 59, 69, 0.28); color: #fff; }
.go .who { flex-direction: column; }
.go .others { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.3); }
.go .others span { background: rgba(255, 255, 255, 0.22); padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.go .none { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.go .none .ico { background: rgba(255, 255, 255, 0.22); }
.go .none b { font-size: 20px; font-variation-settings: 'wdth' 115; display: block; line-height: 1.15; }

/* ---------- 2. Balises ---------- */
.bal { border-top: 1px solid var(--line); }
.bal:first-of-type { border-top: 0; }
.balrow { display: flex; align-items: center; gap: 8px; padding: 8px 0; min-width: 0; cursor: pointer; }
.tile { border-radius: 12px; display: grid; place-items: center; text-align: center; flex-shrink: 0; line-height: 1; }
.t64 { width: 64px; height: 64px; position: relative; }
.t64 b { font-size: 27px; font-weight: 850; font-variation-settings: 'wdth' 112; }
.t64 small { display: block; font-size: 11px; font-weight: 600; margin-top: 2px; }
.t64 .gi { position: absolute; right: 4px; top: 4px; width: 13px; height: 13px; opacity: 0.6; }
.t44 { width: 44px; height: 44px; font-size: 10.5px; font-weight: 600; }
.t44 b { display: block; font-size: 16px; font-weight: 800; }
.t44 svg { width: 16px; height: 16px; margin: 0 auto 2px; }
.tidecyc .tm { grid-area: 1 / 1; display: none; }
.tidecyc[data-mode="0"] .tm[data-m="0"], .tidecyc[data-mode="1"] .tm[data-m="1"], .tidecyc[data-mode="2"] .tm[data-m="2"] { display: block; animation: tmfade .25s ease; }
@keyframes tmfade { from { opacity: 0; } to { opacity: 1; } }
.t34 { width: 34px; height: 34px; border-radius: 50%; }
.t34 svg { width: 18px; height: 18px; }
.balinfo { flex: 1; min-width: 0; }
.balinfo .n { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 4px; }
.balinfo .n svg { width: 15px; height: 15px; }
.balinfo .bd { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.balinfo .age { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.bg-good { background: rgba(23, 178, 106, 0.18); color: #0E7A48; }
.bg-bad { background: rgba(255, 90, 95, 0.16); color: #C9353A; }
.bg-neu { background: #EEF6F7; color: var(--ink-2); }
.graph { padding: 4px 0 12px; }
.graph .gh { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; }
.graph .x { width: 28px; height: 28px; border-radius: 50%; background: var(--page); display: grid; place-items: center; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--ink-2); margin-top: 6px; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }

/* ---------- 3a. Modèle le plus juste ---------- */
.mj { display: grid; grid-template-columns: minmax(80px, auto) 1fr; gap: 6px 10px; align-items: center; font-size: 13px; }
.mj .b { font-weight: 800; }
.mj .r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mbadge { color: #fff; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }

/* ---------- 3b. Prévisions ---------- */
.orient { font-size: 13px; margin: 10px 0 4px; }
.orient b { color: #0E7A48; }
.next { display: grid; gap: 6px; margin: 10px 0 12px; }
.next > div { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.next .lab { width: 78px; flex-shrink: 0; font-weight: 700; }
.day { border-radius: 14px; overflow: hidden; margin-top: 8px; border: 1px solid var(--line); }
.dayh { width: 100%; background: var(--main); color: #fff; padding: 8px 10px; display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: center; text-align: left; }
.dayh .chev { width: 16px; height: 16px; transition: transform 0.15s; }
.day.closed .chev { transform: rotate(-90deg); }
.dayh .t { font-weight: 800; font-size: 14.5px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.dayh .t small { font-weight: 500; font-size: 12px; opacity: 0.9; display: inline-flex; align-items: center; gap: 3px; }
.dayh .t small svg { width: 13px; height: 13px; }
.dayh .l2 { grid-column: 2; display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.dayh .pill { background: #fff; color: var(--main-ink); }
.dayh .pill.foil { box-shadow: none; }
.dayh .pill.no { background: rgba(255, 255, 255, 0.22); color: #fff; }
.dayh .who .y { background: rgba(255, 255, 255, 0.25); color: #fff; }
.dayh .who .n { background: rgba(11, 59, 69, 0.3); color: #fff; }
.day.closed .grid { display: none; }
.grid { display: grid; grid-auto-flow: column; grid-auto-columns: 44px; gap: 3px; padding: 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; touch-action: pan-x pan-y; }
.grid::-webkit-scrollbar { display: none; }
.col { display: grid; grid-template-rows: 24px 26px 32px 28px 30px 24px 18px 18px; gap: 3px; text-align: center; align-items: center; font-size: 12px; }
.col.lab { grid-auto-columns: auto; font-size: 11px; color: var(--ink-3); }
.col .h { font-weight: 800; font-size: 12px; border-radius: 8px; height: 24px; display: grid; place-items: center; }
.col .h.k { background: var(--main); color: #fff; }
.col .h.out { color: var(--ink-3); }
.col .w svg { width: 22px; height: 22px; margin: auto; }
.col .v { border-radius: 8px; height: 100%; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.col .g { border-radius: 8px; height: 100%; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; }
.col .d { border-radius: 8px; height: 100%; display: grid; place-items: center; }
.col .d svg { width: 16px; height: 16px; }
.col .m svg { width: 15px; height: 15px; margin: auto; }
.col .m.good { color: var(--good); } .col .m.bad { color: var(--bad); } .col .m.neu { color: var(--main); }
.col .p { color: var(--ink-2); }
.col .p.r { color: var(--main-ink); font-weight: 700; }
.col .tp { color: var(--ink-2); }
.foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.grad { display: flex; gap: 6px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-2); }
.grad span { display: inline-flex; align-items: center; gap: 5px; }
.grad i { display: inline-block; width: 30px; height: 10px; border-radius: 5px; }
.pictos { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--ink-2); }
.pictos span { display: inline-flex; align-items: center; gap: 4px; }
.pictos svg { width: 13px; height: 13px; }
.sets { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 6px; }
.set { display: flex; align-items: center; justify-content: space-between; gap: 6px; background: var(--page); border-radius: 12px; padding: 6px 8px; font-size: 13px; }
.set .lb { font-weight: 600; }
.set .ctl { display: inline-flex; align-items: center; gap: 4px; }
.set .ctl b { min-width: 24px; text-align: center; }
.set .ctl button { width: 28px; height: 28px; border-radius: 50%; background: #fff; font-weight: 800; font-size: 16px; color: var(--main-ink); box-shadow: 0 1px 2px rgba(11, 59, 69, 0.12); }
.set .ctl small { color: var(--ink-2); }

/* ---------- 4. Marée ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.nav .c { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nav .arr { width: 32px; height: 32px; border-radius: 50%; background: var(--page); display: grid; place-items: center; flex-shrink: 0; }
.nav .arr svg { width: 16px; height: 16px; }
.nav .lbl { font-weight: 800; font-size: 14.5px; position: relative; }
.nav .lbl input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.nav .today { font-size: 12px; font-weight: 700; color: var(--main-ink); background: var(--page); padding: 5px 10px; border-radius: 999px; }
.tidenow { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; margin: 6px 0; }
.tidenow b { font-weight: 800; }
.tt { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.tt div { background: var(--page); border-radius: 12px; padding: 7px 4px; text-align: center; font-size: 11.5px; color: var(--ink-2); }
.tt div b { display: block; font-size: 15px; color: var(--ink); }
.tt div.past { opacity: 0.45; }
.tidefoot { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: space-between; font-size: 12.5px; margin-top: 10px; }
.tidefoot button { color: var(--main-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 5. Webcams ---------- */
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; margin-top: 10px; border-radius: 12px; overflow: hidden; background: #1f2a2d; }
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.camnote { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; }
.camnote a { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.camnote a svg { width: 13px; height: 13px; }

/* ---------- Graphes ---------- */
.chart { width: 100%; height: auto; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.chart text { font-family: inherit; font-size: 12px; fill: var(--ink-3); }
.chart .v { font-size: 11.5px; fill: var(--ink); font-weight: 700; }
.bars-click rect.hit { cursor: pointer; }
.tip { position: absolute; pointer-events: none; background: #fff; border-radius: 10px; box-shadow: 0 6px 20px rgba(11, 59, 69, 0.18); padding: 6px 8px; font-size: 12px; min-width: 130px; z-index: 5; }
.tip .r { display: flex; justify-content: space-between; gap: 10px; padding: 2px 4px; border-radius: 6px; align-items: center; }
.tip .r i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.tip .r.best { box-shadow: inset 0 0 0 1.5px currentColor; }
.tip .hd { font-weight: 800; margin-bottom: 2px; }
.chartwrap { position: relative; }
.lgd { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.lgd button { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--page); }
.lgd button i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.lgd button.off { opacity: 0.4; text-decoration: line-through; }

/* Classements */
.rank { display: grid; gap: 4px; margin-top: 10px; }
.rank .rr { display: grid; grid-template-columns: 10px 64px 1fr auto; gap: 8px; align-items: center; font-size: 13px; padding: 5px 8px; border-radius: 10px; }
.rank .rr:first-child { background: var(--page); }
.rank .rr i { width: 10px; height: 10px; border-radius: 50%; }
.rank .rr b { font-variation-settings: 'wdth' 110; }
.rank .rr .bi { font-size: 12px; color: var(--ink-2); }
.lt { margin-top: 12px; }
.ltb { border-top: 1px solid var(--line); padding: 10px 0 4px; }
.ltb .hd { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ltb .hd b { font-size: 14.5px; }
.lttab { display: grid; gap: 2px; font-size: 12.5px; margin-top: 8px; }
.ltr { display: grid; grid-template-columns: 70px 1fr 1.1fr; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; }
.ltr.th { color: var(--ink-3); font-size: 12px; padding-bottom: 0; }
.ltr.win { box-shadow: inset 0 0 0 1.5px var(--main); background: #F4FCFD; }
.bar { height: 8px; background: var(--page); border-radius: 4px; overflow: hidden; margin-top: 3px; }
.bar i { display: block; height: 100%; background: var(--main); }
.stack { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin: 8px 0; }

.season { margin-top: 6px; }
.fade { opacity: 0.55; }

@media (min-width: 700px) {
  .wrap { padding-top: 22px; gap: 16px; }
  .card { padding: 18px; }
  .grid { grid-auto-columns: 50px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.stack i { display: block; }
.balrow { gap: 5px; }
.balinfo { overflow: hidden; padding-left: 3px; }
.balinfo .bd .pill { font-size: 11px; padding: 2px 6px; }
.balinfo .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 480px) { .balrow { gap: 8px; } .balinfo .bd .pill { font-size: 12px; padding: 3px 8px; } }
