/* ==========================================================================
   GBHA Espace Client Pleine Page (compte.html) & Bouton Avatar 2 Initiales
   ========================================================================== */

html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* 1. Bouton Header : "Se connecter" (déconnecté) -> Rond 2 Initiales (connecté) */
.account-btn-capsule,
.login-btn[data-gbha-account-btn] {
  background: #08354c;
  color: #ffffff;
  height: 40px;
  padding: 0 20px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  transition: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  box-shadow: none;
  white-space: nowrap;
  position: relative;
  box-sizing: border-box;
}

.account-btn-capsule:hover,
.login-btn[data-gbha-account-btn]:hover {
  background: #08354c;
  color: #ffffff;
  transform: none;
  box-shadow: none;
}

.cart-btn-capsule,
.cart-btn-capsule:hover {
  height: 40px;
  padding: 0 20px;
  box-sizing: border-box;
  box-shadow: none !important;
  transform: none !important;
  transition: none !important;
}

/* Quand l'utilisateur est connecté : Cercle 40x40 avec les 2 premières lettres (Prénom + Nom) sans contour blanc ni ombre ni effet survol */
.account-btn-capsule.is-logged,
.login-btn[data-gbha-account-btn].is-logged {
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 50%;
  background: #08354c;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: none;
  border: none;
}

.account-btn-capsule.is-logged:hover,
.login-btn[data-gbha-account-btn].is-logged:hover {
  background: #08354c;
  color: #ffffff;
  transform: none;
  box-shadow: none;
}

.account-btn-capsule.is-logged svg,
.login-btn[data-gbha-account-btn].is-logged svg {
  display: none;
}

.account-btn-dot,
.account-btn-capsule.is-logged .account-btn-dot,
.login-btn[data-gbha-account-btn].is-logged .account-btn-dot {
  display: none;
}

/* Bouton Panier Rond Flottant juste à côté du menu flottant en haut (blanc 100% opaque) */
.header-capsule {
  overflow: visible !important;
}

.floating-cart-fab {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 950;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ffffff;
  color: #475569;
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 0;
  flex-shrink: 0;
  transition: none;
}

.floating-cart-fab:hover {
  background: #ffffff;
  color: #475569;
  transform: translateY(-50%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.floating-cart-fab .cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #08354c;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .floating-cart-fab,
  .floating-cart-fab:hover {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 44px;
    height: 44px;
  }
}

/* ==========================================================================
   2. Architecture Pleine Page (compte.html)
   ========================================================================== */
.gbha-account-page-wrap {
  max-width: 1280px;
  margin: 16px auto 80px auto;
  padding: 0 5%;
}

/* Bandeau d'invitation lors d'une redirection depuis le panier (?redirect=checkout) */
.gbha-checkout-redirect-banner {
  max-width: 540px;
  margin: 0 auto 20px auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.gbha-checkout-redirect-banner h4 {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 3px;
}

.gbha-checkout-redirect-banner p {
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}

/* Bloc Connexion / Inscription Centré (sans panneau image gauche) */
.gbha-auth-split-shell {
  max-width: 540px;
  margin: 24px auto 0 auto;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.06);
  display: block;
  overflow: hidden;
}

.gbha-auth-form-side {
  padding: 42px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
}

.gbha-auth-form-inner {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
}

.gbha-auth-head-block {
  margin-bottom: 24px;
}

.gbha-auth-head-block h2 {
  font-size: 26px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.gbha-auth-head-block p {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

/* Onglets Connexion / Création de compte */
.gbha-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 14px;
  margin-bottom: 24px;
}

.gbha-auth-tab {
  border: none;
  background: transparent;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.gbha-auth-tab.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

/* Alertes */
.gbha-auth-alert {
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
  line-height: 1.5;
  display: none;
}

.gbha-auth-alert.show {
  display: block;
}

.gbha-auth-alert.error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.gbha-auth-alert.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.gbha-auth-alert.info {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #e2e8f0;
}

/* Champs du formulaire */
.gbha-auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gbha-auth-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.gbha-auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gbha-auth-field label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.gbha-auth-input,
.gbha-auth-textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  background: #f8fafc;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  outline: none;
}

.gbha-auth-textarea {
  resize: vertical;
  min-height: 76px;
}

.gbha-auth-input:focus,
.gbha-auth-textarea:focus {
  background: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.gbha-auth-submit {
  width: 100%;
  padding: 15px 20px;
  border-radius: 14px;
  border: none;
  background: #08354c;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: none;
  margin-top: 4px;
}

.gbha-auth-submit:hover {
  background: #08354c;
  transform: none;
}

.gbha-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.gbha-auth-link-btn {
  background: none;
  border: none;
  color: #475569;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 2px 0;
}

.gbha-auth-link-btn:hover {
  color: #0f172a;
}

.gbha-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 700;
}

.gbha-auth-divider::before,
.gbha-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.gbha-auth-google-btn {
  width: 100%;
  padding: 13px 18px;
  border-radius: 14px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
}

.gbha-auth-google-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

/* ==========================================================================
   3. Tableau de Bord Espace Client Connecté (compte.html)
   ========================================================================== */
.gbha-dashboard-shell {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 28px;
  align-items: flex-start;
}

/* Carte Latérale Profil */
.gbha-dash-sidebar {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.gbha-dash-profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
}

.gbha-dash-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gbha-dash-user-name {
  font-size: 16px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.25;
}

.gbha-dash-user-email {
  font-size: 12.5px;
  color: #64748b;
  font-weight: 500;
  margin-top: 2px;
  word-break: break-all;
}

.gbha-verified-pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 99px;
  margin-top: 6px;
}

.gbha-verified-pill.ok {
  background: #dcfce7;
  color: #166534;
}

.gbha-verified-pill.warn {
  background: #fef3c7;
  color: #92400e;
}

.gbha-dash-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gbha-dash-nav-btn {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: #475569;
  font-size: 13.5px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
}

.gbha-dash-nav-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}

.gbha-dash-nav-btn.active {
  background: #0f172a;
  color: #ffffff;
}

.gbha-dash-nav-count {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.08);
  color: inherit;
}

.gbha-dash-nav-btn.active .gbha-dash-nav-count {
  background: rgba(255, 255, 255, 0.2);
}

.gbha-dash-logout-btn {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.gbha-dash-logout-btn:hover {
  border-color: #dc2626;
  color: #dc2626;
  background: #fef2f2;
}

/* Panneau Principal Droite */
.gbha-dash-main {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
  padding: 34px 38px;
}

.gbha-dash-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
}

.gbha-dash-main-head h2 {
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.4px;
}

.gbha-dash-main-head p {
  font-size: 13px;
  color: #64748b;
  margin-top: 3px;
}

/* Cartes de Commandes Détaillées avec Frise de Statut */
.gbha-orders-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.gbha-order-card {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 20px 22px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s;
}

.gbha-order-card:hover {
  border-color: #cbd5e1;
}

.gbha-order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.gbha-order-id {
  font-size: 15px;
  font-weight: 900;
  color: #0f172a;
}

.gbha-order-date {
  font-size: 12.5px;
  color: #64748b;
  font-weight: 600;
}

.gbha-order-status {
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.gbha-order-status.PAID {
  background: #dcfce7;
  color: #166534;
}

.gbha-order-status.PREPARING {
  background: #fef3c7;
  color: #92400e;
}

.gbha-order-status.IN_DELIVERY {
  background: #dbeafe;
  color: #1e40af;
}

.gbha-order-status.COMPLETED {
  background: #f1f5f9;
  color: #0f172a;
}

.gbha-order-status.REFUNDED {
  background: #fee2e2;
  color: #991b1b;
}

/* Frise de suivi 4 étapes */
.gbha-order-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px 0 4px 0;
}

.gbha-order-step {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gbha-order-step-bar {
  height: 5px;
  border-radius: 99px;
  background: #e2e8f0;
}

.gbha-order-step.done .gbha-order-step-bar {
  background: #059669;
}

.gbha-order-step-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
}

.gbha-order-step.done .gbha-order-step-label {
  color: #0f172a;
}

.gbha-order-items {
  font-size: 13.5px;
  color: #1e293b;
  font-weight: 700;
  background: #f8fafc;
  padding: 12px 14px;
  border-radius: 10px;
  line-height: 1.5;
}

.gbha-order-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  font-size: 12.5px;
  color: #64748b;
  flex-wrap: wrap;
  gap: 8px;
}

.gbha-order-total {
  font-size: 16px;
  font-weight: 900;
  color: #059669;
}

/* ==========================================================================
   4. Bloc Panier / Checkout (shop-products.js)
   ========================================================================== */
.gbha-cart-coupon-box {
  margin-top: 6px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.gbha-cart-coupon-row {
  display: flex;
  gap: 8px;
}

.gbha-cart-coupon-input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  outline: none;
}

.gbha-cart-coupon-btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: #0f172a;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}

.gbha-cart-checkout-customer {
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gbha-cart-checkout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.gbha-cart-checkout-head span {
  font-size: 11.5px;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
}

.gbha-cart-mini-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  background: #ffffff;
  outline: none;
}

.gbha-cart-mini-input:focus {
  border-color: #0f172a;
}

.gbha-cart-mini-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
}

/* Responsive Mobile & Tablette */
@media (max-width: 980px) {
  .gbha-auth-split-shell {
    grid-template-columns: 1fr;
  }
  .gbha-auth-visual-side {
    padding: 32px 28px;
  }
  .gbha-auth-form-side {
    padding: 34px 24px;
  }
  .gbha-dashboard-shell {
    grid-template-columns: 1fr;
  }
  .gbha-dash-main {
    padding: 24px 20px;
  }
}

@media (max-width: 768px) {
  .account-btn-capsule:not(.is-logged),
  .login-btn[data-gbha-account-btn]:not(.is-logged) {
    display: none !important;
  }
  .account-btn-capsule.is-logged,
  .login-btn[data-gbha-account-btn].is-logged {
    width: 44px;
    height: 44px;
    min-width: 44px;
    font-size: 13.5px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  }
  .gbha-auth-row-2 {
    grid-template-columns: 1fr;
  }
  .gbha-order-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   Menu Mobile Unifié — Liens épurés en haut + Bloc Profil & Connexion en bas
   ========================================================================== */
.mobile-menu-panel.gbha-mmenu-upgraded {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  width: 88% !important;
  max-width: 345px !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: #ffffff !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.gbha-mmenu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.gbha-mmenu-logo {
  height: 44px;
  width: auto;
  display: block;
}

.gbha-mmenu-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.18s ease;
}

.gbha-mmenu-close:hover {
  background: #f1f5f9;
}

.gbha-mmenu-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px !important;
  display: flex;
  flex-direction: column;
  gap: 0 !important;
}

.gbha-mmenu-link {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 16px 4px !important;
  border-radius: 0 !important;
  border-bottom: 1px solid #f1f5f9 !important;
  text-decoration: none !important;
  color: #0f172a !important;
  background: transparent !important;
  transition: color 0.18s ease;
}

.gbha-mmenu-title {
  font-size: 16.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  letter-spacing: -0.2px;
}

.gbha-mmenu-link.is-active .gbha-mmenu-title {
  color: #08354c;
  font-weight: 800;
}

.gbha-mmenu-link.is-active .gbha-mmenu-arrow {
  color: #08354c;
}

.gbha-mmenu-arrow {
  color: #94a3b8;
  flex-shrink: 0;
}

/* Partie basse intégrée sur le même fond blanc sans compartiment séparé */
.gbha-mmenu-footer {
  margin-top: auto;
  padding: 14px 20px calc(22px + env(safe-area-inset-bottom, 0px)) 20px;
  background: #ffffff;
  border-top: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.gbha-mmenu-profile-card {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 14px !important;
  background: #f8fafc !important;
  border: none !important;
  border-radius: 14px !important;
  text-decoration: none !important;
  color: #0f172a !important;
}

.gbha-mmenu-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #08354c;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gbha-mmenu-avatar.is-guest {
  background: rgba(8, 53, 76, 0.08);
  color: #08354c;
}

.gbha-mmenu-profile-info {
  flex: 1;
  min-width: 0;
}

.gbha-mmenu-profile-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gbha-mmenu-profile-sub {
  font-size: 11.5px;
  font-weight: 500;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.gbha-mmenu-btn-primary {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  height: 44px !important;
  padding: 0 16px !important;
  border-radius: 12px !important;
  background: #08354c !important;
  color: #ffffff !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  border: none !important;
  cursor: pointer;
}


