/**
 * Client portal theme: 2-mode.
 * client-auth: login/register/forgot – dark theme (#0f1115), white logo.
 * client-app: logged-in – light content (#f6f7fb), dark navbar, red buttons.
 * Brand from AppContext (school/TPA), not TramTram.
 */

:root {
  --client-accent: #2d2d2d;
  --client-accent-hover: #1a1a1a;
  --client-dark: #0f1115;
  --client-dark-card: #1a1d24;
}

/* ========== Shared: navbar dark, TPA red buttons/links, no Bootstrap blue ========== */
/* Client navbar: top bar only, fixed height – never full-height/sidebar */
body.client-portal .navbar.client-topbar,
body.client-portal .client-topbar,
body.client-portal.client-app .navbar {
  background: var(--client-dark) !important;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  min-height: 56px !important;
  flex-shrink: 0;
}
body.client-portal .navbar {
  background: var(--client-dark) !important;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  min-height: 56px !important;
  flex-shrink: 0;
}

body.client-portal .navbar .navbar-brand,
body.client-portal .navbar .nav-link {
  color: #fff !important;
}

body.client-portal .navbar .nav-link:hover {
  color: rgba(255, 255, 255, 0.9) !important;
}

body.client-portal .navbar .client-logo {
  max-height: 36px;
}

/* Force Bootstrap primary + outline primary to dark grey/black (clean premium look) */
body.client-portal .btn-primary,
body.client-portal .btn-outline-primary {
  background-color: var(--client-accent) !important;
  border-color: var(--client-accent) !important;
  color: #fff !important;
}

body.client-portal .btn-primary:hover,
body.client-portal .btn-outline-primary:hover {
  background-color: var(--client-accent-hover) !important;
  border-color: var(--client-accent-hover) !important;
  color: #fff !important;
}

/* Override ALL anchor links to dark grey */
body.client-portal a {
  color: var(--client-accent) !important;
}

body.client-portal a:hover {
  color: var(--client-accent-hover) !important;
}

/* Override focus/active states – dark grey */
body.client-portal .form-control:focus,
body.client-portal .form-control:focus-visible {
  box-shadow: 0 0 0 0.2rem rgba(45, 45, 45, 0.25) !important;
  border-color: var(--client-accent) !important;
}

body.client-portal .btn:focus,
body.client-portal .btn:focus-visible,
body.client-portal .btn:active {
  box-shadow: 0 0 0 0.2rem rgba(45, 45, 45, 0.25) !important;
  border-color: var(--client-accent) !important;
}

/* Espacement horizontal entre boutons du portail client */
body.client-portal .btn + .btn,
body.client-portal .btn + a.btn,
body.client-portal a.btn + .btn,
body.client-portal a.btn + a.btn,
body.client-portal .d-flex.gap-2 .btn { margin-left: 0.5rem; }
body.client-portal .d-flex .btn:not(:first-child),
body.client-portal .d-flex a.btn:not(:first-child) { margin-left: 0.5rem; }

/* ========== client-auth: full-page centered, no navbar (login, register, forgot, reset) ========== */
body.client-portal.client-auth {
  min-height: 100vh;
  background: linear-gradient(180deg, #202428 0%, #1d2023 100%);
  color: #e8eaed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

body.client-portal.client-auth .client-auth-wrapper {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.client-portal.client-auth .client-auth-inner {
  width: 100%;
}

body.client-portal.client-auth .client-auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

body.client-portal.client-auth .client-auth-logo img {
  max-height: 250px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  vertical-align: middle;
}

body.client-portal.client-auth .auth-card-wrapper {
  width: 100%;
  position: relative;
  z-index: 1;
}

body.client-portal.client-auth .auth-card {
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  background: #2a2f34;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  color: #e8eaed;
}

body.client-portal.client-auth .auth-card-wide {
  max-width: 420px;
}

body.client-portal.client-auth .card .form-label {
  color: #9ca3af;
  font-weight: 500;
}

body.client-portal.client-auth .card .form-control {
  background: #eef2ff;
  color: #111;
  border: none;
  border-radius: 8px;
}

body.client-portal.client-auth .card .form-control::placeholder {
  color: #6b7280;
}

body.client-portal.client-auth .card .form-control:focus {
  background: #f1f5ff;
  color: #111;
  border: none;
  box-shadow: 0 0 0 0.2rem rgba(178, 30, 23, 0.25) !important;
}

body.client-portal.client-auth .card .form-control.is-invalid {
  background: #fef2f2;
}

body.client-portal.client-auth .btn-primary {
  width: 100%;
  border-radius: 8px;
}

body.client-portal.client-auth .btn-outline-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.25);
  color: #9ca3af;
}

body.client-portal.client-auth .btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
  color: #e8eaed;
}

body.client-portal.client-auth a {
  color: var(--client-accent);
}

body.client-portal.client-auth a:hover {
  color: var(--client-accent-hover);
}

body.client-portal.client-auth .auth-link-secondary {
  color: #9ca3af !important;
  text-decoration: none;
}

body.client-portal.client-auth .auth-link-secondary:hover {
  color: #d1d5db !important;
}

body.client-portal.client-auth .text-secondary,
body.client-portal.client-auth .text-muted {
  color: #9ca3af !important;
}

body.client-portal.client-auth .form-text {
  color: #9ca3af;
}

body.client-portal.client-auth .alert {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #e8eaed;
}

body.client-portal.client-auth .alert-danger {
  background: rgba(220, 53, 69, 0.15);
  border-color: rgba(220, 53, 69, 0.3);
}

body.client-portal.client-auth .alert-success {
  background: rgba(25, 135, 84, 0.15);
  border-color: rgba(25, 135, 84, 0.3);
}

/* ========== client-app: light content (dashboard, profile, etc.) ========== */
body.client-portal.client-app {
  min-height: 100vh;
  background: #f6f7fb;
  color: #1a1a1a;
}

/* Topbar + main structure: navbar fixed height, content below */
body.client-portal.client-app .client-topbar {
  flex-shrink: 0;
}
body.client-portal.client-app .client-main {
  padding: 1.5rem 0;
  background: #f6f7fb;
}
body.client-portal.client-app .client-content {
  margin-top: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
}

/* VIP promo landing: hero flush with top, premium card */
.promo-landing.promo-card {
  margin: -1.5rem -1.5rem 0 -1.5rem;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  padding-top: 0;
}
.promo-hero {
  width: 100%;
  overflow: hidden;
}
.promo-hero img,
.promo-hero-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px 16px 0 0;
}
.promo-content {
  padding: 32px;
}
@media (max-width: 768px) {
  .promo-landing.promo-card {
    margin: -1rem -1rem 0 -1rem;
  }
  .promo-content {
    padding: 20px;
  }
}

body.client-portal.client-app .card {
  background: #fff;
  border: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Replace Bootstrap blue alert-info with TPA-accented neutral */
body.client-portal .alert-info {
  background-color: rgba(178, 30, 23, 0.08) !important;
  border-color: rgba(178, 30, 23, 0.2) !important;
  color: #1a1a1a !important;
}

body.client-portal.client-app .btn:not(.btn-primary):not(.btn-outline-primary):not(.btn-link) {
  background-color: #212529;
  border-color: #212529;
  color: #fff;
}

body.client-portal.client-app .btn:not(.btn-primary):not(.btn-outline-primary):not(.btn-link):hover {
  background-color: #1a1d21 !important;
  border-color: #1a1d21 !important;
  color: #fff !important;
}

/* client-app links: TPA red (inherits from body.client-portal a above) */
body.client-portal.client-app a {
  color: var(--client-accent) !important;
}

body.client-portal.client-app a:hover {
  color: var(--client-accent-hover) !important;
}

/* FORCE TPA RED EVERYWHERE (kill Bootstrap blue once and for all) */

body.client-portal .btn-primary,
body.client-portal .btn-info,
body.client-portal .btn-success,
body.client-portal .btn-outline-primary {
    background-color: var(--client-accent) !important;
    border-color: var(--client-accent) !important;
    color: #fff !important;
}

body.client-portal .btn-primary:hover,
body.client-portal .btn-info:hover,
body.client-portal .btn-success:hover,
body.client-portal .btn-outline-primary:hover {
    background-color: var(--client-accent-hover) !important;
    border-color: var(--client-accent-hover) !important;
    color: #fff !important;
}

/* Links */

body.client-portal a {
    color: var(--client-accent) !important;
}

body.client-portal a:hover {
    color: var(--client-accent-hover) !important;
}

/* Remove blue focus glow */

body.client-portal .btn:focus,
body.client-portal .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(178,30,23,.25) !important;
    border-color: var(--client-accent) !important;
    color: #fff !important;
}

/* Replace green success badge with TPA red (buttons only) */

body.client-portal .btn-success {
    background-color: var(--client-accent) !important;
    border-color: var(--client-accent) !important;
    color: #fff !important;
}

/* Status badges: confirmed = green (success) to avoid confusion with danger */
body.client-portal .badge.bg-success,
body.client-portal .badge-success {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: #fff !important;
}
/* FORCE white text on ALL buttons in client portal */

body.client-portal .btn,
body.client-portal .btn *,
body.client-portal a.btn {
    color: #fff !important;
}

/* Hover stays white too */

body.client-portal .btn:hover,
body.client-portal a.btn:hover {
    color: #fff !important;
}

/* Hide legacy small logo only — do not target all .navbar img (header title uses .client-portal-header-title) */
body.client-portal .navbar .client-logo {
    display: none !important;
}

/* Header title image (client_fr / client_en) — must stay visible; flex parent is .navbar-brand */
body.client-portal .navbar .client-portal-header-title {
    display: block !important;
    height: 40px;
    width: 550px;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
    flex-shrink: 0;
}
/* Fix invisible password dots + input text on client auth */

body.client-portal.client-auth .form-control {
    color: #111 !important;
}

body.client-portal.client-auth input[type="password"] {
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
}
/* Ensure input text is always visible in client portal (auth + app) */

body.client-portal .form-control {
    color: #111 !important;
}

body.client-portal input[type="text"],
body.client-portal input[type="email"],
body.client-portal input[type="password"],
body.client-portal input[type="tel"],
body.client-portal input[type="number"],
body.client-portal textarea {
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
}

/* Placeholder softer */

body.client-portal ::placeholder {
    color: #666 !important;
}
/* Make text cursor visible everywhere in client portal */
body.client-portal input,
body.client-portal textarea,
body.client-portal .form-control {
    caret-color: #111 !important;
}
/* Reserved badge (info / cyan) */
body.client-portal .badge-reserved,
body.client-portal .badge-info {
    background-color: #0dcaf0 !important;
    color: #000 !important;
    padding: 0.35em 0.6em;
    border-radius: 0.375rem;
    font-weight: 500;
}

/* Full / disabled */
body.client-portal .badge-full {
    background-color: #adb5bd !important;
    color: #212529 !important;
}

/* Session list: right column stacks under on mobile */
body.client-portal .session-row .session-row-main {
    min-width: 0;
}
body.client-portal .session-row .session-price {
    white-space: nowrap;
}

/* Prochaines séances: session/Boutique tabs – red accent, no Bootstrap blue */
body.client-portal .session-main-tabs .nav-link {
    color: #333 !important;
    border-radius: 10px 10px 0 0;
    font-weight: 500;
    border: 1px solid transparent;
    background-color: transparent;
    transition: all 0.2s ease;
}
body.client-portal .session-main-tabs .nav-link:hover,
body.client-portal .session-main-tabs .nav-link:focus {
    color: #b21e17 !important;
    background-color: rgba(178, 30, 23, 0.08);
    border-color: transparent;
}
body.client-portal .session-main-tabs .nav-link.active,
body.client-portal .session-main-tabs .show > .nav-link {
    background-color: #b21e17 !important;
    color: #fff !important;
    border-color: #b21e17 #b21e17 #fff !important;
}

/* Dashboard tabs: Accueil | Mes réservations | Historique */
.client-dashboard-tabs .nav-link {
    border-radius: 8px;
    font-weight: 500;
    color: #495057;
    transition: all 0.2s ease;
}
.client-dashboard-tabs .nav-link:hover {
    color: var(--client-accent);
    background-color: rgba(178, 30, 23, 0.08);
}
.client-dashboard-tabs .nav-link.active {
    background-color: var(--client-accent) !important;
    color: #fff !important;
}
.client-dashboard-tabs .nav-link .badge {
    font-size: 0.7em;
}

/* Dashboard primary tabs: force red/black theme over Bootstrap default blue */
body.client-portal .client-dashboard-tabs.nav-tabs {
    border-bottom: 1px solid rgba(178, 30, 23, 0.2);
}
body.client-portal .client-dashboard-tabs.nav-tabs .nav-link {
    color: #2d2d2d !important;
    border: 1px solid transparent;
    border-bottom-color: transparent;
}
body.client-portal .client-dashboard-tabs.nav-tabs .nav-link:hover,
body.client-portal .client-dashboard-tabs.nav-tabs .nav-link:focus {
    color: #b21e17 !important;
    background: rgba(178, 30, 23, 0.08) !important;
    border-color: rgba(178, 30, 23, 0.18) !important;
}
body.client-portal .client-dashboard-tabs.nav-tabs .nav-link.active,
body.client-portal .client-dashboard-tabs.nav-tabs .show > .nav-link {
    color: #fff !important;
    background: #b21e17 !important;
    border-color: #b21e17 #b21e17 #fff !important;
}
/* Shop product cards improvement */

.session-row {
    border-radius: 10px;
    transition: background-color 0.15s ease;
}

.session-row:hover {
    background-color: #f8f9fa;
}

.session-price {
    font-size: 1.15rem;
    font-weight: 600;
}

.session-actions .btn {
    min-width: 110px;
}

/* Checkout / retry links inside list rows: keep clicks on the anchor (not swallowed by row layout) */
body.client-portal .order-checkout-actions {
    position: relative;
    z-index: 2;
}
body.client-portal .order-checkout-actions a[href*="checkout/pay"] {
    position: relative;
    z-index: 3;
    pointer-events: auto;
}

/* Failed booking payment banner: same click reliability as session-row checkout links */
body.client-portal .alert-booking-payment-failed-cta {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}
body.client-portal .alert-booking-payment-failed-cta a,
body.client-portal .alert-booking-payment-failed-cta button:not(:disabled),
body.client-portal .alert-booking-payment-failed-cta form {
    position: relative;
    z-index: 3;
    pointer-events: auto;
}
.list-group-item.session-row {
    padding: 1.1rem 1.25rem;
}
.session-actions {
    min-width: 160px;
}
.session-info {
    max-width: 70%;
}

/* Shop category filter: centered, red active state (override Bootstrap blue) */
body.client-portal .shop-filter .nav-link {
    color: var(--client-accent, #b21e17) !important;
    border-radius: 10px;
    font-weight: 500;
    background-color: transparent !important;
    border: 1px solid transparent;
}
body.client-portal .shop-filter .nav-link:hover,
body.client-portal .shop-filter .nav-link:focus {
    color: #fff !important;
    background-color: rgba(178, 30, 23, 0.85) !important;
    border-color: rgba(178, 30, 23, 0.85) !important;
}
body.client-portal .shop-filter .nav-link.active,
body.client-portal .shop-filter .show > .nav-link,
body.client-portal .shop-filter .nav-pills .nav-link.active,
body.client-portal .shop-filter .nav-pills .show > .nav-link {
    background-color: #b21e17 !important;
    color: #fff !important;
    border-color: #b21e17 !important;
    box-shadow: none !important;
}
body.client-portal .shop-filter {
    justify-content: center;
    gap: 0.5rem;
}

/* Credit-required helper note in reserve list: calm info alert */
body.client-portal .tt-credit-required-alert {
    background-color: #e7f1ff !important;
    border: 1px solid #cfe2ff !important;
    color: #084298 !important;
    border-radius: 6px;
    padding: 9px 10px;
    margin-top: 7px;
    font-size: 13.5px;
    line-height: 1.35;
    font-weight: 400;
}

body.client-portal .tt-credit-required-alert i {
    color: #0b5ed7 !important;
    font-size: 13px;
    opacity: 0.9;
}

/* Unified reserve action row alignment for all session cards */
body.client-portal .tt-session-action-row {
    min-height: 36px;
}
body.client-portal .tt-session-action-row .tt-session-action-form {
    margin-left: auto;
}

/* Welcome promotional offer block (profile) */
body.client-portal .welcome-promo-panel {
    border-color: #c62828 !important;
    background: linear-gradient(180deg, #fff5f5 0%, #ffffff 48%);
    box-shadow: 0 4px 18px rgba(198, 40, 40, 0.12) !important;
}
body.client-portal .welcome-promo-panel--strong {
    border-width: 3px !important;
    border-color: #b71c1c !important;
    box-shadow: 0 8px 28px rgba(183, 28, 28, 0.18) !important;
    background: linear-gradient(165deg, #ffebee 0%, #fff8f8 35%, #ffffff 100%);
}
body.client-portal .welcome-promo-section-title {
    color: #b71c1c;
    font-weight: 700;
}
body.client-portal .welcome-promo-expiry {
    padding: 0.65rem 1rem;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 0.5rem;
    border: 1px solid rgba(183, 28, 28, 0.2);
}
body.client-portal .welcome-promo-claim-check {
    background: rgba(255, 255, 255, 0.9);
    border: 1px dashed rgba(183, 28, 28, 0.35);
}
body.client-portal .welcome-promo-snooze .btn-link {
    font-size: 0.875rem;
}
body.client-portal .welcome-promo-badge {
    background-color: #c62828 !important;
    color: #fff !important;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
body.client-portal .welcome-promo-panel .btn-primary {
    background-color: #c62828 !important;
    border-color: #c62828 !important;
}
body.client-portal .welcome-promo-panel .btn-primary:hover {
    background-color: #b71c1c !important;
    border-color: #b71c1c !important;
}