/**
 * Bembeya - surcouche UI (site public)
 * S’applique après main.css
 */
:root {
  --bembeya-rose: #dd497d;
  --bembeya-rose-dark: #c13a6a;
  --bembeya-ink: #1a0f14;
  --bembeya-muted: #5c4a52;
  --bembeya-surface: #faf7f8;
  --bembeya-radius: 14px;
  --bembeya-radius-sm: 10px;
  --bembeya-shadow: 0 10px 40px rgba(26, 15, 20, 0.08);
  --bembeya-font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Typo lisible */
body {
  font-family: var(--bembeya-font);
  color: var(--bembeya-ink);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Logo responsive */
.bembeya-logo-img {
  height: 56px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

/* Header : zone actions compte */
.header-1 .header-right .bembeya-auth,
.header-right .bembeya-auth {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.5rem 0.75rem;
}

.header-1 .bembeya-auth .bembeya-link {
  color: var(--bembeya-ink) !important;
  font-weight: 600;
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border-radius: var(--bembeya-radius-sm);
  transition: background 0.2s, color 0.2s;
}

.header-1 .bembeya-auth .bembeya-link:hover {
  background: rgba(221, 73, 125, 0.08);
  color: var(--bembeya-rose) !important;
}

.header-1 .bembeya-auth .theme-btn {
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(221, 73, 125, 0.35);
}

.header-1 .bembeya-auth .theme-btn span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Nav principale - espacement plus serré entre les liens */
.header-main .main-menu ul li {
  margin-inline-end: 12px;
}

.header-main .main-menu ul li:last-child {
  margin-inline-end: 0;
}

.main-menu nav > ul > li > a {
  font-weight: 600;
  border-radius: var(--bembeya-radius-sm);
  padding: 0.4rem 0.55rem !important;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.main-menu nav > ul > li > a:hover {
  color: var(--bembeya-rose) !important;
  background: rgba(221, 73, 125, 0.06);
}

/* Header compact + hamburger */
.header-1 .header-main {
  min-height: 72px;
  gap: 0.75rem;
}

.header-1 .header-main .header-right {
  gap: 1rem !important;
  flex: 1;
  min-width: 0;
}

.header-1 .header__hamburger .sidebar__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--bembeya-rose);
  color: #fff !important;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(221, 73, 125, 0.35);
  transition: background 0.2s, transform 0.15s;
}

.header-1 .header__hamburger .sidebar__toggle:hover,
.header-1 .header__hamburger .sidebar__toggle:focus {
  background: var(--bembeya-rose-dark);
  color: #fff !important;
}

.header-1 .header__hamburger .sidebar__toggle:active {
  transform: scale(0.96);
}

/* Offcanvas mobile menu */
.offcanvas__auth .theme-btn {
  border-radius: 999px;
  font-weight: 600;
}

.offcanvas__auth .bembeya-link {
  color: var(--bembeya-ink);
  font-weight: 600;
  text-decoration: none;
  padding: 0.5rem;
}

.offcanvas__auth .bembeya-link:hover {
  color: var(--bembeya-rose);
}

.mobile-menu.mean-container .mean-bar {
  background: transparent;
  padding: 0;
  min-height: 0;
}

.mobile-menu.mean-container a.meanmenu-reveal {
  display: none !important;
}

.mobile-menu.mean-container .mean-nav {
  background: transparent;
  margin-top: 0;
}

.mobile-menu.mean-container .mean-nav > ul {
  display: block !important;
  padding: 0;
  margin: 0;
}

.mobile-menu.mean-container .mean-nav ul li {
  border: 0;
  margin: 0 0 0.35rem;
}

.mobile-menu.mean-container .mean-nav ul li a {
  display: block;
  padding: 0.9rem 1rem !important;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--bembeya-ink) !important;
  border: 1px solid transparent;
  background: var(--bembeya-surface);
}

.mobile-menu.mean-container .mean-nav ul li a:hover {
  color: var(--bembeya-rose) !important;
  border-color: rgba(221, 73, 125, 0.2);
  background: rgba(221, 73, 125, 0.06);
}

.offcanvas__logo .bembeya-logo-img {
  height: 56px;
}

/* Sticky header plus léger */
.header-1.sticky .bembeya-logo-img {
  height: 56px;
}

.header-1.sticky .header-main {
  min-height: 64px;
  padding-top: 6px;
  padding-bottom: 6px;
}

/* Footer */
.footer-section .footer-menu a,
.footer-bottom a {
  transition: color 0.2s;
}

.footer-section .footer-menu a:hover,
.footer-bottom a:hover {
  color: var(--bembeya-rose) !important;
}

/* Cartes & sections */
.bembeya-surface {
  background: var(--bembeya-surface);
  border-radius: var(--bembeya-radius);
  box-shadow: var(--bembeya-shadow);
}

#preloader .txt-loading {
  font-weight: 700;
}

#preloader.bembeya-skip {
  display: none !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--bembeya-rose);
  outline-offset: 2px;
}

/* -- Mobile / tablette -- */
@media (max-width: 1199.98px) {
  .header-1 .container-fluid {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .header-1 .header-main {
    min-height: 64px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .bembeya-logo-img {
    height: 48px;
    max-width: 130px;
  }

  .header-1.sticky .bembeya-logo-img {
    height: 44px;
  }

  .header-1,
  .mega-menu-wrapper,
  .header-main {
    max-width: 100%;
    overflow: visible;
  }
}

@media (max-width: 575.98px) {
  .header-1 .container-fluid {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .bembeya-logo-img {
    height: 42px;
    max-width: 112px;
  }

  .header-1 .header__hamburger .sidebar__toggle {
    width: 42px;
    height: 42px;
  }

  .offcanvas__info {
    width: min(100vw - 24px, 320px);
  }
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

/* -- Indicateur de demande ticket -- */
.ticket-demand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border: 1px solid transparent;
}

.ticket-demand__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ticket-demand--available {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
}
.ticket-demand--available .ticket-demand__dot { background: #10b981; }

.ticket-demand--rising {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.25);
}
.ticket-demand--rising .ticket-demand__dot { background: #3b82f6; }

.ticket-demand--high_demand {
  color: #c2410c;
  background: rgba(249, 115, 22, 0.14);
  border-color: rgba(249, 115, 22, 0.3);
}
.ticket-demand--high_demand .ticket-demand__dot { background: #f97316; }

.ticket-demand--low_stock {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.28);
}
.ticket-demand--low_stock .ticket-demand__dot {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
  animation: ticketDemandPulse 1.4s ease-in-out infinite;
}

.ticket-demand--sold_out {
  color: #111827;
  background: rgba(17, 24, 39, 0.08);
  border-color: rgba(17, 24, 39, 0.2);
}
.ticket-demand--sold_out .ticket-demand__dot { background: #111827; }

@keyframes ticketDemandPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.7; }
}

/* Inputs lisibles (le thème force color:white sur tous les input / :focus) */
input.form-control-custom,
textarea.form-control-custom,
select.form-control-custom,
.auth-input {
  color: #1a1a2e !important;
  background-color: #fff !important;
  -webkit-text-fill-color: #1a1a2e;
  caret-color: #1a1a2e;
}

input.form-control-custom::placeholder,
textarea.form-control-custom::placeholder,
.auth-input::placeholder {
  color: #9ca3af !important;
  -webkit-text-fill-color: #9ca3af;
  opacity: 1;
}

input.form-control-custom:focus,
textarea.form-control-custom:focus,
select.form-control-custom:focus,
.auth-input:focus {
  color: #1a1a2e !important;
  -webkit-text-fill-color: #1a1a2e;
}

/* Barre de recherche portail (hero + overlay header) */
.home-search__input,
.home-search__input:focus,
.search-wrap .main-search-input,
.search-wrap .main-search-input:focus {
  color: #1a1a2e !important;
  -webkit-text-fill-color: #1a1a2e !important;
  caret-color: #1a1a2e !important;
}

.home-search__input::placeholder,
.search-wrap .main-search-input::placeholder {
  color: #9ca3af !important;
  -webkit-text-fill-color: #9ca3af !important;
  opacity: 1;
}

/* -- Pages auth (login / inscription) -- */
.bembeya-auth-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--bembeya-font);
  color: var(--bembeya-ink);
  background: var(--bembeya-surface);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(280px, 42%) 1fr;
  min-height: 100vh;
}

.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.25rem 2.5rem;
  color: #fff;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(255, 180, 210, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 90%, rgba(0, 0, 0, 0.25), transparent 50%),
    linear-gradient(165deg, #1a0f14 0%, #4a1830 42%, var(--bembeya-rose) 100%);
  overflow: hidden;
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 85%);
  pointer-events: none;
}

.auth-brand__logo {
  position: relative;
  z-index: 1;
  display: inline-block;
  width: fit-content;
  max-width: min(100%, 280px);
  text-decoration: none;
  line-height: 0;
}

.auth-brand__logo:hover {
  opacity: 0.92;
}

.auth-brand__logo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72px;
  object-fit: contain;
  object-position: left center;
}

.auth-brand__copy {
  position: relative;
  z-index: 1;
  max-width: 22rem;
  padding: 2rem 0;
}

.auth-brand__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
}

.auth-brand__title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.75rem, 2.5vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.auth-brand__text {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  opacity: 0.88;
}

.auth-brand__foot {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.55;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background:
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(221, 73, 125, 0.08), transparent 55%),
    var(--bembeya-surface);
}

.auth-panel__inner {
  width: 100%;
  max-width: 420px;
}

.auth-panel__back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.75rem;
  color: var(--bembeya-muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-panel__back:hover {
  color: var(--bembeya-rose);
}

.auth-card__title {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--bembeya-ink);
}

.auth-card__subtitle {
  margin: 0 0 1.5rem;
  color: var(--bembeya-muted);
  font-size: 0.98rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bembeya-ink);
}

.auth-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid rgba(26, 15, 20, 0.12);
  border-radius: var(--bembeya-radius-sm);
  background: #fff;
  color: var(--bembeya-ink);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
  outline: none;
  border-color: var(--bembeya-rose);
  box-shadow: 0 0 0 4px rgba(221, 73, 125, 0.15);
}

.auth-input.is-invalid {
  border-color: #dc2626;
}

.auth-input--otp {
  letter-spacing: 0.4em;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--bembeya-muted);
  cursor: pointer;
  user-select: none;
}

.auth-check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--bembeya-rose);
}

.auth-submit {
  margin-top: 0.35rem;
  width: 100%;
  padding: 0.95rem 1.25rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--bembeya-rose) 0%, var(--bembeya-rose-dark) 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(221, 73, 125, 0.35);
  transition: transform 0.15s, box-shadow 0.2s;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(221, 73, 125, 0.45);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-switch {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.92rem;
  color: var(--bembeya-muted);
}

.auth-switch a {
  color: var(--bembeya-rose);
  font-weight: 700;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.auth-alert {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--bembeya-radius-sm);
  font-size: 0.9rem;
  line-height: 1.45;
}

.auth-alert--danger {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: #b91c1c;
}

.auth-alert--info {
  background: rgba(221, 73, 125, 0.08);
  border: 1px solid rgba(221, 73, 125, 0.2);
  color: var(--bembeya-rose-dark);
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    min-height: auto;
    padding: 1.5rem 1.5rem 2rem;
  }

  .auth-brand__copy {
    padding: 1.25rem 0 0.5rem;
  }

  .auth-brand__foot {
    display: none;
  }

  .auth-panel {
    padding: 1.5rem 1.25rem 2.5rem;
    align-items: flex-start;
  }

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