/*
 * BATT Core — Mon espace — LOT 2.1 finition shell desktop
 * Core 1.3.6.4
 *
 * Le contenu métier historique [batt_member_space] reste intact.
 * Le lot 2.1 corrige uniquement la coque PC observée en test terrain :
 * navigation latérale, hiérarchie, densité, doublons visuels et identité.
 */

/* Retire uniquement les habillages éditoriaux de la page Mon espace.
 * Le header principal batt.club n'est jamais ciblé. */
body.batt-core-member-shell-lot2 .entry-header,
body.batt-core-member-shell-lot2 main .page-header,
body.batt-core-member-shell-lot2 .post-thumbnail,
body.batt-core-member-shell-lot2 .featured-image {
  display: none !important;
}

body.batt-core-member-shell-lot2 .site-main,
body.batt-core-member-shell-lot2 main {
  overflow: visible;
}

/* Sur Mon espace PC, l'entrée BATT Assistant de la navigation membre reste
 * l'accès unique : la bulle flottante Core est masquée pour éviter le doublon. */
body.batt-core-member-shell-lot2 #battAssistantBubble {
  display: none !important;
}

.batt-member-ui--desktop {
  --batt-member-shell-dark: #0c151b;
  --batt-member-shell-dark-2: #111e26;
  --batt-member-shell-line: rgba(255, 255, 255, 0.12);
  --batt-member-shell-red: #e51f31;
  --batt-member-shell-yellow: #ffd21f;
  margin: 0;
  background: #f5f6f7;
}

/* Bandeau volontairement plus compact que le Lot 2. */
.batt-member-ui--desktop .batt-member-ui__desktop-hero {
  position: relative;
  overflow: hidden;
  padding: 20px 0 18px;
  background:
    radial-gradient(circle at 84% 16%, rgba(229, 31, 49, 0.20), transparent 26%),
    linear-gradient(135deg, var(--batt-member-shell-dark), var(--batt-member-shell-dark-2));
  color: #fff;
}

.batt-member-ui--desktop .batt-member-ui__desktop-hero::after {
  position: absolute;
  right: -72px;
  bottom: -125px;
  width: 280px;
  height: 205px;
  border: 24px solid rgba(255, 210, 31, 0.07);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.batt-member-ui--desktop .batt-member-ui__desktop-hero .batt-member-ui__eyebrow {
  margin-bottom: 4px;
  color: var(--batt-member-shell-yellow);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.batt-member-ui--desktop .batt-member-ui__desktop-hero-row {
  position: relative;
  z-index: 1;
  display: block;
}

.batt-member-ui--desktop .batt-member-ui__desktop-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.9rem, 1.7rem + 0.8vw, 2.55rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.batt-member-ui--desktop .batt-member-ui__desktop-welcome {
  margin: 8px 0 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
}

.batt-member-ui--desktop .batt-member-ui__desktop-subtitle {
  max-width: 720px;
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
}

.batt-member-ui--desktop .batt-member-ui__desktop-content {
  width: min(100%, var(--batt-member-content-max));
  margin: 0 auto;
  padding: 18px 24px 42px;
}

/* Le contenu historique devient un vrai layout logiciel PC : navigation
 * verticale stable à gauche, métier à droite. Aucun écran métier n'est recréé. */
.batt-member-ui--desktop .batt-member-space {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: start;
  gap: 26px;
  max-width: none;
  margin: 0;
  padding: 0;
  color: #171717;
}

.batt-member-ui--desktop .batt-member-sidebar {
  position: sticky;
  top: 18px;
  display: flex;
  min-width: 0;
  min-height: 560px;
  max-height: calc(100vh - 36px);
  flex-direction: column;
  align-self: start;
  gap: 12px;
  margin: 0;
  padding: 16px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 17px;
  background: linear-gradient(180deg, #10191f, #0d151a);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  color: #fff;
  scrollbar-width: thin;
}

.batt-member-ui--desktop .batt-member-identity {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 2px 4px 13px;
  border: 0;
  border-bottom: 1px solid var(--batt-member-shell-line);
}

.batt-member-ui--desktop .batt-member-identity .batt-member-mark {
  display: inline-flex;
  max-width: 54px;
  max-height: 54px;
  margin-bottom: 8px;
}

.batt-member-ui--desktop .batt-member-identity > strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 1rem;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.batt-member-ui--desktop .batt-member-identity small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.batt-member-ui--desktop .batt-member-sidebar nav {
  display: flex;
  min-width: 0;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  overflow: visible;
}

.batt-member-ui--desktop .batt-member-sidebar nav button {
  display: flex;
  width: 100%;
  min-height: 43px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.86);
  text-align: left;
  white-space: normal;
}

.batt-member-ui--desktop .batt-member-sidebar nav button span {
  width: 21px;
  flex: 0 0 21px;
  color: rgba(255, 255, 255, 0.68);
  text-align: center;
}

.batt-member-ui--desktop .batt-member-sidebar nav button b {
  min-width: 0;
  font-size: 0.79rem;
  line-height: 1.2;
}

.batt-member-ui--desktop .batt-member-sidebar nav button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.batt-member-ui--desktop .batt-member-sidebar nav button.is-active {
  border-color: var(--batt-member-shell-yellow);
  background: var(--batt-member-shell-yellow);
  color: #111;
}

.batt-member-ui--desktop .batt-member-sidebar nav button.is-active span {
  color: #111;
}

/* BATT Mobile / compte / déconnexion redeviennent clairement des actions
 * secondaires, regroupées en bas de la colonne. */
.batt-member-ui--desktop .batt-member-account-actions {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 3px;
  margin: auto 0 0;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid var(--batt-member-shell-line);
}

.batt-member-ui--desktop .batt-member-account-actions .batt-member-account-link,
.batt-member-ui--desktop .batt-member-account-link.is-button {
  display: flex !important;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: flex-start;
  margin: 0 !important;
  padding: 8px 9px !important;
  border: 0 !important;
  border-radius: 9px;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.72) !important;
  font-size: 0.72rem !important;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
  white-space: normal;
}

.batt-member-ui--desktop .batt-member-account-actions .batt-member-account-link:hover,
.batt-member-ui--desktop .batt-member-account-link.is-button:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

.batt-member-ui--desktop .batt-member-account-actions .batt-member-account-link.is-mobile-link {
  border: 1px solid rgba(255, 210, 31, 0.45) !important;
  color: #ffe36a !important;
}

.batt-member-ui--desktop .batt-member-main {
  min-width: 0;
  padding-top: 2px;
}

.batt-member-ui--desktop .batt-member-topbar {
  align-items: center;
  margin: 0 0 18px;
  padding: 0 2px 14px;
  border-bottom: 1px solid #dedede;
}

.batt-member-ui--desktop .batt-member-topbar > div:first-child span {
  color: #9b1c25;
}

.batt-member-ui--desktop .batt-member-topbar h1 {
  margin-top: 4px;
  font-size: clamp(1.65rem, 1.45rem + 0.55vw, 2.05rem);
}

.batt-member-ui--desktop .batt-member-topbar select {
  border-color: #d7d7d7;
  box-shadow: none;
}

/* Aucun style métier nouveau : uniquement une finition légère des conteneurs
 * déjà rendus par l'interface historique. */
.batt-member-ui--desktop .batt-member-card,
.batt-member-ui--desktop .batt-member-section {
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.045);
}

.batt-member-ui--desktop .batt-member-btn:focus-visible,
.batt-member-ui--desktop .batt-member-sidebar nav button:focus-visible,
.batt-member-ui--desktop .batt-member-account-link:focus-visible {
  outline: 3px solid #1d4ed8;
  outline-offset: 2px;
}

/* Tablette paysage : sidebar plus étroite, sans transformer encore la page en
 * interface mobile. Le routage smartphone reste géré en amont vers /app/. */
@media (max-width: 1040px) {
  .batt-member-ui--desktop .batt-member-space {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 18px;
  }

  .batt-member-ui--desktop .batt-member-sidebar {
    padding-inline: 11px;
  }

  .batt-member-ui--desktop .batt-member-sidebar nav button b {
    font-size: 0.73rem;
  }
}

/* Protection d'un rendu étroit accidentel. En usage normal un smartphone est
 * redirigé vers /app/ avant d'atteindre ce shell. */
@media (max-width: 760px) {
  .batt-member-ui--desktop .batt-member-ui__desktop-content {
    padding-inline: 12px;
  }

  .batt-member-ui--desktop .batt-member-space {
    display: block;
  }

  .batt-member-ui--desktop .batt-member-sidebar {
    position: relative;
    top: auto;
    min-height: 0;
    max-height: none;
    margin-bottom: 18px;
  }
}

/* =========================================================
 * LOT 3.1 — Finitions dashboard PC validé terrain
 * Core 1.3.6.7
 * ========================================================= */
.batt-member-ui--desktop {
  --batt-member-content-max: 1280px;
}

.batt-member-ui--desktop .batt-member-ui__desktop-content {
  padding-inline: 18px;
}

.batt-member-ui--desktop .batt-member-space {
  grid-template-columns: 215px minmax(0, 1fr);
  gap: 22px;
}

.batt-member-ui--desktop .batt-member-sidebar {
  min-height: min(600px, calc(100vh - 36px));
}

/* Le rôle technique reste visible mais ne concurrence plus le titre de page. */
.batt-member-ui--desktop #battMemberEyebrow {
  font-size: .64rem;
  letter-spacing: .11em;
  opacity: .82;
}

/* Un profil unique n'a pas besoin d'un sélecteur occupant le haut de page. */
.batt-member-ui--desktop #battMemberPlayerSwitch.is-single-profile {
  display: none !important;
}

/* Bloc points un peu plus dense, sans toucher aux valeurs affichées. */
.batt-member-ui--desktop .batt-member-home-fftt {
  gap: 18px;
  padding: 19px 20px;
  margin-bottom: 14px;
}

.batt-member-ui--desktop .batt-member-home-fftt > div > strong {
  font-size: 35px;
}

/* Le lien FFTT devient une vraie action visuelle cohérente. */
.batt-member-ui--desktop .batt-member-home-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 212, 71, .65);
  border-radius: 9px;
  background: rgba(255, 212, 71, .08);
  color: #ffd447;
  line-height: 1.15;
  text-decoration: none;
}

.batt-member-ui--desktop .batt-member-home-link:hover {
  background: rgba(255, 212, 71, .14);
  text-decoration: none;
}

/* Accueil = synthèse : 4 prochains rendez-vous maximum. L'agenda complet
 * reste accessible avec le bouton existant. */
.batt-member-ui--desktop .batt-member-home-agenda .batt-member-list li:nth-child(n+5) {
  display: none;
}

.batt-member-ui--desktop .batt-member-home-agenda,
.batt-member-ui--desktop .batt-member-home-club {
  padding: 18px 20px;
}

.batt-member-ui--desktop .batt-member-home-latest {
  margin-top: 18px;
  padding-top: 16px;
}
