/* ============================================================
   JOON EATS – ACCUEIL
   Nouveau design visuel + tous les styles fonctionnels
   ============================================================ */

* { box-sizing: border-box; }

:root {
  --primary-color: #3b2689;
  --primary-color-dark: #2a1b63;
  --primary-color-soft: #f1edfb;
  --secondary-color: #5a45b8;
  --accent-pink: #ff2d78;
  --accent-color: #ffd700;
  --ink: #1a1330;
  --ink-2: #4a4459;
  --ink-3: #7a7488;
  --text-dark: #333;
  --text-light: #666;
  --text-color: #333;
  --line: #ece9f2;
  --line-strong: #ddd8e6;
  --border-color: #ddd;
  --bg: #faf8f5;
  --paper: #ffffff;
  --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;
}

html {
  width: 100%;
  min-height: 100vh;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
}

.main-content {
  width: 100%;
  max-width: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
}

.hidden { display: none !important; }

/* ── TOPBAR ── */
.home-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);
}

.home-topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 8px 28px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Logo – affiche la vraie image */
.home-back-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background .15s;
}
.home-back-btn { color: #3b2689; }
.home-back-btn:hover { background: rgba(59,38,137,.08); }

.home-topbar .site-brand {
  position: static;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 56px;
  background: transparent;
  border: none;
  box-shadow: none;
  text-decoration: none;
  top: auto;
  left: auto;
  z-index: auto;
}

.home-topbar .site-brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Barre d'adresse (bouton non éditable, ouvre la popup) */
.home-topbar-address {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 320px;
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  color: #3b2689;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
}

.home-topbar-address:hover { background: rgba(59,38,137,.08); }

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

.home-topbar-address-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
}

.home-topbar-address-chev {
  flex: 0 0 auto;
  display: flex;
  line-height: 0;
  color: #9b8dcf;
}

/* ── Modale "Détails relatifs à la livraison" ── */
.modal-content.home-address-modal-content { max-width: 440px; padding-bottom: 20px; }

.home-address-modal-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 24px 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.home-address-modal-icon {
  flex: 0 0 auto;
  display: flex;
  line-height: 0;
  color: var(--ink);
}

.home-address-modal-current {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.home-address-modal-edit-btn {
  flex: 0 0 auto;
  padding: 9px 18px;
  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;
}

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

.submit-btn.home-address-modal-done-btn {
  display: block;
  width: calc(100% - 48px);
  margin: 0 24px;
}

/* ── Modale "Livrer au" (édition d'adresse) ── */
/* overflow visible (et non auto) pour que la liste de suggestions, positionnee en
   absolute sous le champ, ne soit pas coupee par les bords de la modale. */
.modal-content.home-address-edit-modal-content { max-width: 480px; overflow: visible; max-height: none; }

.home-address-edit-body {
  position: relative;
  padding: 4px 24px 24px;
}

.home-address-edit-body .address-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-color-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 4px 4px 14px;
}

.home-address-edit-body .address-input-wrapper input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 12px 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  font-family: inherit;
}

.home-address-edit-body .address-input-wrapper input::placeholder { color: var(--ink-3); }

.home-address-edit-body .address-input-wrapper input:focus {
  outline: none;
  box-shadow: none;
}

.home-address-edit-body .geolocation-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;
}

.home-address-edit-body .geolocation-btn:hover { background: var(--line); }
.home-address-edit-body .geolocation-btn:active { transform: scale(.95); }
.home-address-edit-body .geolocation-btn.loading { opacity: .6; cursor: not-allowed; }

.home-address-edit-body .address-suggestions {
  position: absolute;
  top: calc(100% + 2px);
  left: 24px;
  right: 24px;
  z-index: 300;
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--line);
}

.home-address-edit-body .home-topbar-address-status {
  display: block;
  margin: 10px 2px 0;
  color: var(--ink-3);
  font-size: 12.5px;
}

/* Section auth */
.header-auth-section {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
}

/* Recherche */
.header-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search-label { display: none; }

.header-search-input {
  width: 220px;
  padding: 6px 14px 6px 38px;
  font-size: 13.5px;
  font-weight: 500;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  color: #3b2689;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}

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

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

.header-search-wrapper::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;
}

/* Panier */
.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);
  transform: none;
  box-shadow: none;
}

.portal-cart-btn:focus-visible {
  outline: 2px solid rgba(59,38,137,.5);
  outline-offset: 2px;
}

.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;
  margin-left: 0;
  letter-spacing: -.3px;
}

/* Utilisateur connecté */
.home-user-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: #3b2689;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}

.home-user-info:hover { background: rgba(59,38,137,.08); }

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

.home-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1100;
  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;
}

.home-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: none;
  flex: 0 0 auto;
}

.home-user-avatar--placeholder {
  background: rgba(255,255,255,.25);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.home-user-label { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }

/* Boutons topbar */
.admin-link, .login-btn,
#home-login-link, #home-signup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  transition: background .15s;
  border: none;
  white-space: nowrap;
}

#home-login-link, .login-btn {
  background: transparent;
  color: #3b2689;
}

#home-login-link:hover, .login-btn:hover {
  background: rgba(59,38,137,.08);
  transform: none;
  box-shadow: none;
}

.admin-link, .signup-link, #home-signup-btn {
  background: transparent;
  color: #3b2689;
}

.admin-link:hover, .signup-link:hover, #home-signup-btn:hover {
  background: rgba(59,38,137,.08);
  transform: none;
  box-shadow: none;
}

/* ── SHELL & MAIN ── */
.home-shell {
  width: 100%;
  flex: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 28px 64px;
}

.home-main { display: grid; grid-template-columns: 1fr; gap: 28px; }

/* ── CATÉGORIES (barre visuelle "édition nuit") ── */
.home-cat-night-bar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  width: 100%;
}

.home-cat-night-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 22px 28px;
}

.home-cat-night-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 2.5px;
  color: #a59ec0;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.home-cat-night-list {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.home-cat-night-list::-webkit-scrollbar { display: none; }

.home-cat-night-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  min-width: 92px;
  flex: 0 0 auto;
  padding: 4px 6px;
  background: transparent;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  transition: transform .2s ease, background .2s ease;
}

.home-cat-night-item:hover,
.home-cat-night-item:focus-visible {
  background: var(--primary-color-soft);
  transform: translateY(-4px);
}

.home-cat-night-item:hover .home-cat-night-icon,
.home-cat-night-item:focus-visible .home-cat-night-icon {
  transform: scale(1.12);
  color: #e6188c;
}

.home-cat-night-item:active {
  transform: translateY(-1px) scale(.97);
}

.home-cat-night-item--active {
  background: var(--primary-color-soft);
  border-color: var(--primary-color);
  transform: translateY(-4px);
}
.home-cat-night-item--active .home-cat-night-icon {
  color: #e6188c;
}
.home-cat-night-item--active .home-cat-night-label {
  color: var(--primary-color);
  font-weight: 700;
}

.home-cat-night-icon {
  width: 34px;
  height: 34px;
  color: #3a2b8f;
  display: inline-flex;
  transition: transform .2s ease, color .2s ease;
}

.home-cat-night-icon svg { width: 100%; height: 100%; }

.home-cat-night-label {
  font-size: 12.5px;
  color: #3b3550;
  text-align: center;
  font-weight: 500;
  line-height: 1.2;
}

/* ── TITRE DE SECTION ── */
.section-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
  margin: 0 0 6px;
}

/* ── RÉSULTATS ── */
.results-info {
  display: none;
}

/* ── SECTIONS SCROLL HORIZONTAL ── */
.restaurants-section.hidden { display: none; }

.restaurants-section {
  min-width: 0;
  overflow-x: clip;
}

.scroll-row-wrap {
  position: relative;
  min-width: 0;
}

.restaurants-scroll-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  min-width: 0;
  width: 100%;
}

.restaurants-scroll-row::-webkit-scrollbar { display: none; }

.restaurants-scroll-row .restaurant-card {
  flex: 0 0 280px;
  width: 280px;
  scroll-snap-align: start;
}

/* Flèches de navigation — à l'intérieur du conteneur */
.scroll-arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--ink);
  transition: opacity .15s, box-shadow .15s;
  padding: 0;
}

.scroll-arrow:hover { box-shadow: 0 4px 18px rgba(0,0,0,.26); }
.scroll-arrow.hidden { opacity: 0; pointer-events: none; }
.scroll-arrow--left  { left: 8px; }
.scroll-arrow--right { right: 8px; }

/* ── LANG SWITCHER ── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
  flex-shrink: 0;
}
.lang-switcher-btn {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 4px 7px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink-2);
  transition: background .15s, color .15s;
}
.lang-switcher-btn:hover { background: var(--line); color: var(--ink); }
.lang-switcher-btn.active { background: var(--primary-color); color: #fff; }

@media (max-width: 768px) {
  .scroll-arrow { display: none !important; }
}

/* ── GRILLE RESTAURANTS ── */
.restaurants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px 18px;
}

.restaurant-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  cursor: pointer;
  transition: transform .2s;
  display: flex;
  flex-direction: column;
}

.restaurant-card:hover { transform: translateY(-2px); }
.restaurant-card:hover .restaurant-media-link { box-shadow: var(--shadow-lg); }
.restaurant-card:hover .restaurant-media-link img { transform: scale(1.04); }

.restaurant-media-link {
  display: block;
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
  background: #efe9df;
  aspect-ratio: 16/8;
  box-shadow: var(--shadow-md);
  transition: box-shadow .2s;
  text-decoration: none;
}

.restaurant-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
  border-radius: 0;
  margin: 0;
  aspect-ratio: auto;
  transition: transform .4s;
}

.restaurant-admin-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #fff;
  color: var(--primary-color);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  pointer-events: none;
}

.restaurant-card--admin { border-color: transparent; box-shadow: none; }

.restaurant-promo-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #e11d48;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(225, 29, 72, .4);
  pointer-events: none;
}

/* Temps de trajet en overlay sur l'image */
.restaurant-drive-time {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.restaurant-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.25;
}

.restaurant-survey {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 2px 0 0;
}
.restaurant-survey-star { color: #f59e0b; font-size: 14px; }
.restaurant-survey-count { font-weight: 500; color: #6b7280; margin-left: 1px; }

.restaurant-card-info { padding: 10px 14px 4px; }
.restaurant-card-info h3 { margin: 0 0 4px; }
.restaurant-card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.restaurant-card-meta .restaurant-survey { margin: 0; }

.restaurant-open-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.restaurant-open-badge--open {
  background: #dcfce7;
  color: #15803d;
}
.restaurant-open-badge--closed {
  background: #fee2e2;
  color: #b91c1c;
}

.restaurant-title-link { color: var(--ink); text-decoration: none; }
.restaurant-title-link:hover { color: var(--primary-color); }

.restaurant-meta {
  margin: 0;
  color: var(--ink-3);
  font-size: 13.5px;
  font-weight: 500;
}

/* .restaurant-actions est vide maintenant (drive-time déplacé sur l'image) */
.restaurant-actions { display: none; }

.empty-message {
  background: #fff;
  padding: 32px;
  border-radius: var(--r-lg);
  border: 1px dashed var(--line-strong);
  color: var(--ink-3);
  text-align: center;
  font-weight: 500;
}

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

.site-footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 28px 32px;
  display: grid;
  gap: 14px;
}

.site-footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }

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

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

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

.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; }
}

/* ── HAMBURGER ── */
.home-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  color: var(--ink);
  flex-shrink: 0;
  transition: background .15s;
}
.home-nav-toggle:hover { background: var(--line); }

/* ── SIDE DRAWER ── */
.home-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.home-drawer-overlay.open { opacity: 1; pointer-events: auto; }

.home-side-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  max-width: 85vw;
  background: #fff;
  z-index: 1051;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 32px rgba(0,0,0,.14);
  overflow-y: auto;
}
.home-side-drawer.open { transform: translateX(0); }

.home-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 16px 18px;
  border-bottom: 1px solid var(--line);
}
.home-drawer-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.home-drawer-profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.home-drawer-profile-avatar--placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-color-soft, #f0edff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.home-drawer-profile-info { min-width: 0; }
.home-drawer-profile-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-drawer-profile-role {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-color) 0%, #d946ef 100%);
  border-radius: 999px;
  padding: 2px 9px;
  margin: 2px 0 4px;
}
.home-drawer-profile-sub {
  font-size: 12.5px;
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}
.home-drawer-close {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px;
  color: var(--ink-2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: background .15s;
}
.home-drawer-close:hover { background: var(--line); }

.home-drawer-nav { padding: 8px 0; flex: 1; }

.home-drawer-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: background .12s;
  font-family: inherit;
  box-sizing: border-box;
}
.home-drawer-item:hover { background: var(--line, #f3f4f6); }
.home-drawer-item--danger { color: #dc2626; }
.home-drawer-item--danger:hover { background: #fff1f1; }
.home-drawer-icon {
  width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--ink-2);
}
.home-drawer-item--danger .home-drawer-icon { color: #dc2626; }
.home-drawer-divider { height: 1px; background: var(--line); margin: 6px 0; }

/* ── MODALS ── */
@keyframes slideIn {
  from { transform: translateY(-12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes loginSlideIn {
  from { transform: translateY(-12px) scale(.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes signup-spin {
  to { transform: rotate(360deg); }
}

.modal, .home-modal {
  position: fixed;
  inset: 0;
  background: rgba(26,19,48,.55);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 20px;
}

.modal-content, .home-modal-card {
  background: #fff;
  border-radius: var(--r-xl);
  max-height: 90vh;
  overflow-y: auto;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  animation: slideIn .25s ease;
  position: relative;
}

.login-modal-content { max-width: 450px; animation: loginSlideIn .3s ease; }

/* ── MODALE "BIENVENUE SUR JOON" (complétion profil Google) ── */
.gc-card {
  background: #fff;
}

.gc-header {
  background: #fff;
  color: var(--ink, #1a1328);
  border-bottom: none;
  padding: 24px 24px 4px;
  text-align: center;
  justify-content: center;
}

.gc-header > div { width: 100%; }

.gc-header h2 {
  color: var(--ink, #1a1328);
  font-size: 21px;
}

.gc-header .gc-subtitle {
  font-size: .9rem;
  color: var(--ink-3, #6b6480);
  margin-top: 6px;
}

.gc-profile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 1.5rem 4px;
  text-align: left;
}

.gc-form {
  padding: 0 1.5rem 1.5rem;
  display: grid;
  gap: 1rem;
}

.gc-address-field { position: relative; }

.gc-submit-btn {
  background: linear-gradient(135deg, var(--primary-color, #3b2689) 0%, #d946ef 100%);
  border: none;
  box-shadow: 0 10px 24px rgba(59,38,137,.25);
}

.gc-skip-btn {
  background: none;
  border: none;
  color: var(--ink-3, #9ca3af);
  font-size: .85rem;
  cursor: pointer;
  text-align: center;
  padding: 4px;
}

.gc-skip-btn:hover { color: var(--ink, #5b5470); }
.home-cart-modal-content { max-width: 600px; }
.profile-modal-content { max-width: 560px; }

.modal-header, .home-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

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

.home-modal-header p { display: none; }

.close-btn, .home-modal-close {
  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;
  flex-shrink: 0;
  opacity: 1;
}

.close-btn:hover, .home-modal-close:hover { background: #e6dff7; }

/* ── FORMULAIRES (partagés) ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--text-color);
  font-size: .95rem;
  display: block;
  margin-bottom: .25rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: .8rem;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
  background: #fafbfc;
}

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

.submit-btn {
  width: 100%;
  padding: .9rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .2s, transform .2s;
  margin-top: 1rem;
}

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

.submit-btn.is-loading {
  opacity: .9;
  cursor: wait;
  position: relative;
  padding-right: 3rem;
}

.submit-btn.is-loading::after {
  content: '';
  position: absolute;
  top: 50%; right: 1rem;
  width: 1rem; height: 1rem;
  margin-top: -.5rem;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  animation: signup-spin .7s linear infinite;
}

.auth-error-message {
  margin: 0;
  padding: .6rem .75rem;
  border-radius: 8px;
  border: 1px solid #f1b8b8;
  background: #ffecec;
  color: #8f1212;
  font-size: .9rem;
}

/* ── FORMULAIRE CONNEXION ── */
.login-form {
  padding: 0 1.5rem 2rem;
  display: grid;
  gap: 1.2rem;
  max-width: 400px;
  margin: 0 auto;
}

.google-signin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: calc(100% - 3rem);
  margin: 1.5rem auto 0;
  padding: 11px 16px;
  background: #fff;
  border: 1.5px solid #dadce0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #3c4043;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.google-signin-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 6px rgba(0,0,0,.12);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 1.5rem;
  margin-top: 1rem;
  color: #9ca3af;
  font-size: 12px;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* ── FORMULAIRE PROFIL ── */
.profile-form {
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
}

.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; }

.profile-photo-preview-wrap { display: flex; justify-content: center; margin-bottom: .5rem; }

.profile-photo-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line);
}

.profile-photo-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.profile-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  background: var(--primary-color-soft);
  color: var(--primary-color);
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
}

.profile-photo-file { display: none; }

.profile-address-group { position: relative; }

.profile-address-suggestions {
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  z-index: 100;
  background: #fff;
  border-radius: var(--r-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--line);
}

/* ── PANIER MODAL ── */
.cart-items { padding: 1.5rem; min-height: 100px; }

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  gap: 1rem;
}

.cart-item:last-child { border-bottom: none; }

.home-cart-item { background: #fff; }

.cart-item-info { flex: 1; }

.cart-item-name { font-weight: 700; color: var(--primary-color); margin-bottom: .25rem; }

.cart-item-price { color: var(--ink-3); font-size: .95rem; }

.cart-item-quantity { display: flex; align-items: center; gap: .5rem; }

.home-cart-line-total { margin: 0; color: var(--secondary-color); font-weight: 700; white-space: nowrap; }

.quantity-btn {
  background: #f5f5f5;
  border: 1px solid var(--line-strong);
  width: 28px; height: 28px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
}

.quantity-btn:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

.remove-btn {
  background: #ff6b6b;
  color: #fff;
  border: none;
  padding: .4rem .8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: .85rem;
  font-family: inherit;
}

.remove-btn:hover { background: #ff5252; }

.cart-summary { padding: 1.5rem; border-top: 2px solid var(--line); }

.home-cart-summary { display: grid; gap: .85rem; }

.summary-row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
}

.total { color: var(--secondary-color); }

.home-cart-summary-meta { color: var(--ink-3); font-size: .95rem; }

.home-cart-summary-actions { display: grid; gap: .75rem; }

.checkout-btn {
  display: block;
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity .2s;
}

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

.home-cart-summary-link { text-decoration: none; display: block; }

.empty-cart-message { text-align: center; padding: 2rem; color: var(--ink-3); }

/* ── PANIER EN TIROIR LATÉRAL ── */
#home-cart-modal {
  justify-content: flex-end;
  align-items: stretch;
  padding: 0;
}

#home-cart-modal .home-cart-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;
}

@keyframes cartDrawerIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

#home-cart-modal .modal-header {
  flex: 0 0 auto;
  padding: 20px 22px;
}

#home-cart-modal .home-cart-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px;
  background: var(--bg);
}

#home-cart-modal .home-cart-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(20,14,40,.04);
  transition: box-shadow .15s, border-color .15s;
}

#home-cart-modal .home-cart-item:hover {
  border-color: var(--primary-color);
  box-shadow: 0 6px 16px rgba(59,38,137,.08);
}

#home-cart-modal .home-cart-item:last-child { margin-bottom: 0; }

#home-cart-modal .home-cart-modal-summary {
  flex: 0 0 auto;
  padding: 18px 22px 22px;
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 20px rgba(20,14,40,.05);
  background: #fff;
}

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

.home-cart-modal-body { display: block; min-height: 100px; }

/* ── PANIER MODERNISÉ ── */
.hcm-empty {
  display: flex; flex-direction: column; align-items: center;
  padding: 48px 24px; gap: 14px; color: var(--ink-3);
}
.hcm-empty svg { opacity: .35; }
.hcm-empty p { font-size: .95rem; font-weight: 500; margin: 0; }

.hcm-group { margin-bottom: 18px; }
.hcm-group:last-child { margin-bottom: 0; }

.hcm-group-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.hcm-group-logo {
  width: 34px; height: 34px; border-radius: 8px;
  object-fit: cover; border: 1px solid var(--line); flex-shrink: 0;
}
.hcm-group-logo-placeholder {
  background: var(--primary-color-soft);
}
.hcm-group-name {
  font-size: .85rem; font-weight: 700; color: var(--ink); letter-spacing: .01em;
  text-transform: uppercase;
}

.hcm-items { display: grid; gap: 8px; }

.hcm-item {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; box-shadow: 0 1px 3px rgba(20,14,40,.04);
  transition: border-color .15s, box-shadow .15s;
}
.hcm-item:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(59,38,137,.09);
}
.hcm-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hcm-item-name {
  font-size: .93rem; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.hcm-promo-badge {
  display: inline-block; align-self: flex-start; font-size: .72rem; font-weight: 700;
  padding: 2px 7px; border-radius: 999px;
  background: #fee2e2; color: #dc2626; letter-spacing: .02em;
}

.hcm-item-price-row { display: flex; align-items: baseline; gap: 7px; }
.hcm-item-price { font-size: .93rem; font-weight: 700; color: var(--ink); }
.hcm-item-price-original {
  font-size: .82rem; color: var(--ink-3);
  text-decoration: line-through;
}

.hcm-item-qty {
  flex-shrink: 0; min-width: 24px; text-align: right;
  font-size: .82rem; font-weight: 600; color: var(--ink-3);
  padding-top: 2px;
}
.hcm-qty-num::before { content: '×'; margin-right: 2px; }

.hcm-savings-bar {
  background: #fef2f2; border-radius: 10px;
  padding: 9px 14px; margin-bottom: 12px;
  font-size: .83rem; font-weight: 700; color: #dc2626;
  text-align: center; border: 1px solid #fecaca;
}

.hcm-summary-row {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 14px;
}
.hcm-summary-label { font-size: .93rem; color: var(--ink-3); font-weight: 500; }
.hcm-summary-value { font-size: 1.15rem; font-weight: 800; color: var(--ink); }

.hcm-actions { display: grid; gap: 8px; }
.hcm-checkout-btn {
  display: block; text-align: center; text-decoration: none;
  padding: 13px 18px; border-radius: 999px; font-size: .93rem;
  font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--primary-color) 0%, #d946ef 100%);
  transition: opacity .15s; box-shadow: 0 4px 12px rgba(59,38,137,.22);
}
.hcm-checkout-btn:hover { opacity: .9; }

/* ── FORMULAIRE INSCRIPTION ── */
.signup-form {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
}

.signup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.signup-form label {
  display: grid;
  gap: .4rem;
  font-weight: 600;
  color: var(--text-color);
  font-size: .95rem;
}

.signup-form label span {
  font-weight: 600;
  font-size: .95rem;
  color: var(--text-color);
}

.signup-form input {
  width: 100%;
  padding: .8rem;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fafbfc;
  transition: border-color .2s, box-shadow .2s;
}

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

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

.signup-address-field {
  position: relative;
  display: grid;
  gap: .5rem;
}

.signup-address-field .address-suggestions {
  left: 0; right: 0;
  top: calc(100% + 6px);
  position: absolute;
}

.signup-feedback {
  margin: .5rem 0 0;
  padding: .8rem .9rem;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 600;
  border: 1px solid;
}

.signup-feedback.success { background: #eaf8ee; border-color: #9dd0ab; color: #176238; }
.signup-feedback.error { background: #ffecec; border-color: #efb6b6; color: #8f1212; }

.signup-actions { display: flex; justify-content: flex-end; }

.signup-submit-btn {
  width: 100%;
  padding: .9rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .2s;
}

.signup-submit-btn:hover { opacity: .92; }

.signup-submit-btn.is-loading { opacity: .9; cursor: wait; position: relative; }

.signup-submit-btn.is-loading::after {
  content: '';
  position: absolute;
  top: 50%; right: 1rem;
  width: 1rem; height: 1rem;
  margin-top: -.5rem;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  animation: signup-spin .7s linear infinite;
}

/* ── CHAMP TÉLÉPHONE ── */
.phone-field { display: flex; align-items: flex-start; gap: .5rem; }

.phone-country {
  width: 140px;
  min-width: 120px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  padding: .8rem .6rem;
  font-size: .95rem;
  font-family: inherit;
  background: #fafbfc;
  transition: border-color .2s;
}

.phone-number { flex: 1; }

/* ── SUGGESTIONS D'ADRESSE ── */
.address-suggestions {
  position: absolute;
  z-index: 100;
  background: #fff;
  border-radius: var(--r-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  max-height: 210px;
  overflow-y: auto;
  border: 1px solid var(--line);
}

.address-suggestion-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  padding: .56rem .75rem;
  font-size: .9rem;
  font-family: inherit;
  cursor: pointer;
}

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

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


/* ── PANNEAU DE RECHERCHE ── */
.search-panel {
  background: rgba(255,255,255,.9);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1rem;
  margin-bottom: 1rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 980px) {
  .home-topbar-inner {
    padding: 12px 16px;
    height: auto;
    min-height: 66px;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: .55rem;
    padding-bottom: .55rem;
  }

  .home-topbar-address {
    flex: 0 1 auto;
    order: 1;
    max-width: 150px;
    margin-left: auto;
    padding: 4px 10px;
  }

  .home-topbar-address-label {
    font-size: 12px;
    max-width: 100px;
  }

  .home-topbar-address-chev { display: none; }

  #home-cart-btn {
    order: 1;
    flex: 0 0 auto;
  }

  .header-auth-section { flex: 1 1 100%; order: 2; flex-wrap: nowrap; gap: 8px; min-width: 0; margin-left: 0; }
  #home-login-link, #home-signup-btn, .login-btn { flex: 1 1 0; text-align: center; padding: 9px 10px; font-size: 13px; }
  .header-search-input { width: 160px; }
  .home-shell { padding: 20px 16px 48px; }
}

@media (max-width: 760px) {
  .home-shell { padding-top: 20px; }
  .signup-grid { grid-template-columns: 1fr; }

  .header-search-wrapper {
    order: 0;
    flex: 1 1 auto;
    min-width: 0;
  }

  .header-search-input { width: 100%; max-width: 200px; }
}

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

  #restaurants-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 10px;
  }

  #restaurants-grid .restaurant-card h3 {
    font-size: 13px;
  }

  #restaurants-grid .restaurant-card-info {
    padding: 7px 8px 4px;
  }

  #restaurants-grid .restaurant-card-meta {
    gap: 5px;
    font-size: 11.5px;
  }

  #restaurants-grid .restaurant-open-badge,
  #restaurants-grid .restaurant-survey {
    font-size: 11px;
  }

  .home-cat-night-inner { padding: 16px 16px; }
  .home-cat-night-item { min-width: 76px; gap: 8px; padding: 4px; }
  .home-cat-night-icon { width: 30px; height: 30px; }
  .home-cat-night-label { font-size: 11.5px; }
  .section-title { font-size: 22px; }
  .site-footer-inner { padding: .9rem .9rem 1rem; }
  .site-footer-links { gap: .45rem .8rem; }
  .home-modal-card { padding: 0; }
}

/* ── LOGIN MODAL V2 (style Skip) ── */
.login-modal-v2 { padding: 0; position: relative; }

.login-close-v2 {
  position: absolute;
  top: 16px; left: 18px;
  background: none; border: none;
  font-size: 22px; color: #6b7280;
  cursor: pointer; line-height: 1;
  padding: 4px; z-index: 1;
}
.login-close-v2:hover { color: #111; }

.login-v2-body {
  padding: 52px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.login-v2-title {
  font-size: 1.3rem;
  font-weight: 800;
  text-align: center;
  margin: 0 0 28px;
  color: #111;
}

.login-v2-oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  background: #fff;
  border: 1.5px solid #d1d5db;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #111;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.login-v2-oauth-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 8px rgba(0,0,0,.1);
}

.login-v2-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 18px;
  color: #111;
  font-size: 14px;
  font-weight: 800;
}
.login-v2-divider::before,
.login-v2-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* Formulaire email inline */
.login-email-form {
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-v2-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 !important;
}
.login-v2-field label {
  font-size: 14px;
  font-weight: 700;
  color: #111;
}
.login-v2-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  color: #111;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .15s;
}
.login-v2-input:focus {
  outline: none;
  border-color: #3b2689;
}

.login-v2-password-wrap {
  position: relative;
}
.login-v2-password-wrap .login-v2-input {
  padding-right: 48px;
}
.login-v2-eye-btn {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer; color: #6b7280;
  padding: 4px; display: flex;
}
.login-v2-eye-btn:hover { color: #111; }

.login-v2-submit-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s;
  margin-top: 4px;
}
.login-v2-submit-btn:hover { opacity: .85; }
.login-v2-submit-btn.active {
  background: #111;
  color: #fff;
}
.login-v2-submit-btn.active:hover { opacity: .85; }

.login-v2-forgot {
  text-align: center;
  margin: 16px 0 0;
}
.login-v2-forgot a {
  color: #3b2689;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.login-v2-forgot a:hover { text-decoration: underline; }

.login-v2-signup-link {
  text-align: center;
  margin-top: 12px;
  font-size: 14px;
  color: #374151;
}
.login-v2-signup-link a {
  color: #3b2689;
  font-weight: 700;
  text-decoration: none;
}
.login-v2-signup-link a:hover { text-decoration: underline; }

/* ── SIGNUP MODAL V2 (style Skip) ── */
.signup-modal-v2 {
  padding: 0;
  max-width: 450px;
  position: relative;
  overflow: hidden;
}

.signup-v2-step { width: 100%; }
.signup-v2-step.hidden { display: none !important; }

/* Barre de progression */
.signup-v2-progress {
  height: 4px;
  background: #e5e7eb;
  border-radius: 99px;
  margin: 18px 20px 0;
  overflow: hidden;
}
.signup-v2-progress-bar {
  width: 50%;
  height: 100%;
  background: #111;
  border-radius: 99px;
}

/* Labels étapes */
.signup-v2-steps-labels {
  display: flex;
  gap: 24px;
  padding: 12px 20px 0;
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
}
.signup-v2-step-label.done { color: #e91e8c; }
.signup-v2-step-label.active { color: #111; }
.signup-v2-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  margin-right: 4px;
  vertical-align: middle;
}
.signup-v2-step-label.done .signup-v2-step-icon {
  background: #e91e8c;
  color: #fff;
}
.signup-v2-step-num {
  background: #e91e8c;
  color: #fff;
}

/* Corps étape 2 */
.signup-v2-body {
  padding: 16px 24px 28px;
}

.signup-v2-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f3f4f6;
  border: none;
  border-radius: 999px;
  padding: 9px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #111;
  cursor: pointer;
  margin-bottom: 18px;
  transition: background .15s;
}
.signup-v2-back-btn:hover { background: #e5e7eb; }

.signup-v2-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #111;
  margin: 0 0 20px;
}

.signup-v2-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.signup-v2-input {
  width: 100%;
  padding: 15px 16px;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  color: #111;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .15s;
}
.signup-v2-input:focus {
  outline: none;
  border-color: #3b2689;
}
.signup-v2-input.error { border-color: #dc2626; }

/* Téléphone */
.signup-v2-phone-wrap {
  display: flex;
  gap: 8px;
}
.signup-v2-country {
  padding: 0 8px;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  color: #111;
  flex: 0 0 auto;
  max-width: 110px;
}
.signup-v2-phone-input { flex: 1; }

/* Mot de passe */
.signup-v2-pass-wrap {
  position: relative;
}
.signup-v2-pass-wrap .signup-v2-input { padding-right: 48px; }
.signup-v2-eye {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
}

/* Adresse */
.signup-v2-address-wrap { position: relative; }

/* Bouton submit */
#signup-submit-btn {
  border-radius: 999px !important;
  font-size: 16px;
  padding: 15px;
}

/* Texte légal */
.signup-v2-legal {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  line-height: 1.5;
  margin: 0;
}
.signup-v2-legal a { color: #3b2689; text-decoration: none; }
.signup-v2-legal a:hover { text-decoration: underline; }

/* Bouton inscrire (step 1) */
.login-v2-email-btn {
  width: 100%;
  padding: 14px 20px;
  background: #f3f4f6;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #111;
  cursor: pointer;
  transition: background .15s;
}
.login-v2-email-btn:hover { background: #e5e7eb; }

/* ── Sélecteur drapeau (signup v2) ── */
.signup-v2-phone-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  overflow: visible;
  background: #fff;
  position: relative;
}

.signup-v2-flag-btn {
  flex: 0 0 auto;
  background: none;
  border: none;
  border-right: 1.5px solid #d1d5db;
  padding: 0 14px;
  font-size: 22px;
  cursor: pointer;
  height: 52px;
  border-radius: 10px 0 0 10px;
  transition: background .15s;
  line-height: 1;
}
.signup-v2-flag-btn:hover { background: #f3f4f6; }

.signup-v2-phone-input {
  flex: 1;
  border: none !important;
  border-radius: 0 10px 10px 0 !important;
  padding-left: 14px !important;
  min-width: 0;
}
.signup-v2-phone-input:focus { box-shadow: none; }
.signup-v2-phone-wrap:focus-within {
  border-color: #3b2689;
}

.signup-v2-flag-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 200;
  background: #fff;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
  width: 220px;
  max-height: 240px;
  overflow-y: auto;
  padding: 6px 0;
}
.signup-v2-flag-dropdown.hidden { display: none !important; }

.signup-v2-flag-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #111;
  transition: background .1s;
}
.signup-v2-flag-option:hover,
.signup-v2-flag-option[aria-selected="true"] { background: #f3f4f6; }
.signup-v2-flag-option .flag { font-size: 20px; line-height: 1; }
.signup-v2-flag-option .dial { color: #6b7280; font-size: 13px; }

/* ── flag-phone-wrap : style commun à tous les champs téléphone ── */
.flag-phone-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  position: relative;
  overflow: visible;
}
.flag-phone-wrap:focus-within { border-color: #3b2689; }

.flag-phone-wrap .signup-v2-flag-btn {
  border-right: 1.5px solid #d1d5db;
  border-radius: 10px 0 0 10px;
}

.flag-phone-wrap .flag-phone-input {
  flex: 1;
  border: none !important;
  border-radius: 0 10px 10px 0 !important;
  padding: 13px 14px !important;
  min-width: 0;
  font-family: inherit;
  font-size: 15px;
  background: transparent;
}
.flag-phone-wrap .flag-phone-input:focus { outline: none; box-shadow: none; }

/* Ancien style phone-field masqué partout où on a migré */
.phone-field { display: none; }

/* ── Admin Chat Button ─────────────────────────────────────────────────────── */
.admin-chat-btn {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-color);
  margin-right: 4px;
  transition: background .15s;
  flex-shrink: 0;
}
.admin-chat-btn:hover { background: rgba(59,38,137,.08); }
.admin-chat-badge {
  position: absolute; top: -3px; right: -3px;
  min-width: 18px; height: 18px;
  background: #ef4444;
  color: #fff;
  border-radius: 99px;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid #fff;
}

/* ── Admin Chat Panel ──────────────────────────────────────────────────────── */
.admin-chat-panel { position: fixed; inset: 0; z-index: 9000; pointer-events: none; }
.admin-chat-panel:not(.hidden) { pointer-events: auto; }
.acp-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0; transition: opacity .25s;
}
.admin-chat-panel:not(.hidden) .acp-overlay { opacity: 1; }

.acp-drawer {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 420px; max-width: 100vw;
  background: #fff;
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  box-shadow: -4px 0 32px rgba(0,0,0,.12);
}
.admin-chat-panel:not(.hidden) .acp-drawer { transform: translateX(0); }

.acp-view { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.acp-view.hidden { display: none; }

.acp-header {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid #ede9f8;
  flex-shrink: 0;
}
.acp-header-title {
  flex: 1;
  font-size: 16px; font-weight: 800; color: var(--primary-color);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.acp-close-btn, .acp-back-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: #f0ecff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-color); flex-shrink: 0;
}
.acp-close-btn:hover, .acp-back-btn:hover { background: #e0d8ff; }
.acp-resolve-btn {
  font-size: 12px; font-weight: 700; padding: 4px 10px;
  border-radius: 999px; border: none; cursor: pointer;
  background: #dcfce7; color: #16a34a;
  transition: background .15s;
  white-space: nowrap;
}
.acp-resolve-btn:hover { background: #bbf7d0; }

.acp-attach-btn {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  color: var(--ink-3, #888); transition: color .15s, background .15s;
}
.acp-attach-btn:hover { background: #f0eeff; color: var(--primary-color, #3b2689); }
.acp-attachment-preview {
  margin: 6px 12px 2px; padding: 8px 12px; border-radius: 10px;
  background: #f5f3ff; border: 1px solid #ddd6fe;
  display: flex; align-items: center; gap: 10px; font-size: 13px;
}
.acp-attachment-preview.hidden { display: none; }
.acp-attachment-preview img { max-height: 60px; max-width: 80px; border-radius: 6px; object-fit: cover; }
.acp-attachment-preview-name { flex: 1; color: #3b2689; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acp-attachment-preview-remove { cursor: pointer; color: #888; font-size: 18px; line-height: 1; padding: 2px 4px; }
.acp-attachment-preview-remove:hover { color: #ef4444; }
.acp-bubble-img { max-width: 220px; max-height: 180px; border-radius: 10px; display: block; margin-top: 6px; cursor: pointer; }
.acp-bubble-pdf {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 6px;
  padding: 6px 10px; border-radius: 8px; background: #f0eeff;
  color: #3b2689; font-size: 12px; font-weight: 600; text-decoration: none;
}
.acp-bubble-pdf:hover { background: #e0d8ff; }

/* Conversation list */
.acp-conv-list { flex: 1; overflow-y: auto; }
.acp-empty { padding: 32px; text-align: center; color: #888; font-size: 14px; }
.acp-conv-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; cursor: pointer; border-bottom: 1px solid #f3f0fb;
  transition: background .12s;
}
.acp-conv-item:hover { background: #faf9ff; }
.acp-conv-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--primary-color);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; font-weight: 700; flex-shrink: 0;
}
.acp-conv-body { flex: 1; min-width: 0; }
.acp-conv-name { font-size: 14px; font-weight: 700; color: #1a1a2e; }
.acp-conv-preview {
  font-size: 12px; color: #888; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; margin-top: 2px;
}
.acp-conv-meta { text-align: right; flex-shrink: 0; }
.acp-conv-time { font-size: 11px; color: #bbb; }
.acp-conv-unread {
  min-width: 20px; height: 20px; border-radius: 99px;
  background: #ef4444; color: #fff;
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 5px; margin-top: 4px;
}
.acp-conv-order-tag {
  display: inline-block; margin-top: 3px;
  font-size: 10px; font-weight: 600;
  background: #ede9f8; color: var(--primary-color);
  border-radius: 6px; padding: 1px 6px;
}

/* Order info banner */
.acp-order-info {
  background: #f8f6ff;
  border-bottom: 1px solid #ede9f8;
  padding: 12px 18px;
  font-size: 12px; color: #555;
  flex-shrink: 0;
}
.acp-order-info.hidden { display: none; }
.acp-order-info-row { display: flex; gap: 6px; margin-bottom: 3px; }
.acp-order-info-label { font-weight: 700; color: var(--primary-color); }

/* Messages thread */
.acp-messages {
  flex: 1; overflow-y: auto;
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.acp-msg {
  max-width: 80%; padding: 10px 14px;
  border-radius: 18px; font-size: 13.5px; line-height: 1.45;
  word-break: break-word;
}
.acp-msg-driver {
  align-self: flex-start;
  background: #f0ecff; color: #1a1a2e;
  border-bottom-left-radius: 4px;
}
.acp-msg-admin {
  align-self: flex-end;
  background: var(--primary-color); color: #fff;
  border-bottom-right-radius: 4px;
}
.acp-msg-time {
  display: block; font-size: 10px; opacity: .6; margin-top: 4px;
}
.acp-msg-sender { font-size: 10px; font-weight: 700; opacity: .6; margin-bottom: 3px; }

/* Reply form */
.acp-reply-form {
  display: flex; gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid #ede9f8;
  flex-shrink: 0;
}
.acp-reply-input {
  flex: 1; padding: 10px 14px;
  border: 1.5px solid #ede9f8; border-radius: 24px;
  font-size: 14px; font-family: inherit;
  outline: none; background: #fafafa;
}
.acp-reply-input:focus { border-color: var(--primary-color); background: #fff; }
.acp-reply-send {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary-color); color: #fff; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: opacity .15s;
}
.acp-reply-send:hover { opacity: .85; }

@media (max-width: 500px) {
  .acp-drawer { width: 100vw; }
}

/* ── Support panel tabs ── */
.acp-tabs { display: flex; border-bottom: 1px solid #eee; margin: 0; padding: 0 12px; }
.acp-tab { flex: 1; padding: 10px 0; font-size: 13.5px; font-weight: 600; color: #999; background: none; border: none; border-bottom: 2.5px solid transparent; cursor: pointer; transition: color .15s, border-color .15s; }
.acp-tab--active { color: var(--primary-color, #3b2689); border-bottom-color: var(--primary-color, #3b2689); }
.acp-tab-badge { display: inline-flex; align-items: center; justify-content: center; background: #e11d48; color: #fff; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 999px; padding: 0 4px; margin-left: 6px; vertical-align: middle; line-height: 1; }
.acp-tab-badge.hidden { display: none; }

/* ── Customer support ticket ref ── */
.csc-ticket-ref { font-size: 11px; font-weight: 700; color: var(--primary-color, #3b2689); letter-spacing: .04em; padding: 0 16px 6px; text-transform: uppercase; }
.csc-ticket-ref:empty { display: none; }

/* ── Support ticket ref in conv list ── */
.acp-conv-ticket-ref { font-size: 10.5px; font-weight: 700; color: var(--primary-color, #3b2689); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 1px; }

/* ── Customer Support Panel (home page drawer) ─────────────────────────────── */
.csc-panel { position: fixed; inset: 0; z-index: 1200; }
.csc-overlay { position: absolute; inset: 0; z-index: 0; background: rgba(0,0,0,0.35); opacity: 0; transition: opacity 0.2s; }
.csc-panel:not(.hidden) .csc-overlay { opacity: 1; }
.csc-drawer { position: absolute; right: 0; top: 0; bottom: 0; width: 380px; max-width: 100%; z-index: 1; background: #fff; display: flex; flex-direction: column; box-shadow: -4px 0 32px rgba(59,38,137,0.12); transform: translateX(100%); transition: transform 0.25s cubic-bezier(.4,0,.2,1); }
.csc-panel:not(.hidden) .csc-drawer { transform: translateX(0); }
.csc-view { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.csc-view.hidden { display: none; }
.csc-header { display: flex; align-items: center; gap: 8px; padding: 16px 16px 16px 20px; border-bottom: 1px solid #ece9f2; flex-shrink: 0; }
.csc-header-title { flex: 1; font-size: 15px; font-weight: 700; color: #1a1a2e; }
.csc-close-btn, .csc-back-btn { width: 32px; height: 32px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; color: #7a7488; cursor: pointer; border-radius: 8px; flex-shrink: 0; }
.csc-close-btn:hover, .csc-back-btn:hover { background: #f5f3ff; color: #3b2689; }
.csc-list-body { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 16px; gap: 12px; overflow-y: auto; }
.csc-new-btn { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 12px; border-radius: 12px; border: 1.5px dashed #c4b8e8; background: #f9f7ff; color: #3b2689; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.15s, border-color 0.15s; flex-shrink: 0; }
.csc-new-btn:hover { background: #f0ecff; border-color: #3b2689; }
.csc-conv-list { display: flex; flex-direction: column; gap: 8px; }
.csc-conv-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #faf9fc; border-radius: 12px; border: 1px solid #ece9f2; cursor: pointer; transition: background 0.15s; }
.csc-conv-item:hover { background: #f0ecff; border-color: #c4b8e8; }
.csc-conv-avatar { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, #3b2689, #d946ef); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.csc-conv-body { flex: 1; min-width: 0; }
.csc-conv-name { font-size: 13px; font-weight: 600; color: #1a1a2e; }
.csc-conv-preview { font-size: 12px; color: #7a7488; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.csc-conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.csc-conv-time { font-size: 11px; color: #9ca3af; }
.csc-conv-unread { background: #3b2689; color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; min-width: 18px; height: 18px; padding: 0 4px; display: flex; align-items: center; justify-content: center; }
.csc-empty { text-align: center; color: #9ca3af; font-size: 13px; padding: 24px 0; }
.csc-new-form { display: flex; flex-direction: column; gap: 12px; padding: 20px; flex: 1; overflow-y: auto; }
.csc-label { font-size: 13px; font-weight: 600; color: #4a4459; }
.csc-select { padding: 10px 14px; border-radius: 10px; border: 1.5px solid #ece9f2; background: #faf9fc; font-size: 14px; color: #1a1a2e; font-family: inherit; appearance: none; cursor: pointer; }
.csc-select:focus { outline: none; border-color: #3b2689; }
.csc-textarea { padding: 12px 14px; border-radius: 10px; border: 1.5px solid #ece9f2; background: #faf9fc; font-size: 14px; color: #1a1a2e; font-family: inherit; resize: vertical; min-height: 100px; }
.csc-textarea:focus { outline: none; border-color: #3b2689; }
.csc-error { color: #c81e3a; font-size: 13px; }
.csc-submit-btn { padding: 14px; border-radius: 12px; border: none; background: linear-gradient(135deg, #3b2689, #d946ef); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; transition: opacity 0.15s; }
.csc-submit-btn:disabled { opacity: 0.6; cursor: wait; }
.csc-order-tag { margin: 12px 16px 0; padding: 10px 14px; background: #f5f3ff; border-radius: 10px; border: 1px solid #ede9fe; font-size: 12.5px; color: #3b2689; font-weight: 600; flex-shrink: 0; }
.csc-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.csc-msg { display: flex; flex-direction: column; max-width: 82%; }
.csc-msg--customer { align-self: flex-end; align-items: flex-end; }
.csc-msg--admin { align-self: flex-start; align-items: flex-start; }
.csc-msg-body { padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; word-break: break-word; }
.csc-msg--customer .csc-msg-body { background: linear-gradient(135deg, #3b2689, #5a3ed4); color: #fff; border-bottom-right-radius: 4px; }
.csc-msg--admin .csc-msg-body { background: #f0eef8; color: #1a1a2e; border-bottom-left-radius: 4px; }
.csc-msg-time { font-size: 11px; color: #9ca3af; margin-top: 3px; padding: 0 2px; }
.csc-resolve-btn { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: none; cursor: pointer; background: #dcfce7; color: #16a34a; transition: background .15s, opacity .15s; white-space: nowrap; flex-shrink: 0; }
.csc-resolve-btn:hover { background: #bbf7d0; }
.csc-resolve-btn:disabled { opacity: .5; cursor: default; }
.csc-reply-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid #ece9f2; flex-shrink: 0; }
.csc-reply-input { flex: 1; padding: 10px 14px; border-radius: 24px; border: 1.5px solid #ece9f2; background: #faf9fc; font-size: 14px; font-family: inherit; color: #1a1a2e; }
.csc-reply-input:focus { outline: none; border-color: #3b2689; }
.csc-reply-send { width: 40px; height: 40px; border-radius: 50%; border: none; flex-shrink: 0; background: linear-gradient(135deg, #3b2689, #d946ef); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
