/* ── ALERTE FERMETURE ───────────────────────────────────────── */
.cmd-absence-alert {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-left: 4px solid #f59e0b;
  padding: 18px 22px;
  margin-bottom: 24px;
  font-size: 14.5px;
  color: #4a3000;
  line-height: 1.6;
}
.cmd-absence-alert i { color: #f59e0b; font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.cmd-absence-alert strong { color: #3d2900; }
.cmd-absence-alert span { font-size: 13px; color: #7a6000; font-style: italic; }

/* ── INTRO ─────────────────────────────────────────────────── */
.cmd-intro {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fdf8f2;
  border: 1px solid #f0dfc0;
  border-left: 4px solid var(--orange);
  padding: 16px 20px;
  margin-bottom: 32px;
  border-radius: 2px;
}
.cmd-intro i { color: var(--orange); font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.cmd-intro p { margin: 0; font-size: 14.5px; color: #444; line-height: 1.6; }

/* ── LAYOUT ─────────────────────────────────────────────────── */
.cmd-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-rows: auto auto;
  gap: 28px;
  align-items: start;
}
.cmd-form-col  { grid-column: 1; grid-row: 1 / 3; }
.cmd-stores-col { grid-column: 2; grid-row: 1; }
.cmd-help-col  { grid-column: 2; grid-row: 2; }

/* ── FORM SHELL (réplique contact.css) ─────────────────────── */
.form-shell {
  background: #fff;
  padding: 40px 44px 36px;
  border: 1px solid #e6e6e6;
  box-shadow: 0 14px 40px -20px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.04);
  position: relative;
}
.form-shell::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 56px; height: 3px;
  background: var(--orange);
}
.form-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--orange); margin: 0 0 8px;
}
.form-h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500; font-size: 30px;
  margin: 0 0 8px; color: #1d1d1d;
}
.form-intro {
  color: #5a5a5a; font-size: 14.5px;
  line-height: 1.55; margin: 0 0 28px;
}

/* ── GRILLE CHAMPS ───────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 22px;
}
.form-grid .full { grid-column: 1 / -1; }

.ff { position: relative; display: flex; flex-direction: column; }
.ff label {
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: #666; margin-bottom: 7px;
}
.ff label .req { color: var(--orange); margin-left: 2px; }

.ff .input-wrap { position: relative; }
.ff .input-wrap > i {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: #b5b5b5; font-size: 14px;
  pointer-events: none; transition: color .2s;
}
.ff input,
.ff select,
.ff textarea {
  width: 100%;
  border: 1px solid #dcdcdc;
  background: #fafafa;
  padding: 13px 14px 13px 42px;
  font-size: 14.5px; font-family: inherit;
  color: #1d1d1d; outline: none;
  transition: all .18s; border-radius: 2px;
}
.ff textarea {
  padding: 13px 14px;
  min-height: 130px;
  resize: vertical; line-height: 1.5;
}
.ff select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer; padding-right: 36px;
}
.ff input[type="number"] { padding-right: 14px; }
.ff input:hover, .ff select:hover, .ff textarea:hover {
  border-color: #c4c4c4; background: #fff;
}
.ff input:focus, .ff select:focus, .ff textarea:focus {
  border-color: var(--orange); background: #fff;
  box-shadow: 0 0 0 3px rgba(232,155,42,0.15);
}
.ff .input-wrap:focus-within > i { color: var(--orange); }

/* États is-error / is-valid */
.ff.is-error .input-wrap > i { color: #c0392b; }
.ff.is-error input, .ff.is-error select, .ff.is-error textarea {
  border-color: #e57373; background: #fff8f8;
}
.ff.is-error input:focus, .ff.is-error select:focus, .ff.is-error textarea:focus {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192,57,43,0.12);
}
.ff.is-valid .input-wrap > i { color: #2e7d32; }
.ff.is-valid input, .ff.is-valid select {
  border-color: #81c784; background: #f6fff6;
}

.field-error {
  display: block; min-height: 18px;
  font-size: 12px; color: #c0392b;
  margin-top: 5px; padding-left: 2px;
}

.char-count {
  position: absolute; right: 10px; bottom: 10px;
  font-size: 11px; color: #aaa; background: #fff;
  padding: 1px 6px; pointer-events: none;
}

/* ── PANIER ──────────────────────────────────────────────────── */
.cart-add-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 10px;
}
.cart-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--orange);
  border: 1px solid var(--orange);
  color: #1d1d1d;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 0 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
  flex-shrink: 0;
}
.cart-add-btn:hover { background: #f4ae44; border-color: #f4ae44; }
.cart-add-btn i { font-size: 11px; }

.cart-empty {
  padding: 14px 16px;
  background: #fafafa;
  border: 1px dashed #ddd;
  color: #aaa;
  font-size: 13px;
  text-align: center;
}

.cart-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid #e6e6e6;
  display: none;
}
.cart-list:not(:empty) { display: block; }

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}
.cart-item:last-child { border-bottom: none; }
.cart-item:nth-child(even) { background: #fafafa; }

.cart-item-name {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #1d1d1d;
  overflow-wrap: break-word;
}
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #666;
  flex-shrink: 0;
}
.cart-item-qty i { color: var(--orange); font-size: 11px; }
.cart-qty-input {
  width: 56px;
  border: 1px solid #dcdcdc;
  background: #fafafa;
  padding: 5px 8px;
  font-size: 13px;
  font-family: inherit;
  color: #1d1d1d;
  text-align: center;
  outline: none;
  transition: border-color .18s;
  border-radius: 2px;
}
.cart-qty-input:focus { border-color: var(--orange); background: #fff; box-shadow: 0 0 0 3px rgba(232,155,42,0.15); }

.cart-remove-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #aaa;
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.cart-remove-btn:hover { background: #fdf2f2; border-color: #f1bcbc; color: #c0392b; }

/* ── CONSENTEMENT ────────────────────────────────────────────── */
.consent-row {
  display: flex; align-items: flex-start; gap: 14px;
  margin: 24px 0 0; padding: 16px;
  background: #fafafa; border: 1px solid #ececec; border-radius: 2px;
}
.consent-row .switch {
  flex-shrink: 0; width: 42px; height: 22px;
  background: #d0d0d0; border-radius: 999px;
  position: relative; cursor: pointer;
  transition: background .2s; margin-top: 2px;
}
.consent-row .switch::after {
  content: ""; position: absolute;
  top: 2px; left: 2px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform .2s;
}
.consent-row .switch.on { background: var(--orange); }
.consent-row .switch.on::after { transform: translateX(20px); }
.consent-row .text { font-size: 13px; color: #555; line-height: 1.5; }

/* ── FEEDBACK + SUBMIT ────────────────────────────────────────── */
.form-feedback {
  margin: 18px 0 0; padding: 12px 16px;
  font-size: 14px; border-radius: 2px; display: none;
}
.form-feedback--success {
  display: block; background: #edf7ed;
  color: #2e6e34; border: 1px solid #b6dfb8;
}
.form-feedback--error {
  display: block; background: #fdf2f2;
  color: #8b2020; border: 1px solid #f1bcbc;
}
.submit-row {
  display: flex; justify-content: space-between;
  align-items: center; margin-top: 26px; gap: 16px; flex-wrap: wrap;
}
.required-note { font-size: 12.5px; color: #888; }
.required-note .req { color: var(--orange); }
.submit-btn {
  background: var(--orange); border: 1px solid var(--orange);
  padding: 13px 32px; font-size: 13px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  font-family: inherit; cursor: pointer; color: #1d1d1d;
  display: inline-flex; align-items: center; gap: 10px;
  transition: all .18s;
}
.submit-btn:hover {
  background: #f4ae44; border-color: #f4ae44;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -8px rgba(232,155,42,0.6);
}
.submit-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; box-shadow: none; }
.submit-btn i { font-size: 12px; }
.submit-btns { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.back-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 24px; font-size: 13px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; font-family: inherit;
  border: 1px solid #bbb; color: #555; background: #fff;
  text-decoration: none; transition: all .18s;
}
.back-btn:hover { border-color: var(--orange); color: var(--orange); background: #fff; }
.back-btn i { font-size: 12px; }

/* ── SIDEBAR INFOS ────────────────────────────────────────────── */
.cmd-info-card {
  background: #fff;
  border: 1px solid #e6e6e6;
  padding: 22px 22px 24px;
  margin-bottom: 18px;
  position: relative;
}
.cmd-info-card::before {
  content: ""; position: absolute;
  top: 0; left: 0; width: 40px; height: 3px;
  background: var(--orange);
}
.cmd-card-title {
  display: flex; align-items: center; gap: 10px;
  font-family: "Cormorant Garamond", serif;
  font-weight: 500; font-size: 20px;
  color: #1d1d1d; margin: 0 0 16px;
}
.cmd-card-title i { color: var(--orange); font-size: 16px; }

/* Étapes "comment ça marche" */
.cmd-steps {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 14px;
}
.cmd-steps li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 13.5px; color: #333; line-height: 1.5;
}
.step-num {
  flex-shrink: 0; width: 24px; height: 24px;
  background: var(--orange); color: #1d1d1d;
  border-radius: 50%; font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}

/* Liste des magasins */
.cmd-store-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.cmd-store-item { display: flex; align-items: flex-start; gap: 10px; }
.cmd-store-dot {
  flex-shrink: 0; width: 10px; height: 10px;
  background: var(--orange); border-radius: 50%; margin-top: 5px;
}
.cmd-store-item strong { display: block; font-size: 13.5px; color: #1d1d1d; }
.cmd-store-item span { font-size: 12.5px; color: #777; }
.cmd-map-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600;
  color: var(--orange); text-decoration: underline;
  transition: color .15s;
}
.cmd-map-link:hover { color: var(--orange-deep, #d8851b); }

/* Téléphones */
.cmd-tels { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.cmd-tel-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; background: #fff;
  border: 1px solid var(--orange); color: var(--orange);
  font-size: 13.5px; font-weight: 600;
  transition: all .15s;
}
.cmd-tel-btn:hover { background: var(--orange); color: #1d1d1d; }
.cmd-contact-card p { font-size: 13.5px; color: #555; line-height: 1.55; margin: 0; }

/* ── STEPPER ──────────────────────────────────────────────────── */
.cmd-stepper {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid #ececec;
}
.cmd-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.cmd-step-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 2px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #bbb;
  transition: background .3s, border-color .3s, color .3s;
}
.cmd-step-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #bbb;
  white-space: nowrap;
  transition: color .3s;
}
.cmd-step-sep {
  flex: 1;
  height: 2px;
  background: #ddd;
  margin: 0 8px;
  margin-bottom: 20px;
  transition: background .3s;
}

/* Étape active */
.cmd-step-item--active .cmd-step-circle {
  background: #fff3e0;
  border-color: var(--orange);
  color: var(--orange);
}
.cmd-step-item--active .cmd-step-label { color: var(--orange); }

/* Étape terminée */
.cmd-step-item--done .cmd-step-circle {
  background: #2e7d32;
  border-color: #2e7d32;
  color: #fff;
}
.cmd-step-item--done .cmd-step-circle i { display: none; }
.cmd-step-item--done .cmd-step-circle::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 15px;
}
.cmd-step-item--done .cmd-step-label { color: #2e7d32; }
.cmd-step-item--done + .cmd-step-sep { background: #2e7d32; }

/* ── SECTIONS PROGRESSIVES ────────────────────────────────────── */
.cmd-section {
  margin-bottom: 8px;
}
.cmd-section--hidden {
  display: none;
}
.cmd-section--revealed {
  display: block;
  animation: sectionReveal 0.4s ease;
  border-top: 2px solid var(--orange);
  padding-top: 24px;
  margin-top: 24px;
}
@keyframes sectionReveal {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── BOUTON CONTINUER ──────────────────────────────────────────── */
.cmd-continue-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #ececec;
}
.cmd-continue-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--orange);
  border: none;
  color: #1d1d1d;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 14px 28px;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.cmd-continue-btn:hover { background: #f4ae44; transform: translateY(-1px); }
.cmd-continue-btn i { font-size: 12px; }

@media (max-width: 620px) {
  .cmd-stepper { margin-bottom: 22px; padding-bottom: 20px; }
  .cmd-step-label { font-size: 10px; }
  .cmd-step-circle { width: 36px; height: 36px; font-size: 14px; }
  .cmd-continue-wrap { justify-content: stretch; }
  .cmd-continue-btn { width: 100%; justify-content: center; }
}
@media (max-width: 360px) {
  .cmd-step-label { display: none; }
  .cmd-step-sep { margin: 0 4px 0; }
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .cmd-layout { grid-template-columns: 1fr; grid-template-rows: none; }
  .cmd-stores-col { grid-column: 1; grid-row: auto; order: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .cmd-form-col   { grid-column: 1; grid-row: auto; order: 2; }
  .cmd-help-col   { grid-column: 1; grid-row: auto; order: 3; }
  .cmd-info-card { margin-bottom: 0; }
}
@media (max-width: 620px) {
  .form-shell { padding: 24px 16px 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .cmd-stores-col { grid-template-columns: 1fr; }
  .submit-row { flex-direction: column; align-items: stretch; }
  .submit-btns { flex-direction: column; }
  .submit-btn, .back-btn { justify-content: center; }
}

@media (max-width: 360px) {
  .form-shell { padding: 16px 10px 14px; }
  .avail-creneaux { gap: 10px; }
  .avail-creneau { min-width: 0; width: 100%; }
  .cart-item { gap: 8px; padding: 8px 10px; }
  .cart-item-qty { gap: 4px; }
  .cart-qty-input { width: 46px; }
  .cmd-intro { padding: 12px 14px; }
}

/* Alerte planning : plats retirés du panier car non disponibles */
.planning-alert { display:flex; align-items:flex-start; gap:10px; background:#fff8e1; border:1px solid #ffe082; border-left:4px solid #f4c842; padding:12px 14px; font-size:13.5px; color:#5a4200; line-height:1.55; margin-top:12px; }
.planning-alert[hidden] { display:none; }
.planning-alert i { color:#f4c842; flex-shrink:0; margin-top:2px; }

/* ── BLOC DISPONIBILITÉS (commander.php) ────────────────────── */
.avail-block {
  background: #f0f7f0;
  border: 1px solid #c3e6cb;
  border-left: 4px solid #2e7d32;
  padding: 14px 18px 16px;
  border-radius: 2px;
}
.avail-block[hidden] { display: none; }
.avail-block-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: #1d4021;
  margin-bottom: 12px;
}
.avail-block-head i { color: #2e7d32; }
.avail-creneaux { display: flex; gap: 20px; flex-wrap: wrap; }
.avail-creneau { flex: 1; min-width: 140px; }
.avail-creneau-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #3a6a40;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.avail-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.avail-chip {
  display: inline-block;
  padding: 3px 10px;
  background: #fff;
  border: 1px solid #a5d6a7;
  border-radius: 99px;
  font-size: 12px;
  color: #2e7d32;
  font-weight: 500;
}
