/* ============================================================
   JOON EATS – PORTAIL
   Harmonisation visuelle avec la home page.
   Chaque règle ici override styles.css sans le modifier.
   ============================================================ */

:root {
  --primary-color-soft: #f1edfb;
  --accent-pink: #ff2d78;
  --ink: #1a1330;
  --ink-2: #4a4459;
  --ink-3: #7a7488;
  --line: #ece9f2;
  --line-strong: #ddd8e6;
  --bg: #faf8f5;
  --shadow-sm: 0 1px 2px rgba(26,19,48,.04), 0 2px 4px rgba(26,19,48,.04);
  --shadow-md: 0 4px 14px rgba(26,19,48,.06), 0 2px 4px rgba(26,19,48,.04);
  --shadow-lg: 0 16px 40px rgba(26,19,48,.12), 0 4px 12px rgba(26,19,48,.06);
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 22px;
}

/* ── BASE ── */
html, body {
  background: var(--bg);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── TOPBAR ── */
/* ── Portal topbar — même apparence que le home topbar ── */
.portal-topbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 2px 12px rgba(59,38,137,.10);
}

.portal-topbar-inner {
  max-width: 1320px;
  padding: 8px 28px;
  height: 56px;
  gap: 18px;
}

.portal-topbar .site-brand {
  width: 80px;
  height: 56px;
}

/* Barre d'adresse — même style pill que home-topbar-address */
.portal-topbar .portal-address-row {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 320px;
  margin-left: 8px;
}

.portal-address-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  color: #3b2689;
  width: 100%;
  transition: background .15s;
}

.portal-address-pill:focus-within {
  background: rgba(59,38,137,.06);
}

.portal-address-pill:hover {
  background: rgba(59,38,137,.06);
}

.portal-address-pill-icon {
  flex: 0 0 auto;
  display: flex;
  color: #3b2689;
  line-height: 0;
}

.portal-topbar .portal-address-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #1a1a2e;
  font-family: inherit;
  box-shadow: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-topbar .portal-address-input::placeholder {
  color: #3b2689;
  font-weight: 600;
}

.portal-topbar .portal-address-input:focus {
  outline: none;
}

.portal-address-pill-geolocate {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #9b8dcf;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .15s;
}

.portal-address-pill-geolocate:hover { color: #3b2689; }

/* Barre de recherche plats — même style que home */
.portal-topbar-search {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 240px;
  position: relative;
  display: flex;
  align-items: center;
}

.portal-topbar-search::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: no-repeat center/contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b2689' stroke-opacity='0.6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>");
  pointer-events: none;
}

.portal-topbar-search-input {
  width: 100%;
  padding: 6px 14px 6px 38px !important;
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid rgba(59,38,137,.2);
  border-radius: 999px;
  background: rgba(59,38,137,.05);
  color: #3b2689;
  font-family: inherit;
  transition: background .18s, border-color .18s;
}

.portal-topbar-search-input::placeholder { color: rgba(59,38,137,.45); }

.portal-topbar-search-input:focus {
  outline: none;
  background: rgba(59,38,137,.08);
  border-color: rgba(59,38,137,.4);
  box-shadow: none;
}

/* Boutons connexion / inscription */
.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13.5px;
  background: transparent;
  color: var(--ink, #1a1a2e);
  border: none;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}

.login-btn:hover {
  background: var(--primary-color-soft, #f1edfb);
}

.portal-signup-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13.5px;
  background: var(--primary-color, #3b2689);
  color: #fff;
  border: none;
  text-decoration: none;
  transition: opacity .15s;
  white-space: nowrap;
}

.portal-signup-link:hover { opacity: .88; }

/* Panier — copie exacte des règles home.css */
.cart-btn, .portal-cart-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: #3b2689;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background .18s;
}

.cart-btn:hover, .portal-cart-btn:hover {
  background: rgba(59,38,137,.08);
}

.cart-icon { font-size: 1.1rem; line-height: 1; }
.cart-icon .cart-icon-svg { width: 20px; height: 20px; color: #3b2689; display: block; }

.cart-count, .portal-cart-btn .cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: 0 1px 4px rgba(217,70,239,.45);
  box-sizing: border-box;
  letter-spacing: -.3px;
}

/* Info utilisateur connecté */
.portal-topbar-actions .user-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--ink, #1a1a2e);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
  flex: 0 1 auto;
  max-width: 220px;
}

.portal-topbar-actions .user-info:hover {
  background: var(--primary-color-soft, #f1edfb);
}

.portal-topbar-actions .user-info .header-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.portal-topbar-actions .user-info .header-user-avatar--placeholder {
  background: var(--primary-color-soft, #f1edfb);
  color: var(--primary-color, #3b2689);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.portal-topbar-actions .user-info .header-user-label {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-user-menu-wrapper { position: relative; }

.home-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 400;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(20,14,40,.22);
  padding: 0;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

.home-user-menu-items {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-user-menu-divider {
  height: 1px;
  background: #f0eadf;
  margin: 0 14px;
}

.home-user-menu-item {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease;
}

.home-user-menu-item:hover { background: var(--primary-color-soft); }
.home-user-menu-item:hover .home-user-menu-chev { opacity: 1; transform: translateX(0); }

.home-user-menu-item--danger { color: #c81e3a; font-weight: 600; }
.home-user-menu-item--danger:hover { background: #fff0f0; }

.home-user-menu-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: block;
  line-height: 0;
  color: #3a2b8f;
}

.home-user-menu-item--danger .home-user-menu-icon { color: currentColor; }

.home-user-menu-text { flex: 1; }

.home-user-menu-chev {
  flex: 0 0 auto;
  display: block;
  line-height: 0;
  color: #c6bce2;
  opacity: 0;
  transform: translateX(-4px);
  transition: all .18s ease;
}

.profile-logout-btn {
  display: block;
  width: calc(100% - 3rem);
  margin: 0 1.5rem 1.5rem;
  padding: .75rem;
  background: #fff;
  color: #c81e3a;
  border: 1.5px solid #f1b8b8;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.profile-logout-btn:hover { background: #fff5f5; border-color: #e08989; }

/* ── APP CONTAINER ── */
.app-container {
  background: var(--bg);
}

/* ── HEADER RESTAURANT ── */
.header {
  background: #fff;
  margin-top: 0;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

.header-content { gap: 1.2rem; }

.header-text h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: .2rem;
}

.portal-back-link {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink-2);
  font-size: .9rem;
}

.portal-back-link:hover {
  background: var(--primary-color-soft);
  color: var(--primary-color);
  border-color: transparent;
  transform: none;
}

.restaurant-logo {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.header-admin-group {
  background: var(--primary-color-soft);
  border-color: transparent;
  border-radius: 999px;
}

.admin-btn, .orders-btn {
  padding: .55rem 1.1rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 700;
  font-family: inherit;
  border: none;
}

.admin-btn {
  background: var(--primary-color);
  color: #fff;
}

.admin-btn:hover {
  background: var(--secondary-color);
  transform: none;
  box-shadow: none;
}

.orders-btn {
  background: #fff;
  color: var(--primary-color);
  border: 1px solid var(--line-strong);
}

.orders-btn:hover {
  background: var(--primary-color-soft);
  transform: none;
  box-shadow: none;
}

/* ── MAIN CONTENT ── */
.main-content {
  max-width: 1320px;
  padding: 2rem 28px;
  background: transparent;
  margin: 0 auto;
}

/* ── ZONE ALERT BANNER ── */
.zone-alert-banner { max-width: 1320px; }

/* ── NO DRIVER BANNER ── */
.no-driver-banner {
  width: 100%;
  margin: 0;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 0;
  background: #fff;
  color: #3b2689;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  border-top: 2px solid #3b2689;
  border-bottom: 2px solid #3b2689;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.no-driver-banner::before {
  content: "🛵";
  font-size: 1rem;
  opacity: 0.9;
}

/* ── FILTRE CATÉGORIES ── */
.filter-section {
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.category-scroll-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s, color .15s;
}

.category-scroll-btn:hover:not(:disabled) {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.category-filter-bar {
  scrollbar-width: none;
  gap: 6px;
}

.category-filter-bar::-webkit-scrollbar { display: none; }

.category-filter-btn {
  padding: .55rem 1.1rem;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-2);
  transition: background .15s, border-color .15s, color .15s;
  box-shadow: var(--shadow-sm);
}

.category-filter-btn:hover {
  background: var(--primary-color-soft);
  border-color: transparent;
  color: var(--primary-color);
}

.category-filter-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
  box-shadow: none;
}

/* Barre de recherche */
.search-input {
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  padding: .65rem 1.2rem;
  font-size: .95rem;
  font-family: inherit;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59,38,137,.12);
}

/* ── CARDS PLATS ── */
.plats-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px 18px;
}

.plat-card {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  transition: transform .2s;
}

.plat-card:hover {
  transform: translateY(-2px);
  box-shadow: none;
}

.plat-card:hover .plat-image {
  box-shadow: var(--shadow-lg);
}

.plat-card:hover .plat-image img {
  transform: scale(1.04);
}

.plat-image {
  height: auto;
  aspect-ratio: 16/8;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #efe9df;
  box-shadow: var(--shadow-md);
  transition: box-shadow .2s;
}

.plat-image img {
  transition: transform .4s ease;
}

.plat-content {
  padding: 12px 0 0;
}

.plat-content h3 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: .25rem;
}

.plat-content .categorie {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .35rem;
}

.plat-content p {
  color: var(--ink-3);
  font-size: .875rem;
  margin-bottom: .75rem;
}

.plat-prix {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
}

/* ── Tag promo sur l'image produit ── */
.plat-image {
  position: relative;
}

.promo-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #e11d48;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.4);
  pointer-events: none;
  z-index: 2;
}

.plat-prix {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.plat-prix-original {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-3);
  text-decoration: line-through;
}

.plat-prix-effectif {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
}

.add-to-cart-btn {
  background: var(--primary-color);
  border-radius: 999px;
  padding: .5rem 1.1rem;
  font-size: .875rem;
  font-weight: 700;
  font-family: inherit;
  transition: background .15s;
}

.add-to-cart-btn:hover {
  background: var(--secondary-color);
  transform: none;
}

/* ── MODALES ── */
.modal {
  background: rgba(26,19,48,.55);
  backdrop-filter: blur(8px);
  padding: 20px;
}

.modal-content {
  border-radius: var(--r-xl);
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
}

/* Suppression des headers colorés */
.modal-header {
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 22px 24px 16px;
}

.modal-header h2 {
  color: var(--ink);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.delivery-header, .checkout-auth-header {
  background: transparent;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

/* ── Ligne adresse dans le formulaire de livraison ── */
.delivery-address-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  background: #fafbfc;
}

.delivery-address-row-icon {
  flex: 0 0 auto;
  display: flex;
  color: var(--primary-color);
  line-height: 0;
}

.delivery-address-display {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-address-edit-btn {
  flex: 0 0 auto;
  padding: 7px 16px;
  border-radius: 999px;
  border: none;
  background: var(--primary-color-soft);
  color: var(--primary-color);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}

.delivery-address-edit-btn:hover { background: #e7e0fa; }

/* ── Sous-modale édition adresse ── */
.delivery-address-modal-content {
  max-width: 460px;
  overflow: visible;
  max-height: none;
}

.delivery-address-edit-body {
  position: relative;
  padding: 16px 24px 24px;
}

.delivery-address-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-color-soft, #f0edfd);
  border: 1px solid var(--line, #ede9fe);
  border-radius: 10px;
  padding: 4px 4px 4px 14px;
}

.delivery-address-input-wrap input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 11px 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  font-family: inherit;
  outline: none;
}

.delivery-address-input-wrap input::placeholder { color: var(--ink-3, #9ca3af); }

.delivery-geo-btn {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  border: none;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}

.delivery-geo-btn:hover { background: var(--line, #ede9fe); }
.delivery-geo-btn.loading { opacity: .6; cursor: not-allowed; }

.delivery-address-modal-sugg {
  position: absolute;
  top: calc(100% + 2px);
  left: 24px;
  right: 24px;
  z-index: 300;
}

.delivery-address-modal-status {
  margin: 10px 2px 0;
  font-size: 12.5px;
  color: var(--ink-3, #9ca3af);
}

.delivery-header h2, .checkout-auth-header h2 {
  color: var(--ink);
}

.close-btn {
  background: var(--primary-color-soft);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  opacity: 1;
}

.close-btn:hover { background: #e6dff7; color: var(--primary-color); }

/* Formulaires dans modales */
.submit-btn {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  transition: opacity .2s, transform .2s;
}

.submit-btn:hover { opacity: .92; transform: translateY(-1px); }

.form-group input,
.form-group textarea,
.form-group select {
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-family: inherit;
  background: #fafbfc;
  transition: border-color .2s, box-shadow .2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59,38,137,.12);
  background: #fff;
  outline: none;
}

/* Suggestions d'adresse portail */
.portal-address-suggestions {
  background: #fff;
  border-color: var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

.portal-address-suggestion-item {
  color: var(--ink-2);
  border-color: var(--line);
  font-size: .9rem;
  font-family: inherit;
}

.portal-address-suggestion-item:hover {
  background: var(--primary-color-soft);
  color: var(--primary-color);
}

/* ── PORTAIL AUTH (écran connexion initial) ── */
.auth-portal {
  background: linear-gradient(160deg, #2a1b63 0%, #3b2689 50%, #1a1330 100%);
}

.auth-portal-card {
  border-radius: var(--r-xl);
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
}

.auth-portal-card h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

/* ── CHECKOUT AUTH GATE ── */
.checkout-auth-body { padding: 1.5rem; }

.checkout-auth-message {
  color: var(--ink-2);
  margin-bottom: 1.2rem;
}

.checkout-auth-actions { display: flex; gap: .75rem; flex-direction: column; }

.checkout-auth-btn {
  padding: .9rem 1.5rem;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: opacity .2s;
}

.checkout-auth-btn--primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: #fff;
}

.checkout-auth-btn--secondary {
  background: #fff;
  color: var(--primary-color);
  border: 1px solid var(--line-strong);
}

.checkout-auth-btn:hover { opacity: .9; }

.checkout-auth-hint { color: var(--ink-3); font-size: .875rem; margin: .75rem 0 0; text-align: center; }

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.site-footer-inner { max-width: 1320px; padding: 24px 28px 32px; }

.site-footer-links a, .site-footer-support a {
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  transition: color .15s;
}

.site-footer-links a:hover, .site-footer-support a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.site-footer-support { color: var(--ink-3); font-size: 13px; }

/* Notification toast */
.notification { top: 92px; }

/* Bannière commandes */
.orders-preview-banner { top: 120px; }

/* ══════════════════════════════════════════════════════════
   ADMIN MODAL – Panneau d'Administration du restaurant
   ══════════════════════════════════════════════════════════ */

#admin-modal .modal-content.modal-large {
  max-width: 1200px;
  width: min(96vw, 1200px);
  border-radius: var(--r-xl);
  border: none;
  background: var(--bg);
}

#admin-modal .modal-header {
  padding: 20px 24px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}

#admin-modal .modal-header h2 {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

/* Grid : User(8) Orders(4) / Restaurant(6) Form(6) / List(12) */
#admin-modal .admin-content {
  padding: 1.25rem;
  gap: 1rem;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  background: var(--bg);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  align-items: start;
}

#admin-modal .admin-user-section    { grid-column: span 8; }
#admin-modal .admin-orders-section  { grid-column: span 4; }
#admin-modal .admin-restaurant-section { grid-column: span 6; }
#admin-modal .admin-form-section    { grid-column: span 6; }
#admin-modal .admin-list-section    { grid-column: span 12; }

/* Panels */
#admin-modal .admin-user-section,
#admin-modal .admin-orders-section,
#admin-modal .admin-restaurant-section,
#admin-modal .admin-form-section,
#admin-modal .admin-list-section {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

/* Section headings */
#admin-modal .admin-user-section h3,
#admin-modal .admin-orders-section h3,
#admin-modal .admin-restaurant-section h3,
#admin-modal .admin-form-section h3,
#admin-modal .admin-list-section h3 {
  margin: 0 0 1rem;
  padding-bottom: .6rem;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-3);
  border-bottom: 1.5px solid var(--line);
}

/* Labels */
#admin-modal .form-group label {
  color: var(--ink-2);
  font-weight: 600;
  font-size: .83rem;
  letter-spacing: .01em;
}

/* Inputs & textareas */
#admin-modal .form-group input,
#admin-modal .form-group textarea {
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: .62rem .9rem;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
}

#admin-modal .form-group input:focus,
#admin-modal .form-group textarea:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(90,69,184,.14);
  background: #fff;
  outline: none;
}

#admin-modal .form-group small {
  color: var(--ink-3);
  font-size: .8rem;
  margin-top: .25rem;
  display: block;
}

/* Secondary buttons */
#admin-modal .admin-user-section .secondary-btn,
#admin-modal .admin-orders-section .secondary-btn {
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: #fff;
  color: var(--primary-color);
  font-weight: 700;
  padding: .52rem 1.1rem;
  font-size: .875rem;
  font-family: inherit;
}

#admin-modal .admin-user-section .secondary-btn:hover,
#admin-modal .admin-orders-section .secondary-btn:hover {
  background: var(--primary-color-soft);
  border-color: transparent;
}

/* Sub-forms (create / edit user) */
#admin-modal .create-user-form,
#admin-modal .edit-user-form {
  margin-top: .85rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 1rem;
  background: var(--bg);
}

#admin-modal .edit-user-form h4 {
  margin: 0 0 .75rem;
  font-size: .9rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Buttons: submit / reset / cancel */
#admin-modal .submit-btn {
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  font-weight: 700;
  font-family: inherit;
  transition: opacity .18s;
}

#admin-modal .submit-btn:hover { opacity: .88; transform: none; }

#admin-modal .reset-btn {
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  border: 1.5px solid var(--line-strong);
  font-family: inherit;
}

#admin-modal .reset-btn:hover { background: var(--bg); }

#admin-modal .cancel-btn {
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  border: 1.5px solid var(--line-strong);
  font-family: inherit;
}

#admin-modal .cancel-btn:hover { background: var(--bg); }

/* Address suggestions */
#admin-modal .admin-address-suggestions {
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: var(--shadow-md);
  z-index: 20;
}

#admin-modal .admin-address-suggestion-item {
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: .875rem;
  padding: .62rem .85rem;
}

#admin-modal .admin-address-suggestion-item:last-child { border-bottom: none; }

#admin-modal .admin-address-suggestion-item:hover {
  background: var(--primary-color-soft);
  color: var(--primary-color);
}

/* User list */
#admin-modal .user-list {
  margin-top: .85rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  overflow: hidden;
}

#admin-modal .user-item {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

#admin-modal .user-item:last-child { border-bottom: none; }

#admin-modal .user-name {
  font-weight: 700;
  color: var(--ink);
  font-size: .875rem;
}

#admin-modal .admin-badge {
  background: var(--primary-color-soft);
  color: var(--primary-color);
  border-radius: 999px;
  padding: .15rem .55rem;
  font-size: .75rem;
  font-weight: 700;
}

#admin-modal .user-actions button {
  border-radius: 999px;
  padding: .35rem .85rem;
  font-size: .8rem;
  font-weight: 700;
  font-family: inherit;
}

#admin-modal .user-actions .edit-btn,
#admin-modal .user-actions button:not(.delete-btn):first-of-type {
  background: var(--primary-color-soft);
  color: var(--primary-color);
  border: none;
}

#admin-modal .user-actions .edit-btn:hover { background: #e6dff7; }

#admin-modal .user-actions .delete-btn {
  background: rgba(211,47,47,.08);
  color: #d32f2f;
  border: none;
}

#admin-modal .user-actions .delete-btn:hover { background: rgba(211,47,47,.14); }

/* Logo preview */
#admin-modal .logo-preview {
  border-radius: var(--r-md);
  border: 1.5px solid var(--line);
  background: var(--bg);
}

/* Save feedback */
#admin-modal .save-feedback {
  border-radius: var(--r-md);
  font-size: .875rem;
  font-weight: 600;
  margin-top: .75rem;
  padding: .65rem .9rem;
}

#admin-modal .save-feedback.success {
  background: #ecfdf3;
  border: 1.5px solid #9ddbb8;
  color: #176a3a;
}

#admin-modal .save-feedback.error {
  background: #fff1f1;
  border: 1.5px solid #e8b1b1;
  color: #d32f2f;
}

/* Category filter bar */
.admin-category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 1rem;
}

.admin-cat-btn {
  padding: .42rem 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: #fff;
  color: var(--ink-2);
  font-size: .82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}

.admin-cat-btn:hover {
  background: var(--primary-color-soft);
  border-color: transparent;
  color: var(--primary-color);
}

.admin-cat-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.admin-plats-empty {
  color: var(--ink-3);
  font-size: .875rem;
  padding: 1.5rem 0;
  text-align: center;
}

/* Plats list – grid layout */
#admin-modal .admin-plats-list {
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .65rem;
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

#admin-modal .admin-plat-item {
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  margin-bottom: 0;
  padding: .9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: .6rem .75rem;
  transition: box-shadow .18s, border-color .18s;
}

#admin-modal .admin-plat-item:hover {
  border-color: rgba(90,69,184,.25);
  box-shadow: var(--shadow-sm);
}

#admin-modal .admin-plat-thumb {
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  border-radius: var(--r-sm);
  border: none;
  background: var(--bg);
}

#admin-modal .admin-plat-info {
  flex: 1;
  min-width: 0;
}

#admin-modal .admin-plat-info h4 {
  color: var(--ink);
  font-weight: 700;
  font-size: .9rem;
  margin: 0 0 .15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#admin-modal .admin-plat-info p {
  color: var(--ink-3);
  font-size: .8rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Boutons sur leur propre ligne, séparés du contenu */
#admin-modal .admin-plat-actions {
  flex: 0 0 100%;
  display: flex;
  gap: .4rem;
  padding-top: .6rem;
  border-top: 1px solid var(--line);
}

#admin-modal .admin-plat-actions .edit-btn {
  flex: 1;
  border-radius: 999px;
  background: var(--primary-color-soft);
  color: var(--primary-color);
  border: none;
  font-size: .8rem;
  font-weight: 700;
  padding: .38rem .75rem;
  text-align: center;
}

#admin-modal .admin-plat-actions .edit-btn:hover { background: #e6dff7; }

#admin-modal .admin-plat-actions .delete-btn {
  flex: 1;
  border-radius: 999px;
  background: rgba(211,47,47,.08);
  color: #d32f2f;
  border: none;
  font-size: .8rem;
  font-weight: 700;
  padding: .38rem .75rem;
  text-align: center;
}

#admin-modal .admin-plat-actions .delete-btn:hover { background: rgba(211,47,47,.14); }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .portal-topbar-inner {
    height: auto;
    min-height: 66px;
    padding: .55rem 1rem;
    flex-wrap: wrap;
    gap: .5rem;
  }

  .portal-topbar .portal-address-row {
    order: 3;
    max-width: 100%;
    flex: 1 1 100%;
    margin-left: 0;
  }

  .portal-topbar-actions { flex-wrap: wrap; gap: 8px; }

  .portal-topbar-actions .user-info {
    flex: 1 1 auto;
    max-width: 100%;
  }

  /* Topbar sticky : pas besoin de margin-top compensatoire */
  .header { margin-top: 0; }

  .main-content { padding: 1.5rem 16px; }

  /* Admin modal : toutes les sections en pleine largeur */
  #admin-modal .admin-user-section,
  #admin-modal .admin-orders-section,
  #admin-modal .admin-restaurant-section,
  #admin-modal .admin-form-section,
  #admin-modal .admin-list-section {
    grid-column: span 12;
  }

  #admin-modal .admin-plats-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .plats-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 22px 14px;
  }

  .site-footer-inner { padding: .9rem .9rem 1rem; }
}

/* ── Tips section ──────────────────────────────────────────── */
.tips-section {
  margin: 1rem 0 .75rem;
  padding: 1rem 1.1rem;
  background: var(--purple-soft, rgba(59,38,137,.07));
  border-radius: 12px;
}
.tips-label {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  color: var(--ink, #1a1330);
  margin-bottom: .65rem;
}
.tips-presets {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}
.tips-preset-btn {
  padding: .38rem .95rem;
  border-radius: 999px;
  border: 1.5px solid var(--purple, #3b2689);
  background: transparent;
  color: var(--purple, #3b2689);
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .14s, color .14s;
  font-family: inherit;
}
.tips-preset-btn:hover {
  background: var(--purple-soft, rgba(59,38,137,.1));
}
.tips-preset-btn.active {
  background: var(--purple, #3b2689);
  color: #fff;
}
.tips-custom-group {
  margin: 0 0 .5rem;
}
.tips-custom-group label {
  display: block;
  font-size: .8rem;
  color: var(--ink-2, #4a4459);
  margin-bottom: .3rem;
}
.tips-custom-input-wrap {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.tips-custom-input-wrap input {
  width: 90px;
  padding: .38rem .6rem;
  border: 1.5px solid var(--line, #ece9f2);
  border-radius: 8px;
  font-size: .9rem;
  font-family: inherit;
  color: var(--ink, #1a1330);
  background: #fff;
}
.tips-custom-input-wrap input:focus {
  outline: none;
  border-color: var(--purple, #3b2689);
}
.tips-currency {
  font-size: .9rem;
  color: var(--ink-2, #4a4459);
  font-weight: 600;
}
.tips-grand-total {
  margin: .65rem 0 0;
  font-size: .88rem;
  color: var(--ink-2, #4a4459);
}
.tips-grand-total strong {
  color: var(--ink, #1a1330);
  font-size: .95rem;
}

.status-ready {
  background: #d0f0e0;
  color: #0a6640;
}

/* ══════════════════════════════════════════════════════════════════
   SUIVI DES COMMANDES — Design Lumière & Clarté (v2)
══════════════════════════════════════════════════════════════════ */
@keyframes orders-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(1.4); }
}

.orders-modal-v2 {
  max-width: 780px;
  padding: 0;
  background: #FAFAFA;
  border-radius: 20px;
  overflow: hidden;
}

/* Header */
.orders-v2-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #EFEFEF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
}

.orders-v2-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.orders-v2-logo { height: 28px; }

.orders-v2-header-sep {
  width: 1px;
  height: 24px;
  background: #E0E0E0;
  flex-shrink: 0;
}

.orders-v2-title {
  color: #1A1625;
  font-weight: 600;
  font-size: 17px;
}

.orders-v2-close {
  width: 30px;
  height: 30px;
  background: #F0EEF8;
  border: none;
  border-radius: 8px;
  color: #3D35A3;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

.orders-v2-close:hover { background: #E5E2F5; }

/* Date banner */
.orders-v2-date-banner {
  background: #F0EEF8;
  padding: 9px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #3D35A3;
}

/* Counter cards */
.orders-v2-stats {
  padding: 14px 16px 0;
}

.orders-v2-stats #orders-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 0;
  background: none;
}

.orders-v2-counter-card {
  text-align: center;
  padding: 10px 6px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: border-color .15s, box-shadow .15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.orders-v2-counter-card:hover {
  box-shadow: 0 4px 14px rgba(61,53,163,.12);
}

.orders-v2-counter-card.is-active {
  border-color: #5B51D8;
  box-shadow: 0 0 0 3px rgba(91,81,216,.12);
}

.orders-v2-counter-card--preparing {
  background: #FFF8EC;
  border-color: #FDE68A;
}

.orders-v2-counter-card--preparing.is-active {
  border-color: #F59E0B;
  box-shadow: 0 0 0 3px rgba(245,158,11,.12);
}

.orders-v2-counter-num {
  font-size: 20px;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.orders-v2-pulse-dot {
  position: absolute;
  top: 0;
  right: -10px;
  width: 7px;
  height: 7px;
  background: #F59E0B;
  border-radius: 50%;
  animation: orders-pulse-dot 1.5s infinite;
}

.orders-v2-counter-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #9B95C9;
  line-height: 1.3;
}

/* Orders list body */
.orders-v2-body {
  padding: 12px 16px 20px;
  max-height: 62vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Order card */
.order-card-v2 {
  background: #fff;
  border-radius: 14px;
  border: 1.5px solid #E8E5F5;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(61,53,163,.07);
}

.order-card-v2-accent {
  height: 4px;
  background: linear-gradient(90deg, #3D35A3, #7C72E8);
}

.order-card-v2-body {
  padding: 14px 16px;
}

.order-card-v2-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}

.order-card-v2-id {
  font-weight: 700;
  font-size: 14px;
  color: #3D35A3;
}

.order-card-v2-print {
  padding: 5px 10px;
  background: #F5F3FF;
  border: 1px solid #DDD8F8;
  border-radius: 8px;
  color: #5B51D8;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}

.order-card-v2-print:hover { background: #EDE9FE; }

/* Status badge */
.order-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.7px;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.order-badge--confirmed  { background: #EDE9FE; color: #3D35A3; border-color: #C4B5FD; }
.order-badge--preparing  { background: #FFF3CD; color: #92400E; border-color: #FDE68A; }
.order-badge--ready      { background: #D1FAE5; color: #065F46; border-color: #A7F3D0; }
.order-badge--delivered  { background: #DBEAFE; color: #1E40AF; border-color: #BFDBFE; }
.order-badge--cancelled  { background: #FEE2E2; color: #991B1B; border-color: #FECACA; }

/* Info grid */
.order-card-v2-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin-bottom: 10px;
}

.order-card-v2-field-label {
  font-size: 10px;
  font-weight: 600;
  color: #9B95C9;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.order-card-v2-field-value {
  font-size: 13px;
  color: #1A1625;
  margin-top: 2px;
}

.order-card-v2-field-value--total {
  font-size: 15px;
  font-weight: 700;
  color: #3D35A3;
}

/* Address */
.order-card-v2-address {
  background: #F8F7FF;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: #4B4B6B;
  line-height: 1.5;
}

.order-card-v2-address-icon { color: #5B51D8; flex-shrink: 0; }

/* Products */
.order-card-v2-products {
  border-top: 1px solid #F0EEF8;
  padding-top: 8px;
  margin-bottom: 12px;
}

.order-card-v2-products-label {
  font-size: 10px;
  font-weight: 600;
  color: #9B95C9;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.order-card-v2-product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F8F7FF;
  border-radius: 8px;
  padding: 7px 12px;
  margin-bottom: 4px;
  font-size: 13px;
}

.order-card-v2-product-name { color: #1A1625; }
.order-card-v2-product-qty  { font-size: 12px; font-weight: 700; color: #5B51D8; }
.order-card-v2-empty        { font-size: 12px; color: #9B95C9; margin: 0; }

/* Action buttons */
.order-card-v2-actions {
  display: flex;
  gap: 8px;
}

.order-card-v2-btn {
  flex: 1;
  padding: 9px 6px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid;
  font-family: inherit;
  transition: opacity .15s;
  text-align: center;
}

.order-card-v2-btn:hover   { opacity: .82; }
.order-card-v2-btn:disabled { opacity: .45; cursor: not-allowed; }

.order-card-v2-btn--preparing { background: #F5F3FF; border-color: #DDD8F8; color: #3D35A3; }
.order-card-v2-btn--ready     { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; }
.order-card-v2-btn--delivered { background: #EFF6FF; border-color: #BFDBFE; color: #1E40AF; }
.order-card-v2-btn--cancel    { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }

@media (max-width: 600px) {
  .orders-v2-stats #orders-summary { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .orders-v2-counter-num { font-size: 16px; }
  .orders-v2-counter-label { font-size: 8px; }
  .orders-modal-v2 { max-width: 100%; border-radius: 16px 16px 0 0; }
  .orders-v2-header { padding: 16px; }
  .order-card-v2-grid { grid-template-columns: 1fr; gap: 6px; }
}

/* ── Saved addresses in delivery modal ──────────────────────────────────── */

.delivery-saved-label, .delivery-new-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-2, #6b7280);
  margin: 0 0 8px;
}

.delivery-new-label { margin-top: 4px; }

.delivery-saved-addr-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: var(--primary-color-soft, #ede9fe);
  border: 1.5px solid transparent;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color .15s, background .15s;
}
.delivery-saved-addr-item:hover {
  border-color: var(--primary-color, #3b2689);
  background: #e8e3fc;
}
.delivery-saved-addr-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary-color, #3b2689);
  flex: 0 0 auto;
  background: #fff;
  border-radius: 6px;
  padding: 1px 7px;
}
.delivery-saved-addr-text {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink, #1a1a2e);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.delivery-saved-addr-badge {
  flex: 0 0 auto;
  font-size: 10.5px;
  font-weight: 700;
  background: linear-gradient(135deg, #3b2689 0%, #d946ef 100%);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
}
.delivery-saved-divider {
  height: 1px;
  background: var(--line, #ede9fe);
  margin: 12px 0;
}

/* ── Heures d'ouverture ──────────────────────────────────── */
.opening-hours-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.oh-row {
  display: grid;
  grid-template-columns: 28px 80px 1fr 1fr;
  align-items: center;
  gap: 8px;
}
.oh-fin-wrap { position: relative; display: flex; align-items: center; }
.oh-fin-wrap .oh-time { width: 100%; }
.oh-nextday {
  position: absolute;
  right: -26px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: var(--primary-color, #3b2689);
  border-radius: 4px;
  padding: 1px 4px;
  white-space: nowrap;
  pointer-events: none;
}
.oh-nextday--hidden { display: none; }
.oh-day {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink, #1a1a2e);
  text-transform: capitalize;
}
.oh-toggle {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-color, #3b2689);
}
.oh-time {
  padding: 7px 8px;
  border: 1.5px solid var(--line, #ede9fe);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink, #1a1a2e);
  background: #fff;
  width: 100%;
}
.oh-time:disabled {
  background: #f7f7f9;
  color: #aaa;
  border-color: #e5e5e5;
}
.oh-time:focus {
  outline: none;
  border-color: var(--primary-color, #3b2689);
}
.oh-continu-global {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary-color, #3b2689);
  cursor: pointer;
  margin-bottom: 10px;
}
.oh-continu-global input { accent-color: var(--primary-color, #3b2689); width: 16px; height: 16px; cursor: pointer; }
#oh-jours-grid { display: flex; flex-direction: column; gap: 6px; }
#oh-jours-grid.oh-disabled { opacity: 0.4; pointer-events: none; }

/* Badge ouvert/fermé dans le header restaurant */
.restaurant-open-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  vertical-align: middle;
}
.restaurant-open-badge--open  { background: #dcfce7; color: #15803d; }
.restaurant-open-badge--closed { background: #fee2e2; color: #b91c1c; }

/* ===== OPTIONS EDITOR (admin plat form) ===== */
.plat-options-section { margin-top: 16px; }
.plat-options-editor { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.add-option-group-btn {
  display: inline-block;
  padding: 7px 14px;
  border: 1.5px dashed var(--primary-color, #3b2689);
  border-radius: 8px;
  background: transparent;
  color: var(--primary-color, #3b2689);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.add-option-group-btn:hover { background: rgba(59,38,137,.06); }

.opt-group {
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fafafa;
}
.opt-group-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.opt-group-nom {
  width: 100%;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13.5px;
  font-family: inherit;
  box-sizing: border-box;
}
.opt-group-controls {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
}
.opt-group-requis-label,
.opt-group-max-label {
  flex: 0 0 auto;
  font-size: 12.5px;
  font-weight: 600;
  color: #555;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  margin-right: 16px;
}
.opt-group-requis-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin: 0;
  cursor: pointer;
}
.opt-group-max {
  width: 48px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 13px;
  text-align: center;
  font-family: inherit;
}
.remove-opt-group-btn {
  margin-left: auto;
  padding: 4px 10px;
  border: none;
  border-radius: 6px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.remove-opt-group-btn:hover { background: #fca5a5; }

.opt-choix-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.opt-choix-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.opt-choix-nom {
  flex: 1 1 120px;
  min-width: 0;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 13px;
  font-family: inherit;
}
.opt-choix-prix {
  width: 70px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 13px;
  text-align: right;
  font-family: inherit;
}
.opt-choix-currency { font-size: 12px; color: #888; }
.remove-choix-btn {
  border: none;
  background: none;
  color: #b91c1c;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.remove-choix-btn:hover { color: #7f1d1d; }

.add-choix-btn {
  display: inline-block;
  padding: 5px 10px;
  border: 1px dashed #aaa;
  border-radius: 6px;
  background: transparent;
  color: #555;
  font-size: 12px;
  cursor: pointer;
}
.add-choix-btn:hover { background: #f3f4f6; }

/* ===== OPTIONS POPUP (client) ===== */
.options-modal-content {
  max-width: 480px;
  width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.options-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.options-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--line, #e5e7eb);
  background: #fff;
}
.options-modal-total {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-color, #3b2689);
}
.options-modal-footer .submit-btn { white-space: nowrap; min-width: 160px; }

.opt-popup-group { display: flex; flex-direction: column; gap: 8px; }
.opt-popup-group-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.opt-popup-group-nom { font-size: 14px; font-weight: 700; color: #222; }
.opt-popup-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.opt-popup-badge--requis  { background: #fef3c7; color: #92400e; }
.opt-popup-badge--optionnel { background: #f3f4f6; color: #555; }
.opt-popup-max-hint { font-size: 11px; color: #888; }

.opt-popup-choix-list { display: flex; flex-direction: column; gap: 4px; padding-left: 4px; }
.opt-popup-choix-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1.5px solid var(--line, #e5e7eb);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.opt-popup-choix-row:hover { border-color: var(--primary-color, #3b2689); background: rgba(59,38,137,.04); }
.opt-popup-choix-row input { accent-color: var(--primary-color, #3b2689); width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.opt-popup-choix-nom { flex: 1; font-size: 13.5px; font-weight: 500; }
.opt-popup-choix-prix { font-size: 13px; color: #555; white-space: nowrap; }
.opt-popup-choix-prix.has-supplement { color: var(--primary-color, #3b2689); font-weight: 600; }

/* ── Lang switcher ── */
.lang-switcher { display: flex; align-items: center; gap: 2px; margin-left: 4px; flex-shrink: 0; }
.lang-switcher--footer { margin-left: auto; }
.lang-switcher--mobile-only { display: none; }
.site-footer-bottom { display: flex; align-items: center; }

@media (max-width: 768px) {
  .lang-switcher--desktop-only { display: none; }
  .lang-switcher--mobile-only { display: flex; margin-left: auto; }
}
.lang-switcher-btn { font-size: 11.5px; font-weight: 700; letter-spacing: .5px; padding: 4px 7px; border-radius: 6px; text-decoration: none; color: #555; transition: background .15s, color .15s; }
.lang-switcher-btn:hover { background: #e5e7eb; color: #111; }
.lang-switcher-btn.active { background: var(--primary-color, #3b2689); color: #fff; }

/* ── PANIER PORTAIL – drawer latéral ── */
#cart-modal {
  padding: 0;
  justify-content: flex-end;
  align-items: stretch;
}

#cart-modal .modal-content {
  width: 100%;
  max-width: 420px;
  height: 100%;
  max-height: 100vh;
  margin: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 50px rgba(20,14,40,.25);
  animation: cartDrawerIn .28s cubic-bezier(.22,.9,.32,1);
  overflow: hidden;
}

@media (max-width: 520px) {
  #cart-modal .modal-content { max-width: 100%; }
}

#cart-items { flex: 1 1 auto; overflow-y: auto; padding: 14px 16px; background: var(--bg, #f8f6ff); }
.cart-summary { flex: 0 0 auto; border-top: 1px solid var(--line, #e8e4f3); padding: 16px 20px 20px; background: #fff; }
.cart-summary .summary-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; font-size: .93rem; }
.cart-summary .total { font-size: 1.15rem; font-weight: 800; color: var(--ink, #1a1330); }
#checkout-btn {
  width: 100%; padding: 13px; border: none; border-radius: 999px; font-size: .93rem;
  font-weight: 700; color: #fff; cursor: pointer;
  background: var(--primary-color, #3b2689);
  box-shadow: 0 4px 12px rgba(59,38,137,.22); transition: opacity .15s;
}
#checkout-btn:hover:not(:disabled) { opacity: .9; }
#checkout-btn:disabled { opacity: .45; cursor: not-allowed; }

.hcm-item-qty-controls {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-left: 4px;
}
.hcm-qty-btn {
  width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line, #e8e4f3);
  background: #fff; font-size: 1rem; font-weight: 700; color: var(--primary-color, #3b2689);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s;
}
.hcm-qty-btn:hover { background: var(--primary-color-soft, #f1edfb); border-color: var(--primary-color, #3b2689); }
.hcm-qty-val { min-width: 18px; text-align: center; font-size: .9rem; font-weight: 700; color: var(--ink, #1a1330); }
.hcm-remove-btn {
  width: 24px; height: 24px; border: none; background: none; font-size: 1.15rem;
  color: var(--ink-3, #a09ab8); cursor: pointer; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: color .15s, background .15s; margin-left: 4px;
}
.hcm-remove-btn:hover { color: #dc2626; background: #fee2e2; }
