/* ═══════════════════════════════════════════════════════════
   COINMALIN — commercant-menu.css (styles spécifiques)
═══════════════════════════════════════════════════════════ */

body { padding-bottom:40px }

/* ═══ PUBLISH BANNER ═══ */
.publish-banner {
  display:none; align-items:center; gap:12px;
  background:linear-gradient(135deg,#ECFDF5,#F0FDF4);
  border:1px solid rgba(5,150,105,.22);
  border-radius:var(--r2); padding:13px 16px;
  margin:16px 0 0; animation:fade-in .3s var(--ease);
}
.publish-banner.show { display:flex }
.publish-banner__icon { font-size:20px; flex-shrink:0 }
.publish-banner__body { flex:1; display:flex; flex-direction:column; gap:2px }
.publish-banner__body strong { font-size:14px; color:#065F46; font-weight:700 }
.publish-banner__body span { font-size:12px; color:var(--ok) }

/* ═══ STATUT BAR ═══ */
.statut-bar {
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; flex-wrap:wrap;
  background:var(--wh); border:1px solid var(--bd);
  border-radius:50px; padding:5px;
  margin:16px 0 14px; box-shadow:var(--sh1);
}
.statut-bar__left { display:flex; gap:3px; flex-wrap:wrap }
.statut-btn {
  display:flex; align-items:center; gap:6px;
  padding:8px 14px; border-radius:50px;
  font-size:12px; font-weight:600; color:var(--t3);
  cursor:pointer; transition:all var(--ease); white-space:nowrap;
}
.statut-btn:hover { background:var(--bg) }
.statut-btn--active { background:var(--bl); color:var(--rc); box-shadow:0 1px 6px rgba(21,98,64,.14) }
.s-dot { width:7px; height:7px; border-radius:50% }
.s-dot--green { background:#22C55E }
.s-dot--orange { background:#F59E0B }
.s-dot--red { background:var(--err) }
.statut-bar__right { padding:0 10px }
.statut-bar__update { font-size:11px; color:var(--t4); font-weight:500 }

/* ═══ INSIGHT STRIP ═══ */
.insight-strip {
  display:flex; align-items:flex-start; gap:10px;
  background:linear-gradient(135deg,#FFFBEB,#FEF3C7);
  border:1px solid rgba(217,119,6,.18);
  border-radius:var(--r2); padding:12px 14px;
  margin-bottom:14px; position:relative;
}
.insight-strip__icon { font-size:16px; flex-shrink:0 }
.insight-strip p { font-size:13px; color:#78350F; line-height:1.55; flex:1 }
.insight-strip p strong { color:#92400E }
.insight-strip__close {
  color:#D97706; font-size:14px; flex-shrink:0;
  width:24px; height:24px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  transition:background var(--ease);
}
.insight-strip__close:hover { background:rgba(217,119,6,.15) }

/* ═══ DATE ROW ═══ */
.menu-date-row {
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; margin-bottom:20px; flex-wrap:wrap;
}
.menu-date-row__title {
  font-family:var(--serif);
  font-size:clamp(1.2rem,4.5vw,1.6rem);
  color:var(--t1); letter-spacing:-.01em;
}
.btn-wa-publish {
  display:none; align-items:center; gap:7px;
  background:#25D366; color:var(--wh);
  padding:10px 16px; border-radius:50px;
  font-size:13px; font-weight:600;
  transition:background var(--ease);
  box-shadow:0 3px 12px rgba(37,211,102,.28);
}
.btn-wa-publish:hover { background:#20BA58 }
@media(min-width:460px) { .btn-wa-publish { display:flex } }

/* ═══ QUICK ACTIONS ═══ */
.quick-actions {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr));
  gap:8px; margin-bottom:16px;
}
.quick-btn {
  display:flex; align-items:center; justify-content:center; gap:6px;
  padding:11px 10px; border:1px solid var(--bd);
  border-radius:var(--r2); font-size:12px; font-weight:600;
  color:var(--t3); background:var(--wh); transition:all var(--ease);
}
.quick-btn:hover { color:var(--rc); border-color:var(--bd2); background:var(--bl) }
.quick-btn--green { color:var(--wh); background:var(--rc); border-color:var(--rc); box-shadow:0 2px 10px rgba(21,98,64,.2) }
.quick-btn--green:hover { background:var(--dk) }
.quick-btn svg { flex-shrink:0 }

/* ═══ MENU SECTIONS ═══ */
.menu-sections { display:flex; flex-direction:column; gap:12px; margin-bottom:14px }

.menu-section {
  background:var(--wh); border:1px solid var(--bd);
  border-radius:var(--r3); overflow:hidden; box-shadow:var(--sh1);
}
.menu-section__head {
  display:flex; align-items:center;
  gap:10px; padding:13px 16px;
  border-bottom:1px solid var(--bd); background:var(--bg);
}
.menu-section__title-input {
  flex:1; border:none; outline:none; background:transparent;
  font-size:14px; font-weight:700; color:var(--t1); min-width:0;
}
.menu-section__title-input::placeholder { color:var(--t4) }
.menu-section__count {
  font-size:11px; font-weight:700; color:var(--t3);
  background:var(--wh); border:1px solid var(--bd);
  padding:2px 9px; border-radius:50px; white-space:nowrap; flex-shrink:0;
}
.menu-section__add {
  display:flex; align-items:center; gap:5px;
  font-size:12px; font-weight:600; color:var(--rc);
  padding:6px 12px; border-radius:50px;
  border:1.5px solid rgba(21,98,64,.2);
  background:var(--bl); transition:all var(--ease); flex-shrink:0;
}
.menu-section__add:hover { background:var(--rc); color:var(--wh) }
.menu-section__delete {
  width:28px; height:28px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  color:var(--t4); transition:all var(--ease); flex-shrink:0;
}
.menu-section__delete:hover { background:#FEF2F2; color:var(--err) }

/* ═══ ITEMS ═══ */
.menu-items { padding:4px 0 }
.section-empty {
  padding:20px 16px; text-align:center;
  font-size:13px; color:var(--t4);
}
.section-empty strong { color:var(--rc) }

.menu-item {
  display:flex; align-items:center; gap:10px;
  padding:11px 14px; border-bottom:1px solid var(--bd);
  transition:background var(--ease); animation:fade-in .22s var(--ease) both;
}
.menu-item:last-child { border-bottom:none }
.menu-item:hover { background:var(--bg) }
.menu-item--epuise { opacity:.55 }
.menu-item--epuise .menu-item__name { text-decoration:line-through; color:var(--t4) }

.menu-item__drag { color:var(--t4); cursor:grab; flex-shrink:0; padding:3px; touch-action:none }
.menu-item__drag:active { cursor:grabbing }

/* Plat en cours de déplacement : semi-transparent + traversé par le
   pointeur (elementFromPoint voit la cible dessous, pas l'élément) */
.menu-item--dragging {
  opacity:.45; pointer-events:none;
  outline:2px dashed var(--rc, #156240); outline-offset:2px;
  border-radius:12px;
}
body.dragging-plat { user-select:none; -webkit-user-select:none; cursor:grabbing }

/* ── ITEM PHOTO ── */
.menu-item__photo {
  width:46px; height:46px; flex-shrink:0;
  border-radius:10px;
  border:1.5px dashed var(--bd);
  background:var(--bg);
  cursor:pointer; padding:0; font-family:inherit;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden; position:relative;
  color:var(--t4);
  transition:border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.menu-item__photo:hover {
  border-color:var(--mg);
  background:var(--bl);
  color:var(--rc);
  box-shadow:0 0 0 3px rgba(21,98,64,.08);
}
.menu-item__photo--filled {
  border-style:solid;
  border-color:var(--mg);
}
.menu-item__photo-img {
  width:100%; height:100%; object-fit:cover;
  display:block; border-radius:8px;
}
.menu-item__photo-empty {
  display:flex; align-items:center; justify-content:center;
  width:100%; height:100%;
}
/* Crayon d'édition au survol d'une cellule avec photo */
.menu-item__photo-edit {
  position:absolute; inset:0;
  background:rgba(13,61,43,.5);
  display:flex; align-items:center; justify-content:center;
  opacity:0; border-radius:8px;
  transition:opacity .18s var(--ease);
}
.menu-item__photo--filled:hover .menu-item__photo-edit { opacity:1 }

/* Badge nombre de photos (galerie multi-images, max 5) */
.menu-item__photo-count {
  position:absolute; top:-5px; right:-5px; z-index:2;
  min-width:17px; height:17px; padding:0 4px;
  border-radius:10px; background:var(--mg, #156240);
  border:2px solid #fff;
  color:#fff; font-size:9.5px; font-weight:800; line-height:13px;
  display:flex; align-items:center; justify-content:center;
}

/* Ligne incomplète (sans nom ou prix) — ne sera pas publiée */
.menu-item--invalid {
  border:1.5px solid #FCA5A5 !important;
  background:#FFF7F7 !important;
  border-radius:12px;
}

/* ═══════════════════════════════════════════════
   PANNEAU GALERIE PHOTOS D'UN PLAT (max 5)
═══════════════════════════════════════════════ */
.plat-gallery-overlay {
  position:fixed; inset:0; z-index:9000;
  background:rgba(13,61,43,.55); backdrop-filter:blur(3px);
  display:none; align-items:flex-end; justify-content:center; padding:0;
}
.plat-gallery-overlay.open { display:flex; }
@media(min-width:560px){ .plat-gallery-overlay{ align-items:center; padding:20px; } }
.plat-gallery {
  background:var(--wh); width:100%; max-width:480px;
  border-radius:22px 22px 0 0; padding:22px 20px calc(22px + env(safe-area-inset-bottom,0));
  box-shadow:0 -8px 40px rgba(0,0,0,.2);
  animation:pgUp .25s ease;
}
@media(min-width:560px){ .plat-gallery{ border-radius:20px; } }
@keyframes pgUp { from{transform:translateY(24px);opacity:.7} to{transform:translateY(0);opacity:1} }
.plat-gallery__head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:16px; }
.plat-gallery__title { font-family:var(--serif); font-size:1.15rem; color:var(--t1); }
.plat-gallery__sub { font-size:12px; color:var(--t4); margin-top:2px; font-weight:600; }
.plat-gallery__close {
  width:32px; height:32px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  color:var(--t4); background:var(--bg); transition:all var(--ease);
}
.plat-gallery__close:hover { background:#FEF2F2; color:var(--err); }
.plat-gallery__grid {
  display:grid; grid-template-columns:repeat(3,1fr); gap:10px;
}
@media(min-width:420px){ .plat-gallery__grid{ grid-template-columns:repeat(4,1fr); } }
.pg-tile {
  position:relative; aspect-ratio:1; border-radius:12px; overflow:hidden;
  border:1.5px solid var(--bd); background:var(--bg);
}
.pg-tile img { width:100%; height:100%; object-fit:cover; display:block; }
.pg-tile__cover {
  position:absolute; bottom:4px; left:4px;
  background:var(--rc); color:#fff; font-size:8.5px; font-weight:800;
  padding:2px 6px; border-radius:6px; letter-spacing:.02em;
}
.pg-tile__online {
  position:absolute; top:4px; left:4px;
  width:16px; height:16px; border-radius:50%;
  background:var(--mg,#156240); color:#fff; font-size:10px; font-weight:800;
  display:flex; align-items:center; justify-content:center;
}
.pg-tile__pending {
  position:absolute; top:4px; left:4px;
  background:#D97706; color:#fff; font-size:8px; font-weight:800;
  padding:2px 5px; border-radius:6px;
}
.pg-tile--pending { border-color:#FCD34D; }
.pg-tile__del {
  position:absolute; top:4px; right:4px;
  width:20px; height:20px; border-radius:50%;
  background:rgba(13,61,43,.72); color:#fff;
  display:flex; align-items:center; justify-content:center;
  transition:background var(--ease);
}
.pg-tile__del:hover { background:var(--err); }
.pg-tile__reorder {
  position:absolute; bottom:4px; right:4px;
  display:flex; gap:3px;
}
.pg-tile__mv {
  width:20px; height:20px; border-radius:6px;
  background:rgba(13,61,43,.72); color:#fff;
  display:flex; align-items:center; justify-content:center;
  transition:background var(--ease);
}
.pg-tile__mv:hover:not(:disabled) { background:var(--rc); }
.pg-tile__mv:disabled { opacity:.32; cursor:default; }
.pg-tile--add {
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;
  border:1.5px dashed var(--bd2); background:var(--bl); color:var(--rc);
  font-size:11px; font-weight:700; cursor:pointer; transition:all var(--ease);
}
.pg-tile--add:hover { border-color:var(--mg); box-shadow:0 0 0 3px rgba(21,98,64,.08); }
.plat-gallery__hint {
  display:flex; align-items:flex-start; gap:7px; margin-top:16px;
  font-size:12px; color:var(--t4); line-height:1.5;
}

.menu-item__body { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px }
.menu-item__name {
  border:none; outline:none; background:transparent;
  font-size:14px; font-weight:600; color:var(--t1); width:100%;
  transition:color var(--ease);
}
.menu-item__name:focus { color:var(--rc) }
.menu-item__desc {
  border:none; outline:none; background:transparent;
  font-size:12px; color:var(--t4); width:100%;
}
.menu-item__desc:focus { color:var(--t3) }

.menu-item__right { display:flex; align-items:center; gap:8px; flex-shrink:0 }
.menu-item__price-wrap {
  display:flex; align-items:center; gap:3px;
  background:var(--bg); border:1.5px solid var(--bd);
  border-radius:var(--r1); padding:5px 8px;
  transition:border-color var(--ease);
}
.menu-item__price-wrap:focus-within { border-color:var(--mg) }
.menu-item__price {
  border:none; outline:none; background:transparent;
  font-size:13px; font-weight:700; color:var(--rc);
  width:56px; text-align:right;
}
.menu-item__price-wrap span { font-size:11px; font-weight:700; color:var(--t4) }
.menu-item__delete {
  width:30px; height:30px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  color:var(--t4); transition:all var(--ease);
}
.menu-item__delete:hover { background:#FEF2F2; color:var(--err) }

/* ═══ TOGGLE DISPO ═══ */
.dispo-toggle { cursor:pointer; flex-shrink:0 }
.dispo-toggle input { display:none }
.dispo-track {
  display:block; width:38px; height:22px;
  border-radius:11px; background:rgba(220,38,38,.28);
  position:relative; transition:background var(--ease);
}
.dispo-toggle input:checked + .dispo-track { background:rgba(21,98,64,.28) }
.dispo-thumb {
  position:absolute; top:3px; left:3px;
  width:16px; height:16px; border-radius:50%;
  background:var(--err); box-shadow:0 1px 4px rgba(0,0,0,.15);
  transition:all var(--ease);
}
.dispo-toggle input:checked + .dispo-track .dispo-thumb {
  transform:translateX(16px); background:var(--rc);
}

/* ═══ APERÇU WHATSAPP ═══ */
.wa-preview-card {
  background:var(--wh); border:1px solid var(--bd);
  border-radius:var(--r3); overflow:hidden;
  margin-bottom:12px; box-shadow:var(--sh1);
}
.wa-preview-card__head {
  display:flex; align-items:center; gap:8px;
  padding:13px 16px; border-bottom:1px solid var(--bd);
  font-size:13px; font-weight:700; color:var(--t1); background:var(--bg);
}
.wa-preview-card__head span { flex:1 }
.wa-preview-card__refresh {
  width:28px; height:28px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  color:var(--t3); transition:all var(--ease);
}
.wa-preview-card__refresh:hover { background:var(--bl); color:var(--rc) }
.wa-preview-body { padding:14px 16px; background:#ECF5E2 }
.wa-bubble {
  background:var(--wh); border-radius:12px 12px 12px 4px;
  padding:13px 16px; font-size:13px; line-height:1.78;
  color:var(--t1); box-shadow:0 1px 4px rgba(0,0,0,.07);
  white-space:pre-line; max-width:100%;
}
.wa-send-btn {
  display:flex; align-items:center; justify-content:center; gap:8px;
  background:#25D366; color:var(--wh); padding:13px;
  font-size:14px; font-weight:600; width:100%;
  transition:background var(--ease);
}
.wa-send-btn:hover { background:#20BA58 }

/* ═══ HISTORIQUE ═══ */
.history-card {
  background:var(--wh); border:1px solid var(--bd);
  border-radius:var(--r3); overflow:hidden;
  margin-bottom:12px; box-shadow:var(--sh1);
}
.history-card__head {
  padding:14px 18px; border-bottom:1px solid var(--bd); background:var(--bg);
}
.history-card__title {
  font-family:var(--serif); font-size:1rem;
  color:var(--t1); margin-bottom:2px;
}
.history-card__sub { font-size:11px; color:var(--t4) }
.history-list { padding:4px 0 }
.history-item {
  display:flex; align-items:center; gap:10px;
  padding:12px 18px; border-bottom:1px solid var(--bd);
  transition:background var(--ease);
}
.history-item:last-child { border-bottom:none }
.history-item:hover:not(.history-item--today) { background:var(--bg) }
.history-item--today { background:rgba(21,98,64,.025); cursor:default }
.history-item--miss { opacity:.52 }
.history-item__date { font-size:13px; font-weight:600; color:var(--t1); min-width:88px }
.history-item--today .history-item__date { color:var(--rc) }
.history-item__items { flex:1; font-size:12px; color:var(--t3) }
.history-item__status {
  font-size:11px; font-weight:700; padding:3px 9px;
  border-radius:50px; white-space:nowrap;
}
.history-item__status--ok { background:#ECFDF5; color:#065F46 }
.history-item__status--late { background:#FFFBEB; color:#92400E }
.history-item__status--miss { background:#FEF2F2; color:#991B1B }
.history-reuse-btn {
  font-size:11px; font-weight:700; color:var(--rc);
  padding:4px 10px; border-radius:50px;
  border:1.5px solid rgba(21,98,64,.2); background:var(--bl);
  transition:all var(--ease); flex-shrink:0;
}
.history-reuse-btn:hover { background:var(--rc); color:var(--wh) }

/* ═══ PUBLICATION PAR PLAT ═══ */
.menu-item__pub {
  display:inline-flex; align-items:center; gap:4px; flex-shrink:0;
  font-size:10.5px; font-weight:700;
  padding:5px 11px; border-radius:50px;
  background:var(--rc); color:var(--wh);
  border:1.5px solid var(--rc);
  transition:all var(--ease); white-space:nowrap;
}
.menu-item__pub:hover:not(:disabled) { background:var(--dk); border-color:var(--dk) }
.menu-item__pub:disabled { opacity:.6; cursor:default }
.menu-item__live {
  display:inline-flex; align-items:center; gap:4px; flex-shrink:0;
  font-size:10px; font-weight:700; letter-spacing:.04em; text-transform:uppercase;
  padding:4px 10px; border-radius:50px;
  background:#ECFDF5; color:var(--ok);
  border:1px solid rgba(5,150,105,.25); white-space:nowrap;
}

.btn-save {
  flex-shrink:0; padding:13px 20px;
  border:1.5px solid var(--bd); border-radius:var(--r2);
  font-size:13px; font-weight:600; color:var(--t3);
  background:var(--wh); transition:all var(--ease);
  display:flex; align-items:center; gap:7px;
}
.btn-save:hover { border-color:var(--bd2); color:var(--rc); background:var(--bl) }
.btn-publish-main {
  flex:1; display:flex; align-items:center; justify-content:center; gap:8px;
  padding:14px; background:#25D366; color:var(--wh);
  border-radius:var(--r2); font-size:14px; font-weight:600;
  transition:background var(--ease); box-shadow:0 4px 16px rgba(37,211,102,.26);
}
.btn-publish-main:hover { background:#20BA58 }

@media(min-width:640px) { .container { padding:0 24px } }


/* ═══════════════════════════════════════════════════════════
   CADENCE DE PUBLICATION + CALENDRIER INTELLIGENT
═══════════════════════════════════════════════════════════ */
.cadence-root {
  display:grid; grid-template-columns:1fr; gap:14px;
  margin-bottom:12px; align-items:start;
}
@media (min-width:960px) {
  .cadence-root { grid-template-columns:1.55fr 1fr; }
}

/* ── Carte graphe ── */
.cadence-card {
  background:var(--wh); border:1px solid var(--bd);
  border-radius:var(--r3); box-shadow:var(--sh1); overflow:hidden;
}
.cadence-card__head {
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; flex-wrap:wrap;
  padding:14px 18px; border-bottom:1px solid var(--bd); background:var(--bg);
}
.cadence-card__title { font-family:var(--serif); font-size:1rem; color:var(--t1); margin-bottom:2px }
.cadence-card__sub   { font-size:11px; color:var(--t4) }

.cadence-tabs {
  display:flex; gap:3px; padding:3px;
  background:var(--wh); border:1px solid var(--bd); border-radius:50px;
}
.cadence-tab {
  padding:5px 13px; border-radius:50px;
  font-size:11.5px; font-weight:600; color:var(--t3);
  transition:all var(--ease);
}
.cadence-tab:hover { color:var(--t1) }
.cadence-tab--active { background:var(--rc); color:var(--wh) }

/* KPIs : série, régularité, record */
.cadence-kpis {
  display:grid; grid-template-columns:repeat(3,1fr);
  border-bottom:1px solid var(--bd);
}
.ck {
  display:flex; flex-direction:column; gap:2px;
  padding:12px 16px; border-right:1px solid var(--bd);
}
.ck:last-child { border-right:none }
.ck__val { font-size:16px; font-weight:800; color:var(--t1); letter-spacing:-.01em }
.ck__lbl { font-size:10.5px; color:var(--t4); font-weight:600 }

/* Graphe SVG */
.cadence-chart { padding:12px 10px 6px }
.cadence-chart svg { display:block; width:100%; height:auto }
.cch-grid  { stroke:rgba(21,98,64,.09); stroke-width:1 }
.cch-line  { fill:none; stroke:#156240; stroke-width:2.4; stroke-linecap:round }
.cch-ylbl  { font-size:9.5px; fill:var(--t4); text-anchor:end; font-family:var(--sans) }
.cch-xlbl  { font-size:9.5px; fill:var(--t4); text-anchor:middle; font-family:var(--sans) }
.cch-peak-dot   { fill:#156240; stroke:#fff; stroke-width:2 }
.cch-peak-badge { fill:var(--dk); opacity:.92 }
.cch-peak-txt   { font-size:10px; font-weight:700; fill:#fff; text-anchor:middle; font-family:var(--sans) }
.cch-pt-dot { fill:#156240; stroke:#fff; stroke-width:1.6; opacity:0; transition:opacity .15s }
.cch-tip    { opacity:0; transition:opacity .15s; pointer-events:none }
.cch-tip rect { fill:var(--dk); opacity:.94 }
.cch-tip text { font-size:10px; fill:#fff; text-anchor:middle; font-family:var(--sans) }
.cch-pt:hover .cch-pt-dot, .cch-pt:hover .cch-tip { opacity:1 }

/* ── Carte calendrier ── */
.cal-card {
  background:var(--wh); border:1px solid var(--bd);
  border-radius:var(--r3); box-shadow:var(--sh1); overflow:hidden;
}
.cal-card__head {
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px; border-bottom:1px solid var(--bd); background:var(--bg);
}
.cal-card__title { font-family:var(--serif); font-size:1rem; color:var(--t1) }
.cal-card__nav { display:flex; gap:6px }
.cal-card__nav button {
  width:28px; height:28px; border-radius:50%;
  border:1px solid var(--bd); background:var(--wh); color:var(--t3);
  display:flex; align-items:center; justify-content:center;
  transition:all var(--ease);
}
.cal-card__nav button:hover:not(:disabled) { background:var(--bl); color:var(--rc); border-color:var(--bd2) }
.cal-card__nav button:disabled { opacity:.35; cursor:default }

.cal-grid {
  display:grid; grid-template-columns:repeat(7,1fr);
  gap:4px; padding:12px 14px 6px;
}
.cal-h {
  text-align:center; font-size:9.5px; font-weight:700;
  color:var(--t4); text-transform:uppercase; letter-spacing:.06em;
  padding-bottom:2px;
}
.cal-d {
  aspect-ratio:1; border-radius:9px;
  display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:600; color:var(--t3);
  background:var(--bg); border:1px solid transparent;
  transition:all var(--ease); cursor:pointer;
}
.cal-d:hover:not(:disabled):not(.cal-d--void) { border-color:var(--bd2) }
.cal-d--void   { background:transparent; cursor:default }
.cal-d--future { opacity:.32; cursor:default }
.cal-d--today  { border-color:var(--rc); font-weight:800 }
.cal-d--sel    { box-shadow:0 0 0 2px var(--rc); border-color:var(--rc) }
/* Intensité heatmap (plus il y a de plats publiés, plus c est vert) */
.cal-d--l1 { background:#DCEDE3; color:var(--dk) }
.cal-d--l2 { background:#A8D5BC; color:var(--dk) }
.cal-d--l3 { background:#156240; color:#fff }

.cal-legend {
  display:flex; align-items:center; justify-content:flex-end; gap:4px;
  padding:4px 16px 10px; font-size:9.5px; color:var(--t4);
}
.cal-lg { width:11px; height:11px; border-radius:3px; display:inline-block }
.cal-lg--0 { background:var(--bg); border:1px solid var(--bd) }
.cal-lg--1 { background:#DCEDE3 }
.cal-lg--2 { background:#A8D5BC }
.cal-lg--3 { background:#156240 }

/* Détail du jour sélectionné */
.cal-detail { border-top:1px solid var(--bd); padding:12px 16px 14px }
.cal-detail__date {
  font-size:12px; font-weight:800; color:var(--t1); margin-bottom:8px;
}
.cal-detail__empty { font-size:12px; color:var(--t4); padding:4px 0 }
.cal-menu { margin-bottom:10px }
.cal-menu:last-child { margin-bottom:0 }
.cal-menu__head {
  display:flex; align-items:center; gap:7px; flex-wrap:wrap;
  font-size:11.5px; color:var(--t3); margin-bottom:7px;
}
.cal-src {
  font-size:9px; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  padding:2px 8px; border-radius:50px;
  background:var(--bl); color:var(--rc);
}
.cal-src--wa   { background:#E7F9EE; color:#128C4B }
.cal-src--live { background:#ECFDF5; color:var(--ok) }
.cal-menu__del {
  margin-left:auto; flex-shrink:0;
  width:26px; height:26px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  color:var(--t4); border:1px solid transparent;
  transition:all var(--ease);
}
.cal-menu__del:hover { background:#FEF2F2; color:var(--err); border-color:rgba(220,38,38,.25) }
.cal-plat {
  display:flex; align-items:center; gap:9px;
  padding:6px 0; border-bottom:1px dashed var(--bd);
}
.cal-plat:last-child { border-bottom:none }
.cal-plat__img {
  width:30px; height:30px; border-radius:8px; object-fit:cover; flex-shrink:0;
}
.cal-plat__img--empty {
  background:var(--bg); border:1px dashed var(--bd); display:inline-block;
}
.cal-plat__nom {
  flex:1; min-width:0; font-size:12.5px; font-weight:600; color:var(--t2);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.cal-plat__nom em {
  display:block; font-style:normal; font-size:10px; color:var(--t4); font-weight:500;
}
.cal-plat__prix { font-size:12px; font-weight:700; color:var(--rc); flex-shrink:0 }
.cal-plat--epuise .cal-plat__nom { text-decoration:line-through; color:var(--t4) }
.cal-plat--epuise .cal-plat__prix { color:var(--t4); font-style:italic; font-weight:500 }

/* ═══════════════════════════════════════════════════════════
   HISTORIQUE COMPLET — recherche + lignes enrichies
═══════════════════════════════════════════════════════════ */
.history-search {
  display:flex; align-items:center; gap:8px;
  margin-top:10px; padding:8px 12px;
  background:var(--wh); border:1px solid var(--bd);
  border-radius:50px; color:var(--t4);
  transition:border-color var(--ease), box-shadow var(--ease);
}
.history-search:focus-within {
  border-color:var(--bd2);
  box-shadow:0 0 0 3px rgba(21,98,64,.08);
  color:var(--rc);
}
.history-search svg { flex-shrink:0 }
.history-search input {
  flex:1; border:none; outline:none; background:transparent;
  font-size:12.5px; color:var(--t2); min-width:0;
}
.history-search input::placeholder { color:var(--t4) }

.history-noresult {
  padding:18px 16px; text-align:center;
  font-size:12.5px; color:var(--t4);
}

/* Ligne = bloc : infos + noms des plats + actions */
.history-item { flex-direction:column; align-items:stretch; gap:6px }
.history-item__main { display:flex; align-items:center; gap:10px }
.history-item__names {
  font-size:11.5px; color:var(--t3); line-height:1.5;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden;
}
.history-item__actions { display:flex; gap:8px; flex-wrap:wrap }
.history-del-btn {
  display:inline-flex; align-items:center; gap:5px;
  font-size:11px; font-weight:700;
  padding:5px 12px; border-radius:50px;
  background:var(--wh); color:var(--err);
  border:1.5px solid rgba(220,38,38,.35);
  transition:all var(--ease);
}
.history-del-btn:hover { background:var(--err); border-color:var(--err); color:var(--wh) }
