/**
 * EasyCM — EasyKitchen accueil client (/easykitchen)
 * Préfixe : .ekh-  ·  Mobile-first  ·  Aucune dépendance (Bootstrap/FA déjà chargés par layouts.app)
 *
 * Le module vit sous le header fixe global (.ecm-nav, --ecm-header-height) et
 * au-dessus du dock mobile (.ek-mobile-dock, accent #c45c3e).
 */

/* ============================================================
   1. Jetons de design
   ============================================================ */

.ekh {
  /* Marque — terracotta « braise », aligné sur l'accent du dock EasyKitchen */
  --ek-brand: #c9512f;
  --ek-brand-strong: #a63d1f;
  --ek-brand-soft: #fdeee8;
  --ek-brand-ring: rgba(201, 81, 47, 0.28);
  --ek-amber: #eda13a;
  --ek-leaf: #12805c;

  /* Encre & surfaces */
  --ek-ink: #1c1411;
  --ek-ink-2: #4b403a;
  --ek-muted: #857a72;
  --ek-bg: #faf6f2;
  --ek-card: #ffffff;
  --ek-soft: #f5efe9;
  --ek-line: rgba(28, 20, 17, 0.09);
  --ek-line-2: rgba(28, 20, 17, 0.16);

  /* Profondeur */
  --ek-shadow-xs: 0 1px 2px rgba(28, 20, 17, 0.05);
  --ek-shadow-sm: 0 1px 2px rgba(28, 20, 17, 0.04), 0 6px 16px -10px rgba(28, 20, 17, 0.28);
  --ek-shadow-md: 0 1px 2px rgba(28, 20, 17, 0.04), 0 18px 38px -22px rgba(28, 20, 17, 0.42);
  --ek-shadow-lg: 0 2px 4px rgba(28, 20, 17, 0.05), 0 32px 64px -30px rgba(28, 20, 17, 0.5);
  --ek-shadow-brand: 0 10px 24px -12px rgba(201, 81, 47, 0.62);

  /* Formes & mouvement */
  --ek-r-sm: 12px;
  --ek-r: 18px;
  --ek-r-lg: 24px;
  --ek-r-xl: 32px;
  --ek-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ek-fast: 0.16s var(--ek-ease);
  --ek-slow: 0.42s var(--ek-ease);

  /* Gouttière fluide + offset du header global */
  --ek-gutter: clamp(16px, 4vw, 32px);
  --ek-top: calc(var(--ecm-header-height, 72px) + var(--ecm-header-safe-top, 0px));
  --ek-dock: calc(96px + env(safe-area-inset-bottom, 0px));

  position: relative;
  min-height: 60vh;
  padding-bottom: var(--ek-dock);
  background: var(--ek-bg);
  color: var(--ek-ink);
  font-family: var(--ecm-font-body, system-ui, sans-serif);
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}

@media (min-width: 992px) {
  .ekh { --ek-dock: clamp(48px, 6vw, 88px); }
}

/* Le shell générique du layout ne doit pas imposer son gris froid. */
body:has(.ekh) { background: #faf6f2; }

/* ---- Normalisation locale (on ne touche à rien hors du module) ---- */
.ekh *, .ekh *::before, .ekh *::after { box-sizing: border-box; }
.ekh h1, .ekh h2, .ekh h3, .ekh p { margin: 0; }
.ekh a { color: inherit; text-decoration: none; }
.ekh img { display: block; max-width: 100%; }
.ekh button { font: inherit; color: inherit; cursor: pointer; }
.ekh [hidden] { display: none !important; }

.ekh :focus-visible {
  outline: 3px solid var(--ek-brand-ring);
  outline-offset: 3px;
  border-radius: 8px;
}

.ekh h1, .ekh h2, .ekh h3 {
  font-family: var(--ecm-font-display, var(--ecm-font-body, system-ui, sans-serif));
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.ekh-shell {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--ek-gutter);
}

/* Cible d'ancrage : jamais masquée par le header fixe + la barre module. */
.ekh [id] { scroll-margin-top: calc(var(--ek-top) + 76px); }

/* ============================================================
   2. Barre module (sous le header global)
   ============================================================ */

.ekh-header {
  position: sticky;
  top: var(--ek-top);
  z-index: 30;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--ek-bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  transition: border-color var(--ek-fast), box-shadow var(--ek-fast);
}

@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .ekh-header { background: rgba(250, 246, 242, 0.92); }
}

/* Le fond opaque/ombré n'apparaît qu'une fois la page défilée. */
.ekh-header.is-stuck {
  border-bottom-color: var(--ek-line);
  box-shadow: 0 10px 30px -26px rgba(28, 20, 17, 0.55);
}

.ekh-header__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding-block: 10px;
}

/* ---- Lockup de marque ---- */
.ekh-brand {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.ekh-brand > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: var(--ek-ink);
  font-family: var(--ecm-font-display, inherit);
}

.ekh-brand strong { color: var(--ek-brand); font-weight: 800; }

.ekh-brand small {
  display: block;
  overflow: hidden;
  color: var(--ek-muted);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ekh-brand__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--ek-brand) 0%, var(--ek-brand-strong) 100%);
  box-shadow: var(--ek-shadow-brand);
  color: #fff;
  font-size: 1.02rem;
  transition: transform var(--ek-fast);
}

.ekh-brand:hover .ekh-brand__icon { transform: rotate(-8deg) scale(1.05); }

/* ---- Navigation desktop ---- */
.ekh-desktop-nav { display: none; }

@media (min-width: 900px) {
  .ekh-desktop-nav {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
  }

  .ekh-desktop-nav a {
    position: relative;
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--ek-ink-2);
    font-size: 0.875rem;
    font-weight: 650;
    transition: color var(--ek-fast), background-color var(--ek-fast);
  }

  .ekh-desktop-nav a:hover { background: var(--ek-soft); color: var(--ek-ink); }

  .ekh-desktop-nav a[aria-current='page'] {
    background: var(--ek-brand-soft);
    color: var(--ek-brand-strong);
  }
}

.ekh-header__actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.ekh-iconbtn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--ek-line);
  border-radius: 14px;
  background: var(--ek-card);
  box-shadow: var(--ek-shadow-xs);
  color: var(--ek-ink-2);
  font-size: 0.95rem;
  transition: transform var(--ek-fast), border-color var(--ek-fast), color var(--ek-fast), box-shadow var(--ek-fast);
}

.ekh-iconbtn:hover {
  border-color: var(--ek-line-2);
  box-shadow: var(--ek-shadow-sm);
  color: var(--ek-ink);
  transform: translateY(-1px);
}

.ekh-iconbtn:active { transform: scale(0.94); }

.ekh-iconbtn--account {
  border-color: transparent;
  background: linear-gradient(145deg, var(--ek-brand) 0%, var(--ek-brand-strong) 100%);
  box-shadow: var(--ek-shadow-brand);
  color: #fff;
}

.ekh-iconbtn--account:hover { color: #fff; }

/* ============================================================
   3. Bloc découverte (localisation + hero + recherche)
   ============================================================ */

.ekh-content {
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 6vw, 56px);
  padding-top: clamp(16px, 3vw, 28px);
}

.ekh-discovery {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(18px, 4vw, 30px);
  overflow: hidden;
  border: 1px solid var(--ek-line);
  border-radius: var(--ek-r-xl);
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(237, 161, 58, 0.16) 0%, rgba(237, 161, 58, 0) 55%),
    radial-gradient(110% 120% at 0% 100%, rgba(201, 81, 47, 0.12) 0%, rgba(201, 81, 47, 0) 60%),
    var(--ek-card);
  box-shadow: var(--ek-shadow-md);
}

/* ---- Barre de localisation ---- */
.ekh-locationbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--ek-line);
  border-radius: 999px;
  background: var(--ek-soft);
}

.ekh-locationbar > .fa-location-dot {
  flex: none;
  color: var(--ek-brand);
  font-size: 0.95rem;
}

.ekh-location {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  margin: 0;
  cursor: pointer;
}

.ekh-location small {
  color: var(--ek-muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ekh-location > span {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.ekh-location select {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ek-ink);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.ekh-location select:focus { outline: none; }
.ekh-location:has(select:focus-visible) { outline: 3px solid var(--ek-brand-ring); outline-offset: 4px; border-radius: 10px; }

.ekh-location .fa-chevron-down {
  flex: none;
  color: var(--ek-muted);
  font-size: 0.62rem;
  transition: transform var(--ek-fast);
}

.ekh-location:hover .fa-chevron-down { transform: translateY(1px); }

.ekh-nearby {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding-inline: 14px;
  border: 1px solid var(--ek-line);
  border-radius: 999px;
  background: var(--ek-card);
  box-shadow: var(--ek-shadow-xs);
  color: var(--ek-ink);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  transition: transform var(--ek-fast), border-color var(--ek-fast), color var(--ek-fast);
}

.ekh-nearby i { color: var(--ek-brand); }
.ekh-nearby:hover { border-color: var(--ek-brand); color: var(--ek-brand-strong); }
.ekh-nearby:active { transform: scale(0.96); }
.ekh-nearby[disabled] { opacity: 0.6; cursor: progress; }
.ekh-nearby[aria-busy='true'] i { animation: ekh-spin 0.9s linear infinite; }

@media (max-width: 420px) {
  .ekh-nearby span { display: none; }
  .ekh-nearby { width: 40px; padding-inline: 0; justify-content: center; }
}

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

/* ---- Hero éditorial ---- */
.ekh-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: clamp(4px, 2vw, 12px);
}

.ekh-intro p {
  margin-bottom: 6px;
  color: var(--ek-brand);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.ekh-intro h1 {
  font-size: clamp(2rem, 7.5vw, 3.4rem);
  font-weight: 800;
  line-height: 0.98;
}

.ekh-intro__mark {
  display: grid;
  flex: none;
  place-items: center;
  width: clamp(56px, 15vw, 82px);
  aspect-ratio: 1;
  border-radius: 28px;
  background: linear-gradient(150deg, rgba(237, 161, 58, 0.22), rgba(201, 81, 47, 0.16));
  color: var(--ek-brand-strong);
  font-size: clamp(1.4rem, 5vw, 2rem);
  transform: rotate(-6deg);
}

/* ---- Champ de recherche ---- */
.ekh-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 7px 7px 20px;
  border: 1px solid var(--ek-line-2);
  border-radius: 999px;
  background: var(--ek-card);
  box-shadow: var(--ek-shadow-sm);
  transition: border-color var(--ek-fast), box-shadow var(--ek-fast);
}

.ekh-search:focus-within {
  border-color: var(--ek-brand);
  box-shadow: var(--ek-shadow-md), 0 0 0 4px var(--ek-brand-ring);
}

.ekh-search > .fa-magnifying-glass {
  flex: none;
  color: var(--ek-muted);
  font-size: 0.98rem;
  transition: color var(--ek-fast);
}

.ekh-search:focus-within > .fa-magnifying-glass { color: var(--ek-brand); }

.ekh-search input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ek-ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
}

.ekh-search input::placeholder { color: var(--ek-muted); font-weight: 500; }
.ekh-search input:focus { outline: none; }
.ekh-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.ekh-search__submit {
  display: grid;
  flex: none;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--ek-brand) 0%, var(--ek-brand-strong) 100%);
  box-shadow: var(--ek-shadow-brand);
  color: #fff;
  font-size: 0.95rem;
  transition: transform var(--ek-fast), filter var(--ek-fast);
}

.ekh-search__submit:hover { filter: brightness(1.07); transform: translateX(2px); }
.ekh-search__submit:active { transform: scale(0.93); }

/* ---- Messages d'état ---- */
.ekh-message {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--ek-line);
  border-radius: var(--ek-r-sm);
  background: var(--ek-soft);
  color: var(--ek-ink-2);
  font-size: 0.84rem;
  font-weight: 600;
}

.ekh-message.is-error {
  border-color: rgba(201, 81, 47, 0.28);
  background: var(--ek-brand-soft);
  color: var(--ek-brand-strong);
}

.ekh-active-location {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ek-leaf);
  font-size: 0.83rem;
  font-weight: 700;
}

.ekh-active-location a {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ek-soft);
  color: var(--ek-muted);
  font-size: 0.78rem;
  font-weight: 700;
  transition: color var(--ek-fast), background-color var(--ek-fast);
}

.ekh-active-location a:hover { background: var(--ek-brand-soft); color: var(--ek-brand-strong); }

/* ============================================================
   4. Rail de catégories
   ============================================================ */

.ekh-categories {
  display: flex;
  gap: 9px;
  margin-block: 0 -6px;
  margin-inline: calc(var(--ek-gutter) * -1);
  padding-inline: var(--ek-gutter);
  padding-block: 6px 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.ekh-categories::-webkit-scrollbar { display: none; }

.ekh-categories > * {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding-inline: 16px;
  border: 1px solid var(--ek-line);
  border-radius: 999px;
  background: var(--ek-card);
  box-shadow: var(--ek-shadow-xs);
  color: var(--ek-ink-2);
  font-size: 0.855rem;
  font-weight: 700;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: transform var(--ek-fast), border-color var(--ek-fast), background-color var(--ek-fast), color var(--ek-fast);
}

.ekh-categories button i { color: var(--ek-amber); transition: color var(--ek-fast); }
.ekh-categories > *:hover { border-color: var(--ek-line-2); color: var(--ek-ink); transform: translateY(-1px); }
.ekh-categories > *:active { transform: scale(0.96); }

.ekh-categories button.is-active {
  border-color: transparent;
  background: linear-gradient(145deg, var(--ek-brand) 0%, var(--ek-brand-strong) 100%);
  box-shadow: var(--ek-shadow-brand);
  color: #fff;
}

.ekh-categories button.is-active i { color: #fff; }

.ekh-categories__track {
  margin-left: auto;
  border-color: rgba(18, 128, 92, 0.24);
  background: rgba(18, 128, 92, 0.08);
  color: var(--ek-leaf);
}

.ekh-categories__track i { color: currentColor; }
.ekh-categories__track .fa-chevron-right { font-size: 0.66rem; opacity: 0.7; }
.ekh-categories__track:hover { border-color: var(--ek-leaf); color: #0b5c42; }

/* ============================================================
   5. En-têtes de section
   ============================================================ */

.ekh-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(16px, 3vw, 22px);
}

.ekh-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--ek-muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.ekh-section-head h2 {
  font-size: clamp(1.4rem, 4.2vw, 2rem);
  font-weight: 800;
  line-height: 1.08;
}

.ekh-section-head > div > p {
  margin-top: 6px;
  color: var(--ek-muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.ekh-section-head > a {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--ek-line);
  border-radius: 999px;
  background: var(--ek-card);
  color: var(--ek-ink);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  transition: border-color var(--ek-fast), color var(--ek-fast), gap var(--ek-fast);
}

.ekh-section-head > a i { font-size: 0.72rem; color: var(--ek-brand); }
.ekh-section-head > a:hover { border-color: var(--ek-brand); color: var(--ek-brand-strong); gap: 11px; }

/* ---- Bascule Tous / Favoris ---- */
.ekh-list-modes {
  display: inline-flex;
  flex: none;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--ek-line);
  border-radius: 999px;
  background: var(--ek-soft);
}

.ekh-list-modes button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding-inline: 15px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ek-ink-2);
  font-size: 0.82rem;
  font-weight: 700;
  transition: background-color var(--ek-fast), color var(--ek-fast), box-shadow var(--ek-fast);
}

.ekh-list-modes button:hover { color: var(--ek-ink); }

.ekh-list-modes button.is-active {
  background: var(--ek-card);
  box-shadow: var(--ek-shadow-sm);
  color: var(--ek-brand-strong);
}

.ekh-list-modes button.is-active i { color: var(--ek-brand); }

@media (max-width: 520px) {
  .ekh-section-head { flex-direction: column; align-items: stretch; }
  .ekh-section-head > a, .ekh-list-modes { align-self: flex-start; }
}

/* ============================================================
   6. Rail « À la carte »
   ============================================================ */

.ekh-dish-rail {
  display: flex;
  gap: clamp(12px, 2.4vw, 20px);
  margin-block: -10px -20px;
  margin-inline: calc(var(--ek-gutter) * -1);
  padding-inline: var(--ek-gutter);
  padding-block: 10px 30px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.ekh-dish-rail::-webkit-scrollbar { display: none; }

.ekh-dish {
  display: flex;
  flex: none;
  flex-direction: column;
  width: clamp(212px, 62vw, 268px);
  overflow: hidden;
  border: 1px solid var(--ek-line);
  border-radius: var(--ek-r-lg);
  background: var(--ek-card);
  box-shadow: var(--ek-shadow-sm);
  scroll-snap-align: start;
  transition: transform var(--ek-slow), box-shadow var(--ek-slow), border-color var(--ek-slow);
}

.ekh-dish:hover {
  border-color: transparent;
  box-shadow: var(--ek-shadow-lg);
  transform: translateY(-4px);
}

.ekh-dish__image {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: linear-gradient(150deg, var(--ek-soft), #ece2d8);
  color: var(--ek-brand);
  font-size: 1.6rem;
}

.ekh-dish__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--ek-slow);
}

.ekh-dish:hover .ekh-dish__image img { transform: scale(1.06); }

.ekh-dish__image::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(to top, rgba(28, 20, 17, 0.32), transparent);
  pointer-events: none;
}

.ekh-dish__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px 16px;
}

.ekh-dish__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ek-leaf);
  font-size: 0.665rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ekh-dish__body h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.22;
}

.ekh-dish__body > p {
  overflow: hidden;
  color: var(--ek-muted);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ekh-dish__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}

.ekh-dish__bottom strong {
  color: var(--ek-ink);
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ekh-dish__bottom small {
  color: var(--ek-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.ekh-dish__bottom > span[aria-label] {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ek-brand-soft);
  color: var(--ek-brand-strong);
  font-size: 0.78rem;
  transition: background-color var(--ek-fast), color var(--ek-fast), transform var(--ek-fast);
}

.ekh-dish:hover .ekh-dish__bottom > span[aria-label] {
  background: var(--ek-brand);
  color: #fff;
  transform: translateX(3px);
}

/* ============================================================
   7. Grille restaurants
   ============================================================ */

.ekh-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 18px;
  padding: 8px 8px 8px 16px;
  border: 1px solid rgba(201, 81, 47, 0.24);
  border-radius: 999px;
  background: var(--ek-brand-soft);
  color: var(--ek-brand-strong);
  font-size: 0.86rem;
  font-weight: 700;
}

.ekh-search-result > span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ekh-search-result a {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  font-size: 0.74rem;
  transition: background-color var(--ek-fast), transform var(--ek-fast);
}

.ekh-search-result a:hover { background: #fff; transform: rotate(90deg); }

.ekh-restaurant-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 2.2vw, 20px);
}

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

@media (min-width: 1000px) {
  .ekh-restaurant-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.ekh-restaurant {
  position: relative;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--ek-line);
  border-radius: var(--ek-r-lg);
  background: var(--ek-card);
  box-shadow: var(--ek-shadow-sm);
  transition: transform var(--ek-slow), box-shadow var(--ek-slow), border-color var(--ek-slow);
}

.ekh-restaurant:hover {
  border-color: transparent;
  box-shadow: var(--ek-shadow-lg);
  transform: translateY(-3px);
}

/* Mobile : carte horizontale compacte. */
.ekh-restaurant__image {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 118px;
  overflow: hidden;
  background: linear-gradient(150deg, var(--ek-soft), #ece2d8);
}

.ekh-restaurant__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--ek-slow);
}

.ekh-restaurant:hover .ekh-restaurant__image img { transform: scale(1.05); }

.ekh-restaurant__image > span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ek-brand);
  font-size: 1.15rem;
}

.ekh-restaurant__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 14px 15px 15px;
}

.ekh-restaurant__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ekh-restaurant__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ek-soft);
  color: var(--ek-ink-2);
  font-size: 0.655rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.ekh-restaurant__tag i { color: var(--ek-brand); }

.ekh-restaurant__title h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 1.04rem;
  font-weight: 750;
  line-height: 1.2;
  transition: color var(--ek-fast);
}

.ekh-restaurant__title:hover h3 { color: var(--ek-brand-strong); }

/* La carte entière est cliquable, sans emprisonner le cœur « favori ». */
.ekh-restaurant__title::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.ekh-favorite, .ekh-restaurant__bottom a, .ekh-restaurant__image { position: relative; z-index: 2; }

.ekh-restaurant__location {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  color: var(--ek-muted);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ekh-restaurant__location i { flex: none; color: var(--ek-brand); font-size: 0.76rem; }
.ekh-restaurant__location span { color: var(--ek-leaf); font-weight: 700; }

.ekh-restaurant__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--ek-line);
  color: var(--ek-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.ekh-restaurant__bottom strong {
  color: var(--ek-ink);
  font-size: 0.96rem;
  font-weight: 800;
}

.ekh-restaurant__bottom a {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--ek-brand-soft);
  color: var(--ek-brand-strong);
  font-size: 0.78rem;
  font-weight: 750;
  white-space: nowrap;
  transition: background-color var(--ek-fast), color var(--ek-fast), gap var(--ek-fast);
}

.ekh-restaurant__bottom a i { font-size: 0.7rem; }

.ekh-restaurant:hover .ekh-restaurant__bottom a {
  background: var(--ek-brand);
  color: #fff;
  gap: 10px;
}

/* ---- Cœur favori ---- */
.ekh-favorite {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: -4px -3px -4px 0;
  border: 1px solid var(--ek-line);
  border-radius: 50%;
  background: var(--ek-card);
  color: var(--ek-muted);
  font-size: 0.86rem;
  transition: transform var(--ek-fast), color var(--ek-fast), border-color var(--ek-fast), background-color var(--ek-fast);
}

.ekh-favorite:hover { border-color: var(--ek-brand); color: var(--ek-brand); }
.ekh-favorite:active { transform: scale(0.88); }

.ekh-favorite.is-saved {
  border-color: transparent;
  background: var(--ek-brand-soft);
  color: var(--ek-brand);
  animation: ekh-pop 0.34s var(--ek-ease);
}

@keyframes ekh-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

/* Cartes verticales dès que la grille passe en colonnes. */
@media (min-width: 640px) {
  .ekh-restaurant { flex-direction: column; }

  .ekh-restaurant__image {
    width: 100%;
    aspect-ratio: 16 / 10;
  }

  .ekh-restaurant__body { padding: 15px 17px 17px; }
}

/* ============================================================
   8. État vide
   ============================================================ */

.ekh-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: clamp(36px, 8vw, 64px) var(--ek-gutter);
  border: 1px dashed var(--ek-line-2);
  border-radius: var(--ek-r-xl);
  background: var(--ek-card);
  text-align: center;
}

.ekh-empty > span {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 4px;
  border-radius: 22px;
  background: var(--ek-brand-soft);
  color: var(--ek-brand);
  font-size: 1.35rem;
}

.ekh-empty h3 { font-size: 1.18rem; font-weight: 750; }
.ekh-empty p { max-width: 42ch; color: var(--ek-muted); font-size: 0.89rem; font-weight: 550; }

.ekh-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--ek-brand) 0%, var(--ek-brand-strong) 100%);
  box-shadow: var(--ek-shadow-brand);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 750;
  transition: transform var(--ek-fast), filter var(--ek-fast);
}

.ekh-primary:hover { color: #fff; filter: brightness(1.07); transform: translateY(-2px); }
.ekh-primary:active { transform: scale(0.97); }

/* ============================================================
   9. Accès rapides & pied de module
   ============================================================ */

.ekh-quick-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 720px) {
  .ekh-quick-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ekh-quick-links a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--ek-line);
  border-radius: var(--ek-r);
  background: var(--ek-card);
  box-shadow: var(--ek-shadow-xs);
  transition: transform var(--ek-fast), border-color var(--ek-fast), box-shadow var(--ek-fast);
}

.ekh-quick-links a:hover {
  border-color: var(--ek-line-2);
  box-shadow: var(--ek-shadow-md);
  transform: translateY(-2px);
}

.ekh-quick-links a > span:nth-child(2) {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ekh-quick-links strong {
  color: var(--ek-ink);
  font-size: 0.94rem;
  font-weight: 750;
  letter-spacing: -0.015em;
}

.ekh-quick-links small { color: var(--ek-muted); font-size: 0.79rem; font-weight: 600; }

.ekh-quick-links__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: var(--ek-brand-soft);
  color: var(--ek-brand-strong);
  font-size: 1.05rem;
}

.ekh-quick-links__icon.is-green { background: rgba(18, 128, 92, 0.1); color: var(--ek-leaf); }

.ekh-quick-links a > i:last-child {
  flex: none;
  color: var(--ek-muted);
  font-size: 0.78rem;
  transition: color var(--ek-fast), transform var(--ek-fast);
}

.ekh-quick-links a:hover > i:last-child { color: var(--ek-brand); transform: translate(2px, -2px); }

.ekh-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: clamp(20px, 4vw, 28px);
  border-top: 1px solid var(--ek-line);
  color: var(--ek-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.ekh-footer strong { color: var(--ek-ink); font-weight: 800; }
.ekh-footer a { display: inline-flex; align-items: center; gap: 8px; transition: color var(--ek-fast); }
.ekh-footer a:hover { color: var(--ek-brand-strong); }

/* ============================================================
   10. Toast
   ============================================================ */

.ekh-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--ek-dock) + 8px);
  z-index: 1045;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(28, 20, 17, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--ek-shadow-lg);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 650;
  text-align: center;
  pointer-events: none;
  transform: translate(-50%, 0);
  animation: ekh-toast-in 0.34s var(--ek-ease);
}

@media (min-width: 992px) {
  .ekh-toast { bottom: 28px; }
}

@keyframes ekh-toast-in {
  from { opacity: 0; transform: translate(-50%, 14px) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* ============================================================
   11. Préférences utilisateur
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .ekh *, .ekh *::before, .ekh *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .ekh *:hover { transform: none !important; }
}

@media (prefers-contrast: more) {
  .ekh {
    --ek-line: rgba(28, 20, 17, 0.28);
    --ek-line-2: rgba(28, 20, 17, 0.45);
    --ek-muted: #5c534c;
  }
}

@media print {
  .ekh-header, .ekh-categories, .ekh-list-modes, .ekh-toast, .ekh-quick-links, .ekh-search__submit { display: none !important; }
  .ekh { padding-bottom: 0; background: #fff; }
  .ekh-restaurant, .ekh-dish { box-shadow: none; break-inside: avoid; }
}

/* ============================================================
   12. Elite Redesign Extensions (World-Class Food Delivery)
   ============================================================ */

.ekh-hero-perks {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2px;
}

.ekh-hero-perks span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(28, 20, 17, 0.08);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ek-ink-2);
  box-shadow: var(--ek-shadow-xs);
}

.ekh-intro__eyebrow {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ek-brand);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.ekh-intro h1 span {
  color: var(--ek-brand);
  background: linear-gradient(135deg, var(--ek-brand) 0%, var(--ek-amber) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ekh-intro__sub {
  font-size: 0.95rem;
  color: var(--ek-muted);
  max-width: 540px;
  margin-top: 6px;
  line-height: 1.4;
}

/* Quick Search Chips */
.ekh-quick-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.ekh-chip {
  background: #ffffff;
  border: 1px solid var(--ek-line);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ek-ink-2);
  cursor: pointer;
  transition: all var(--ek-fast);
}

.ekh-chip:hover {
  background: var(--ek-brand-soft);
  border-color: var(--ek-brand);
  color: var(--ek-brand-strong);
  transform: translateY(-1px);
}

/* Dish Tag Hot */
.ekh-dish__tag-hot {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(201, 81, 47, 0.9);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.ekh-dish__order-cta {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ek-brand);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--ek-fast);
}

.ekh-dish:hover .ekh-dish__order-cta {
  gap: 8px;
}

/* Restaurant Badges Overlay */
.ekh-restaurant__image {
  position: relative;
}

.ekh-restaurant__badges {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  z-index: 2;
}

.ekh-pill-time {
  background: rgba(28, 20, 17, 0.85);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ekh-pill-rating {
  background: #ffffff;
  color: var(--ek-ink);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: var(--ek-shadow-xs);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ekh-restaurant__cat-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
  flex-wrap: wrap;
}

.ekh-restaurant__cat-pills span {
  background: var(--ek-soft);
  color: var(--ek-muted);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.ekh-restaurant__distance {
  color: var(--ek-brand-strong);
  font-weight: 700;
}

.ekh-btn-menu {
  background: var(--ek-soft);
  color: var(--ek-brand-strong);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--ek-fast);
}

.ekh-restaurant:hover .ekh-btn-menu {
  background: var(--ek-brand);
  color: #fff;
  box-shadow: var(--ek-shadow-brand);
}

/* 3-Step "Comment ça marche" */
.ekh-how-it-works {
  background: #ffffff;
  border: 1px solid var(--ek-line);
  border-radius: var(--ek-r-xl);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--ek-shadow-sm);
  margin-top: 12px;
}

.ekh-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .ekh-steps-grid {
    grid-template-columns: 1fr;
  }
}

.ekh-step-card {
  position: relative;
  text-align: center;
  padding: 28px 18px 20px;
  background: var(--ek-bg);
  border-radius: var(--ek-r);
  border: 1px solid var(--ek-line);
  transition: transform var(--ek-fast);
}

.ekh-step-card:hover {
  transform: translateY(-3px);
  border-color: var(--ek-brand-ring);
}

.ekh-step-number {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--ek-brand);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(201, 81, 47, 0.4);
}

.ekh-step-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #ffffff;
  color: var(--ek-brand);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px auto 12px;
  box-shadow: var(--ek-shadow-xs);
}

.ekh-step-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--ek-ink);
}

.ekh-step-card p {
  font-size: 0.85rem;
  color: var(--ek-muted);
  line-height: 1.4;
  margin: 0;
}

/* Partner Recruitment Cards */
.ekh-partner-card {
  transition: transform var(--ek-fast), box-shadow var(--ek-fast);
}

.ekh-partner-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ek-shadow-md);
}
