/* ------------------------------------------------------------
   GLOBAL WRAPPER
------------------------------------------------------------ */
#configure-product {
  margin-top: 30px;
  margin-bottom: 30px;
}

.accessories-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.accessories-sub-title {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 15px 0 10px;
}

/* ------------------------------------------------------------
   BLOC PRODUIT PRINCIPAL & ACCESSOIRES
------------------------------------------------------------ */

.bloc-accessories {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
}

/* On annule les floats Bootstrap pour ce layout */
.bloc-accessories > .accessories-image,
.bloc-accessories > .description-accessories,
.bloc-accessories > .price-accessories,
.bloc-accessories > .valid-accessories {
  float: none !important;
}

/* Répartition horizontale des colonnes */
.bloc-accessories > .accessories-image {
  flex: 0 0 20%;
  max-width: 20%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bloc-accessories > .description-accessories {
  flex: 0 0 45%;
  max-width: 45%;
}

.bloc-accessories > .price-accessories {
  flex: 0 0 15%;
  max-width: 15%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: right;
}

.bloc-accessories > .valid-accessories {
  flex: 0 0 20%;
  max-width: 20%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Image */
.accessories-image img {
  max-width: 100%;
  border-radius: 6px;
  object-fit: cover;
}

/* Texte produit & accessoires */
.description-accessories h2 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.description-accessories p {
  font-size: 0.95rem;
  color: #555;
}

/* Prix */
.price-accessories .current-price-value {
  font-size: 1.2rem;
  font-weight: 700;
}

/* Box validation */
.valid-checkbox {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.valid-checkbox .title-valid {
  font-size: 0.9rem;
  margin-bottom: 6px;
  display: block;
}

.cesa-accessory-checkbox {
  transform: scale(1.3);
}

/* ------------------------------------------------------------
   BLOC TVA
------------------------------------------------------------ */

#tva-block {
  margin-top: 20px;
  padding: 15px;
  border: 1px dashed #0074d9;
  border-radius: 8px;
  background: #f4faff;
}

#tva-block label {
  font-size: 1rem;
  margin-right: 20px;
}

#tva-block .tva-help {
  font-size: 0.9rem;
  color: #777;
  margin-left: 5px;
}

/* ------------------------------------------------------------
   TOTAL + BOUTON PANIER
------------------------------------------------------------ */

.cesa-row-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
  padding: 15px;
  border-top: 2px solid #e5e5e5;
}

#total-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color, #0074d9);
}

/* ------------------------------------------------------------
   RESPONSIVE - TABLETTE / MOBILE
------------------------------------------------------------ */

@media (max-width: 992px) {
  .bloc-accessories {
    flex-wrap: wrap;
  }

  .bloc-accessories > .accessories-image,
  .bloc-accessories > .description-accessories,
  .bloc-accessories > .price-accessories,
  .bloc-accessories > .valid-accessories {
    max-width: 100%;
    flex: 0 0 100%;
    text-align: center;
    margin-bottom: 10px;
  }

  .price-accessories {
    justify-content: center;
  }

  .valid-accessories {
    justify-content: center;
  }

  .cesa-row-total {
    flex-direction: column;
    text-align: center;
  }

  #cesa-combination-add-cart {
    width: 100%;
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  .accessories-title {
    font-size: 1.2rem;
  }

  .description-accessories h2 {
    font-size: 1rem;
  }

  .price-accessories .current-price-value {
    font-size: 1.1rem;
  }
}

/* --- Animation pulse bouton --- */
.btn-add-animate {
  animation: cesaPulse 0.4s ease;
}

@keyframes cesaPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.07);
  }
  100% {
    transform: scale(1);
  }
}

/* --- Checkmark apparente --- */
.cesa-added-check {
  display: inline-block;
  margin-left: 6px;
  color: #4caf50;
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.3s;
}

.cesa-added-check.show {
  opacity: 1;
}

/* --- Animation vol vers panier --- */
.fly-to-cart {
  position: fixed;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  object-fit: cover;
  z-index: 9999;
  pointer-events: none;
  transition:
    transform 0.8s cubic-bezier(0.32, 0.72, 0.12, 1.3),
    opacity 0.8s;
}
/* ============================
   MODAL OVERLAY
   ============================ */
.cesa-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  display: none;
  backdrop-filter: blur(3px);
}

.cesa-modal-backdrop {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  animation: cesaFadeIn 0.25s ease-out;
}

/* ============================
   BOX STYLE (HUMMINGBIRD-LIKE)
   ============================ */
.cesa-modal-box {
  position: relative;
  background: #fff;
  width: 92%;
  max-width: 520px;
  margin: 120px auto 0 auto;
  padding: 25px;
  border-radius: 18px;
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.12),
    0 8px 12px rgba(0, 0, 0, 0.07);
  animation: cesaSlideIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

/* TITRE */
.cesa-modal-box h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 18px;
  color: #222;
  text-align: center;
}

/* ============================
   PRODUITS
   ============================ */
.cesa-modal-product {
  display: flex;
  align-items: center;
  padding: 10px 0;
  gap: 12px;
  border-bottom: 1px solid #eee;
  animation: cesaPop 0.25s ease-out;
}

.cesa-modal-product:last-child {
  border-bottom: none;
}

.cesa-modal-product img {
  width: 65px;
  height: 65px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transform: scale(0.97);
  transition: transform 0.25s;
}
.cesa-modal-product img:hover {
  transform: scale(1);
}

/* TEXTE */
.cesa-modal-product strong {
  font-size: 1rem;
  color: #333;
}

.cesa-modal-product div {
  font-size: 0.9rem;
  color: #555;
}

/* ============================
   ACTIONS
   ============================ */
.cesa-modal-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

/* Style Hummingbird buttons */
.cesa-modal-actions .btn {
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
}

.cesa-modal-actions .btn-primary {
  background: #007bff;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}
.cesa-modal-actions .btn-primary:hover {
  background: #006ae0;
}

.cesa-modal-actions .btn-secondary {
  background: #f5f5f5;
  color: #444;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07);
}
.cesa-modal-actions .btn-secondary:hover {
  background: #e9e9e9;
}

/* ============================
   ANIMATIONS
   ============================ */
@keyframes cesaFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes cesaSlideIn {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cesaPop {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.product-group-tag {
  background: #eef4ff;
  border-left: 3px solid #2a59ff;
  padding: 4px 8px;
  font-size: 13px;
  margin-bottom: 6px;
}

.cesa-group-label {
  margin-top: 5px;
  display: inline-block;
  padding: 4px 8px;
  background: #e6f2ff;
  border-left: 3px solid #007bff;
  border-radius: 3px;
  color: #0056b3;
  font-size: 0.85rem;
  font-weight: 600;
}

.cesa-pack-header {
  width: 100%;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: #f5f8ff;
  border-left: 4px solid #2a73ff;
  border-radius: 4px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cesa-pack-badge {
  background: #2a73ff;
  color: #fff;
  padding: 3px 7px;
  border-radius: 3px;
  font-size: 12px;
  text-transform: uppercase;
}

.cesa-pack-id {
  color: #2a73ff;
}

.cesa-pack-label-inline {
  margin-top: 4px;
  font-size: 13px;
  color: #2a73ff;
  font-weight: 600;
}

.cesa-pack-badge-small {
  background: #2a73ff;
  color: white;
  padding: 2px 6px;
  font-size: 10px;
  border-radius: 3px;
  margin-right: 3px;
}

.cesa-pack-header {
  padding: 0.5rem 0.75rem;
  background: #f8f9fa;
  border-radius: 0.5rem;
  border: 1px solid #e9ecef;
}

.cesa-pack-badge {
  font-size: 0.75rem;
}

.cesa-pack-total {
  font-size: 0.85rem;
}

.cesa-pack-separator {
  margin: 1rem 0;
  border-color: #e9ecef;
}

.cesa-pack-line {
  margin-left: 0.5rem;
  border-left: 2px solid #e9ecef;
  padding-left: 0.75rem;
  margin-bottom: 0.5rem;
}

/* ==========================================================
   Hummingbird – Packs CESA (cart)
   Place ce CSS dans ton thème :
   /themes/hummingbird/assets/css/custom.css
   ou dans le CSS de ton module si tu préfères.
   ========================================================== */

:root {
  --cesa-accent: #18b4be;
  --cesa-text: #111827;
  --cesa-muted: #6b7280;
  --cesa-border: #e5e7eb;
  --cesa-soft: #f8fafc;
  --cesa-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}

/* Bloc packs global */
.cesa-packs {
  border: 1px solid var(--cesa-border) !important;
  border-radius: 14px !important;
  background: #fff;
  box-shadow: var(--cesa-shadow);
}

/* Titre */
.cesa-packs > h3 {
  font-weight: 800 !important;
  color: var(--cesa-text);
  margin-bottom: 14px !important;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cesa-packs > h3::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--cesa-accent);
  box-shadow: 0 0 0 5px rgba(24, 180, 190, 0.14);
}

/* Un pack */
.cesa-pack {
  padding: 14px 14px 12px !important;
  border: 1px solid var(--cesa-border) !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, #fff 0%, #fcfcfd 100%);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.04);
}
.cesa-pack + .cesa-pack {
  margin-top: 14px !important;
}

/* Header du pack */
.cesa-pack .badge.bg-primary {
  background: rgba(24, 180, 190, 0.12) !important;
  color: var(--cesa-accent) !important;
  border: 1px solid rgba(24, 180, 190, 0.35) !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
}
.cesa-pack strong {
  color: var(--cesa-text);
}

/* Total à droite */
.cesa-pack .text-muted {
  color: var(--cesa-muted) !important;
}
.cesa-pack .d-flex.justify-content-between .text-muted {
  font-weight: 900 !important;
  color: var(--cesa-text) !important;
  background: var(--cesa-soft);
  border: 1px solid var(--cesa-border);
  padding: 6px 10px;
  border-radius: 10px;
}

/* Liste produits */
.cesa-pack .ms-3 {
  margin-left: 0 !important;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--cesa-border);
}

/* Ligne produit (image + texte) */
.cesa-pack-line {
  gap: 12px;
  padding: 10px 10px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #fff;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease;
}
.cesa-pack-line:hover {
  transform: translateY(-1px);
  border-color: rgba(24, 180, 190, 0.35);
  box-shadow: 0 10px 22px rgba(24, 180, 190, 0.1);
}

/* Image produit */
.cesa-pack-line img {
  width: 55px !important;
  height: 55px !important;
  object-fit: cover;
  border-radius: 10px !important;
  border: 1px solid var(--cesa-border) !important;
  background: #fff;
}

/* Nom + prix */
.cesa-pack-line > div > div:first-child {
  font-weight: 800 !important;
  color: var(--cesa-text) !important;
  line-height: 1.15;
}
.cesa-pack-line .text-muted {
  font-size: 0.85rem !important;
  color: var(--cesa-muted) !important;
}

/* Adresse + RDV (petites infos sous la liste) */
.cesa-pack .small.text-muted {
  margin: 8px 2px 0 !important;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #eef2f7;
  background: var(--cesa-soft);
  color: #374151 !important;
}
.cesa-pack .small.text-muted + .small.text-muted {
  margin-top: 6px !important;
}

/* Bloc urgence (si tu utilises ton div "Intervention d’urgence") */
.cesa-pack .cesa-pack-urgent,
.cesa-pack .urgent-pack,
.cesa-pack div[style*="Intervention d’urgence"] {
  margin-top: 10px !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(220, 38, 38, 0.22) !important;
  background: rgba(254, 226, 226, 0.55) !important;
  color: #7f1d1d !important;
  font-size: 0.9rem;
  line-height: 1.35;
}
.cesa-pack .cesa-pack-urgent strong {
  display: block;
  font-weight: 900 !important;
  margin-bottom: 4px;
}

/* Bouton supprimer */
.cesa-pack .btn.btn-outline-danger {
  border-radius: 10px !important;
  font-weight: 800 !important;
  padding: 8px 12px !important;
}
.cesa-pack .btn.btn-outline-danger:hover {
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.1);
}

/* Responsive */
@media (max-width: 576px) {
  .cesa-pack .d-flex.justify-content-between {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 10px;
  }
  .cesa-pack .d-flex.justify-content-between .text-muted {
    align-self: stretch;
    width: 100%;
    text-align: left;
  }
  .cesa-pack-line {
    padding: 10px;
  }
}

.cesa-pack-cart-item {
  list-style: none;
}

.cesa-hidden-pack-line {
  display: none !important;
}

.cesa-pack-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.cesa-pack-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.cesa-pack-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.cesa-pack-card__title strong {
  color: #0f172a;
  line-height: 1.25;
}

.cesa-pack-card__badge {
  flex: 0 0 auto;
  border: 1px solid #78dbe2;
  border-radius: 4px;
  background: #e7fbfd;
  color: #008c9a;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  padding: 3px 8px;
  text-transform: uppercase;
}

.cesa-pack-card__total {
  flex: 0 0 auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #0f172a;
  padding: 8px 12px;
  min-width: 120px;
  text-align: left;
}

.cesa-pack-card__total span {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.cesa-pack-card__products {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.cesa-pack-card__line {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.cesa-pack-card__image {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cesa-pack-card__image img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.cesa-pack-card__info {
  min-width: 0;
}

.cesa-pack-card__name {
  color: #0f172a;
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.25;
}

.cesa-pack-card__price {
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 650;
  margin-top: 3px;
}

.cesa-pack-card__meta {
  border: 1px solid #edf2f7;
  border-radius: 7px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.84rem;
  line-height: 1.3;
  margin-top: 8px;
  padding: 8px 10px;
}

.cesa-pack-card__warning {
  border: 1px solid rgba(220, 38, 38, 0.24);
  border-radius: 7px;
  background: rgba(254, 226, 226, 0.58);
  color: #7f1d1d;
  font-size: 0.84rem;
  line-height: 1.35;
  margin-top: 8px;
  padding: 9px 10px;
}

.cesa-pack-card__expired {
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 7px;
  background: #fff1f1;
  color: #991b1b;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
  margin-top: 8px;
  padding: 9px 10px;
}

.cesa-renew-rdv-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
}

.cesa-renew-rdv-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .58);
}

.cesa-renew-rdv-box {
  position: relative;
  width: min(920px, calc(100vw - 28px));
  max-height: calc(100vh - 60px);
  overflow: auto;
  margin: 30px auto;
  padding: 18px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.cesa-renew-rdv-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: #f1f5f9;
  border-radius: 999px;
  width: 32px;
  height: 32px;
}

.cesa-renew-rdv-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.cesa-renew-rdv-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.cesa-renew-rdv-day {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
}

.cesa-renew-slot {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  background: #fff;
  text-align: left;
}

.cesa-renew-slot strong,
.cesa-renew-slot span,
.cesa-renew-slot em {
  display: block;
}

.cesa-renew-slot strong {
  font-size: 20px;
}

.cesa-pack-card__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

@media (max-width: 576px) {
  .cesa-pack-card__header {
    flex-direction: column;
  }

  .cesa-pack-card__total {
    width: 100%;
  }
}
