/* Speed Tuning V3 - SW Labo admin beta */
.swst3-page {
  padding: 26px;
  color: var(--text, #eaf0ff);
}

.swst3-shell {
  display: grid;
  gap: 16px;
  max-width: 1380px;
  margin: 0 auto;
}

.swst3-card {
  border: 1px solid rgba(130,154,220,.24);
  background: rgba(8,14,32,.72);
  border-radius: 22px;
  padding: 18px;
}

body.light .swst3-card,
.light .swst3-card {
  background: rgba(255,255,255,.86);
  color: #111827;
}

.swst3-title {
  margin: 0;
  font-size: 30px;
  font-weight: 950;
}

.swst3-sub {
  margin-top: 6px;
  color: #aeb8d6;
  font-size: 14px;
}

body.light .swst3-sub,
.light .swst3-sub {
  color: #64748b;
}

.swst3-team {
  display: grid;
  gap: 12px;
}

.swst3-row {
  display: grid;
  grid-template-columns: 44px 56px minmax(280px, 1.4fr) 82px 92px 72px 92px 110px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(130,154,220,.18);
  background: rgba(255,255,255,.045);
}

body.light .swst3-row,
.light .swst3-row {
  background: rgba(15,23,42,.035);
}

.swst3-slot {
  width: 36px;
  height: 36px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-weight: 950;
  background: rgba(151,71,255,.24);
}

.swst3-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(130,154,220,.22);
}

.swst3-search {
  position: relative;
}

.swst3-input,
.swst3-num {
  width: 100%;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(130,154,220,.28);
  background: rgba(255,255,255,.065);
  color: inherit;
  padding: 0 10px;
  box-sizing: border-box;
}

.swst3-num {
  text-align: center;
}

.swst3-label {
  display: block;
  font-size: 11px;
  font-weight: 850;
  color: #aeb8d6;
  margin-bottom: 5px;
}

body.light .swst3-label,
.light .swst3-label {
  color: #64748b;
}

.swst3-list {
  position: absolute;
  z-index: 9999;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 310px;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(130,154,220,.28);
  background: #0b1020;
  box-shadow: 0 18px 50px rgba(0,0,0,.42);
  display: none;
}

body.light .swst3-list,
.light .swst3-list {
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(15,23,42,.18);
}

.swst3-option {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  cursor: pointer;
}

.swst3-option:hover {
  background: rgba(151,71,255,.16);
}

.swst3-option img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.swst3-small {
  font-size: 12px;
  color: #aeb8d6;
}

body.light .swst3-small,
.light .swst3-small {
  color: #64748b;
}

.swst3-check {
  display: grid;
  place-items: center;
}

.swst3-check input {
  width: 22px;
  height: 22px;
}

.swst3-result {
  display: grid;
  gap: 10px;
}

.swst3-result-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(45,212,191,.09);
  border: 1px solid rgba(45,212,191,.20);
}

.swst3-warn {
  color: #ffd166;
}

.swst3-admin-nav {
  color: inherit !important;
}

@media (max-width: 1250px) {
  .swst3-row {
    grid-template-columns: 44px 50px minmax(240px, 1fr) 82px 88px 70px;
  }

  .swst3-row > div:nth-last-child(-n+2) {
    grid-column: span 1;
  }
}

@media (max-width: 767px) {
  .swst3-page {
    padding: 16px 12px 96px;
  }

  .swst3-row {
    grid-template-columns: 42px 48px 1fr;
  }

  .swst3-row > div {
    min-width: 0;
  }

  .swst3-row > div:nth-child(n+4) {
    grid-column: 1 / -1;
  }
}

/* Speed Tuning V3.1 - fix layout recherche + responsive */
.swst3-row {
  grid-template-columns: 44px 56px minmax(360px, 1fr) 82px 100px 72px 100px 110px !important;
  overflow: visible !important;
}

.swst3-card,
.swst3-team,
.swst3-page,
.swst3-shell {
  overflow: visible !important;
}

.swst3-search {
  min-width: 0 !important;
  width: 100% !important;
  position: relative !important;
}

.swst3-input {
  width: 100% !important;
  min-width: 280px !important;
}

.swst3-list {
  position: fixed !important;
  left: 50% !important;
  top: 190px !important;
  transform: translateX(-50%) !important;
  width: min(760px, calc(100vw - 32px)) !important;
  max-height: min(520px, calc(100vh - 240px)) !important;
  z-index: 999999 !important;
}

.swst3-option {
  grid-template-columns: 42px minmax(0, 1fr) 70px !important;
  padding: 10px 12px !important;
}

.swst3-option b {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.swst3-icon {
  display: block !important;
}

@media (max-width: 1250px) {
  .swst3-row {
    grid-template-columns: 44px 56px minmax(280px, 1fr) 82px 100px !important;
  }

  .swst3-row > div:nth-child(n+6) {
    grid-column: span 1 !important;
  }
}

@media (max-width: 767px) {
  .swst3-row {
    grid-template-columns: 42px 48px minmax(0, 1fr) !important;
  }

  .swst3-input {
    min-width: 0 !important;
  }

  .swst3-list {
    top: 110px !important;
    width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 180px) !important;
  }

  .swst3-row > div:nth-child(n+4) {
    grid-column: 1 / -1 !important;
  }
}

/* Speed Tuning V3.2 - menu propre */
.swst3-list {
  position: fixed !important;
  left: 50% !important;
  top: 150px !important;
  transform: translateX(-50%) !important;
  width: min(720px, calc(100vw - 32px)) !important;
  max-height: min(460px, calc(100vh - 200px)) !important;
  padding: 6px !important;
  border-radius: 18px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.swst3-option {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) 72px !important;
  gap: 12px !important;
  align-items: center !important;
  min-height: 52px !important;
  padding: 8px 10px !important;
}

.swst3-option b {
  font-size: 14px !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.swst3-option .swst3-small {
  font-size: 11px !important;
  line-height: 1.1 !important;
}

.swst3-option img {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  object-fit: cover !important;
  background: rgba(255,255,255,.08) !important;
}

/* Speed Tuning V3.3 - recherche lisible */
.swst3-list {
  width: min(860px, calc(100vw - 32px)) !important;
  max-height: min(520px, calc(100vh - 190px)) !important;
}

.swst3-option {
  grid-template-columns: 46px minmax(0, 1fr) 80px !important;
  min-height: 58px !important;
}

.swst3-option b {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: initial !important;
  line-height: 1.15 !important;
  font-size: 15px !important;
}

.swst3-option img,
.swst3-icon {
  object-fit: cover !important;
  background: rgba(255,255,255,.08) !important;
}

.swst3-auto {
  font-size: 12px !important;
  color: #5eead4 !important;
  font-weight: 800 !important;
}

body.light .swst3-auto,
.light .swst3-auto {
  color: #0f766e !important;
}

/* Speed Tuning V3.4 - affichage nom propre */
.swst3-option {
  grid-template-columns: 46px minmax(0, 1fr) !important;
}

.swst3-option > span.swst3-small {
  display: none !important;
}

.swst3-input {
  font-weight: 850 !important;
}

/* Speed Tuning V4.2 - thème light propre */
body.light .swst3-page,
.light .swst3-page {
  color: #0f172a !important;
}

body.light .swst3-card,
.light .swst3-card {
  background: rgba(255,255,255,.92) !important;
  border-color: rgba(15,23,42,.12) !important;
  box-shadow: 0 18px 45px rgba(15,23,42,.08) !important;
}

body.light .swst3-row,
.light .swst3-row {
  background: rgba(248,250,252,.92) !important;
  border-color: rgba(15,23,42,.12) !important;
}

body.light .swst3-title,
.light .swst3-title,
body.light .swst3-page h1,
.light .swst3-page h1,
body.light .swst3-page h2,
.light .swst3-page h2 {
  color: #0f172a !important;
}

body.light .swst3-sub,
.light .swst3-sub,
body.light .swst3-label,
.light .swst3-label,
body.light .swst3-small,
.light .swst3-small {
  color: #64748b !important;
}

body.light .swst3-input,
.light .swst3-input,
body.light .swst3-num,
.light .swst3-num {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(15,23,42,.18) !important;
}

body.light .swst3-result-line,
.light .swst3-result-line {
  background: rgba(14,165,233,.08) !important;
  border-color: rgba(14,165,233,.22) !important;
  color: #0f172a !important;
}

body.light .swst3-auto,
.light .swst3-auto {
  color: #0f766e !important;
}

body.light .swst3-warn,
.light .swst3-warn {
  color: #b45309 !important;
}

body.light .swst3-list,
.light .swst3-list {
  background: #ffffff !important;
  border-color: rgba(15,23,42,.18) !important;
  color: #0f172a !important;
}

body.light .swst3-option:hover,
.light .swst3-option:hover {
  background: rgba(14,165,233,.10) !important;
}

/* Speed Tuning V4.3 - light clean définitif */
body.light #swst3-root,
.light #swst3-root {
  color: #0f172a !important;
}

body.light .swst3-page,
.light .swst3-page {
  background: transparent !important;
  color: #0f172a !important;
}

body.light .swst3-card,
.light .swst3-card,
body.light .swst3-team,
.light .swst3-team {
  background: rgba(255,255,255,.94) !important;
  border: 1px solid rgba(15,23,42,.12) !important;
  box-shadow: 0 16px 40px rgba(15,23,42,.08) !important;
}

body.light .swst3-row,
.light .swst3-row {
  background: #f8fafc !important;
  border-color: rgba(15,23,42,.12) !important;
}

body.light .swst3-title,
.light .swst3-title,
body.light #swst3-root h1,
.light #swst3-root h1,
body.light #swst3-root h2,
.light #swst3-root h2 {
  color: #0f172a !important;
}

body.light .swst3-input,
.light .swst3-input,
body.light .swst3-num,
.light .swst3-num {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(15,23,42,.20) !important;
}

body.light .swst3-result-line,
.light .swst3-result-line {
  background: #eff6ff !important;
  border-color: rgba(14,165,233,.25) !important;
  color: #0f172a !important;
}

body.light .swst3-list,
.light .swst3-list {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(15,23,42,.18) !important;
}

body.light .swst3-option:hover,
.light .swst3-option:hover {
  background: #e0f2fe !important;
}

body.light .swst3-slot,
.light .swst3-slot {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
}

/* Speed Tuning V4.4 - light theme forcé via classe dédiée */
#swst3-root.swst3-theme-light {
  color: #0f172a !important;
}

#swst3-root.swst3-theme-light .swst3-page {
  color: #0f172a !important;
}

#swst3-root.swst3-theme-light .swst3-card {
  background: rgba(255,255,255,.96) !important;
  border-color: rgba(15,23,42,.14) !important;
  box-shadow: 0 18px 45px rgba(15,23,42,.08) !important;
}

#swst3-root.swst3-theme-light .swst3-row {
  background: #f8fafc !important;
  border-color: rgba(15,23,42,.14) !important;
}

#swst3-root.swst3-theme-light .swst3-title,
#swst3-root.swst3-theme-light h1,
#swst3-root.swst3-theme-light h2,
#swst3-root.swst3-theme-light b {
  color: #0f172a !important;
}

#swst3-root.swst3-theme-light .swst3-sub,
#swst3-root.swst3-theme-light .swst3-label,
#swst3-root.swst3-theme-light .swst3-small {
  color: #475569 !important;
}

#swst3-root.swst3-theme-light .swst3-input,
#swst3-root.swst3-theme-light .swst3-num {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(15,23,42,.22) !important;
}

#swst3-root.swst3-theme-light .swst3-input::placeholder {
  color: #94a3b8 !important;
}

#swst3-root.swst3-theme-light .swst3-result-line {
  background: #eff6ff !important;
  border-color: rgba(14,165,233,.25) !important;
  color: #0f172a !important;
}

#swst3-root.swst3-theme-light .swst3-result-line span {
  color: #0f172a !important;
}

#swst3-root.swst3-theme-light .swst3-auto {
  color: #0f766e !important;
}

#swst3-root.swst3-theme-light .swst3-warn {
  color: #b45309 !important;
}

#swst3-root.swst3-theme-light .swst3-slot {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
}

#swst3-root.swst3-theme-light .swst3-list {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(15,23,42,.18) !important;
  box-shadow: 0 18px 50px rgba(15,23,42,.18) !important;
}

#swst3-root.swst3-theme-light .swst3-option:hover {
  background: #e0f2fe !important;
}

/* Speed tuning - icône sidebar identique aux autres */
.sideNav nav button.swst3-admin-nav {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

.sideNav nav button.swst3-admin-nav .swst3-nav-icon {
  width: 22px !important;
  min-width: 22px !important;
  height: 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: currentColor !important;
  margin: 0 !important;
}

.sideNav nav button.swst3-admin-nav .swst3-nav-icon svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
  stroke: currentColor !important;
  fill: none !important;
}

.sideNav nav button.swst3-admin-nav span {
  color: inherit !important;
}

/* Speed tuning - navbar mobile alignement final */
@media (max-width: 767px) {
  .swst3-mobile-nav {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: center !important;

    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;

    padding: 0 !important;
    margin: 0 auto !important;

    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;

    color: inherit !important;
    line-height: 1 !important;
    text-align: center !important;
    vertical-align: middle !important;
  }

  .swst3-mobile-nav-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;

    margin: 0 !important;
    padding: 0 !important;

    color: currentColor !important;
    line-height: 1 !important;
  }

  .swst3-mobile-nav-icon svg {
    width: 21px !important;
    height: 21px !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
  }

  .swst3-mobile-nav-label {
    display: none !important;
  }
}

/* Speed tuning - éviter doublon mobile manuel */
@media (max-width: 767px) {
  .swst3-mobile-nav {
    display: none !important;
  }

  .swst3-admin-nav .swst3-nav-icon,
  button .swst3-nav-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .swst3-admin-nav .swst3-nav-icon svg,
  button .swst3-nav-icon svg {
    width: 20px !important;
    height: 20px !important;
    stroke: currentColor !important;
    fill: none !important;
  }
}

/* Speed tuning - mobile nav active icon centering + page polish */
@media (max-width: 767px) {
  /* Icône navbar mobile : centrage identique aux autres */
  nav button.swst3-admin-nav,
  nav a.swst3-admin-nav,
  button.swst3-admin-nav {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    margin: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    text-align: center !important;
    line-height: 1 !important;
  }

  nav button.swst3-admin-nav .swst3-nav-icon,
  nav a.swst3-admin-nav .swst3-nav-icon,
  button.swst3-admin-nav .swst3-nav-icon {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 0 !important;
    padding: 0 !important;
    color: currentColor !important;
    transform: none !important;
  }

  nav button.swst3-admin-nav .swst3-nav-icon svg,
  nav a.swst3-admin-nav .swst3-nav-icon svg,
  button.swst3-admin-nav .swst3-nav-icon svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
    margin: 0 !important;
    stroke: currentColor !important;
  }

  nav button.swst3-admin-nav > span:not(.swst3-nav-icon),
  nav a.swst3-admin-nav > span:not(.swst3-nav-icon),
  button.swst3-admin-nav > span:not(.swst3-nav-icon) {
    display: none !important;
  }

  /* Page mobile plus propre */
  .swst3-page {
    padding: 16px 12px 96px !important;
  }

  .swst3-shell {
    gap: 12px !important;
  }

  .swst3-card {
    border-radius: 18px !important;
    padding: 14px !important;
  }

  .swst3-title {
    font-size: 28px !important;
    text-align: center !important;
    line-height: 1.05 !important;
  }

  .swst3-sub {
    font-size: 13px !important;
    line-height: 1.35 !important;
    text-align: center !important;
  }

  .swst3-team {
    gap: 10px !important;
  }

  .swst3-row {
    grid-template-columns: 42px 54px minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 12px !important;
    border-radius: 16px !important;
    align-items: center !important;
  }

  .swst3-slot {
    width: 36px !important;
    height: 36px !important;
    border-radius: 12px !important;
  }

  .swst3-icon {
    width: 50px !important;
    height: 50px !important;
    border-radius: 14px !important;
  }

  .swst3-search {
    grid-column: 3 / 4 !important;
    min-width: 0 !important;
  }

  .swst3-input {
    height: 40px !important;
    min-width: 0 !important;
    font-size: 14px !important;
  }

  .swst3-row > div:nth-child(4) {
    grid-column: 1 / 2 !important;
  }

  .swst3-row > div:nth-child(5) {
    grid-column: 2 / 4 !important;
  }

  .swst3-row > div:nth-child(6) {
    grid-column: 1 / 2 !important;
  }

  .swst3-row > div:nth-child(7) {
    grid-column: 2 / 4 !important;
  }

  .swst3-row > div:nth-child(8) {
    grid-column: 1 / -1 !important;
  }

  .swst3-num {
    height: 40px !important;
    font-size: 14px !important;
  }

  .swst3-check {
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .swst3-result-line {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 4px !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
  }

  .swst3-result-line span {
    text-align: left !important;
  }
}
