/* ============ Velo Pulse — identité visuelle ============ */
@font-face { font-family: 'Barlow Condensed'; src: url(../fonts/BarlowCondensed-Medium.ttf); font-weight: 500; }
@font-face { font-family: 'Barlow Condensed'; src: url(../fonts/BarlowCondensed-SemiBold.ttf); font-weight: 600; }
@font-face { font-family: 'Barlow Condensed'; src: url(../fonts/BarlowCondensed-Italic.ttf); font-weight: 500; font-style: italic; }
@font-face { font-family: 'Barlow Condensed'; src: url(../fonts/BarlowCondensed-BoldItalic.ttf); font-weight: 700; font-style: italic; }
@font-face { font-family: 'Barlow Condensed'; src: url(../fonts/BarlowCondensed-ExtraBoldItalic.ttf); font-weight: 800; font-style: italic; }
@font-face { font-family: 'Barlow'; src: url(../fonts/Barlow-Regular.ttf); font-weight: 400; }
@font-face { font-family: 'Barlow'; src: url(../fonts/Barlow-Medium.ttf); font-weight: 500; }
@font-face { font-family: 'Barlow'; src: url(../fonts/Barlow-SemiBold.ttf); font-weight: 600; }

:root {
  --bg: #08080a; --bg2: #0f0f13; --panel: rgba(16, 16, 20, .86); --panel-solid: #121216; --line: rgba(255, 255, 255, .08);
  --text: #f4f2ef; --muted: #9c9aa3; --dim: #6b6973;
  --orange: #ff6a1a; --orange2: #ff8f1f; --red: #e3241b; --gold: #ffc531; --green: #3ddc84; --cyan: #29c6e6;
  --glow: 0 0 0 1px rgba(255, 106, 26, .55), 0 0 22px -6px rgba(255, 90, 20, .65);
  --grad: linear-gradient(180deg, #ffa22e 0%, #ff6a1a 45%, #e3241b 100%);
  --radius: 14px; --menu-w: 248px; --top-h: 84px; --status-h: 44px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font-d: 'Barlow Condensed', 'Arial Narrow', sans-serif; --font: 'Barlow', 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; -webkit-font-smoothing: antialiased; }
body { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--orange2); }
h1, h2, h3, h4 { font-family: var(--font-d); margin: 0; letter-spacing: .01em; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .orange { color: var(--orange); } .green { color: var(--green); } .gold { color: var(--gold); }
.hidden { display: none !important; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: #2a2a31; border-radius: 8px; } ::-webkit-scrollbar-track { background: transparent; }

/* ---------- Écran de démarrage ---------- */
#boot-screen { position: fixed; inset: 0; display: grid; place-content: center; gap: 22px; background: radial-gradient(circle at 50% 40%, #1b0f08, #050506 60%); z-index: 100; transition: opacity .5s; }
#boot-screen.gone { opacity: 0; pointer-events: none; }
.boot-logo { width: 320px; height: 90px; background: url(../img/mark.svg) center/contain no-repeat; }
.boot-bar { width: 320px; height: 3px; background: #222; border-radius: 3px; overflow: hidden; } .boot-bar span { display: block; height: 100%; width: 40%; background: var(--grad); animation: boot 1.1s infinite var(--ease); }
@keyframes boot { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* ---------- Mise en page ---------- */
#app { display: grid; grid-template-columns: 1fr var(--menu-w); grid-template-rows: var(--top-h) 1fr var(--status-h); height: 100vh; transition: grid-template-columns .45s var(--ease); }
#app.menu-closed { grid-template-columns: 1fr 0px; }
#app.no-chrome { grid-template-columns: 1fr 0; grid-template-rows: 0 1fr 0; }
#app.no-chrome .topbar, #app.no-chrome .statusbar, #app.no-chrome .sidemenu { display: none; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; padding: 0 18px 0 22px; background: linear-gradient(180deg, #0c0c0f, #09090b); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 106, 26, .6), transparent); }
#view { grid-column: 1; grid-row: 2; overflow: auto; position: relative; outline: none; padding: 18px 18px 22px 22px; }
#view.full { padding: 0; overflow: hidden; }
.statusbar { grid-column: 1 / -1; grid-row: 3; display: flex; align-items: center; gap: 16px; padding: 0 22px; background: #070708; border-top: 1px solid var(--line); font-size: 13px; position: relative; z-index: 5; }
.statusbar .tag { flex: 1; text-align: center; font-family: var(--font-d); font-style: italic; font-size: 17px; color: #d9d6d0; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--dim); margin-right: 8px; vertical-align: -1px; }
.dot.on { background: var(--green); box-shadow: 0 0 10px var(--green); } .dot.warn { background: var(--gold); } .dot.off { background: var(--red); }

/* ---------- Logo ---------- */
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 250px; cursor: pointer; }
.logo img { height: 58px; }
.logo .word { font-family: var(--font-d); font-weight: 800; font-style: italic; font-size: 40px; line-height: .9; letter-spacing: .01em; }
.logo .word b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo small { display: block; font-family: var(--font-d); font-style: italic; letter-spacing: .22em; font-size: 12.5px; color: #cfcac3; margin-top: 4px; }

/* ---------- Barre du haut ---------- */
.player-chip { display: flex; align-items: center; gap: 12px; padding: 6px 14px 6px 6px; border-radius: 40px; cursor: pointer; transition: background .2s; }
.player-chip:hover { background: rgba(255, 255, 255, .04); }
.avatar { width: 54px; height: 54px; border-radius: 50%; background: #222 center/cover; border: 2px solid var(--orange); box-shadow: 0 0 14px -4px var(--orange); flex: none; overflow: hidden; }
.avatar canvas, .avatar img { width: 100%; height: 100%; display: block; }
.player-chip .name { font-family: var(--font-d); font-weight: 600; font-size: 20px; }
.player-chip .lvl { font-size: 13px; color: var(--muted); display: flex; gap: 18px; justify-content: space-between; }
.xpbar { height: 5px; background: #26262c; border-radius: 4px; overflow: hidden; margin-top: 5px; width: 210px; }
.xpbar span { display: block; height: 100%; background: var(--grad); border-radius: 4px; transition: width .8s var(--ease); }
.top-stats { display: flex; align-items: center; gap: 4px; margin-left: 10px; }
.top-stat { display: flex; align-items: center; gap: 9px; padding: 0 16px; font-family: var(--font-d); font-size: 22px; font-weight: 600; border-left: 1px solid var(--line); }
.top-stat:first-child { border-left: none; }
.coin { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe789, #ffb714 55%, #c97c06); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25); display: inline-grid; place-items: center; color: #8a4f00; font-size: 14px; font-weight: 800; flex: none; }
.coin::after { content: '€'; font-family: var(--font); font-size: 12px; opacity: 0; }
.plus { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--red); color: var(--red); display: inline-grid; place-items: center; font-size: 16px; line-height: 1; cursor: pointer; background: none; padding: 0; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 12px; border: none; background: transparent; color: var(--text); cursor: pointer; display: grid; place-items: center; transition: background .2s, transform .2s; }
.icon-btn:hover { background: rgba(255, 255, 255, .06); } .icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 24px; height: 24px; }
.badge { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); font-size: 11px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px #0b0b0e; }

/* ---------- Menu latéral droit ---------- */
.sidemenu { grid-column: 2; grid-row: 2; overflow: hidden; background: linear-gradient(180deg, #0d0d10, #09090b); border-left: 1px solid var(--line); display: flex; flex-direction: column; position: relative; z-index: 4; }
.sidemenu-inner { width: var(--menu-w); padding: 14px 0 12px; display: flex; flex-direction: column; height: 100%; transform: translateX(0); transition: transform .45s var(--ease), opacity .3s; }
#app.menu-closed .sidemenu-inner { transform: translateX(40px); opacity: 0; }
.nav { list-style: none; margin: 0; padding: 0 0 0 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav a { display: flex; align-items: center; gap: 18px; padding: 11px 18px 11px 22px; border-radius: 14px 0 0 14px; text-decoration: none; color: #e6e3de; font-family: var(--font-d); font-weight: 500; font-size: 20px; position: relative; transition: background .25s, color .25s, padding .25s; }
.nav a svg { width: 26px; height: 26px; flex: none; opacity: .92; }
.nav a:hover { background: rgba(255, 255, 255, .04); padding-left: 26px; }
.nav a.active { background: linear-gradient(90deg, #e3241b, #ff6a1a 70%, rgba(255, 106, 26, .0)); color: #fff; box-shadow: -8px 0 30px -10px rgba(255, 70, 20, .8); }
.nav a.active::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; background: #ffd27a; border-radius: 2px; }
.nav .sep { height: 1px; background: var(--line); margin: 8px 16px; }
.community { margin: auto 12px 0; padding: 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(255, 106, 26, .18), rgba(227, 36, 27, .1)); border: 1px solid rgba(255, 106, 26, .35); cursor: pointer; display: flex; gap: 12px; align-items: center; transition: transform .2s; }
.community:hover { transform: translateY(-2px); }
.community .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; flex: none; }
.community b { font-family: var(--font-d); font-size: 17px; display: block; } .community span { font-size: 12.5px; color: var(--muted); }
.menu-toggle { position: absolute; left: -15px; top: 50%; width: 30px; height: 58px; border-radius: 10px 0 0 10px; background: #141418; border: 1px solid var(--line); border-right: none; color: var(--muted); cursor: pointer; z-index: 6; display: grid; place-items: center; transition: color .2s; }
.menu-toggle:hover { color: var(--orange); }
#app.menu-closed .menu-toggle svg { transform: rotate(180deg); }

/* ---------- Panneaux / cartes ---------- */
.panel { background: var(--panel); border: 1px solid rgba(255, 106, 26, .35); border-radius: var(--radius); box-shadow: 0 0 24px -12px rgba(255, 80, 20, .6), inset 0 1px 0 rgba(255, 255, 255, .03); position: relative; backdrop-filter: blur(10px); }
.panel.plain { border-color: var(--line); box-shadow: none; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 10px; }
.panel-head h3 { font-size: 22px; font-weight: 600; flex: 1; display: flex; gap: 10px; align-items: center; }
.panel-head h3 svg { width: 24px; height: 24px; color: var(--orange); }
.link { background: none; border: none; color: #e4e0da; cursor: pointer; font-family: var(--font-d); font-size: 16px; display: inline-flex; gap: 6px; align-items: center; padding: 4px 2px; }
.link:hover { color: var(--orange); }
.page-title { display: flex; align-items: flex-end; gap: 16px; margin: 2px 0 18px; }
.page-title h1 { font-size: 44px; font-weight: 800; font-style: italic; line-height: 1; }
.page-title h1 b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-title p { margin: 0 0 4px; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ---------- Boutons & formulaires ---------- */
.btn { --b: var(--grad); display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: none; border-radius: 12px; padding: 11px 20px; background: var(--b); color: #1a0700; font-family: var(--font-d); font-weight: 700; font-size: 19px; cursor: pointer; box-shadow: 0 6px 22px -8px rgba(255, 90, 20, .9), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .15s, filter .2s, box-shadow .2s; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); } .btn:active { transform: translateY(1px) scale(.98); }
.btn[disabled] { filter: grayscale(.8) brightness(.6); cursor: not-allowed; transform: none; }
.btn.ghost { background: rgba(255, 255, 255, .05); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px rgba(255, 106, 26, .6); }
.btn.danger { background: linear-gradient(180deg, #ff4d4d, #b3140e); color: #fff; }
.btn.sm { padding: 7px 14px; font-size: 16px; border-radius: 10px; }
.btn.xl { padding: 16px 30px; font-size: 26px; border-radius: 16px; }
.btn svg { width: 1.1em; height: 1.1em; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 500; }
.input, select.input, textarea.input { width: 100%; background: #0b0b0e; border: 1px solid #2a2a31; border-radius: 10px; padding: 11px 13px; outline: none; transition: border .2s, box-shadow .2s; }
.input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 106, 26, .18); }
.row { display: flex; gap: 12px; align-items: center; } .row.wrap { flex-wrap: wrap; } .spacer { flex: 1; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 7px 14px; border-radius: 20px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); cursor: pointer; font-family: var(--font-d); font-size: 16px; transition: all .2s; }
.chip:hover { border-color: rgba(255, 106, 26, .5); } .chip.on { background: var(--grad); color: #1a0700; border-color: transparent; font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; font-size: 12.5px; font-weight: 600; background: rgba(255, 255, 255, .07); }
.pill.live { background: #e3241b; color: #fff; } .pill.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
.pill.ok { background: rgba(61, 220, 132, .15); color: var(--green); } .pill.warn { background: rgba(255, 197, 49, .14); color: var(--gold); } .pill.bad { background: rgba(227, 36, 27, .18); color: #ff7b72; }
@keyframes pulse { 50% { opacity: .3; } }
.diff { display: inline-flex; gap: 3px; } .diff i { width: 8px; height: 14px; border-radius: 2px; background: #2c2c33; transform: skewX(-12deg); } .diff i.on { background: var(--grad); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid rgba(255, 255, 255, .04); }
.tbl tr:hover td { background: rgba(255, 255, 255, .02); }
.empty { padding: 26px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-family: var(--font-d); font-size: 20px; margin-bottom: 6px; }
.skeleton { background: linear-gradient(90deg, #15151a 0%, #1f1f25 50%, #15151a 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Accueil ---------- */
.home { display: grid; gap: 16px; grid-template-rows: minmax(330px, 1fr) auto auto; min-height: 100%; }
.hero { position: relative; border-radius: 18px; overflow: hidden; min-height: 330px; border: 1px solid rgba(255, 106, 26, .3); }
/* photo agrandie et calée à droite : le cycliste reste visible à gauche de l'encart « Prochain défi » */
.hero-photo { background: #0b0b0e url(../img/hero-accueil.jpg) 100% 38% / max(110%, 640px) auto no-repeat; min-height: 380px; }
@media (max-width: 900px) { .hero-photo { background-image: url(../img/hero-accueil-1000.jpg); background-position: 72% center; } }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 5, 7, .72) 0%, rgba(5, 5, 7, .25) 40%, transparent 60%), linear-gradient(0deg, rgba(5, 5, 7, .55), transparent 40%); pointer-events: none; }
.hero-text { position: absolute; left: 36px; top: 40px; z-index: 2; max-width: 560px; }
.hero-text h1 { font-size: clamp(42px, 5.2vw, 76px); font-weight: 800; font-style: italic; line-height: .92; text-shadow: 0 4px 30px rgba(0, 0, 0, .5); }
.hero-text h1 b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; }
.hero-text p { font-family: var(--font-d); font-style: italic; font-size: 22px; margin: 14px 0 24px; color: #efeae4; text-shadow: 0 2px 10px #000; }
.hero-universe { position: absolute; left: 36px; bottom: 22px; z-index: 2; display: flex; gap: 8px; }
.hero-universe .chip { backdrop-filter: blur(6px); background: rgba(10, 10, 12, .55); }
.challenge { position: absolute; right: 18px; top: 18px; width: 300px; z-index: 2; padding: 0 0 14px; }
.challenge .panel-head h3 { color: var(--gold); }
.challenge .body { display: flex; gap: 12px; padding: 0 16px; }
.challenge .thumb { width: 92px; height: 74px; border-radius: 10px; flex: none; background: #222 center/cover; border: 1px solid var(--line); }
.challenge h4 { font-size: 21px; } .challenge .desc { font-size: 14px; color: #d8d3cc; margin-top: 4px; }
.progress { height: 8px; border-radius: 6px; background: #2a2a31; overflow: hidden; flex: 1; } .progress span { display: block; height: 100%; background: var(--grad); }
.rewards { display: flex; gap: 22px; padding: 0 16px; font-family: var(--font-d); font-size: 19px; font-weight: 600; align-items: center; }
.xp-badge { background: var(--red); color: #fff; font-size: 12px; font-weight: 800; padding: 3px 5px; border-radius: 7px; font-family: var(--font); transform: rotate(-8deg); display: inline-block; margin-right: 6px; }
.stats4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card { display: flex; align-items: center; gap: 18px; padding: 16px 22px; min-height: 104px; }
.stat-card .big { font-family: var(--font-d); font-weight: 600; font-size: 36px; line-height: 1; }
.stat-card .lbl { color: #d6d1ca; font-size: 17px; font-family: var(--font-d); margin-top: 4px; }
.stat-card .ico { width: 60px; height: 60px; flex: none; display: grid; place-items: center; }
.ring { width: 78px; height: 78px; position: relative; flex: none; } .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-d); font-size: 34px; font-weight: 600; }
.bottom3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.event-card { margin: 0 14px 14px; border-radius: 12px; overflow: hidden; position: relative; min-height: 196px; background: #1b1b20 center/cover; display: flex; flex-direction: column; justify-content: flex-end; }
.event-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, .1) 65%); }
.event-card > * { position: relative; }
.event-card .pill { position: absolute; top: 10px; right: 10px; }
.event-card .info { padding: 12px 14px; display: flex; align-items: flex-end; gap: 10px; }
.event-card h4 { font-size: 26px; font-weight: 600; } .event-card .meta { font-size: 14px; color: #ddd; display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.ride-row { display: flex; align-items: center; gap: 14px; padding: 9px 16px; border-top: 1px solid rgba(255, 255, 255, .05); cursor: pointer; transition: background .2s; }
.ride-row:hover { background: rgba(255, 255, 255, .03); }
.ride-row .thumb { width: 84px; height: 54px; border-radius: 8px; flex: none; background: #222 center/cover; }
.ride-row h5 { margin: 0; font-family: var(--font-d); font-size: 20px; font-weight: 600; } .ride-row .m { font-size: 14px; color: var(--muted); }
.ride-row .xp { margin-left: auto; color: var(--green); font-family: var(--font-d); font-size: 22px; font-weight: 600; }
.shop-quick { padding: 0 16px 14px; display: flex; flex-direction: column; align-items: center; }
.shop-quick canvas { width: 100%; height: 150px; }
.shop-quick .line { display: flex; align-items: center; width: 100%; gap: 10px; font-family: var(--font-d); font-size: 20px; }

/* ---------- Pages génériques ---------- */
.route-card { overflow: hidden; display: flex; flex-direction: column; transition: transform .25s var(--ease), box-shadow .25s; }
.route-card:hover { transform: translateY(-3px); box-shadow: var(--glow); }
.route-card .img { height: 150px; background: #1a1a1f center/cover; position: relative; }
.route-card .img .pill { position: absolute; top: 10px; left: 10px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); }
.route-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.route-card h3 { font-size: 24px; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kv div { background: rgba(255, 255, 255, .03); border-radius: 10px; padding: 8px 10px; }
.kv b { display: block; font-family: var(--font-d); font-size: 20px; } .kv span { font-size: 12px; color: var(--muted); }
.item-card { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.item-card .preview { height: 140px; border-radius: 10px; background: radial-gradient(circle at 50% 60%, #26262c, #111114); display: grid; place-items: center; overflow: hidden; }
.item-card .preview canvas { width: 100%; height: 100%; }
.item-card h4 { font-size: 21px; } .item-card p { margin: 0; font-size: 13.5px; color: var(--muted); min-height: 36px; }
.item-card .price { font-family: var(--font-d); font-size: 22px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.statbars { display: grid; gap: 5px; font-size: 12.5px; color: var(--muted); }
.statbars div { display: grid; grid-template-columns: 80px 1fr 44px; gap: 8px; align-items: center; }
.statbars i { height: 5px; border-radius: 3px; background: #26262c; overflow: hidden; } .statbars i span { display: block; height: 100%; background: var(--grad); }
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; height: 100%; min-height: 560px; }
.viewer { position: relative; overflow: hidden; min-height: 520px; }
.viewer canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.viewer .hint { position: absolute; left: 16px; bottom: 14px; font-size: 13px; color: var(--muted); }
.list { display: flex; flex-direction: column; gap: 8px; padding: 0 14px 14px; overflow: auto; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid transparent; cursor: pointer; transition: all .2s; }
.list-item:hover { border-color: rgba(255, 106, 26, .35); } .list-item.on { border-color: var(--orange); background: rgba(255, 106, 26, .08); }
.swatch { width: 34px; height: 34px; border-radius: 9px; flex: none; border: 1px solid rgba(255, 255, 255, .15); }
.chart { width: 100%; height: 220px; }

/* ---------- Sortie (HUD) ---------- */
.ride { position: absolute; inset: 0; }
/* écran de chargement d'une sortie : progression visible, jamais un écran noir muet */
.ride-loading { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center;
  background: radial-gradient(ellipse at 50% 35%, #1a0f08 0%, #060607 70%); color: var(--text, #f4f1ec); }
.ride-loading img { width: 64px; height: 64px; animation: rl-pulse 1.4s ease-in-out infinite; }
.ride-loading b { font-family: var(--font-d); font-size: 28px; letter-spacing: .02em; }
.ride-load-bar { width: min(420px, 80vw); height: 8px; border-radius: 99px; background: #1d1d22; overflow: hidden; }
.ride-load-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--orange, #ff6a1a), #ffb347); transition: width .35s ease; }
@keyframes rl-pulse { 50% { transform: scale(1.08); opacity: .8; } }
@media (prefers-reduced-motion: reduce) { .ride-loading img { animation: none; } }
.ride canvas.scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.hud { position: absolute; inset: 0; pointer-events: none; font-family: var(--font-d); }
.hud > * { pointer-events: auto; }
.hud-top { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.metric { background: rgba(8, 8, 10, .72); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; padding: 8px 18px; text-align: center; min-width: 112px; }
.metric b { display: block; font-size: 40px; font-weight: 600; line-height: 1; } .metric span { font-size: 13px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.metric.power b { color: var(--orange2); font-size: 52px; }
.hud-left { position: absolute; left: 16px; top: 14px; display: flex; flex-direction: column; gap: 8px; width: 250px; }
.hud-right { position: absolute; right: 16px; top: 14px; width: 260px; }
.lb-row { display: flex; gap: 8px; padding: 5px 12px; font-size: 17px; border-bottom: 1px solid rgba(255, 255, 255, .05); } .lb-row.me { color: var(--orange2); } .lb-row span:last-child { margin-left: auto; color: var(--muted); }
.hud-bottom { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; gap: 12px; align-items: flex-end; }
.profile-mini { flex: 1; height: 90px; background: rgba(8, 8, 10, .72); border-radius: 14px; border: 1px solid rgba(255, 255, 255, .08); position: relative; overflow: hidden; }
.profile-mini canvas { width: 100%; height: 100%; display: block; }
.grade { font-size: 30px; font-weight: 700; } .grade.up { color: #ff7b52; } .grade.down { color: var(--cyan); }
.keys { font-size: 13px; color: var(--muted); }

/* ---------- Auth ---------- */
.auth { position: fixed; inset: 0; display: grid; grid-template-columns: 1.2fr 1fr; background: #060607; z-index: 20; }
.auth .visual { position: relative; overflow: hidden; }
.auth .visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth .visual::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 60%, #060607), linear-gradient(0deg, rgba(0, 0, 0, .6), transparent 40%); }
.auth .visual .claim { position: absolute; left: 48px; bottom: 48px; z-index: 2; font-family: var(--font-d); font-style: italic; font-weight: 800; font-size: 64px; line-height: .92; }
.auth .visual .claim b { display: block; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth .form-side { display: grid; place-items: center; padding: 40px; overflow: auto; }
.auth form { width: min(420px, 100%); }
.auth .logo { margin-bottom: 30px; }
.auth h2 { font-size: 34px; font-weight: 700; font-style: italic; margin-bottom: 6px; }
.auth .switch { margin-top: 18px; color: var(--muted); font-size: 14px; display: flex; justify-content: space-between; }
.auth .switch a { cursor: pointer; }
.notice { padding: 12px 14px; border-radius: 12px; background: rgba(255, 197, 49, .08); border: 1px solid rgba(255, 197, 49, .3); font-size: 14px; margin-bottom: 14px; }
.notice.err { background: rgba(227, 36, 27, .1); border-color: rgba(227, 36, 27, .45); }
.notice.ok { background: rgba(61, 220, 132, .08); border-color: rgba(61, 220, 132, .35); }

/* ---------- Toasts / modales ---------- */
#toasts { position: fixed; right: 270px; bottom: 60px; display: flex; flex-direction: column; gap: 10px; z-index: 60; }
.toast { min-width: 280px; max-width: 380px; padding: 13px 16px; border-radius: 14px; background: #15151a; border: 1px solid rgba(255, 106, 26, .4); box-shadow: 0 10px 40px -10px #000; display: flex; gap: 12px; align-items: center; animation: tin .4s var(--ease); }
.toast.err { border-color: rgba(227, 36, 27, .6); } .toast.ok { border-color: rgba(61, 220, 132, .45); }
.toast.out { animation: tout .3s forwards; }
.toast b { font-family: var(--font-d); font-size: 18px; display: block; }
@keyframes tin { from { opacity: 0; transform: translateX(30px); } } @keyframes tout { to { opacity: 0; transform: translateX(30px); } }
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); z-index: 50; display: grid; place-items: center; animation: fade .25s; }
.modal { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 60px); overflow: auto; padding: 22px; animation: pop .3s var(--ease); }
.modal h3 { font-size: 28px; margin-bottom: 10px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: scale(.94) translateY(10px); } }
.levelup { text-align: center; padding: 30px 22px; }
.levelup .num { font-family: var(--font-d); font-size: 120px; font-weight: 800; font-style: italic; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; animation: lvl 1s var(--ease); }
@keyframes lvl { 0% { transform: scale(.2) rotate(-12deg); opacity: 0; } 70% { transform: scale(1.15); } }
.view-enter { animation: venter .12s ease-out; }
@keyframes venter { from { opacity: .4; transform: translateY(4px); } }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) { .top-stats .top-stat:nth-child(n+2) { display: none; } .xpbar { width: 150px; } .bottom3 { grid-template-columns: 1fr 1fr; } .bottom3 > :last-child { display: none; } }
@media (max-width: 980px) {
  :root { --menu-w: 0px; }
  #app { grid-template-columns: 1fr; }
  .sidemenu { position: fixed; right: 0; top: var(--top-h); bottom: var(--status-h); width: 248px; transform: translateX(100%); transition: transform .4s var(--ease); }
  #app.menu-open .sidemenu { transform: none; box-shadow: -20px 0 60px #000; }
  .sidemenu-inner { width: 248px; } .menu-toggle { display: none; }
  .stats4 { grid-template-columns: 1fr 1fr; } .bottom3, .split { grid-template-columns: 1fr; } .challenge { display: none; }
  .logo .word { font-size: 30px; } .logo { min-width: 0; } .player-chip .xpbar, .player-chip .lvl { display: none; }
  .auth { grid-template-columns: 1fr; } .auth .visual { display: none; }
  #toasts { right: 16px; }
}
@media (max-width: 560px) { #view { padding: 12px 16px; } .stats4 { grid-template-columns: 1fr; } .top-stats { display: none; } .statusbar .tag { display: none; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.mobile-menu { display: none; }
@media (max-width: 980px) { .mobile-menu { display: grid; } }
.hero-universe { left: auto; right: 18px; bottom: 18px; }
.link { white-space: nowrap; }
.top-stat { white-space: nowrap; } .top-stat svg { width: 26px; height: 26px; }
.statusbar svg { width: 16px; height: 16px; vertical-align: -3px; }
.top-stat .gold svg { fill: currentColor; }
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.22em; }
.list-item > .ic { width: 22px; height: 22px; color: var(--orange); }
.drop .ic { width: 40px; height: 40px; color: var(--orange); }

/* Évite que la barre du haut élargisse la page sur petit écran */
#app { grid-template-columns: minmax(0, 1fr) var(--menu-w); } #app.menu-closed { grid-template-columns: minmax(0, 1fr) 0px; }
.topbar { min-width: 0; overflow: hidden; }
@media (max-width: 980px) { #app, #app.menu-closed { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .logo img { height: 40px; } .logo > div { display: none; } .player-chip .name { display: none; } .player-chip { padding-right: 6px; } .avatar { width: 42px; height: 42px; } }
/* Promotions & saisons */
.item-card .preview { position: relative; }
.promo-badge { position: absolute; top: 10px; left: 10px; padding: 5px 10px; border-radius: 8px; background: #e3241b; color: #fff; font: 800 15px var(--font-d); font-style: italic; transform: rotate(-4deg); box-shadow: 0 6px 16px -6px rgba(227, 36, 27, .9); }
.season-badge { position: absolute; top: 10px; right: 10px; padding: 4px 9px; border-radius: 20px; background: rgba(0, 0, 0, .55); color: #ffd166; font: 600 11.5px var(--font); letter-spacing: .05em; text-transform: uppercase; }
.item-card.has-promo { border-color: rgba(227, 36, 27, .5); }
.old-price { color: var(--dim); font-size: 16px; margin-right: 4px; }
.chip-promo:not(.on) { border-color: rgba(227, 36, 27, .6); color: #ff8a80; }
.shop-banner { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.sb-season { flex: 2 1 300px; display: grid; gap: 2px; padding: 14px 18px; border-radius: 16px; background: linear-gradient(120deg, color-mix(in srgb, var(--sb) 55%, #000), color-mix(in srgb, var(--sb) 18%, #0b0b0e)); border: 1px solid color-mix(in srgb, var(--sb) 60%, transparent); }
.sb-season b { font: 800 26px var(--font-d); font-style: italic; } .sb-season small, .sb-promo small { color: rgba(255, 255, 255, .7); }
.sb-promo { flex: 1 1 200px; display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 16px; background: #15151a; border: 1px solid rgba(227, 36, 27, .45); }
.sb-promo em { font: 800 26px var(--font-d); font-style: italic; color: #ff5a4f; white-space: nowrap; } .sb-promo b { display: block; font-family: var(--font-d); font-size: 18px; }
.season-strip { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 14px; background: linear-gradient(90deg, color-mix(in srgb, var(--sb) 45%, #000), rgba(0, 0, 0, .2)); border: 1px solid color-mix(in srgb, var(--sb) 55%, transparent); cursor: pointer; }
.season-strip b { font: 700 20px var(--font-d); font-style: italic; } .season-strip span { color: rgba(255, 255, 255, .8); font-size: 14px; flex: 1; } .season-strip em { font-style: normal; font: 700 14px var(--font); padding: 4px 10px; border-radius: 20px; background: rgba(0, 0, 0, .35); }
.hero-text .season-strip { padding: 6px 12px; gap: 10px; } .hero-text .season-strip b { font-size: 17px; } .hero-text .season-strip span { font-size: 13px; }
.hero-text:has(.season-strip) { top: 22px; } .hero-text:has(.season-strip) p { margin: 8px 0 14px; }

/* Serveur injoignable */
.offline-screen { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: var(--bg, #0b0b0e); }

/* Connexion « en tant que » (administrateur) */
#imp-banner { position: fixed; z-index: 90; left: 50%; bottom: 46px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
  max-width: calc(100vw - 16px); padding: 8px 10px 8px 16px; border-radius: 999px; background: #7c2d12; border: 1px solid #fb923c; color: #fff; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
#imp-banner .btn { background: #fff; color: #7c2d12; }
@media (max-width: 560px) { #imp-banner { bottom: 10px; border-radius: 16px; } }

/* Aperçu 3D de la boutique : indicateur de chargement */
.pv-loader { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 14px; pointer-events: none; }
.pv-loader .spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.15); border-top-color: var(--orange, #ff6a1a); animation: pvspin .8s linear infinite; }
@keyframes pvspin { to { transform: rotate(360deg); } }
/* Panneau « Puissance » en course : courbe par zone, jauge, temps par zone */
.pz { padding: 10px 12px; margin-top: 10px; font-family: var(--font-b, 'Barlow', sans-serif); }
.pz-gauge { display: flex; gap: 3px; margin-top: 8px; }
.pz-gauge i { flex: 1; height: 10px; border-radius: 5px; opacity: .32; position: relative; transition: opacity .25s, height .25s, transform .25s; }
.pz-gauge i span { position: absolute; inset: auto 0 -16px; text-align: center; font: 600 10px var(--font-d); color: var(--muted); font-style: normal; }
.pz-gauge i.on { opacity: 1; height: 14px; transform: translateY(-2px); box-shadow: 0 0 12px currentColor; }
.pz-gauge i.on span { color: #fff; }
.pz-tiz { grid-template-columns: 24px 1fr 46px; gap: 3px 8px; align-items: center; margin-top: 22px; font-size: 12px; }
.pz-tiz span:last-child, .pz-tiz span:nth-child(3n) { text-align: right; font-variant-numeric: tabular-nums; }
.pz-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .07); overflow: hidden; } .pz-bar i { display: block; height: 100%; border-radius: 3px; }
.pz-legend { display: grid; gap: 4px; margin-bottom: 10px; font-size: 13.5px; }
.pz-legend div { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; } .pz-legend i { width: 12px; height: 12px; border-radius: 3px; }
.cam-btn { position: absolute; right: 16px; bottom: 120px; }
@media (max-width: 900px) { .pz-tiz { display: none !important; } }
.polls { display: grid; gap: 12px; margin-bottom: 16px; } .poll-card { padding: 14px 18px; }

/* Maintenance programmée : bandeau d'annonce (et rappel pour l'équipe pendant la maintenance) */
#maint-banner { position: fixed; z-index: 89; bottom: 44px; left: 50%; transform: translateX(-50%); max-width: min(760px, calc(100vw - 32px)); padding: 8px 16px; border-radius: 999px;
  background: #3b2a06; color: #fde68a; border: 1px solid #a16207; font-size: 13.5px; box-shadow: 0 6px 24px rgba(0,0,0,.35); text-align: center; pointer-events: none; }
#maint-banner.on { background: #4a1210; color: #fecaca; border-color: #b91c1c; }
#maint-banner .ic, #maint-banner svg { width: 15px; height: 15px; vertical-align: -2px; }
@media (max-width: 560px) { #maint-banner { bottom: 64px; border-radius: 14px; } }
body.impersonating #maint-banner { bottom: 96px; }
#maint-screen { z-index: 200; }

/* Messagerie équipe ↔ joueur */
.chat-modal { width: min(560px, calc(100vw - 32px)); }
.chat-list { display: flex; flex-direction: column; gap: 8px; max-height: min(52vh, 440px); overflow-y: auto; padding: 4px 2px; }
.chat-msg { max-width: 82%; align-self: flex-start; background: var(--panel2, rgba(255,255,255,.06)); border: 1px solid rgba(255,255,255,.08); border-radius: 14px 14px 14px 4px; padding: 8px 12px; }
.chat-msg.mine { align-self: flex-end; background: rgba(255,122,24,.16); border-color: rgba(255,122,24,.35); border-radius: 14px 14px 4px 14px; }
.chat-meta { font-size: 11.5px; opacity: .65; margin-bottom: 3px; }
.chat-body { white-space: pre-wrap; word-break: break-word; font-size: 14.5px; }

/* ---------- Langues et pays ---------- */
img.flag { display: inline-block; width: 22px; height: 16.5px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255,255,255,.12); flex: none; vertical-align: middle; }
.picker-wrap { position: relative; }
.picker-btn { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; cursor: pointer; min-height: 44px; }
.picker-btn > span:first-of-type { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-btn.compact { width: auto; min-height: 36px; padding: 6px 10px; gap: 8px; }
.picker-btn.compact > span:first-of-type { flex: none; }
.picker-caret { opacity: .6; font-size: 12px; }
.picker-hidden { position: absolute; inset-inline-start: 12px; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.picker-modal { width: min(520px, calc(100vw - 24px)); display: flex; flex-direction: column; max-height: min(86vh, 760px); }
.picker-search { margin: 6px 0 10px; font-size: 16px; } /* 16 px : évite le zoom automatique sur iPhone */
.picker-list { overflow-y: auto; flex: 1; min-height: 200px; display: flex; flex-direction: column; gap: 2px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.picker-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: transparent; border: 0; color: inherit; font: inherit; font-size: 15px; text-align: start; cursor: pointer; min-height: 46px; }
.picker-item:hover, .picker-item:focus-visible { background: rgba(255,255,255,.06); outline: none; }
.picker-item.on { background: rgba(255,122,24,.16); box-shadow: inset 0 0 0 1px rgba(255,122,24,.4); }
.picker-name { flex: 1; }
.picker-sub { font-size: 12.5px; opacity: .6; }
.auth-lang { position: absolute; top: 14px; inset-inline-end: 16px; z-index: 3; }
.form-side { position: relative; }
@media (max-width: 560px) { .picker-modal { width: 100vw; max-height: 92vh; border-radius: 18px 18px 0 0; } }

/* éditeur de traductions (administration) */
.i18n-row { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.06); display: grid; gap: 6px; }
.i18n-src { font-size: 14px; white-space: pre-wrap; }
.i18n-row textarea { width: 100%; resize: vertical; }
.chat-tr { font-size: 11.5px; margin-top: 4px; }
.chat-tr .link, .link.chat-orig { background: none; border: 0; padding: 0; color: var(--orange2, #ff9a2e); cursor: pointer; font: inherit; text-decoration: underline; }

/* écriture de droite à gauche (arabe, hébreu, persan, ourdou) */
[dir="rtl"] .xpbar span, [dir="rtl"] .pz-bar i { margin-inline-start: auto; }
[dir="rtl"] .icon-btn svg, [dir="rtl"] .nav svg { transform: none; }
[dir="rtl"] .menu-toggle svg, [dir="rtl"] .btn svg[data-i="chevron"] { transform: scaleX(-1); }

/* ---------- Entraînements (séances structurées) ---------- */
.wk-title { flex-wrap: wrap; align-items: center; }
.wk-ftp { display: flex; flex-direction: column; align-items: flex-end; text-decoration: none; color: var(--text); padding: 6px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.wk-ftp span { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; } .wk-ftp b { font-family: var(--font-d); font-size: 22px; color: var(--orange2); }
.wk-ftp:hover { border-color: rgba(255, 106, 26, .6); }
.wk-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.wk-tabs { display: flex; gap: 4px; background: #0b0b0e; border: 1px solid var(--line); border-radius: 12px; padding: 4px; overflow-x: auto; max-width: 100%; }
.wk-tabs button { border: none; background: none; padding: 8px 14px; border-radius: 9px; cursor: pointer; font-family: var(--font-d); font-size: 17px; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.wk-tabs button.on { background: var(--grad); color: #1a0700; font-weight: 700; } .wk-tabs button.on .wk-count { background: rgba(0, 0, 0, .2); color: #1a0700; }
.wk-count { font-family: var(--font); font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: rgba(255, 255, 255, .08); color: var(--muted); }
.wk-col { margin-bottom: 26px; }
.wk-col-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; padding-left: 12px; border-left: 3px solid var(--c, var(--orange)); }
.wk-col-head h2 { font-size: 26px; font-weight: 700; }
.wk-col-head .muted { font-size: 14px; }
.wk-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 290px); gap: 14px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; }
.wk-row > * { scroll-snap-align: start; }
.wk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.wk-card { text-align: left; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, #131317, #0c0c0f); cursor: pointer; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; min-width: 0; color: var(--text); }
.wk-card:hover { border-color: rgba(255, 106, 26, .55); transform: translateY(-2px); box-shadow: 0 10px 26px -16px rgba(255, 90, 20, .7); }
.wk-card-top { display: flex; align-items: center; gap: 8px; min-height: 20px; }
.wk-card-chart { width: 100%; height: 84px; display: block; border-radius: 8px; background: radial-gradient(120% 100% at 50% 100%, rgba(255, 106, 26, .07), transparent 70%), #09090b; }
.wk-card h3 { font-size: 21px; font-weight: 700; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wk-owner { font-size: 12.5px; color: var(--muted); margin-top: -4px; }
.wk-meta { display: flex; gap: 14px; align-items: center; font-size: 14px; color: #d8d4ce; margin-top: auto; }
.wk-meta span { display: inline-flex; gap: 5px; align-items: center; } .wk-meta svg { width: 15px; height: 15px; color: var(--muted); }
.wk-bonus { color: var(--gold); font-weight: 600; } .wk-meta .coin { width: 15px; height: 15px; }
.wk-tags { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.wk-tags span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--orange2); background: rgba(255, 106, 26, .1); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.wk-tags span.ghost { color: var(--muted); background: rgba(255, 255, 255, .06); }
.wk-tags.big span { font-size: 12.5px; padding: 4px 10px; }
.wk-diff { display: inline-flex; gap: 3px; } .wk-diff i { width: 6px; height: 12px; border-radius: 2px; background: #2a2a31; } .wk-diff i.on { background: var(--orange); }
.wk-fav { color: var(--gold); font-size: 15px; }
.wk-back { margin-bottom: 8px; } .wk-back svg { width: 16px; height: 16px; }
.wk-detail-head { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.wk-detail-head h1 { font-size: 42px; font-weight: 800; line-height: 1.05; margin: 6px 0 8px; }
.wk-coll-tag { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--c, var(--muted)); border: 1px solid currentColor; padding: 2px 10px; border-radius: 20px; }
.wk-star span:first-child { color: var(--muted); font-size: 18px; } .wk-star.on span:first-child { color: var(--gold); }
.wk-chart-panel { padding: 14px 14px 8px; margin-bottom: 14px; }
.wk-big-chart { width: 100%; height: 220px; display: block; }
.wk-legend { font-size: 12.5px; color: var(--muted); padding-top: 6px; }
.wk-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 14px; align-items: start; }
.wk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 8px; }
.wk-stats > div { background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; text-align: center; }
.wk-stats > div > b { display: block; font-family: var(--font-d); font-size: 24px; } .wk-stats > div > span { font-size: 12px; color: var(--muted); }
.wk-ed-stats { margin-bottom: 14px; }
.wk-start { display: flex; gap: 16px; align-items: center; padding: 16px; flex-wrap: wrap; } .wk-start > div { flex: 1 1 240px; } .wk-start b { font-family: var(--font-d); font-size: 22px; } .wk-start p { margin: 4px 0 0; font-size: 13.5px; }
.wk-tbl td, .wk-tbl th { white-space: nowrap; padding: 8px 10px; } .wk-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.wk-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: 0; }
.wk-h3 { font-size: 20px; margin-bottom: 10px; }
.wk-palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.wk-pal { --c: var(--orange); display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 10px 9px; border-radius: 12px; border: 1px solid var(--line); background: #0d0d10; cursor: pointer; color: var(--text); text-align: left; transition: border-color .2s, transform .15s; }
.wk-pal:hover { border-color: var(--c); transform: translateY(-1px); }
.wk-pal i { width: 100%; height: 6px; border-radius: 3px; background: var(--c); margin-bottom: 6px; box-shadow: 0 0 12px -2px var(--c); }
.wk-pal.ramp i { background: linear-gradient(90deg, #3d9fd9, #efc04a); box-shadow: none; } .wk-pal.free i { background: repeating-linear-gradient(135deg, #5b5961 0 5px, #2a2a31 5px 10px); box-shadow: none; }
.wk-pal b { font-family: var(--font-d); font-size: 17px; } .wk-pal span { font-size: 11.5px; color: var(--muted); }
.wk-ed-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; margin: 14px 0; }
.wk-fields { display: flex; gap: 14px; flex-wrap: wrap; } .wk-fields .field { margin-bottom: 4px; }
.wk-blist { display: flex; flex-direction: column; gap: 2px; }
.wk-bitem { display: grid; grid-template-columns: 18px 26px 56px 56px 1fr auto; gap: 6px; align-items: center; padding: 7px 10px; border: none; background: none; color: var(--text); border-radius: 8px; cursor: pointer; text-align: left; font-size: 13.5px; }
.wk-bitem:hover { background: rgba(255, 255, 255, .04); } .wk-bitem.on { background: rgba(255, 106, 26, .14); box-shadow: inset 2px 0 0 var(--orange); }
.wk-bitem .n { color: var(--muted); } .wk-bitem .wk-sw { margin: 0; }
.wk-effects { display: flex; gap: 6px; flex-wrap: wrap; } .wk-effects .chip { font-size: 15px; padding: 5px 12px; }
.wk-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.wk-seg button { flex: 1 1 180px; text-align: left; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: #0d0d10; color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.wk-seg button b { font-family: var(--font-d); font-size: 18px; } .wk-seg button span { font-size: 12.5px; color: var(--muted); }
.wk-seg button.on { border-color: var(--orange); box-shadow: var(--glow); }
.wk-settings { padding: 16px; max-width: 860px; }
/* en course : consigne de la séance */
.wk-hud { position: absolute; left: 50%; transform: translateX(-50%); top: 104px; width: min(560px, calc(100% - 32px)); padding: 10px 14px 10px; z-index: 4; }
.wk-hud-top { display: flex; align-items: center; gap: 14px; }
.wk-target { font-family: var(--font-d); font-size: 42px; font-weight: 800; line-height: 1; } .wk-target small { font-size: 18px; color: var(--muted); font-weight: 600; }
.wk-target.low { color: #7cc4ff; } .wk-target.high { color: #ff7b72; } .wk-target.ok { color: var(--green); }
.wk-hud-cd { margin-left: auto; text-align: right; } .wk-hud-cd b { font-family: var(--font-d); font-size: 30px; display: block; line-height: 1; } .wk-hud-cd span { font-size: 12px; color: var(--muted); }
.wk-hud-info { font-size: 13px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 6px; } .wk-hud-info b { color: var(--text); }
.wk-hud canvas { width: 100%; height: 46px; display: block; }
.wk-hud-mode { display: flex; gap: 8px; align-items: center; margin-top: 6px; font-size: 12.5px; }
.wk-flash { animation: wkflash .9s var(--ease); } @keyframes wkflash { 0% { box-shadow: 0 0 0 2px var(--orange), 0 0 40px rgba(255, 106, 26, .8); } 100% { box-shadow: none; } }
.wk-setup { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; } .wk-setup-chart { width: 100%; height: 60px; display: block; margin: 8px 0; }
@media (max-width: 980px) { .wk-detail-grid, .wk-ed-grid { grid-template-columns: minmax(0, 1fr); } .wk-detail-head h1 { font-size: 32px; } .wk-big-chart { height: 170px; } }
@media (max-width: 560px) { .wk-bar .spacer { display: none; } .wk-row { grid-auto-columns: 82%; } .wk-bar .input { max-width: none !important; flex: 1 1 140px; } .wk-hud { top: 92px; } .wk-target { font-size: 34px; } .wk-bitem { grid-template-columns: 14px 22px 48px 48px 1fr; } .wk-bitem > :last-child { display: none; } }

/* ---------- Chat des joueurs (panneau latéral) ---------- */
.cp { position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 100vw); z-index: 60; display: flex; flex-direction: column; background: linear-gradient(180deg, #111115, #0a0a0c); border-left: 1px solid rgba(255, 106, 26, .35); box-shadow: -18px 0 50px -20px rgba(0, 0, 0, .9); transform: translateX(105%); transition: transform .25s var(--ease); }
.cp.open { transform: none; }
.cp-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.cp-head > b { font-family: var(--font-d); font-size: 22px; font-style: italic; }
.cp-tabs { display: flex; gap: 4px; background: #0b0b0e; border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin-left: auto; }
.cp-tabs button { border: none; background: none; color: var(--muted); padding: 6px 12px; border-radius: 8px; cursor: pointer; font-family: var(--font-d); font-size: 16px; position: relative; display: inline-flex; gap: 6px; align-items: center; }
.cp-tabs button.on { background: var(--grad); color: #1a0700; font-weight: 700; }
.cp-tabs .badge, .badge.static { position: static; transform: none; }
.cp-close svg { width: 18px; height: 18px; }
.cp-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cp-sub { font-size: 12.5px; color: var(--dim); padding: 8px 16px 0; }
.cp-list { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.cp-msg { max-width: 88%; align-self: flex-start; background: #17171c; border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 7px 11px 8px; }
.cp-msg.mine { align-self: flex-end; background: rgba(255, 106, 26, .14); border-color: rgba(255, 106, 26, .35); border-radius: 14px 4px 14px 14px; }
.cp-msg.staff { border-color: rgba(61, 220, 132, .45); }
.cp-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 2px; }
.cp-who { border: none; background: none; padding: 0; color: var(--orange2); font-weight: 700; font-size: 13px; cursor: pointer; }
.cp-msg.mine .cp-who { color: var(--text); cursor: default; }
.cp-tag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--green); }
.cp-more { margin-left: auto; border: none; background: none; color: var(--dim); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px; }
.cp-more:hover { color: var(--text); }
.cp-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.4; }
.cp-msg .chat-tr { font-size: 11.5px; margin-top: 3px; }
.cp-note { font-size: 12.5px; color: var(--gold); padding: 0 14px; min-height: 0; }
.cp-note:not(:empty) { padding: 6px 14px; }
.cp-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.cp-input { resize: none; min-height: 42px; max-height: 120px; padding: 10px 12px; }
.cp-send { flex: none; height: 42px; }
.cp-search { padding: 12px 12px 6px; border-bottom: 1px solid var(--line); }
.cp-found { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.cp-convs { flex: 1; overflow-y: auto; padding: 6px; }
.cp-conv { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; border: none; background: none; color: var(--text); padding: 10px; border-radius: 10px; cursor: pointer; }
.cp-conv:hover { background: rgba(255, 255, 255, .04); } .cp-conv.unread { background: rgba(255, 106, 26, .08); }
.cp-conv .dot { margin-right: 0; flex: none; }
.cp-conv-main { flex: 1; min-width: 0; } .cp-conv-main .dim { font-size: 12px; }
.cp-last { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-dmhead { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.cp-dmhead b { font-family: var(--font-d); font-size: 20px; } .cp-dmhead .link svg { width: 14px; height: 14px; }
.cp-menu { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; } .cp-menu .btn { justify-content: flex-start; }
@media (max-width: 560px) { .cp { width: 100vw; border-left: none; } .cp-head { padding-top: calc(12px + env(safe-area-inset-top)); } }

/* ---------- Assistant IA (administration) ---------- */
.ai-wrap { display: grid; grid-template-columns: 260px 1fr; gap: 14px; height: calc(100vh - 170px); min-height: 480px; }
.ai-side { display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.ai-convs { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.ai-conv { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.ai-conv:hover { background: #17171c; } .ai-conv.on { background: #1f1610; border-color: rgba(255, 106, 26, .35); }
.ai-conv-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.ai-main { display: flex; flex-direction: column; overflow: hidden; padding: 0 !important; }
.ai-thread { flex: 1; overflow: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.ai-compose { border-top: 1px solid var(--line); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.ai-input { resize: vertical; min-height: 64px; max-height: 40vh; font-family: var(--font); }
.ai-msg { display: flex; gap: 10px; max-width: 100%; }
.ai-msg.user { justify-content: flex-end; }
.ai-bubble { background: linear-gradient(135deg, #2a1a0e, #1f140b); border: 1px solid rgba(255, 106, 26, .3); padding: 10px 14px; border-radius: 14px 14px 4px 14px; max-width: 78%; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-avatar { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--orange), var(--red)); color: #140a03; }
.ai-avatar.big { width: 56px; height: 56px; border-radius: 16px; } .ai-avatar svg { width: 60%; height: 60%; }
.ai-body { flex: 1; min-width: 0; }
.ai-md { line-height: 1.55; overflow-wrap: anywhere; }
.ai-md > :first-child { margin-top: 0; } .ai-md p { margin: 0 0 10px; }
.ai-md h2, .ai-md h3, .ai-md h4 { margin: 16px 0 8px; color: var(--orange2); } .ai-md h2 { font-size: 24px; } .ai-md h3 { font-size: 20px; } .ai-md h4 { font-size: 17px; }
.ai-md ul, .ai-md ol { margin: 0 0 10px; padding-left: 22px; } .ai-md li { margin: 3px 0; }
.ai-md code { background: #1c1c22; border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: .92em; }
.ai-md blockquote { margin: 0 0 10px; padding: 6px 12px; border-left: 3px solid var(--orange); color: var(--muted); }
.ai-tbl { overflow: auto; margin: 0 0 10px; } .ai-tbl table { border-collapse: collapse; font-size: 13.5px; }
.ai-tbl th, .ai-tbl td { border: 1px solid var(--line); padding: 5px 9px; text-align: left; } .ai-tbl th { background: #17171c; }
.ai-code { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #0b0b0e; }
.ai-code-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 4px 12px; background: #141418; font-size: 12px; color: var(--muted); }
.ai-code pre { margin: 0; padding: 12px; overflow: auto; max-height: 520px; font-size: 13px; line-height: 1.45; }
.ai-code pre code { background: none; border: 0; padding: 0; }
.ai-tools { margin-top: 6px; font-size: 13px; color: var(--muted); } .ai-tools summary { cursor: pointer; }
.ai-tools ul { margin: 6px 0 0; padding-left: 18px; } .ai-tools pre { margin: 4px 0 6px; padding: 8px; background: #0b0b0e; border-radius: 8px; overflow: auto; font-size: 12px; white-space: pre-wrap; }
.ai-empty { margin: auto; text-align: center; display: grid; justify-items: center; gap: 14px; max-width: 620px; }
.ai-sugg { display: grid; gap: 8px; } .ai-sugg .btn { white-space: normal; text-align: left; height: auto; padding: 9px 12px; }
.ai-wait { display: flex; align-items: center; gap: 10px; }
.ai-dots { display: inline-flex; gap: 4px; } .ai-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); animation: ai-dot 1s infinite ease-in-out; }
.ai-dots i:nth-child(2) { animation-delay: .15s; } .ai-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
.ai-steps li { margin: 6px 0; }
@media (max-width: 900px) { .ai-wrap { grid-template-columns: 1fr; height: auto; } .ai-side { max-height: 220px; } .ai-main { height: 70vh; } .ai-bubble { max-width: 92%; } }
@media (prefers-reduced-motion: reduce) { .ai-dots i { animation: none; opacity: .8; } }

/* ---------- Profil public des joueurs ---------- */
.pf { --pc: #ff6a1a; display: grid; gap: 16px; }
.pf-cover { height: clamp(120px, 22vw, 230px); border-radius: 16px; background: radial-gradient(ellipse at 20% 0%, color-mix(in srgb, var(--pc) 55%, transparent), transparent 60%), linear-gradient(135deg, #17110d, #0b0b0d); background-size: cover; background-position: center; border: 1px solid var(--line); }
.pf-head { display: flex; gap: 20px; align-items: flex-end; padding: 18px 20px; margin-top: -70px; margin-inline: 14px; flex-wrap: wrap; border-top: 3px solid var(--pc); }
.pf-photo { width: 124px; height: 124px; border-radius: 50%; overflow: hidden; border: 4px solid var(--pc); background: #111; flex: none; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); }
.pf-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-id { flex: 1; min-width: 220px; display: grid; gap: 4px; }
.pf-id h1 { font-size: clamp(30px, 5vw, 44px); font-style: italic; font-weight: 800; margin: 0; }
.pf-bio { margin: 6px 0 0; white-space: pre-wrap; max-width: 70ch; }
.pf-flag { width: 18px; height: 13px; vertical-align: -1px; border-radius: 2px; }
.pf-badges { display: inline-flex; gap: 6px; }
.pf-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; }
.pf-tag .ic { width: 14px; height: 14px; }
.pf-tag.verif { background: rgba(61, 159, 217, .16); color: #6cc0f0; }
.pf-tag.pro { background: linear-gradient(180deg, #ffd36b, #f2a516); color: #1d1200; }
.pf-actions { gap: 8px; }
.pf-fav { gap: 6px; }
.pf-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; background: color-mix(in srgb, var(--pc) 16%, transparent); border: 1px solid color-mix(in srgb, var(--pc) 40%, transparent); font-size: 13px; }
.pf-badge .ic { width: 14px; height: 14px; color: var(--pc); }
.pf-stats { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.pf-stats .kpi { padding: 14px 16px; display: grid; gap: 2px; } .pf-stats .kpi b { color: var(--pc); font-family: var(--font-d); font-size: 28px; display: block; } .pf-stats .kpi span { color: var(--muted); font-size: 13px; }
.pf-sec { padding: 14px 16px; display: grid; gap: 10px; } .pf-sec h3 { font-size: 21px; margin: 0; }
.pf-cmp td.win { color: var(--pc); font-weight: 700; }
.pf-recs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.pf-recs > div { display: grid; } .pf-recs b { font-family: var(--font-d); font-size: 24px; } .pf-recs span { color: var(--muted); font-size: 12.5px; }
.pf-react { gap: 4px; flex: none; }
.pf-r { border: 1px solid var(--line); background: rgba(255, 255, 255, .04); border-radius: 99px; padding: 3px 8px; cursor: pointer; font-size: 15px; display: inline-flex; gap: 3px; align-items: center; }
.pf-r small { font-size: 12px; color: var(--muted); } .pf-r.on { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 18%, transparent); }
.pf-r:disabled { cursor: default; opacity: .8; }
.pf-friends { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; }
.pf-friend { display: grid; justify-items: center; gap: 3px; text-decoration: none; color: inherit; text-align: center; }
.pf-friend img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; } .pf-friend span { font-size: 13px; overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; } .pf-friend small { color: var(--dim); font-size: 11.5px; }
/* thèmes PRO */
.pf-theme-carbone .pf-head, .pe-theme.pf-theme-carbone { background: repeating-linear-gradient(45deg, #141416 0 6px, #1b1b1f 6px 12px); }
.pf-theme-or .pf-head, .pe-theme.pf-theme-or { background: linear-gradient(135deg, #2a1f08, #120d04 60%); border-top-color: #f2c14e; }
.pf-theme-or .pf-photo { border-color: #f2c14e; }
.pf-theme-flamme .pf-head, .pe-theme.pf-theme-flamme { background: linear-gradient(135deg, #3a0f06, #140806 60%); }
.pf-theme-nuit .pf-head, .pe-theme.pf-theme-nuit { background: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .5) 0 1px, transparent 2px) 0 0 / 46px 46px, radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .35) 0 1px, transparent 2px) 0 0 / 31px 31px, linear-gradient(180deg, #0b1220, #070a12); }
/* éditeur */
.pe-modal { max-width: 640px; } .pe-modal h4 { margin: 12px 0 4px; color: var(--orange2); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.pe-media { position: relative; margin-bottom: 44px; } .pe-cover { height: 120px; border-radius: 12px; background: linear-gradient(135deg, #2a1608, #0b0b0d); background-size: cover; background-position: center; }
.pe-photo { position: absolute; left: 16px; bottom: -36px; width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 3px solid var(--orange); background: #111; }
.pe-swatches { gap: 8px; } .pe-sw { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; } .pe-sw.on { border-color: #fff; box-shadow: 0 0 0 2px #000 inset; }
.pe-theme { display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.pe-theme.pf-theme-none { background: rgba(255, 255, 255, .04); } .pe-theme.locked { opacity: .55; cursor: not-allowed; }
.pe-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; font-size: 14px; }
@media (max-width: 640px) { .pf-head { margin-top: -50px; margin-inline: 0; padding: 14px; } .pf-photo { width: 92px; height: 92px; } .pf-act { flex-wrap: wrap; } }

/* Aide et support */
.sup-msg { padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); max-width: 85%; }
.sup-msg.me { justify-self: end; background: rgba(255, 106, 26, .1); border-color: rgba(255, 106, 26, .35); }
.sup-msg.staff { justify-self: start; background: rgba(255, 255, 255, .04); }
.sup-msg.internal { background: rgba(255, 197, 49, .08); border-style: dashed; border-color: rgba(255, 197, 49, .45); }
/* Segments chronométrés (parcours de l'atelier) */
.seg-hud { position: absolute; top: 118px; left: 50%; transform: translateX(-50%); z-index: 6; min-width: 240px; max-width: min(360px, 90vw); padding: 10px 14px; display: grid; gap: 4px; text-align: center; background: rgba(12, 12, 14, .82); border: 1px solid var(--line); border-top: 3px solid var(--orange); pointer-events: none; }
.seg-hud.kom { border-top-color: #d0102b; } .seg-hud.sprint { border-top-color: #18a34a; }
.seg-hud .seg-kind { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--orange2); } .seg-hud .seg-name { font-weight: 600; }
.seg-hud .seg-time { font-family: var(--font-d); font-size: 34px; line-height: 1; } .seg-hud .muted { font-size: 12px; }
.seg-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; } .seg-bar i { display: block; height: 100%; background: var(--orange); }
@media (max-width: 700px) { .seg-hud { top: 96px; min-width: 200px; } .seg-hud .seg-time { font-size: 26px; } }
/* Abonnement PRO (joueur) et concours des courses */
.pro-tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; } .pro-tbl table { width: 100%; min-width: 420px; }
.sub-status { display: grid; gap: 12px; margin-bottom: 16px; } .sub-status h2 { margin: 8px 0 4px; font-size: 30px; } .sub-status p { margin: 0; }
.sub-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 12px 0; }
.sub-plan { display: grid; gap: 10px; align-content: start; position: relative; border: 1px solid var(--line); } .sub-plan.best { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange) inset; }
.sub-plan h3 { margin: 0; } .sub-plan .pill { position: absolute; top: 14px; right: 14px; }
.sub-price b { font-family: var(--font-d); font-size: 40px; line-height: 1; } .sub-price span { color: var(--muted); margin-left: 6px; }
.sub-perks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; } .sub-perks li { display: flex; gap: 10px; align-items: center; } .sub-perks .ic { color: var(--orange); width: 20px; height: 20px; flex: none; }
.ev-contest { margin: 0; padding: 12px 14px; display: grid; gap: 4px; border-top: 1px solid var(--line); background: linear-gradient(90deg, rgba(255, 106, 26, .12), transparent); } .ev-contest.won { background: linear-gradient(90deg, rgba(24, 163, 74, .18), transparent); }
.sub-status, .sub-plan, .sub-box { padding: 18px 20px; } .sub-box { display: grid; gap: 10px; margin-bottom: 14px; } .sub-box h3 { margin: 0; }
/* Abonnement : choix de formule et paiement par carte (champs Stripe) ou PayPal */
button.sub-plan { text-align: left; color: inherit; font: inherit; cursor: pointer; background: var(--panel); transition: border-color .2s, box-shadow .2s, transform .15s; }
button.sub-plan:hover:not(:disabled) { border-color: rgba(255, 106, 26, .5); } button.sub-plan:disabled { cursor: default; opacity: .7; }
.sub-pick { display: none; font-size: 13px; font-weight: 600; color: var(--orange); } .sub-plan.best .sub-pick { display: inline-flex; gap: 6px; align-items: center; } .sub-plan.best .sub-pick::before { content: '✓'; }
.sub-pay { padding: 18px 20px; display: grid; gap: 14px; margin: 0 0 14px; } .sub-pay h3 { margin: 0; }
.sub-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sub-tab { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 12px; border-radius: 12px; border: 1px solid #2a2a31; background: #0b0b0e; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.sub-tab .ic { width: 22px; height: 22px; color: var(--orange); } .sub-tab.on { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange) inset; }
.sub-pp { font-style: italic; font-weight: 800; color: #fff; letter-spacing: -.02em; } .sub-pp i { color: var(--orange2); }
.sub-cardform { display: grid; gap: 0; max-width: 520px; } .sub-cardform .field { margin-bottom: 12px; }
.sub-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sub-el { min-height: 46px; padding: 13px 13px; cursor: text; } .sub-el.focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 106, 26, .18); } .sub-el.bad { border-color: #ff6b5e; }
.sub-err { min-height: 18px; color: #ff6b5e; font-size: 14px; margin: -2px 0 10px; }
.sub-paybtn { width: 100%; justify-content: center; padding: 14px; font-size: 17px; }
.sub-secure { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; } .sub-secure .ic { width: 16px; height: 16px; flex: none; color: var(--orange); margin-top: 2px; }
.sub-ppbox { display: grid; gap: 10px; max-width: 520px; } .sub-ppbox p { margin: 0; }
@media (max-width: 480px) { .sub-tabs { grid-template-columns: 1fr; } }
.sub-cardform[hidden], .sub-ppbox[hidden] { display: none; }
/* Résumé de fin de séance */
.rs-veil { position: fixed; inset: 0; z-index: 60; background: rgba(4, 4, 6, .78); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.rs-wrap { width: min(920px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 22px 24px; }
.rs { display: grid; gap: 16px; } .rs > * { min-width: 0; }
.rs-head h2 { margin: 0 0 4px; font-size: 34px; }
.rs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.rs-tile { display: grid; gap: 2px; align-content: start; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.rs-tile .rs-l { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.rs-tile b { font-family: var(--font-d); font-size: 30px; line-height: 1.1; } .rs-tile.big b { font-size: 38px; color: var(--orange2); } .rs-tile small { color: var(--muted); font-size: 14px; }
.rs-records { display: grid; gap: 6px; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(255, 197, 49, .45); background: linear-gradient(90deg, rgba(255, 197, 49, .16), rgba(255, 106, 26, .06)); }
.rs-records.soft { border-color: var(--line); background: rgba(255, 255, 255, .03); }
.rs-rec-h { font-family: var(--font-d); font-size: 24px; color: var(--gold); } .rs-records.soft .rs-rec-h { color: var(--text); font-size: 20px; }
.rs-rec { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; } .rs-rec b { color: var(--gold); } .rs-rec small { color: var(--muted); }
.rs-cmp h4 { margin: 0 0 8px; font-size: 18px; }
.rs-cmp-t { display: grid; gap: 4px; } .rs-cmp-r { display: grid; grid-template-columns: 1.3fr 1fr 1fr 110px; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); }
.rs-cmp-r b { font-weight: 700; } .rs-d { text-align: right; font-weight: 700; color: var(--muted); } .rs-d.up { color: var(--green); } .rs-d.down { color: #ff6b5e; }
.rs-rew { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; font-family: var(--font-d); font-size: 24px; } .rs-rew .muted { font-family: var(--font); font-size: 15px; }
.rs-actions { flex-wrap: wrap; justify-content: flex-end; gap: 10px; } .rs-save { font-size: 21px; padding: 13px 26px; }
.btn.danger-t { color: #ff8a7e; }
.rs-modal { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.rs-hist { display: grid; gap: 6px; }
.rs-hrow { display: grid; grid-template-columns: 1fr 90px 100px 90px 70px 18px; gap: 10px; align-items: center; text-align: left; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--text); font: inherit; cursor: pointer; }
.rs-hrow:hover { border-color: rgba(255, 106, 26, .5); } .rs-hrow .pill { margin-left: 8px; } .rs-chev { transform: rotate(180deg); width: 16px; height: 16px; color: var(--muted); }
@media (max-width: 640px) {
  .rs-wrap { padding: 16px; } .rs-head h2 { font-size: 26px; } .rs-grid { grid-template-columns: 1fr 1fr; } .rs-tile b { font-size: 24px; } .rs-tile.big b { font-size: 28px; }
  .rs-cmp-r { grid-template-columns: 1fr 1fr 80px; } .rs-cmp-r > :nth-child(3) { display: none; }
  .rs-hrow { grid-template-columns: 1fr 72px 80px 16px; } .rs-hide-s { display: none; } .rs-actions .btn { flex: 1 1 100%; }
}
.rs-cmp-h { background: none; padding-top: 0; padding-bottom: 0; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
/* ---------- Coach IA ---------- */
.co-tabs { margin-bottom: 16px; }
.co-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.co-wide { grid-column: 1 / -1; }
.co-p { padding: 14px 16px; min-width: 0; } .co-p h3 { font-size: 22px; margin: 0 0 10px; } .co-p h4 { font-size: 17px; margin: 14px 0 6px; }
.co-p input:not([type=checkbox]), .co-p select, .co-p textarea { width: 100%; background: #0b0b0e; border: 1px solid #2a2a31; border-radius: 10px; padding: 10px 12px; outline: none; }
.co-p input:focus, .co-p select:focus, .co-p textarea:focus { border-color: var(--orange); }
.co-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-family: var(--font-d); font-weight: 700; font-size: 18px; background: rgba(255, 255, 255, .07); }
.co-badge.frais, .co-badge.equilibre { background: rgba(61, 220, 132, .15); color: var(--green); } .co-badge.charge { background: rgba(255, 197, 49, .14); color: var(--gold); }
.co-badge.surcharge { background: rgba(227, 36, 27, .2); color: #ff7b72; } .co-badge.reprise, .co-badge.desentraine { background: rgba(255, 106, 26, .15); color: var(--orange2); }
.co-fit { width: 100%; height: 170px; margin-top: 12px; } .co-legend { display: flex; gap: 14px; margin-top: 4px; }
.co-sess { border: 1px solid var(--line); border-left: 4px solid var(--c, var(--orange)); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; background: rgba(255, 255, 255, .02); }
.co-sess.faite { opacity: .8; } .co-sess.manquee { opacity: .55; } .co-sess.aujourdhui { box-shadow: 0 0 0 1px var(--orange); }
.co-sess .btn { justify-self: start; } .co-sess-h { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.co-why { color: var(--muted); }
.co-blocks { display: flex; align-items: flex-end; gap: 1px; height: 34px; } .co-blocks i { display: block; border-radius: 2px 2px 0 0; min-width: 2px; }
.co-zones { display: grid; gap: 4px; margin-bottom: 10px; } .co-zone { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; font-size: 14px; } .co-zone i { width: 10px; height: 10px; border-radius: 3px; }
.co-arow { width: 100%; display: grid; grid-template-columns: 86px 1fr 60px 110px 18px; gap: 10px; align-items: center; text-align: left; padding: 9px 6px; border: none; border-bottom: 1px solid var(--line); background: none; cursor: pointer; color: inherit; }
.co-arow:hover { background: rgba(255, 106, 26, .06); } .co-arow .ic { width: 16px; height: 16px; color: var(--muted); }
.co-src { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 8px; text-align: center; background: rgba(255, 106, 26, .15); color: var(--orange2); }
.co-src.strava { background: rgba(252, 82, 0, .18); color: #ff7a3d; } .co-src.garmin { background: rgba(0, 124, 195, .2); color: #5bb8ec; }
.co-load { font-family: var(--font-d); font-size: 20px; font-weight: 700; text-align: right; } .co-load small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.co-sources { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; } .co-sources a { text-decoration: none; color: inherit; }
.co-kv { grid-template-columns: repeat(3, 1fr); margin: 12px 0; } .co-cmp { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); } .co-cmp small { display: block; font-size: 12px; }
.co-points { margin: 0; padding-left: 20px; display: grid; gap: 5px; }
.co-analysis h3 { margin: 0 0 4px; }
.co-fields { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.co-ev { display: grid; gap: 0 14px; grid-template-columns: 1fr 180px; } .co-ev[hidden] { display: none; }
.co-days { display: flex; flex-wrap: wrap; gap: 6px; } .co-days button { border: 1px solid var(--line); background: #0b0b0e; border-radius: 10px; padding: 8px 12px; cursor: pointer; font-weight: 600; min-width: 52px; }
.co-days button.on { background: var(--grad); color: #1a0700; border-color: transparent; }
.co-form { margin-top: 16px; } .co-form .btn { margin-top: 4px; }
.co-adapt { background: rgba(255, 197, 49, .06); border: 1px solid rgba(255, 197, 49, .25); border-radius: 12px; padding: 10px 12px; margin: 8px 0 4px; font-size: 14px; } .co-adapt ul { margin: 6px 0 0; padding-left: 18px; }
.co-week h4 { margin: 16px 0 8px; } .co-sessgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.co-comp { margin-top: 10px; }
.co-rctl { margin-bottom: 14px; } .co-rlabel { font-family: var(--font-d); font-size: 18px; }
.co-zbar { display: flex; height: 16px; border-radius: 6px; overflow: hidden; margin: 4px 0 10px; background: #1a1a20; } .co-zbar i { display: block; }
.co-goal { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; display: grid; gap: 6px; } .co-goal.atteint { border-color: rgba(61, 220, 132, .45); }
.co-goal.sugg { grid-template-columns: 1fr auto; align-items: center; } .co-gin { width: 90px !important; }
.co-gbar { height: 8px; border-radius: 4px; background: #1f1f25; overflow: hidden; } .co-gbar i { display: block; height: 100%; background: var(--grad); }
.co-chat { display: grid; gap: 10px; } .co-chat-log { height: min(52vh, 520px); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px; }
.co-msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .05); } .co-msg.user { align-self: flex-end; background: rgba(255, 106, 26, .18); }
.co-msg p { margin: 0 0 6px; } .co-msg p:last-child { margin: 0; } .co-msg ul { margin: 4px 0; padding-left: 18px; }
.co-chips { display: flex; flex-wrap: wrap; gap: 6px; } .co-chip { border: none; cursor: pointer; color: inherit; } .co-chip:hover { background: rgba(255, 106, 26, .2); }
.co-input { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; } .co-input textarea { resize: none; }
/* ---------- Connecter Strava / Garmin ---------- */
.ig { display: grid; gap: 16px; max-width: 920px; }
.ig-card { padding: 16px; display: grid; gap: 12px; } .ig-head { display: flex; gap: 12px; align-items: center; }
.ig-logo { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-family: var(--font-d); font-weight: 800; font-size: 26px; flex: none; }
.ig-who { flex: 1; display: grid; } .ig-who b { font-size: 20px; }
.ig-connect { color: #fff; } .ig-actions { gap: 10px; } .ig-off { color: #ff8a7e; }
.ig-list, .ig-help { padding: 14px 16px; } .ig-list h3, .ig-help h3 { font-size: 20px; margin: 0 0 8px; } .ig-help h3 + ul { margin-top: 0; } .ig-help ul { padding-left: 20px; display: grid; gap: 4px; }
.ig-row { display: grid; grid-template-columns: 1fr 80px 70px 70px auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ig-purge { gap: 8px; margin: 10px 0; cursor: pointer; }
@media (max-width: 640px) {
  .co-arow { grid-template-columns: 70px 1fr 50px 16px; } .co-hide-s, .co-arow > span:nth-child(4) { display: none; }
  .co-kv { grid-template-columns: repeat(2, 1fr); } .co-ev { grid-template-columns: 1fr; } .co-goal.sugg { grid-template-columns: 1fr; } .co-msg { max-width: 94%; }
  .ig-row { grid-template-columns: 1fr 64px auto; } .ig-row > span:nth-child(3), .ig-hide-s { display: none; } .co-grid { grid-template-columns: 1fr; }
}
