/* GBHA Page Dediee de Passage de Commande (commande.html) — Design Sobre & Architectural */

.gbha-checkout-page-wrap {
  max-width: 1320px;
  margin: 0 auto 90px auto;
  padding: 0 5%;
}

.gbha-co-top-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
}

.gbha-co-top-title h1 {
  font-size: 28px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.gbha-co-top-title p {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
  font-weight: 500;
}

.gbha-co-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.gbha-co-back-link:hover {
  border-color: #0f172a;
}

/* Grille Principale 2 Colonnes : Panier a Gauche + Etapes a Droite */
.gbha-co-grid {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 28px;
  align-items: start;
}

.gbha-co-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 102px;
}

.gbha-co-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Cartes Standard */
.gbha-co-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.03);
}

.gbha-co-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
}

.gbha-co-card-head h2 {
  font-size: 15.5px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.2px;
  margin: 0;
}

.gbha-co-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #08354c;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.gbha-co-step-title-wrap {
  display: flex;
  align-items: center;
  gap: 11px;
}

/* Liste des articles du panier (Colonne Gauche) */
.gbha-co-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 2px;
}

.gbha-co-item {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  align-items: center;
}

.gbha-co-item-img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.gbha-co-item-body {
  flex: 1;
  min-width: 0;
}

.gbha-co-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.gbha-co-item-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

.gbha-co-item-sub {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

.gbha-co-item-mode-tag {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  background: #ffffff;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.gbha-co-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.gbha-co-qty-box {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 2px;
}

.gbha-co-qty-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  border-radius: 6px;
}

.gbha-co-qty-btn:hover {
  background: #f1f5f9;
}

.gbha-co-qty-val {
  min-width: 26px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
}

.gbha-co-item-price {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
}

.gbha-co-del-btn {
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}

.gbha-co-del-btn:hover {
  color: #0f172a;
  background: #e2e8f0;
}

/* Code Promo & Recapitulatif Financier */
.gbha-co-coupon-row {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

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

.gbha-co-coupon-input:focus {
  border-color: #08354c;
}

.gbha-co-coupon-btn {
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid #08354c;
  background: #08354c;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.gbha-co-summary-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.gbha-co-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #475569;
  font-weight: 600;
}

.gbha-co-sum-row strong {
  color: #0f172a;
  font-weight: 800;
}

.gbha-co-sum-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1.5px solid #0f172a;
}

.gbha-co-sum-total span:first-child {
  font-size: 15.5px;
  font-weight: 800;
  color: #0f172a;
}

.gbha-co-sum-total span:last-child {
  font-size: 23px;
  font-weight: 900;
  color: #08354c;
  letter-spacing: -0.5px;
}

/* Etape 1 : Cartes de choix Click & Collect vs Livraison a domicile */
.gbha-co-modes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.gbha-co-mode-card {
  position: relative;
  text-align: left;
  padding: 18px;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.gbha-co-mode-card:hover:not(.is-disabled) {
  border-color: #94a3b8;
}

.gbha-co-mode-card.active {
  border-color: #08354c;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

.gbha-co-mode-card.is-disabled {
  background: #f8fafc;
  border-color: #e2e8f0;
  opacity: 0.55;
  cursor: not-allowed;
}

.gbha-co-mode-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.gbha-co-mode-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.gbha-co-mode-card.active .gbha-co-mode-radio {
  border-color: #08354c;
  background: #08354c;
}

.gbha-co-mode-card.active .gbha-co-mode-radio::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}

.gbha-co-mode-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
}

.gbha-co-mode-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  margin-top: 4px;
}

.gbha-co-mode-price-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #f1f5f9;
  color: #334155;
  white-space: nowrap;
}

.gbha-co-mode-card.active .gbha-co-mode-price-pill {
  background: #08354c;
  color: #ffffff;
}

.gbha-co-mode-price-pill.locked {
  background: #f1f5f9;
  color: #64748b;
}

.gbha-co-lock-note {
  margin-top: 12px;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  line-height: 1.5;
}

/* Champs de Formulaire Checkout */
.gbha-co-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.gbha-co-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

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

.gbha-co-input,
.gbha-co-textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s ease;
}

.gbha-co-input:focus,
.gbha-co-textarea:focus {
  border-color: #08354c;
}

/* Barre de resultat kilometrique sobre avec capsules */
.gbha-co-km-box {
  margin-top: 4px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

/* Rangée de capsules / balises (Distance, Remise -15%, Depotage...) */
.gbha-co-pills-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.gbha-co-meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  white-space: nowrap;
}

.gbha-co-meta-pill.dark {
  background: #08354c;
  color: #ffffff;
  border-color: #08354c;
}

.gbha-co-meta-pill.orange {
  background: #b45309;
  color: #ffffff;
  border-color: #b45309;
}

/* Style 3 : Carte gris pierre sobre (#f8fafc) avec bandeau fin ambre (#b45309) */
.gbha-co-depotage-box {
  margin-top: 16px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  border: none;
}

.gbha-co-depotage-slim-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border-radius: 8px;
  background: #b45309;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
}

.gbha-co-depotage-slim-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  flex-shrink: 0;
}

.gbha-co-depotage-price-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  background: #e2e8f0;
  color: #0f172a;
  white-space: nowrap;
  transition: background 0.22s ease, color 0.22s ease;
}

.gbha-co-depotage-price-badge.is-active {
  background: #0f172a;
  color: #ffffff;
}

.gbha-co-depotage-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  white-space: nowrap;
}

/* Tiroir anime progressif pour le compteur de palettes a depoter */
.gbha-co-depotage-drawer {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
  transition:
    grid-template-rows 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.26s ease,
    margin-top 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.gbha-co-depotage-drawer.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 12px;
  pointer-events: auto;
}

.gbha-co-depotage-drawer-inner {
  overflow: hidden;
  min-height: 0;
}

.gbha-co-depotage-drawer-content {
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  transform: translateY(-6px);
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.gbha-co-depotage-drawer.is-open .gbha-co-depotage-drawer-content {
  transform: translateY(0);
}

.gbha-co-depotage-stepper {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 2px;
}

.gbha-co-depotage-stepper button {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.16s ease;
}

.gbha-co-depotage-stepper button:hover {
  background: #f1f5f9;
}

.gbha-co-depotage-stepper span {
  min-width: 52px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
}

/* Style 3 : Bandeau fin et compact rouge (#991b1b) pour l'acces restreint */
.gbha-co-access-alert {
  margin-top: 10px;
  margin-bottom: 16px;
  padding: 11px 16px;
  border-radius: 10px;
  background: #991b1b;
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.gbha-co-access-alert-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.45;
}

.gbha-co-call-red-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.18s ease;
}

.gbha-co-call-red-btn:hover {
  background: rgba(0, 0, 0, 0.4);
}

/* Bouton Confirmation Finale */
.gbha-co-submit-btn {
  width: 100%;
  padding: 16px 24px;
  border-radius: 12px;
  border: none;
  background: #08354c;
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: 0.2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s ease;
}

.gbha-co-submit-btn:hover:not(:disabled) {
  background: #0a4664;
}

.gbha-co-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 1024px) {
  .gbha-co-grid {
    grid-template-columns: 1fr;
  }
  .gbha-co-left {
    position: static;
  }
}

@media (max-width: 640px) {
  .gbha-checkout-page-wrap {
    padding: 0 4%;
  }
  .gbha-co-modes-grid,
  .gbha-co-form-grid-2 {
    grid-template-columns: 1fr;
  }
  .gbha-co-card {
    padding: 18px;
    border-radius: 16px;
  }
  .gbha-co-top-title h1 {
    font-size: 22px;
  }
  .gbha-co-address-row {
    flex-direction: column;
  }
  .gbha-co-address-row button {
    width: 100%;
    height: 42px;
  }
  .gbha-co-call-red-btn {
    width: 100%;
  }
}
