/*
 * IMPORTANT: Thème sombre - NE PAS MODIFIER ces variables de couleur
 * Le site utilise un thème sombre (fond bleu-gris foncé, texte clair)
 * Toute modification doit conserver ce thème sombre.
 */
:root {
  --primary: #8dd7e3;
  --secondary: #11141f;
  --tertiary: #c78779;
  --background: #0d1117;
  --background-soft: #161b22;
  --text: #f0f6fc;
  --muted: #8b949e;
  --card: rgba(22, 27, 34, 0.95);
  --card-border: rgba(141, 215, 227, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Montserrat", sans-serif;
  background: linear-gradient(180deg, var(--background) 0%, var(--background-soft) 40%, #1a2332 100%);
  color: var(--text);
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: rgba(13, 17, 23, 0.9);
  border-bottom: 1px solid rgba(141, 215, 227, 0.15);
  z-index: 10;
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
}

.logo-image {
  width: 40px;
  height: 40px;
  max-width: 48px;
  max-height: 48px;
  border-radius: 12px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 18px;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.nav-actions a {
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.nav-actions .ghost {
  color: var(--text);
  border: 1px solid rgba(141, 215, 227, 0.3);
}

.nav-actions .primary {
  background: var(--secondary);
  color: var(--primary);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  border: 1px solid rgba(141, 215, 227, 0.3);
  background: transparent;
  color: var(--text);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.nav-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: var(--background-soft);
  border-radius: 16px;
  padding: 8px;
  min-width: 180px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.nav-dropdown-menu a:hover {
  background: rgba(141, 215, 227, 0.2);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin-bottom: 48px;
}

.hero-content h1 {
  font-size: 40px;
  color: var(--text);
  margin-bottom: 12px;
}

.hero-content .subtitle {
  color: var(--muted);
  max-width: 560px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.tag {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--tertiary);
  margin-bottom: 16px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--background-soft);
  border: 1px solid rgba(141, 215, 227, 0.2);
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  margin-bottom: 18px;
}

.search-bar input {
  border: none;
  flex: 1;
  font-size: 15px;
  outline: none;
  background: transparent;
  color: var(--text);
}

.search-bar input::placeholder {
  color: var(--muted);
}

.search-btn {
  background: var(--secondary);
  color: var(--primary);
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.search-container {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--background-soft);
  border: 1px solid rgba(141, 215, 227, 0.2);
  border-radius: 12px;
  margin-top: 8px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.search-results-content {
  padding: 8px 0;
}

.search-section {
  padding: 0 8px;
}

.search-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 12px 4px;
  letter-spacing: 0.5px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s ease;
}

.search-result-item:hover {
  background: rgba(141, 215, 227, 0.1);
}

.search-result-logo,
.search-result-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(141, 215, 227, 0.3);
  flex-shrink: 0;
}

.search-result-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.search-result-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-no-results {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.hero-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.badge {
  background: rgba(141, 215, 227, 0.2);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.hero-panel {
  background: radial-gradient(circle at top, rgba(141, 215, 227, 0.35), rgba(17, 20, 31, 0.9));
  border-radius: 24px;
  padding: 24px;
  color: #fff;
  box-shadow: 0 30px 60px rgba(17, 20, 31, 0.25);
}

.hero-panel-inner h2 {
  margin-bottom: 16px;
  font-size: 20px;
}

.auth-toggle {
  display: inline-flex;
  gap: 8px;
  background: rgba(17, 20, 31, 0.08);
  padding: 6px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.auth-toggle-btn {
  border: none;
  background: transparent;
  color: var(--secondary);
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
}

.auth-toggle-btn.is-active {
  background: var(--secondary);
  color: var(--primary);
}

.auth-card {
  display: none;
}

.auth-card.is-visible {
  display: block;
}

.profile-cover {
  margin-bottom: 32px;
  border-radius: 24px;
  padding: 28px;
  background-image: linear-gradient(135deg, rgba(17, 20, 31, 0.95), rgba(17, 20, 31, 0.6)),
    var(--profile-cover-image, none);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.profile-cover-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.back-btn {
  align-self: flex-start;
}

.profile-header {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
}

.profile-avatar-card {
  width: 160px;
  height: 160px;
  border-radius: 24px;
  overflow: hidden;
  border: 2px solid rgba(141, 215, 227, 0.4);
  background: rgba(17, 20, 31, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info {
  flex: 1;
  min-width: 260px;
  color: #fff;
}

.profile-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.profile-code {
  font-size: 16px;
  font-weight: 600;
  color: rgba(246, 247, 251, 0.7);
}

.profile-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--secondary);
  font-weight: 600;
}

.profile-badges span {
  background: rgba(246, 247, 251, 0.15);
  padding: 6px 12px;
  border-radius: 999px;
}

/* Container pour les badges de rôles */
.profile-role-badges {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* Styles communs pour tous les badges de rôles */
.role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  text-align: center;
}

.captain-badge {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%) !important;
  color: #000 !important;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.graphiste-badge {
  background: #e67467 !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(230, 116, 103, 0.3);
}

.casteur-badge {
  background: #9b59b6 !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
}

.fondateur-badge {
  background: #53baff !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(83, 186, 255, 0.3);
}

.coach-badge {
  background: #77c9ff !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(119, 201, 255, 0.3);
}

.profile-highlight {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.profile-highlight div {
  background: rgba(246, 247, 251, 0.12);
  padding: 12px 16px;
  border-radius: 16px;
}

.profile-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 32px;
}

.profile-card .card-header {
  margin-bottom: 16px;
}

.profile-details {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-details li {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-details a {
  color: var(--primary);
  font-weight: 600;
  word-break: break-all;
}

.profile-details .muted {
  color: rgba(17, 20, 31, 0.6);
}

.profile-panel .rank-display {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.profile-panel .rank-display img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.lp-trend {
  margin-bottom: 32px;
}

.lp-chart {
  position: relative;
  height: 200px;
  background: linear-gradient(180deg, rgba(141, 215, 227, 0.15), transparent);
  border-radius: 18px;
  margin-top: 18px;
  overflow: hidden;
}

.lp-chart-line {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 60%, rgba(141, 215, 227, 0.6), transparent 40%),
    radial-gradient(circle at 40% 35%, rgba(141, 215, 227, 0.6), transparent 45%),
    radial-gradient(circle at 75% 40%, rgba(141, 215, 227, 0.6), transparent 45%),
    linear-gradient(90deg, rgba(141, 215, 227, 0.35), rgba(199, 135, 121, 0.35));
  opacity: 0.6;
}

.lp-chart-points {
  position: absolute;
  inset: 0;
}

.lp-point {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(141, 215, 227, 0.2);
}

.lp-chart-tooltip {
  position: absolute;
  right: 16px;
  top: 16px;
  background: rgba(17, 20, 31, 0.85);
  color: #fff;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
}

.lp-chart-rank-line {
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 1;
  stroke-dasharray: 4 6;
}

.lp-chart-rank-icon {
  opacity: 0.9;
}

.lp-chart-dot.is-current {
  filter: drop-shadow(0 0 6px rgba(141, 215, 227, 0.7));
}

.soloq-history {
  margin-bottom: 32px;
}

.soloq-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.soloq-card {
  background: rgba(17, 20, 31, 0.88);
  border: 1px solid rgba(141, 215, 227, 0.2);
  border-radius: 20px;
  padding: 18px;
  color: #f6f7fb;
}

.soloq-summary {
  display: grid;
  grid-template-columns: 1.2fr 0.6fr 1.4fr 1fr;
  gap: 16px;
  align-items: center;
}

.soloq-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: rgba(246, 247, 251, 0.7);
}

.soloq-lp {
  font-weight: 600;
}

.soloq-result {
  font-weight: 700;
  font-size: 16px;
}

.soloq-result.is-win {
  color: var(--primary);
}

.soloq-result.is-loss {
  color: var(--tertiary);
}

.soloq-stats {
  display: flex;
  gap: 20px;
  font-size: 13px;
}

.soloq-stats strong {
  display: block;
  font-size: 15px;
}

.soloq-icons {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: rgba(246, 247, 251, 0.6);
}

.soloq-details {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  background: rgba(15, 17, 26, 0.6);
  border-radius: 16px;
  padding: 16px;
  color: rgba(246, 247, 251, 0.85);
}

.detail-block h4 {
  font-size: 14px;
  margin-bottom: 10px;
}

.detail-block ul {
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.pagination-btn {
  border: none;
  background: rgba(17, 20, 31, 0.12);
  color: var(--secondary);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
}

.pagination-btn.is-active {
  background: var(--secondary);
  color: var(--primary);
}

.hero-panel-inner ul {
  list-style: none;
  display: grid;
  gap: 12px;
}

.hero-panel-inner .label {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.grid-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.player-list-hero {
  margin-bottom: 24px;
}

.player-listing {
  padding-bottom: 48px;
}

.player-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.player-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
  flex: 1 1 220px;
}

.filter-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.9);
}

.filter-select,
.filter-search input {
  border: 1px solid rgba(141, 215, 227, 0.3);
  background: rgba(9, 12, 23, 0.85);
  color: #fff;
  padding: 10px 14px;
  border-radius: 14px;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
}

.filter-select option {
  color: #0f111a;
}

.filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-search input {
  flex: 1;
}

.filter-search input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.filter-clear {
  border: none;
  background: rgba(141, 215, 227, 0.2);
  color: #fff;
  padding: 10px 16px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
}

.player-count {
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 18px;
}

.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.card.player-card {
  padding: 16px;
  border-radius: 18px;
}

.player-card {
  text-decoration: none;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.player-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(17, 20, 31, 0.28);
}

.player-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(141, 215, 227, 0.2);
}

.player-summoner {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

.player-summary {
  display: grid;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
}

.player-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.player-summary-item .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.player-avatar-small {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  object-fit: cover;
}

.player-elo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.player-rank-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.player-lp {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(141, 215, 227, 0.2);
}

.player-champion-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(141, 215, 227, 0.2);
}

.player-team {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-team-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.player-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.player-empty {
  text-align: center;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 24px;
  color: #fff;
  box-shadow: 0 18px 40px rgba(17, 20, 31, 0.18);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(141, 215, 227, 0.25);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  text-align: left;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  padding-bottom: 10px;
}

.data-table td {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.role-pill {
  background: rgba(199, 135, 121, 0.2);
  color: #fff;
  border-radius: 10px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
}

.team-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(141, 215, 227, 0.25);
  font-weight: 700;
}

.rank-pill {
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(141, 215, 227, 0.2);
  font-size: 11px;
  font-weight: 700;
}

.matches .data-table td {
  vertical-align: middle;
}

.match-btn {
  background: var(--primary);
  color: var(--secondary);
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.site-footer {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 960px) {
  .nav {
    flex-direction: column;
  }

  .nav-links {
    flex-wrap: wrap;
  }

  .logo-image {
    width: 32px;
    height: 32px;
    max-width: 36px;
    max-height: 36px;
  }

  .hero {
    grid-template-columns: 1fr;
  }
}

.admin-hero {
  margin-bottom: 32px;
}

.auth-hero {
  margin-bottom: 32px;
}

.auth-wrapper {
  display: grid;
  gap: 24px;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.auth-card .form-actions {
  justify-content: flex-end;
}

.auth-message {
  border-radius: 16px;
  padding: 16px;
  font-size: 14px;
}

.auth-message.error {
  background: rgba(199, 135, 121, 0.2);
  border: 1px solid rgba(199, 135, 121, 0.4);
  color: var(--secondary);
}

.auth-message.success {
  background: rgba(141, 215, 227, 0.2);
  border: 1px solid rgba(141, 215, 227, 0.4);
  color: var(--secondary);
}

.admin-selector {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.admin-choice {
  border: 1px solid rgba(17, 20, 31, 0.15);
  background: #fff;
  color: var(--secondary);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-choice.is-active {
  background: var(--secondary);
  color: var(--primary);
  border-color: var(--secondary);
  box-shadow: 0 12px 24px rgba(17, 20, 31, 0.15);
}

.admin-forms {
  display: grid;
  gap: 24px;
}

.admin-form {
  display: none;
}

.admin-form.is-visible {
  display: block;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-alert {
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(141, 215, 227, 0.2);
  border: 1px solid rgba(141, 215, 227, 0.45);
  color: #d7f4f7;
  font-size: 13px;
  margin-bottom: 16px;
}

.form-alert.is-error {
  background: rgba(255, 110, 110, 0.15);
  border-color: rgba(255, 110, 110, 0.45);
  color: rgba(255, 255, 255, 0.85);
}

.form-grid label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.password-field {
  gap: 10px;
}

.password-input {
  display: flex;
  gap: 8px;
  align-items: center;
}

.password-input input {
  flex: 1;
}

.password-toggle {
  min-width: 98px;
  border-radius: 999px;
  border: 1px solid rgba(141, 215, 227, 0.45);
  background: rgba(141, 215, 227, 0.15);
  color: #fff;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.password-toggle:hover {
  border-color: rgba(141, 215, 227, 0.9);
  background: rgba(141, 215, 227, 0.3);
  transform: translateY(-1px);
}

.password-toggle[aria-pressed="true"] {
  background: rgba(141, 215, 227, 0.45);
  color: var(--secondary);
}

.password-strength {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.password-strength-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.password-strength[data-level="weak"] .password-strength-bar {
  width: 35%;
  background: rgba(255, 110, 110, 0.85);
}

.password-strength[data-level="medium"] .password-strength-bar {
  width: 70%;
  background: #f5c542;
}

.password-strength[data-level="strong"] .password-strength-bar {
  width: 100%;
  background: rgba(141, 215, 227, 0.9);
}

.form-grid input,
.form-grid select {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 12px;
  background: rgba(17, 20, 31, 0.6);
  color: #fff;
}

.form-grid input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.form-helper {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.logo-picker {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}

.logo-option {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 8px;
  display: grid;
  gap: 6px;
  align-content: start;
  background: rgba(17, 20, 31, 0.55);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.logo-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.logo-thumb {
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.logo-option input:checked + .logo-thumb {
  border: 1px solid rgba(141, 215, 227, 0.8);
  box-shadow: 0 8px 18px rgba(141, 215, 227, 0.2);
}

.logo-thumb img {
  width: 100%;
  height: 48px;
  object-fit: contain;
  max-width: 72px;
}

.logo-picker-empty {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.ghost-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

/* =========================================
   Planning Styles
   ========================================= */

.planning-hero {
  margin-bottom: 32px;
}

.planning-hero-content {
  max-width: 800px;
}

.planning-hero-content h1 {
  font-size: 32px;
  color: var(--text);
  margin-bottom: 12px;
}

.planning-hero-content .subtitle {
  color: var(--muted);
  line-height: 1.6;
}

.team-header-info {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.team-planning-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(17, 20, 31, 0.08);
}

.planning-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.planning-week-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.planning-week-tabs {
  display: flex;
  gap: 4px;
  align-items: center;
  background: rgba(17, 20, 31, 0.08);
  border-radius: 999px;
  padding: 4px;
}

.week-tab {
  background: transparent;
  border: none;
  color: var(--secondary);
  padding: 10px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.week-tab:hover {
  background: rgba(17, 20, 31, 0.08);
}

.week-tab.active {
  background: var(--secondary);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(17, 20, 31, 0.2);
}

.week-info {
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
  margin-left: 12px;
  display: none;
}

.planning-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.planning-btn {
  background: var(--secondary);
  color: var(--primary);
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.planning-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(17, 20, 31, 0.2);
}

.planning-btn.secondary {
  background: transparent;
  border: 1px solid rgba(17, 20, 31, 0.2);
  color: var(--secondary);
}

.planning-status {
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  display: none;
}

.planning-status.pending {
  background: rgba(255, 193, 7, 0.2);
  color: #856404;
}

.planning-status.saving {
  background: rgba(141, 215, 227, 0.2);
  color: #0c5460;
}

.planning-status.success {
  background: rgba(40, 167, 69, 0.2);
  color: #155724;
}

.planning-status.error {
  background: rgba(220, 53, 69, 0.2);
  color: #721c24;
}

.planning-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.team-legend {
  padding: 12px 16px;
  background: rgba(17, 20, 31, 0.05);
  border-radius: 12px;
}

.legend-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  margin-right: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.legend-color.available {
  background: #28a745;
}

.legend-color.unavailable {
  background: #dc3545;
}

.planning-wrapper {
  overflow-x: auto;
  padding-bottom: 16px;
}

.planning-grid {
  display: grid;
  grid-template-columns: 80px repeat(7, minmax(100px, 1fr));
  gap: 1px;
  background: rgba(17, 20, 31, 0.1);
  border-radius: 16px;
  overflow: hidden;
  min-width: 800px;
}

.planning-cell {
  background: var(--background-soft);
  padding: 8px;
  font-size: 12px;
  text-align: center;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.planning-header-corner {
  background: var(--secondary);
}

.planning-header-day {
  background: var(--secondary);
  color: var(--primary);
  font-weight: 600;
  padding: 12px 8px;
  font-size: 13px;
}

.planning-time-label {
  background: var(--secondary);
  color: var(--primary);
  font-weight: 500;
  font-size: 11px;
  justify-content: flex-end;
  padding-right: 12px;
}

.planning-slot {
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
  user-select: none;
}

.planning-slot:hover {
  transform: scale(1.05);
  z-index: 1;
}

.planning-slot.available {
  background: #28a745;
}

.planning-slot.unavailable {
  background: #dc3545;
}

/* Team planning specific styles */
.team-planning-grid .planning-slot {
  cursor: default;
}

.team-planning-grid .planning-slot:hover {
  transform: none;
}

.team-slot {
  position: relative;
}

.team-slot .avail-count {
  font-weight: 700;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.team-slot.avail-none {
  background: #dc3545;
}

.team-slot.avail-low {
  background: #fd7e14;
}

.team-slot.avail-medium {
  background: #ffc107;
}

.team-slot.avail-medium .avail-count {
  color: rgba(0, 0, 0, 0.7);
  text-shadow: none;
}

.team-slot.avail-high {
  background: #20c997;
}

.team-slot.avail-all {
  background: #28a745;
}

/* Team members section */
.team-members-section {
  margin-bottom: 32px;
}

.team-members-section h2 {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 16px;
}

.team-members-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.team-member-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(141, 215, 227, 0.08);
  padding: 10px 14px;
  border-radius: 12px;
}

.team-member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(141, 215, 227, 0.2);
}

.team-member-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.team-member-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}

.captain-star {
  color: #ffc107;
  margin-left: 4px;
}

.team-member-role {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Events section */
.team-events-section {
  margin-bottom: 32px;
}

.team-events-section .card-header {
  margin-bottom: 20px;
}

.event-form-container {
  background: rgba(141, 215, 227, 0.06);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.event-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.event-form .form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.event-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  flex: 1;
  min-width: 150px;
}

.event-form label.full-width {
  flex: 100%;
}

.event-form input,
.event-form select,
.event-form textarea {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 12px;
  background: rgba(17, 20, 31, 0.6);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
}

.event-form input::placeholder,
.event-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.event-form textarea {
  resize: vertical;
  min-height: 60px;
}

.event-form .form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

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

.no-events {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  text-align: center;
  padding: 24px;
}

.event-item {
  display: flex;
  gap: 12px;
  background: rgba(141, 215, 227, 0.06);
  border-radius: 12px;
  overflow: hidden;
}

.event-color-bar {
  width: 6px;
  flex-shrink: 0;
}

.event-info {
  flex: 1;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.event-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.event-type-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.event-type-name {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}

.event-title {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.event-datetime {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.event-notes {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.event-opgg {
  margin-top: 6px;
}

.event-opgg a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 4px 10px;
  background: rgba(141, 215, 227, 0.15);
  border-radius: 999px;
  transition: background 0.2s ease;
}

.event-opgg a:hover {
  background: rgba(141, 215, 227, 0.3);
}

.event-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
}

.event-edit-btn,
.event-delete-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.event-edit-btn:hover {
  background: rgba(141, 215, 227, 0.2);
  border-color: rgba(141, 215, 227, 0.4);
  color: #fff;
}

.event-delete-btn:hover {
  background: rgba(220, 53, 69, 0.2);
  border-color: rgba(220, 53, 69, 0.4);
  color: #fff;
}

/* Planning global */
.global-planning-grid .planning-slot {
  padding: 2px;
  min-height: 50px;
  max-height: 80px;
  cursor: default;
  vertical-align: top;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2px;
  overflow: hidden;
}

.global-planning-grid .planning-slot.has-events {
  background: rgba(17, 20, 31, 0.03);
}

.global-event {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding: 3px 4px;
  background: rgba(141, 215, 227, 0.12);
  border-radius: 6px;
  border-left: 2px solid;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.global-event-icons {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  align-items: center;
  flex-shrink: 0;
}

.global-event-icons img {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  min-height: 18px;
  max-width: 18px;
  max-height: 18px;
  border-radius: 3px;
  object-fit: contain;
  flex-shrink: 0;
}

.global-event-icons .badge-icon {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px;
  min-height: 14px;
  max-width: 14px;
  max-height: 14px;
  opacity: 0.9;
}

.global-event-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 9px;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.event-team-code {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.event-time {
  color: var(--muted);
  font-size: 8px;
}

.event-badge-actions {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--background-soft);
  padding: 4px;
  gap: 4px;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  z-index: 10;
}

.global-event:hover .event-badge-actions {
  display: flex;
}

.badge-toggle-btn {
  background: rgba(17, 20, 31, 0.1);
  border: 1px solid rgba(17, 20, 31, 0.2);
  border-radius: 4px;
  padding: 3px;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.2s ease;
}

.badge-toggle-btn img {
  width: 14px;
  height: 14px;
  display: block;
}

.badge-toggle-btn:hover {
  opacity: 0.8;
  background: rgba(141, 215, 227, 0.2);
}

.badge-toggle-btn.active {
  opacity: 1;
  background: rgba(141, 215, 227, 0.3);
  border-color: var(--primary);
}

/* Match interne dans planning global */
.global-event.internal-match {
  background: rgba(141, 215, 227, 0.1);
}

.vs-mini {
  font-size: 7px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.opponent-icon {
  opacity: 0.9;
}

/* Planning navigation et contrôles */
.planning-navigation {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.week-selector {
  display: flex;
  gap: 4px;
  align-items: center;
  background: rgba(141, 215, 227, 0.08);
  border-radius: 999px;
  padding: 4px;
}

.week-btn {
  background: transparent;
  border: none;
  color: var(--secondary);
  padding: 10px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.week-btn:hover {
  background: rgba(141, 215, 227, 0.15);
}

.week-btn.active {
  background: var(--secondary);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(141, 215, 227, 0.3);
}

.display-toggle {
  display: flex;
  align-items: center;
}

.planning-note {
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
  margin-top: 8px;
  text-align: right;
  width: 100%;
}

/* Masquage des créneaux avant 16h */
.hidden-slot {
  display: none !important;
}

.visible-slot {
  display: flex !important;
}

/* Événements castés sur la HP */
.casted-events-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.casted-event-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(141, 215, 227, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(141, 215, 227, 0.1);
}

.casted-event-team {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.casted-team-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
}

.casted-event-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.casted-team-name {
  font-weight: 600;
  color: var(--secondary);
  font-size: 14px;
}

.casted-event-type {
  font-size: 12px;
  color: var(--muted);
}

.casted-event-datetime {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 80px;
}

.casted-date {
  font-size: 12px;
  color: var(--muted);
}

.casted-time {
  font-size: 16px;
  font-weight: 700;
  color: var(--secondary);
}

.casted-twitch-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #9146FF;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s ease;
}

.casted-twitch-link:hover {
  background: #7c3aed;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(145, 70, 255, 0.3);
}

.casted-twitch-link .twitch-icon {
  width: 18px;
  height: 18px;
}

.no-casted-events {
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.no-casted-events p {
  margin: 0 0 8px 0;
}

.no-casted-events .muted {
  font-size: 13px;
}

.no-casted-events a {
  color: var(--primary);
}

/* Matchs à venir sur la HP */
.upcoming-matches-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.match-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(141, 215, 227, 0.06);
  border-radius: 12px;
  border: 1px solid rgba(141, 215, 227, 0.15);
  transition: all 0.2s ease;
}

.match-item:hover {
  background: rgba(141, 215, 227, 0.1);
  border-color: rgba(141, 215, 227, 0.3);
}

.match-item.is-casted {
  background: rgba(145, 70, 255, 0.05);
  border-color: rgba(145, 70, 255, 0.15);
}

.match-teams {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.match-team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 100px;
}

.match-team-home {
  justify-content: flex-end;
}

.match-team-away {
  justify-content: flex-start;
}

.match-team-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
}

.match-team-logo.opponent-logo {
  background: rgba(220, 53, 69, 0.1);
  padding: 4px;
}

.match-team-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.match-team-name.external-opponent {
  color: var(--muted);
  font-style: italic;
}

.match-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
}

.match-event-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
}

.vs-text {
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
}

.match-details {
  display: flex;
  align-items: center;
  gap: 12px;
}

.match-datetime {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 80px;
}

.match-date {
  font-size: 11px;
  color: var(--muted);
}

.match-time {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.match-twitch-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #9146FF;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.2s ease;
}

.match-twitch-link:hover {
  background: #7c3aed;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(145, 70, 255, 0.3);
}

.match-twitch-link .twitch-icon {
  width: 16px;
  height: 16px;
}

.no-matches {
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.no-matches p {
  margin: 0 0 8px 0;
}

.no-matches .muted {
  font-size: 13px;
}

.no-matches a {
  color: var(--primary);
}

/* Responsive planning */
@media (max-width: 768px) {
  .planning-grid {
    grid-template-columns: 60px repeat(7, minmax(60px, 1fr));
  }

  .planning-header-day {
    font-size: 10px;
    padding: 8px 4px;
  }

  .team-members-grid {
    flex-direction: column;
  }

  .team-member-card {
    width: 100%;
  }

  .event-form .form-row {
    flex-direction: column;
  }

  .event-form label {
    min-width: auto;
  }

  .event-actions {
    flex-direction: column;
  }
}