/* Fiche magasin (scraped_stores#show): layout and the few pieces M3E has no
   component for (opening hours, map markers…). Buttons, chips, cards, lists
   and avatars are M3E components. Colors: the theme's M3 roles only (short
   aliases below), so the page follows light and dark mode.
   Every class is prefixed f- so nothing collides with Tailwind utilities.
   The layout follows the width of the page (container queries), not the window. */

.fiche {
  --p: var(--md-sys-color-primary); --on-p: var(--md-sys-color-on-primary);
  --p-cont: var(--md-sys-color-primary-container); --on-p-cont: var(--md-sys-color-on-primary-container);
  --s-cont: var(--md-sys-color-secondary-container); --on-s-cont: var(--md-sys-color-on-secondary-container);
  --err: var(--md-sys-color-error);
  --on-surface: var(--md-sys-color-on-surface); --on-var: var(--md-sys-color-on-surface-variant);
  --card: var(--md-sys-color-surface-container-lowest); --c: var(--md-sys-color-surface-container); --c-high: var(--md-sys-color-surface-container-high);
  --outline: var(--md-sys-color-outline); --outline-var: var(--md-sys-color-outline-variant);
  --ok: var(--app-success); --warn: var(--app-on-warning-container);
  --elev-1: 0 1px 2px rgb(0 0 0 / .3), 0 1px 3px 1px rgb(0 0 0 / .15);
  --elev-2: 0 1px 2px rgb(0 0 0 / .3), 0 2px 6px 2px rgb(0 0 0 / .15);

  container-type: inline-size;
  display: flex; flex-direction: column; gap: 16px;
  font-size: 14px; line-height: 20px; letter-spacing: .25px; color: var(--on-surface);
}
.fiche *, .fiche *::before, .fiche *::after { box-sizing: border-box; }
.fiche p, .fiche ul, .fiche ol, .fiche dl, .fiche dd { margin: 0; padding: 0; list-style: none; }
.fiche a { color: var(--p); text-decoration: none; }
.fiche a:hover { text-decoration: underline; }
.fiche :focus-visible { outline: 2px solid var(--p); outline-offset: 2px; }

/* Icons (m3e-icon): sizes. */
m3e-icon.f-s14 { font-size: 14px; } m3e-icon.f-s16 { font-size: 16px; } m3e-icon.f-s18 { font-size: 18px; } m3e-icon.f-s24 { font-size: 24px; }
.fiche m3e-icon { font-size: 20px; }
.fiche m3e-chip m3e-icon, .fiche m3e-assist-chip m3e-icon { font-size: 18px; }
.f-s14 { font-size: 14px; } .f-s16 { font-size: 16px; } .f-s18 { font-size: 18px; } .f-s24 { font-size: 24px; }

.fiche .f-muted { color: var(--on-var); }
.f-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0; }
.f-num { font-variant-numeric: tabular-nums; }
.f-trunc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.f-ok { color: var(--ok); } .f-warn { color: var(--warn); } .f-err { color: var(--err); } .f-off { color: var(--on-var); } .f-pri { color: var(--p); }
.f-col { display: flex; flex-direction: column; min-width: 0; }
.f-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.f-headline { font-size: 24px; line-height: 32px; font-weight: 600; word-break: break-word; }
.f-title-l { font-family: "Sora", ui-sans-serif, system-ui, sans-serif; font-size: 20px; line-height: 28px; font-weight: 600; }
.f-h-section { font-size: 16px; line-height: 24px; font-weight: 600; }
.f-h-tech { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--on-var); }
.f-title-s { font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: .1px; }
.f-body-s { font-size: 12px; line-height: 16px; letter-spacing: .4px; }
.f-label-s { font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .5px; }

.f-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }




.f-email { font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: 0; color: var(--on-surface); word-break: break-all; }
.f-email-bad { color: var(--on-var); text-decoration: line-through; text-decoration-color: var(--err); }
.fiche a.f-phone { font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: 0; color: var(--on-surface); }

/* M3E components on the page. */
.fiche m3e-avatar { --m3e-avatar-size: 40px; --m3e-avatar-color: var(--s-cont); --m3e-avatar-label-color: var(--on-s-cont); --m3e-avatar-font-size: 14px; --m3e-avatar-font-weight: 600; flex-shrink: 0; }
.fiche m3e-avatar.f-disc { --m3e-avatar-color: var(--p-cont); --m3e-avatar-label-color: var(--on-p-cont); }
.fiche m3e-avatar.f-avatar-neutral { --m3e-avatar-color: var(--c-high); --m3e-avatar-label-color: var(--on-var); }
.fiche m3e-card { min-width: 0; }
.fiche m3e-heading[level="2"] { font-size: 16px; line-height: 24px; }
.fiche m3e-list { --m3e-list-item-supporting-text-font-size: 12px; }
/* List items: their text block (in the shadow DOM) can't shrink below its
   content, so long names pushed the distance out of the card. contain makes
   the slotted texts shrinkable, cut with an ellipsis. */
.fiche m3e-list-action > :not([slot]), .fiche m3e-list-action > [slot="supporting-text"] {
  contain: inline-size; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fiche m3e-list-action > [slot="supporting-text"] { display: block; }
.fiche m3e-list-action > [slot="trailing"] { white-space: nowrap; }
.f-tech { --m3e-expansion-panel-container-color: transparent; --m3e-expansion-panel-elevation: 0; --m3e-expansion-header-font-size: 12px;
  --m3e-expansion-header-collapsed-height: 32px; --m3e-expansion-header-expanded-height: 32px; --m3e-expansion-header-padding-left: 0; color: var(--on-var); }
.f-tech code { display: block; margin-top: 6px; padding: 8px 12px; border-radius: 8px; background: var(--c); color: var(--on-var); font-size: 12px; line-height: 16px; word-break: break-all; }


.f-day { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; align-items: center; min-height: 28px; padding: 0 8px; border-radius: 8px; column-gap: 8px; }
.f-day.today { background: var(--p-cont); color: var(--on-p-cont); }
.f-day.today .f-muted { color: var(--on-p-cont); }
.f-rating { font-family: "Sora", ui-sans-serif, system-ui, sans-serif; font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: 0; }
.f-stars { display: flex; gap: 2px; color: var(--p); }

.f-ig-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; row-gap: 8px; padding: 12px 0; border-top: 1px solid var(--outline-var); }
.f-ig-row:first-child { border-top: 0; }
.f-ig-meta { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }

.f-st-row { display: flex; gap: 12px; align-items: flex-start; }

.f-map { height: 240px; background: var(--c-high); position: relative; z-index: 0; }
.f-map-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; height: 176px; padding: 24px;
  border-radius: 12px; background: var(--c); color: var(--on-var); }
.f-mk { width: 22px; height: 22px; border-radius: 9999px; background: var(--card); border: 2px solid var(--outline); color: var(--on-surface);
  font-size: 10px; line-height: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; box-shadow: var(--elev-1); flex-shrink: 0; }
.f-mk.same { border-color: var(--p); color: var(--p); }
.f-mk-static { box-shadow: none; }
.f-pin { width: 36px; height: 36px; border-radius: 9999px; background: var(--p); color: var(--on-p); border: 3px solid var(--card);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--elev-2); }
.f-pin m3e-icon { font-size: 18px; }
.leaflet-div-icon.f-icon { background: none; border: 0; }

.f-near-name { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--p); }
.f-tw { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; line-height: 16px; letter-spacing: .4px; color: var(--on-var); }

.f-tech-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 24px; margin: 0; }
.f-tech-grid dt { font-size: 12px; line-height: 16px; letter-spacing: .4px; color: var(--on-var); }
.f-tech-grid dd { margin: 2px 0 0; font-size: 12px; line-height: 16px; letter-spacing: .4px; color: var(--on-surface); word-break: break-all; }

.f-missing { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.f-miss { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--c); color: var(--on-var); }

/* Layout: one column (the mobile order), then two columns when the page is wide. */
.f-layout { display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.f-layout > .f-side, .f-layout > .f-main, .f-main > .f-pair { display: contents; }
.f-contact, .f-people { order: 1; } .f-suivi { order: 2; } .f-hours { order: 3; } .f-rate { order: 4; } .f-near-card { order: 5; } .f-ig { order: 6; } .f-missing-card { order: 7; }
.f-contact, .f-people, .f-hours, .f-rate, .f-ig, .f-suivi, .f-near-card, .f-missing-card { min-width: 0; }
.f-contact-cols { display: flex; flex-direction: column; gap: 16px; }
.f-contact-phone { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.f-contact-card { display: flex; flex-direction: column; gap: 16px; }

.f-actions { display: flex; flex-wrap: wrap; gap: 8px; }

@container (min-width: 600px) {
  .f-ig-row { grid-template-columns: 40px minmax(0, 1.3fr) 104px minmax(0, 1.5fr) 96px auto; column-gap: 12px; }
  .f-ig-meta { display: contents; }
  .f-tech-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f-missing { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@container (min-width: 960px) {
  .fiche h1, .f-headline { font-size: 28px; line-height: 36px; }
  .f-contact, .f-people, .f-suivi, .f-hours, .f-rate, .f-near-card, .f-ig, .f-missing-card { order: 0; }
  .f-layout { display: grid; grid-template-columns: minmax(0, 1fr) 392px; gap: 24px; align-items: start; }
  .f-layout > .f-side, .f-layout > .f-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .f-main > .f-pair { display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: 16px; }
  .f-main > .f-pair.single { grid-template-columns: minmax(0, 1fr); }
  .f-contact-cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; }
  .f-contact-phone { flex-direction: column; align-items: flex-start; }
  .f-tech-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@container (max-width: 599px) {
  .f-page-actions { width: 100%; }
}
