  :root { --pelouse-fonce:#0E2E1F; --pelouse:#16412C; --vert-vif:#4CAF52; --or:#E8A33D; --brique:#C1442E; --sable:#F6F2E7; --carte:#FFFFFF; --encre:#17190F; --encre-douce:#5B5F4F; --ligne:#E4DEC9; --radius:10px; }
  * { box-sizing:border-box; margin:0; padding:0; }
  body { background: var(--sable); color: var(--encre); font-family:'Work Sans',sans-serif; }
  h1,h2,h3 { font-family:'Anton',sans-serif; font-weight:400; letter-spacing:.02em; text-transform:uppercase; color: var(--pelouse-fonce); }
  button { font-family: inherit; cursor:pointer; border:none; }
  input, select, textarea { font-family: inherit; padding:9px 11px; border:1px solid var(--ligne); border-radius:8px; font-size:14px; width:100%; background:#fff; }
  label { font-size:12px; font-weight:600; color: var(--encre-douce); display:block; margin-bottom:4px; }
  .field { margin-bottom: 12px; }
  .btn { background: var(--pelouse-fonce); color:#fff; padding:10px 18px; border-radius:8px; font-weight:600; font-size:14px; }
  .btn:hover { background: var(--pelouse); }
  .btn-secondary { background:#fff; border:1px solid var(--ligne); color: var(--encre); }
  .btn-danger { background: var(--brique); color:#fff; }
  .btn-sm { padding:6px 12px; font-size:12px; border-radius:6px; }

  #loginScreen { min-height:100vh; display:flex; align-items:center; justify-content:center; background: var(--pelouse-fonce); }
  .login-card { background:#fff; padding:34px; border-radius:14px; width:100%; max-width:380px; }
  .login-card .mark { width:52px;height:52px;border-radius:50%; background:var(--or); color:var(--pelouse-fonce); display:flex;align-items:center;justify-content:center; font-family:'Anton',sans-serif; margin: 0 auto 14px; }
  .login-card h1 { text-align:center; font-size:20px; margin-bottom: 4px; }
  .login-card p.sub { text-align:center; font-size:13px; color:var(--encre-douce); margin-bottom:22px; }
  #loginError { color: var(--brique); font-size:13px; margin-top:8px; display:none; }

  #appShell { display: none; min-height:100vh; }
  .sidebar { width:220px; background: var(--pelouse-fonce); color:#fff; padding:20px 14px; flex-shrink:0; position: sticky; top: 0; align-self: flex-start; height: 100vh; overflow-y: auto; }
  .sidebar .brand { font-family:'Anton',sans-serif; font-size:17px; margin-bottom:26px; padding: 0 6px;}
  .sidebar .brand small { display:block; font-family:'Work Sans',sans-serif; text-transform:none; font-size:11px; color:var(--or); }
  .sidebar nav button { display:block; width:100%; text-align:left; background:none; color:#C9D3C9; padding:10px 12px; border-radius:8px; font-size:14px; font-weight:600; margin-bottom:2px; }
  .sidebar nav button.active, .sidebar nav button:hover { background: rgba(255,255,255,0.08); color:#fff; }
  .sidebar .whoami { margin-top: 26px; padding-top:16px; border-top:1px solid rgba(255,255,255,0.12); font-size:12px; color:#B9C4B7; }
  .sidebar .whoami button { margin-top:10px; color: var(--or); background:none; padding:0; font-size:12px; }

  #appShell { display:flex; }
  main { flex:1; padding: 26px 30px; max-width: 1100px; }
  .panel { display:none; }
  .panel.active { display:block; }
  .panel-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }

  .card { background:#fff; border:1px solid var(--ligne); border-radius: var(--radius); }
  .stats-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px; margin-bottom:24px; }
  .stat-card { padding:18px; }
  .stat-card .num { font-family:'JetBrains Mono',monospace; font-size:28px; font-weight:700; color: var(--pelouse-fonce); }
  .stat-card .lbl { font-size:12px; color: var(--encre-douce); margin-top:4px; }

  /* ---------- DASHBOARD (nouveaux widgets) ---------- */
  .dash-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:14px; margin-bottom:20px; }
  .dash-card { padding:16px 18px; display:flex; flex-direction:column; gap:10px; }
  .dash-card h4 { font-family:'Work Sans',sans-serif; text-transform:uppercase; letter-spacing:.06em; font-size:11px; font-weight:700; color:var(--encre-douce); display:flex; align-items:center; gap:6px; }
  .dash-empty { font-size:12.5px; color:var(--encre-douce); padding:6px 0; }
  .dash-match-row { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 0; border-bottom:1px solid var(--ligne); font-size:13px; }
  .dash-match-row:last-child { border-bottom:none; }
  .dash-match-teams { font-weight:700; color:var(--encre); }
  .dash-match-time { font-family:'JetBrains Mono',monospace; font-size:12px; color:var(--pelouse-fonce); font-weight:700; white-space:nowrap; }
  .dash-live-dot { width:8px; height:8px; border-radius:50%; background:var(--brique); display:inline-block; animation:dashPulse 1.4s infinite; flex-shrink:0; }
  @keyframes dashPulse { 0%{ box-shadow:0 0 0 0 rgba(193,68,46,.55);} 70%{ box-shadow:0 0 0 8px rgba(193,68,46,0);} 100%{ box-shadow:0 0 0 0 rgba(193,68,46,0);} }
  .dash-score { font-family:'JetBrains Mono',monospace; font-weight:700; color:var(--brique); }
  .dash-card.dash-live { border-color:var(--brique); }
  .dash-topplayer-body { display:flex; align-items:center; gap:12px; }
  .dash-topplayer-photo { width:56px; height:56px; border-radius:50%; object-fit:cover; background:var(--pelouse-fonce); border:2px solid var(--or); flex-shrink:0; }
  .dash-topplayer-avatar { width:56px; height:56px; border-radius:50%; background:var(--pelouse-fonce); color:var(--or); display:flex; align-items:center; justify-content:center; font-family:'Anton',sans-serif; font-size:22px; flex-shrink:0; border:2px solid var(--or); }
  .dash-topplayer-name { font-weight:700; font-size:15px; }
  .dash-topplayer-meta { font-size:12px; color:var(--encre-douce); }
  .dash-topplayer-buts { font-family:'JetBrains Mono',monospace; font-weight:700; color:var(--pelouse-fonce); font-size:22px; margin-left:auto; text-align:center; }
  .dash-topplayer-buts small { display:block; font-family:'Work Sans',sans-serif; font-weight:600; font-size:10px; color:var(--encre-douce); text-transform:uppercase; }
  .dash-monitoring { padding:18px; margin-bottom:24px; }
  .dash-mon-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:18px; margin-top:10px; }
  .dash-mon-bar-row { display:flex; align-items:center; gap:8px; font-size:12.5px; margin-bottom:6px; }
  .dash-mon-bar-row .lbl { width:110px; flex-shrink:0; color:var(--encre-douce); }
  .dash-mon-bar-track { flex:1; height:8px; border-radius:99px; background:var(--sable); overflow:hidden; }
  .dash-mon-bar-fill { height:100%; border-radius:99px; }
  .dash-mon-bar-row .val { width:26px; text-align:right; font-family:'JetBrains Mono',monospace; font-weight:700; flex-shrink:0; }

  table { width:100%; border-collapse:collapse; }
  th,td { padding:10px 12px; font-size:13px; text-align:left; border-bottom:1px solid var(--ligne); }
  th { font-size:11px; text-transform:uppercase; letter-spacing:.05em; color: var(--encre-douce); }
  .table-wrap { overflow-x:auto; }

  .form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; padding: 18px; }
  .form-grid.full { grid-template-columns:1fr; }
  .form-actions { padding: 0 18px 18px; display:flex; gap:10px; }

  .filter-bar { display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }
  .filter-bar input[type="text"] { flex:2; min-width:180px; }
  .filter-bar select { flex:1; min-width:140px; }

  .live-panel { background: var(--pelouse-fonce); color:#fff; padding:18px; border-radius: var(--radius); margin-bottom:16px; }
  .live-score { font-family:'JetBrains Mono',monospace; font-size:34px; text-align:center; color: var(--or); margin: 10px 0; }
  .live-actions { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; margin-top: 12px;}

  .toast { position:fixed; bottom:20px; right:20px; background: var(--pelouse-fonce); color:#fff; padding:12px 18px; border-radius:8px; font-size:13px; opacity:0; transform:translateY(10px); transition:.25s; z-index:200; }
  .toast.show { opacity:1; transform:translateY(0); }
  .toast.error { background: var(--brique); }
  .empty { text-align:center; padding: 30px; color: var(--encre-douce); font-size:13px; }
  .bracket-scroll { display:flex; gap:24px; overflow-x:auto; padding-bottom:10px; }
  .bracket-col { min-width:200px; display:flex; flex-direction:column; justify-content:space-around; gap:16px; }
  .bracket-col-title { font-size:11px; text-transform:uppercase; letter-spacing:.06em; color: var(--encre-douce); font-weight:700; text-align:center; margin-bottom:4px; }
  .bracket-match { background:#fff; border:1px solid var(--ligne); border-radius:8px; overflow:hidden; cursor:pointer; transition: border-color .12s, box-shadow .12s; }
  .bracket-match:hover { border-color: var(--or); box-shadow: 0 2px 10px rgba(232,163,61,0.25); }
  .bracket-datetime { display:flex; align-items:center; justify-content:center; gap:5px; background: var(--pelouse-fonce); color: var(--or); font-family:'JetBrains Mono',monospace; font-size:11px; font-weight:700; padding:6px 8px; }
  .bracket-datetime.a-definir { background:#EFEAD9; color: var(--encre-douce); }
  .bracket-team { padding:8px 10px; font-size:12px; font-weight:600; display:flex; justify-content:space-between; gap:6px; border-bottom:1px solid var(--ligne); height:34px; }
  .bracket-team:last-child { border-bottom:none; }
  .bracket-team span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .bracket-team.vainqueur { background:#EAF2EC; color: var(--pelouse-fonce); }
  .bracket-orphelins { background:#FFF3E0; border:1px solid #F0C685; border-radius:var(--radius); padding:16px; margin-bottom:18px; }
  .bracket-orphelins h4 { font-size:13px; text-transform:uppercase; letter-spacing:.04em; color:var(--brique); margin-bottom:6px; }
  .bracket-orphelins p { font-size:12.5px; color:var(--encre-douce); margin-bottom:12px; }
  .orphelin-row { background:#fff; border:1px solid var(--ligne); border-radius:8px; padding:10px 12px; margin-bottom:8px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
  .orphelin-row .orphelin-info { font-size:12.5px; font-weight:600; flex:1; min-width:180px; }
  .orphelin-row select { width:auto; min-width:200px; font-size:12.5px; }
  .bracket-hint { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-bottom:10px; }

  /* ---------- AFFICHES & STATS ---------- */
  .subtabs { display:flex; gap:8px; margin-bottom:18px; flex-wrap:wrap; }
  .subtabs button { background:#fff; border:1px solid var(--ligne); padding:8px 16px; border-radius:999px; font-weight:600; font-size:13px; color: var(--encre-douce); }
  .subtabs button.active { background: var(--pelouse-fonce); color:#fff; border-color: var(--pelouse-fonce); }
  .subpanel { display:none; }
  .subpanel.active { display:block; }
  .style-toggle { display:flex; gap:8px; margin-bottom:14px; }
  .style-toggle button { flex:1; padding:10px; border-radius:8px; border:1px solid var(--ligne); background:#fff; font-weight:700; font-size:13px; }
  .style-toggle button.active { background: var(--or); border-color: var(--or); color: var(--pelouse-fonce); }
  #posterCanvas { width:100%; max-width:420px; border-radius:10px; box-shadow:0 8px 24px rgba(14,46,31,0.15); display:block; margin: 0 auto; }
  .poster-wrap { text-align:center; }

  /* ---------- MODAL GÉNÉRIQUE (fiches Équipe / Joueur) ---------- */
  .overlay { position:fixed; inset:0; background:rgba(14,46,31,0.65); display:none; align-items:flex-start; justify-content:center; padding:30px 16px; z-index:200; overflow-y:auto; }
  .overlay.open { display:flex; }
  .modal-box { background:#fff; border-radius:14px; max-width:760px; width:100%; overflow:hidden; }
  .modal-box .modal-head { background:var(--pelouse-fonce); color:#fff; padding:20px 22px; position:relative; }
  .modal-box .modal-close { position:absolute; top:14px; right:16px; background:rgba(255,255,255,0.15); color:#fff; width:28px; height:28px; border-radius:50%; font-size:14px; line-height:1; }
  .modal-box .modal-body { padding:22px; }

  /* ---------- PAGE PLEIN ÉCRAN (fiches Joueur / Équipe) ---------- */
  #ficheOverlay { padding:0; background:var(--sable); align-items:flex-start; }
  #ficheOverlay .modal-box { max-width:100%; width:100%; min-height:100vh; border-radius:0; background:var(--sable); }
  #ficheOverlay .modal-close { top:16px; right:18px; background:rgba(255,255,255,0.18); }
  .fiche-hero { position:relative; min-height:280px; display:flex; align-items:flex-end; background:linear-gradient(180deg, var(--pelouse) 0%, var(--pelouse-fonce) 100%); padding:34px 30px 26px; overflow:hidden; }
  .fiche-hero-photo-bg { position:absolute; inset:0; background-size:cover; background-position:center 15%; opacity:.55; }
  .fiche-hero-photo-bg::after { content:''; position:absolute; inset:0; background:linear-gradient(180deg, rgba(14,46,31,0.15) 0%, var(--pelouse-fonce) 92%); }
  .fiche-hero-content { position:relative; z-index:1; display:flex; align-items:center; gap:20px; width:100%; }
  .fiche-hero-photo { width:120px; height:120px; border-radius:50%; object-fit:cover; border:4px solid var(--or); flex-shrink:0; box-shadow:0 8px 24px rgba(0,0,0,.35); }
  .fiche-hero-avatar { width:120px; height:120px; border-radius:50%; border:4px solid var(--or); flex-shrink:0; background:rgba(255,255,255,0.15); display:flex; align-items:center; justify-content:center; font-family:'Anton',sans-serif; font-size:42px; color:var(--or); box-shadow:0 8px 24px rgba(0,0,0,.35); }
  .fiche-hero-title { font-family:'Anton',sans-serif; font-size:36px; color:#fff; text-transform:uppercase; line-height:1.05; }
  .fiche-hero-sub { font-size:14px; color:var(--or); margin-top:6px; }
  .fiche-page-body { max-width:900px; margin:0 auto; padding:28px 24px 60px; }
  .fiche-stats-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); gap:10px; margin:18px 0; }
  .fiche-stat { background:var(--sable); border-radius:10px; padding:12px; text-align:center; }
  .fiche-stat .n { font-family:'JetBrains Mono',monospace; font-weight:700; font-size:22px; color:var(--pelouse-fonce); }
  .fiche-stat .l { font-size:10.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--encre-douce); margin-top:2px; }
  .fiche-section-title { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--encre-douce); margin:18px 0 8px; }
  .fiche-player-row, .fiche-match-row { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid var(--ligne); font-size:13px; }
  .fiche-player-row:last-child, .fiche-match-row:last-child { border-bottom:none; }
  .fiche-player-thumb { width:30px; height:30px; border-radius:50%; object-fit:cover; background:var(--sable); flex-shrink:0; }
  .fiche-player-avatar-sm { width:30px; height:30px; border-radius:50%; background:var(--pelouse-fonce); color:var(--or); display:flex; align-items:center; justify-content:center; font-family:'Anton',sans-serif; font-size:12px; flex-shrink:0; }
  .fiche-match-dossard { font-family:'JetBrains Mono',monospace; font-weight:700; font-size:12px; color:var(--pelouse-fonce); background:var(--sable); border-radius:6px; padding:2px 6px; flex-shrink:0; }
  .badge-statut { font-size:10px; font-weight:700; text-transform:uppercase; padding:3px 8px; border-radius:999px; }
  .badge-statut.programme { background:#EAF2EC; color:var(--pelouse); }
  .badge-statut.en_cours { background:#FDEBE7; color:var(--brique); }
  .badge-statut.termine { background:#F0EDE2; color:var(--encre-douce); }
  .badge-statut.annule { background:#F0EDE2; color:var(--brique); }
  .player-thumb-table { width:32px; height:32px; border-radius:50%; object-fit:cover; vertical-align:middle; margin-right:8px; background:var(--sable); }
  .player-thumb-table-empty { width:32px; height:32px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; background:var(--pelouse-fonce); color:var(--or); font-family:'Anton',sans-serif; font-size:12px; vertical-align:middle; margin-right:8px; }
  .match-fiche-score { display:flex; align-items:center; justify-content:center; gap:22px; margin-top:8px; }
  .match-fiche-score .eq { text-align:center; width:140px; }
  .match-fiche-score .eq .logo { width:44px; height:44px; border-radius:50%; background:rgba(255,255,255,0.12); margin:0 auto 6px; display:flex; align-items:center; justify-content:center; font-family:'Anton',sans-serif; overflow:hidden; }
  .match-fiche-score .eq .logo img { width:100%; height:100%; object-fit:cover; }
  .match-fiche-score .chiffres { font-family:'JetBrains Mono',monospace; font-size:32px; color:var(--or); }
  .match-fiche-meta { text-align:center; font-size:12px; color:rgba(255,255,255,0.75); margin-top:8px; }
  .compo-teams-admin { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
  .compo-teams-admin .compo-col { background:var(--carte); border:1px solid var(--ligne); border-radius:var(--radius); padding:14px 16px; }
  .compo-teams-admin .compo-col h5 { font-size:13px; text-transform:uppercase; letter-spacing:.05em; color:var(--encre-douce); margin-bottom:8px; display:flex; justify-content:space-between; align-items:center; }

  /* ---------- HOMME DU MATCH — carte mise en avant ---------- */
  .hdm-card { display:flex; align-items:center; gap:14px; background:linear-gradient(135deg,#FFF8E8,#FBEBC4); border:1px solid var(--or); border-radius:14px; padding:14px 16px; margin-bottom:20px; cursor:pointer; box-shadow:0 3px 10px rgba(201,138,44,0.15); }
  .hdm-card:hover { box-shadow:0 5px 16px rgba(201,138,44,0.25); }
  .hdm-card .hdm-avatar-wrap { position:relative; flex-shrink:0; }
  .hdm-card .hdm-avatar { width:58px; height:58px; border-radius:50%; object-fit:cover; border:3px solid var(--or); box-shadow:0 4px 10px rgba(0,0,0,.15); display:block; background:var(--pelouse-fonce); color:#fff; }
  .hdm-card .hdm-avatar.hdm-initials { display:flex; align-items:center; justify-content:center; font-family:'Anton',sans-serif; font-size:18px; }
  .hdm-card .hdm-star { position:absolute; bottom:-2px; right:-2px; background:var(--or); color:#fff; width:20px; height:20px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:11px; box-shadow:0 0 0 2px #fff; }
  .hdm-card .hdm-badge { font-size:10.5px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:#B8860B; display:flex; align-items:center; gap:5px; }
  .hdm-card .hdm-name { font-family:'Anton',sans-serif; font-size:18px; color:var(--pelouse-fonce); margin-top:2px; }
  .hdm-card .hdm-meta { font-size:12px; color:var(--encre-douce); margin-top:2px; }
  .hdm-mini-pill { display:inline-flex; align-items:center; gap:5px; background:#FBEBC4; color:#8A6100; font-size:10.5px; font-weight:700; padding:3px 8px; border-radius:999px; }
  @media (max-width:560px) { .compo-teams-admin { grid-template-columns:1fr; } }
  .stat-table td, .stat-table th { font-size:13px; }
  .stat-block { margin-bottom: 22px; }
  .stat-block h4 { font-size:13px; text-transform:uppercase; letter-spacing:.04em; color:var(--pelouse); margin-bottom:8px; }

  /* ---------- CARTES MATCHS MOBILE (façon SofaScore) ---------- */
  .matches-cards-mobile { display:none; }
  .mc-card { background:#fff; border:1px solid var(--ligne); border-radius:12px; margin-top:10px; overflow:hidden; }
  .mc-row { display:grid; grid-template-columns:48px 1fr auto; align-items:center; gap:10px; padding:12px 12px 10px; }
  .mc-time { text-align:center; }
  .mc-hour { font-family:'JetBrains Mono',monospace; font-size:11.5px; font-weight:700; color:var(--encre); }
  .mc-phase { font-size:9px; color:var(--encre-douce); text-transform:uppercase; margin-top:2px; }
  .mc-teams { display:flex; flex-direction:column; gap:6px; min-width:0; }
  .mc-team { display:flex; align-items:center; gap:8px; font-weight:700; font-size:13px; min-width:0; }
  .mc-team span.mc-team-name { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
  .mc-team .logo { width:22px; height:22px; border-radius:50%; background:var(--pelouse); flex-shrink:0; display:flex; align-items:center; justify-content:center; color:#fff; font-size:8px; font-family:'Anton',sans-serif; overflow:hidden; }
  .mc-scores { display:flex; flex-direction:column; gap:6px; align-items:flex-end; }
  .mc-score { font-family:'JetBrains Mono',monospace; font-weight:700; font-size:14px; }
  .mc-assign { padding:0 12px 12px; display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
  .mc-assign select { flex:1; min-width:0; font-size:12px; }
  .mc-status-bar { display:flex; align-items:center; justify-content:space-between; padding:8px 12px; background:#FAF8F1; border-top:1px solid var(--ligne); }
  .mc-actions { display:flex; gap:6px; }
  .mc-icon-btn { width:34px; height:34px; border-radius:8px; background:#fff; border:1px solid var(--ligne); font-size:14px; display:flex; align-items:center; justify-content:center; }
  .mc-icon-btn.mc-danger { color:var(--brique); }
  .mc-icon-btn.mc-primary { background:var(--pelouse-fonce); border-color:var(--pelouse-fonce); color:#fff; }

  @media (max-width: 900px) {
    .matches-cards-mobile { display:block; }
    #matchesTableCard { display:none; }
  }
  .role-badge { font-size:10px; font-weight:700; text-transform:uppercase; padding:3px 9px; border-radius:999px; background:#EAF2EC; color:var(--pelouse); }
  .role-badge.super_admin { background:#FDEBE7; color:var(--brique); }
  .actif-off { opacity:0.5; }

  /* ---------- ZONE COLLER / GLISSER UNE IMAGE ---------- */
  .imgdrop { position:relative; border:2px dashed var(--ligne); border-radius:10px; padding:14px; text-align:center; cursor:pointer; transition: border-color .15s, background .15s; background:#fff; }
  .imgdrop:hover, .imgdrop.dragover { border-color: var(--or); background:#FFFBF2; }
  .imgdrop input[type=file] { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; height:100%; }
  .imgdrop .imgdrop-hint { font-size:11.5px; color:var(--encre-douce); pointer-events:none; }
  .imgdrop .imgdrop-hint b { color: var(--pelouse-fonce); }
  .imgdrop .imgdrop-preview { max-width:100%; max-height:120px; border-radius:8px; margin-bottom:8px; display:none; object-fit:cover; pointer-events:none; }
  .imgdrop.has-preview .imgdrop-preview { display:inline-block; }

  /* ==================================================================
     ADMIN MOBILE — tiroir + barre haute + formulaires/tableaux adaptés
     ================================================================== */
  /* ==================================================================
     ADMIN MOBILE — barre basse façon app + menu "Plus" plein écran
     ================================================================== */
  .app-tabbar { display:none; }
  .sidebar-mobile-close { display:none; }

  @media (max-width: 900px) {
    #appShell { display:block; }

    /* Barre de navigation basse, façon app mobile (identique au site public) */
    .app-tabbar {
      display:flex; position:fixed; left:0; right:0; bottom:0; z-index:150;
      background: rgba(14,46,31,0.98); backdrop-filter: blur(10px);
      border-top: 1px solid rgba(255,255,255,0.08);
      padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
      box-shadow: 0 -6px 20px rgba(0,0,0,0.25);
    }
    .app-tabbar button {
      flex:1; background:none; display:flex; flex-direction:column; align-items:center; justify-content:center;
      gap:3px; padding:6px 2px; color:#9FB0A4; font-size:10px; font-weight:700;
      text-transform:uppercase; letter-spacing:.02em; border-radius:10px; min-height:48px;
    }
    .app-tabbar .ico { font-size:19px; line-height:1; }
    .app-tabbar button.active { color: var(--or); }
    .app-tabbar button:active { background: rgba(255,255,255,0.06); }

    /* La sidebar devient le menu "Plus" plein écran, masqué par défaut */
    .sidebar {
      position:fixed; inset:0; z-index:200; height:100vh; width:100%;
      transform:translateY(100%); transition:transform .22s ease;
      padding: calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
      overflow-y:auto;
    }
    .sidebar.open { transform:translateY(0); }
    .sidebar-mobile-close {
      display:block; position:absolute; top:14px; right:14px; background:rgba(255,255,255,0.12);
      color:#fff; width:34px; height:34px; border-radius:50%; font-size:15px;
    }
    .sidebar nav button { padding:13px 12px; font-size:15px; }

    body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
    main { padding: 16px 14px calc(30px + env(safe-area-inset-bottom)); max-width:100%; }
    .panel-head { flex-wrap:wrap; gap:10px; }
    .panel-head h2 { font-size:19px; }
    .panel-head .btn { width:100%; }
    .panel-head > div { width:100%; flex-wrap:wrap; }
    .panel-head select { flex:1; min-width:0; }

    /* Formulaires : une seule colonne, champs et boutons pleine largeur */
    .form-grid { grid-template-columns:1fr; gap:10px; padding:14px; }
    .form-actions { flex-direction:column; padding:0 14px 14px; }
    .form-actions .btn, .form-actions button { width:100%; }
    input, select, textarea, .btn, button { font-size:16px; } /* évite le zoom auto iOS au focus */
    .btn, .btn-secondary, .btn-danger { min-height:44px; }
    .btn-sm { min-height:36px; }
    label { font-size:12.5px; }

    /* Tableaux : défilement horizontal fluide + colonnes plus compactes */
    .table-wrap { -webkit-overflow-scrolling:touch; }
    table { font-size:12px; }
    th, td { padding:9px 8px; white-space:nowrap; }
    td .btn-sm { margin-bottom:4px; }

    .stats-grid, .dash-grid { grid-template-columns:repeat(2,1fr); gap:10px; }
    .stat-card { padding:14px; }
    .stat-card .num { font-size:22px; }
    .dash-card { padding:14px; }

    .subtabs { overflow-x:auto; flex-wrap:nowrap; -webkit-overflow-scrolling:touch; padding-bottom:4px; }
    .subtabs button { white-space:nowrap; }

    /* Modales quasi plein écran */
    .overlay { padding:0; align-items:stretch; }
    .modal-box { max-width:100%; width:100%; min-height:100vh; border-radius:0; }
    .modal-box .modal-body { padding:16px; }
    .fiche-hero { padding:24px 18px 20px; min-height:220px; }
    .fiche-hero-photo, .fiche-hero-avatar { width:84px; height:84px; }
    .fiche-hero-title { font-size:24px; }
    .fiche-page-body { padding:20px 16px 50px; }

    .bracket-scroll { -webkit-overflow-scrolling:touch; }

    .orphelin-row { flex-direction:column; align-items:stretch; }
    .orphelin-row select { width:100%; min-width:0; }
  }
  /* ---------- SOUS-ONGLETS FICHE (Détails / Compositions / Statistiques / Matchs / Classement / Effectif) ---------- */
  .match-subtabs { display:flex; background: var(--pelouse-fonce); border-top:1px solid rgba(255,255,255,0.08); }
  .mst-btn { flex:1; padding:12px 6px; font-size:12.5px; font-weight:700; color:#B9C4B7; background:none; text-align:center; border-bottom:2px solid transparent; }
  .mst-btn.active { color:#fff; border-color: var(--or); }
  .mst-panel { display:none; }
  .mst-panel.active { display:block; }

  /* ---------- LISTE DE JOUEURS GROUPÉE PAR ÉQUIPE (façon vote public) ---------- */
  .vote-teams { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:12px; }
  .vote-team-col { background:#fff; border:1px solid var(--ligne); border-radius:12px; overflow:hidden; }
  .vote-team-head { display:flex; align-items:center; gap:8px; padding:10px 12px; background:var(--pelouse-fonce); color:#fff; font-weight:700; font-size:12.5px; }
  .vote-team-head img { width:22px; height:22px; border-radius:50%; object-fit:cover; }
  .vote-team-list { max-height:280px; overflow-y:auto; -webkit-overflow-scrolling:touch; }
  .vote-player-row { display:flex; align-items:center; gap:9px; width:100%; background:#fff; border:none; border-bottom:1px solid var(--ligne); padding:9px 12px; font-size:12.5px; font-weight:600; text-align:left; color: var(--encre); }
  .vote-player-row:last-child { border-bottom:none; }
  .vote-player-row .avatar { width:28px; height:28px; border-radius:50%; object-fit:cover; flex-shrink:0; background:var(--pelouse); color:var(--or); display:flex; align-items:center; justify-content:center; font-family:'Anton',sans-serif; font-size:10px; }
  .vote-player-row .num { font-family:'JetBrains Mono',monospace; color:var(--pelouse-fonce); font-weight:700; width:24px; flex-shrink:0; }
  .vote-player-row:hover { background:#FFFBF2; }
  @media (max-width:640px) { .vote-teams { grid-template-columns:1fr; } .vote-team-list { max-height:200px; } }

  /* ---------- ICÔNES D'ACTION SUR LIGNE (tables matchs/équipes) ---------- */
  .row-icon-actions { display:flex; gap:6px; }
  .row-icon-btn { width:30px; height:30px; border-radius:7px; background:#fff; border:1px solid var(--ligne); font-size:13px; display:inline-flex; align-items:center; justify-content:center; }
  .row-icon-btn.ria-danger { color:var(--brique); }
  .row-icon-btn.ria-primary { background:var(--pelouse-fonce); border-color:var(--pelouse-fonce); color:#fff; }
  tr.row-clickable { cursor:pointer; }
  tr.row-clickable:hover td { background:#FBF9F2; }
