/* Hatyb — styles des composants.
 * Couleurs : variables --md-* de theme.css (générées depuis AppTheme de l'app).
 * Mesures reprises de l'app (Material 3 + surcharges de lib/shared/app_theme.dart
 * et des widgets merchant_card.dart / directory_screen.dart / filter_sheet.dart). */

/* ---------- Polices (mêmes que l'app : Roboto + MaterialIcons de Flutter) ---------- */
@font-face { font-family: "Roboto"; font-weight: 400; font-display: swap; src: url("../fonts/roboto-400.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 500; font-display: swap; src: url("../fonts/roboto-500.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 700; font-display: swap; src: url("../fonts/roboto-700.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 800 900; font-display: swap; src: url("../fonts/roboto-900.woff2") format("woff2"); }
@font-face { font-family: "MaterialIcons"; font-weight: 400; font-display: block; src: url("../fonts/material-icons.woff2") format("woff2"); }

/* ---------- Échelle typographique Material 3 (Flutter 2021) + surcharges AppTheme ---------- */
:root {
  --font: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px;
  --content-max: 1200px;
  --appbar-bg: var(--md-surface);
  --ease: cubic-bezier(.2, 0, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 150px; }
body {
  margin: 0;
  font: 400 14px/20px var(--font);
  letter-spacing: .25px;
  color: var(--md-on-surface);
  background: var(--md-surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.title-large  { font-size: 22px; line-height: 28px; font-weight: 800; letter-spacing: -.3px; }
.title-medium { font-size: 16px; line-height: 24px; font-weight: 700; letter-spacing: .15px; }
/* Texte secondaire : onSurfaceVariant (≥ 4,5:1). « outline » (4,2:1, comme l'app) est réservé aux bordures et icônes. */
.muted { color: var(--md-on-surface-variant); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 100; padding: 8px 14px; border-radius: 12px; background: var(--md-primary); color: var(--md-on-primary); }
.skip-link:focus { top: 8px; }
.no-js .js-only, [hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--md-primary); outline-offset: 2px; }

/* Icônes : glyphes MaterialIcons (points de code de Flutter Icons.*). */
.mi {
  font-family: "MaterialIcons"; font-weight: normal; font-style: normal;
  font-size: 24px; line-height: 1; letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap; direction: ltr;
  -webkit-font-feature-settings: "liga"; font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased; flex: none;
}
.mi--star { color: #ffc107; font-size: 16px; vertical-align: -3px; }
.mi--inline { font-size: 15px; vertical-align: -3px; }

/* ---------- Barre d'application (AppBar) ---------- */
.appbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--appbar-bg);
  border-bottom: 1px solid transparent;
  transition: box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.appbar.is-scrolled { box-shadow: 0 1px 2px rgba(0, 0, 0, .12); background: color-mix(in srgb, var(--md-surface) 92%, var(--md-primary)); }
.appbar__row, .searchbar { max-width: var(--content-max); margin: 0 auto; }
.appbar__row { display: flex; align-items: center; gap: 8px; min-height: 64px; padding-block: 0; padding-inline: var(--gutter) 12px; }
.appbar__title {
  font-size: 20px; line-height: 28px; font-weight: 800; letter-spacing: -.3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand__logo { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; flex: none; }
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__title { font-size: 20px; line-height: 28px; font-weight: 800; letter-spacing: -.3px; }
.brand__subtitle { font-size: 12px; line-height: 16px; letter-spacing: .4px; color: var(--md-on-surface-variant); }

/* Recherche : champ en pilule (rayon 28), rempli, sans bordure ; bordure primaire 1,6 px au focus. */
.searchbar { display: flex; align-items: center; gap: 8px; padding-block: 0 10px; padding-inline: var(--gutter) 12px; }
.search-field {
  flex: 1; display: flex; align-items: center; min-height: 48px; border-radius: 28px;
  background: color-mix(in srgb, var(--md-surface-container-highest) 60%, transparent);
  border: 1.6px solid transparent; padding-block: 0; padding-inline: 12px 4px;
}
.search-field:focus-within { border-color: var(--md-primary); }
.search-field__icon { color: var(--md-on-surface-variant); margin-inline-end: 12px; }
.search-field input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-size: 16px; line-height: 24px; letter-spacing: .5px; padding: 12px 0;
}
.search-field input::placeholder { color: var(--md-on-surface-variant); }
.search-field input::-webkit-search-cancel-button { display: none; }

/* ---------- Boutons ---------- */
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; cursor: pointer;
  display: inline-grid; place-items: center; color: var(--md-on-surface-variant); flex: none;
}
.icon-btn:hover { background: color-mix(in srgb, var(--md-on-surface-variant) 8%, transparent); }
.icon-btn--sm { width: 32px; height: 32px; }
.icon-btn--sm .mi { font-size: 20px; }
.tonal-btn {
  position: relative; min-width: 40px; height: 40px; border-radius: 20px; border: 0; cursor: pointer; flex: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 8px;
  background: var(--md-secondary-container); color: var(--md-on-secondary-container);
}
.tonal-btn:hover { background: color-mix(in srgb, var(--md-secondary-container) 92%, var(--md-on-secondary-container)); }
.tonal-btn:disabled { opacity: .38; cursor: default; }
.tonal-btn--sm { min-width: 32px; height: 32px; padding: 0 4px; }
.tonal-btn--sm .mi { font-size: 20px; }
.tonal-btn--text { padding: 0 24px; font-weight: 500; letter-spacing: .1px; }
.tonal-btn.has-badge::after {
  content: ""; position: absolute; top: 4px; inset-inline-end: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--md-error);
}
.filled-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px;
  border: 0; border-radius: 12px; cursor: pointer; font-weight: 500; letter-spacing: .1px;
  background: var(--md-primary); color: var(--md-on-primary);
}
.filled-btn:hover { background: color-mix(in srgb, var(--md-primary) 92%, var(--md-on-primary)); }
.filled-btn--block { width: 100%; }
.text-btn {
  min-height: 40px; padding: 0 12px; border: 0; border-radius: 20px; background: transparent; cursor: pointer;
  color: var(--md-primary); font-weight: 500; letter-spacing: .1px;
}
.text-btn:hover { background: color-mix(in srgb, var(--md-primary) 8%, transparent); }

/* ---------- Puces (chips) : stade, bordure outline-variant (chipTheme de l'app) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 16px; border-radius: 16px;
  border: 1px solid var(--md-outline-variant); background: transparent; white-space: nowrap; cursor: pointer;
  font-weight: 500; letter-spacing: .1px; color: var(--md-on-surface-variant);
}
.chip:hover { background: color-mix(in srgb, var(--md-on-surface-variant) 8%, transparent); }
.chip--action { padding-inline-start: 8px; color: var(--md-on-surface); }
.chip__icon { font-size: 18px; color: var(--md-primary); }
.chip--filter input { position: absolute; opacity: 0; pointer-events: none; }
.chip--filter:has(input:checked) { background: var(--md-secondary-container); border-color: transparent; color: var(--md-on-secondary-container); padding-inline-start: 8px; }
.chip--filter:has(input:checked)::before { content: "\2713"; font-weight: 700; width: 18px; text-align: center; }
.chip--filter:has(input:focus-visible) { outline: 2px solid var(--md-primary); outline-offset: 2px; }

.assist-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding-block: 0; padding-inline: 8px 16px; border-radius: 8px;
  border: 1px solid var(--md-outline-variant); background: transparent; cursor: pointer; font-weight: 500; letter-spacing: .1px;
}
.assist-chip .mi { font-size: 18px; color: var(--md-primary); }
.assist-chip--on { background: var(--md-secondary-container); color: var(--md-on-secondary-container); border-color: transparent; cursor: default; }
/* « Je veux » : envie choisie mise en avant, flèche de menu déroulant. */
.assist-chip--selected { background: var(--md-secondary-container); color: var(--md-on-secondary-container); border-color: transparent; }
.assist-chip__caret { margin-inline-start: -2px; font-size: 12px; opacity: .7; }
.list__item[aria-current="true"] { font-weight: 600; }
.list__item[aria-current="true"] > .mi:last-child { color: var(--md-primary); }

/* ---------- Mise en page ---------- */
main { display: block; max-width: var(--content-max); margin: 0 auto; padding-bottom: 28px; outline: none; }
.geo-bar { display: flex; align-items: center; gap: 4px; padding: 8px var(--gutter) 0; min-height: 8px; }
.geo-bar:empty { display: none; }
.inline-form { display: inline; margin: 0; }

/* Navigation de l'accueil (26/11) : catégories, puis spécialités ; le bloc entier est collant. */
.chip-navs { position: sticky; top: var(--appbar-h, 64px); z-index: 10; background: var(--appbar-bg); }
@media (min-width: 600px) and (max-width: 1023.98px) { .chip-navs { top: var(--appbar-h, 116px); } }
.chip-nav {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 10px 12px; background: var(--appbar-bg);
}
.chip-nav::-webkit-scrollbar { display: none; }
.chip-nav--sub { padding-top: 0; gap: 6px; }
/* Flèches des barres catégories / spécialités (27/11) : ordinateur seulement, ajoutées par app.js. */
.chip-scroller { position: relative; }
.chip-scroller__arrow { display: none; }
@media (min-width: 600px) {
  .chip-scroller__arrow {
    position: absolute; top: 0; bottom: 0; z-index: 1; display: flex; align-items: center; justify-content: center;
    width: 44px; padding: 0; border: 0; cursor: pointer; color: var(--md-on-surface);
  }
  .chip-scroller__arrow[hidden] { display: none; }
  .chip-scroller__arrow .mi {
    display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 22px;
    background: var(--md-surface-container-high, var(--appbar-bg)); border: 1px solid var(--md-outline-variant);
    box-shadow: 0 1px 4px rgb(0 0 0 / .15);
  }
  .chip-scroller__arrow:hover .mi { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
  .chip-scroller__arrow--prev { inset-inline-start: 0; justify-content: flex-start; padding-inline-start: 6px; background: linear-gradient(to right, var(--appbar-bg) 55%, transparent); }
  .chip-scroller__arrow--next { inset-inline-end: 0; justify-content: flex-end; padding-inline-end: 6px; background: linear-gradient(to left, var(--appbar-bg) 55%, transparent); }
}
.chip--sub { height: 28px; padding: 0 12px; border-radius: 14px; font-size: 13px; color: var(--md-on-surface-variant); }
/* Page catégorie (27/11) : barre des spécialités sous un en-tête d'une ligne, avec le nombre de commerçants. */
.chip-navs.chip-navs--page { top: var(--appbar-h, 64px); }
.chip-navs--page .chip--action { padding-inline-start: 14px; padding-inline-end: 8px; }
.chip__count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 600; background: var(--md-secondary-container); color: var(--md-on-secondary-container);
}

/* ---------- Sections catégorie + carrousels ---------- */
.cat-section { padding-top: 18px; scroll-margin-top: calc(var(--appbar-h, 64px) + var(--chipnav-h, 96px) + 8px); }
.cat-section__head { display: flex; align-items: center; gap: 10px; padding-block: 0 8px; padding-inline: var(--gutter) 8px; }
.cat-section__badge {
  width: 40px; height: 40px; border-radius: 12px; overflow: hidden; flex: none; display: grid; place-items: center;
  background: var(--md-primary-container); color: var(--md-on-primary-container);
}
.cat-section__badge .mi { font-size: 20px; }
.cat-section__badge img { width: 100%; height: 100%; object-fit: cover; }
.cat-section__titles { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cat-section__title { font-size: 16px; line-height: 24px; font-weight: 700; letter-spacing: .15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-section__more { font-size: 12px; line-height: 16px; letter-spacing: .4px; font-weight: 600; color: var(--md-primary); align-self: flex-start; }
.cat-section__more:hover { text-decoration: underline; }
.carousel-arrows { display: flex; gap: 4px; }

.carousel {
  display: flex; gap: 18px; overflow-x: auto; padding: 0 var(--gutter) 8px; scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel > li { flex: none; scroll-snap-align: start; }

/* Carte carrousel : largeur 82 % de l'écran sur téléphone, 340 px au-delà de 600 px ; image = 42 % de la largeur. */
.ccard { display: flex; flex-direction: column; width: 82vw; border-radius: 14px; }
@media (min-width: 600px) { .ccard { width: 340px; } }
.ccard__media {
  position: relative; display: block; aspect-ratio: 100 / 42; border-radius: 14px; overflow: hidden;
  background: var(--md-surface-container-highest);
}
.ccard__media > img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.ccard:hover .ccard__media > img { transform: scale(1.03); }
.ccard__offer { position: absolute; top: 10px; inset-inline-start: 10px; }
.ccard__logo { position: absolute; inset-inline-start: 10px; bottom: 10px; }
.ccard__name {
  margin-top: 8px; font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: .15px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ccard__tags { display: flex; margin-top: 6px; }
.rating-line { font-size: 14px; line-height: 20px; letter-spacing: .25px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rating-line strong { font-weight: 600; }
.rating-line .sep { padding: 0 6px; }

.tag {
  display: inline-block; padding: 3px 6px; border-radius: 4px; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .5px;
  color: var(--md-on-surface-variant); background: color-mix(in srgb, var(--md-outline) 12%, transparent);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tag--primary { color: var(--md-primary); background: color-mix(in srgb, var(--md-primary) 12%, transparent); }
/* Organisme de certification halal (AVS, Achahada…) — même vert que l'app. */
/* Badge de certification : vert de l'app (#2e7d32) assombri en clair et éclairci en sombre (contraste ≥ 4,5:1). */
:root { --certified: #1b5e20; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --certified: #81c784; } }
:root[data-theme="dark"] { --certified: #81c784; }
.tag--certified { color: var(--certified); background: color-mix(in srgb, var(--certified) 12%, transparent); margin-inline-start: 6px; }
.mi--certified { color: #2e7d32; }
.pill {
  display: inline-flex; align-items: center; gap: 3px; padding: 3px 7px; border-radius: 20px;
  font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .5px;
}
.pill .mi { font-size: 13px; }
.pill--offer { background: #d32f2f; color: #fff; }
.pill--primary { background: var(--md-primary); color: var(--md-on-primary); }
.pill--dark { background: rgba(0, 0, 0, .55); color: #fff; }
.pill .mi--star { color: #ffc107; vertical-align: 0; }

.logo {
  display: block; overflow: hidden; flex: none; background: var(--md-surface); border: 1px solid var(--md-outline-variant);
}
.logo img { width: 100%; height: 100%; object-fit: cover; }
.logo--40 { width: 40px; height: 40px; border-radius: 10px; }
.logo--44 { width: 44px; height: 44px; border-radius: 11px; }
.logo--64 { width: 64px; height: 64px; border-radius: 16px; }
.img-fallback {
  width: 100%; height: 100%; display: grid; place-items: center; font-size: 28px; line-height: 1;
  background: var(--md-surface-container-highest);
}

/* ---------- Carte pleine largeur (MerchantCard) ---------- */
.card-list { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 4px 12px 0; }
.card-list--top { padding-top: 12px; }
@media (min-width: 760px) { .card-list { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; padding: 4px var(--gutter) 0; } }
.results-count { padding: 6px var(--gutter) 6px; font-size: 12px; line-height: 16px; letter-spacing: .4px; }
.mcard {
  display: flex; flex-direction: column; overflow: hidden; border-radius: var(--md-radius);
  background: var(--md-surface-container-low);
  border: 1px solid color-mix(in srgb, var(--md-outline-variant) 60%, transparent);
  transition: background-color .2s var(--ease);
}
.mcard:hover { background: color-mix(in srgb, var(--md-surface-container-low) 94%, var(--md-on-surface)); }
.mcard__cover { position: relative; display: block; height: 132px; background: var(--md-surface-container-highest); }
.mcard__cover > img { width: 100%; height: 100%; object-fit: cover; }
.mcard__shade { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 45%, rgba(0, 0, 0, .6) 100%); }
.mcard__online { position: absolute; inset-inline-start: 8px; bottom: 8px; }
.mcard__rating { position: absolute; inset-inline-end: 8px; bottom: 8px; }
.mcard__body { display: flex; align-items: flex-start; gap: 12px; padding: 10px 14px 14px; }
.mcard__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mcard__name { font-size: 16px; line-height: 24px; font-weight: 700; letter-spacing: .15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard__sub { margin-top: 2px; font-size: 12px; line-height: 16px; letter-spacing: .4px; color: var(--md-on-surface-variant); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 12px; line-height: 16px; letter-spacing: .4px; }
.mcard__meta .mi { color: var(--md-outline); font-size: 17px; vertical-align: -4px; }
.mcard__meta .mi--inline { font-size: 15px; vertical-align: -3px; }

/* ---------- États vide / erreur ---------- */
.state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 120px 32px 24px; text-align: center; }
.state--page { padding-top: 96px; }
.state__icon { font-size: 56px; color: var(--md-on-surface-variant); }
.state__title { font-size: 22px; line-height: 28px; font-weight: 800; letter-spacing: -.3px; }

/* ---------- Fiche (lot 1 : identité) ---------- */
.merchant-head__cover { height: 180px; background: var(--md-surface-container-highest); overflow: hidden; }
.merchant-head__cover img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 760px) { .merchant-head__cover { height: 260px; margin: 12px var(--gutter) 0; border-radius: var(--md-radius); } }
.merchant-head__id { display: flex; align-items: flex-end; gap: 14px; padding: 0 var(--gutter); margin-top: -32px; position: relative; }
.merchant-head__sub { color: var(--md-on-surface-variant); margin-bottom: 6px; }
.notice {
  display: flex; gap: 10px; align-items: flex-start; margin: 20px var(--gutter) 0; padding: 12px; border-radius: 10px;
  background: var(--md-surface-container-highest);
}
.notice .mi { color: var(--md-primary); }
.notice--error { background: color-mix(in srgb, var(--md-error, #b3261e) 10%, transparent); }
.notice--error .mi { color: var(--md-error, #b3261e); }

/* ---------- Livraison à la position choisie (lot D adresses, 27/11) ---------- */
.reach { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.reach .mi { font-size: 15px; }
.tag.reach--in { color: var(--md-primary); background: color-mix(in srgb, var(--md-primary) 12%, transparent); }
.tag.reach--out, .info-chip.reach--out { color: var(--md-on-surface-variant); background: color-mix(in srgb, var(--md-on-surface-variant) 10%, transparent); }
.mcard__sub .reach { margin-inline-start: 8px; vertical-align: middle; }
.notice--reach { margin-bottom: 4px; }

/* Récapitulatif : raccourcis « Mes adresses » (lot E, 27/11). */
.checkout__addresses { margin: 4px 0 8px; }
.checkout__address[aria-current="true"] { background: var(--md-secondary-container); border-color: transparent; color: var(--md-on-secondary-container); }
.checkout__save-address[hidden] { display: none; }

/* ---------- Mes adresses (lot C adresses, 27/11) ---------- */
.addresses { max-width: 720px; margin: 0 auto; padding: 12px var(--gutter) 24px; }
.addresses__intro { margin: 4px 0 16px; }
.addresses .notice { margin: 16px 0 0; }
.state--compact { padding: 24px 0; }
.addr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.addr-card {
  padding: 14px 16px 10px; border-radius: var(--md-radius, 16px); border: 1px solid var(--md-outline-variant);
  background: var(--md-surface-container-low, transparent);
}
.addr-card--default { border-color: color-mix(in srgb, var(--md-primary) 45%, transparent); }
.addr-card--editing { outline: 2px solid var(--md-primary); outline-offset: 2px; }
.addr-card__head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.addr-card__icon { color: var(--md-primary); font-size: 20px; }
.addr-card__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addr-card__line { margin-block: 2px 0; margin-inline: 28px 0; overflow-wrap: anywhere; }
.addr-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-block: 10px 0; margin-inline: 20px 0; }
.addr-card__actions form { margin: 0; }
.addr-card__use { gap: 6px; }
.addr-card__use .mi { font-size: 18px; }
.text-btn--danger { color: var(--md-error, #b3261e); }
.addr-form { display: grid; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--md-outline-variant); scroll-margin-top: calc(var(--appbar-h, 64px) + 12px); }
.addr-form__title { margin: 0; font-size: 18px; }
.addr-form .notice { margin: 0; }
.addr-form__actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }

/* ---------- Panneau Filtres : feuille du bas (mobile), boîte centrée (≥ 600 px) ---------- */
.sheet {
  margin: auto auto 0; width: 100%; max-width: 640px; max-height: 90vh; overflow: auto; padding: 0;
  border: 0; border-radius: 24px 24px 0 0; color: var(--md-on-surface);
  background: var(--md-surface-container-low); box-shadow: 0 -2px 12px rgba(0, 0, 0, .15);
}
.sheet::backdrop { background: rgba(0, 0, 0, .32); }
.sheet::before { content: ""; display: block; width: 32px; height: 4px; margin: 16px auto 4px; border-radius: 2px; background: var(--md-on-surface-variant); opacity: .4; }
@media (min-width: 600px) {
  .sheet { margin: auto; max-width: 480px; border-radius: 28px; }
  .sheet::before { display: none; }
}
.sheet__body { display: flex; flex-direction: column; gap: 16px; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
.sheet__head { display: flex; align-items: center; gap: 4px; }
.sheet__title { flex: 1; font-size: 18px; font-weight: 700; }
.field-group { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field-label { font-weight: 600; padding: 0; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.outlined { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--md-on-surface-variant); }

/* Champs : remplis, sans bordure, rayon 12, bordure primaire au focus (inputDecorationTheme). */
.input {
  width: 100%; min-height: 48px; padding: 12px; border-radius: 12px; border: 1.6px solid transparent;
  background: color-mix(in srgb, var(--md-surface-container-highest) 60%, transparent);
  font-size: 16px; line-height: 24px; color: var(--md-on-surface);
}
.input:focus { outline: none; border-color: var(--md-primary); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-end: 36px; }

/* Interrupteur Material 3 (52 × 32). */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; font-size: 16px; }
.switch {
  appearance: none; flex: none; position: relative; width: 52px; height: 32px; margin: 0; border-radius: 16px; cursor: pointer;
  background: var(--md-surface-container-highest); border: 2px solid var(--md-outline); transition: background-color .2s var(--ease);
}
.switch::after {
  content: ""; position: absolute; top: 50%; inset-inline-start: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--md-outline); transform: translateY(-50%); transition: all .2s var(--ease);
}
.switch:checked { background: var(--md-primary); border-color: var(--md-primary); }
.switch:checked::after { inset-inline-start: 22px; width: 24px; height: 24px; background: var(--md-on-primary); }

/* ---------- Fiche : onglets (TabBar — indicateur sous le libellé, titleSmall) ---------- */
.mi--amber { color: #ffc107; }
.small { font-size: 12px; line-height: 16px; letter-spacing: .4px; }
.pre { white-space: pre-line; }
.break { overflow-wrap: anywhere; }
.tabs {
  position: sticky; top: 64px; z-index: 15; display: flex; background: var(--appbar-bg);
  border-bottom: 1px solid color-mix(in srgb, var(--md-outline-variant) 50%, transparent);
}
.tabs__tab {
  flex: 1; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 16px;
  font-size: 14px; line-height: 20px; font-weight: 700; letter-spacing: .1px; color: var(--md-on-surface-variant);
}
.tabs__tab[aria-selected="true"] { color: var(--md-primary); background: linear-gradient(var(--md-primary), var(--md-primary)) no-repeat center bottom / 64px 3px; border-radius: 0; }
.tabs__tab:hover { background-color: color-mix(in srgb, var(--md-on-surface) 6%, transparent); }
.tab-panel { outline: none; }
.state--panel { padding-top: 64px; gap: 6px; }
.state--panel .title-medium { margin-top: 6px; }
.state__icon--outline { color: var(--md-outline); }

/* ---------- Fiche : profil (ProfileTab) ---------- */
.profile { max-width: 840px; margin: 0 auto; padding-bottom: 28px; }
.profile__header { position: relative; height: calc(170px + 38px); }
.profile__cover {
  position: absolute; inset: 0 0 38px; overflow: hidden;
  background: linear-gradient(135deg, var(--md-primary), var(--md-tertiary));
}
@media (min-width: 840px) { .profile__cover { border-radius: 0 0 var(--md-radius) var(--md-radius); } }
.profile__cover img { width: 100%; height: 100%; object-fit: cover; }
.profile__cover-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .4)); }
.profile__logo {
  position: absolute; inset-inline-start: 16px; bottom: 0; width: 76px; height: 76px; border-radius: 20px; overflow: hidden;
  background: var(--md-surface); border: 3px solid var(--md-surface); box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
}
.profile__logo img { width: 100%; height: 100%; object-fit: cover; }
.profile__qr {
  position: absolute; inset-inline-end: 16px; bottom: 0; width: 56px; height: 56px; padding: 4px; cursor: zoom-in;
  background: #fff; border-radius: 8px; border: 1px solid var(--md-outline-variant);
}
.profile__qr svg { display: block; width: 100%; height: 100%; }
.profile__id { padding: 12px 16px 0; }
.info-chips { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 6px; }
.info-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 20px;
  font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .5px;
  background: var(--md-surface-container-highest); color: var(--md-on-surface-variant);
}
.info-chip .mi { font-size: 15px; }
.info-chip--on { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.quick-actions { display: flex; padding: 16px 12px 4px; }
.quick-action {
  flex: 1 1 0; min-width: 0; margin: 0 4px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 4px; border: 0; border-radius: 14px; cursor: pointer; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .5px;
  background: color-mix(in srgb, var(--md-secondary-container) 60%, transparent); color: var(--md-on-secondary-container);
}
.quick-action:hover { background: var(--md-secondary-container); }
.quick-action > span:not(.visually-hidden) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-card {
  margin: 12px 16px 0; padding-bottom: 12px; border-radius: var(--md-radius);
  background: var(--md-surface-container-low); border: 1px solid color-mix(in srgb, var(--md-outline-variant) 60%, transparent);
}
.info-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 16px 0; user-select: text; }
.info-row > .mi { font-size: 18px; color: var(--md-outline); margin-top: 1px; }
.info-row address { font-style: normal; }
.profile__heading { padding: 20px 16px 6px; }
.profile__about { padding: 0 16px; line-height: 1.4; }
.divider { border: 0; height: 1px; background: color-mix(in srgb, var(--md-outline-variant) 60%, transparent); }
.divider--36 { margin: 18px 0; }
.divider--32 { margin: 16px 0; }
.reviews { padding: 0 16px; display: flex; flex-direction: column; gap: 4px; }
.reviews__title { display: flex; align-items: center; gap: 8px; font-size: 16px; line-height: 24px; font-weight: 700; letter-spacing: .15px; margin-bottom: 4px; }
.reviews__title .mi { font-size: 20px; color: var(--md-outline); }

/* Avis Google : cartes 240 × 168, fond surface-container-highest, rayon 12. */
.greviews { padding-top: 0; scroll-margin-top: 120px; }
.greviews__head { display: flex; align-items: center; gap: 10px; padding-block: 0 10px; padding-inline: 16px 8px; }
.greviews__head .reviews__title { margin: 0; }
.greviews__rating { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; line-height: 16px; flex: 1; }
.greviews__rating .mi { font-size: 16px; }
.greviews__list { gap: 10px; }
.greview {
  width: 240px; height: 168px; padding: 12px; border-radius: 12px; display: flex; flex-direction: column;
  background: var(--md-surface-container-highest);
}
.greview__author { display: flex; align-items: center; gap: 8px; }
.greview__avatar { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; flex: none; }
.greview__avatar img { width: 100%; height: 100%; object-fit: cover; }
.img-fallback--sm { font-size: 16px; }
.greview__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.greview__stars { display: flex; margin: 6px 0 4px; color: #ffc107; }
.greview__stars .mi { font-size: 14px; }
.greview__text {
  flex: 1; font-size: 12px; line-height: 16px; letter-spacing: .4px; overflow: hidden;
  /* 4 lignes : la hauteur disponible dans la carte de 168 px (l'app en demande 5 mais n'en affiche que 4,75). */
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
}
.greview__time { font-size: 11px; line-height: 16px; letter-spacing: .5px; font-weight: 500; color: var(--md-on-surface-variant); }

/* ---------- Boîte de dialogue QR (showQrDialog) ---------- */
.dialog {
  margin: auto; width: min(340px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: 28px; text-align: center;
  display: none; flex-direction: column; align-items: center; gap: 12px;
  background: var(--md-surface-container-high); color: var(--md-on-surface); box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}
.dialog:popover-open { display: flex; }
.dialog::backdrop { background: rgba(0, 0, 0, .32); }
.dialog__title { font-size: 16px; line-height: 24px; font-weight: 700; }
.dialog__qr { margin-top: 4px; padding: 12px; background: #fff; }
.dialog__qr svg { display: block; width: 220px; height: 220px; }
.dialog__subtitle { font-size: 12px; line-height: 16px; letter-spacing: .4px; }

/* ---------- Message éphémère (SnackBar flottante) ---------- */
.snackbar {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50;
  max-width: min(560px, calc(100vw - 32px)); padding: 14px 16px; border-radius: 12px;
  background: var(--md-inverse-surface); color: var(--md-on-inverse-surface); box-shadow: 0 3px 8px rgba(0, 0, 0, .2);
}

/* ---------- Catalogue (catalog_tab.dart) ---------- */
.closed-banner {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px;
  background: var(--md-error-container); color: var(--md-on-error-container);
}
.closed-banner .mi { font-size: 18px; }
/* Bandeau, recherche et puces restent visibles au défilement (Column + Expanded de l'app),
 * juste sous les onglets (barre 64 px + onglets 48 px + bordure) — mobile compris
 * depuis le lot 6 du 20/11 (le pied de page du lot 4 est abandonné). */
.catalog__bar { position: sticky; top: 113px; z-index: 12; background: var(--appbar-bg); }
.catalog-search { padding: 8px 12px 4px; }
.search-field--dense { min-height: 40px; border-radius: 24px; }
.search-field--dense input { padding: 8px 0; }
.catalog-chips {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 12px; min-height: 44px; align-items: center;
}
.catalog-chips::-webkit-scrollbar { display: none; }
.catalog-chips .chip { flex: none; }
/* Catégorie affichée (suit le défilement, catalog.js) : puce mise en avant. */
.catalog-chips .chip[aria-current="true"] {
  background: var(--md-secondary-container); border-color: transparent;
  color: var(--md-on-secondary-container); font-weight: 600;
}
.chip__dot { width: 10px; height: 10px; flex: none; }
.catalog .divider { margin: 0; }
.catalog__rows { padding: 4px 0 24px; }

/* Rangée : titre titleMedium gras (marges 16/16/8/4, hauteur 40), puis cartes espacées de 14. */
/* Saut par puce : la rangée s'aligne sous la barre collante (scroll-padding 150 px + 60 px ≈ 113 + 97). */
.prow { padding-top: 16px; scroll-margin-top: 60px; }
/* Lot 4 (20/11) : rangées hors écran ni mises en page ni dessinées (catalogues de
 * centaines de produits) ; hauteur réservée ≈ une rangée de cartes, puis la vraie
 * hauteur mémorisée (auto). Le contenu reste dans la page (recherche, ancres). */
.prow, .cat-section { content-visibility: auto; contain-intrinsic-size: auto 320px; }
.prow__head { min-height: 40px; padding-block: 0 4px; padding-inline: 16px 8px; }
.prow__title { flex: 1; min-width: 0; font-size: 16px; line-height: 24px; font-weight: 700; letter-spacing: .15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow__track { gap: 14px; padding: 4px 16px 8px; align-items: flex-start; min-height: calc(172px + 12px); }
/* Hauteur de rangée = carte vedette (largeur × 0,9 + 74) ; plus de carte détaillée depuis le 16/11. */
.prow__track--featured { min-height: calc(170px * .9 + 74px + 12px); }
@media (min-width: 600px) { .prow__track--featured { min-height: calc(220px * .9 + 74px + 12px); } }

.ptile { position: relative; display: flex; }
.ptile__name { margin: 0; font-size: 16px; line-height: 1.15; letter-spacing: .5px; }
.ptile__open {
  all: unset; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* Toute la carte ouvre la fiche produit ; favori et « + » restent au-dessus. */
.ptile__open::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.ptile__open:focus-visible { outline: none; }
.ptile:has(.ptile__open:focus-visible) { outline: 2px solid var(--md-primary); outline-offset: 2px; }

.ptile--featured { flex-direction: column; width: 170px; height: calc(170px * .9 + 74px); border-radius: 14px; }
@media (min-width: 600px) { .ptile--featured { width: 220px; height: calc(220px * .9 + 74px); } }
.ptile--featured .ptile__media { height: calc(170px * .9); border-radius: 14px; overflow: hidden; flex: none; }
@media (min-width: 600px) { .ptile--featured .ptile__media { height: calc(220px * .9); } }
.ptile--featured .ptile__name { margin-top: 6px; font-weight: 600; }
.ptile--featured .pstats { margin-top: 2px; }

/* Image entière (contain) sur fond surface-container-highest à 45 %, marge basse pour le bouton « + ». */
.ptile__media { position: relative; }
.ptile__img {
  position: absolute; inset: 0; padding: 10px 10px 14px;
  background: color-mix(in srgb, var(--md-surface-container-highest) 45%, transparent);
}
.ptile__img img { width: 100%; height: 100%; object-fit: contain; }
.ptile__img .img-fallback { background: transparent; }
.ptile__badges { position: absolute; top: 8px; inset-inline-start: 8px; inset-inline-end: 44px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; z-index: 2; pointer-events: none; }
.pbadge {
  max-width: 100%; padding: 3px 6px; border-radius: 4px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .5px;
}
.pbadge--rank { background: #0e8345; }
.pbadge--promo { background: var(--md-error); }
.ptile__fav, .ptile__add { position: absolute; z-index: 2; border: 0; padding: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.ptile__fav { top: 6px; inset-inline-end: 6px; width: 30px; height: 30px; background: rgba(255, 255, 255, .92); color: rgba(0, 0, 0, .87); }
.ptile__fav .mi { font-size: 16px; }
.ptile__add { inset-inline-end: 8px; bottom: 8px; width: 42px; height: 42px; background: #fff; color: #000; box-shadow: 0 1px 3px rgba(0, 0, 0, .3), 0 1px 8px rgba(0, 0, 0, .12); }
.ptile__add .mi { font-size: 26px; }
.ptile__add:hover, .ptile__fav:hover { filter: brightness(.94); }

/* « 9,90 € · ★ 4,6 (41) · 🔥 120 vendus » sur une ligne. */
.pstats { margin: 0; font-size: 14px; line-height: 20px; letter-spacing: .25px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pstats__muted { color: var(--md-on-surface-variant); }
.pstats__sep { padding: 0 6px; }
.pstats__price { font-weight: 600; color: var(--md-on-surface); }
.pstats__price.is-promo { color: var(--md-error); }
s.pstats__muted { margin-inline-end: 4px; }
.state__action { margin-top: 10px; }

/* ---------- Fiche produit et composition (feuilles du bas) ---------- */
.psheet[open] { display: flex; flex-direction: column; overflow: hidden; }
.psheet { max-height: 90vh; }
.psheet--compose { max-height: 85vh; }
.psheet--menu { max-height: 88vh; }
.psheet__scroll { overflow-y: auto; overscroll-behavior: contain; }
.psheet__detail { display: flex; flex-direction: column; padding: 4px 20px 24px; }
.psheet__photo { height: 160px; border-radius: 12px; overflow: hidden; background: color-mix(in srgb, var(--md-surface-container-highest) 50%, transparent); }
.psheet__photo img { width: 100%; height: 100%; object-fit: contain; }
.psheet__title { margin-top: 14px; font-size: 22px; line-height: 28px; font-weight: 800; letter-spacing: -.3px; }
.psheet__prices { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.psheet__price { font-size: 16px; line-height: 24px; font-weight: 700; }
.psheet__price.is-promo { color: var(--md-error); }
.psheet__desc { margin-top: 14px; white-space: pre-line; }
.psheet__hint { margin-top: 14px; padding: 10px; border-radius: 8px; background: var(--md-surface-container-highest); font-style: italic; }
.psheet__actions { display: flex; gap: 10px; margin-top: 20px; }
.psheet__actions > * { flex: 1; }
.outlined-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 24px;
  border: 1px solid var(--md-outline); border-radius: 12px; background: transparent; cursor: pointer;
  color: var(--md-primary); font-weight: 500; letter-spacing: .1px;
}
.outlined-btn:hover { background: color-mix(in srgb, var(--md-primary) 8%, transparent); }
.outlined-btn .mi, .filled-btn .mi { font-size: 18px; }
.filled-btn:disabled { background: color-mix(in srgb, var(--md-on-surface) 12%, transparent); color: color-mix(in srgb, var(--md-on-surface) 38%, transparent); cursor: default; }

.compose__head { display: flex; align-items: center; gap: 12px; padding: 0 20px 8px; }
.compose__thumb { width: 48px; height: 48px; border-radius: 8px; overflow: hidden; flex: none; background: var(--md-surface-container-highest); }
.compose__thumb img { width: 100%; height: 100%; object-fit: cover; }
.compose__thumb .img-fallback { font-size: 22px; }
.compose__title { flex: 1; min-width: 0; font-size: 22px; line-height: 28px; font-weight: 800; letter-spacing: -.3px; }
.compose__price { font-weight: 700; }
.compose__body { flex: 1; min-height: 0; padding: 20px; }
.compose__section-title { font-size: 16px; line-height: 24px; font-weight: 700; letter-spacing: .15px; }
.compose__sub { font-size: 12px; line-height: 16px; letter-spacing: .4px; }
.compose__group { margin: 10px 0 4px; font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: .1px; }
.compose__block + .compose__block { margin-top: 16px; }
.compose__choice-title { padding: 14px 0 4px; font-size: 16px; line-height: 24px; font-weight: 700; letter-spacing: .15px; }
.compose__comp-step { padding-block: 4px 0; padding-inline: 16px 0; }
.compose__comp-title { font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: .1px; }
.compose__foot { display: flex; align-items: center; gap: 12px; padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); }
.compose__foot .filled-btn { margin-inline-start: auto; }
.compose__loading { padding: 24px; text-align: center; color: var(--md-on-surface-variant); }
.chips--wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* CheckboxListTile dense : case, libellé, prix en fin de ligne. */
.check-row { display: flex; align-items: center; gap: 16px; min-height: 48px; cursor: pointer; }
.check-row--indent { padding-inline-start: 16px; }
.check-row__label { flex: 1; min-width: 0; }
.check-row__label.is-off { text-decoration: line-through; }
.check-row__trail { color: var(--md-on-surface-variant); }
.check-row input[type="checkbox"] {
  appearance: none; flex: none; width: 18px; height: 18px; margin: 0 3px; border: 2px solid var(--md-on-surface-variant); border-radius: 2px;
  display: grid; place-items: center; cursor: pointer;
}
.check-row input[type="checkbox"]:checked { background: var(--md-primary); border-color: var(--md-primary); }
.check-row input[type="checkbox"]:checked::after { content: ""; width: 5px; height: 10px; margin-top: -2px; border: solid var(--md-on-primary); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.check-row input[type="checkbox"]:focus-visible { outline: 2px solid var(--md-primary); outline-offset: 2px; }
.included-row { display: flex; align-items: center; gap: 16px; min-height: 48px; }
.included-row > .mi { color: #4caf50; }
.qty { display: flex; align-items: center; }
.qty__value { min-width: 16px; text-align: center; font-size: 16px; line-height: 24px; font-weight: 700; }
.icon-btn:disabled { opacity: .38; cursor: default; }
/* ChoiceChip : sélectionnée = secondary-container + coche. */
.choice-chip { position: relative; }
.choice-chip input { position: absolute; opacity: 0; pointer-events: none; }
.choice-chip:has(input:checked) { background: var(--md-secondary-container); border-color: transparent; color: var(--md-on-secondary-container); padding-inline-start: 8px; }
.choice-chip:has(input:checked)::before { content: "\2713"; font-weight: 700; width: 18px; text-align: center; }
.choice-chip:has(input:focus-visible) { outline: 2px solid var(--md-primary); outline-offset: 2px; }

/* ---------- Barre : icône compte (AppBar actions) ---------- */
.appbar__spacer { flex: 1; min-width: 0; }
.appbar__account { margin-inline-start: auto; }

/* ---------- Accueil, ordinateur (≥ 600 px, 26/11) : barre d'outils sur une ligne ----------
 * logo · recherche + filtres (tri inclus) · adresse + GPS · Je veux · jour/nuit · scan · compte.
 * Entre 600 et 1023 px : recherche et adresse passent sur une seconde ligne. */
.addressbar { margin: 0; }
.addressbar .search-field { padding-inline-end: 4px; }
.addressbar__geo { color: var(--md-primary); }
.addressbar__geo.is-on { color: var(--md-on-secondary-container); background: var(--md-secondary-container); }
/* Lot A (27/11) : menu du champ adresse — « Ma position » + adresses récentes de l'appareil. */
.addressbar { position: relative; }
.addressbar__menu {
  position: absolute; top: calc(100% + 6px); inset-inline-start: 0; z-index: 30; width: max(100%, 320px); max-height: min(70vh, 440px); overflow-y: auto;
  padding: 6px 0; border-radius: 16px; background: var(--md-surface-container, var(--appbar-bg));
  border: 1px solid var(--md-outline-variant); box-shadow: 0 6px 24px rgb(0 0 0 / .18);
}
.addressbar__menu[hidden] { display: none; }
.addressbar__heading { margin: 8px 16px 2px; font-size: 12px; font-weight: 600; letter-spacing: .4px; color: var(--md-on-surface-variant); }
.addressbar__list { list-style: none; margin: 0; padding: 0; }
.addressbar__row { display: flex; align-items: center; padding-inline-end: 6px; }
.addressbar__item {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border: 0; background: none;
  color: var(--md-on-surface); font: inherit; text-align: start; cursor: pointer;
}
.addressbar__item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addressbar__item .mi { font-size: 20px; color: var(--md-on-surface-variant); flex: none; }
.addressbar__item--gps, .addressbar__item--gps .mi { color: var(--md-primary); }
.addressbar__item[aria-current="true"] { font-weight: 600; }
.addressbar__item:hover, .addressbar__item:focus-visible { background: color-mix(in srgb, var(--md-on-surface) 8%, transparent); outline: none; }
.addressbar__remove { color: var(--md-on-surface-variant); flex: none; }
.chip--disabled { opacity: .45; cursor: default; }
.appbar__intent { flex: none; white-space: nowrap; }
@media (min-width: 600px) {
  .appbar--home .appbar__row--home { flex-wrap: wrap; row-gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .appbar--home .brand { flex: none; }
  .appbar--home .searchbar { flex: 1 1 280px; min-width: 0; max-width: none; margin: 0; padding: 0; }
  .appbar--home .search-field { min-height: 44px; }
  .addressbar { flex: 0 1 280px; min-width: 200px; display: flex; }
  .addressbar .search-field { flex: 1; min-width: 0; }
  .addressbar input { font-size: 15px; }
  .appbar--home .appbar__account { margin-inline-start: 0; }
  .geo-bar--mobile { display: none; }
}
@media (min-width: 600px) and (max-width: 1023.98px) {
  .appbar--home .brand { flex: 1 1 auto; }
  .appbar--home .searchbar { order: 10; flex: 1 1 55%; }
  .addressbar { order: 11; flex: 1 1 35%; }
}
/* 27/11 : barre d'outils de l'accueil sur toutes les pages (.appbar--site hors accueil), puis la
   ligne propre à la page (retour, titre, favori, panier), plus basse. */
.appbar__row--page { min-height: 48px; }
.appbar__search-toggle { display: none; }
@media (max-width: 599.98px) {
  /* Pas de pied de page de navigation hors accueil : scan et compte restent dans la barre,
     la loupe déplie la recherche. */
  .appbar--home.appbar--site .appbar__scan, .appbar--home.appbar--site .appbar__account { display: inline-flex; }
  .appbar--home.appbar--site .appbar__search-toggle { display: inline-flex; }
  .appbar--home.appbar--site .brand__subtitle { display: none; }
  .appbar--home.appbar--site .brand__text { display: none; }
}
/* Le contenu est limité à 1200 px quelle que soit la fenêtre : sous-titre masqué pour tenir sur une ligne (27/11). */
@media (min-width: 600px) { .appbar--home .brand__subtitle { display: none; } }

/* Ville à côté du nom : « Nom - Ville », plus claire, pas en gras. */
.name-town { font-weight: 400; color: var(--md-on-surface-variant); }

/* ---------- Cartes à lien étendu (le cœur favori reste cliquable au-dessus) ---------- */
.mcard, .ccard { position: relative; }
.mcard__link, .ccard__link { color: inherit; }
.mcard__link::after, .ccard__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.mcard__link:focus-visible, .ccard__link:focus-visible { outline: none; }
.mcard:has(.mcard__link:focus-visible), .ccard:has(.ccard__link:focus-visible) { outline: 2px solid var(--md-primary); outline-offset: 2px; }
.ccard:hover .ccard__media > img { transform: scale(1.03); }
.ccard__title { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.ccard__title .ccard__name { flex: 1; min-width: 0; margin-top: 0; }

/* ---------- Bouton favori (♥) — variantes de l'app ---------- */
.fav { margin: 0; z-index: 2; }
.fav__btn { border: 0; padding: 0; cursor: pointer; display: grid; place-items: center; background: transparent; color: var(--md-outline); }
.fav__btn.is-on { color: #ff5252; }
.fav__btn:focus-visible { outline: 2px solid var(--md-primary); outline-offset: 2px; }
/* _FavoriteButton : rond blanc 34 px sur la couverture, icône 18. */
.fav--cover { position: absolute; top: 6px; inset-inline-end: 6px; }
.fav--cover .fav__btn { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: rgba(0, 0, 0, .87); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.fav--cover .fav__btn.is-on, .fav--tile .fav__btn.is-on { color: #ff5252; }
.fav--cover .mi { font-size: 18px; }
/* Carte produit : rond blanc 30 px, icône 16. */
.fav--tile { position: absolute; top: 6px; inset-inline-end: 6px; }
.fav--tile .fav__btn { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: rgba(0, 0, 0, .87); }
.fav--tile .mi { font-size: 16px; }
/* Carte de carrousel : IconButton compact à côté du nom. */
.fav--inline { position: relative; flex: none; }
.fav--inline .fav__btn { width: 32px; height: 28px; border-radius: 14px; }
/* Barre de la fiche : à côté du nom. */
.fav--title { flex: none; }
.fav--title .fav__btn { width: 36px; height: 36px; border-radius: 50%; color: var(--md-on-surface-variant); }
.fav--title .fav__btn.is-on { color: #ff5252; }
.fav--title .fav__btn:hover, .fav--inline .fav__btn:hover, .fav--list .fav__btn:hover { background: color-mix(in srgb, var(--md-on-surface) 8%, transparent); }
/* Liste « Mes favoris » : cœur rouge plein en fin de ligne. */
.fav--list .fav__btn { width: 40px; height: 40px; border-radius: 50%; color: #f44336; }
.fav--list .fav__btn.is-on { color: #f44336; }
.psheet__fav.is-on .mi { color: #ff5252; }

/* ---------- Connexion / inscription (LoginScreen : colonne de 420 px centrée) ---------- */
.auth { max-width: 420px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; }
.auth__logo { align-self: center; }
.auth__logo .mi { font-size: 64px; }
.auth__reason { margin-top: 16px; text-align: center; font-weight: 500; }
.auth__hint { margin-top: 8px; text-align: center; }
.auth__google { margin-top: 28px; display: flex; justify-content: center; min-height: 44px; }
.auth__google-btn { width: 100%; display: flex; justify-content: center; }
.auth__or { display: flex; align-items: center; gap: 12px; margin-top: 20px; color: var(--md-on-surface-variant); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .5px; }
.auth__or::before, .auth__or::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--md-outline-variant) 60%, transparent); }
.segmented { display: flex; margin-top: 16px; border: 1px solid var(--md-outline); border-radius: 20px; overflow: hidden; }
.auth__logo + .auth__reason + .auth__hint + .segmented { margin-top: 28px; }
.segmented__item { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 12px; font-weight: 500; letter-spacing: .1px; }
.segmented__item + .segmented__item { border-inline-start: 1px solid var(--md-outline); }
.segmented__item.is-on { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.segmented__item.is-on::before { content: "\2713"; font-weight: 700; }
.segmented__item:not(.is-on):hover { background: color-mix(in srgb, var(--md-on-surface) 8%, transparent); }
.auth__form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.auth__form .row-2 { gap: 10px; }
.auth__form .tonal-btn { margin-top: 6px; }
.tonal-btn--block { width: 100%; min-height: 48px; border-radius: 12px; font-weight: 500; letter-spacing: .1px; }
/* Champ dense avec bordure (OutlineInputBorder), libellé au-dessus de la saisie. */
.tfield__box {
  display: flex; align-items: center; gap: 4px; min-height: 52px; padding-block: 0; padding-inline: 12px 4px; border-radius: 4px; cursor: text;
  border: 1px solid var(--md-outline); background: transparent;
}
.tfield__box:focus-within { border: 2px solid var(--md-primary); padding-inline-start: 11px; }
.tfield--error .tfield__box { border-color: var(--md-error); }
.tfield__icon { color: var(--md-on-surface-variant); margin-inline-end: 8px; }
.tfield__inner { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 6px 0; }
.tfield__label { font-size: 12px; line-height: 16px; letter-spacing: .4px; color: var(--md-on-surface-variant); }
.tfield__box:focus-within .tfield__label { color: var(--md-primary); }
.tfield--error .tfield__label { color: var(--md-error); }
.tfield__input { width: 100%; border: 0; outline: 0; background: transparent; padding: 0; font-size: 16px; line-height: 24px; letter-spacing: .5px; color: var(--md-on-surface); }
.tfield__msg { margin: 4px 16px 0; font-size: 12px; line-height: 16px; letter-spacing: .4px; color: var(--md-on-surface-variant); }
.tfield__msg--error { color: var(--md-error); }
.auth__dev-sep { margin: 24px 0 8px; }
.auth__dev { display: flex; flex-direction: column; gap: 10px; }
.auth__dev > p { text-align: center; }

/* ---------- Mon compte (AccountScreen) ---------- */
.account { max-width: 640px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; }
.account__avatar {
  align-self: center; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: var(--md-primary-container); color: var(--md-on-primary-container);
}
.account__avatar .mi { font-size: 32px; }
.account__avatar img { width: 100%; height: 100%; object-fit: cover; }
.account__name { margin-top: 12px; text-align: center; font-size: 16px; line-height: 24px; font-weight: 700; letter-spacing: .15px; }
.account__email { text-align: center; }
.account__qr { align-self: center; margin-top: 16px; }
.account__list:first-of-type { margin-top: 24px; }
.list { margin: 0; padding: 0; list-style: none; }
.list form { margin: 0; }
.list__item {
  width: 100%; display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 8px 16px; border: 0; background: transparent;
  text-align: start; cursor: pointer; color: var(--md-on-surface); font-size: 16px; line-height: 24px; letter-spacing: .5px;
}
.list__item > .mi { color: var(--md-on-surface-variant); }
a.list__item:hover, button.list__item:hover { background: color-mix(in srgb, var(--md-on-surface) 6%, transparent); }
.list__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list__sub { font-size: 14px; line-height: 20px; letter-spacing: .25px; color: var(--md-on-surface-variant); }
.list__item--danger, .list__item--danger > .mi { color: var(--md-error); }
.list__item--fav { position: relative; cursor: default; }
.list__link { color: inherit; }
.list__link::after { content: ""; position: absolute; inset: 0; }
.list__item--fav:hover { background: color-mix(in srgb, var(--md-on-surface) 6%, transparent); }
.favs__logo { border-radius: 6px; }
.dialog--alert { text-align: start; align-items: stretch; width: min(400px, calc(100vw - 32px)); }
.dialog__text { color: var(--md-on-surface-variant); }
.dialog__actions { display: flex; justify-content: flex-end; gap: 8px; margin: 12px 0 0; }
.filled-btn--danger { background: var(--md-error); color: var(--md-on-error); min-height: 40px; border-radius: 20px; }
.filled-btn--danger:hover { background: color-mix(in srgb, var(--md-error) 90%, var(--md-on-error)); }

/* ---------- Mes favoris (FavoritesScreen) ---------- */
.favs { padding-bottom: 24px; }
.favs__title { padding: 16px 16px 4px; font-size: 14px; line-height: 20px; font-weight: 700; letter-spacing: .1px; }
.favs__empty { padding: 24px; margin-top: 30vh; text-align: center; }
/* Lot 5 (20/11) : onglets Produits / Commerçants ; image produit entière (contain). */
.favs .tab-panel .favs__empty { margin-top: 18vh; }
.favs__logo--product { background: color-mix(in srgb, var(--md-surface-container-highest) 50%, transparent); }
.favs__logo--product img { object-fit: contain; padding: 3px; }
.favs__price { color: var(--md-on-surface); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Panier (cart_screen.dart, my_carts_screen.dart, _CartSummaryBar) ---------- */
.appbar__cart { position: relative; }
.badge {
  position: absolute; top: 4px; inset-inline-end: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--md-error); color: var(--md-on-error); font-size: 11px; line-height: 16px; font-weight: 500; text-align: center;
}
.appbar__title--start { padding-inline-start: 8px; }
/* Barre du bas fixe (bottomNavigationBar). */
.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--md-surface);
  box-shadow: 0 -1px 0 color-mix(in srgb, var(--md-outline-variant) 60%, transparent);
}
.cart, .carts, .orders { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; }
.cart { padding-bottom: 88px; }
.has-bottom-bar .snackbar { bottom: calc(84px + env(safe-area-inset-bottom)); }
.cart__lines { flex: 1; padding-bottom: 8px; }
.cart__empty { margin: 30vh 24px 0; text-align: center; }
.cart__totals { flex: 1; display: flex; flex-direction: column; }
.cart__total { font-size: 22px; line-height: 28px; font-weight: 700; }
.cart__bar .filled-btn { min-height: 40px; }
.cart-line { cursor: default; gap: 12px; padding-inline-end: 4px; }
.cart-line__img { flex: none; width: 48px; height: 48px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: var(--md-surface-container-highest); }
.cart-line__img img { width: 100%; height: 100%; object-fit: cover; }
.cart-line__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-line__summary {
  font-size: 12px; line-height: 16px; letter-spacing: .4px; color: var(--md-on-surface-variant);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cart-line .qty .mi { font-size: 22px; }
.cart-line__remove .mi { color: var(--md-on-surface-variant); }
.cart-total-small { font-size: 14px; line-height: 20px; font-weight: 700; }
.cart-bar {
  position: sticky; bottom: 0; z-index: 6; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--md-primary-container); color: var(--md-on-primary-container);
}
.cart-bar__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-bar:hover { background: color-mix(in srgb, var(--md-primary-container) 92%, var(--md-on-primary-container)); }
.has-cart-bar .snackbar { bottom: calc(68px + env(safe-area-inset-bottom)); }
.catalog--no-order .ptile__add { display: none; }

/* ---------- Lot 6 (20/11) : navigation MOBILE (< 600 px) ----------
 * Catégories collantes EN HAUT, sous l'en-tête, partout (le pied de page des catégories
 * du lot 4 du 16/11 est abandonné : .chip-nav et .catalog-chips gardent leur position
 * sticky de la version ordinateur). Accueil : en-tête réduit au logo (+ jour/nuit) ;
 * Recherche / Filtres / Je veux / Scan / Profil dans un pied de page collant (.footer-nav,
 * home_footer_nav.php). Version ordinateur (≥ 600 px) : inchangée, pied de page masqué. */
.footer-nav { display: none; }
@media (max-width: 599.98px) {
  .appbar--home .appbar__scan,
  .appbar--home .appbar__account,
  .appbar--home .searchbar__filters,
  .geo-bar__intent:not(.assist-chip--selected) { display: none; }
  /* Recherche repliée : ouverte par le pied de page, ou d'office pendant une recherche. */
  .appbar--home .searchbar { display: none; }
  .appbar--home .searchbar.searchbar--open,
  .appbar--home .searchbar:target,
  .appbar--home .searchbar:focus-within { display: flex; }
  /* Hauteur réelle de l'en-tête mesurée par app.js (--appbar-h) ; valeurs sans JS en repli. */
  .chip-navs { top: var(--appbar-h, 64px); }
  body:has(.appbar--home .searchbar--open) .chip-navs,
  body:has(.appbar--home .searchbar:target) .chip-navs { top: var(--appbar-h, 122px); }
  /* Recherche sous la ligne du logo (même formulaire que la barre d'outils ordinateur). */
  .appbar--home .appbar__row--home { flex-wrap: wrap; }
  .appbar--home .searchbar { order: 10; flex: 1 1 100%; margin: 0; padding: 0 0 10px; }
  /* Adresse (+ GPS) et « Je veux » : barre d'outils ordinateur seulement. */
  .addressbar, .appbar__intent { display: none; }

  .footer-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 0 4px env(safe-area-inset-bottom); background: var(--md-surface-container, var(--md-surface));
    box-shadow: 0 -1px 0 color-mix(in srgb, var(--md-outline-variant) 60%, transparent), 0 -2px 8px rgba(0, 0, 0, .08);
  }
  .footer-nav__item {
    flex: 1; min-width: 0; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    border: 0; background: transparent; cursor: pointer; color: var(--md-on-surface-variant); font: inherit; text-decoration: none;
  }
  .footer-nav__item:active { background: color-mix(in srgb, var(--md-on-surface-variant) 10%, transparent); }
  .footer-nav__item:focus-visible { outline: 2px solid var(--md-primary); outline-offset: -4px; }
  .footer-nav__icon { position: relative; display: inline-grid; place-items: center; }
  .footer-nav__icon .mi { font-size: 24px; }
  .footer-nav__icon.has-badge::after {
    content: ""; position: absolute; top: -2px; inset-inline-end: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--md-error);
  }
  .footer-nav__text { font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* Place réservée sous le contenu et le pied de site ; messages au-dessus du pied de page. */
  body:has(.footer-nav) { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  body:has(.footer-nav) .snackbar { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ---------- Récapitulatif (checkout_screen.dart) ---------- */
.checkout { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; padding-bottom: 72px; }
.checkout__body { flex: 1; display: flex; flex-direction: column; padding: 16px; }
.checkout__merchant { font-size: 16px; line-height: 24px; font-weight: 700; letter-spacing: .15px; margin-bottom: 12px; }
.checkout__lines { margin: 0; padding: 0; list-style: none; }
.checkout__item { padding: 3px 0; }
.checkout__line { display: flex; gap: 8px; padding: 3px 0; }
.checkout__item .checkout__line { padding: 0; }
.checkout__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checkout__summary { padding-inline-start: 24px; font-size: 12px; line-height: 16px; letter-spacing: .4px; color: var(--md-on-surface-variant); }
.checkout__empty { padding: 8px 0; color: var(--md-on-surface-variant); }
.checkout__divider { margin: 12px 0; }
.checkout__total { display: flex; justify-content: space-between; font-size: 16px; line-height: 24px; letter-spacing: .15px; }
.checkout__group { margin-top: 24px; gap: 8px; }
.checkout__title { font-size: 14px; line-height: 20px; font-weight: 700; letter-spacing: .1px; padding: 0; margin-bottom: 8px; }
.checkout__row { display: flex; gap: 8px; }
.checkout__row > * { flex: 1; min-width: 0; }
.checkout__row > .checkout__town { flex: 2; }
.checkout__error { color: var(--md-error); }
.checkout textarea.tfield__input { resize: vertical; font: inherit; font-size: 16px; }
.checkout__info, .checkout__alert {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; padding: 12px; border-radius: 10px;
  background: var(--md-surface-container-highest);
}
.checkout__info .mi { color: var(--md-primary); }
.checkout__alert { margin-top: 14px; background: var(--md-error-container); color: var(--md-on-error-container); }
.checkout__bar .filled-btn { min-height: 40px; }

/* ---------- Confirmation et Mes commandes (orders_screen.dart) ---------- */
.state__icon--48 { font-size: 48px; }
.confirm { gap: 8px; }
.confirm__icon { font-size: 64px; color: var(--md-primary); margin-bottom: 8px; }
.confirm__qr { margin: 12px 0; }
.order { cursor: default; }
button.order { cursor: pointer; }
.order__trail { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.order__amount { font-size: 14px; line-height: 20px; font-weight: 700; }
.order__status { display: flex; align-items: center; gap: 4px; }
.order__status .mi { font-size: 16px; }
.order__qr { color: var(--md-outline); }
.order__ok { color: #4caf50; }
.order__ko { color: var(--md-error); }
.order__pending { color: var(--md-tertiary, #7d5260); }
/* Paiement en ligne (confirmation de commande) */
.pay-box { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 12px 0; padding: 16px; border-radius: 16px; background: var(--md-surface-container-highest); max-width: 420px; text-align: center; }
.pay-box__title { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin: 0; }
.pay-box__title--ok { color: #2e7d32; margin-top: 12px; }
.pay-box__title--ko { color: var(--md-error); margin-top: 12px; }

/* ---------- Scanner (qr_scanner_screen.dart) ---------- */
.scanner { max-width: 640px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.scanner__view { position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 70vh; border-radius: var(--md-radius); overflow: hidden; background: #000; }
.scanner__video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Cadre de visée : carré centré, le reste assombri. */
.scanner__frame {
  position: absolute; left: 50%; top: 50%; width: min(64%, 300px); aspect-ratio: 1; transform: translate(-50%, -50%);
  border: 3px solid #fff; border-radius: 16px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35);
}
.scanner__status { text-align: center; color: var(--md-on-surface-variant); }
.scanner__photo { position: relative; cursor: pointer; }
.scanner__photo:focus-within { outline: 2px solid var(--md-primary); outline-offset: 2px; }

/* ---------- Pied de page et pages légales (lot 7, propres au web) ---------- */
.site-footer {
  max-width: var(--content-max); margin: 0 auto; padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px;
  font-size: 12px; line-height: 16px; color: var(--md-on-surface-variant);
}
.site-footer a { color: inherit; text-decoration: underline; text-underline-offset: 2px; padding: 6px 2px; }
.has-bottom-bar .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
/* Sélecteur de langue (i18n lot 6) : pied de page, à côté du jour/nuit ; en-tête : bouton + liste. */
.lang-switch { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
.lang-switch__item[aria-current] { font-weight: 700; color: var(--md-on-surface); padding: 6px 2px; }
.lang-btn { position: relative; }
.lang-btn__code {
  position: absolute; inset-inline-end: 0; bottom: 2px; padding: 0 3px; border-radius: 6px;
  font-size: 9px; line-height: 12px; font-weight: 700; letter-spacing: 0;
  background: var(--md-secondary-container); color: var(--md-on-secondary-container);
}
.lang-btn__code--list { position: static; display: inline-grid; place-items: center; min-width: 28px; height: 22px; font-size: 11px; }
.sheet--compact { max-width: 360px; }
/* Bandeau « langue du navigateur » (27/11), sous l'en-tête, dans la langue proposée. */
.lang-banner {
  max-width: var(--content-max); margin: 8px auto 0; padding: 8px 12px; border-radius: var(--md-radius);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  background: var(--md-secondary-container); color: var(--md-on-secondary-container);
}
.lang-banner__text { flex: 1 1 200px; }
.lang-banner__yes { min-height: 36px; padding: 0 16px; }
@media (min-width: 600px) { .lang-banner { margin-inline: var(--gutter); } }
@media (min-width: 1100px) { .lang-banner { margin-inline: auto; } }
/* Cookie de mesure d'audience (lot V2, 28/11) : bandeau sous l'en-tête, deux boutons de même poids. */
.cookie-banner {
  max-width: var(--content-max); margin: 8px auto 0; padding: 10px 12px; border-radius: var(--md-radius);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  background: var(--md-surface-container-highest); color: var(--md-on-surface);
}
.cookie-banner__text { flex: 1 1 260px; margin: 0; font-size: 14px; line-height: 20px; }
.cookie-banner__text a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-actions .filled-btn { min-height: 36px; padding: 0 18px; }
.cookie-actions .filled-btn[aria-pressed="true"] { outline: 2px solid var(--md-on-surface); outline-offset: 2px; }
.cookies-page__status { margin: 12px 0 !important; }
@media (min-width: 600px) { .cookie-banner { margin-inline: var(--gutter); } }
@media (min-width: 1100px) { .cookie-banner { margin-inline: auto; } }
/* « Les plus proches » sans position (27/11) : invitation à se localiser. */
.nearest-prompt {
  margin: 0 var(--gutter); padding: 16px; border-radius: var(--md-radius);
  background: var(--md-surface-container-highest); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
}
.nearest-prompt p { flex: 1 1 260px; color: var(--md-on-surface-variant); }
.nearest-prompt__actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 599.98px) { .nearest-prompt [data-address-focus] { display: none; } }
.legal { max-width: 760px; margin: 0 auto; padding: 8px 16px 16px; font-size: 14px; line-height: 21px; }
.legal__title { margin: 8px 0 4px; font-size: 22px; line-height: 28px; font-weight: 500; }
/* Pages légales traduites (i18n lot 4) : la version française fait foi. */
.legal__lang-note { margin: 8px 0 12px; padding: 8px 12px; border-radius: 8px; font-size: 13px; color: var(--md-on-surface-variant); background: var(--md-surface-container-highest); }
.legal h3 { margin: 20px 0 6px; font-size: 16px; line-height: 24px; font-weight: 500; }
.legal p, .legal ul { margin: 0 0 8px; }
.legal ul { padding-inline-start: 20px; list-style: disc; }
.legal ol { margin: 0 0 8px; padding-inline-start: 22px; list-style: decimal; }

/* ---------- Référencement gratuit d'un commerce (/referencer) ---------- */
.signup { max-width: 560px; margin: 0 auto; padding: 24px 16px 32px; display: flex; flex-direction: column; }
.signup__title { text-align: center; margin: 8px 0 4px; }
.signup__intro { text-align: center; margin: 0 0 12px; }
.signup__perks { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.signup__perks li { display: flex; align-items: flex-start; gap: 8px; }
.signup__perks .mi { color: var(--md-primary); font-size: 20px; }
.signup__section { margin: 12px 0 0; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--md-on-surface-variant); letter-spacing: .1px; }
.signup__select { appearance: none; cursor: pointer; }
.signup__select option { color: var(--md-on-surface); background: var(--md-surface); }
.signup__row-zip { grid-template-columns: 2fr 3fr; }
.signup__terms { align-items: flex-start; }
.signup__terms a { color: var(--md-primary); }
.signup__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.signup [data-siret-hint].is-ok { color: var(--md-primary); }
.signup [data-siret-hint].is-error { color: var(--md-error); }
.signup--done { text-align: center; align-items: center; gap: 12px; }
.signup--done p { margin: 0; }
.signup__steps { text-align: start; margin: 4px 0; padding-inline-start: 22px; list-style: decimal; display: flex; flex-direction: column; gap: 6px; }
.signup__logo--error .mi { color: var(--md-error); }
.signup .auth__logo .mi { font-size: 56px; color: var(--md-primary); }
@media (max-width: 420px) { .signup__row-zip { grid-template-columns: 1fr; } }

/* ---------- Gérer ma fiche (/ma-fiche) ---------- */
.manage__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.manage__head p { margin: 0; }
.manage__name { text-align: start; margin-top: 0; }
.manage__cover { display: block; width: 100%; max-height: 240px; object-fit: cover; border-radius: 12px; margin: 8px 0; }
.manage__photo { margin-top: 4px; }
.manage .notice { margin: 8px 0; }
.manage input[type="file"].tfield__input { font-size: 14px; padding: 4px 0; }
.profile__owner { margin: 24px 0 8px; text-align: center; }
.profile__owner a { color: var(--md-primary); }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--md-primary); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }

/* ---------- Bouton jour/nuit (propre au site) ----------
   Seul le bouton qui inverse le thème effectif est affiché : choix du visiteur
   (<html data-theme>), sinon thème du système. */
.theme-toggle { display: contents; }
:root[data-theme="light"] .theme-toggle__to-light,
:root[data-theme="dark"] .theme-toggle__to-dark { display: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .theme-toggle__to-light { display: none; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .theme-toggle__to-dark { display: none; } }
.theme-toggle__link {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 2px; border: 0; background: none; cursor: pointer;
  font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 2px;
}
.theme-toggle__link .mi { font-size: 16px; }

/* ---------- Arabe, droite à gauche (i18n lot 5, 27/11) ----------
   Marges, positions et alignements sont en propriétés logiques (inline-start/end) : ils
   s'inversent seuls avec <html dir="rtl">. Restent ici les cas qu'elles ne couvrent pas. */
/* Police : Roboto n'a pas de glyphes arabes ; le navigateur bascule glyphe par glyphe sur
   la police arabe du système (Android : Noto, iOS/macOS : SF Arabic/Geeza Pro, Windows : Segoe UI). */
:root:lang(ar) { --font: "Roboto", "Noto Sans Arabic", "SF Arabic", "Segoe UI", "Geeza Pro", Tahoma, system-ui, sans-serif; }
/* L'espacement des lettres casse la liaison de l'écriture arabe. */
:lang(ar) body, :lang(ar) body * { letter-spacing: 0 !important; }
:lang(ar) body { line-height: 22px; }
/* Icônes de direction (précédent/suivant, retour, entrer/sortir) retournées. */
[dir="rtl"] .mi--dir { transform: scaleX(-1); }
/* Dégradés des flèches des barres catégories/spécialités. */
[dir="rtl"] .chip-scroller__arrow--prev { background: linear-gradient(to left, var(--appbar-bg) 55%, transparent); }
[dir="rtl"] .chip-scroller__arrow--next { background: linear-gradient(to right, var(--appbar-bg) 55%, transparent); }
/* Chevron des listes déroulantes, à gauche. */
[dir="rtl"] select.input { background-position: 10px 21px, 15px 21px; }
/* Numéros, prix, téléphones, e-mails : saisis de gauche à droite. */
[dir="rtl"] input[type="tel"], [dir="rtl"] input[type="email"], [dir="rtl"] input[type="url"], [dir="rtl"] input[type="number"] { direction: ltr; text-align: end; }
