.topbar {
  position: sticky;
  top: 0;
  z-index: 1500;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.topbar .btn{
  font-size: 14px;	
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
body[data-region="cote-basque"] .miamm-header .brand {
  gap: 7px;
}
body.favorites-active .miamm-header .brand {
  gap: 5px;
}

.brand-star { color: var(--orange); font-size: 2.7rem; line-height: 1; transform: rotate(-12deg); }
body[data-region="cote-basque"] .brand .brand-star { transform: rotate(0deg); }

.brand-word { font: 800 2.7rem/1 var(--display); letter-spacing: -.09em; }

.brand-baseline, .brand-subtitle {
  margin-left: 12px;
  padding-left: 22px;
  border-left: 1px solid #d8dbd1;
  color: var(--muted);
  font-size: .875rem;
}

.nav-actions, .top-actions { display: flex; align-items: center; gap: 10px; }

.brand-group {display:flex;align-items:center;gap:12px;min-width:0;flex-wrap:wrap;}
.brand-zone {padding:7px 11px;background:var(--lilac);border-radius:11px;font-size:.8rem;font-weight:700;max-width:180px;line-height:1.2;}
body[data-region="cote-basque"] .brand-zone {background:#e4eddf;color:#345b40;}
.brand-star img {width:42px;height:42px;}
.clear-location {display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:40px;padding:7px 9px;background:transparent;text-decoration:none;font-size:.75rem;color:var(--muted);border-radius:10px;}
.clear-location:hover {background:var(--surface);color:var(--ink);}
.clear-location .icon {width:16px;height:16px;}
.header-cart {display:inline-flex;gap:9px;align-items:center;padding:9px 13px;border:1px solid #d8cbf6;border-radius:14px;background:var(--lilac);text-decoration:none;font-size:.8rem;font-weight:700;min-height:46px;}
.header-cart small {display:block;font-size:.7rem;font-weight:500;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.header-count {display:none;}
.footer {display:flex;justify-content:space-between;align-items:flex-start;gap:22px;margin-top:36px;padding:26px 0;border-top:1px solid var(--line);color:var(--muted);font-size:.8125rem;}
.footer strong {color:var(--ink);}

/** Optimized

.brand { padding-left: 2px;}
body[data-scope="overview"] .brand-group {
  max-height: none;	
}
.brand-word {
  letter-spacing: -.085em;
}

.brand-group {
  max-height: 42px;
}
.brand-star {
  font-size: 2.6rem;
}
 */
.brand-group {
  padding-left: 2px;	
}
.brand-word {
  font: 800 2.65rem/1 var(--display);
  letter-spacing: -.085em;
}
.brand-star img {
  width: 40px;
  height: 40px;
}
.topbar .brand-baseline{
  display: none;	
  font-size: .8rem;
  line-height: 1.4;
  padding-left: 21px;
}
body[data-scope="overview"] .brand-baseline {
  display: block;
}
.brand-zone {
  margin-left: 7px;
  margin-top: 2px;
}
.clear-location span{
	padding-top: 1px;
}
/** --- */

@media(max-width:1250px){.brand-baseline,.brand-subtitle{display:none;}.brand-group{gap:8px;}.clear-location > span:not([data-icon]){display:none;}}
@media(max-width:700px){.topbar{gap:10px;min-height:80px;flex-wrap:wrap;padding:12px 0;}.brand-group{flex:1 1 100%;}.brand-word{font-size:2.25rem;}.brand-star{font-size:2.2rem;}.brand-star img{width:34px;height:34px;}.brand-zone{font-size:.73rem;max-width:145px;max-width: 150px;}.brand-group .brand{gap: 5px;}body[data-region="cote-basque"] .brand-group .brand{gap: 4px;}.nav-actions,.top-actions{width:100%;justify-content:flex-end;gap:8px;}.nav-actions .btn,.top-actions .btn{min-height:40px;padding:9px 12px;font-size:.8rem;}.header-cart{margin-right:auto;}.header-cart small{max-width:155px;}.footer{flex-direction:column;}.clear-location{margin-left:auto;}.footer .link-btn{font-size:inherit;}}

/* ==========================================================
   SÉLECTEUR DE COIN MIAMM! — header
   ========================================================== */

.zone-switcher {
  position: relative;
  flex: 0 0 auto;
  margin-left: 7px;
  margin-top: 2px;
}

.zone-switcher[hidden],
.zone-switcher-panel[hidden] {
  display: none !important;
}

.zone-switcher-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  margin: 0;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.2;
  transition: filter .18s ease, transform .18s ease, box-shadow .18s ease;
}

.zone-switcher .brand-zone {
  margin-left: 0;
  margin-top: 0;
}

.zone-switcher-toggle:hover {
  filter: brightness(.975);
}

.zone-switcher-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--purple) 20%, transparent);
  outline-offset: 2px;
}

.zone-switcher-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  transition: transform .18s ease;
}

.zone-switcher-chevron .icon {
  width: 15px;
  height: 15px;
  transform: rotate(90deg);
}

.zone-switcher-toggle[aria-expanded="true"] .zone-switcher-chevron {
  transform: rotate(180deg);
}

.zone-switcher-panel {
  position: absolute;
  top: calc(100% + 11px);
  left: 0;
  z-index: 1800;
  width: min(350px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(28, 29, 25, .14);
}

.zone-switcher-head {
  padding: 8px 9px 10px;
}

.zone-switcher-head strong,
.zone-switcher-head small {
  display: block;
}

.zone-switcher-head strong {
  color: var(--ink);
  font: 800 .9rem/1.2 var(--display);
}

.zone-switcher-head small {
  margin-top: 3px;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.35;
}

.zone-switcher-list {
  display: grid;
  gap: 5px;
}

.zone-switcher-option,
.zone-switcher-all {
  appearance: none;
  width: 100%;
  border: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  text-decoration: none;
}

.zone-switcher-option {
  --zone-accent: var(--purple);
  --zone-soft: var(--lilac);
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 10px 9px;
  border-radius: 13px;
  background: transparent;
  color: var(--ink);
  transition: background-color .16s ease, transform .16s ease;
}

.zone-switcher-option[data-zone="cote-basque"] {
  --zone-accent: #345b40;
  --zone-soft: #e4eddf;
}

.zone-switcher-option[data-zone="dieulefit"] {
  --zone-accent: var(--purple);
  --zone-soft: var(--lilac);
}

.zone-switcher-option:hover,
.zone-switcher-option:focus-visible {
  background: var(--zone-soft);
}

.zone-switcher-option:hover {
  transform: translateX(2px);
}

.zone-switcher-option:focus-visible,
.zone-switcher-all:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--zone-accent, var(--purple)) 24%, transparent);
  outline-offset: -2px;
}

.zone-switcher-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--zone-accent);
  box-shadow: 0 0 0 4px var(--zone-soft);
}

.zone-switcher-option-copy {
  min-width: 0;
}

.zone-switcher-option-copy strong,
.zone-switcher-option-copy small {
  display: block;
}

.zone-switcher-option-copy strong {
  color: var(--ink);
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.2;
}

.zone-switcher-option-copy small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: .69rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-switcher-option-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.zone-switcher-option-arrow .icon {
  width: 17px;
  height: 17px;
}

.zone-switcher-option:hover .zone-switcher-option-arrow {
  color: var(--zone-accent);
}

.zone-switcher-all {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  margin-top: 7px;
  padding: 10px 9px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
  background: transparent;
  color: var(--ink);
  transition: background-color .16s ease;
}

.zone-switcher-all:hover {
  background: var(--surface);
}

.zone-switcher-all > .icon {
  width: 20px;
  height: 20px;
  color: var(--orange-dark);
}

.zone-switcher-all strong,
.zone-switcher-all small {
  display: block;
}

.zone-switcher-all strong {
  font-size: .8rem;
  font-weight: 800;
  line-height: 1.2;
}

.zone-switcher-all small {
  margin-top: 2px;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.25;
}

@media (max-width: 700px) {
  .zone-switcher {
    position: static;
    margin-left: 2px;
	margin-left: 7px;
  }

  .zone-switcher-toggle {
    min-height: 36px;
  }

  .zone-switcher-panel {
    position: fixed;
    top: calc(var(--zone-switcher-mobile-top, 80px) + 8px);
    right: 7px;
    left: 7px;
    width: auto;
    max-height: calc(100dvh - var(--zone-switcher-mobile-top, 80px) - 15px);
    overflow-y: auto;
    padding: 13px 12px calc(13px + env(safe-area-inset-bottom));
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 18px 38px rgba(28, 29, 25, .14);
	
	position: fixed;
    top: var(--zone-switcher-mobile-top, 80px);
    right: 0;
    left: 0;
    width: 100%;
    max-height: calc(100dvh - var(--zone-switcher-mobile-top, 80px));
    overflow-y: auto;
    padding: 13px 15px calc(15px + env(safe-area-inset-bottom));
    border-right: 0;
    border-left: 0;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 20px 34px rgba(28, 29, 25, .16);
  }

  .zone-switcher-head {
    padding: 7px 8px 11px;
  }

  .zone-switcher-option,
  .zone-switcher-all {
    min-height: 62px;
  }
}

/* Couleurs des coins actuellement disponibles. Les nouvelles zones gardent le style par défaut. */
body[data-region="dieulefit"] .zone-switcher-toggle {
  background: var(--lilac);
  color: var(--purple);
}

body[data-region="cote-basque"] .zone-switcher-toggle {
  background: #e4eddf;
  color: #345b40;
}

/* ==========================================================
   Sélecteur de territoire — version compacte et scalable
   - territoire courant toujours en premier ;
   - puis seulement les coins familiers (visités / favoris),
     limités côté JS ;
   - accès à la carte complète en dernier.
   ========================================================== */
.zone-switcher-panel {
  width: min(370px, calc(100vw - 32px));
}

.zone-switcher-head {
  padding: 9px 10px 11px;
}

.zone-switcher-head strong {
  font-size: .96rem;
}

.zone-switcher-head small {
  margin-top: 4px;
  font-size: .73rem;
}

.zone-switcher-option.is-current {
  background: var(--zone-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--zone-accent) 18%, transparent);
}

.zone-switcher-option.is-current:hover {
  background: color-mix(in srgb, var(--zone-soft) 86%, #fff 14%);
}

.zone-switcher-option.is-current .zone-switcher-dot {
  width: 10px;
  height: 10px;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--zone-soft) 82%, #fff 18%);
}

.zone-switcher-all {
  grid-template-columns: 30px minmax(0, 1fr) 24px;
  min-height: 64px;
  margin-top: 10px;
  padding: 12px 10px;
  border-radius: 0 0 13px 13px;
}

.zone-switcher-all > .icon {
  width: 22px;
  height: 22px;
}

.zone-switcher-all strong {
  font-size: .92rem;
  font-weight: 800;
  line-height: 1.15;
}

.zone-switcher-all .zone-switcher-option-arrow .icon {
  width: 18px;
  height: 18px;
}

@media (max-width: 700px) {
  .zone-switcher-panel {
    width: 100%;
  }

  .zone-switcher-head {
    padding: 8px 8px 12px;
  }

  .zone-switcher-all {
    min-height: 66px;
  }
}
