/* ============================================================
   MATCHDAY — Feuille de terrain
   Identité sombre · accent lime #a3e635
   ============================================================ */

:root {
  color-scheme: dark;
  --bg: #090b10;
  --bg-sidebar: #0d1118;
  --panel: #11151d;
  --panel-2: #131923;
  --line: #222936;
  --line-soft: rgba(34, 41, 54, 0.7);
  --text: #f4f6fa;
  --muted: #8791a2;
  --muted-2: #6f7b8d;
  --green: #a3e635;
  --green-dark: #10150a;
  --amber: #e0b36a;
  --blue: #7dd3fc;
  --red: #f87171;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 78% -10%, rgba(163, 230, 53, 0.045), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

svg.lucide {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke-width: 1.8;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--green);
  color: #111;
}

:focus-visible {
  outline: 2px solid rgba(163, 230, 53, 0.65);
  outline-offset: 2px;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: #0b0f16;
}
::-webkit-scrollbar-thumb {
  background: #29313d;
  border-radius: 99px;
  border: 2px solid #0b0f16;
}
::-webkit-scrollbar-thumb:hover {
  background: #374151;
}

/* ------------------------------------------------------------
   Structure
   ------------------------------------------------------------ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--line);
  overflow: hidden;
  z-index: 30;
}

.main {
  flex: 1;
  min-width: 0;
  margin-left: 236px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 32px;
  background: rgba(9, 11, 16, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.page {
  flex: 1;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 30px 40px 36px;
}

/* ------------------------------------------------------------
   Sidebar
   ------------------------------------------------------------ */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px;
  margin-bottom: 36px;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--green);
  color: var(--green-dark);
  box-shadow: 0 8px 22px rgba(163, 230, 53, 0.18);
}

.brand-mark svg.lucide {
  width: 21px;
  height: 21px;
  stroke-width: 2;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-text strong {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.brand-text small {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #7d8798;
}

.sidebar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  margin-bottom: 8px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #687386;
}

.sidebar-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: #1c2532;
  color: #95a2b4;
  font-size: 8px;
  letter-spacing: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 26px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #98a3b4;
  font-size: 10.5px;
  font-weight: 600;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav-item svg.lucide {
  width: 14px;
  height: 14px;
}

.nav-item:hover {
  background: #151b25;
  color: #e6ebf2;
}

.nav-item.active {
  background: rgba(163, 230, 53, 0.09);
  border-color: rgba(163, 230, 53, 0.18);
  color: var(--green);
}

.sidebar-matches {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  margin-bottom: 16px;
  padding-right: 2px;
  overflow-y: auto;
}

.side-match {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-left: 2px solid transparent;
  border-radius: 0 7px 7px 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.side-match:hover {
  background: #141a23;
  border-left-color: #3a4557;
}

.side-match.active {
  background: rgba(163, 230, 53, 0.06);
  border-left-color: var(--green);
}

.side-opp {
  font-size: 10px;
  font-weight: 600;
  color: #c4ccd7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-match.active .side-opp {
  color: var(--green);
}

.side-meta {
  font-size: 8.5px;
  color: #6f7b8d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-empty {
  padding: 6px 12px;
  font-size: 9px;
  color: #6f7b8d;
}

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.sidebar-user strong {
  font-size: 10.5px;
  font-weight: 600;
}

.sidebar-staff-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid #29313d;
  border-radius: 9px;
  background: #1b2431;
  color: #9aa5b5;
  flex-shrink: 0;
}

.sidebar-staff-icon svg.lucide {
  width: 15px;
  height: 15px;
}

.sidebar-foot > strong {
  font-size: 10.5px;
  font-weight: 600;
  color: #cbd4e0;
}

/* ------------------------------------------------------------
   Topbar
   ------------------------------------------------------------ */
.topbar-team {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.topbar-team strong {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.topbar-team span {
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: #758092;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.season-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #8b95a5;
}

.season-pill i {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(163, 230, 53, 0.12);
}

.topbar-bell {
  width: 17px;
  height: 17px;
  color: #8993a3;
}

/* ------------------------------------------------------------
   Avatars
   ------------------------------------------------------------ */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #202a38;
  color: #c6d0dd;
  font-weight: 700;
  flex-shrink: 0;
}

.avatar-sm {
  width: 30px;
  height: 30px;
  font-size: 9px;
}

.avatar-xs {
  width: 30px;
  height: 30px;
  font-size: 9.5px;
}

/* ------------------------------------------------------------
   Boutons & badges
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #29313d;
  border-radius: 8px;
  background: #121720;
  color: #c0c7d2;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn svg.lucide {
  width: 14px;
  height: 14px;
}

.btn:hover {
  background: #171e29;
  border-color: #374151;
  color: #fff;
}

.btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--green-dark);
  font-weight: 700;
}

.btn-primary:hover {
  background: #b6ef52;
  border-color: #b6ef52;
  color: var(--green-dark);
}

.btn-soft {
  background: rgba(163, 230, 53, 0.09);
  border-color: rgba(163, 230, 53, 0.28);
  color: var(--green);
}

.btn-soft:hover {
  background: rgba(163, 230, 53, 0.16);
  border-color: rgba(163, 230, 53, 0.45);
  color: #d3ff85;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: #9aa5b5;
}

.btn-ghost:hover {
  background: #141a23;
  border-color: #29313d;
  color: #fff;
}

.btn-danger-ghost {
  background: transparent;
  border-color: transparent;
  color: #9aa5b5;
}

.btn-danger-ghost:hover {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.25);
  color: #fca5a5;
}

.btn-sm {
  min-height: 30px;
  padding: 0 10px;
  font-size: 9.5px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: progress;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #778396;
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-btn svg.lucide {
  width: 14px;
  height: 14px;
}

.icon-btn:hover {
  background: #1a2230;
  color: #fff;
}

.icon-btn.danger:hover {
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-good {
  background: rgba(163, 230, 53, 0.12);
  color: var(--green);
}

.badge-neutral {
  background: #28303d;
  color: #a8b1bf;
}

.badge-bad {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

/* ------------------------------------------------------------
   En-tête de page
   ------------------------------------------------------------ */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}

.eyebrow > span {
  width: 20px;
  height: 1px;
  background: var(--green);
}

.page-head h1 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.page-head p {
  margin-top: 6px;
  font-size: 11px;
  color: #8490a1;
}

.page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------
   Panneaux
   ------------------------------------------------------------ */
.panel {
  background: linear-gradient(150deg, rgba(19, 24, 34, 0.98), rgba(14, 18, 26, 0.98));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 14px;
}

.panel-head-wrap {
  flex-wrap: wrap;
}

.panel-head h2 {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.panel-head p {
  margin-top: 4px;
  font-size: 9.5px;
  color: #7e899a;
}

.panel-more {
  width: 18px;
  height: 18px;
  color: #778396;
}

.panel-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 22px;
  border-top: 1px solid #242c38;
  font-size: 8.5px;
  color: #758193;
}

.legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 8.5px;
  color: #93a0b2;
  white-space: nowrap;
}

.legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--green);
}

.legend i.blue {
  background: var(--blue);
}

.empty-text {
  padding: 12px 0;
  font-size: 10px;
  color: #778396;
}

.empty-text.dashed {
  margin-top: 6px;
  padding: 22px 12px;
  text-align: center;
  border: 1px dashed #2a3340;
  border-radius: 8px;
}

.muted {
  color: #6f7b8d !important;
}

/* ------------------------------------------------------------
   KPI (tableau de bord)
   ------------------------------------------------------------ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.kpi {
  position: relative;
  padding: 17px 19px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, #131923, #0f141c);
  overflow: hidden;
}

.kpi::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(163, 230, 53, 0.35), transparent);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kpi-label {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #8792a3;
}

.kpi-top svg.lucide {
  width: 15px;
  height: 15px;
  color: #9ba5b4;
}

.kpi-value-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
}

.kpi-value {
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.kpi-delta {
  margin-bottom: 3px;
  font-size: 9px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kpi-delta.up {
  color: var(--green);
}

.kpi-delta.down {
  color: var(--amber);
}

.kpi-delta.flat {
  color: #8b95a5;
  font-weight: 600;
}

.kpi-foot {
  margin-top: 5px;
  font-size: 8px;
  color: #697587;
}

.skeleton {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(100deg, #11151d 30%, #171d27 50%, #11151d 70%);
  background-size: 220% 100%;
  animation: shimmer 1.6s linear infinite;
}

@keyframes shimmer {
  from {
    background-position: 130% 0;
  }
  to {
    background-position: -80% 0;
  }
}

/* ------------------------------------------------------------
   Dashboard : grille, chart, résultats
   ------------------------------------------------------------ */
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  margin-bottom: 22px;
}

.dashboard-tops {
  margin-bottom: 22px;
}

.dashboard-tops .tops-grid {
  margin-bottom: 0;
}

.chart {
  height: 250px;
  padding: 0 10px;
}

.chart-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.chart-bar {
  transition: filter 0.15s ease;
  cursor: default;
}

.chart-bar:hover {
  filter: brightness(1.18);
}

.empty-chart {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 10px;
  color: #778396;
}

.matches-list {
  padding: 0 14px 10px;
}

.match-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 10px;
  border-radius: 9px;
  transition: background 0.15s ease;
}

.match-item + .match-item {
  border-top: 1px solid rgba(37, 45, 57, 0.75);
}

.match-item:hover {
  background: rgba(163, 230, 53, 0.04);
}

.match-item:hover .match-open {
  color: var(--green);
}

.match-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.match-date {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #748093;
}

.match-opponent {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-comp {
  font-size: 8.5px;
  color: #778396;
}

.match-scorers {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  font-size: 8.5px;
  color: var(--green);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
}

.ball-dot {
  width: 5px;
  height: 5px;
  border-radius: 99px;
  background: var(--green);
  flex-shrink: 0;
}

.match-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

.match-score {
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.match-open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 8px;
  font-weight: 600;
  color: #6f7b8d;
  transition: color 0.15s ease;
}

.match-open svg.lucide {
  width: 11px;
  height: 11px;
}

/* ------------------------------------------------------------
   Tableaux
   ------------------------------------------------------------ */
.table-wrap {
  overflow-x: auto;
}

.stat-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.stat-table th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #0e131b;
  color: #7f899a;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: right;
  white-space: nowrap;
}

.stat-table th.col-left,
.stat-table td.col-left {
  text-align: left;
}

.stat-table th.col-right,
.stat-table td.col-right {
  text-align: right;
}

.stat-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(34, 41, 54, 0.62);
  font-size: 11.5px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.stat-table tbody tr:last-child td {
  border-bottom: 0;
}

.stat-table tbody tr {
  transition: background 0.15s ease;
}

.stat-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.022);
}

.stat-table tfoot td {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #0d1219;
  font-size: 10px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.stat-table tfoot td.col-left {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #7f899a;
}

.stat-table .num {
  font-variant-numeric: tabular-nums;
}

.stat-table .strong {
  font-weight: 700;
  color: #fff;
}

.stat-table .decisive {
  color: var(--green);
}

.stat-table .lost {
  color: var(--amber);
}

.empty-cell {
  padding: 34px 16px !important;
  text-align: center !important;
  color: #778396 !important;
  font-size: 10px !important;
}

/* Roster */
.roster-table {
  width: 100%;
  min-width: 820px;
  table-layout: fixed;
}

.roster-table .col-player {
  width: 16%;
}

.roster-table .col-position {
  width: 9%;
}

.roster-table .col-matches {
  width: 6%;
}

.roster-table .col-touched,
.roster-table .col-decisive,
.roster-table .col-lost {
  width: 16%;
}

.roster-table .col-share {
  width: 12%;
}

.roster-table .col-actions {
  width: 9%;
}

.roster-table th {
  padding: 10px 8px;
  font-size: 8px;
}

.roster-table td {
  padding: 8px;
  font-size: 10.5px;
}

.roster-table tfoot td {
  padding: 9px 8px;
  font-size: 9px;
}

.roster-table .player-tag {
  gap: 0;
}

.roster-table .player-tag .avatar,
.roster-table .cell-bar {
  display: none;
}

.player-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.player-id {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.player-id strong {
  font-size: 10.5px;
  font-weight: 600;
  color: #e8ecf2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-id small {
  font-size: 8.5px;
  color: #778396;
}

.n-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #1c2532;
  border: 1px solid #2b3543;
  color: #cbd4e0;
  font-size: 9px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.pos-chip {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 5px;
  background: #202834;
  color: #aeb8c7;
  font-size: 8.5px;
}

.cell-bar {
  display: block;
  height: 2px;
  min-width: 44px;
  margin-top: 5px;
  border-radius: 99px;
  background: #1c2431;
  overflow: hidden;
}

.cell-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--green);
  opacity: 0.75;
}

.share-pill {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: #1b2330;
  color: #bac4d2;
  font-size: 8.5px;
  font-weight: 600;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

/* ------------------------------------------------------------
   Feuille de terrain
   ------------------------------------------------------------ */
.match-root {
  display: flex;
  flex-direction: column;
}

.match-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.toolbar-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.sheet-hero {
  position: relative;
  overflow: hidden;
  padding: 22px 26px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(120% 150% at 4% -20%, rgba(163, 230, 53, 0.09), transparent 55%),
    linear-gradient(155deg, #141b26 0%, #0d1118 55%, #0b0f16 100%);
}

.sheet-hero::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -110px;
  width: 340px;
  height: 340px;
  transform: translateY(-50%);
  border: 1px solid rgba(163, 230, 53, 0.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(163, 230, 53, 0.04),
    0 0 90px rgba(163, 230, 53, 0.035) inset;
  pointer-events: none;
}

.sheet-hero::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 60px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(163, 230, 53, 0.12), transparent);
  pointer-events: none;
}

.hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
}

.hero-eyebrow > span {
  width: 18px;
  height: 1px;
  background: var(--green);
}

.hero-meta {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b95a5;
}

.score-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  margin: 24px 0 22px;
}

.team {
  min-width: 0;
}

.team-home {
  text-align: right;
}

.team-away {
  text-align: left;
}

.team-tag {
  display: block;
  margin-bottom: 5px;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6f7b8d;
}

.team h1 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-home h1 {
  color: #fff;
}

.team-away h1 {
  color: #e8ecf2;
}

.team-home h1::after,
.team-away h1::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 10px 2px;
  border-radius: 2px;
  background: var(--green);
  opacity: 0.75;
}

.score-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.score {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hero-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid #29313d;
  border-radius: 9px;
  background: #0a0e15;
}

.seg {
  padding: 7px 15px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #93a0b2;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.15s ease, color 0.15s ease;
}

.seg:hover {
  color: #e6ebf2;
}

.seg.active {
  background: var(--green);
  color: var(--green-dark);
  font-weight: 800;
}

.period-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: #8b95a5;
}

.period-note svg.lucide {
  width: 13px;
  height: 13px;
  color: #6f7b8d;
}

/* Bandeau de stats du match */
.sheet-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 16px 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, #121821, #0e131b);
  overflow: hidden;
}

.sheet-kpi {
  position: relative;
  padding: 15px 20px;
  border-right: 1px solid var(--line);
}

.sheet-kpi:last-child {
  border-right: 0;
}

.sheet-kpi::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--accent);
  opacity: 0.55;
}

.sheet-kpi-label {
  display: block;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8792a3;
}

.sheet-kpi strong {
  display: block;
  margin-top: 7px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.sheet-kpi small {
  display: block;
  margin-top: 4px;
  font-size: 8px;
  color: #6f7b8d;
}

.accent-green {
  --accent: #a3e635;
}
.accent-lime {
  --accent: #bef264;
}
.accent-amber {
  --accent: #e0b36a;
}
.accent-blue {
  --accent: #7dd3fc;
}

/* Tableaux de la feuille */
.sheet-panel {
  margin-bottom: 18px;
  overflow: hidden;
}

.sheet-table {
  width: 100%;
  min-width: 700px;
  table-layout: fixed;
}

.sheet-table .col-number {
  width: 42px;
}

.sheet-table .col-player {
  width: 150px;
}

.sheet-table th {
  padding: 8px 5px;
  font-size: 7.5px;
}

.sheet-table thead .group-row th {
  padding: 8px 5px;
  background: #0d1219;
  border-bottom: 1px solid var(--line);
  color: #cfd7e2;
  font-size: 7.5px;
  letter-spacing: 0.1em;
}

.sheet-table thead .group-row th.group-lost {
  color: var(--amber);
}

.sheet-table thead .group-row th.group-decisive {
  color: var(--green);
}

.sheet-table th.col-active {
  background: #16201a;
  color: var(--green);
  box-shadow: inset 0 -2px 0 rgba(163, 230, 53, 0.65);
}

.sheet-table td {
  padding: 7px 5px;
  font-size: 10.5px;
}

.sheet-table tfoot td {
  padding: 8px 5px;
  font-size: 9px;
}

.sheet-table tfoot td.col-left {
  font-size: 8px;
}

.sheet-table td.col-active {
  background: rgba(163, 230, 53, 0.035);
}

.sheet-table tbody tr:hover td.col-active {
  background: rgba(163, 230, 53, 0.06);
}

.sheet-table .player-tag {
  gap: 0;
}

.sheet-table .player-tag .avatar {
  display: none;
}

.sheet-table .player-id strong {
  font-size: 10px;
}

.sheet-table .player-id small {
  font-size: 7px;
}

.sheet-table .mini-bar,
.sheet-table .cell-bar {
  display: none;
}

.touched-table {
  min-width: 600px;
}

.number-cell {
  width: auto;
  padding-right: 4px !important;
}

.number-cell .n-chip {
  transition: border-color 0.15s ease, color 0.15s ease;
}

.number-cell:hover .n-chip {
  border-color: rgba(163, 230, 53, 0.45);
  color: var(--green);
}

.number-cell.is-editing {
  padding: 4px !important;
}

.number-cell .cell-input {
  width: 32px;
  padding: 3px 2px;
  font-size: 10px;
}

.n-chip.empty {
  color: #5f6b7c;
  border-style: dashed;
}

.stat-cell {
  position: relative;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.stat-cell:hover {
  background: rgba(163, 230, 53, 0.09) !important;
  color: var(--green);
}

.stat-cell .stat-value {
  border-bottom: 1px dashed transparent;
}

.stat-cell:hover .stat-value {
  border-bottom-color: rgba(163, 230, 53, 0.5);
}

.stat-cell.is-editing {
  padding: 5px 8px;
  background: #0b1017 !important;
}

.cell-input {
  width: 62px;
  padding: 4px 6px;
  border: 1px solid var(--green);
  border-radius: 4px;
  background: #0b1017;
  color: #fff;
  font-size: 11.5px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  outline: none;
  box-shadow: 0 0 0 3px rgba(163, 230, 53, 0.12);
}

.cell-total {
  font-weight: 700;
  color: #fff;
}

.cell-total.is-lost {
  color: var(--amber);
}

.cell-total.is-decisive {
  color: var(--green);
}

.cell-total.is-touched {
  color: #fff;
}

.total-value {
  display: block;
}

.mini-bar {
  display: block;
  width: 54px;
  height: 2px;
  margin: 4px 0 0 auto;
  border-radius: 99px;
  background: #1e2633;
  overflow: hidden;
}

.mini-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: currentColor;
  opacity: 0.65;
}

.share-cell {
  color: #b9c3d1;
}

.share-cell .cell-bar {
  margin-left: auto;
  width: 48px;
  min-width: 0;
}

.row-flash {
  animation: rowFlash 1.5s ease;
}

@keyframes rowFlash {
  0% {
    background: rgba(163, 230, 53, 0.16);
  }
  100% {
    background: transparent;
  }
}

/* Tops */
.tops-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.top-card {
  padding: 16px 16px 10px;
  --accent: var(--green);
}

.top-decisive {
  --accent: #a3e635;
}

.top-lost {
  --accent: #e0b36a;
}

.top-touched {
  --accent: #7dd3fc;
}

.top-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.top-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 600;
  color: #e8ecf2;
}

.top-title svg.lucide {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.top-badge {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(163, 230, 53, 0.12);
  color: var(--accent);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.top-lost .top-badge {
  background: rgba(224, 179, 106, 0.13);
}

.top-touched .top-badge {
  background: rgba(125, 211, 252, 0.13);
}

.top-sub {
  margin: 4px 0 10px;
  font-size: 8px;
  color: #778396;
}

.top-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.top-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
  width: 100%;
  padding: 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  text-align: left;
  transition: background 0.14s ease;
}

.top-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.top-rank {
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 4px;
  background: #1b2330;
  color: #8792a3;
  font-size: 8px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.top-rank.first {
  background: var(--accent);
  color: #10150a;
}

.top-name {
  font-size: 9.5px;
  font-weight: 600;
  color: #dfe5ee;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-value {
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.top-share {
  grid-column: 3;
  font-size: 7.5px;
  color: #6f7b8d;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.top-bar {
  grid-column: 2;
  height: 3px;
  border-radius: 99px;
  background: #1e2633;
  overflow: hidden;
}

.top-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
  opacity: 0.8;
}

/* Événements */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.events-panel {
  padding: 16px 18px 12px;
}

.events-panel .panel-head {
  padding: 0 0 8px;
}

.events-list {
  display: flex;
  flex-direction: column;
}

.event-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 0;
}

.event-row + .event-row {
  border-top: 1px solid rgba(34, 41, 54, 0.6);
}

.minute {
  min-width: 32px;
  padding: 4px 5px;
  border-radius: 5px;
  background: #1b2330;
  color: #cbd4e0;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.minute.goal {
  background: rgba(163, 230, 53, 0.12);
  color: var(--green);
}

.event-players {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10px;
}

.event-in,
.event-out {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-in {
  color: #dff5b8;
}

.event-out {
  color: #d99a9a;
}

.event-in svg.lucide,
.event-out svg.lucide {
  width: 11px;
  height: 11px;
}

.event-ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(163, 230, 53, 0.1);
  color: var(--green);
  flex-shrink: 0;
}

.event-ball svg.lucide {
  width: 11px;
  height: 11px;
}

.event-scorer {
  font-size: 10.5px;
  font-weight: 600;
  color: #e8ecf2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-num {
  font-size: 8px;
  color: #778396;
}

.card-swatch {
  display: inline-block;
  width: 12px;
  height: 16px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: #fbbf24;
  flex-shrink: 0;
}

.card-swatch.red {
  background: #ef4444;
}

.event-delete {
  opacity: 0.3;
  flex-shrink: 0;
}

.event-row:hover .event-delete {
  opacity: 1;
}

/* États de chargement / vide */
.loading-panel,
.empty-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 72px 24px;
  text-align: center;
}

.loading-panel p,
.empty-panel p {
  font-size: 10.5px;
  color: #8792a3;
}

.empty-panel svg.lucide {
  width: 30px;
  height: 30px;
  color: #4b5668;
}

.empty-panel h2 {
  font-size: 15px;
  font-weight: 600;
}

.empty-panel .btn {
  margin-top: 6px;
}

.loader {
  width: 22px;
  height: 22px;
  border: 2px solid #2a3340;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.panel-flash {
  animation: panelFlash 1.5s ease;
}

@keyframes panelFlash {
  0% {
    box-shadow: 0 0 0 2px rgba(163, 230, 53, 0.4);
  }
  100% {
    box-shadow: 0 0 0 2px rgba(163, 230, 53, 0);
  }
}

/* ------------------------------------------------------------
   Alertes
   ------------------------------------------------------------ */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px 14px;
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 9px;
  background: rgba(248, 113, 113, 0.07);
  color: #fca5a5;
  font-size: 10.5px;
}

.alert > span {
  flex: 1;
}

.alert svg.lucide {
  width: 15px;
  height: 15px;
}

/* ------------------------------------------------------------
   Modales
   ------------------------------------------------------------ */
body.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 5, 9, 0.76);
  backdrop-filter: blur(6px);
}

.modal.is-open {
  display: flex;
  animation: fadeIn 0.14s ease;
}

.modal-box {
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid #303a49;
  border-radius: 16px;
  background: #111722;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
  animation: popIn 0.16s ease;
}

.modal-box.modal-wide {
  max-width: 640px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.modal-head h3 {
  font-size: 14.5px;
  font-weight: 600;
}

.modal-sub {
  margin-top: 3px;
  font-size: 9px;
  color: #778396;
}

.field-label {
  display: block;
  margin: 14px 0 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ba6b6;
}

.field {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #303a49;
  border-radius: 8px;
  background: #0b1017;
  color: #fff;
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field::placeholder {
  color: #596577;
}

.field:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(163, 230, 53, 0.12);
}

select.field {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #8792a3 50%),
    linear-gradient(135deg, #8792a3 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
  cursor: pointer;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}

.modal-actions .btn {
  flex: 1;
  min-height: 38px;
}

.modal-hint {
  margin-top: 13px;
  font-size: 9px;
  line-height: 1.5;
  color: #778396;
}

/* ------------------------------------------------------------
   Sélection des joueurs convoqués
   ------------------------------------------------------------ */
.squad-picker {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #29313d;
  border-radius: 10px;
  background: #0d1219;
}

.squad-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.squad-picker .field-label {
  margin: 0;
}

.squad-picker-hint {
  margin-top: 3px;
  font-size: 8.5px;
  line-height: 1.45;
  color: #6f7b8d;
}

.picker-tools {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.mini-btn {
  padding: 4px 8px;
  border: 1px solid #2f3a49;
  border-radius: 5px;
  background: #151c26;
  color: #aab4c2;
  font-size: 8.5px;
  font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.mini-btn:hover {
  border-color: rgba(163, 230, 53, 0.4);
  color: var(--green);
}

.picker-count {
  margin-left: 3px;
  padding: 4px 8px;
  border-radius: 5px;
  background: rgba(163, 230, 53, 0.1);
  color: var(--green);
  font-size: 8.5px;
  font-weight: 700;
  white-space: nowrap;
}

.squad-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  max-height: 232px;
  margin-top: 12px;
  padding-right: 3px;
  overflow-y: auto;
}

.squad-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #242c38;
  border-radius: 7px;
  background: #111720;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.squad-option:hover {
  border-color: #3a4658;
  background: #151c26;
}

.squad-option:has(input:checked) {
  border-color: rgba(163, 230, 53, 0.3);
  background: rgba(163, 230, 53, 0.055);
}

.squad-option input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--green);
  flex-shrink: 0;
}

.squad-option-name {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 9.5px;
  font-weight: 600;
  color: #dfe5ee;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.squad-option-name small {
  font-size: 7.5px;
  font-weight: 400;
  color: #7d8898;
}

.squad-number-input {
  width: 52px;
  height: 29px;
  padding: 0 4px;
  border: 1px solid #303a49;
  border-radius: 5px;
  background: #0b1017;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
  outline: none;
  flex-shrink: 0;
  appearance: textfield;
  -moz-appearance: textfield;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.squad-number-input::-webkit-inner-spin-button,
.squad-number-input::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}

.squad-number-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(163, 230, 53, 0.12);
}

.squad-number-input:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.squad-number-input.is-invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}

.squad-number-input::placeholder {
  color: #596577;
}

/* Gestion des joueurs d'un match */
.manage-summary {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 14px 0 2px;
  font-size: 10px;
  color: #8792a3;
}

.manage-summary strong {
  font-size: 23px;
  font-weight: 600;
  line-height: 1;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.manage-section {
  margin-top: 16px;
}

.manage-section .field-label {
  margin: 0 0 8px;
}

.manage-hint {
  margin: -2px 0 8px;
  font-size: 8.5px;
  color: #6f7b8d;
}

.squad-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.squad-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 5px;
  border: 1px solid #29313d;
  border-radius: 6px;
  background: #131a23;
  font-size: 9px;
  color: #cbd4e0;
}

.squad-chip-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 3px;
  border-radius: 4px;
  background: rgba(163, 230, 53, 0.12);
  color: var(--green);
  font-size: 8px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.squad-add-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 230px;
  padding: 4px;
  border: 1px solid #242c38;
  border-radius: 8px;
  background: #0d1219;
  overflow-y: auto;
}

.squad-add-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #dfe5ee;
  text-align: left;
  transition: background 0.14s ease;
}

.squad-add-row:hover {
  background: rgba(163, 230, 53, 0.07);
}

.squad-add-name {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 10px;
  font-weight: 600;
}

.squad-add-name small {
  font-size: 8px;
  font-weight: 400;
  color: #778396;
}

.squad-add-row > .svg,
.squad-add-row .icon-btn {
  flex-shrink: 0;
}

.squad-add-row .add-match-btn {
  color: var(--green);
}

.squad-add-row .add-match-btn:hover {
  background: rgba(163, 230, 53, 0.1);
  color: var(--green);
}

.squad-count {
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  height: 34px;
  border: 1px solid #2a3340;
  border-radius: 8px;
  background: #0d121a;
  color: #9aa5b5;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
}

/* ------------------------------------------------------------
   Toolbar du tableau de bord
   ------------------------------------------------------------ */
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search {
  position: relative;
}

.search svg.lucide {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 13px;
  height: 13px;
  transform: translateY(-50%);
  color: #718095;
  pointer-events: none;
}

.search input {
  width: 200px;
  height: 34px;
  padding: 0 12px 0 31px;
  border: 1px solid #2a3340;
  border-radius: 8px;
  background: #0d121a;
  color: #fff;
  font-size: 10px;
  outline: none;
  transition: border-color 0.15s ease;
}

.search input::placeholder {
  color: #657184;
}

.search input:focus {
  border-color: rgba(163, 230, 53, 0.5);
}

.select {
  height: 34px;
  padding: 0 30px 0 11px;
  border: 1px solid #2a3340;
  border-radius: 8px;
  background-color: #0d121a;
  color: #bac3cf;
  font-size: 10px;
  outline: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #8792a3 50%),
    linear-gradient(135deg, #8792a3 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* ------------------------------------------------------------
   Toast & pied de page
   ------------------------------------------------------------ */
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  max-width: min(360px, calc(100vw - 32px));
  padding: 11px 16px;
  border: 1px solid #29313d;
  border-radius: 9px;
  background: #131923;
  color: #e8ecf2;
  font-size: 10.5px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.ok {
  border-color: rgba(163, 230, 53, 0.4);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(163, 230, 53, 0.08) inset;
}

.toast.error {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.toast.warn {
  border-color: rgba(224, 179, 106, 0.45);
  color: #f3d9ac;
}

.page-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 22px 0 0;
  font-size: 8.5px;
  color: #596577;
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 1180px) {
  .dash-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .chart {
    height: 235px;
  }
}

@media (max-width: 1024px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: column;
    padding: 14px 16px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .brand {
    margin-bottom: 12px;
  }

  .sidebar-label,
  .sidebar-season,
  .sidebar-foot {
    display: none;
  }

  .sidebar-nav {
    flex-direction: row;
    gap: 6px;
    margin-bottom: 0;
    overflow-x: auto;
  }

  .nav-item {
    width: auto;
    white-space: nowrap;
  }

  .sidebar-matches {
    display: none;
  }

  .main {
    margin-left: 0;
  }

  .topbar {
    display: none;
  }

  .page {
    padding: 24px 20px 32px;
  }

  .tops-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tops-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .events-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sheet-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sheet-kpi:nth-child(2) {
    border-right: 0;
  }

  .sheet-kpi:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .score {
    font-size: 36px;
  }

  .team h1 {
    font-size: 16px;
  }
}

@media (max-width: 620px) {
  .page {
    padding: 18px 14px 28px;
  }

  .page-head h1 {
    font-size: 25px;
  }

  .page-head {
    align-items: flex-start;
  }

  .page-actions {
    width: 100%;
  }

  .page-actions .btn {
    flex: 1;
  }

  .kpi-grid,
  .sheet-kpis {
    grid-template-columns: minmax(0, 1fr);
  }

  .sheet-kpi {
    border-right: 0;
  }

  .sheet-kpi + .sheet-kpi {
    border-top: 1px solid var(--line);
  }

  .sheet-hero {
    padding: 18px 16px 14px;
  }

  .score-row {
    gap: 12px;
    margin: 20px 0 18px;
  }

  .team h1 {
    font-size: 12.5px;
    overflow-wrap: anywhere;
  }

  .team-home h1::after,
  .team-away h1::before {
    display: none;
  }

  .score {
    font-size: 28px;
  }

  .score-box {
    padding: 6px 10px;
  }

  .segmented {
    width: 100%;
  }

  .seg {
    flex: 1;
    padding: 8px 6px;
    font-size: 9px;
  }

  .period-note {
    width: 100%;
  }

  .panel-head {
    padding: 16px 16px 12px;
  }

  .panel-foot {
    padding: 10px 16px;
  }

  .matches-list {
    padding: 0 8px 8px;
  }

  .match-scorers {
    max-width: 150px;
  }

  .search input {
    width: 150px;
  }

  .modal-box {
    padding: 18px;
  }

  .squad-list {
    grid-template-columns: minmax(0, 1fr);
    max-height: 210px;
  }

  .match-toolbar .toolbar-actions {
    width: 100%;
  }

  .field-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .event-row {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
