/* ==========================================================================
   YOMOTSU HIRASAKA — INTERFACE STRUCTURE ESPORT (DESIGN SOBRE, MAT & HUMAIN)
   Police : Inter + JetBrains Mono
   Palette : Ardoise-prune mat (#131118 / #191620), bordures 1px neutres,
             accents discrets issus de la DA (Sakura #e69bb5, Saule #b5cb67, Ambre #df986c)
   ========================================================================== */

:root {
  color-scheme: dark;
  forced-color-adjust: none;
  --bg-canvas: #131118;
  --bg-surface: #191620;
  --bg-raised: #211d2a;
  --bg-hover: #282334;
  --bg-input: #14111a;

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --border-accent: rgba(230, 155, 181, 0.42);

  --text-primary: #f3eff6;
  --text-secondary: #c5bdd0;
  --text-muted: #8a8098;

  --sakura: #e69bb5;
  --sakura-hover: #efb0c6;
  --sakura-ink: #17121d;

  --moon: #d4c4ec;
  --sunset: #df986c;
  --sunset-soft: rgba(223, 152, 108, 0.15);

  --willow: #b5cb67;
  --willow-soft: rgba(181, 203, 103, 0.16);

  --bud-crimson: #cf5c74;
  --bud-soft: rgba(207, 92, 116, 0.15);

  --radius-xs: 5px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-pill: 6px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  min-height: var(--app-height, 100vh);
  min-height: 100dvh;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  touch-action: manipulation;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

a {
  color: var(--sakura);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.ui-icon {
  flex-shrink: 0;
  vertical-align: middle;
}
.lol-icon {
  object-fit: contain;
  display: inline-block;
  filter: saturate(0.92) brightness(1.05);
}

.app-root {
  min-height: 100vh;
  min-height: var(--app-height, 100vh);
  min-height: 100dvh;
}

/* Boot */
.boot-screen {
  min-height: 100vh;
  min-height: var(--app-height, 100vh);
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 66% 28%, rgba(212, 196, 236, 0.14), transparent 42%),
    radial-gradient(circle at 46% 88%, rgba(223, 152, 108, 0.12), transparent 48%),
    #131019;
}
.boot-crescent {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: inset -7px -2px 0 0 rgba(230, 155, 181, 0.85);
  animation: bootPulse 1.6s ease-in-out infinite alternate;
}
@keyframes bootPulse {
  from { opacity: 0.45; transform: scale(0.94) rotate(-12deg); }
  to { opacity: 1; transform: scale(1.04) rotate(-4deg); }
}

/* ==========================================================================
   AUTH SCREEN CINÉMATIQUE : GIF 16:9 50FPS PLEIN ÉCRAN & CRISTAL CRÉPUSCULAIRE
   Chorégraphie soignée des 10 premières secondes (0ms poster -> 50fps GIF)
   ========================================================================== */
@property --auth-orbit {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.auth-stage {
  --parallax-x: 0px;
  --parallax-y: 0px;
  position: relative;
  min-height: 100vh;
  min-height: var(--app-height, 100vh);
  min-height: 100dvh;
  width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
}

.auth-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-color: #161120;
  pointer-events: none;
}

.auth-backdrop-canvas {
  position: absolute;
  top: -24px;
  right: -24px;
  bottom: -24px;
  left: -24px;
  inset: -24px;
  background: url("/assets/yomotsu-bg-poster.webp") 52% 40% / cover no-repeat;
  transform: translate3d(var(--parallax-x), var(--parallax-y), 0) scale(1.03);
  will-change: transform;
  animation:
    authRevealScene 2.6s cubic-bezier(0.16, 1, 0.3, 1) forwards,
    authAmbientBreath 12s 2.6s ease-in-out infinite alternate;
}

.auth-backdrop-gif {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 40%;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}
.auth-backdrop-gif::-webkit-media-controls,
.auth-backdrop-gif::-webkit-media-controls-enclosure,
.auth-backdrop-gif::-webkit-media-controls-panel,
.auth-backdrop-gif::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}
.auth-backdrop-gif.is-loaded {
  opacity: 1;
}

@keyframes authRevealScene {
  0% {
    filter: brightness(0.62) saturate(1.12);
    transform: translate3d(0, 8px, 0) scale(1.085);
  }
  100% {
    filter: brightness(1) saturate(1.04);
    transform: translate3d(var(--parallax-x), var(--parallax-y), 0) scale(1.03);
  }
}

@keyframes authAmbientBreath {
  0% {
    transform: translate3d(var(--parallax-x), var(--parallax-y), 0) scale(1.03);
  }
  100% {
    transform: translate3d(var(--parallax-x), var(--parallax-y), 0) scale(1.058);
  }
}

.auth-moon-bloom {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 67% 27%,
    rgba(232, 218, 250, 0.22) 0%,
    rgba(230, 155, 181, 0.08) 22%,
    transparent 50%
  );
  mix-blend-mode: screen;
  animation: authBloomPulse 6.5s ease-in-out infinite alternate;
}

.auth-horizon-bloom {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 68% 42% at 46% 96%,
    rgba(223, 152, 108, 0.2) 0%,
    rgba(207, 92, 116, 0.08) 38%,
    transparent 72%
  );
  mix-blend-mode: screen;
  animation: authBloomPulse 8.5s 1.2s ease-in-out infinite alternate;
}

@keyframes authBloomPulse {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

/* Vignette optique calibrée : laisse le centre (sakura + croissant de lune) 100 % lumineux */
.auth-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      105deg,
      rgba(14, 11, 22, 0.62) 0%,
      rgba(14, 11, 22, 0.14) 38%,
      rgba(14, 11, 22, 0.12) 56%,
      rgba(14, 11, 22, 0.68) 100%
    ),
    linear-gradient(
      180deg,
      rgba(15, 12, 23, 0.34) 0%,
      transparent 28%,
      transparent 64%,
      rgba(13, 10, 20, 0.76) 100%
    );
  transition: opacity 0.45s ease;
}

.auth-stage.is-zen .auth-vignette {
  opacity: 0.18;
}

/* Barre supérieure discrète */
.auth-topbar {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: calc(18px + var(--safe-top)) clamp(18px, 4vw, 48px) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  opacity: 0;
  animation: authFadeDown 0.75s 0.12s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes authFadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-region-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(18, 14, 27, 0.56);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(243, 239, 246, 0.9);
  transition: opacity 0.38s ease, transform 0.38s ease;
}

.auth-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--willow);
  box-shadow: 0 0 10px rgba(181, 203, 103, 0.85);
  animation: authDotPulse 2.4s ease-in-out infinite;
}

@keyframes authDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.78); opacity: 0.55; }
}

.auth-zen-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(18, 14, 27, 0.58);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(243, 239, 246, 0.88);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.auth-zen-btn:hover {
  background: rgba(30, 24, 44, 0.78);
  border-color: rgba(230, 155, 181, 0.48);
  transform: translateY(-1px);
}

/* Avant-plan asymétrique */
.auth-foreground {
  position: relative;
  z-index: 2;
  flex: 1;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 20px clamp(18px, 4vw, 48px) calc(28px + var(--safe-bottom));
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1), transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-stage.is-zen .auth-foreground,
.auth-stage.is-zen .auth-region-pill {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

/* Signature éditoriale en bas à gauche (dégage la branche sakura et la lune) */
.auth-hero-showcase {
  align-self: end;
  padding-bottom: clamp(8px, 3vh, 34px);
  max-width: 540px;
}

.auth-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  opacity: 0;
  animation: authFadeUp 0.7s 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.auth-eyebrow-line {
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--sakura), var(--sunset));
  animation: authDrawLine 0.85s 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes authDrawLine {
  from { width: 0; }
  to { width: 42px; }
}

.auth-eyebrow-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: rgba(246, 220, 232, 0.88);
}

.auth-hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(44px, 5vw, 72px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-shadow: 0 10px 34px rgba(10, 7, 16, 0.65);
}

.auth-hero-title-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 6px;
}

.auth-hero-title-inner {
  display: inline-block;
  background: linear-gradient(
    115deg,
    #ffffff 0%,
    #f9e4ed 36%,
    #e2d3f4 68%,
    #ffffff 100%
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transform: translateY(108%);
  animation:
    authTitleRise 0.95s 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards,
    authTitleShimmer 8s 1.2s ease-in-out infinite;
}

@keyframes authTitleRise {
  from { transform: translateY(108%); opacity: 0.2; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes authTitleShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.auth-hero-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 16px;
  max-width: 260px;
  opacity: 0;
  animation: authFadeUp 0.75s 0.46s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.auth-divider-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(230, 155, 181, 0.52), rgba(255, 255, 255, 0.05));
}
.auth-divider-star {
  font-size: 11px;
  color: #f3d7e4;
  animation: authStarTwinkle 3.6s ease-in-out infinite alternate;
}
@keyframes authStarTwinkle {
  from { opacity: 0.55; transform: scale(0.88) rotate(0deg); }
  to { opacity: 1; transform: scale(1.14) rotate(18deg); }
}

.auth-pillars-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-pillar-chip {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(18, 14, 27, 0.54);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: rgba(243, 239, 246, 0.9);
  font-size: 12px;
  font-weight: 500;
  opacity: 0;
  animation: authFadeUp 0.65s calc(0.55s + var(--p-idx, 0) * 0.11s) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes authFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Panneau de connexion en cristal fumé avec liseré orbital lunaire */
.auth-card-zone {
  display: flex;
  justify-content: flex-end;
}

.auth-crystal-card {
  --card-mx: 50%;
  --card-my: 0%;
  position: relative;
  width: min(415px, calc(100vw - 32px));
  padding: 26px 26px 24px;
  border-radius: 16px;
  background:
    radial-gradient(
      340px circle at var(--card-mx) var(--card-my),
      rgba(230, 155, 181, 0.11),
      transparent 70%
    ),
    linear-gradient(
      165deg,
      rgba(24, 19, 34, 0.74) 0%,
      rgba(16, 13, 24, 0.86) 100%
    );
  backdrop-filter: blur(22px) saturate(155%);
  -webkit-backdrop-filter: blur(22px) saturate(155%);
  box-shadow:
    0 24px 64px rgba(6, 4, 12, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: width 0.36s cubic-bezier(0.22, 1, 0.36, 1);
  animation: authCardEnter 0.85s 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.auth-crystal-card.is-register {
  width: min(510px, calc(100vw - 32px));
}

.auth-form-section {
  display: grid;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 10px;
  background: rgba(11, 8, 18, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.auth-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f3d7e4;
}

.auth-section-step {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: rgba(230, 155, 181, 0.2);
  border: 1px solid rgba(230, 155, 181, 0.42);
  color: #f9e6ee;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* Liseré lumineux rotatif 1px (9 secondes par orbite) */
.auth-crystal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--auth-orbit),
    rgba(255, 255, 255, 0.08) 0deg,
    rgba(230, 155, 181, 0.62) 72deg,
    rgba(212, 196, 236, 0.52) 140deg,
    rgba(255, 255, 255, 0.07) 215deg,
    rgba(223, 152, 108, 0.42) 295deg,
    rgba(255, 255, 255, 0.08) 360deg
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: authOrbitSpin 9s linear infinite;
}

@keyframes authOrbitSpin {
  to { --auth-orbit: 360deg; }
}

@keyframes authCardEnter {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.auth-card-crest {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(230, 155, 181, 0.28);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.auth-emblem-svg {
  animation: authEmblemFloat 5s ease-in-out infinite alternate;
}
@keyframes authEmblemFloat {
  from { transform: translateY(-1px) rotate(-3deg); }
  to { transform: translateY(1.5px) rotate(4deg); }
}

.auth-card-title {
  margin: 0;
  font-size: 18.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f8f4fb;
}

.auth-card-sub {
  margin: 3px 0 0;
  font-size: 12.5px;
  line-height: 1.42;
  color: rgba(214, 205, 226, 0.82);
}

/* Sélecteur d'onglets à curseur glissant */
.auth-segmented {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  background: rgba(11, 8, 17, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin-bottom: 18px;
}

.auth-seg-glider {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 7px;
  background: linear-gradient(
    135deg,
    rgba(230, 155, 181, 0.24) 0%,
    rgba(212, 196, 236, 0.16) 100%
  );
  border: 1px solid rgba(230, 155, 181, 0.36);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.auth-seg-tab {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  color: rgba(197, 189, 208, 0.78);
  font-weight: 500;
  font-size: 13px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: color 0.2s ease;
}
.auth-seg-tab:hover {
  color: #f6f1fa;
}
.auth-seg-tab.active {
  color: #ffffff;
  font-weight: 600;
}

/* Cascade d'apparition des champs */
.auth-stagger-item {
  opacity: 0;
  animation: authFieldCascade 0.48s calc(0.34s + var(--stagger, 0) * 0.055s) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.is-switching .auth-stagger-item {
  animation: authFieldCascade 0.36s calc(var(--stagger, 0) * 0.04s) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes authFieldCascade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-crystal-card .auth-input {
  background: rgba(12, 9, 19, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.auth-crystal-card .auth-input:hover {
  border-color: rgba(255, 255, 255, 0.24);
}
.auth-crystal-card .auth-input:focus {
  background: rgba(14, 11, 22, 0.82);
  border-color: var(--sakura);
  box-shadow: 0 0 0 3px rgba(230, 155, 181, 0.18);
}

.auth-pwd-toggle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 42px;
  min-height: 38px;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  border-radius: 0 8px 8px 0;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  touch-action: manipulation;
  transition: color 0.15s ease;
}
.auth-pwd-toggle:hover {
  color: var(--text-primary);
}

.auth-discord-help-btn {
  width: 100%;
  min-height: 36px;
  padding: 6px 11px;
  border-radius: 8px;
  background: rgba(12, 9, 19, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.auth-discord-help-btn:hover {
  background: rgba(22, 17, 33, 0.72);
  border-color: rgba(230, 155, 181, 0.34);
}

.auth-discord-help-panel {
  padding: 9px 11px;
  border-radius: 8px;
  background: rgba(12, 9, 19, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.11);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Bouton principal satiné avec reflet périodique */
.auth-cta-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(135deg, #f0b8cc 0%, #e69bb5 52%, #df986c 100%);
  color: #17111e;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(230, 155, 181, 0.26);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.auth-cta-btn::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -65%;
  width: 50%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.46),
    transparent
  );
  transform: skewX(-22deg);
  pointer-events: none;
  animation: authBtnSheen 5.5s 1.5s ease-in-out infinite;
}

@keyframes authBtnSheen {
  0%, 72%, 100% { left: -65%; }
  28% { left: 125%; }
}

.auth-cta-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 14px 30px rgba(230, 155, 181, 0.36);
}
.auth-cta-btn:hover:not(:disabled) .auth-cta-arrow {
  transform: translateX(3px);
}
.auth-cta-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.auth-cta-arrow {
  display: inline-flex;
  transition: transform 0.18s ease;
}

@media (max-width: 960px) {
  .auth-foreground {
    grid-template-columns: 1fr;
    justify-items: center;
    align-content: center;
    gap: 20px;
    padding-top: 12px;
  }
  .auth-hero-showcase {
    align-self: center;
    text-align: center;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .auth-backdrop-canvas,
  .auth-backdrop-gif {
    object-position: 56% 34%;
  }
  .auth-pillars-row {
    justify-content: center;
  }
  .auth-card-zone {
    width: 100%;
    justify-content: center;
  }
  .auth-crystal-card,
  .auth-crystal-card.is-register {
    width: min(460px, 100%);
    padding: 22px 18px 20px;
    background: linear-gradient(165deg, rgba(24, 19, 34, 0.92) 0%, rgba(15, 12, 23, 0.95) 100%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(230, 155, 181, 0.34);
  }
  .auth-crystal-card::before,
  .auth-moon-bloom,
  .auth-horizon-bloom {
    display: none;
  }
  .auth-region-pill,
  .auth-zen-btn,
  .auth-pillar-chip {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(18, 14, 27, 0.86);
  }
}

@media (max-width: 520px) {
  .auth-region-pill span:last-child {
    font-size: 10px;
  }
  .auth-zen-btn span[data-zen-label] {
    display: none;
  }
  .auth-hero-title {
    font-size: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-backdrop-canvas,
  .auth-hero-title-inner,
  .auth-crystal-card,
  .auth-crystal-card::before,
  .auth-stagger-item,
  .auth-pillar-chip,
  .auth-cta-btn::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ==========================================================================
   TOP BAR (DESKTOP) & BOTTOM BAR (MOBILE iOS / ANDROID)
   ========================================================================== */
.workspace-layout {
  min-height: 100vh;
  min-height: var(--app-height, 100vh);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.top-nav-shell {
  position: sticky;
  top: 0;
  z-index: 35;
  padding-top: var(--safe-top);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}
.top-nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  height: 52px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-switcher-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.brand-cluster {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  margin-left: -10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  user-select: none;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.brand-cluster:hover,
.brand-cluster.is-open {
  background: var(--bg-raised);
  border-color: var(--border-strong);
}
.brand-title {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  white-space: nowrap;
}
.brand-chevron {
  display: inline-flex;
  color: var(--text-muted);
  transform: rotate(90deg);
  transition: transform 0.16s ease, color 0.16s ease;
}
.brand-cluster.is-open .brand-chevron {
  transform: rotate(-90deg);
  color: var(--sakura);
}

/* Popup multi-jeux & sous-menu dynamique d'équipes */
.brand-structure-popup {
  position: absolute;
  top: calc(100% + 8px);
  left: -6px;
  z-index: 80;
  background: rgba(23, 20, 30, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.58);
  overflow: hidden;
  animation: brandPopIn 0.14s cubic-bezier(0.16, 1, 0.3, 1);
}
.brand-structure-popup[hidden] {
  display: none !important;
}
@keyframes brandPopIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.brand-popup-grid {
  display: flex;
  align-items: stretch;
  min-width: 256px;
}
.brand-popup-grid.has-submenu {
  min-width: 520px;
}

.brand-games-pane {
  width: 256px;
  flex-shrink: 0;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brand-pane-label {
  padding: 4px 8px 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.brand-game-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.brand-game-item:hover {
  background: rgba(255, 255, 255, 0.04);
}
.brand-game-item.active {
  background: rgba(230, 155, 181, 0.11);
  border-color: rgba(230, 155, 181, 0.36);
}

.brand-game-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.brand-game-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.brand-game-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.brand-game-sub {
  font-size: 11px;
  color: var(--text-muted);
}
.brand-game-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(230, 155, 181, 0.15);
  color: var(--sakura);
}
.brand-game-count.is-zero {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

/* Sous-menu dynamique de sélection d'équipe */
.brand-submenu-pane {
  width: 274px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  background: rgba(16, 14, 22, 0.65);
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}
.brand-submenu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.brand-submenu-count {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-muted);
}

.brand-teams-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
}
.brand-team-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.brand-team-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
}
.brand-team-item.is-current {
  background: rgba(230, 155, 181, 0.1);
  border-color: rgba(230, 155, 181, 0.34);
}
.brand-team-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.18);
}
.brand-team-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.brand-team-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.brand-team-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand-team-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  flex-shrink: 0;
}
.brand-team-tag.is-mine {
  background: rgba(45, 212, 122, 0.15);
  color: #6ee7b7;
}
.brand-team-tag.is-staff {
  background: rgba(212, 196, 236, 0.16);
  color: var(--moon);
}
.brand-team-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.brand-submenu-empty {
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
}
.brand-empty-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}
.brand-empty-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.brand-submenu-foot {
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.brand-manage-teams-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}
.brand-manage-teams-btn:hover {
  border-color: var(--sakura);
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .brand-structure-popup {
    position: fixed;
    top: calc(52px + var(--safe-top) + 6px);
    left: 10px;
    right: 10px;
  }
  .brand-popup-grid,
  .brand-popup-grid.has-submenu {
    flex-direction: column;
    min-width: 0;
    width: 100%;
  }
  .brand-games-pane,
  .brand-submenu-pane {
    width: 100%;
  }
  .brand-submenu-pane {
    border-left: none;
    border-top: 1px solid var(--border);
  }
}

.primary-nav-pills {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pnav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.pnav-btn:hover {
  color: var(--text-primary);
  background: var(--bg-raised);
}
.pnav-btn.active {
  background: var(--bg-raised);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.pnav-count {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
}

.user-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
}
.role-mode-switch {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  gap: 2px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
}
.role-mode-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease;
}
.role-mode-btn:hover {
  color: var(--text-primary);
}
.role-mode-btn.active.is-player {
  background: var(--willow-soft);
  color: #dff09e;
  box-shadow: inset 0 0 0 1px rgba(181, 203, 103, 0.45);
}
.role-mode-btn.active.is-staff {
  background: rgba(230, 155, 181, 0.18);
  color: var(--sakura);
  box-shadow: inset 0 0 0 1px rgba(230, 155, 181, 0.45);
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 5px;
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  cursor: pointer;
}
.user-chip:hover {
  border-color: var(--border-strong);
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 860px) {
  .top-nav-inner {
    padding: 0 12px;
    height: 48px;
    gap: 8px;
  }
  .brand-cluster {
    min-width: 0;
    flex: 1 1 auto;
  }
  .brand-title {
    font-size: 14.5px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .primary-nav-pills {
    display: none;
  }
  .user-cluster {
    gap: 6px;
    flex-shrink: 0;
  }
  .role-mode-btn {
    padding: 4px 7px;
    font-size: 11px;
  }
  .user-chip-text {
    display: none;
  }
  .user-chip {
    padding: 3px;
    border-radius: 50%;
  }
  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-strong);
    padding: 4px 6px calc(6px + var(--safe-bottom));
    transform: translateZ(0);
  }
  .mnav-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 4px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    min-height: 48px;
  }
  .mnav-btn.active {
    color: var(--text-primary);
    background: var(--bg-raised);
  }
}

.workspace-main {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 20px 56px;
}
@media (max-width: 860px) {
  .workspace-main {
    padding: 14px 12px calc(98px + var(--safe-bottom));
  }
}

/* ==========================================================================
   EN-TÊTES DE VUE SOBRES (ZÉRO BANNIÈRE IA, ZÉRO EYEBROW)
   ========================================================================== */
.view-toolbar,
.sakura-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  background: none;
  border-radius: 0;
  box-shadow: none;
}
.banner-eyebrow {
  display: none;
}
.page-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin: 2px 0 0;
}

.guide-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.guide-step-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}
.guide-step-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-raised);
}
.guide-step-num {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-xs);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.guide-step-num.done {
  background: var(--willow-soft);
  border-color: rgba(181, 203, 103, 0.45);
  color: var(--willow);
}

/* ==========================================================================
   CARTES, CHAMPS & BOUTONS MATS
   ========================================================================== */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}
@media (max-width: 640px) {
  .card {
    padding: 14px;
  }
}
.card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.form-grid {
  display: grid;
  gap: 12px;
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.field label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
}
.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.input,
.select,
.textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  color: var(--text-primary);
  font-size: 13.5px;
  min-height: 38px;
  width: 100%;
}
@media (max-width: 860px) {
  .input,
  .select,
  .textarea {
    font-size: 16px;
    min-height: 42px;
  }
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--sakura);
}
.select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}
.textarea {
  min-height: 76px;
  resize: vertical;
}

.color-swatch-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.color-swatch-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.1s ease, border-color 0.1s ease;
}
.color-swatch-btn:hover {
  transform: scale(1.07);
}
.color-swatch-btn.active {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 3px rgba(255, 255, 255, 0.55);
}
input[type="color"].color-native-input {
  -webkit-appearance: none;
  appearance: none;
  width: 34px;
  height: 34px;
  padding: 2px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  cursor: pointer;
}
input[type="color"].color-native-input::-webkit-color-swatch-wrapper {
  padding: 0;
}
input[type="color"].color-native-input::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 13px;
  min-height: 34px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--sakura);
  color: var(--sakura-ink);
  font-weight: 600;
}
.btn-primary:hover:not(:disabled) {
  background: var(--sakura-hover);
}
.btn-violet {
  background: #2c243d;
  border-color: rgba(212, 196, 236, 0.3);
  color: var(--moon);
}
.btn-violet:hover:not(:disabled) {
  background: #362c4b;
}
.btn-secondary {
  background: var(--bg-raised);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--bg-hover);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg-raised);
  color: var(--text-primary);
}
.btn-danger {
  background: transparent;
  border-color: rgba(207, 92, 116, 0.35);
  color: #eb8da0;
}
.btn-danger:hover:not(:disabled) {
  background: var(--bud-soft);
}
.btn-sm {
  padding: 5px 10px;
  min-height: 30px;
  font-size: 12.2px;
}
@media (max-width: 860px) {
  .btn-sm {
    min-height: 36px;
  }
}

/* Subtabs sobres (style onglets d'outil pro) */
.subtabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.subtabs::-webkit-scrollbar { display: none; }
.subtab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.subtab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}
.subtab-btn.active {
  background: var(--bg-raised);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

/* Avatars & Badges */
.avatar-circle {
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  object-fit: cover;
  display: grid;
  place-items: center;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.badge-superadmin { background: var(--sunset-soft); color: #f0b893; border: 1px solid rgba(223, 152, 108, 0.32); }
.badge-manager { background: rgba(230, 155, 181, 0.14); color: var(--sakura); border: 1px solid rgba(230, 155, 181, 0.32); }
.badge-coach { background: rgba(212, 196, 236, 0.13); color: var(--moon); border: 1px solid rgba(212, 196, 236, 0.28); }
.badge-player { background: var(--willow-soft); color: #d0e28b; border: 1px solid rgba(181, 203, 103, 0.32); }

.riot-tag-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.riot-tag-pill .tag-hash { color: var(--text-muted); }
.rank-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border);
}

/* ==========================================================================
   CALENDRIER : BARRE D'OUTILS STICKY + VUE MOBILE JOUR + GRILLE 7J
   ========================================================================== */
.calendar-dock {
  position: sticky;
  top: calc(52px + var(--safe-top));
  z-index: 20;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (max-width: 860px) {
  .calendar-dock {
    top: calc(48px + var(--safe-top));
  }
}
.week-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.week-nav-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.week-label-chip {
  font-weight: 600;
  font-size: 14px;
  padding: 2px 6px;
  color: var(--text-primary);
}
.independent-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  padding: 2px 6px;
}
.week-stepper,
.week-jump,
.week-extra-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.brush-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.brush-group {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}
.brush-group::-webkit-scrollbar { display: none; }
.brush-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  min-height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.brush-btn.active {
  background: var(--bg-raised);
  border-color: var(--sakura);
  color: var(--text-primary);
}
.brush-step {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  padding: 0 4px;
  line-height: 16px;
}
.brush-btn.active .brush-step {
  color: var(--sakura);
  background: rgba(230, 155, 181, 0.14);
}
.brush-shortcut-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}
.brush-shortcut-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
}
.brush-reset-cycle {
  border: 1px solid rgba(230, 155, 181, 0.35);
  background: rgba(230, 155, 181, 0.1);
  color: var(--sakura);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.brush-reset-cycle:hover {
  background: rgba(230, 155, 181, 0.18);
}
.swatch-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }

.hour-filter-pills {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}
.hour-filter-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.hour-filter-btn.active {
  background: var(--bg-raised);
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .independent-pill { display: none; }
  .week-bar { gap: 6px; }
  .week-nav-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .week-stepper {
    width: 100%;
    justify-content: space-between;
  }
  .week-jump {
    width: 100%;
    justify-content: space-between;
  }
  .week-extra-right {
    width: 100%;
  }
  .week-label-chip {
    font-size: 13px;
    text-align: center;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .brush-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .brush-group {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 4px;
    overflow: visible;
  }
  .brush-btn {
    justify-content: center;
    padding: 5px 4px;
    font-size: 11px;
    gap: 4px;
  }
  .brush-shortcut-bar {
    justify-content: center;
  }
  .brush-shortcut-hint {
    font-size: 11px;
    white-space: normal;
    text-align: center;
  }
  .hour-filter-pills {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .hour-filter-btn {
    text-align: center;
  }
}

/* Mobile Day-by-Day */
.mobile-day-view { display: none; }
.desktop-week-view { display: block; }
@media (max-width: 860px) {
  .mobile-day-view { display: block; }
  .desktop-week-view { display: none; }
}

.day-pills-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 10px;
}
.day-pill-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 7px 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  min-height: 50px;
}
.day-pill-btn .dp-name { font-size: 10.5px; font-weight: 600; text-transform: uppercase; }
.day-pill-btn .dp-num { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; }
.day-pill-btn .dp-dot { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.day-pill-btn.has-dispo .dp-dot { background: var(--willow); }
.day-pill-btn.active {
  background: var(--sakura);
  border-color: var(--sakura);
  color: var(--sakura-ink);
}
.day-pill-btn.active .dp-dot { background: var(--sakura-ink); }

.mobile-day-quick-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 8px;
}
.mobile-day-quick-bar .btn {
  padding: 5px 6px;
  font-size: 11px;
  white-space: nowrap;
  justify-content: center;
}

.mobile-slots-list { display: grid; gap: 4px; }
.mobile-slot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.mobile-slot-row.avail-available { background: var(--willow-soft); border-color: rgba(181, 203, 103, 0.42); }
.mobile-slot-row.avail-tentative { background: var(--sunset-soft); border-color: rgba(223, 152, 108, 0.42); }
.mobile-slot-row.avail-unavailable { background: var(--bud-soft); border-color: rgba(207, 92, 116, 0.36); }
.mobile-slot-row.heat-full { background: rgba(181, 203, 103, 0.24); border-color: rgba(181, 203, 103, 0.55); }
.mobile-slot-row.heat-high { background: rgba(181, 203, 103, 0.13); }
.mobile-slot-row.heat-mid { background: var(--sunset-soft); }
.mobile-slot-time { font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; color: var(--text-primary); }
.mobile-slot-time.prime { color: var(--sakura); }

/* Desktop 7-Day Table (Crisp 1px Grid like Pracc / Linear) */
.schedule-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  user-select: none;
}
.schedule-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  table-layout: fixed;
}
.schedule-table th,
.schedule-table td {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.schedule-table th:last-child,
.schedule-table td:last-child {
  border-right: none;
}
.schedule-table thead th {
  padding: 9px 6px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: var(--text-secondary);
  background: #16131d;
}
.schedule-table thead th.day-col-clickable { cursor: pointer; }
.schedule-table thead th.day-col-clickable:hover { background: var(--bg-raised); color: var(--text-primary); }
.schedule-table thead th.hour-col-header {
  width: 68px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
}
.hour-label-cell {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: right;
  padding: 4px 8px;
  width: 68px;
  background: #16131d;
}
.hour-label-cell.prime-hour {
  color: var(--text-primary);
  font-weight: 500;
}
.slot-cell {
  height: 32px;
  padding: 3px 6px;
  vertical-align: middle;
  cursor: pointer;
  background: transparent;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.slot-cell:hover {
  background: rgba(255, 255, 255, 0.04);
}
.slot-cell.avail-available { background: var(--willow-soft); }
.slot-cell.avail-tentative { background: var(--sunset-soft); }
.slot-cell.avail-unavailable { background: var(--bud-soft); }

.slot-inner { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: 11px; }
.slot-status-tag { font-size: 10.5px; font-weight: 500; }
.avail-available .slot-status-tag { color: #d4e692; }
.avail-tentative .slot-status-tag { color: #efc2a3; }
.avail-unavailable .slot-status-tag { color: #eba3b2; }

.heat-0 { background: transparent; }
.heat-low { background: rgba(207, 92, 116, 0.08); }
.heat-mid { background: rgba(223, 152, 108, 0.13); }
.heat-high { background: rgba(181, 203, 103, 0.15); }
.heat-full { background: rgba(181, 203, 103, 0.28); }
.heat-count { font-family: var(--font-mono); font-size: 10px; color: var(--text-secondary); }
.heat-full .heat-count { color: #e8f5b5; font-weight: 600; }

.event-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: #fff;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.event-chip.type-coaching { background: #5a4282; }
.event-chip.type-scrim { background: #8f3d58; }
.event-chip.type-official { background: #8f5838; }
.event-chip.type-training { background: #3f4b85; }
.event-chip.type-review { background: #556b32; }

/* ==========================================================================
   GRILLES ROSTER, KPI, POOL, RSVP, MODALES & TOASTS
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.kpi-label { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.kpi-value { font-family: var(--font-mono); font-size: 22px; font-weight: 600; margin: 4px 0 2px; }
.kpi-sub { font-size: 11.5px; color: var(--text-muted); }

.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.member-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.member-card-top { display: flex; align-items: center; gap: 10px; }

.player-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
  margin-bottom: 12px;
}
.player-strip::-webkit-scrollbar { display: none; }
.player-select-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  min-width: 195px;
  flex-shrink: 0;
  color: var(--text-primary);
  text-align: left;
}
.player-select-card.active {
  border-color: var(--sakura);
  background: var(--bg-raised);
}

.autofinder-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid rgba(181, 203, 103, 0.3);
  margin-bottom: 12px;
}
.slot-suggest-btn {
  background: var(--willow-soft);
  border: 1px solid rgba(181, 203, 103, 0.4);
  color: #dff09e;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.champ-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 4px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}
.champ-pill.is-fearless-locked { opacity: 0.32; filter: grayscale(100%); text-decoration: line-through; }
.champ-pill.locked-pill { background: rgba(230, 155, 181, 0.12); border-color: var(--border-accent); color: var(--sakura); }
.champ-mini-icon { width: 20px; height: 20px; border-radius: 3px; object-fit: cover; }
.champ-del-btn { background: transparent; border: none; color: var(--text-muted); font-size: 14px; padding: 0 2px; cursor: pointer; }

.rsvp-group { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.rsvp-btn {
  padding: 4px 9px;
  min-height: 28px;
  border-radius: var(--radius-xs);
  font-size: 11.5px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  cursor: pointer;
}
.rsvp-btn.active-present { background: var(--willow-soft); border-color: var(--willow); color: #dff09e; }
.rsvp-btn.active-late { background: var(--sunset-soft); border-color: var(--sunset); color: #f5caa8; }
.rsvp-btn.active-absent { background: var(--bud-soft); border-color: var(--bud-crimson); color: #f2a7b8; }

.goal-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-raised);
  border: 1px solid var(--border);
}
.goal-item.goal-completed { opacity: 0.55; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  z-index: 70;
  background: rgba(8, 7, 12, 0.76);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-dialog {
  width: 100%;
  max-width: 500px;
  max-height: 88vh;
  max-height: calc(var(--app-height, 100vh) * 0.88);
  max-height: 88dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
}
@media (max-width: 680px) {
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal-dialog {
    max-width: 100%;
    max-height: 92vh;
    max-height: calc(var(--app-height, 100vh) * 0.92);
    max-height: 92dvh;
    border-radius: 14px 14px 0 0;
    border-bottom: none;
    padding: 18px 16px calc(24px + var(--safe-bottom));
  }
}
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.modal-title { font-size: 16px; font-weight: 600; margin: 0; }

/* Toasts */
.toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 340px;
  max-width: calc(100vw - 32px);
}
@media (max-width: 860px) {
  .toast-root {
    right: 14px;
    left: 14px;
    width: auto;
    bottom: calc(68px + var(--safe-bottom));
  }
}
.toast {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.toast-success { border-left: 3px solid var(--willow); }
.toast-error { border-left: 3px solid var(--bud-crimson); }
.toast-info { border-left: 3px solid var(--moon); }

.empty-box {
  padding: 28px 18px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
}
.info-banner {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12.5px;
  margin-bottom: 12px;
}
.flex-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.text-muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
.team-switcher-strip { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
.team-switcher-strip::-webkit-scrollbar { display: none; }

/* ==========================================================================
   RÉCAP D'ÉQUIPE (PAGE PRINCIPALE JOUEUR EN ÉQUIPE — PORTRAITS & ANALYSE)
   ========================================================================== */
.recap-top-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.recap-top-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.recap-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.recap-scouting-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.recap-scout-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  min-height: 27px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.recap-scout-pill:hover {
  background: var(--bg-raised);
  border-color: var(--border-accent);
  color: var(--text-primary);
  text-decoration: none;
}
.recap-scout-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.recap-next-event-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.recap-next-event-btn:hover {
  background: var(--bg-raised);
  border-color: var(--sakura);
  color: var(--text-primary);
}

/* Bandeau KPI + Emblèmes SoloQ/Flex/Scrims + Contrôles de synchronisation */
.recap-banner {
  background:
    radial-gradient(420px circle at 0% 0%, rgba(230, 155, 181, 0.07), transparent 70%),
    var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}
.recap-banner.has-custom-banner {
  background-image:
    linear-gradient(90deg, rgba(16, 14, 22, 0.92) 0%, rgba(16, 14, 22, 0.72) 50%, rgba(16, 14, 22, 0.88) 100%),
    var(--team-banner-img);
  background-size: cover;
  background-position: center;
}

/* Logo, Bannière & Sélecteur d'identité visuelle d'équipe */
.team-crest-img {
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.48));
}
.team-crest-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  margin: -2px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.14s ease;
}
.team-crest-btn:hover {
  border-color: rgba(230, 155, 181, 0.45);
  background: rgba(230, 155, 181, 0.08);
  transform: translateY(-1px);
}

.team-admin-card {
  overflow: hidden;
}
.team-admin-card-banner {
  height: 92px;
  margin: -16px -16px 14px -16px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.team-admin-card-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(19, 17, 24, 0.08) 0%, rgba(19, 17, 24, 0.72) 100%);
  pointer-events: none;
}

.team-branding-picker {
  display: grid;
  gap: 6px;
}
.team-branding-section-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}
.team-branding-stage {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  overflow: hidden;
}
.team-branding-banner-preview {
  height: 86px;
  background-color: rgba(255, 255, 255, 0.02);
  background-image: linear-gradient(135deg, rgba(230, 155, 181, 0.08), rgba(19, 17, 24, 0.4));
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  padding: 8px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.team-branding-banner-preview.has-img {
  box-shadow: inset 0 -24px 32px rgba(13, 11, 18, 0.55);
}
.team-branding-banner-placeholder {
  font-size: 11.5px;
  color: var(--text-muted);
}
.team-branding-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 10px;
}
.team-branding-logo-slot {
  display: flex;
  align-items: center;
  gap: 9px;
}
.team-branding-logo-box {
  width: 56px;
  height: 42px;
  padding: 3px;
  border-radius: 8px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}
.team-branding-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.team-branding-logo-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--picker-accent, var(--sakura));
}
.team-branding-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.recap-kpi-cluster {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-right: 18px;
  border-right: 1px solid var(--border);
}
.recap-kpi-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 82px;
}
.recap-kpi-num {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.15;
}
.recap-kpi-num.is-power {
  color: #f4c874;
}
.recap-kpi-label {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
  white-space: nowrap;
}
.recap-wr-bar {
  width: 74px;
  height: 4px;
  margin-top: 5px;
  border-radius: 99px;
  background: var(--bud-crimson);
  overflow: hidden;
}
.recap-wr-win {
  display: block;
  height: 100%;
  background: var(--willow);
  border-radius: 99px 0 0 99px;
}

.recap-emblem-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.recap-emblem-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border);
  min-width: 0;
  text-align: left;
  color: var(--text-primary);
}
.recap-emblem-card.is-clickable {
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.recap-emblem-card.is-clickable:hover {
  background: var(--bg-raised);
  border-color: var(--border-strong);
}
.recap-emblem-crest {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}
.recap-emblem-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.recap-emblem-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.recap-emblem-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.recap-sync-cluster {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-left: 18px;
  border-left: 1px solid var(--border);
}
.recap-ctrl-label {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.recap-scope-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}
.recap-scope-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}
.recap-scope-btn.active {
  background: var(--sakura);
  color: var(--sakura-ink);
}
.recap-sync-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.recap-sample-select {
  width: 68px;
  min-height: 34px;
  padding: 4px 8px;
  font-size: 12.5px;
}
.recap-sync-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(181, 203, 103, 0.45);
  background: rgba(181, 203, 103, 0.2);
  color: #e4f2a6;
  font-size: 12.2px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.recap-sync-btn:hover:not(:disabled) {
  background: rgba(181, 203, 103, 0.3);
  border-color: var(--willow);
}
.recap-sync-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 1240px) {
  .recap-banner {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .recap-kpi-cluster {
    padding-right: 0;
    padding-bottom: 12px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    justify-content: space-around;
  }
  .recap-sync-cluster {
    padding-left: 0;
    padding-top: 12px;
    border-left: none;
    border-top: 1px solid var(--border);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
  }
}

@media (max-width: 720px) {
  .recap-emblem-row {
    grid-template-columns: 1fr;
  }
  .recap-kpi-cluster {
    gap: 12px;
  }
  .recap-kpi-num {
    font-size: 19px;
  }
  .recap-sync-cluster {
    flex-direction: column;
    align-items: stretch;
  }
  .recap-sync-row {
    width: 100%;
  }
  .recap-sync-btn {
    flex: 1;
  }
}

/* Section 5 Postes (Cartes portraits verticaux) */
.recap-roster-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.recap-section-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}
.recap-section-sub {
  margin: 2px 0 0;
  font-size: 12.2px;
  color: var(--text-muted);
}

.recap-lanes-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.recap-lanes-grid.is-extras {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

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

.recap-player-card {
  position: relative;
  display: grid;
  grid-template-columns: 39% 61%;
  min-height: 304px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.recap-player-card:hover,
.recap-player-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--border-accent);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
  outline: none;
}

.recap-portrait-pane {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #211b2d 0%, #14111b 100%);
}
.recap-portrait-img {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  transition: transform 0.35s ease;
}
.recap-player-card:hover .recap-portrait-img {
  transform: scale(1.045);
}
.recap-portrait-placeholder {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.recap-portrait-shade {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 52%, var(--bg-surface) 100%),
    linear-gradient(180deg, rgba(12, 10, 18, 0.55) 0%, transparent 26%, transparent 76%, rgba(12, 10, 18, 0.65) 100%);
  pointer-events: none;
}

.recap-lane-chip {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(16, 13, 24, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}
.recap-lane-chip.is-muted {
  position: static;
  background: var(--bg-input);
  border-color: var(--border);
  color: var(--text-muted);
}

.recap-stats-pane {
  padding: 11px 11px 10px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  z-index: 1;
}

.recap-player-head {
  min-width: 0;
}
.recap-player-pseudo {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recap-pseudo-main {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
}
.recap-pseudo-tag {
  font-size: 10.5px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.recap-player-nick {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recap-ranks-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  background: rgba(18, 15, 26, 0.65);
  border: 1px solid var(--border);
}
.recap-rank-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}
.recap-rank-qlabel {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.recap-mini-crest {
  width: 26px;
  height: 26px;
  object-fit: contain;
  margin: 2px 0 1px;
}
.recap-rank-div {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
}
.recap-rank-lp {
  font-size: 9.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.recap-perf-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 5px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.recap-perf-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}
.recap-perf-val {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.recap-perf-lbl {
  font-size: 9.5px;
  color: var(--text-muted);
}

.recap-champs-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 86px;
  justify-content: center;
}
.recap-champ-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.recap-champ-avatar {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
}
.recap-champ-meta {
  min-width: 0;
  flex: 1;
}
.recap-champ-name-line {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.recap-champ-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recap-champ-tier {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 3px;
  background: rgba(230, 155, 181, 0.16);
  color: var(--sakura);
  flex-shrink: 0;
}
.recap-champ-tier.tier-a {
  background: var(--willow-soft);
  color: var(--willow);
}
.recap-champ-tier.tier-b {
  background: rgba(212, 196, 236, 0.15);
  color: var(--moon);
}
.recap-champ-sub {
  font-size: 9.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recap-champ-empty {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 10px 4px;
}

.recap-vacant-card {
  min-height: 304px;
  border-radius: var(--radius-lg);
  background: rgba(25, 22, 32, 0.55);
  border: 1px dashed var(--border-strong);
  padding: 10px;
  display: flex;
  flex-direction: column;
}
.recap-vacant-top {
  display: flex;
  justify-content: flex-start;
}
.recap-vacant-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
}

/* ==========================================================================
   SCRIMS & CASTS : RÉSULTATS CLIQUABLES, TWITCH / YOUTUBE & SCOREBOARD
   ========================================================================== */
.scrim-clickable-row {
  cursor: pointer;
  transition: background 0.12s ease;
}
.scrim-clickable-row:hover {
  background: rgba(255, 255, 255, 0.025);
}
.scrim-clickable-card {
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.scrim-clickable-card:hover {
  background: var(--bg-raised);
}

.scrim-result-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  min-height: 30px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, border-color 0.14s ease, filter 0.14s ease;
}
.scrim-result-pill:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  border-color: var(--sakura);
}
.scrim-result-pill.is-win {
  background: var(--willow-soft);
  border-color: rgba(181, 203, 103, 0.45);
  color: #dff09e;
}
.scrim-result-pill.is-loss {
  background: var(--bud-soft);
  border-color: rgba(207, 92, 116, 0.45);
  color: #f3a5b6;
}
.scrim-result-pill.is-draw {
  background: var(--sunset-soft);
  border-color: rgba(223, 152, 108, 0.45);
  color: #f4c6a4;
}
.scrim-result-pill.is-pending {
  background: var(--bg-raised);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 11.5px;
}

.stream-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  min-height: 28px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.12s ease;
}
.stream-pill:hover {
  transform: translateY(-1px);
  border-color: var(--border-accent);
  text-decoration: none;
}
.stream-pill.is-twitch {
  background: rgba(145, 70, 255, 0.16);
  border-color: rgba(169, 112, 255, 0.42);
  color: #d7beff;
}
.stream-pill.is-twitch:hover {
  background: rgba(145, 70, 255, 0.26);
  border-color: #a970ff;
}
.stream-pill.is-youtube {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(248, 113, 113, 0.42);
  color: #fecaca;
}
.stream-pill.is-youtube:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #f87171;
}

.scrim-modal-scoreboard {
  padding: 13px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
}
.scrim-sb-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.scrim-sb-versus {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}
.scrim-sb-team {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
}
.scrim-sb-team.is-us {
  text-align: right;
}
.scrim-sb-team.is-opp {
  text-align: left;
}
.scrim-sb-score {
  font-size: 20px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
}

.scrim-game-edit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
}

/* ==========================================================================
   PLANNING EN COLONNES PAR RÔLE (STYLE HEXCORE.GG)
   ========================================================================== */
.hc-planner-root {
  --hc-row-h: 36px;
  --hc-head-h: 88px;
  --hc-green: #2dd47a;
  --hc-green-strong: #22c55e;
  --hc-amber: #f59e0b;
  --hc-crimson: #ef4444;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hc-planner-root.mode-my {
  --hc-head-h: 114px;
}

.hc-team-context-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.hc-team-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.hc-team-pill.active {
  background: var(--bg-raised);
  border-color: var(--sakura);
  color: var(--text-primary);
}
.hc-team-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Barre 1 : Semaine + Mode Mes dispos / Équipe + SAUVEGARDÉ */
.hc-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
}
.hc-topbar-left,
.hc-topbar-center,
.hc-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.hc-nav-arrow {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.hc-nav-arrow:hover {
  background: var(--bg-hover);
  border-color: var(--sakura);
}
.hc-today-btn {
  height: 30px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.hc-today-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.hc-date-range-label {
  position: relative;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
}
.hc-date-range-label:hover {
  background: var(--bg-raised);
}
.hc-hidden-date-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.hc-mode-tabs {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.hc-mode-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.hc-mode-tab:hover {
  color: var(--text-primary);
}
.hc-mode-tab.active.is-my {
  background: rgba(245, 180, 59, 0.2);
  border-color: rgba(245, 180, 59, 0.55);
  color: #fcd34d;
}
.hc-mode-tab.active.is-team {
  background: rgba(45, 212, 122, 0.18);
  border-color: rgba(45, 212, 122, 0.52);
  color: #86efac;
}

.hc-save-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 4px 8px;
}
.hc-save-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hc-green);
}
.hc-save-status.is-saving {
  color: #fcd34d;
}
.hc-save-status.is-saving .hc-save-dot {
  background: #f59e0b;
}

/* Barre 2 : Contrôles, filtres rôles, Semaine type, Pinceaux & Staff */
.hc-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.hc-controls-left,
.hc-controls-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hc-check-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}
.hc-check-pill:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.hc-check-pill.checked {
  border-color: rgba(45, 212, 122, 0.5);
  background: rgba(45, 212, 122, 0.11);
  color: #a7f3d0;
}
.hc-check-pill.is-danger.checked {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}
.hc-check-pill input[type="checkbox"] {
  accent-color: var(--hc-green);
  margin: 0;
  cursor: pointer;
}

.hc-toggle-pills {
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.hc-pill-toggle {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 4px;
  cursor: pointer;
}
.hc-pill-toggle:hover {
  color: var(--text-primary);
}
.hc-pill-toggle.active {
  background: rgba(245, 180, 59, 0.16);
  border-color: rgba(245, 180, 59, 0.42);
  color: #fde68a;
}

.hc-preset-select {
  height: 30px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.hc-preset-select:focus {
  outline: none;
  border-color: var(--sakura);
}

.hc-brush-mini {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.hc-brush-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}
.hc-brush-chip.active.is-avail {
  border-color: rgba(45, 212, 122, 0.55);
  background: rgba(45, 212, 122, 0.13);
  color: #bbf7d0;
}
.hc-brush-chip.active.is-tent {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.14);
  color: #fde68a;
}
.hc-brush-chip.active.is-unavail {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
}
.hc-brush-chip.active.is-clear {
  border-color: rgba(230, 155, 181, 0.55);
  background: rgba(230, 155, 181, 0.14);
  color: var(--text-primary);
}

.hc-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.hc-dot.avail {
  background: var(--hc-green);
}
.hc-dot.tent {
  background: var(--hc-amber);
}
.hc-dot.unavail {
  background: var(--hc-crimson);
}
.hc-dot.full5 {
  background: linear-gradient(135deg, #2dd47a, #86efac);
  box-shadow: 0 0 6px rgba(45, 212, 122, 0.55);
}

.hc-auto-sunday-btn.is-active {
  border-color: rgba(52, 211, 153, 0.65);
  background: rgba(34, 197, 94, 0.14);
  color: #6ee7b7;
}
.hc-auto-sunday-btn.is-active:hover {
  border-color: rgba(52, 211, 153, 0.9);
  background: rgba(34, 197, 94, 0.22);
}

.hc-legend-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-secondary);
}
.hc-legend-inline span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hc-best-windows {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.hc-best-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #86efac;
}
.slot-suggest-btn {
  height: 26px;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid rgba(45, 212, 122, 0.42);
  background: rgba(45, 212, 122, 0.12);
  color: #bbf7d0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.slot-suggest-btn:hover {
  background: rgba(45, 212, 122, 0.22);
}
.hc-best-label.is-four {
  color: #fbbf24;
}
.slot-suggest-btn.is-four {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.13);
  color: #fde68a;
}
.slot-suggest-btn.is-four:hover {
  background: rgba(245, 158, 11, 0.24);
}

/* Barre 3 : Bandeau horizontal des rôles & pseudos */
.hc-roster-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.hc-roster-chip {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  overflow: hidden;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.hc-roster-chip.is-me {
  border-color: rgba(245, 180, 59, 0.65);
  background: rgba(245, 180, 59, 0.09);
}
.hc-roster-chip.is-focused {
  border-color: var(--sakura);
  box-shadow: 0 0 0 1px rgba(230, 155, 181, 0.35);
}
.hc-roster-chip.is-vacant {
  opacity: 0.56;
  border-style: dashed;
}
.hc-roster-chip-main {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.hc-roster-chip-main:disabled {
  cursor: default;
}
.hc-lane-icon {
  width: 17px;
  height: 17px;
  object-fit: contain;
  flex-shrink: 0;
}
.hc-staff-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(212, 196, 236, 0.18);
  color: var(--moon);
}
.hc-roster-name {
  max-width: 145px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hc-fill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}
.hc-fill-dot.filled {
  background: var(--hc-green);
}
.hc-alt-select {
  height: 26px;
  border: none;
  border-left: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 0 4px;
  cursor: pointer;
}
.hc-reset-focus-btn {
  height: 28px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(230, 155, 181, 0.45);
  background: rgba(230, 155, 181, 0.12);
  color: var(--sakura);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

/* Bascule responsive Mobile vs Desktop */
.hc-mobile-view {
  display: none;
}
.hc-desktop-view {
  display: block;
}
@media (max-width: 860px) {
  .hc-mobile-view {
    display: block;
  }
  .hc-desktop-view {
    display: none;
  }
}

/* Structure principale de la grille */
.hc-scroll-x {
  overflow-x: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: #110f19;
}
.hc-grid-frame {
  display: flex;
  min-width: 980px;
  background: #110f19;
  user-select: none;
  -webkit-user-select: none;
}
.hc-mobile-frame {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  --hc-row-h: 40px;
  --hc-head-h: 102px;
}
.hc-planner-root.mode-my .hc-mobile-frame {
  --hc-head-h: 128px;
}

/* Axe vertical des heures à gauche */
.hc-time-col {
  width: 50px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-strong);
  background: #15121e;
}
.hc-time-head-spacer {
  height: var(--hc-head-h);
  border-bottom: 1px solid var(--border-strong);
}
.hc-time-body {
  display: flex;
  flex-direction: column;
}
.hc-hour-tick {
  height: var(--hc-row-h);
  padding: 0 7px 0 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}
.hc-hour-tick.is-prime {
  color: var(--text-primary);
  font-weight: 500;
}

/* Colonnes des 7 jours */
.hc-days-track {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, minmax(132px, 1fr));
  min-width: 0;
}
.hc-single-day-track {
  grid-template-columns: minmax(0, 1fr);
}

.hc-day-col {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-strong);
  min-width: 0;
}
.hc-day-col:last-child {
  border-right: none;
}
.hc-day-col.is-today .hc-day-head {
  background: linear-gradient(180deg, rgba(230, 155, 181, 0.1) 0%, #15121e 100%);
}

.hc-day-head {
  height: var(--hc-head-h);
  padding: 6px 6px 0;
  background: #15121e;
  border-bottom: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  overflow: hidden;
}

.hc-day-title-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
}
.hc-day-title-txt {
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.hc-day-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
}
.hc-day-col.is-today .hc-day-name {
  color: var(--sakura);
}
.hc-day-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.hc-day-add-ev {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.hc-day-add-ev:hover {
  border-color: var(--sakura);
  color: var(--text-primary);
}

/* Boutons rapides 08-12 | 12-18 | 18-00 */
.hc-periods-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
}
.hc-period-btn {
  height: 21px;
  padding: 0 2px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.hc-period-btn:hover {
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--text-primary);
}
.hc-period-btn.is-partial {
  border-color: rgba(45, 212, 122, 0.42);
  color: #86efac;
}
.hc-period-btn.is-active {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(52, 211, 153, 0.72);
  color: #6ee7b7;
}

.hc-day-unavail-btn {
  width: 100%;
  height: 20px;
  padding: 0 4px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 500;
  cursor: pointer;
}
.hc-day-unavail-btn:hover {
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
.hc-day-unavail-btn.active {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.62);
  color: #fecaca;
}

/* Sous-colonnes d'icônes LoL par poste (TOP / JGL / MID / ADC / SUP) */
.hc-role-subheads-row {
  display: grid;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin: 0 -6px;
}
.hc-role-subhead {
  min-width: 0;
  min-height: 24px;
  padding: 3px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-right: 1px solid rgba(255, 255, 255, 0.045);
  opacity: 0.92;
  overflow: hidden;
}
.hc-role-subhead:last-child {
  border-right: none;
}
.hc-role-subhead.is-me {
  opacity: 1;
  background: rgba(45, 212, 122, 0.1);
  box-shadow: inset 0 -2px 0 var(--hc-green);
}
.hc-role-subhead.is-dim {
  opacity: 0.28;
}
.hc-subcol-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}
.hc-subcol-txt {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--moon);
}
.hc-subhead-player {
  max-width: 100%;
  padding: 0 2px;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Corps horaire par jour + barres verticales de rôles */
.hc-day-body {
  position: relative;
  height: calc(var(--hc-rows, 16) * var(--hc-row-h));
}
.hc-rows-stack {
  display: flex;
  flex-direction: column;
}
.hc-slot-row {
  display: grid;
  height: var(--hc-row-h);
  border-bottom: 1px solid rgba(255, 255, 255, 0.048);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.08s ease;
}
.hc-slot-row:hover {
  background: rgba(255, 255, 255, 0.032);
}
.hc-slot-row.is-five-ready {
  background: rgba(34, 197, 94, 0.14);
  box-shadow: inset 2px 0 0 #34d399, inset -2px 0 0 #34d399;
}

.hc-lane-cell {
  position: relative;
  border-right: 1px solid rgba(255, 255, 255, 0.055);
  padding: 2px 2px;
  display: flex;
  align-items: stretch;
  justify-content: center;
}
.hc-lane-cell:last-child {
  border-right: none;
}
.hc-lane-cell.is-my-col {
  background: rgba(255, 255, 255, 0.018);
}
.hc-lane-cell.is-context-col .hc-lane-bar {
  opacity: 0.28;
}
.hc-lane-cell.is-dim .hc-lane-bar {
  opacity: 0.2;
}

/* Quadrillage harmonisé à l'intérieur des plages Vert (Dispo), Orange (Pas sûr) et Rouge (Indispo) */
.mode-my .hc-slot-row[data-my-status="available"] {
  border-bottom-color: rgba(52, 211, 153, 0.16);
}
.mode-my .hc-slot-row[data-my-status="available"] .hc-lane-cell {
  border-right-color: rgba(52, 211, 153, 0.14);
}
.mode-my .hc-slot-row[data-my-status="tentative"] {
  border-bottom-color: rgba(251, 191, 36, 0.18);
}
.mode-my .hc-slot-row[data-my-status="tentative"] .hc-lane-cell {
  border-right-color: rgba(251, 191, 36, 0.15);
}
.mode-my .hc-slot-row[data-my-status="unavailable"] {
  border-bottom-color: rgba(248, 113, 113, 0.15);
}
.mode-my .hc-slot-row[data-my-status="unavailable"] .hc-lane-cell {
  border-right-color: rgba(248, 113, 113, 0.13);
}
.mode-my .hc-slot-row[data-my-status] .hc-lane-cell:last-child {
  border-right: none;
}

.hc-lane-bar {
  width: 100%;
  max-width: 22px;
  border-radius: 2px;
  background: transparent;
  transition: background 0.08s ease;
}
.hc-mobile-frame .hc-lane-bar {
  max-width: 34px;
}
.hc-lane-bar.status-available {
  background: var(--hc-green);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.hc-lane-bar.status-tentative {
  background: var(--hc-amber);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.hc-lane-bar.status-unavailable {
  background: rgba(239, 68, 68, 0.28);
}
.mode-my .hc-lane-cell.is-my-col .hc-lane-bar.status-unavailable {
  background: rgba(239, 68, 68, 0.55);
}

/* Encadrés continus quadrillés DISPO / PAS SÛR / INDISPO en mode Mes dispos */
.hc-dispo-ranges-layer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  z-index: 2;
}
.hc-dispo-range-box {
  position: absolute;
  left: 1px;
  right: 1px;
  border-radius: 4px;
  overflow: hidden;
}
.hc-dispo-range-box.is-avail-block {
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.58);
}
.hc-dispo-range-box.is-tent-block {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.6);
}
.hc-dispo-range-box.is-unavail-block {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.48);
}
.hc-dispo-range-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  padding: 2px 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.2;
}
.is-avail-block .hc-dispo-range-head {
  color: #6ee7b7;
  background: linear-gradient(180deg, rgba(14, 52, 32, 0.78) 0%, rgba(14, 52, 32, 0.18) 100%);
}
.is-tent-block .hc-dispo-range-head {
  color: #fde68a;
  background: linear-gradient(180deg, rgba(66, 42, 10, 0.82) 0%, rgba(66, 42, 10, 0.18) 100%);
}
.is-unavail-block .hc-dispo-range-head {
  color: #fca5a5;
  background: linear-gradient(180deg, rgba(64, 18, 24, 0.78) 0%, rgba(64, 18, 24, 0.18) 100%);
}
.hc-dispo-range-title {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hc-dispo-range-time {
  opacity: 0.92;
  white-space: nowrap;
}
.hc-dispo-range-clear {
  pointer-events: auto;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
  opacity: 0.8;
}
.hc-dispo-range-clear:hover {
  opacity: 1;
}

/* Cartes d'événements multi-heures (Scrim / Officiel / Training / Coaching / Review) */
.hc-events-overlay-layer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  z-index: 4;
}
.hc-event-card {
  position: absolute;
  pointer-events: auto;
  padding: 5px 7px;
  border-radius: 5px;
  background: rgba(41, 29, 16, 0.94);
  border: 1px solid #f59e0b;
  color: #fef3c7;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.42);
}
.hc-event-card:hover {
  filter: brightness(1.07);
}
.hc-event-card.type-scrim,
.hc-event-card.type-official {
  background: rgba(43, 30, 16, 0.94);
  border-color: #f59e0b;
  color: #fde68a;
}
.hc-event-card.type-training {
  background: rgba(24, 30, 56, 0.94);
  border-color: #818cf8;
  color: #e0e7ff;
}
.hc-event-card.type-coaching {
  background: rgba(39, 24, 56, 0.94);
  border-color: #c084fc;
  color: #f3e8ff;
}
.hc-event-card.type-review {
  background: rgba(20, 42, 31, 0.94);
  border-color: #34d399;
  color: #d1fae5;
}

.hc-event-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.hc-event-title {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hc-event-actions {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.hc-event-score {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.35);
}
.hc-event-score.win {
  color: #6ee7b7;
}
.hc-event-score.loss {
  color: #fca5a5;
}
.hc-ev-icon-btn {
  width: 17px;
  height: 17px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}
.hc-ev-icon-btn.danger:hover {
  background: rgba(239, 68, 68, 0.65);
  border-color: #fca5a5;
}
.hc-event-time {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}
.hc-event-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.74);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .hc-topbar {
    padding: 8px 10px;
    gap: 8px;
  }
  .hc-topbar .hour-filter-pills {
    width: auto;
    display: inline-flex;
  }
  .hc-topbar-center {
    flex: 1 1 auto;
    justify-content: space-between;
  }
  .hc-topbar-right {
    width: 100%;
    justify-content: space-between;
  }
  .hc-controls-bar {
    padding: 8px 10px;
  }
  .hc-controls-left,
  .hc-controls-right {
    width: 100%;
  }
  .hc-roster-strip {
    display: none;
  }
}
