/**
 * HOB – Checkout Custom Styles
 */

/* Container principal en deux colonnes */

#toplevel_page_hob-coc-settings .wp-menu-image img {
    width: 23px;
    height: auto;
    margin-top: -3px;
    opacity: .98;
}

.hob-coc-container {
  display: flex;
  gap: 2rem;
  margin: 2rem 0;
}
@media (max-width: 768px) {
  .hob-coc-container {
    flex-direction: column;
  }
}

/* Colonnes */
.hob-coc-main-column {
  width: 60%;
}
.hob-coc-side-column {
  width: 40%;
}

/* Titres */
.hob-coc-step-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.hob-coc-order-summary-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* Steps */
.hob-coc-step {
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

/* Messages d’info */
.hob-coco-message {
  font-size: 0.9rem;
  color: #555;
  margin: 0.5rem 0;
}

/* Lien de connexion */
.hob-coco-login-link a {
  color: #0073aa;
  text-decoration: underline;
}

/* Checkbox */
.hob-coco-checkbox {
  margin: 1.5rem 0;
}
.hob-coco-checkbox .input-checkbox {
  margin-right: 0.5rem;
}

/* Bouton Passer la commande */
.hob-coco-place-order {
  text-align: center;
  margin-top: 2rem;
}
#hob_coc_place_order_button {
  width: 100%;

}

/* Barre de progression (style2) */
.hob-coc-progress-bar-container {
  width: 100%;
  background: #f1f1f1;
  height: 0.5rem;
  border-radius: 0.25rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.hob-coc-progress-bar {
    width: 0;
    height: 100%;
    background: #141414;
    transition: width 0.3s ease;
}

/* Navigation entre étapes (style2) */
.hob-coc-nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
}
.hob-coc-prev,
.hob-coc-next {
  padding: 0.75rem 1.5rem;
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}
.hob-coc-prev[disabled],
.hob-coc-next[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}


/* … ton CSS existant … */

/* Billing fields : masqués quand checkbox cochée */
#hob_coc_billing_fields {
  margin-top: 1.5rem;
  border: 1px solid #e1e1e1;
  padding: 1rem;
  border-radius: .5rem;
  background: #fafafa;
}

/* Shipping methods */
.hob-coco-shipping-methods {
  border: 1px solid #e1e1e1;
  border-radius: .5rem;
  padding: 1rem;
  background: #fff;
}
.hob-coco-shipping-methods table {
  width: 100%;
  border-collapse: collapse;
}
.hob-coco-shipping-methods tr {
  border-bottom: 1px solid #f1f1f1;
}
.hob-coco-shipping-methods tr:last-child {
  border-bottom: none;
}
.hob-coco-shipping-methods th,
.hob-coco-shipping-methods td {
  padding: .75rem;
  text-align: left;
}

/* Payment methods wrapper */
.hob-coco-payment-methods {
  border: 1px solid #e1e1e1;
  border-radius: .5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  background: #fff;
}

/* Order notes */
.hob-coco-order-notes {
  margin-bottom: 1.5rem;
}

/* Bouton désactivé */
.hob-coc-prev[disabled],
.hob-coc-next[disabled] {
  opacity: .5;
}

/* Bloc shipping */
.hob-coco-shipping-fields {
  border: 1px solid #e1e1e1;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  background: #fff;
}

/* Bloc billing */
.hob-coco-billing-fields {
  border: 1px solid #e1e1e1;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
  background: #fafafa;
}




/* Liste des articles */
.hob-coc-cart-items {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hob-coc-cart-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.hob-coc-cart-item-name {
  flex: 1 1 auto;
}
.hob-coc-cart-item-subtotal {
  flex: 0 0 auto;
  margin-left: 0.75rem;
}

/* Totaux */
.hob-coc-subtotal,
.hob-coc-shipping,
.hob-coc-total,
.hob-coc-taxes {
  display: flex;
  justify-content: space-between;
  margin: 0.5rem 0;
  font-weight: 500;
}

/* Mise à jour dynamique */
.woocommerce-checkout-review-order,
#hob_coc_order_summary {
  will-change: contents;
}

/* Desktop : on cache la version mobile */
#hob_coc_order_summary_mobile {
  display: none;
}



/* Passer en une seule colonne sous 1024px */
@media screen and (max-width: 1024px) {
	
	  .hob-coc-side-column {
    display: none !important;
  }
  #hob_coc_order_summary_mobile {
    display: block;
    background: #fff;
    border: 1px solid #e1e1e1;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 2rem 0;
  }
	
.hob-coc-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}
  .hob-coc-main-column,
  .hob-coc-side-column {
    width: 95% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  /* Garde un peu d’espace entre steps et résumé */
  .hob-coc-side-column {
    margin-top: 2rem;
  }
  .alignwide {
    margin-inline: 0px !important;
}
}
/* ──────────────────────────────────────────────
   Sticky sidebar (desktop only, ≥1025px wide)
   ────────────────────────────────────────────── */
@media screen and (min-width: 1025px) {
  /* 1) Assure-toi que rien ne masque l'overflow et qu'on aligne tout en haut */
  .hob-coc-container {
    position: relative;    /* référence pour le sticky */
    display: flex;         /* déjà en flex, on s'assure */
    align-items: flex-start; /* enfants alignés en haut pour que sticky parte du bon point */
    overflow: visible;     /* important : ne pas cacher le sticky */
  }

  /* 2) Rend le résumé sticky et limite sa zone au container parent */
  .hob-coc-side-column {
    position: sticky;
    top: 2rem;             /* distance depuis le haut de la fenêtre */
    align-self: flex-start; /* démarrage collé en haut du container */
    /* pas besoin de bottom, le parent stoppe naturellement le sticky */
  }
}


/* ──────────────────────────────────────────
   Coupon block (hob-coc-coupon)
   ────────────────────────────────────────── */
.hob-coc-coupon {
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 1.5rem 0;
}

/* Notices (erreur/succès) */
.hob-coc-coupon .woocommerce-error,
.hob-coc-coupon .woocommerce-message {
  margin-bottom: 1rem;
}

/* Formulaire standard WooCommerce */
.hob-coc-coupon form.checkout_coupon {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0;
}

/* Champ de saisie du code */
.hob-coc-coupon .checkout_coupon .input-text {
  flex: 1 1 auto;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 0.25rem;
  font-size: 1rem;
  min-width: 0;
}

/* Bouton Appliquer */
.hob-coc-coupon .checkout_coupon .button {
  flex: 0 0 auto;
  padding: 0.6rem 1.2rem;
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 1rem;
}

/* Bouton Désactivé */
.hob-coc-coupon .checkout_coupon .button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Mobile : formulaire en colonne */
@media screen and (max-width: 480px) {
  .hob-coc-coupon form.checkout_coupon {
    flex-direction: column;
  }
  .hob-coc-coupon .checkout_coupon .button {
    width: 100%;
  }
}



/* ──────────────────────────────────────────────
   Styles pour le résumé de commande
   ────────────────────────────────────────────── */
.hob-coc-order-summary-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border-bottom: 1px solid #ededed;
  padding-bottom: 0.5rem;
}

/* Liste des articles */
.hob-coc-cart-items {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.hob-coc-cart-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f1f1;
}

.hob-coc-cart-item:last-child {
  border-bottom: none;
}

.hob-coc-cart-item-img {
  flex: 0 0 80px;
  margin-right: 0.75rem;
}



.hob-coc-cart-item-name {
  flex: 1;
  font-size: 1rem;
  color: #333;
}

.hob-coc-cart-item-subtotal {
  flex: 0 0 auto;
  font-weight: 500;
  color: #333;
}

/* Suite des totaux */
.hob-coc-subtotal,
.hob-coc-shipping,
.hob-coc-discount,
.hob-coc-total,
.hob-coc-taxes {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 1rem;
}

.hob-coc-subtotal {
  border-top: 1px solid #e1e1e1;
  margin-top: 1rem;
}

.hob-coc-total {
  font-size: 1.25rem;
  font-weight: 600;
  border-top: 2px solid #e1e1e1;
  padding-top: 1rem;
  margin-top: 1rem;
}

.hob-coc-taxes {
  color: #666;
}

/* Label principal “Code promo” */
.hob-coc-discount-label {
  font-weight: 600;
  margin-top: 1rem;
}

/* Chaque ligne de coupon/appliqué */
.hob-coc-discount-entry {
  margin: 0.25rem 0 0.75rem;
  font-size: 1rem;
}

/* Label principal “Code promo” */
.hob-coc-discount-label {
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}


/* Chaque ligne de coupon/appliqué : deux colonnes alignées */
.hob-coc-discount-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
}



.hob-coc-discount-entry .coupon-code {
    font-size: 15px;
    color: #333;
    background: #ffffff;
    padding: 8px 18px;
    border-radius: 60px;
    min-width: 135px;
    border: 1px solid #e9e9e9;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Montant (droite) en vert */
.hob-coc-discount-entry .discount-amount {
  font-size: 1rem;
  font-weight: 700;
  color: #19bb4c;
}
/* Bouton supprimer coupon */
.hob-coc-discount-entry .hob-coc-remove-coupon {
  margin-left: 0.5rem;
  color: #999;
  text-decoration: none;
  font-weight: bold;
  line-height: 1;
  transition: color .2s;
}
.hob-coc-discount-entry .hob-coc-remove-coupon:hover {
  color: #312c2c;
}


/* Coupon */
.hob-coc-coupon {
  background: #fafafa;
  border: 1px dashed #ccc;
  padding: 1rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.hob-coc-coupon .woocommerce-info {
  margin-bottom: 0.75rem;
}

/* Formulaire coupon */
.hob-coc-coupon form.checkout_coupon {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}




/* Responsive : ajustements mobiles */
@media screen and (max-width: 600px) {
  .hob-coc-cart-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .hob-coc-cart-item-img {
    margin-bottom: 0.5rem;
  }
  .hob-coc-coupon form.checkout_coupon {
    flex-direction: column;
  }
  .hob-coc-coupon .checkout_coupon .button {
    width: 100%;
  }
}

.hob-coc-error {
  color: #d00;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}


.hob-coc-cart-item-img {
    position: relative;
    display: inline-block;
    width: auto;
    height: auto;
}

.hob-coc-cart-item-img img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    width: 80px;
    height: 80px;
    object-fit: cover;
}
.hob-coc-cart-item-qty {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 22px;
    height: 22px;
    background-color: #f7f7f7b0;
    color: #000000d4;
    border-radius: 50%;
    font-size: 12px;
    line-height: 22px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 0 0 2px #fff, 0 2px 4px rgba(0, 0, 0, 0.15);
    z-index: 2;
}


.hob-coc-button {
    padding: 0.75em 1.5em;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    text-align: center;
    line-height: 1.2;
}



/* Style : Arrondi */
.hob-coc-button.rounded {
    background-color: #000;
    color: #fff;
    border-radius: 30px;
	    border: 1px solid #000;
}

.hob-coc-button.rounded:hover, .hob-coc-button.rounded:focus {
    background-color: transparent;
    color: #000;
	border: 1px solid #000;
}

.hob-coc-button.flat {
    background-color: #333;
    color: #fff;
    border-radius: 4px;
    border: 1px solid #333;
}

.hob-coc-button.flat:hover, .hob-coc-button.flat:focus {
    background-color: #111;
    color: #fff;
}

/* Style : Contour */
.hob-coc-button.outline {
    background: transparent;
    color: #000;
    border: 1px solid #000;
    border-radius: 4px;
}

.hob-coc-button.outline:hover, .hob-coc-button.outline:focus {
    background-color: #000;
    color: #fff;
	border: 1px solid #000;
}

/* État désactivé */
.hob-coc-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
