/* ----------------------------------------------------------
   WPZ – Menu Traiteur
   Style complet (desktop + mobile, brand Iliade)
---------------------------------------------------------- */

.wpz-menu-traiteur-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 16px 110px;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  color: #111827;
}

/* Réduction padding sur très petit écran */
@media (min-width: 768px) {
  .wpz-menu-traiteur-wrap {
    padding: 28px 20px 120px;
  }
}

/* ---------- Header ---------- */

/* ---------- Header ---------- */

.wpz-mt-header {
  display: flex;
  flex-direction: column;   /* Toujours en colonne */
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}

/* On ne repasse plus en row sur desktop */
@media (min-width: 900px) {
  .wpz-mt-header {
    align-items: flex-start; /* juste pour éviter de changer la hauteur */
  }
}

.wpz-mt-header-main {
  max-width: 620px;
}

.wpz-mt-header-kpis {
  width: 100%;              /* la grille prend toute la largeur */
  margin-top: 8px;
}


.wpz-mt-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #047857;
  margin: 0 0 6px;
}

.wpz-mt-header-main h2 {
  font-size: 1.6rem;
  line-height: 1.25;
  margin: 0 0 8px;
  color: #111827;
}

.wpz-mt-header-main p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #4b5563;
}

/* ---------- Header KPIs ---------- */

.wpz-mt-header-kpis {
  flex: 1;
}

.wpz-mt-kpi-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

@media (min-width: 640px) {
  .wpz-mt-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .wpz-mt-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.wpz-mt-kpi {
  border-radius: 12px;
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wpz-mt-kpi-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
}

.wpz-mt-kpi-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111827;
}

.wpz-mt-kpi-note {
  font-size: 0.75rem;
  color: #9ca3af;
}

.wpz-mt-kpi-soft {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.wpz-mt-kpi-alert {
  background: #fef2f2;
  border-color: #fecaca;
}

.wpz-mt-kpi-muted {
  background: #f3f4f6;
  border-style: dashed;
}

/* ---------- Layout principal ---------- */

.wpz-mt-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

@media (min-width: 980px) {
  .wpz-mt-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
    align-items: flex-start;
  }
}

/* ---------- Card générique ---------- */

.wpz-mt-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  padding: 16px 14px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .wpz-mt-card {
    padding: 18px 18px;
  }
}

.wpz-mt-card-light {
  background: #f9fafb;
  box-shadow: none;
}

.wpz-mt-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.wpz-mt-card-title {
  font-size: 1rem;
  margin: 0 0 4px;
  color: #111827;
}

.wpz-mt-card-sub {
  margin: 0;
  font-size: 0.82rem;
  color: #6b7280;
}

/* ---------- Boutons génériques ---------- */

.wpz-mt-btn-primary,
.wpz-mt-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  border: 1.6px solid transparent;
  padding: 7px 13px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}

.wpz-mt-btn-primary {
  background: #5ca174;
  border-color: #5ca174;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.28);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.wpz-mt-btn-primary:hover {
  background: #4b9465;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(22, 163, 74, 0.33);
}

.wpz-mt-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.26);
}

.wpz-mt-btn-ghost {
  background: #ffffff;
  border-color: #d1d5db;
  color: #374151;
}

.wpz-mt-btn-ghost:hover {
  background: #f9fafb;
}

/* Actions header */

.wpz-mt-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- Section Menus ---------- */

.wpz-mt-menus-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2px;
}

.wpz-mt-empty {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: #9ca3af;
  border-radius: 12px;
  border: 1px dashed #d1d5db;
  background: #f9fafb;
  padding: 10px 12px;
}

.wpz-mt-empty strong {
  color: #374151;
}

/* ---------- Cartes menu ---------- */

.wpz-mt-menu-card {
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 10px 12px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.wpz-mt-menu-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.wpz-mt-menu-main {
  min-width: 0;
}

.wpz-mt-menu-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
}

.wpz-mt-menu-meta {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: #6b7280;
}

.wpz-mt-menu-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

/* Badges */

.wpz-mt-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  font-size: 0.7rem;
  padding: 3px 8px;
  font-weight: 500;
  line-height: 1.2;
  border: 1px solid transparent;
}

.wpz-mt-badge-service {
  background: #ecfdf5;
  color: #166534;
  border-color: #bbf7d0;
}

.wpz-mt-badge-wine-all {
  background: #fef9c3;
  color: #854d0e;
  border-color: #facc15;
}

.wpz-mt-badge-wine-no {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

.wpz-mt-badge-wine-partial {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}

/* Actions de carte */

.wpz-mt-menu-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.wpz-mt-menu-actions-buttons {
  display: flex;
  gap: 6px;
}

.wpz-mt-menu-actions-buttons button {
  border: none;
  background: none;
  color: #4b5563;
  font-size: 0.78rem;
  padding: 3px 6px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
}

.wpz-mt-menu-actions-buttons button:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
}

/* Toggle détails plats */

.wpz-mt-menu-toggle {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.78rem;
  color: #059669;
  padding: 3px 4px;
}

/* Corps détail des menus */

.wpz-mt-menu-body {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e5e7eb;
  display: none;
}

.wpz-mt-menu-body.is-open {
  display: block;
}

/* Groupes de plats (vue lecture) */

.wpz-mt-courses-group {
  margin-top: 8px;
}

.wpz-mt-courses-group h4 {
  font-size: 0.85rem;
  margin: 0 0 4px;
  color: #111827;
}

.wpz-mt-courses-list-view {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wpz-mt-courses-list-view li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  border-radius: 6px;
}

.wpz-mt-course-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #111827;
}

.wpz-mt-course-meta {
  font-size: 0.75rem;
  color: #6b7280;
}

/* Tags regimes / défault */

.wpz-mt-tag-regime {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #166534;
}

.wpz-mt-tag-default {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
}

/* ---------- Stats détaillées side ---------- */

.wpz-mt-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wpz-mt-stats-group h4 {
  margin: 0 0 4px;
  font-size: 0.86rem;
  color: #111827;
}

.wpz-mt-stats-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wpz-mt-stats-group li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 0;
  font-size: 0.78rem;
  color: #4b5563;
}

.wpz-mt-stats-group li strong {
  font-weight: 600;
  color: #111827;
}

/* Allergies list */

.wpz-mt-allergies {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px dashed #fecaca;
  background: #fef2f2;
  padding: 6px 8px;
}

.wpz-mt-allergies li {
  padding: 4px 4px;
  border-radius: 6px;
  font-size: 0.78rem;
}

.wpz-mt-allergies li + li {
  border-top: 1px dashed rgba(248, 113, 113, 0.3);
}

.wpz-mt-all-name {
  display: inline-block;
  font-weight: 600;
  margin-right: 4px;
  color: #991b1b;
}

.wpz-mt-all-detail {
  color: #7f1d1d;
}

.wpz-mt-empty-small {
  margin: 0;
  font-size: 0.78rem;
  color: #9ca3af;
}

/* ---------- Récap traiteur ---------- */

.wpz-mt-recap-box {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 8px;
  box-sizing: border-box;
}

.wpz-mt-recap-box textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  border-radius: 8px;
  border: none;
  padding: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #111827;
  background: transparent;
  outline: none;
  box-sizing: border-box;
}

.wpz-mt-recap-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.wpz-mt-recap-feedback {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: #16a34a;
}

/* ---------- FAB + Bottom bar ---------- */

.wpz-mt-fab {
  position: fixed;
  right: 16px;
  bottom: 88px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: none;
  background: #5ca174;
  color: #ffffff;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px rgba(22, 163, 74, 0.35);
  cursor: pointer;
  z-index: 50;
}

.wpz-mt-fab span {
  margin-top: -2px;
}

/* Masquer FAB sur desktop large si tu veux */
@media (min-width: 900px) {
  .wpz-mt-fab {
    bottom: 96px;
  }
}

.wpz-mt-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  z-index: 45;
  box-sizing: border-box;
}

.wpz-mt-bottom-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wpz-mt-bottom-info {
  font-size: 0.78rem;
  color: #6b7280;
}

.wpz-mt-bottom-status {
  font-size: 0.78rem;
  color: #059669;
}

/* ---------- Panel latéral (formulaire menu) ---------- */

.wpz-mt-panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 60;
}

.wpz-mt-panel-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.wpz-mt-panel {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  box-shadow: -18px 0 40px rgba(15, 23, 42, 0.28);
  transform: translateX(100%);
  transition: transform 0.2s ease-out;
  display: flex;
  flex-direction: column;
}

.wpz-mt-panel-backdrop.is-open .wpz-mt-panel {
  transform: translateX(0);
}

@media (max-width: 640px) {
  .wpz-mt-panel {
    max-width: 100%;
    border-radius: 0;
  }
}

.wpz-mt-panel-header {
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wpz-mt-panel-header h3 {
  margin: 0;
  font-size: 0.98rem;
  color: #111827;
}

.wpz-mt-panel-close {
  border: none;
  background: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #6b7280;
  padding: 0 4px;
}

.wpz-mt-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 16px;
}

/* ---------- Formulaire ---------- */

.wpz-mt-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wpz-mt-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

@media (min-width: 640px) {
  .wpz-mt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.wpz-mt-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wpz-mt-field label {
  font-size: 0.78rem;
  font-weight: 500;
  color: #4b5563;
}

.wpz-mt-field span {
  font-size: 0.76rem;
}

.wpz-mt-field input[type="text"],
.wpz-mt-field select,
.wpz-mt-field textarea {
  font-size: 0.83rem;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  padding: 7px 9px;
  box-sizing: border-box;
  outline: none;
  background: #ffffff;
  color: #111827;
}

.wpz-mt-field input[type="text"]:focus,
.wpz-mt-field select:focus,
.wpz-mt-field textarea:focus {
  border-color: #5ca174;
  box-shadow: 0 0 0 1px rgba(92, 161, 116, 0.25);
}

/* Aide */

.wpz-mt-help {
  margin: 0;
  font-size: 0.78rem;
  color: #9ca3af;
}

/* Fieldset vin */

.wpz-mt-fieldset {
  border-radius: 12px;
  border: 1px dashed #d1d5db;
  padding: 10px 10px 8px;
  margin: 4px 0;
}

.wpz-mt-fieldset legend {
  font-size: 0.78rem;
  font-weight: 600;
  color: #4b5563;
  padding: 0 4px;
}

/* Services vin */

.wpz-mt-field-wine-services label span {
  opacity: 0.7;
}

.wpz-mt-wine-services {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 4px;
}

.wpz-mt-wine-services label {
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #4b5563;
}

.wpz-mt-wine-services input[type="checkbox"] {
  width: 13px;
  height: 13px;
}

/* Courses form */

.wpz-mt-courses {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 8px 8px 10px;
}

.wpz-mt-courses-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.wpz-mt-course-row {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 8px 8px;
}

.wpz-mt-course-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}

@media (min-width: 560px) {
  .wpz-mt-course-top {
    grid-template-columns: 150px minmax(0, 1fr);
  }
}

.wpz-mt-course-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: flex-end;
}

@media (min-width: 720px) {
  .wpz-mt-course-bottom {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.2fr);
  }
}

.wpz-mt-course-small {
  font-size: 0.8rem;
  padding: 6px 8px;
  border-radius: 10px;
}

.wpz-mt-course-small-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: #4b5563;
}

.wpz-mt-course-bottom-right {
  display: flex;
  justify-content: flex-end;
}

.wpz-mt-course-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  color: #4b5563;
}

.wpz-mt-course-checkbox input[type="checkbox"] {
  width: 13px;
  height: 13px;
}

.wpz-mt-course-remove {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.76rem;
  color: #b91c1c;
  padding: 4px 8px;
  border-radius: 999px;
}

.wpz-mt-course-remove:hover {
  background: #fee2e2;
}

/* Actions formulaire */

.wpz-mt-form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

/* ---------- Overlay de récap plein écran (mobile / desktop) ---------- */

.wpz-mt-recap-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 65;
}

.wpz-mt-recap-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.wpz-mt-recap-overlay-inner {
  width: 100%;
  max-width: 620px;
 height: 80vh;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wpz-mt-recap-overlay-header {
  padding: 10px 14px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wpz-mt-recap-overlay-header h3 {
  margin: 0;
  font-size: 0.96rem;
  color: #111827;
}

.wpz-mt-recap-overlay-body {
  flex: 1;
  padding: 10px 12px 12px;
}

.wpz-mt-recap-overlay-body textarea {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 8px;
  border: none;
  padding: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #111827;
  background: #f9fafb;
  box-sizing: border-box;
  resize: none;
}


.wpz-mt-recap-overlay-actions {
  padding: 14px;
  border-top: 1px solid #e5e7eb;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wpz-mt-recap-overlay-actions .wpz-mt-btn-primary {
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--iliade-green, #5CA174);
  color: #fff;
  border: none;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.wpz-mt-recap-overlay-actions .wpz-mt-btn-primary:hover {
  background: #4e8a64;
}

.wpz-mt-recap-overlay-feedback {
  font-size: 0.85rem;
  color: var(--iliade-green, #5CA174);
}







/* ---------- Divers ---------- */

.no-print {
  /* helper pour print */
}

@media print {
  .no-print {
    display: none !important;
  }

  .wpz-menu-traiteur-wrap {
    padding: 0;
    box-shadow: none;
  }

  .wpz-mt-bottom-bar,
  .wpz-mt-fab,
  .wpz-mt-panel-backdrop,
  .wpz-mt-recap-overlay {
    display: none !important;
  }
}
