@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&family=Lora:wght@500;600;700&family=Raleway:wght@400;500;600;700&display=swap');

/* ==================================================================
   Fallah — design system
   Style : Organic Biophilic (vert terre + or de récolte)
   Toutes les marges/positions utilisent des propriétés logiques
   pour que la même feuille serve en RTL (arabe) et LTR (français).
   ================================================================== */

:root {
  --primary: #15803d;
  --primary-dark: #14532d;
  --primary-soft: #dcfce7;
  --on-primary: #ffffff;
  --secondary: #22c55e;
  --accent: #a16207;
  --accent-soft: #fef3c7;
  --on-accent: #ffffff;
  /* Couleur dédiée aux annonces/offres : doit trancher sur le fond vert
     de la boutique, contrairement à --accent (trop proche du reste). */
  --spotlight: #f97316;
  --spotlight-dark: #c2410c;
  --spotlight-soft: #fff7ed;
  --on-spotlight: #ffffff;

  --bg: #f0fdf4;
  --bg-alt: #ffffff;
  --fg: #14532d;
  --card: #ffffff;
  --muted: #e8f0f1;
  --muted-fg: #4b5b53;
  --border: #bbf7d0;
  --border-strong: #86efac;
  --destructive: #dc2626;
  --destructive-soft: #fee2e2;
  --warning: #b45309;
  --warning-soft: #fef3c7;
  --info: #0369a1;
  --info-soft: #e0f2fe;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --shadow-sm: 0 1px 2px rgba(20, 83, 45, .06), 0 1px 3px rgba(20, 83, 45, .08);
  --shadow: 0 4px 6px -1px rgba(20, 83, 45, .08), 0 10px 20px -8px rgba(20, 83, 45, .12);
  --shadow-lg: 0 12px 32px -8px rgba(20, 83, 45, .22);

  --font-ar: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  --font-fr: 'Raleway', 'Segoe UI', system-ui, sans-serif;
  --font-display-fr: 'Lora', Georgia, serif;

  --container: 1180px;
  --header-h: 68px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

/* `hidden` doit toujours l'emporter : plusieurs composants (boutons, tiroir)
   imposent un display qui, sinon, réaffiche l'élément masqué. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ar);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html[lang='fr'] body { font-family: var(--font-fr); }
html[lang='fr'] h1, html[lang='fr'] h2, html[lang='fr'] .display { font-family: var(--font-display-fr); }

h1, h2, h3, h4 { margin: 0 0 var(--space-3); line-height: 1.25; color: var(--primary-dark); }
h1 { font-size: clamp(1.9rem, 1.2rem + 3vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 var(--space-3); }
a { color: var(--primary); }

img, svg { max-width: 100%; }

/* Tailles par défaut des SVG ; chaque contexte les ajuste ensuite. */
.produce-icon { display: block; width: 48px; height: 48px; }
.icon { display: inline-block; width: 20px; height: 20px; vertical-align: middle; flex: none; }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { width: min(100% - 2 * var(--space-4), var(--container)); margin-inline: auto; }
.section { padding-block: var(--space-7); }
.muted { color: var(--muted-fg); }
.center { text-align: center; }
.stack > * + * { margin-block-start: var(--space-3); }

.skip-link {
  position: absolute;
  inset-block-start: -100px;
  inset-inline-start: var(--space-4);
  z-index: 200;
  background: var(--primary);
  color: var(--on-primary);
  padding: var(--space-3) var(--space-4);
  border-radius: 0 0 var(--radius) var(--radius);
}
.skip-link:focus { inset-block-start: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---------------- Boutons ---------------- */

.btn {
  --btn-bg: var(--primary);
  --btn-fg: var(--on-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 46px;
  padding: var(--space-3) var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease);
}
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--accent { --btn-bg: var(--accent); --btn-fg: var(--on-accent); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--primary-dark); border-color: var(--border-strong); }
.btn--ghost:hover:not(:disabled) { background: var(--primary-soft); }
.btn--danger { --btn-bg: var(--destructive-soft); --btn-fg: var(--destructive); }
.btn--block { width: 100%; }
.btn--sm { min-height: 38px; padding: var(--space-2) var(--space-4); font-size: .9rem; }
.btn .icon { width: 20px; height: 20px; flex: none; }

/* ---------------- En-tête ---------------- */

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-block-end: 1px solid var(--border);
}
.site-header__inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary-dark);
  text-decoration: none;
}
.brand__mark {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  flex: none;
}
.brand__mark img { width: 100%; height: 100%; object-fit: contain; }
.brand__tag { display: block; font-size: .7rem; font-weight: 500; color: var(--muted-fg); line-height: 1; }

.site-nav { display: flex; align-items: center; gap: var(--space-1); margin-inline-start: auto; }
.site-nav a {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 500;
  transition: background-color .18s var(--ease);
}
.site-nav a:hover { background: var(--primary-soft); }

.lang-switch { display: inline-flex; background: var(--muted); border-radius: var(--radius-full); padding: 3px; }
.lang-switch button {
  min-height: 34px; padding: 0 var(--space-3);
  border: 0; border-radius: var(--radius-full);
  background: transparent; color: var(--muted-fg);
  font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.lang-switch button[aria-pressed='true'] { background: var(--card); color: var(--primary-dark); box-shadow: var(--shadow-sm); }

.cart-btn { position: relative; }
.cart-btn__count {
  position: absolute;
  inset-block-start: -6px;
  inset-inline-end: -6px;
  min-width: 22px; height: 22px;
  display: grid; place-items: center;
  padding: 0 5px;
  background: var(--accent); color: #fff;
  border-radius: var(--radius-full);
  font-size: .75rem; font-weight: 700;
}
.cart-btn__count[hidden] { display: none; }

.nav-toggle { display: none; width: 40px; min-height: 40px; padding: 0; flex: none; }
.nav-toggle .icon { width: 20px; height: 20px; }
.site-nav__links { display: contents; }
.nav-backdrop { display: none; }

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-6) var(--space-5);
  background:
    radial-gradient(1100px 420px at 80% -10%, #dcfce7 0%, transparent 60%),
    linear-gradient(180deg, #f7fee7 0%, var(--bg) 100%);
}
.hero__grid { display: grid; gap: var(--space-5); align-items: center; grid-template-columns: 1fr; }
.hero h1 { font-size: clamp(1.6rem, 1.1rem + 2.1vw, 2.3rem); }
.hero p.lead { font-size: 1rem; color: var(--muted-fg); max-width: 48ch; margin-block-end: 0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-block-start: var(--space-4); }

.hero__art {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 240px;
  margin-inline: auto;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 45%, #fff 0%, #ecfdf5 55%, #d1fae5 100%);
  border-radius: 46% 54% 52% 48% / 50% 46% 54% 50%;
  box-shadow: var(--shadow-lg);
}
.hero__art > .produce-icon { width: 56%; height: auto; }
.hero__art > .hero__logo { width: 62%; height: auto; object-fit: contain; }

/* Petits produits qui gravitent autour du panier. */
.hero__float {
  position: absolute;
  width: 22%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  background: var(--card);
  border-radius: 50%;
  box-shadow: var(--shadow);
  animation: float-y 6s var(--ease) infinite;
}
.hero__float .produce-icon { width: 62%; height: auto; }
.hero__float:nth-child(2) { inset-block-start: 4%;  inset-inline-start: 4%;  animation-delay: -.2s; }
.hero__float:nth-child(3) { inset-block-start: 14%; inset-inline-end: -2%;   animation-delay: -1.6s; }
.hero__float:nth-child(4) { inset-block-end: 12%;   inset-inline-start: -2%; animation-delay: -3s; }
.hero__float:nth-child(5) { inset-block-end: 2%;    inset-inline-end: 10%;   animation-delay: -4.4s; }

@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---------------- Étapes ---------------- */

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-4); }
.step {
  position: relative;
  padding: var(--space-5);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--space-2);
  box-shadow: var(--shadow-sm);
}
.step__num {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  margin-block-end: var(--space-3);
  background: var(--primary-soft); color: var(--primary-dark);
  border-radius: var(--radius-full);
  font-weight: 800;
}
.step h3 { margin-block-end: var(--space-1); font-size: 1.05rem; }
.step p { margin: 0; font-size: .9rem; color: var(--muted-fg); }

/* ---------------- Filtres catalogue ---------------- */

.catalog-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
  margin-block-end: var(--space-5);
}
.search-field { position: relative; flex: 1 1 260px; }
.search-field .icon {
  position: absolute;
  inset-inline-start: var(--space-3);
  inset-block-start: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px; color: var(--muted-fg);
  pointer-events: none;
}
/* Doit gagner sur la règle générique `input[type='search']` définie plus bas. */
.search-field input[type='search'] { padding-inline-start: calc(var(--space-5) + 22px); }

.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  min-height: 40px;
  padding: var(--space-2) var(--space-4);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--primary-dark);
  font: inherit; font-weight: 600; font-size: .9rem;
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.chip:hover { background: var(--primary-soft); }
.chip[aria-pressed='true'] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

/* ---------------- Cartes produit ---------------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-4);
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-card--out { opacity: .62; }

.product-card__media {
  position: relative;
  display: grid; place-items: center;
  padding: var(--space-5);
  background: linear-gradient(160deg, #f7fee7, #ecfdf5);
  border-block-end: 1px solid var(--border);
}
.product-card__media .produce-icon { width: 96px; height: 96px; }

/* Photo réelle : elle occupe toute la zone média, sans déformation. */
.product-card__media--photo { padding: 0; }
.product-card__photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.cart-line__icon img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px var(--space-3);
  border-radius: var(--radius-full);
  font-size: .74rem; font-weight: 700;
}
.badge--bio { background: var(--primary); color: #fff; }
.badge--out { background: var(--destructive-soft); color: var(--destructive); }
.badge--fresh { background: var(--accent-soft); color: var(--accent); }
.badge--soft { background: var(--muted); color: var(--muted-fg); font-weight: 600; }
.badge--sale { background: var(--destructive); color: #fff; }
.product-card__badges {
  position: absolute;
  inset-block-start: var(--space-3);
  inset-inline-start: var(--space-3);
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1);
}

.product-card__body { display: flex; flex-direction: column; flex: 1; padding: var(--space-4); gap: var(--space-2); }
.product-card__name { margin: 0; font-size: 1.1rem; }
.product-card__farmer { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted-fg); }
.product-card__farmer .icon { width: 16px; height: 16px; flex: none; }
.product-card__desc { margin: 0; font-size: .85rem; color: var(--muted-fg); }
.product-card__price { margin-block-start: auto; font-size: 1.25rem; font-weight: 800; color: var(--primary-dark); }
.product-card__price small { font-size: .8rem; font-weight: 500; color: var(--muted-fg); }
/* Ancien prix barré, à côté du prix soldé. */
.product-card__price del { font-size: .9rem; font-weight: 600; color: var(--muted-fg); }
.product-card__stock { font-size: .78rem; color: var(--muted-fg); }

/* Sélecteur de quantité */
.qty {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-1);
  background: var(--muted);
  border-radius: var(--radius-full);
}
.qty button {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 0; border-radius: var(--radius-full);
  background: var(--card); color: var(--primary-dark);
  font-size: 1.3rem; font-weight: 700; line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.qty button:hover:not(:disabled) { background: var(--primary); color: #fff; }
.qty button:disabled { opacity: .4; cursor: not-allowed; }
.qty__value { flex: 1; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.qty__value small { display: block; font-size: .72rem; font-weight: 500; color: var(--muted-fg); }

/* ---------------- Panier ---------------- */

.drawer-backdrop {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(20, 83, 45, .45);
  opacity: 0; visibility: hidden;
  transition: opacity .25s var(--ease), visibility .25s var(--ease);
}
.drawer-backdrop.is-open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  inset-block: 0;
  inset-inline-end: 0;
  z-index: 160;
  width: min(420px, 100%);
  display: flex; flex-direction: column;
  background: var(--bg-alt);
  box-shadow: var(--shadow-lg);
  transform: translateX(var(--drawer-hidden, 105%));
  transition: transform .28s var(--ease);
}
[dir='rtl'] .drawer { --drawer-hidden: -105%; }
.drawer.is-open { transform: translateX(0); }
.drawer__head {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4);
  border-block-end: 1px solid var(--border);
}
.drawer__head h2 { margin: 0; font-size: 1.2rem; }
.drawer__close {
  margin-inline-start: auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 0; border-radius: var(--radius-full);
  background: var(--muted); color: var(--primary-dark);
  cursor: pointer;
}
.drawer__body { flex: 1; overflow-y: auto; padding: var(--space-4); }
.drawer__foot { padding: var(--space-4); border-block-start: 1px solid var(--border); background: var(--card); }

.cart-line { display: flex; gap: var(--space-3); padding-block: var(--space-3); border-block-end: 1px dashed var(--border); }
.cart-line--error {
  outline: 2px solid var(--destructive);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
  background: var(--destructive-soft);
}
.cart-line__icon {
  width: 54px; height: 54px; flex: none;
  display: grid; place-items: center;
  background: var(--primary-soft);
  border-radius: var(--radius);
}
.cart-line__icon .produce-icon { width: 36px; height: 36px; }
.cart-line__main { flex: 1; min-width: 0; }
.cart-line__name { font-weight: 600; }
.cart-line__meta { font-size: .82rem; color: var(--muted-fg); }
.cart-line__controls { display: flex; align-items: center; gap: var(--space-2); margin-block-start: var(--space-2); }
.cart-line__controls .qty { flex: 1; }
.cart-line__controls .qty button { width: 34px; height: 34px; font-size: 1.1rem; }
.icon-btn {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: var(--radius-full);
  background: transparent; color: var(--destructive);
  cursor: pointer;
  transition: background-color .15s var(--ease);
}
.icon-btn:hover { background: var(--destructive-soft); }
.icon-btn .icon { width: 18px; height: 18px; }

.totals { display: grid; gap: var(--space-2); margin-block-end: var(--space-4); }
.totals__row { display: flex; justify-content: space-between; gap: var(--space-3); font-size: .95rem; }
.totals__row--grand { padding-block-start: var(--space-2); border-block-start: 1px solid var(--border); font-size: 1.15rem; font-weight: 800; }
.totals__row--free { color: var(--primary); font-weight: 600; }
.totals__row--discount { color: var(--accent); font-weight: 600; }
.totals__row--saved {
  justify-content: flex-end;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: .88rem;
}

/* ---------------- Annonce et offres du moment ---------------- */

.section--tight { padding-block: var(--space-5); }

.announce {
  position: relative;
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--spotlight);
  border-inline-start: 5px solid var(--spotlight-dark);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--spotlight-soft), var(--card) 65%);
  box-shadow: 0 12px 28px -14px rgba(194, 65, 12, .55);
}
.announce__icon {
  position: relative;
  flex: none;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  color: var(--on-spotlight);
  background: var(--spotlight);
  border-radius: var(--radius-full);
}
.announce__icon .icon { width: 22px; height: 22px; }
.announce__icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(249, 115, 22, .55);
  animation: announce-ping 2.4s var(--ease) infinite;
}
.announce__title { margin-block-end: var(--space-1); font-size: 1.2rem; color: var(--spotlight-dark); font-weight: 800; }
.announce__body { margin: 0; color: var(--fg); white-space: pre-line; }

@keyframes announce-ping {
  0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, .5); }
  70% { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); }
  100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
}

.promo-list__title { margin-block: var(--space-5) var(--space-3); font-size: 1.15rem; }
#announcement:not([hidden]) + #promotions .promo-list__title { margin-block-start: var(--space-5); }

.promo-list {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.promo-card {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4);
  border: 1px solid var(--spotlight);
  border-inline-start: 4px solid var(--spotlight-dark);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 10px 22px -14px rgba(194, 65, 12, .5);
}
.promo-card__icon {
  flex: none;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  color: var(--on-spotlight);
  background: var(--spotlight);
  border-radius: var(--radius-full);
}
.promo-card__icon .icon { width: 18px; height: 18px; }
.promo-card h3 { margin-block-end: var(--space-1); font-size: 1rem; color: var(--spotlight-dark); font-weight: 700; }
.promo-card p { margin: 0; font-size: .9rem; color: var(--muted-fg); }

/* Ligne de remise dans le détail d'une commande (vendeur et suivi client). */
.order-items li.is-discount { color: var(--accent); font-weight: 600; }

.empty-state { padding: var(--space-7) var(--space-4); text-align: center; color: var(--muted-fg); }
.empty-state .produce-icon, .empty-state .icon { width: 72px; height: 72px; opacity: .5; margin-block-end: var(--space-3); }

/* ---------------- Formulaires ---------------- */

.field { display: block; margin-block-end: var(--space-4); }
.field__label { display: block; margin-block-end: var(--space-2); font-weight: 600; font-size: .93rem; }
.field__label .req { color: var(--destructive); }
.field__hint { display: block; margin-block-start: var(--space-1); font-size: .8rem; color: var(--muted-fg); }
.field__error { display: none; margin-block-start: var(--space-1); font-size: .84rem; font-weight: 600; color: var(--destructive); }
.field.has-error .field__error { display: block; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--destructive); background: #fff5f5; }

input[type='text'], input[type='tel'], input[type='search'], input[type='password'], input[type='number'], textarea, select {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  background: var(--card);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--fg);
  font: inherit;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
textarea { min-height: 104px; resize: vertical; }
select { cursor: pointer; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(21, 128, 61, .15);
}
input::placeholder, textarea::placeholder { color: #9aa8a0; }

.phone-input { display: flex; align-items: stretch; gap: var(--space-2); }
.phone-input__prefix {
  display: grid; place-items: center;
  padding-inline: var(--space-4);
  background: var(--muted);
  border-radius: var(--radius);
  font-weight: 700; color: var(--muted-fg);
  white-space: nowrap;
}
.phone-input input { direction: ltr; text-align: start; letter-spacing: .08em; }

.radio-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-2); }
.radio-card {
  position: relative;
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--card);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: .92rem;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card:hover { background: var(--primary-soft); }
.radio-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.radio-card:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }

/* Choix livraison / retrait : une ligne par option, avec son détail. */
.radio-row--stack { grid-template-columns: 1fr; }
.radio-row--stack .radio-card { align-items: flex-start; }
.radio-card__detail { display: block; margin-block-start: 2px; font-weight: 400; color: var(--muted-fg); }
.radio-card__detail + .btn { margin-block-start: var(--space-2); }

/* Liste des produits remisés dans la fiche offre. */
.product-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-1);
  max-height: 190px;
  overflow-y: auto;
  padding: var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
}
.product-picker__item {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm, 8px);
  cursor: pointer;
  font-size: .9rem;
}
.product-picker__item:hover { background: var(--primary-soft); }
.product-picker__item:has(input:checked) { background: var(--primary-soft); font-weight: 600; }
.product-picker__item input { accent-color: var(--primary); flex: none; }
.product-picker__item.is-reference { border: 1px dashed var(--accent); }
.product-picker__tag {
  margin-inline-start: auto;
  padding-inline: var(--space-1);
  font-size: .68rem;
  font-style: normal;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
}

/* ---------------- Fiche offre : les deux etapes ---------------- */

.promo-step > legend { display: flex; align-items: center; gap: var(--space-2); }
.promo-step__num {
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--on-primary);
  background: var(--primary);
  border-radius: 50%;
  flex: none;
}

/* Fleche « la condition mene a la remise », entre les deux etapes. */
.promo-flow { display: grid; place-items: center; margin-block: calc(-1 * var(--space-2)); }
.promo-flow__arrow {
  width: 0; height: 0;
  border-inline: 8px solid transparent;
  border-block-start: 10px solid var(--border-strong);
}

/* Regle reellement calculee : reference a gauche, remise a droite. */
.promo-rule {
  margin-block: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary-soft);
}
.promo-rule__title {
  display: flex; align-items: center; gap: var(--space-2);
  margin-block-end: var(--space-3);
  font-size: .82rem; font-weight: 700;
  color: var(--primary-dark);
}
.promo-rule__flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-3);
}
.promo-rule__side { min-width: 0; }
.promo-rule__side strong { display: block; font-size: .95rem; overflow-wrap: anywhere; }
.promo-rule__key {
  display: block;
  margin-block-end: 2px;
  font-size: .72rem;
  color: var(--muted-fg);
}
/* Pointe vers la remise, dans le sens de lecture de la page. */
.promo-rule__sep {
  width: 0; height: 0;
  border-block: 7px solid transparent;
  border-inline-end: 10px solid var(--primary);
}
.promo-rule__customer {
  margin-block-start: var(--space-3);
  padding-block-start: var(--space-3);
  border-block-start: 1px solid var(--primary);
  font-size: .9rem;
}
.promo-rule__warn {
  display: block;
  margin-block-start: var(--space-1);
  font-size: .78rem;
  font-style: normal;
  color: var(--accent);
}

@media (max-width: 560px) {
  .promo-rule__flow { grid-template-columns: 1fr; }
  .promo-rule__sep {
    justify-self: center;
    border-inline: 7px solid transparent;
    border-block-start: 10px solid var(--primary);
    border-block-end: 0;
  }
}

/* ---------------- Cartes / panneaux ---------------- */

.panel {
  padding: var(--space-5);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.panel + .panel { margin-block-start: var(--space-4); }
.panel__title { display: flex; align-items: center; gap: var(--space-2); margin-block-end: var(--space-4); font-size: 1.15rem; }
.panel__title .icon { width: 22px; height: 22px; color: var(--primary); }

.notice {
  display: flex; gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius);
  font-size: .9rem;
  background: var(--info-soft); color: #075985;
}
.notice .icon { width: 22px; height: 22px; flex: none; }
.notice--warn { background: var(--warning-soft); color: var(--warning); }
.notice--ok { background: var(--primary-soft); color: var(--primary-dark); }

.checkout-layout { display: grid; grid-template-columns: 1fr; gap: var(--space-5); align-items: start; }

/* ---------------- Suivi / statuts ---------------- */

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px var(--space-3);
  border-radius: var(--radius-full);
  font-size: .82rem; font-weight: 700;
}
.status-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-pending    { background: var(--warning-soft); color: var(--warning); }
.status-confirmed  { background: var(--info-soft); color: var(--info); }
.status-preparing  { background: #ede9fe; color: #6d28d9; }
.status-on_the_way { background: #ffedd5; color: #c2410c; }
.status-delivered  { background: var(--primary-soft); color: var(--primary-dark); }
.status-cancelled  { background: var(--destructive-soft); color: var(--destructive); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative;
  padding-inline-start: var(--space-6);
  padding-block-end: var(--space-5);
}
.timeline li::before {
  content: '';
  position: absolute;
  inset-inline-start: 6px;
  inset-block-start: 6px;
  width: 14px; height: 14px;
  background: var(--card);
  border: 3px solid var(--border-strong);
  border-radius: 50%;
}
.timeline li::after {
  content: '';
  position: absolute;
  inset-inline-start: 12px;
  inset-block: 22px 0;
  width: 2px;
  background: var(--border);
}
.timeline li:last-child::after { display: none; }
.timeline li.is-done::before { background: var(--primary); border-color: var(--primary); }
.timeline li.is-current::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.timeline strong { display: block; }
.timeline span { font-size: .86rem; color: var(--muted-fg); }

.ref-box {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-4);
  background: var(--primary-soft);
  border: 1px dashed var(--primary);
  border-radius: var(--radius);
  font-size: 1.25rem; font-weight: 800;
  letter-spacing: .04em;
  direction: ltr;
}

/* ---------------- Tableau de bord vendeur ---------------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3); margin-block-end: var(--space-5); }
.stat {
  padding: var(--space-4);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.stat__value { font-size: 1.7rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat__label { font-size: .84rem; color: var(--muted-fg); }

.order-card { padding: var(--space-4); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.order-card + .order-card { margin-block-start: var(--space-3); }
.order-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-block-end: var(--space-3); }
.order-card__ref { font-weight: 800; direction: ltr; }
.order-card__time { margin-inline-start: auto; font-size: .82rem; color: var(--muted-fg); }
.order-card__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-3); margin-block-end: var(--space-3); }
.order-card__field { font-size: .9rem; }
.order-card__field span { display: block; font-size: .76rem; color: var(--muted-fg); }
.order-items { margin: 0; padding: 0; list-style: none; font-size: .9rem; }
.order-items li { display: flex; justify-content: space-between; gap: var(--space-3); padding-block: 4px; border-block-end: 1px dashed var(--border); }
.order-card__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-block-start: var(--space-3); }

.tabs {
  display: flex;
  gap: var(--space-2);
  margin-block-end: var(--space-5);
  border-block-end: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  padding: var(--space-3) var(--space-4);
  border: 0; border-block-end: 3px solid transparent;
  background: transparent; color: var(--muted-fg);
  font: inherit; font-weight: 600; cursor: pointer;
  flex: none;
  white-space: nowrap;
}
.tabs button[aria-selected='true'] { color: var(--primary-dark); border-block-end-color: var(--primary); }

.table-wrap { overflow-x: auto; }
table.admin-table { width: 100%; border-collapse: collapse; min-width: 620px; }
table.admin-table th, table.admin-table td { padding: var(--space-3); text-align: start; border-block-end: 1px solid var(--border); }
table.admin-table th { font-size: .84rem; color: var(--muted-fg); font-weight: 600; }
table.admin-table input { min-height: 40px; max-width: 120px; }

.switch { display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--primary); cursor: pointer; }
.switch-row { display: flex; flex-wrap: wrap; gap: var(--space-5); margin-block-start: var(--space-3); }

/* Vignette produit dans le tableau du vendeur */
.product-thumb {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb .produce-icon { width: 36px; height: 36px; }
.row-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* ---------------- Fiche produit (dialog) ---------------- */

.dialog {
  width: min(860px, calc(100vw - 2 * var(--space-4)));
  max-height: calc(100vh - 2 * var(--space-5));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--fg);
  box-shadow: var(--shadow-lg);
}
.dialog::backdrop { background: rgba(20, 83, 45, .45); backdrop-filter: blur(2px); }
.dialog form { display: flex; flex-direction: column; max-height: inherit; }

.dialog__head {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-block-end: 1px solid var(--border);
}
.dialog__head h2 { margin: 0; font-size: 1.2rem; }
.dialog__head .drawer__close { margin-inline-start: auto; }
.dialog__body { flex: 1; overflow-y: auto; padding: var(--space-5); }
.dialog__foot {
  display: flex; justify-content: flex-end; gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-block-start: 1px solid var(--border);
  background: var(--bg);
}

.form-section { margin: 0 0 var(--space-5); padding: 0; border: 0; }
.form-section legend {
  padding: 0 0 var(--space-3);
  font-weight: 700; font-size: .95rem; color: var(--primary);
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 var(--space-4); }
.form-grid .field { margin-block-end: var(--space-3); }

.photo-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); margin-block-end: var(--space-4); }
.photo-preview {
  width: 120px; height: 120px; flex: none;
  display: grid; place-items: center;
  background: var(--muted);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview .produce-icon { width: 56px; height: 56px; opacity: .8; }
.photo-row label.btn { cursor: pointer; }

.icon-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: var(--space-2);
  margin-block-start: var(--space-2);
}
.icon-picker button {
  aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  padding: var(--space-1);
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.icon-picker button:hover { background: var(--primary-soft); }
.icon-picker button[aria-checked='true'] { border-color: var(--primary); background: var(--primary-soft); }
.icon-picker .produce-icon { width: 32px; height: 32px; }

/* ---------------- Toasts ---------------- */

.toasts {
  position: fixed;
  inset-block-end: var(--space-5);
  inset-inline-start: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex; flex-direction: column; gap: var(--space-2);
  width: min(94vw, 420px);
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--primary-dark); color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: .92rem;
  animation: toast-in .25s var(--ease);
}
.toast--error { background: var(--destructive); }
.toast .icon { width: 20px; height: 20px; flex: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------------- Pied de page ---------------- */

.site-footer {
  margin-block-start: var(--space-8);
  padding-block: var(--space-6);
  background: var(--primary-dark);
  color: #dcfce7;
}
.site-footer a { color: #bbf7d0; }
.site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-5); }
.site-footer h3 { color: #fff; font-size: 1rem; }
.site-footer__bottom {
  margin-block-start: var(--space-5);
  padding-block-start: var(--space-4);
  border-block-start: 1px solid rgba(255, 255, 255, .15);
  font-size: .84rem;
  opacity: .85;
}

/* ---------------- Squelettes de chargement ---------------- */

.skeleton {
  height: 300px;
  background: linear-gradient(100deg, #ecfdf5 30%, #f7fee7 50%, #ecfdf5 70%);
  background-size: 200% 100%;
  border-radius: var(--radius-lg);
  animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------- Révélation au défilement ---------------- */

.reveal { opacity: 0; transform: translateY(12px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------------- Points de rupture ---------------- */

@media (min-width: 720px) {
  .hero__grid { grid-template-columns: 1.15fr .85fr; }
}

@media (min-width: 900px) {
  .checkout-layout { grid-template-columns: 1.3fr .7fr; }
  .checkout-layout__summary { position: sticky; inset-block-start: calc(var(--header-h) + var(--space-4)); }
}

@media (max-width: 719px) {
  .site-nav > a { display: none; }
  .site-nav > a.always-visible { display: inline-flex; }
  .site-nav { gap: var(--space-2); }
  .nav-toggle { display: inline-flex; order: -1; margin-inline-end: auto; }
  .cart-btn {
    width: 40px; min-height: 40px;
    padding: 0;
  }
  .cart-btn span[data-i18n] { display: none; }
  .site-nav__links {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset-block-start: var(--header-h);
    inset-inline-end: 0;
    width: min(78vw, 300px);
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    background: var(--card);
    padding: var(--space-3);
    gap: var(--space-1);
    box-shadow: var(--shadow-lg);
    /* inset-inline-end resolve à gauche en rtl (arabe) : on masque le
       panneau en le poussant plus loin dans la même direction. */
    transform: translateX(-100%);
    transition: transform .25s var(--ease);
    overflow-y: auto;
    z-index: 200;
  }
  :dir(ltr) .site-nav__links { transform: translateX(100%); }
  .site-nav__links.is-open { transform: translateX(0); }
  .site-nav__links a { display: block; padding: var(--space-3); font-size: 1.05rem; }
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: rgba(15, 23, 42, .35);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s var(--ease);
  }
  .nav-backdrop.is-open { opacity: 1; pointer-events: auto; }
  .brand__tag { display: none; }
  .site-header__inner { gap: var(--space-2); }
  .brand { font-size: 1.05rem; gap: var(--space-1); }
  .brand__mark { width: 40px; height: 40px; }
  .lang-switch button { padding: 0 var(--space-2); font-size: .8rem; }
  #logout { padding-inline: var(--space-3); }
  #logout span[data-i18n] {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .stats { grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }
  .stat { padding: var(--space-3); }
  .stat__value { font-size: 1.4rem; }
  .stat__label { font-size: .78rem; }
  .tabs { gap: var(--space-1); }
  .tabs button { padding: var(--space-2) var(--space-3); font-size: .92rem; }
  .panel.table-wrap { padding: var(--space-3); }
  table.admin-table { min-width: 0; width: 100%; }
  table.admin-table th, table.admin-table td { padding: var(--space-2); font-size: .86rem; }
  table.admin-table input { max-width: 76px; }
  .hero { padding-block: var(--space-5); }
  .hero__art { max-width: 180px; }

  #how { padding-block: var(--space-6); }
  #how .center { margin-block-end: var(--space-4) !important; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }
  .step { padding: var(--space-3); border-radius: var(--radius); display: flex; align-items: center; gap: var(--space-2); }
  .step__num { width: 26px; height: 26px; margin-block-end: 0; font-size: .8rem; flex: none; }
  .step h3 { font-size: .82rem; margin: 0; line-height: 1.2; }
  .step p { display: none; }
}

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

@media print {
  .site-header, .site-footer, .drawer, .drawer-backdrop, .toasts, .btn { display: none !important; }
}

/* ---------------- Carte de localisation ---------------- */

.map-field .field__label { display: flex; align-items: center; gap: var(--space-2); }

.pin-choice { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pin-choice .btn { flex: 1 1 200px; }

.map-picker { margin-block-start: var(--space-3); }

.map-picker__search { margin-block-end: var(--space-3); }

.map-picker__results {
  position: absolute;
  inset-inline: 0;
  inset-block-start: calc(100% + 4px);
  z-index: 5;
  margin: 0;
  padding: var(--space-1);
  list-style: none;
  background: var(--card);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 240px;
  overflow-y: auto;
}
.map-picker__results li + li { border-block-start: 1px solid var(--border); }
.map-picker__results button {
  display: block;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: .85rem;
  text-align: start;
  color: inherit;
  cursor: pointer;
}
.map-picker__results button:hover,
.map-picker__results button:focus-visible { background: var(--primary-soft); }
.map-picker__results-empty {
  padding: var(--space-2) var(--space-3);
  font-size: .85rem;
  color: var(--muted-fg);
}

.map {
  position: relative;
  height: 320px;
  overflow: hidden;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--muted);
  cursor: grab;
  /* Le geste appartient a la carte : le navigateur ne doit ni scroller ni zoomer. */
  touch-action: none;
  user-select: none;
  /* Les tuiles sont positionnees en pixels : toujours de gauche a droite. */
  direction: ltr;
}
.map.is-dragging { cursor: grabbing; }

.map__tiles { position: absolute; inset: 0; }
.map__tile {
  position: absolute;
  inset-block-start: 0;
  left: 0;
  width: 256px;
  height: 256px;
  pointer-events: none;
}

/* Repere fixe au centre : la pointe de l'epingle marque le point choisi. */
.map__crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -100%);
  color: var(--primary-dark);
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(255, 255, 255, .9));
}
.map__crosshair .icon { width: 42px; height: 42px; }
.map__crosshair::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 8px;
  height: 8px;
  transform: translateX(-50%);
  background: var(--primary-dark);
  border: 2px solid #fff;
  border-radius: var(--radius-full);
}

.map__zoom {
  position: absolute;
  inset-block-start: var(--space-3);
  inset-inline-end: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.map__zoom button {
  width: 38px;
  height: 38px;
  background: var(--card);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--primary-dark);
  font: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.map__zoom button:hover { background: var(--primary-soft); }

.map__credit {
  position: absolute;
  inset-block-end: 0;
  inset-inline-end: 0;
  margin: 0;
  padding: 2px 6px;
  background: rgba(255, 255, 255, .82);
  border-start-start-radius: var(--radius-sm);
  font-size: .68rem;
  color: var(--muted-fg);
}
.map__credit a { color: inherit; }

.map-picker__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-block-start: var(--space-3);
}

.map-pinned {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-block-start: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--primary-soft);
  border-radius: var(--radius);
  color: var(--primary-dark);
}
.map-pinned__text { flex: 1; min-width: 0; }
.map-pinned__text strong { display: block; font-size: .9rem; }
.map-pinned__coords { font-size: .78rem; color: var(--muted-fg); }

@media (max-width: 640px) {
  .map { height: 260px; }
}
