/* CoachMe Premium UI — couche visuelle réversible, aucune logique métier */
html[data-coachme-premium="1"]{
  --cm-bg:#f4f7fb;--cm-surface:#ffffff;--cm-surface-2:#f8fafc;--cm-surface-3:#eef3f9;
  --cm-text:#0c1b36;--cm-muted:#65748b;--cm-border:#dfe7f1;--cm-border-strong:#cbd8e7;
  --cm-navy:#071a33;--cm-navy-2:#0b2445;--cm-blue:#0878ff;--cm-blue-2:#20a0ff;
  --cm-green:#12b981;--cm-amber:#f5a524;--cm-red:#f04452;--cm-purple:#7c5cff;
  --gray-300:#cbd5e1;--gray-500:#64748b;--gray-700:#334155;
  --cm-shadow:0 10px 35px rgba(20,42,75,.08);--cm-shadow-lg:0 24px 70px rgba(8,30,58,.16);
  --cm-radius:18px;--cm-radius-sm:13px;--sidebar:248px;
  color-scheme:light;
}
html[data-coachme-premium="1"][data-theme="dark"]{
  --cm-bg:#06111f;--cm-surface:#0a192b;--cm-surface-2:#0d2035;--cm-surface-3:#112a43;
  --cm-text:#f2f7fd;--cm-muted:#93a8c1;--cm-border:#183552;--cm-border-strong:#244867;
  --cm-navy:#03101e;--cm-navy-2:#071c32;--cm-blue:#188cff;--cm-blue-2:#3ab0ff;
  --cm-green:#24d59a;--cm-amber:#ffbb46;--cm-red:#ff5e6b;--cm-purple:#9a83ff;
  --cm-shadow:0 12px 38px rgba(0,0,0,.22);--cm-shadow-lg:0 28px 80px rgba(0,0,0,.38);
  color-scheme:dark;
}
html[data-coachme-premium="1"] body{background:var(--cm-bg);color:var(--cm-text);font-family:'Inter',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;}
html[data-coachme-premium="1"] *{scrollbar-color:var(--cm-border-strong) transparent;}
html[data-coachme-premium="1"] ::selection{background:rgba(8,120,255,.22);}
html[data-coachme-premium="1"] .app{background:var(--cm-bg);}
html[data-coachme-premium="1"] .sidebar{
  width:var(--sidebar);background:linear-gradient(180deg,#041426 0%,#071d35 54%,#06172a 100%);
  border-right:1px solid rgba(75,151,225,.18);box-shadow:18px 0 50px rgba(1,12,26,.12);
}
html[data-coachme-premium="1"] .sb-toggle{left:var(--sidebar);background:#0b2a4b;border:1px solid rgba(255,255,255,.08);border-left:0;}
html[data-coachme-premium="1"] .sb-brand{padding:18px 16px 16px;border-color:rgba(255,255,255,.08);gap:3px;}
html[data-coachme-premium="1"] .cm-product-brand{width:100%;display:flex;align-items:center;gap:9px;margin-bottom:15px;color:#fff;text-align:left;}
html[data-coachme-premium="1"] .cm-product-mark{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:linear-gradient(145deg,#0a8cff,#2b6fff);box-shadow:0 8px 22px rgba(8,120,255,.35);font-weight:900;font-size:16px;}
html[data-coachme-premium="1"] .cm-product-word{font-size:21px;font-weight:850;letter-spacing:-.7px;line-height:1;}
html[data-coachme-premium="1"] .cm-product-word b{color:#3da7ff;}
html[data-coachme-premium="1"] .cm-product-tag{font-size:8px;text-transform:uppercase;letter-spacing:1.6px;color:#7fa4ca;margin-top:4px;font-weight:750;}
html[data-coachme-premium="1"] .sb-shield{width:58px;height:64px;margin-bottom:7px;background:linear-gradient(145deg,#123b6d,#0a2447);border-color:rgba(255,255,255,.18);box-shadow:0 10px 30px rgba(0,0,0,.2);}
html[data-coachme-premium="1"] .sb-name{font-size:12px;letter-spacing:.1px;}
html[data-coachme-premium="1"] .sb-cat{color:#66b9ff;}
html[data-coachme-premium="1"] .nav-section{padding:10px 8px;}
html[data-coachme-premium="1"] .nav-lbl{padding:11px 11px 5px;color:#6384a7;letter-spacing:1.4px;font-size:8px;}
html[data-coachme-premium="1"] .nav-item{position:relative;margin:2px 0;padding:10px 11px;border:0;border-radius:11px;color:#a9bdd3;font-size:11.5px;font-weight:620;gap:10px;}
html[data-coachme-premium="1"] .nav-item:hover{background:rgba(87,164,237,.10);color:#fff;transform:translateX(1px);}
html[data-coachme-premium="1"] .nav-item.active{background:linear-gradient(90deg,rgba(8,120,255,.24),rgba(8,120,255,.08));color:#fff;border:1px solid rgba(60,163,255,.25);box-shadow:inset 3px 0 0 #1593ff;}
html[data-coachme-premium="1"] .nav-icon{width:20px;font-size:15px;color:#73b9ff;}
html[data-coachme-premium="1"] .nav-badge{box-shadow:0 0 0 2px #071a31;}
html[data-coachme-premium="1"] .sb-user{margin:8px 10px 10px;padding:11px 9px;border:1px solid rgba(255,255,255,.08);border-radius:13px;background:rgba(255,255,255,.035);}
html[data-coachme-premium="1"] .sb-ava{background:linear-gradient(145deg,#0a8cff,#315cff);box-shadow:0 8px 18px rgba(8,120,255,.22);}
html[data-coachme-premium="1"] .main{background:var(--cm-bg);}
html[data-coachme-premium="1"] .topbar{position:sticky;top:0;z-index:120;padding:11px 18px 10px;background:color-mix(in srgb,var(--cm-surface) 91%,transparent);border-color:var(--cm-border);box-shadow:0 7px 24px rgba(18,48,80,.045);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);}
html[data-coachme-premium="1"] .topbar-title{font-size:19px;color:var(--cm-text);letter-spacing:-.45px;}
html[data-coachme-premium="1"] .topbar-title span{color:var(--cm-muted)!important;}
html[data-coachme-premium="1"] .tb-actions{gap:8px;}
html[data-coachme-premium="1"] .tb-icon{border-color:var(--cm-border);background:var(--cm-surface);color:var(--cm-text);box-shadow:0 4px 14px rgba(18,48,80,.04);}
html[data-coachme-premium="1"] .tb-icon:hover{border-color:#56aaff;box-shadow:0 7px 22px rgba(8,120,255,.12);}
html[data-coachme-premium="1"] .cm-theme-toggle{font-size:0;overflow:hidden;}
html[data-coachme-premium="1"] .cm-theme-toggle::before{content:'☾';font-size:17px;font-weight:700;}
html[data-coachme-premium="1"][data-theme="dark"] .cm-theme-toggle::before{content:'☀';}
html[data-coachme-premium="1"] .topbar-row2{min-height:42px;padding-top:1px;}
html[data-coachme-premium="1"] .app-btn{height:38px;border-color:var(--cm-border);background:var(--cm-surface);box-shadow:none;}
html[data-coachme-premium="1"] .app-btn img{width:84px;}
html[data-coachme-premium="1"] .btn-primary{background:linear-gradient(135deg,#0878ff,#1769e8);box-shadow:0 7px 18px rgba(8,120,255,.22);border:1px solid rgba(255,255,255,.08);transition:transform .16s,box-shadow .16s,filter .16s;}
html[data-coachme-premium="1"] .btn-primary:hover{transform:translateY(-1px);box-shadow:0 10px 26px rgba(8,120,255,.28);filter:saturate(1.08);}
html[data-coachme-premium="1"] .btn-secondary{background:var(--cm-surface-2);color:var(--cm-text);border-color:var(--cm-border);}
html[data-coachme-premium="1"] .content{padding:20px 20px 30px;max-width:1780px;width:100%;margin:0 auto;}
html[data-coachme-premium="1"] #page-dashboard .hero{position:relative;padding:26px 26px 22px;border-radius:22px;margin-bottom:18px;isolation:isolate;background:
  radial-gradient(circle at 84% 14%,rgba(50,162,255,.28),transparent 24%),
  radial-gradient(circle at 68% 120%,rgba(18,185,129,.16),transparent 30%),
  linear-gradient(123deg,#031226 0%,#09294c 48%,#0b3966 100%);box-shadow:var(--cm-shadow-lg);border:1px solid rgba(125,190,255,.20);}
html[data-coachme-premium="1"] #page-dashboard .hero::before{content:'COACHME • PERFORMANCE HUB';display:block;position:relative;z-index:2;margin-bottom:10px;font-size:9px;font-weight:850;letter-spacing:2.1px;color:#64b9ff;}
html[data-coachme-premium="1"] #page-dashboard .hero::after{content:'';position:absolute;z-index:-1;inset:0;background-image:linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);background-size:42px 42px;opacity:.7;}
html[data-coachme-premium="1"] #page-dashboard .hero-sub{font-size:12.5px;color:#b9d0e8;opacity:1;max-width:760px;}
html[data-coachme-premium="1"] #page-dashboard .hero-big{font-size:54px;letter-spacing:-2px;background:linear-gradient(180deg,#fff,#cde7ff);-webkit-background-clip:text;background-clip:text;color:transparent;}
html[data-coachme-premium="1"] #page-dashboard .hero-biglbl{font-size:15px;color:#fff;letter-spacing:-.2px;}
html[data-coachme-premium="1"] #page-dashboard .hero-stats{grid-template-columns:repeat(4,minmax(130px,1fr));gap:9px;}
html[data-coachme-premium="1"] #page-dashboard .hs-box{background:rgba(7,30,55,.55);border:1px solid rgba(139,199,255,.15);border-radius:14px;padding:11px 12px;backdrop-filter:blur(7px);}
html[data-coachme-premium="1"] #page-dashboard .hs-num{font-size:20px;color:#fff;}
html[data-coachme-premium="1"] #page-dashboard .hs-lbl{color:#9fb9d4;font-size:10px;}
html[data-coachme-premium="1"] .sm-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-bottom:18px;}
html[data-coachme-premium="1"] .sm-card{position:relative;background:var(--cm-surface);border:1px solid var(--cm-border)!important;border-top:1px solid var(--cm-border)!important;border-radius:16px;padding:13px;box-shadow:var(--cm-shadow);transition:transform .18s,box-shadow .18s,border-color .18s;}
html[data-coachme-premium="1"] .sm-card::before{content:'';position:absolute;top:-1px;left:14px;right:14px;height:2px;border-radius:5px;background:linear-gradient(90deg,transparent,#168bff,transparent);opacity:.9;}
html[data-coachme-premium="1"] .sm-card:hover{transform:translateY(-2px);border-color:#a9cdf2!important;box-shadow:0 16px 34px rgba(22,58,94,.11);}
html[data-coachme-premium="1"] .sm-ico{background:var(--cm-surface-3)!important;box-shadow:inset 0 0 0 1px var(--cm-border);}
html[data-coachme-premium="1"] .sm-num{color:var(--cm-text);letter-spacing:-.6px;}
html[data-coachme-premium="1"] .sm-lbl{color:var(--cm-muted);}
html[data-coachme-premium="1"] .card,html[data-coachme-premium="1"] .stat-card{background:var(--cm-surface);border-color:var(--cm-border);box-shadow:var(--cm-shadow);}
html[data-coachme-premium="1"] .card{border-radius:var(--cm-radius);}
html[data-coachme-premium="1"] .card-header{border-color:var(--cm-border);background:linear-gradient(180deg,color-mix(in srgb,var(--cm-surface) 98%,#fff),var(--cm-surface));}
html[data-coachme-premium="1"] .card-title,html[data-coachme-premium="1"] .section-title{color:var(--cm-text);letter-spacing:-.2px;}
html[data-coachme-premium="1"] .card-link{color:var(--cm-blue);}
html[data-coachme-premium="1"] .stat-card{border-radius:16px;}
html[data-coachme-premium="1"] .stat-card:hover{box-shadow:0 15px 35px rgba(16,48,84,.11);}
html[data-coachme-premium="1"] .sc-num,html[data-coachme-premium="1"] .donut-val{color:var(--cm-text);}
html[data-coachme-premium="1"] .sc-label,html[data-coachme-premium="1"] .donut-lbl,html[data-coachme-premium="1"] .act-sub,html[data-coachme-premium="1"] .act-time{color:var(--cm-muted);}
html[data-coachme-premium="1"] .act-item,html[data-coachme-premium="1"] .cal-row,html[data-coachme-premium="1"] .player-reply-row{border-color:var(--cm-border);}
html[data-coachme-premium="1"] .act-dot,html[data-coachme-premium="1"] .player-ava{background:var(--cm-surface-3);border-color:var(--cm-border);}
html[data-coachme-premium="1"] .cal-name{color:var(--cm-text);}
html[data-coachme-premium="1"] .cal-sub,html[data-coachme-premium="1"] .cal-dow,html[data-coachme-premium="1"] .cal-mon{color:var(--cm-muted);}
html[data-coachme-premium="1"] .cal-d{color:var(--cm-text);}
html[data-coachme-premium="1"] .form-input,html[data-coachme-premium="1"] .form-select,html[data-coachme-premium="1"] input,html[data-coachme-premium="1"] textarea,html[data-coachme-premium="1"] select{accent-color:var(--cm-blue);}
html[data-coachme-premium="1"] .form-input,html[data-coachme-premium="1"] .form-select,html[data-coachme-premium="1"] .eval-title-input,html[data-coachme-premium="1"] .eval-value-input,html[data-coachme-premium="1"] .eval-comment-input{background:var(--cm-surface);color:var(--cm-text);border-color:var(--cm-border);}
html[data-coachme-premium="1"] table{background:var(--cm-surface);color:var(--cm-text);}
html[data-coachme-premium="1"] table th{background:var(--cm-surface-2)!important;color:var(--cm-muted)!important;border-color:var(--cm-border)!important;}
html[data-coachme-premium="1"] table td{border-color:var(--cm-border)!important;}
html[data-coachme-premium="1"] tbody tr:hover{background:color-mix(in srgb,var(--cm-blue) 4%,var(--cm-surface));}
html[data-coachme-premium="1"] .modal{backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);}
html[data-coachme-premium="1"] .modalbox{background:var(--cm-surface)!important;color:var(--cm-text);border:1px solid var(--cm-border);box-shadow:var(--cm-shadow-lg);border-radius:20px!important;}
html[data-coachme-premium="1"][data-theme="dark"]{--gray-50:#0d2035;--gray-100:#102740;--gray-200:#193b59;--gray-300:#315676;--gray-400:#8da4bd;--gray-500:#9eb2c8;--gray-600:#b7c7d9;--gray-700:#dce8f4;--gray-800:#f1f6fb;--blue:#2d8cff;--blue-dark:#dcecff;--blue-light:#58adff;--green:#35d69a;--green-dark:#57e0ad;--orange:#f5b84f;--red:#ff6475;--purple:#a78bfa;}
html[data-coachme-premium="1"][data-theme="dark"] .topbar,html[data-coachme-premium="1"][data-theme="dark"] .card,html[data-coachme-premium="1"][data-theme="dark"] .stat-card,html[data-coachme-premium="1"][data-theme="dark"] .sm-card{color:var(--cm-text);}
html[data-coachme-premium="1"][data-theme="dark"] [style*="background:white"],html[data-coachme-premium="1"][data-theme="dark"] [style*="background: white"],html[data-coachme-premium="1"][data-theme="dark"] [style*="background:#fff"]{background:var(--cm-surface)!important;color:var(--cm-text)!important;}
html[data-coachme-premium="1"][data-theme="dark"] [style*="color:var(--blue-dark)"]{color:var(--cm-text)!important;}
html[data-coachme-premium="1"][data-theme="dark"] [style*="color:var(--gray-500)"],html[data-coachme-premium="1"][data-theme="dark"] [style*="color:var(--gray-400)"]{color:var(--cm-muted)!important;}
html[data-coachme-premium="1"][data-theme="dark"] .eval-table .eval-player-cell{background:var(--cm-surface);}
html[data-coachme-premium="1"][data-theme="dark"] .compo-seg,html[data-coachme-premium="1"][data-theme="dark"] .cat-tab,html[data-coachme-premium="1"][data-theme="dark"] .ftab{background:var(--cm-surface);color:var(--cm-text);border-color:var(--cm-border);}
html[data-coachme-premium="1"][data-theme="dark"] .cat-tab.on,html[data-coachme-premium="1"][data-theme="dark"] .ftab.active{background:#0b3e72;color:#fff;border-color:#1a84e8;}
/* Sélecteur catégorie : même rendu lisible qu'en téléphone sombre */
html[data-coachme-premium="1"][data-theme="dark"] .cat-box{background:#0b3e72!important;color:#fff!important;border:1px solid #1a84e8!important;}
html[data-coachme-premium="1"][data-theme="dark"] .cat-box .cb-cat,html[data-coachme-premium="1"][data-theme="dark"] .cat-box .cb-arrow{color:#fff!important;opacity:1!important;}
html[data-coachme-premium="1"][data-theme="dark"] .reply-bar,html[data-coachme-premium="1"][data-theme="dark"] .cal-chip{background:var(--cm-surface-3);}
html[data-coachme-premium="1"][data-theme="dark"] #page-dashboard .hero{background:radial-gradient(circle at 84% 14%,rgba(41,150,255,.27),transparent 25%),radial-gradient(circle at 68% 120%,rgba(18,185,129,.13),transparent 30%),linear-gradient(123deg,#010912 0%,#061d35 48%,#082d50 100%);}
html[data-coachme-premium="1"] #prochain-match-card{overflow:hidden;border-radius:20px;}
html[data-coachme-premium="1"] #dash-players .player-card{background:var(--cm-surface-2);border:1px solid transparent;border-radius:14px;padding:12px 6px;}
html[data-coachme-premium="1"] #dash-players .player-card:hover{background:var(--cm-surface-3);border-color:var(--cm-border-strong);}
html[data-coachme-premium="1"] .pitch{box-shadow:inset 0 0 50px rgba(0,0,0,.15);border:1px solid rgba(255,255,255,.12);}
html[data-coachme-premium="1"] .pp-dot{box-shadow:0 5px 14px rgba(0,0,0,.35);}
@media (max-width:1380px){
  html[data-coachme-premium="1"] .sm-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
}
/* Live Match mode terrain : sur tablette/desktop, la topbar disparaît et revient en quittant Live Match. */
@media (min-width:761px){
  html[data-coachme-premium="1"] body.cm-live-match-focus .topbar{display:none!important;}
  html[data-coachme-premium="1"] body.cm-live-match-focus .content{padding-top:8px!important;}
  html[data-coachme-premium="1"] body.cm-live-match-focus #page-live-match .lm-scoreboard{top:8px!important;}
}

@media (min-width:761px) and (max-width:1180px){
  html[data-coachme-premium="1"]{--sidebar:84px;}
  html[data-coachme-premium="1"] .sidebar{width:84px;}
  html[data-coachme-premium="1"] .sidebar.collapsed{width:0!important;min-width:0!important;flex-basis:0!important;opacity:0!important;pointer-events:none!important;}
  html[data-coachme-premium="1"] .sb-toggle{left:84px;}
  html[data-coachme-premium="1"] .sb-toggle.collapsed{left:0!important;}
  html[data-coachme-premium="1"] .main{min-width:0;}
  html[data-coachme-premium="1"] .cm-product-brand{justify-content:center;margin-bottom:10px;}
  html[data-coachme-premium="1"] .cm-product-word,html[data-coachme-premium="1"] .cm-product-tag,html[data-coachme-premium="1"] .sb-name,html[data-coachme-premium="1"] .sb-sub,html[data-coachme-premium="1"] .sb-cat{display:none;}
  html[data-coachme-premium="1"] .sb-shield{width:44px;height:48px;margin:0 auto;}
  html[data-coachme-premium="1"] .sb-brand{padding:14px 8px 12px;}
  html[data-coachme-premium="1"] .nav-lbl{display:none;}
  html[data-coachme-premium="1"] .nav-section{padding:8px 7px;}
  html[data-coachme-premium="1"] .nav-item{font-size:0;justify-content:center;padding:11px 7px;margin:3px 0;min-height:42px;}
  html[data-coachme-premium="1"] .nav-icon{font-size:18px;width:22px;}
  html[data-coachme-premium="1"] .nav-badge{position:absolute;right:2px;top:2px;font-size:7px;min-width:15px;padding:1px 4px;}
  html[data-coachme-premium="1"] .sb-user{padding:8px 5px;justify-content:center;flex-wrap:wrap;}
  html[data-coachme-premium="1"] .sb-user>div[style*="flex:1"]{display:none;}
  html[data-coachme-premium="1"] .content{padding:16px 15px 26px;}
  html[data-coachme-premium="1"] #page-dashboard .hero{padding:22px 20px 18px;}
  html[data-coachme-premium="1"] #page-dashboard .hero-stats{grid-template-columns:repeat(4,minmax(0,1fr));}
}
@media (max-width:760px){
  html[data-coachme-premium="1"]{--sidebar:84vw;}
  html[data-coachme-premium="1"] .sidebar{position:fixed;z-index:520;top:0;bottom:0;left:0;width:84vw;max-width:340px;transform:translateX(-102%);transition:transform .24s ease;opacity:1;box-shadow:25px 0 70px rgba(0,0,0,.36);}
  html[data-coachme-premium="1"] .sidebar.collapsed{width:84vw;max-width:340px;opacity:1;pointer-events:auto;}
  html[data-coachme-premium="1"] .sidebar.cm-mobile-open{transform:translateX(0);}
  html[data-coachme-premium="1"] .sb-toggle{display:none!important;}
  html[data-coachme-premium="1"] .main{width:100%;padding-bottom:72px;}
  html[data-coachme-premium="1"] .topbar{padding:9px 10px 8px;gap:7px;}
  html[data-coachme-premium="1"] .topbar-title{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  html[data-coachme-premium="1"] .topbar-title span{display:none!important;}
}@media (max-width:760px){
  html[data-coachme-premium="1"] .topbar-row2{min-height:35px;}
  html[data-coachme-premium="1"] .app-switch .app-btn:not(.active){display:none;}
  html[data-coachme-premium="1"] .app-btn{height:34px;padding:0 4px;}
  html[data-coachme-premium="1"] .app-btn img{width:72px;}
  html[data-coachme-premium="1"] .btn-newev{height:34px;padding:0 10px;font-size:10px;}
  html[data-coachme-premium="1"] .content{padding:11px 9px 24px;}
  html[data-coachme-premium="1"] #page-dashboard .hero{padding:17px 14px 14px;border-radius:18px;margin-bottom:12px;}
  html[data-coachme-premium="1"] #page-dashboard .hero::before{font-size:7px;letter-spacing:1.5px;margin-bottom:7px;}
  html[data-coachme-premium="1"] #page-dashboard .hero-big{font-size:38px;}
  html[data-coachme-premium="1"] #page-dashboard .hero-biglbl{font-size:12px;}
}@media (max-width:760px){
  html[data-coachme-premium="1"] #page-dashboard .hero-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px;}
  html[data-coachme-premium="1"] #page-dashboard .hs-box{padding:8px 8px;}
  html[data-coachme-premium="1"] .sm-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-bottom:12px;}
  html[data-coachme-premium="1"] .sm-card{padding:9px;border-radius:13px;}
  html[data-coachme-premium="1"] .card{border-radius:15px;margin-bottom:12px;}
  html[data-coachme-premium="1"] #dash-players{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important;}
  html[data-coachme-premium="1"] .section-header{align-items:flex-start;gap:8px;}
  html[data-coachme-premium="1"] .section-title{font-size:15px;}
  html[data-coachme-premium="1"] .g2,html[data-coachme-premium="1"] .g3,html[data-coachme-premium="1"] .g4{grid-template-columns:1fr;gap:10px;}
}.cm-mobile-backdrop{display:none;}
.cm-mobile-nav{display:none;}
@media (max-width:760px){
  .cm-mobile-backdrop{position:fixed;z-index:510;inset:0;background:rgba(0,9,20,.56);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);}
  .cm-mobile-backdrop.on{display:block;}
  .cm-mobile-nav{position:fixed;z-index:480;left:8px;right:8px;bottom:8px;height:62px;display:grid;grid-template-columns:repeat(5,1fr);padding:6px;background:color-mix(in srgb,var(--cm-surface) 92%,transparent);border:1px solid var(--cm-border);border-radius:20px;box-shadow:0 14px 45px rgba(2,17,35,.22);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);}
  .cm-mobile-nav button{appearance:none;border:0;background:transparent;color:var(--cm-muted);font-family:inherit;font-size:8px;font-weight:750;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border-radius:13px;}
  .cm-mobile-nav button .cmn-ico{font-size:18px;line-height:1;}
  .cm-mobile-nav button.on{color:var(--cm-blue);background:color-mix(in srgb,var(--cm-blue) 10%,transparent);}
  .cm-mobile-nav button:active{transform:scale(.97);}
}
@media (max-width:390px){
  html[data-coachme-premium="1"] #page-dashboard .hero-stats{grid-template-columns:1fr 1fr!important;}
  html[data-coachme-premium="1"] .tb-icon{width:30px;height:30px;}
  html[data-coachme-premium="1"] .cat-box{min-width:92px;max-width:105px;}
}
@media (prefers-reduced-motion:reduce){
  html[data-coachme-premium="1"] *,html[data-coachme-premium="1"] *::before,html[data-coachme-premium="1"] *::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;}
}

/* Premium V2 — navigation et dashboard orientés club professionnel */
.cm-svg-icon svg,.cmn-ico svg{width:18px;height:18px;display:block;}
.cm-mobile-brand,.cm-mobile-fab{display:none;}
.cm-section-head{display:flex;align-items:end;justify-content:space-between;gap:16px;margin:3px 2px 10px;}
.cm-section-head>div{display:flex;align-items:baseline;gap:9px;}
.cm-section-head span{font-size:8px;letter-spacing:1.8px;font-weight:850;color:var(--cm-blue);}
.cm-section-head strong{font-size:17px;letter-spacing:-.4px;color:var(--cm-text);}
.cm-section-head small{font-size:10px;color:var(--cm-muted);}
.cm-hero-actions{display:flex;gap:8px;margin-top:13px;}
.cm-hero-btn{height:36px;border:1px solid rgba(155,205,255,.22);border-radius:11px;padding:0 13px;background:rgba(7,29,53,.56);color:#d8eaff;font:700 10px/1 'Inter',sans-serif;display:inline-flex;align-items:center;gap:7px;cursor:pointer;backdrop-filter:blur(8px);}
.cm-hero-btn svg{width:15px;height:15px;}
.cm-hero-btn.primary{background:linear-gradient(135deg,#118cff,#176ce9);border-color:transparent;color:#fff;box-shadow:0 8px 20px rgba(0,112,255,.25);}
.cm-hero-btn:hover{transform:translateY(-1px);}
.cm-week-wrap{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;}
.cm-week-title{font-size:12px;font-weight:850;flex-shrink:0;color:#fff;letter-spacing:-.1px;}
.cm-week-empty{display:flex;align-items:center;justify-content:space-between;gap:14px;}
.cm-week-empty-state{margin-left:auto;display:flex;align-items:center;gap:9px;min-width:235px;padding:9px 11px;border:1px solid rgba(145,197,246,.16);border-radius:12px;background:rgba(3,19,36,.34);}
.cm-week-empty-ico{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:rgba(49,155,255,.12);color:#66b9ff;font-size:17px;}
.cm-week-empty-state strong{display:block;font-size:10px;color:#e8f4ff;}
.cm-week-empty-state small{display:block;font-size:8px;color:#8ca9c5;margin-top:2px;}
html[data-coachme-premium="1"] #page-dashboard .hero-sub{font-size:14px;font-weight:560;line-height:1.38;color:#c7d9eb;letter-spacing:-.15px;}
html[data-coachme-premium="1"] #seance-semaine .ss-grid{max-width:none!important;}
html[data-coachme-premium="1"] .sm-card:nth-child(1){background:linear-gradient(145deg,#fff,#f0f6ff);}
html[data-coachme-premium="1"] .sm-card:nth-child(2){background:linear-gradient(145deg,#fff,#f0fbff);}
html[data-coachme-premium="1"] .sm-card:nth-child(3){background:linear-gradient(145deg,#fff,#f7f2ff);}
html[data-coachme-premium="1"] .sm-card:nth-child(4){background:linear-gradient(145deg,#fff,#effbf5);}
html[data-coachme-premium="1"] .sm-card:nth-child(5){background:linear-gradient(145deg,#fff,#f0f5fb);}
html[data-coachme-premium="1"] .sm-card:nth-child(6){background:linear-gradient(145deg,#fff,#fff8eb);}
html[data-coachme-premium="1"] .sm-card:nth-child(1)::before{background:linear-gradient(90deg,transparent,#177cff,transparent);}
html[data-coachme-premium="1"] .sm-card:nth-child(2)::before{background:linear-gradient(90deg,transparent,#20a0ff,transparent);}
html[data-coachme-premium="1"] .sm-card:nth-child(3)::before{background:linear-gradient(90deg,transparent,#8d55ee,transparent);}
html[data-coachme-premium="1"] .sm-card:nth-child(4)::before{background:linear-gradient(90deg,transparent,#2ca66b,transparent);}
html[data-coachme-premium="1"] .sm-card:nth-child(5)::before{background:linear-gradient(90deg,transparent,#234d85,transparent);}
html[data-coachme-premium="1"] .sm-card:nth-child(6)::before{background:linear-gradient(90deg,transparent,#f3a11d,transparent);}
html[data-coachme-premium="1"][data-theme="dark"] .sm-card:nth-child(n){background:linear-gradient(145deg,var(--cm-surface),var(--cm-surface-2));}
html[data-coachme-premium="1"] .cm-match-center{border-color:#b8d2ed;box-shadow:0 18px 48px rgba(19,55,91,.11);}
html[data-coachme-premium="1"] .cm-match-center .card-header{background:linear-gradient(115deg,#06182e,#0c3762);border:0;color:#fff;}
html[data-coachme-premium="1"] .cm-match-center .card-header .card-title{color:#fff!important;}
html[data-coachme-premium="1"] .cm-match-center .card-header .badge{background:rgba(77,164,255,.18);color:#bde0ff;border:1px solid rgba(100,180,255,.22);}
@media (max-width:760px){
  html[data-coachme-premium="1"] .topbar{padding:9px 11px;background:color-mix(in srgb,var(--cm-surface) 94%,transparent);}
  html[data-coachme-premium="1"] .topbar-row{align-items:center;gap:7px;}
  html[data-coachme-premium="1"] .topbar-title{display:none!important;}
  html[data-coachme-premium="1"] .topbar-row2{display:none!important;}
  html[data-coachme-premium="1"] .cm-mobile-brand{display:flex;align-items:center;gap:7px;border:0;background:transparent;color:var(--cm-text);padding:0;margin-right:auto;font-family:inherit;}
  html[data-coachme-premium="1"] .cm-mobile-brand-mark{width:31px;height:31px;border-radius:10px;display:grid;place-items:center;background:linear-gradient(145deg,#148cff,#315fff);color:#fff;font-size:14px;font-weight:900;box-shadow:0 7px 18px rgba(13,124,255,.25);}
  html[data-coachme-premium="1"] .cm-mobile-brand-word{font-size:17px;font-weight:850;letter-spacing:-.6px;white-space:nowrap;}
  html[data-coachme-premium="1"] .cm-mobile-brand-word b{color:var(--cm-blue);}
  html[data-coachme-premium="1"] .tb-actions{margin-left:auto;gap:5px;}
  html[data-coachme-premium="1"] #topbar-msg-btn{display:none!important;}
  html[data-coachme-premium="1"] .tb-icon{width:34px;height:34px;border-radius:11px;box-shadow:none;}
  html[data-coachme-premium="1"] .cat-box{height:34px;min-width:72px!important;max-width:88px!important;padding:5px 8px;border-radius:11px;background:linear-gradient(135deg,#0b2b50,#173b68);}
  html[data-coachme-premium="1"] .cat-box .cb-cat{font-size:13px;}
  html[data-coachme-premium="1"] .cat-box .cb-club{display:none;}
  html[data-coachme-premium="1"] .cm-mobile-fab{display:grid;place-items:center;position:fixed;right:18px;bottom:82px;z-index:475;width:50px;height:50px;border-radius:17px;border:1px solid rgba(255,255,255,.18);background:linear-gradient(145deg,#148fff,#1467ee);color:#fff;box-shadow:0 14px 32px rgba(8,104,223,.36);}
  html[data-coachme-premium="1"] .cm-mobile-fab svg{width:22px;height:22px;}
}
@media (max-width:760px){
  html[data-coachme-premium="1"] .content{padding:13px 10px 92px;}
  html[data-coachme-premium="1"] #page-dashboard .hero{padding:18px 15px 15px;border-radius:22px;background:radial-gradient(circle at 92% 3%,rgba(50,166,255,.33),transparent 30%),radial-gradient(circle at 20% 125%,rgba(26,200,145,.16),transparent 36%),linear-gradient(142deg,#031326 0%,#082b4f 52%,#0b3f70 100%);box-shadow:0 20px 48px rgba(1,22,44,.24);}
  html[data-coachme-premium="1"] #page-dashboard .hero::before{font-size:7.5px;letter-spacing:1.9px;color:#6ec1ff;margin-bottom:9px;}
  html[data-coachme-premium="1"] #page-dashboard .hero-sub{font-size:13px;font-weight:650;line-height:1.42;color:#d9e8f6;margin-bottom:11px;}
  html[data-coachme-premium="1"] #page-dashboard .hero-big{font-size:48px;letter-spacing:-2.4px;}
  html[data-coachme-premium="1"] #page-dashboard .hero-biglbl{font-size:14px;margin-bottom:13px;color:#f3f8ff;}
  html[data-coachme-premium="1"] #page-dashboard .hero-stats{gap:7px!important;}
  html[data-coachme-premium="1"] #page-dashboard .hs-box{min-height:68px;padding:10px 9px;border-radius:15px;background:rgba(2,20,38,.48);border-color:rgba(146,205,255,.18);}
  html[data-coachme-premium="1"] #page-dashboard .hs-ico{font-size:15px;}
  html[data-coachme-premium="1"] #page-dashboard .hs-num{font-size:20px;letter-spacing:-.5px;}
  html[data-coachme-premium="1"] #page-dashboard .hs-lbl{font-size:9px;}
  html[data-coachme-premium="1"] #page-dashboard .hero-sep{margin:12px 0 10px;}
  html[data-coachme-premium="1"] .cm-week-wrap,html[data-coachme-premium="1"] .cm-week-empty{display:block;}
  html[data-coachme-premium="1"] .cm-week-title{font-size:12px;margin-bottom:9px;display:block;}
  html[data-coachme-premium="1"] .cm-week-empty-state{margin:0;min-width:0;width:100%;padding:9px 10px;}
  html[data-coachme-premium="1"] #seance-semaine .ss-grid{width:100%;max-width:none!important;}
  html[data-coachme-premium="1"] .cm-hero-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:11px;}
  html[data-coachme-premium="1"] .cm-hero-btn{width:100%;justify-content:center;height:38px;border-radius:12px;font-size:9.5px;}
}
@media (max-width:760px){
  html[data-coachme-premium="1"] .cm-section-head{align-items:flex-end;margin:15px 2px 9px;}
  html[data-coachme-premium="1"] .cm-section-head>div{display:block;}
  html[data-coachme-premium="1"] .cm-section-head span{display:block;margin-bottom:2px;font-size:7px;}
  html[data-coachme-premium="1"] .cm-section-head strong{font-size:16px;}
  html[data-coachme-premium="1"] .cm-section-head small{display:none;}
  html[data-coachme-premium="1"] .sm-grid{gap:8px;margin-bottom:14px;}
  html[data-coachme-premium="1"] .sm-card{min-height:104px;padding:12px 11px;border-radius:17px!important;box-shadow:0 10px 26px rgba(18,45,76,.08);}
  html[data-coachme-premium="1"] .sm-card::before{left:11px;right:11px;height:2px;}
  html[data-coachme-premium="1"] .sm-top{gap:9px;align-items:center;}
  html[data-coachme-premium="1"] .sm-ico{width:42px;height:42px;font-size:18px;border-radius:13px;}
  html[data-coachme-premium="1"] .sm-num{font-size:23px;line-height:1;}
  html[data-coachme-premium="1"] .sm-lbl{font-size:10px;margin-top:3px;}
  html[data-coachme-premium="1"] .sm-chips{margin-top:10px;}
  html[data-coachme-premium="1"] .sm-chip{font-size:8px;padding:2px 5px;border-radius:6px;}
  html[data-coachme-premium="1"] .sm-note{font-size:9.5px;margin-top:10px;}
  html[data-coachme-premium="1"] .cm-match-center{border-radius:20px!important;overflow:hidden;box-shadow:0 16px 42px rgba(13,43,74,.13);}
  html[data-coachme-premium="1"] .cm-match-center .card-header{padding:13px 15px!important;}
  html[data-coachme-premium="1"] .cm-match-center .card-body{padding:17px 15px!important;}
}
html[data-coachme-premium="1"] .sidebar .cm-svg-icon{display:grid;place-items:center;color:#75baff;}
html[data-coachme-premium="1"] .sidebar .cm-svg-icon svg{width:17px;height:17px;}
html[data-coachme-premium="1"] .sidebar .nav-item.active .cm-svg-icon{color:#37a8ff;}
@media (max-width:760px){
  html[data-coachme-premium="1"] .sidebar{background:radial-gradient(circle at 30% 0%,rgba(22,115,204,.18),transparent 28%),linear-gradient(180deg,#03111f 0%,#061d33 100%);}
  html[data-coachme-premium="1"] .sidebar .nav-item{padding:12px 13px;margin:3px 5px;border-radius:13px;font-size:12px;}
  html[data-coachme-premium="1"] .sidebar .nav-icon{width:23px;}
  html[data-coachme-premium="1"] .sidebar .cm-svg-icon svg{width:19px;height:19px;}
  html[data-coachme-premium="1"] .cm-mobile-nav{left:10px;right:10px;bottom:8px;height:66px;padding:6px 7px;border-radius:22px;background:color-mix(in srgb,var(--cm-surface) 95%,transparent);box-shadow:0 18px 50px rgba(2,17,35,.26);}
  html[data-coachme-premium="1"] .cm-mobile-nav button{font-size:8px;font-weight:750;gap:4px;border-radius:15px;}
  html[data-coachme-premium="1"] .cm-mobile-nav button .cmn-ico{font-size:0;}
  html[data-coachme-premium="1"] .cm-mobile-nav button .cmn-ico svg{width:20px;height:20px;}
  html[data-coachme-premium="1"] .cm-mobile-nav button.on{background:linear-gradient(145deg,rgba(19,133,255,.15),rgba(19,108,231,.07));box-shadow:inset 0 0 0 1px rgba(33,145,255,.12);}
}
html[data-coachme-premium="1"] .cm-drawer-apps{display:none;}
@media (max-width:760px){
  html[data-coachme-premium="1"] .cm-drawer-apps{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:10px 12px 8px;border-bottom:1px solid rgba(255,255,255,.07);}
  html[data-coachme-premium="1"] .cm-drawer-apps button{height:38px;border-radius:12px;border:1px solid rgba(127,185,239,.12);background:rgba(255,255,255,.035);color:#9fb8d2;font:700 9.5px/1 'Inter',sans-serif;display:flex;align-items:center;justify-content:center;gap:6px;}
  html[data-coachme-premium="1"] .cm-drawer-apps button.active{background:rgba(17,137,255,.13);border-color:rgba(38,151,255,.24);color:#fff;}
  html[data-coachme-premium="1"] .cm-drawer-apps button.tourny{color:#b5c6d7;}
  html[data-coachme-premium="1"] .cm-dapp-dot{width:20px;height:20px;border-radius:7px;display:grid;place-items:center;background:linear-gradient(145deg,#148cff,#315fff);color:#fff;font-size:9px;font-weight:900;}
  html[data-coachme-premium="1"] .cm-drawer-apps button.tourny .cm-dapp-dot{background:linear-gradient(145deg,#80b64a,#5d9433);}
  html[data-coachme-premium="1"] .cm-drawer-apps small{font-size:9px;color:#6faee8;}

  html[data-coachme-premium="1"] .cm-drawer-apps button{position:relative;overflow:hidden}
  html[data-coachme-premium="1"] .cm-drawer-apps .cm-dapp-logo{display:block;width:auto;height:auto;max-height:30px;max-width:108px;object-fit:contain}
  html[data-coachme-premium="1"] .cm-drawer-apps .cm-dapp-logo.coachme{max-width:112px}
  html[data-coachme-premium="1"] .cm-drawer-apps .cm-dapp-logo.tournyme{max-width:106px}
  html[data-coachme-premium="1"] .cm-drawer-apps button.tourny small{position:absolute;right:8px;top:50%;transform:translateY(-50%);font-size:11px;color:#6faee8}
}

/* Règle Premium durable : toute future carte bleue (hors Accueil) peut utiliser cette classe. */
html[data-coachme-premium="1"] .cm-premium-blue-card-ball{position:relative;overflow:hidden;isolation:isolate}
html[data-coachme-premium="1"] .cm-premium-blue-card-ball::after{content:'';position:absolute;z-index:0;width:205px;height:148px;right:-10px;top:10px;background:url('/coachme-ball-reference.webp?v=3') center/cover no-repeat;opacity:.34;filter:saturate(1.1) brightness(1.02);-webkit-mask-image:radial-gradient(ellipse at center,#000 45%,rgba(0,0,0,.84) 65%,transparent 86%);mask-image:radial-gradient(ellipse at center,#000 45%,rgba(0,0,0,.84) 65%,transparent 86%);pointer-events:none}
html[data-coachme-premium="1"] .cm-premium-blue-card-ball>*{position:relative;z-index:1}
html[data-coachme-premium="1"] #page-dashboard .cm-premium-blue-card-ball::after{display:none!important}
@media(max-width:760px){
  html[data-coachme-premium="1"] .cm-mobile-nav .cmn-ball{
    font-size:22px!important;
    line-height:1!important;
    width:24px;height:24px;
    display:grid!important;
    place-items:center;
    filter:none!important;
  }
}
@media(max-width:760px){
  html[data-coachme-premium="1"] .cm-mobile-nav button[data-page="compo"] .cmn-ico,
  html[data-coachme-premium="1"] .cm-mobile-nav button[data-page="compo"] .cmn-ico svg{
    color:var(--cm-muted)!important;
    stroke:currentColor!important;
    fill:none!important;
  }
  html[data-coachme-premium="1"] .cm-mobile-nav button[data-page="compo"].on .cmn-ico,
  html[data-coachme-premium="1"] .cm-mobile-nav button[data-page="compo"].on .cmn-ico svg{
    color:var(--cm-blue)!important;
    stroke:currentColor!important;
  }
}
@media(max-width:760px){
  html[data-coachme-premium="1"] .cm-mobile-nav .cmn-soccer svg{
    width:21px!important;height:21px!important;
    overflow:visible;
  }
  html[data-coachme-premium="1"] .cm-mobile-nav button[data-page="compo"] .cmn-soccer{
    color:var(--cm-muted)!important;
  }
  html[data-coachme-premium="1"] .cm-mobile-nav button[data-page="compo"].on .cmn-soccer{
    color:var(--cm-blue)!important;
  }
}
@media(max-width:760px){
  html[data-coachme-premium="1"] .cm-mobile-nav .cmn-soccer-clean svg{
    width:22px!important;
    height:22px!important;
    fill:none!important;
    stroke:currentColor!important;
    stroke-width:1.8!important;
    stroke-linecap:round!important;
    stroke-linejoin:round!important;
  }
}

/* FINAL exact reference ball extracted from validated screenshot */
@media(max-width:760px){
  html[data-coachme-premium="1"] .cm-mobile-nav .cmn-ball-ref{
    display:block!important;
    width:23px!important;
    height:23px!important;
    font-size:0!important;
    background:currentColor!important;
    -webkit-mask:url('/compo-ball-reference-mask.png?v=20260918-1') center/contain no-repeat!important;
    mask:url('/compo-ball-reference-mask.png?v=20260918-1') center/contain no-repeat!important;
    color:var(--cm-muted)!important;
  }
  html[data-coachme-premium="1"] .cm-mobile-nav button[data-page="compo"].on .cmn-ball-ref{
    color:var(--cm-blue)!important;
  }
}

/* === Sélecteur mobile : logos ORIGINAUX CoachMe / TournyMe === */
@media(max-width:760px){
  html[data-coachme-premium="1"] .cm-drawer-apps{
    gap:8px!important;
    padding:10px 12px 10px!important;
  }
  html[data-coachme-premium="1"] .cm-drawer-apps button{
    position:relative!important;
    height:64px!important;
    padding:5px 6px!important;
    border-radius:14px!important;
    background:#fff!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
    box-shadow:0 3px 10px rgba(0,0,0,.18)!important;
  }
  html[data-coachme-premium="1"] .cm-drawer-apps button.active{
    border:3px solid #b6c0ce!important;
  }
  html[data-coachme-premium="1"] .cm-drawer-apps button.tourny{
    border:3px solid #31c76a!important;
  }
  html[data-coachme-premium="1"] .cm-drawer-apps .cm-dapp-logo{
    display:block!important;
    width:auto!important;
    height:auto!important;
    max-height:50px!important;
    max-width:94%!important;
    object-fit:contain!important;
    opacity:1!important;
    filter:none!important;
  }
  html[data-coachme-premium="1"] .cm-drawer-apps .cm-dapp-logo.coachme{max-width:96%!important}
  html[data-coachme-premium="1"] .cm-drawer-apps .cm-dapp-logo.tournyme{max-width:94%!important}
  html[data-coachme-premium="1"] .cm-drawer-apps button.tourny small{
    position:absolute!important;
    right:5px!important;
    top:5px!important;
    transform:none!important;
    color:#4c9fe9!important;
    font-size:11px!important;
    line-height:1!important;
    z-index:2!important;
  }
}

/* === Tiroir gauche mobile compact === */
@media(max-width:760px){
  /* aucune identité produit ici : le tiroir commence directement par le club */
  html[data-coachme-premium="1"] .sidebar .cm-product-brand{display:none!important}
  html[data-coachme-premium="1"] .sidebar .sb-brand{
    padding:8px 12px 7px!important;
    gap:1px!important;
  }
  html[data-coachme-premium="1"] .sidebar .sb-shield{
    margin-top:0!important;
    margin-bottom:3px!important;
  }
  html[data-coachme-premium="1"] .cm-drawer-apps{
    gap:7px!important;
    padding:6px 12px 7px!important;
  }
  html[data-coachme-premium="1"] .cm-drawer-apps button{
    height:46px!important;
    padding:3px 5px!important;
    border-radius:11px!important;
    box-shadow:0 2px 7px rgba(0,0,0,.14)!important;
  }
  html[data-coachme-premium="1"] .cm-drawer-apps button.active,
  html[data-coachme-premium="1"] .cm-drawer-apps button.tourny{
    border-width:2px!important;
  }
  html[data-coachme-premium="1"] .cm-drawer-apps .cm-dapp-logo{
    max-height:34px!important;
    max-width:88%!important;
  }
  html[data-coachme-premium="1"] .cm-drawer-apps .cm-dapp-logo.coachme{max-width:90%!important}
  html[data-coachme-premium="1"] .cm-drawer-apps .cm-dapp-logo.tournyme{max-width:88%!important}
  html[data-coachme-premium="1"] .cm-drawer-apps button.tourny small{
    right:4px!important;
    top:4px!important;
    font-size:9px!important;
  }
  html[data-coachme-premium="1"] .sidebar .nav-section{padding-top:5px!important}
}

/* === MESSAGES MOBILE — composer au-dessus de la navigation premium === */
@media (max-width:760px){
  html[data-coachme-premium="1"] #page-messages{
    padding-bottom:205px!important;
  }
  html[data-coachme-premium="1"] #page-messages #msg-compose-bar{
    left:10px!important;
    right:10px!important;
    bottom:84px!important;
    width:auto!important;
    border:1px solid var(--cm-border)!important;
    border-radius:16px!important;
    background:var(--cm-surface)!important;
    color:var(--cm-text)!important;
    box-shadow:0 14px 38px rgba(2,17,35,.28)!important;
    padding:9px 10px!important;
    z-index:470!important;
  }
  html[data-coachme-premium="1"] #page-messages #msg-compose-bar .form-select,
  html[data-coachme-premium="1"] #page-messages #msg-compose-bar textarea,
  html[data-coachme-premium="1"] #page-messages #msg-compose-bar button:not(.btn-primary){
    background:var(--cm-surface-2)!important;
    color:var(--cm-text)!important;
    border-color:var(--cm-border)!important;
  }
  html[data-coachme-premium="1"]:has(#page-messages.active) .cm-mobile-fab{
    display:none!important;
  }
}

/* === DARK MODE — modales cohérentes & lisibilité renforcée 20260919 === */
html[data-coachme-premium="1"][data-theme="dark"] .modal-overlay{
  background:rgba(1,8,16,.72)!important;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
html[data-coachme-premium="1"][data-theme="dark"] .modal{
  background:linear-gradient(180deg,var(--cm-surface) 0%,var(--cm-surface-2) 100%)!important;
  color:var(--cm-text)!important;
  border:1px solid var(--cm-border)!important;
  box-shadow:0 28px 80px rgba(0,0,0,.48)!important;
}
html[data-coachme-premium="1"][data-theme="dark"] .modal-title,
html[data-coachme-premium="1"][data-theme="dark"] .modal-header{
  color:var(--cm-text)!important;
}
html[data-coachme-premium="1"][data-theme="dark"] .modal-header{
  border-color:var(--cm-border)!important;
}
html[data-coachme-premium="1"][data-theme="dark"] .modal-close{
  color:#94abc3!important;
}
html[data-coachme-premium="1"][data-theme="dark"] .modal-close:hover{
  color:#fff!important;
}
html[data-coachme-premium="1"][data-theme="dark"] .modal .form-label{
  color:#c4d2e2!important;
}
html[data-coachme-premium="1"][data-theme="dark"] .modal input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
html[data-coachme-premium="1"][data-theme="dark"] .modal textarea,
html[data-coachme-premium="1"][data-theme="dark"] .modal select,
html[data-coachme-premium="1"][data-theme="dark"] .modal .form-input,
html[data-coachme-premium="1"][data-theme="dark"] .modal .form-select,
html[data-coachme-premium="1"][data-theme="dark"] .modal .form-textarea{
  background:#071a2d!important;
  color:#eef6ff!important;
  border-color:#285072!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.02)!important;
}
html[data-coachme-premium="1"][data-theme="dark"] .modal input::placeholder,
html[data-coachme-premium="1"][data-theme="dark"] .modal textarea::placeholder{
  color:#91a6bc!important;
  opacity:1!important;
}
html[data-coachme-premium="1"][data-theme="dark"] .modal input:focus,
html[data-coachme-premium="1"][data-theme="dark"] .modal textarea:focus,
html[data-coachme-premium="1"][data-theme="dark"] .modal select:focus,
html[data-coachme-premium="1"][data-theme="dark"] .modal .form-input:focus,
html[data-coachme-premium="1"][data-theme="dark"] .modal .form-select:focus{
  border-color:#2e9cff!important;
  box-shadow:0 0 0 3px rgba(46,156,255,.12)!important;
  outline:none!important;
}
html[data-coachme-premium="1"][data-theme="dark"] .modal [style*="color:var(--gray-400)"],
html[data-coachme-premium="1"][data-theme="dark"] .modal [style*="color:var(--gray-500)"],
html[data-coachme-premium="1"][data-theme="dark"] .modal [style*="color:var(--gray-600)"]{
  color:#9fb2c7!important;
}
html[data-coachme-premium="1"][data-theme="dark"] .modal [style*="background:#eff6ff"],
html[data-coachme-premium="1"][data-theme="dark"] .modal [style*="background: #eff6ff"],
html[data-coachme-premium="1"][data-theme="dark"] .modal [style*="background:#f8fafc"],
html[data-coachme-premium="1"][data-theme="dark"] .modal [style*="background: #f8fafc"]{
  background:#0d2238!important;
  border-color:#234765!important;
  color:var(--cm-text)!important;
}
html[data-coachme-premium="1"][data-theme="dark"] .modal [style*="background:#fee2e2"],
html[data-coachme-premium="1"][data-theme="dark"] .modal [style*="background: #fee2e2"],
html[data-coachme-premium="1"][data-theme="dark"] .modal [style*="background:#fff5f5"],
html[data-coachme-premium="1"][data-theme="dark"] .modal [style*="background: #fff5f5"]{
  background:rgba(240,68,82,.12)!important;
  color:#ff9ba4!important;
  border-color:rgba(240,68,82,.35)!important;
}
html[data-coachme-premium="1"][data-theme="dark"] .modal .rs-chip{
  background:#0b2034!important;
  color:#c4d2e2!important;
  border-color:#355773!important;
}
html[data-coachme-premium="1"][data-theme="dark"] .modal .rs-chip.on{
  background:linear-gradient(135deg,#0d5aa8,#0a4380)!important;
  color:#fff!important;
  border-color:#248cf0!important;
}
html[data-coachme-premium="1"][data-theme="dark"] #modal-terrain [style*="background:#eff6ff"]>div:first-child{
  color:#67b9ff!important;
}
html[data-coachme-premium="1"][data-theme="dark"] .modal .btn-secondary{
  background:#0b2034!important;
  color:#eef6ff!important;
  border-color:#355773!important;
}
html[data-coachme-premium="1"][data-theme="dark"] .modal .btn-secondary:hover{
  background:#102a43!important;
  border-color:#4b7090!important;
}


/* === DARK MODE — Messages coach lisibles 20260919 === */
html[data-coachme-premium="1"][data-theme="dark"] #page-messages .swipe-del{
  background:var(--cm-surface)!important;
  color:var(--cm-text)!important;
  border-color:var(--cm-border)!important;
  box-shadow:0 8px 20px rgba(0,0,0,.16)!important;
}
html[data-coachme-premium="1"][data-theme="dark"] #page-messages .swipe-del[style*="background:#eff6ff"]{
  background:linear-gradient(180deg,#0d2945,#0b233b)!important;
  border-left:4px solid var(--cm-blue)!important;
}
html[data-coachme-premium="1"][data-theme="dark"] #page-messages .swipe-del[style*="background:#fff5f5"]{
  background:linear-gradient(180deg,#2a171d,#211218)!important;
  border-left:4px solid var(--cm-red)!important;
}
html[data-coachme-premium="1"][data-theme="dark"] #page-messages .swipe-del [style*="color:var(--gray-800)"]{
  color:#f2f7fd!important;
}
html[data-coachme-premium="1"][data-theme="dark"] #page-messages .swipe-del [style*="color:var(--gray-600)"]{
  color:#c0cede!important;
}
html[data-coachme-premium="1"][data-theme="dark"] #page-messages .swipe-del [style*="color:var(--gray-400)"]{
  color:#93a8c1!important;
}
html[data-coachme-premium="1"][data-theme="dark"] #page-messages .msg-act-rep{
  background:#0f3151!important;
  color:#6cc0ff!important;
  border:1px solid #204c71!important;
}
html[data-coachme-premium="1"][data-theme="dark"] #page-messages .msg-act-del,
html[data-coachme-premium="1"][data-theme="dark"] #page-messages .swipe-del [style*="background:#fee2e2"]{
  background:#35191f!important;
  color:#ff8994!important;
}
html[data-coachme-premium="1"][data-theme="dark"] #page-messages #msgview-docs [style*="background:#eff6ff"],
html[data-coachme-premium="1"][data-theme="dark"] #page-messages #msgview-docs [style*="background: #eff6ff"]{
  background:#0d2945!important;
  border-color:#244b6c!important;
  color:#c7d6e6!important;
}
html[data-coachme-premium="1"][data-theme="dark"] #page-messages #documents-list > [style*="background:white"],
html[data-coachme-premium="1"][data-theme="dark"] #page-messages #documents-list > [style*="background: white"]{
  background:var(--cm-surface)!important;
  border-color:var(--cm-border)!important;
}
html[data-coachme-premium="1"][data-theme="dark"] #page-messages #msg-compose-bar{
  background:var(--cm-surface)!important;
  border-color:var(--cm-border)!important;
}
html[data-coachme-premium="1"][data-theme="dark"] #page-messages #msg-compose-bar [style*="background:white"],
html[data-coachme-premium="1"][data-theme="dark"] #page-messages #msg-compose-bar [style*="background: white"]{
  background:var(--cm-surface-2)!important;
  color:var(--cm-text)!important;
  border-color:var(--cm-border)!important;
}


/* Etats explicites cartes Messages coach — dark mode */
html[data-coachme-premium="1"][data-theme="dark"] #page-messages .msg-state-read{
  background:var(--cm-surface)!important;
  border:1px solid var(--cm-border)!important;
}
html[data-coachme-premium="1"][data-theme="dark"] #page-messages .msg-state-unread{
  background:linear-gradient(180deg,#0d2945 0%,#0a2239 100%)!important;
  border:1px solid #214b70!important;
  border-left:4px solid var(--cm-blue)!important;
}
html[data-coachme-premium="1"][data-theme="dark"] #page-messages .msg-state-urgent{
  background:linear-gradient(180deg,#2a171d 0%,#211218 100%)!important;
  border:1px solid #65303a!important;
  border-left:4px solid var(--cm-red)!important;
}


/* === DARK MODE — planning / saison lisible 20260919 === */
html[data-coachme-premium="1"][data-theme="dark"] #page-reglages #planning-sync-status{
  background:#0d2238!important;
  color:#b9cadd!important;
  border-color:#294a67!important;
}
html[data-coachme-premium="1"][data-theme="dark"] #page-reglages #planning-sync-status[style*="#92400e"]{
  color:#f3c36a!important;
  border-color:#7a5a1b!important;
  background:#2a2110!important;
}
html[data-coachme-premium="1"][data-theme="dark"] #page-reglages .planning-coupe-option{
  background:#2a2411!important;
  color:#f5d77a!important;
  border-color:#8a6d18!important;
}
html[data-coachme-premium="1"][data-theme="dark"] #page-reglages .planning-coupe-option input{
  accent-color:#eab308!important;
}
html[data-coachme-premium="1"][data-theme="dark"] #page-reglages #planning-info{
  background:#0d2238!important;
  color:#aebfd1!important;
  border:1px solid #244660!important;
}
html[data-coachme-premium="1"][data-theme="dark"] #page-reglages [style*="background:#eff6ff"][style*="color:#1e40af"]{
  background:#0c2943!important;
  color:#b9d9f7!important;
  border-color:#285a82!important;
}


/* DARK-V3 — pont visuel pour les écrans legacy encore alimentés par des couleurs claires en ligne. */
html[data-coachme-premium="1"][data-theme="dark"] [style*="background:#f8fafc"],
html[data-coachme-premium="1"][data-theme="dark"] [style*="background:#f1f5f9"],
html[data-coachme-premium="1"][data-theme="dark"] [style*="background:#f0f4f8"]{
  background:var(--cm-surface-2)!important;color:var(--cm-text)!important;border-color:var(--cm-border)!important;
}
html[data-coachme-premium="1"][data-theme="dark"] [style*="background:#dbeafe"],
html[data-coachme-premium="1"][data-theme="dark"] [style*="background:#e0f2fe"],
html[data-coachme-premium="1"][data-theme="dark"] [style*="background:#eff6ff"]{
  background:#102f4d!important;color:#b9dcff!important;border-color:#28577d!important;
}
html[data-coachme-premium="1"][data-theme="dark"] [style*="background:#dcfce7"],
html[data-coachme-premium="1"][data-theme="dark"] [style*="background:#d1fae5"],
html[data-coachme-premium="1"][data-theme="dark"] [style*="background:#f0fdf4"]{
  background:#0d322b!important;color:#8aefc6!important;border-color:#1f654f!important;
}
html[data-coachme-premium="1"][data-theme="dark"] [style*="background:#fef3c7"]{
  background:#3a2b12!important;color:#ffd071!important;border-color:#76551a!important;
}
html[data-coachme-premium="1"][data-theme="dark"] [style*="background:#fee2e2"],
html[data-coachme-premium="1"][data-theme="dark"] [style*="background:#fff5f5"]{
  background:#3a1820!important;color:#ff9aa5!important;border-color:#7a2c38!important;
}
html[data-coachme-premium="1"][data-theme="dark"] [style*="background:#fff7ed"],
html[data-coachme-premium="1"][data-theme="dark"] [style*="background:#ffedd5"]{
  background:#3a2518!important;color:#ffbd82!important;border-color:#75462b!important;
}
html[data-coachme-premium="1"][data-theme="dark"] [style*="background:#ede9fe"]{
  background:#292047!important;color:#c8baff!important;border-color:#5d4b91!important;
}
html[data-coachme-premium="1"][data-theme="dark"] .b-blue{background:#102f4d!important;color:#b9dcff!important;}
html[data-coachme-premium="1"][data-theme="dark"] .b-green{background:#0d322b!important;color:#8aefc6!important;}
html[data-coachme-premium="1"][data-theme="dark"] .b-orange{background:#3a2b12!important;color:#ffd071!important;}
html[data-coachme-premium="1"][data-theme="dark"] .b-red{background:#3a1820!important;color:#ff9aa5!important;}
html[data-coachme-premium="1"][data-theme="dark"] .msg-item.unread{background:#0d2945!important;border-left-color:var(--cm-blue)!important;}
html[data-coachme-premium="1"][data-theme="dark"] #page-resultats .ct-match{color:#73b8ff!important;}
html[data-coachme-premium="1"][data-theme="dark"] #page-resultats #resultats-list .cal-row{border-color:var(--cm-border)!important;}
html[data-coachme-premium="1"][data-theme="dark"] #page-resultats #resultats-list .cal-name{color:#f4f8ff!important;}
html[data-coachme-premium="1"][data-theme="dark"] #page-resultats #resultats-list .cal-dow,
html[data-coachme-premium="1"][data-theme="dark"] #page-resultats #resultats-list .cal-mon{color:#9eb2c8!important;}

/* === PC/TABLETTE — LOGOS APPLICATIONS D'ORIGINE 20260920 === */
@media(min-width:761px){
  html[data-coachme-premium="1"] .topbar-row2 .app-switch{
    display:flex!important;
    align-items:center!important;
    gap:6px!important;
  }
  html[data-coachme-premium="1"] .topbar-row2 .app-btn{
    height:46px!important;
    padding:0 6px!important;
    border-radius:10px!important;
  }
  html[data-coachme-premium="1"] .topbar-row2 .app-btn img{
    width:96px!important;
    height:auto!important;
    display:block!important;
    object-fit:contain!important;
  }
}

/* === PROFIL JOUEUR — SIDEBAR NATIF TOUJOURS ACCESSIBLE PC/TABLETTE 20260920 === */
@media(min-width:761px){
  html[data-coachme-premium="1"] body.cm-profile-player-open .sidebar{
    display:flex!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
    position:relative!important;
    z-index:2147483001!important;
    transform:none!important;
  }
  html[data-coachme-premium="1"] body.cm-profile-player-open .sb-toggle{
    display:flex!important;
    z-index:2147483002!important;
  }
}

/* === PROFIL JOUEUR — COLLAPSE SIDEBAR RÉEL 20260920 === */
@media(min-width:761px){
  html[data-coachme-premium="1"] body.cm-profile-player-open .sidebar.collapsed{
    width:0!important;
    min-width:0!important;
    max-width:0!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
    overflow:hidden!important;
  }
  html[data-coachme-premium="1"] body.cm-profile-player-open .sb-toggle.collapsed{
    left:0!important;
  }
}

/* === RÉUNIONS — DÉTAIL DES RÉPONSES AU CLIC 20260920 === */
#page-reunions .rs-meeting-card[role="button"]{cursor:pointer}
#page-reunions .rs-meeting-card[role="button"]:hover{
  border-color:color-mix(in srgb,var(--blue) 44%,var(--gray-200));
}
#page-reunions .rs-response-hint{
  margin-top:10px;
  padding-top:9px;
  border-top:1px solid var(--gray-200);
  color:var(--blue);
  font-size:11px;
  font-weight:800;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
#page-reunions .rs-response-detail{
  margin-top:10px;
  padding:10px;
  border-radius:12px;
  background:color-mix(in srgb,var(--blue) 4%,var(--white));
  border:1px solid var(--gray-200);
}
#page-reunions .rs-response-block+.rs-response-block{margin-top:10px}
#page-reunions .rs-response-title{font-size:11px;font-weight:900;margin-bottom:5px}
#page-reunions .rs-response-block.present .rs-response-title{color:#169866}
#page-reunions .rs-response-block.absent .rs-response-title{color:#dc4452}
#page-reunions .rs-response-block.waiting .rs-response-title{color:#b98617}
#page-reunions .rs-response-list{display:flex;flex-wrap:wrap;gap:5px}
#page-reunions .rs-response-person{
  display:inline-flex;
  align-items:center;
  min-height:25px;
  padding:4px 8px;
  border-radius:7px;
  background:var(--gray-100);
  color:var(--gray-700);
  font-size:10px;
  font-weight:700;
}
#page-reunions .rs-response-empty{font-size:10px;color:var(--gray-400)}

/* Coach mobile bottom nav — 6 onglets, Messages à droite */
@media(max-width:760px){
  html[data-coachme-premium="1"] .cm-mobile-nav{
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    padding:6px 5px!important;
  }
  html[data-coachme-premium="1"] .cm-mobile-nav button{
    min-width:0!important;
    padding:0 1px!important;
    font-size:7.2px!important;
    letter-spacing:-.08px;
  }
  html[data-coachme-premium="1"] .cm-mobile-nav button>span:last-child{
    max-width:100%;
    overflow:hidden;
    text-overflow:clip;
    white-space:nowrap;
  }
  html[data-coachme-premium="1"] .cm-mobile-nav button .cmn-ico svg{
    width:19px!important;height:19px!important;
  }
  html[data-coachme-premium="1"] .cm-mobile-fab{display:none!important;}
}
