:root {
  --cesa: #18b4be;
  --txt: #111827;
  --muted: #6b7280;
  --bd: #e5e7eb;
  --bg: #ffffff;
  --soft: #f8fafc;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* ==========================================================
   LAYOUT
   ========================================================== */
.cesardv-wrap {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.cesardv-card {
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.cesardv-card-title {
  font-weight: 800;
  color: var(--txt);
  font-size: 18px;
  margin-bottom: 12px;
}

.cesardv-step-title {
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 10px;
  color: var(--txt);
}

/* ==========================================================
   ALERTS / INLINE ERROR
   ========================================================== */
.cesardv-alert {
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--bd);
  background: var(--soft);
  color: var(--txt);
}
.cesardv-alert-info {
  border-color: rgba(24, 180, 190, 0.25);
  background: rgba(24, 180, 190, 0.06);
}
.cesardv-alert-warning {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.08);
}

.cesardv-inline-error {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #78350f;
  font-size: 14px;
  font-weight: 700;
  display: none;
}

/* ==========================================================
   ADDRESS LIST
   ========================================================== */
.cesardv-address-list {
  display: grid;
  gap: 8px;
  background: #f9fafb;
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 10px;
}

.cesardv-radio {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--bd);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.cesardv-radio:hover {
  border-color: rgba(24, 180, 190, 0.45);
}
.cesardv-radio input {
  margin-top: 3px;
}
.cesardv-radio-text {
  line-height: 1.25;
}
.cesardv-radio-alias {
  font-weight: 800;
  color: var(--txt);
}
.cesardv-radio-sep {
  color: var(--muted);
  margin: 0 6px;
}
.cesardv-radio-addr {
  color: #1f2937;
}

.cesardv-btn {
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  border: 1px solid var(--bd);
  background: #fff;
  cursor: pointer;
}
.cesardv-btn-outline {
  border-color: rgba(24, 180, 190, 0.5);
  color: var(--cesa);
}
.cesardv-btn-outline:hover {
  background: rgba(24, 180, 190, 0.08);
}

.cesardv-label {
  display: block;
  font-weight: 700;
  margin: 10px 0 6px;
  color: var(--txt);
}
.cesardv-input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--bd);
  padding: 12px;
  outline: none;
}
.cesardv-input:focus {
  border-color: rgba(24, 180, 190, 0.65);
  box-shadow: 0 0 0 3px rgba(24, 180, 190, 0.12);
}

.cesardv-suggestions {
  border: 1px solid var(--bd);
  border-radius: 8px;
  max-height: none;
  overflow-y: auto;
  margin-top: 8px;
  display: none;
  background: #fff;
  position: relative;
  z-index: 10001;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}
.cesardv-suggestions > div {
  padding: 11px 12px;
  cursor: pointer;
  border-top: 1px solid #f0f0f0;
  color: #1f2933;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}
.cesardv-suggestions > div:first-child {
  border-top: 0;
}
.cesardv-suggestions > div:hover {
  background: rgba(24, 180, 190, 0.08);
}
.cesardv-msg {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 600;
}

/* ==========================================================
   URGENT
   ========================================================== */
.cesardv-urgent-wrap {
  margin: 10px 0 12px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--soft);
  border: 1px solid var(--bd);
}
.cesardv-urgent-label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.cesardv-urgent-legal {
  font-size: 13px;
  color: #374151;
}

/* ==========================================================
   PLANNING NAV
   ========================================================== */
.cesardv-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.cesardv-week-label {
  font-weight: 800;
  color: var(--txt);
}

.cesardv-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--bd);
  background: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.cesardv-nav-btn:hover {
  border-color: rgba(24, 180, 190, 0.5);
  background: rgba(24, 180, 190, 0.06);
}
.cesardv-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================================
   PLANNING GRID
   ========================================================== */
.cesardv-grid {
  --cesardv-cols: 7; /* écrasé dynamiquement par le JS selon le nb de jours travaillés */
  display: grid;
  grid-template-columns: repeat(var(--cesardv-cols), minmax(0, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.cesardv-day {
  min-width: 0;
  background: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 4px 9px;
}
.cesardv-day-head {
  text-align: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf0f3;
}
.cesardv-dow {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cesa-primary, #007c92);
}
.cesardv-dom {
  font-size: 1.35rem;
  font-weight: 900;
  margin-top: 1px;
  line-height: 1;
  color: var(--txt, #0b1f33);
}
.cesardv-month {
  font-size: 0.6rem;
  color: var(--muted, #888);
  margin-top: 1px;
}

.cesardv-slots {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cesardv-slot-btn {
  border: 1px solid #dfe5ea;
  background: #fff;
  border-radius: 8px;
  /* padding-top 18px = espace libre pour l'étoile absolute (top:4px + taille ~10px + marge) */
  padding: 18px 5px 8px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1.2;
  text-align: center;
  position: relative;
  width: 100%;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.cesardv-slot-btn:hover {
  border-color: rgba(24, 180, 190, 0.65);
  background: #f2fcfd;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.09);
}

.cesardv-slot-btn.is-best-price .cesardv-slot-total {
  color: var(--cesa-primary, #007c92);
}
.cesardv-slot-btn.is-best-price:hover {
  border-color: var(--cesa-primary, #007c92);
  background: var(--cesa-primary, #007c92);
  color: #fff;
}
.cesardv-slot-btn.is-best-price:hover .cesardv-slot-start,
.cesardv-slot-btn.is-best-price:hover .cesardv-slot-end,
.cesardv-slot-btn.is-best-price:hover .cesardv-slot-total {
  color: #fff;
}
/* Créneau multi-jours : hauteur auto */
.cesardv-slot-btn.is-multi-day {
  height: auto;
}
.cesardv-slot-btn.is-multi-day .cesardv-slot-end {
  font-size: 0.58rem;
  line-height: 1.3;
  word-break: break-word;
}
.cesardv-slot-btn.is-selected {
  border-color: var(--cesa, #18b4be);
  border-width: 2px;
  background: #eefbfc;
  box-shadow: 0 0 0 3px rgba(24, 180, 190, 0.18);
}
.cesardv-slot-btn.is-selected .cesardv-slot-start,
.cesardv-slot-btn.is-selected .cesardv-slot-total {
  color: var(--cesa, #18b4be);
}

.cesardv-slot-top {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}
.cesardv-slot-plus,
.cesardv-slot-eq {
  color: var(--muted, #888);
  font-weight: 700;
  font-size: 0.65rem;
}
.cesardv-slot-bottom {
  margin-top: 2px;
  color: var(--muted, #888);
  font-weight: 700;
  font-size: 0.65rem;
}
.cesardv-slot-bottom strong {
  color: var(--txt, #0b1f33);
  font-size: 0.7rem;
}

.cesardv-slot-start {
  display: block;
  color: var(--txt, #0b1f33);
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.01em;
}
.cesardv-slot-end {
  color: #697586;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.2;
}
.cesardv-slot-total {
  margin-top: 2px;
  color: #0996a1;
  font-size: 0.7rem;
  font-weight: 900;
}

/* ── Étoiles et badge meilleur prix ── */
/* Surcharge front.css : on les remet en haut à droite avec des valeurs adaptées */
.cesardv-stars,
.cesardv-badge-best {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 0.7rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cesardv-stars--1,
.cesardv-stars--2,
.cesardv-badge-best {
  color: #e69500;
}
.cesardv-slot-btn.is-selected .cesardv-stars,
.cesardv-slot-btn.is-selected .cesardv-badge-best,
.cesardv-slot-btn:hover .cesardv-stars,
.cesardv-slot-btn:hover .cesardv-badge-best {
  color: #fff;
}

/* ── Bouton "plus de créneaux" ── */
.cesardv-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  margin-top: 4px;
  padding: 4px 6px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
  font-size: 0.62rem;
  font-weight: 700;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.cesardv-more-btn:hover {
  background: #eefbfc;
  border-color: rgba(24, 180, 190, 0.5);
  color: #0996a1;
}

/* ==========================================================
   RDV (OPTION B : empty/content)
   IMPORTANT: pas d'overlay dans cette version
   ========================================================== */
.cesardv-rdv {
  position: relative;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--bd);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  padding: 10px;
  transition: all 0.25s ease;
}

.cesardv-rdv--disabled {
  opacity: 0.85;
}

.cesardv-rdv--disabled .cesardv-rdv-content {
  display: none;
}

.cesardv-rdv--disabled .cesardv-rdv-empty {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 120px;
}

.cesardv-rdv-empty-card {
  padding: 14px 18px;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  color: #374151;
  font-size: 14px;
  text-align: center;
}

.cesardv-rdv:not(.cesardv-rdv--disabled) .cesardv-rdv-empty {
  display: none;
}
.cesardv-rdv:not(.cesardv-rdv--disabled) .cesardv-rdv-content {
  display: block;
}

/* ==========================================================
   MODAL INFO (CITY_NOT_ALLOWED, erreurs visiteur)
   ========================================================== */
#cesardv-info-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  padding: 20px;
  overflow: auto;
  background: rgba(17, 24, 39, 0.56);
  backdrop-filter: blur(4px);
}
#cesardv-info-modal .cesardv-modal-card {
  width: 100%;
  max-width: 440px;
  margin: 80px auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
#cesardv-info-modal .cesardv-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #eef2f7;
}
#cesardv-info-modal .cesardv-modal-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--txt);
}
#cesardv-info-modal .cesardv-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
}
#cesardv-info-modal .cesardv-modal-close:hover {
  background: #f3f4f6;
}
#cesardv-info-modal .cesardv-modal-body {
  padding: 16px 18px 8px;
}
#cesardv-info-modal .cesardv-modal-msg {
  font-size: 14px;
  line-height: 1.55;
  color: var(--txt);
}
#cesardv-info-modal .cesardv-modal-footer {
  padding: 12px 18px 16px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #eef2f7;
}
#cesardv-info-modal .cesardv-modal-ok {
  background: var(--cesa);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 22px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
#cesardv-info-modal .cesardv-modal-ok:hover {
  background: #14a2ab;
}
@media (max-width: 420px) {
  #cesardv-info-modal { padding: 12px; }
  #cesardv-info-modal .cesardv-modal-card { margin: 40px auto; }
}

/* ==========================================================
   MODAL
   ========================================================== */
#cesardv-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  padding: 22px;
  overflow: auto;
  background: rgba(17, 24, 39, 0.56);
  backdrop-filter: blur(4px);
}

#cesardv-modal .cesardv-modal-card {
  width: 100%;
  max-width: 620px;
  margin: 60px auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: translateY(8px);
  animation: cesardvModalIn 180ms ease-out forwards;
}

@keyframes cesardvModalIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#cesardv-modal .cesardv-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
  border-bottom: 1px solid #eef2f7;
}

#cesardv-modal .cesardv-modal-title {
  font-weight: 900;
  font-size: 16px;
  color: var(--txt);
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
#cesardv-modal .cesardv-modal-title::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--cesa);
  box-shadow: 0 0 0 4px rgba(24, 180, 190, 0.14);
}

#cesardv-modal .cesardv-modal-close {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--bd);
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  color: var(--txt);
  transition:
    transform 0.12s ease,
    border-color 0.12s ease,
    background 0.12s ease,
    box-shadow 0.12s ease;
}
#cesardv-modal .cesardv-modal-close:hover {
  border-color: rgba(24, 180, 190, 0.55);
  background: rgba(24, 180, 190, 0.06);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(24, 180, 190, 0.12);
}
#cesardv-modal .cesardv-modal-close:active {
  transform: translateY(0);
}

#cesardv-modal .cesardv-modal-body {
  padding: 16px 18px 6px 18px;
}

#cesardv-modal .cesardv-modal-section {
  padding: 12px 0;
  border-bottom: 1px dashed #eef2f7;
}
#cesardv-modal .cesardv-modal-section:last-child {
  border-bottom: 0;
}

#cesardv-modal .cesardv-modal-k {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
#cesardv-modal .cesardv-modal-v {
  font-size: 14px;
  font-weight: 800;
  color: var(--txt);
  line-height: 1.35;
}

#cesardv-modal .cesardv-modal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 520px) {
  #cesardv-modal .cesardv-modal-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

#cesardv-modal .cesardv-modal-box {
  border: 1px solid var(--bd);
  border-radius: 16px;
  padding: 12px;
  background: #fcfcfd;
}

#cesardv-modal .cesardv-modal-dates strong,
#cesardv-modal .cesardv-modal-price strong {
  font-weight: 900;
  color: #0f172a;
}
#cesardv-modal .cesardv-modal-price strong {
  font-size: 18px;
}

#cesardv-modal .cesardv-modal-urgent {
  display: none;
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(185, 28, 28, 0.22);
  background: rgba(254, 226, 226, 0.55);
  color: #991b1b;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.35;
}

#cesardv-modal .cesardv-modal-msg {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(185, 28, 28, 0.2);
  background: rgba(254, 226, 226, 0.55);
  color: #991b1b;
  font-weight: 800;
  font-size: 13px;
}

#cesardv-modal .cesardv-modal-footer {
  padding: 14px 18px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
  border-top: 1px solid #eef2f7;
}

#cesardv-modal .cesardv-btn:active {
  transform: translateY(1px);
}

#cesardv-modal .cesardv-modal-cancel {
  background: #fff;
  border-color: var(--bd);
  color: var(--txt);
}
#cesardv-modal .cesardv-modal-cancel:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

#cesardv-modal .cesardv-modal-confirm {
  background-color: var(--cesa);
  border-color: var(--cesa);
  color: #fff;
  box-shadow: 0 12px 26px rgba(24, 180, 190, 0.18);
}
#cesardv-modal .cesardv-modal-confirm:hover {
  background-color: #14a2ab;
  border-color: #14a2ab;
  box-shadow: 0 16px 34px rgba(24, 180, 190, 0.22);
}
#cesardv-modal .cesardv-modal-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 420px) {
  #cesardv-modal {
    padding: 14px;
  }
  #cesardv-modal .cesardv-modal-card {
    margin: 36px auto;
    border-radius: 16px;
  }
}

.cesardv-slot-btn.is-hidden-slot {
  display: none;
}

.cesardv-half {
  margin-bottom: 8px;
}
.cesardv-half:last-child {
  margin-bottom: 0;
}
.cesardv-half-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cesardv-half-title {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #9ca3af;
  margin: 4px 0 5px;
}

.cesardv-show-more {
  margin-top: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.cesardv-show-more-day {
  margin-top: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

/* ================================
   CESARDV SUMMARY (adresse/créneau/produits)
   ================================ */

.cesardv-summary {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

/* 3 lignes = grille (label / valeur) */
.cesardv-summary-line {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed #e5e7eb;
}
.cesardv-summary-line:last-child {
  border-bottom: 0;
}

/* label */
.cesardv-summary-k {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
  padding-top: 2px;
}

/* valeur */
.cesardv-summary-v {
  font-size: 14px;
  color: #111827;
  line-height: 1.35;
}

/* valeur “Adresse” + “Créneau” un peu plus visibles */
.cesardv-summary-address,
.cesardv-summary-slot {
  font-weight: 600;
}

/* Produits : liste propre */
.cesardv-summary-products-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

/* Chaque produit en “pill” */
.cesardv-summary-products-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  background: #f9fafb;
}

/* Puce visuelle */
.cesardv-summary-products-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 999px;
  background: #18b4be; /* ta couleur */
  flex: 0 0 8px;
}

/* Si tu utilises la version texte (join " + ") */
.cesardv-summary-products {
  white-space: normal;
}

/* Responsive */
@media (max-width: 520px) {
  .cesardv-summary-line {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .cesardv-summary-k {
    padding-top: 0;
  }
}

.cesardv-summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* RDV = produit principal */
.cesardv-summary-item--rdv {
  border-left: 4px solid var(--cesa);
  background: #ecfeff;
  padding: 10px 12px;
}

/* titre RDV */
.cesardv-summary-item-title {
  font-weight: 900;
  color: var(--txt);
}

/* lignes internes */
.cesardv-summary-item-line {
  font-size: 13px;
  color: #374151;
  line-height: 1.35;
}

/* Urgence */
.cesardv-summary-item--urgent {
  border-left: 4px solid #dc2626;
  background: #fee2e2;
  color: #7f1d1d;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.35;
}

.cesardv-summary-products-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.cesardv-summary-products-list li {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #f9fafb;
  align-items: flex-start;
}

/* zone icône */
.cesardv-sum-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  color: var(--cesa);
}
.cesardv-sum-ico svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* item RDV */
.cesardv-summary-item--rdv {
  background: #ecfeff;
  border-left: 4px solid var(--cesa);
}

/* item Urgence */
.cesardv-summary-item--urgent {
  background: #fee2e2;
  border-left: 4px solid #dc2626;
  color: #7f1d1d;
  font-weight: 800;
}

/* contenus internes */
.cesardv-sum-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cesardv-sum-title {
  font-weight: 900;
  color: var(--txt);
}
.cesardv-sum-line {
  font-size: 13px;
  color: #374151;
  line-height: 1.35;
  display: flex;
  gap: 8px;
}
.cesardv-summary-item--urgent .cesardv-sum-line {
  color: #7f1d1d;
}
.cesardv-summary-item--urgent .cesardv-sum-ico {
  color: #dc2626;
}

/* ================================
   SUMMARY 2 COLS (left products + right total/cta)
   ================================ */

.cesardv-summary--2col {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 8px;
  align-items: start;
}

.cesardv-summary-left {
  min-width: 0;
}

.cesardv-summary-right {
  position: sticky;
  top: 14px; /* ajuste si header sticky */
  align-self: start;
}

.cesardv-summary-total-card {
  background: #fff;
  border: 1px solid var(--bd);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.cesardv-summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0 10px;
  border-bottom: 1px dashed var(--bd);
  margin-bottom: 10px;
  font-weight: 900;
  color: var(--txt);
}

#cesardv-summary-total {
  font-size: 18px;
  color: var(--txt);
}

.cesardv-summary-total-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

/* mobile : stack */
@media (max-width: 820px) {
  .cesardv-summary--2col {
    grid-template-columns: 1fr;
  }
  .cesardv-summary-right {
    position: static;
  }
}

.cesardv-summary--2col {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 8px;
  align-items: start;
}

.cesardv-summary-right {
  position: sticky;
  top: 14px;
  align-self: start;
}

.cesardv-summary-total-card {
  background: #fff;
  border: 1px solid var(--bd);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.cesardv-summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0 10px;
  border-bottom: 1px dashed var(--bd);
  margin-bottom: 10px;
  font-weight: 900;
  color: var(--txt);
}

#cesardv-summary-total {
  font-size: 18px;
}

.cesardv-btn-primary {
  width: 100%;
}
.cesardv-btn-primary:hover {
  background: #14a2ab;
  border-color: #14a2ab;
}
.cesardv-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 820px) {
  .cesardv-summary--2col {
    grid-template-columns: 1fr;
  }
  .cesardv-summary-right {
    position: static;
  }
}

/* ==========================================================
   CESA MODAL (ajout panier) - à coller EN FIN de fichier
   HTML attendu :
   <div id="cesa-modal" class="cesa-modal">
     <div class="cesa-modal-backdrop"></div>
     <div class="cesa-modal-box">...</div>
   </div>
   ========================================================== */

#cesa-modal.cesa-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none; /* tu fais modal.style.display="block" en JS */
  padding: 18px;
}

#cesa-modal .cesa-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(4px);
}

#cesa-modal .cesa-modal-box {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 8vh auto 0 auto;
  background: #fff;
  border: 1px solid var(--bd);
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transform: translateY(10px) scale(0.99);
  opacity: 0;
  animation: cesaModalIn 180ms ease-out forwards;
}

@keyframes cesaModalIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header */
#cesa-modal .cesa-modal-box h3 {
  margin: 0;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 16px;
  color: var(--txt);
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
  border-bottom: 1px solid #eef2f7;
}

#cesa-modal .cesa-modal-box h3 i.material-icons {
  color: var(--cesa);
}

/* Liste produits */
#cesa-modal-products {
  padding: 14px 18px 6px 18px;
  display: grid;
  gap: 8px;
  max-height: min(46vh, 420px);
  overflow: auto;
}

#cesa-modal-products::-webkit-scrollbar {
  width: 10px;
}
#cesa-modal-products::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 999px;
  border: 2px solid #fff;
}

#cesa-modal .cesa-modal-product {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  background: #f9fafb;
}

#cesa-modal .cesa-modal-product img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: #fff;
  border: 1px solid #e5e7eb;
  flex: 0 0 44px;
}

#cesa-modal .cesa-modal-product strong {
  font-weight: 900;
  color: var(--txt);
  line-height: 1.2;
}

#cesa-modal .cesa-modal-product div {
  color: #374151;
  font-size: 13px;
  line-height: 1.25;
}

/* Footer actions */
#cesa-modal .cesa-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 14px 18px 18px 18px;
  border-top: 1px solid #eef2f7;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
}

#cesa-modal .cesa-modal-actions .btn {
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 900;
  font-size: 14px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

/* Bouton primaire */
#cesa-modal .cesa-modal-actions .btn.btn-primary {
  background: var(--cesa);
  border-color: var(--cesa);
  color: #fff;
  box-shadow: 0 12px 26px rgba(24, 180, 190, 0.18);
}
#cesa-modal .cesa-modal-actions .btn.btn-primary:hover {
  background: #14a2ab;
  border-color: #14a2ab;
  box-shadow: 0 16px 34px rgba(24, 180, 190, 0.22);
}

/* Bouton secondaire */
#cesa-modal .cesa-modal-actions .btn.btn-secondary {
  background: #fff;
  border-color: var(--bd);
  color: var(--txt);
}
#cesa-modal .cesa-modal-actions .btn.btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

/* Responsive */
@media (max-width: 520px) {
  #cesa-modal.cesa-modal {
    padding: 12px;
  }
  #cesa-modal .cesa-modal-box {
    margin-top: 6vh;
    border-radius: 16px;
  }
  #cesa-modal .cesa-modal-actions {
    flex-direction: column;
  }
  #cesa-modal .cesa-modal-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

#cesa-modal .cesa-modal-rdv {
  margin: 0 18px 12px 18px;
  padding: 12px 12px;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  background: #ecfeff;
  border-left: 4px solid var(--cesa);
}

#cesa-modal .cesa-modal-rdv-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  color: var(--txt);
  margin-bottom: 8px;
}

#cesa-modal .cesa-modal-rdv-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--cesa);
  box-shadow: 0 0 0 4px rgba(24, 180, 190, 0.14);
}

#cesa-modal .cesa-modal-rdv-line {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: #374151;
  font-size: 13px;
  line-height: 1.35;
  margin-top: 6px;
}

#cesa-modal .cesa-modal-rdv-ico {
  width: 22px;
  flex: 0 0 22px;
  text-align: center;
  margin-top: 1px;
}

#cesa-modal .cesa-modal-rdv-urgent {
  margin-top: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(185, 28, 28, 0.18);
  background: rgba(254, 226, 226, 0.55);
  color: #7f1d1d;
  font-weight: 800;
  font-size: 12.5px;
  line-height: 1.35;
}

/* Accordéon */
.cesardv-acc-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  background: transparent;
  border: 0;
  text-align: left;
  padding: 0; /* si ton .cesardv-step-title gère déjà */
}

.cesardv-acc-chevron {
  display: inline-block;
  transform: rotate(90deg);
  transition: transform 0.2s ease;
  font-size: 18px;
  line-height: 1;
}

.cesardv-acc-item:not(.is-open) .cesardv-acc-chevron {
  transform: rotate(0deg);
}

.cesardv-acc-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
}

/* Modal panier : rendu compact avec vraies vignettes produit */
#cesa-modal .cesa-modal-box {
  max-width: 560px;
  border-color: #dbe4ee;
  border-radius: 16px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

#cesa-modal .cesa-modal-box h3 {
  padding: 18px 20px;
  background: #fff;
}

#cesa-modal-products {
  padding: 14px 18px 8px 18px;
  gap: 8px;
}

#cesa-modal .cesa-modal-product {
  gap: 8px;
  min-height: 76px;
  padding: 12px 14px;
  border-color: #e4ebf3;
  border-radius: 13px;
  background: #f8fafc;
}

#cesa-modal .cesa-modal-product-img {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #e1e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.08);
}

#cesa-modal .cesa-modal-product-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: #fff;
  flex: none;
}

#cesa-modal .cesa-modal-product-img-empty {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f4f7fa, #ffffff);
  box-shadow: inset 0 0 0 1px #eef2f7;
}

#cesa-modal .cesa-modal-product-main {
  min-width: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.25;
}

#cesa-modal .cesa-modal-product-main strong {
  display: block;
  color: #111827;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 3px;
}

#cesa-modal .cesa-modal-rdv {
  margin-top: 0;
  border-color: #b9eef2;
  background: #ecfeff;
}

/* Quand ouvert, on laisse le JS fixer la max-height */
.cesardv-acc-item.is-open .cesardv-acc-panel {
  /* max-height défini par JS */
}

.cesardv-grid[data-cols="1"],
.cesardv-grid[data-cols="2"],
.cesardv-grid[data-cols="3"],
.cesardv-grid[data-cols="4"],
.cesardv-grid[data-cols="5"] {
  grid-template-columns: repeat(var(--cesardv-cols), minmax(0, 1fr));
  overflow-x: visible;
}

.cesardv-grid[data-cols="1"] .cesardv-day,
.cesardv-grid[data-cols="2"] .cesardv-day,
.cesardv-grid[data-cols="3"] .cesardv-day,
.cesardv-grid[data-cols="4"] .cesardv-day,
.cesardv-grid[data-cols="5"] .cesardv-day {
  min-width: 0;
}

.cesardv-grid[data-cols="6"],
.cesardv-grid[data-cols="7"] {
  grid-template-columns: repeat(var(--cesardv-cols), minmax(82px, 1fr));
  overflow-x: auto;
}

/* ==========================================================
   CESA MODAL (ajout panier)
   ========================================================== */

#cesa-modal.cesa-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  padding: 18px;
}

#cesa-modal .cesa-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(4px);
}

#cesa-modal .cesa-modal-box {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 8vh auto 0 auto;
  background: #fff;
  border: 1px solid var(--bd);
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transform: translateY(10px) scale(0.99);
  opacity: 0;
  animation: cesaModalIn 180ms ease-out forwards;
}

@keyframes cesaModalIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

#cesa-modal .cesa-modal-box h3 {
  margin: 0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 16px;
  color: var(--txt);
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
  border-bottom: 1px solid #eef2f7;
}

#cesa-modal .cesa-modal-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0 2px;
}
#cesa-modal .cesa-modal-close:hover { color: var(--txt); }

#cesa-modal-products {
  padding: 14px 18px 6px 18px;
  display: grid;
  gap: 10px;
  max-height: min(46vh, 420px);
  overflow: auto;
}
#cesa-modal-products::-webkit-scrollbar { width: 10px; }
#cesa-modal-products::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 999px;
  border: 2px solid #fff;
}

#cesa-modal .cesa-modal-product {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  background: #f9fafb;
}
#cesa-modal .cesa-modal-product-img {
  flex: 0 0 44px;
}
#cesa-modal .cesa-modal-product-img img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: #fff;
  border: 1px solid #e5e7eb;
  display: block;
}
#cesa-modal .cesa-modal-product-img-empty {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}
#cesa-modal .cesa-modal-product-main strong {
  font-weight: 900;
  color: var(--txt);
  line-height: 1.2;
  display: block;
}
#cesa-modal .cesa-modal-product-main {
  color: #374151;
  font-size: 13px;
  line-height: 1.35;
}

#cesa-modal .cesa-modal-rdv {
  margin: 4px 18px 12px 18px;
  padding: 12px;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  background: #ecfeff;
  border-left: 4px solid var(--cesa);
}
#cesa-modal .cesa-modal-rdv-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--txt);
  margin-bottom: 8px;
}
#cesa-modal .cesa-modal-rdv-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--cesa);
  box-shadow: 0 0 0 4px rgba(24, 180, 190, 0.14);
  flex-shrink: 0;
}
#cesa-modal .cesa-modal-rdv-line {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: #374151;
  font-size: 13px;
  line-height: 1.35;
  margin-top: 6px;
}
#cesa-modal .cesa-modal-rdv-ico {
  flex: 0 0 20px;
  text-align: center;
  margin-top: 1px;
}
#cesa-modal .cesa-modal-rdv-urgent {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(185, 28, 28, 0.18);
  background: rgba(254, 226, 226, 0.55);
  color: #7f1d1d;
  font-weight: 800;
  font-size: 12.5px;
  line-height: 1.35;
}

#cesa-modal .cesa-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 14px 18px 18px 18px;
  border-top: 1px solid #eef2f7;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
}
#cesa-modal .cesa-modal-actions .btn {
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 900;
  font-size: 14px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
}
#cesa-modal .cesa-modal-actions .btn.btn-primary {
  background: var(--cesa);
  border-color: var(--cesa);
  color: #fff;
  box-shadow: 0 12px 26px rgba(24, 180, 190, 0.18);
}
#cesa-modal .cesa-modal-actions .btn.btn-primary:hover {
  background: #14a2ab;
  border-color: #14a2ab;
}
#cesa-modal .cesa-modal-actions .btn.btn-secondary {
  background: #fff;
  border-color: var(--bd);
  color: var(--txt);
}
#cesa-modal .cesa-modal-actions .btn.btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

@media (max-width: 520px) {
  #cesa-modal.cesa-modal { padding: 12px; }
  #cesa-modal .cesa-modal-box { margin-top: 6vh; border-radius: 16px; }
  #cesa-modal .cesa-modal-actions { flex-direction: column; }
  #cesa-modal .cesa-modal-actions .btn { width: 100%; justify-content: center; }
}