/*
Theme Name: Fservices
Template: fservices-medical
Version: 1.7.0
Description: Ajustements de présentation du site Fservices sur son thème parent.
Author: Fservices
*/

/* Four spaces on two rows, with readable cards and no horizontal overflow. */
@media (max-width: 760px) {
  .fs-premium-home :where(section, section > div, figure) { min-width: 0; }
  .fs-premium-home .fs-portal-universes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .fs-premium-home .fs-portal-card { min-width: 0; }
  .fs-premium-home .fs-portal-card > figure { height: auto; min-height: 0; aspect-ratio: 4 / 3; }
  .fs-premium-home .fs-portal-card figure > span { inset-inline-start: 8px; inset-inline-end: 8px; top: 8px; padding: 5px 6px; font-size: 8px; line-height: 1.5; letter-spacing: .02em; width: fit-content; max-width: calc(100% - 16px); }
  .fs-premium-home .fs-portal-card > div { padding: 14px 12px; }
  .fs-premium-home .fs-portal-card h2 { font-size: clamp(1rem, .75rem + 1.1vw, 1.25rem); line-height: 1.3; min-height: 2.6em; margin: 0 0 12px; overflow-wrap: anywhere; hyphens: auto; }
  .fs-premium-home .fs-portal-card > div > .fs-pro-eyebrow,
  .fs-premium-home .fs-portal-card-note { display: none; }
  .fs-premium-home .fs-portal-card > div > p:not(.fs-pro-eyebrow) { font-size: 13px; line-height: 1.65; margin-bottom: 14px; }
  .fs-premium-home .fs-portal-card-link { min-height: 44px; font-size: 12px; line-height: 1.5; gap: 6px; padding-top: 12px; }
  .fs-premium-home .fs-portal-card-link .fs-icon { flex-shrink: 0; width: 17px; height: 17px; }
  .fs-premium-home .fs-premium-about,
  .fs-premium-home .fs-public-rental { grid-template-columns: minmax(0, 1fr); }
  .fs-premium-home .fs-premium-about-principles article > div { min-width: 0; }
}

/* Compact navigation and progressive catalogue filters. */
.fs-mobile-universe-menu { display: none; }
@media (max-width: 760px) {
  .fs-header .fs-universe-navigation > .fs-shell { display: block; padding-block: 0; min-height: 0; }
  .fs-header .fs-universe-navigation > .fs-shell > .fs-portal-return,
  .fs-header .fs-universe-navigation > .fs-shell > div { display: none; }
  .fs-mobile-universe-menu { display: block; position: relative; }
  .fs-mobile-universe-menu > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; font-size: 12px; font-weight: 700; cursor: pointer; list-style: none; }
  .fs-mobile-universe-menu > summary::-webkit-details-marker { display: none; }
  .fs-mobile-universe-menu > summary .fs-icon { width: 18px; height: 18px; transform: rotate(90deg); transition: transform .15s; }
  .fs-mobile-universe-menu[open] > summary .fs-icon { transform: rotate(-90deg); }
  .fs-mobile-universe-options { padding: 6px 0 14px; }
  .fs-header .fs-mobile-universe-options > div { display: grid; grid-template-columns: minmax(0,1fr); gap: 4px; }
  .fs-header .fs-mobile-universe-options a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 44px; width: 100%; margin: 0; font-size: 14px; white-space: normal; }
  .fs-header .fs-mobile-universe-options .fs-portal-return { font-size: 12px; }
  .fs-header .fs-mobile-universe-options small { display: none; }
  .fs-header .fs-brand-row { gap: 12px; padding-block: 14px; }
  .fs-header .fs-portal-toggle { margin-inline-start: auto; margin-inline-end: 0; min-height: 44px; padding: 10px 12px; }
  .fs-header .fs-portal-nav { margin: 0; }
  .fs-header .fs-portal-nav a { min-height: 44px; font-size: 14px; }
  .fs-header .fs-portal-nav a:first-child { display: block; }
  .fs-header .fs-header-search { min-width: 0; width: 100%; max-width: none; }
  .fs-header .fs-header-tools { min-width: 0; flex-wrap: wrap; gap: 12px; }
  .fs-premium-home .fs-premium-project-grid,
  .fs-premium-home .fs-turnkey-steps,
  .fs-premium-home .fs-premium-journey ol,
  .fs-premium-home .fs-premium-assurance-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 12px; }
  .fs-premium-home .fs-premium-project-grid article { padding: 18px 14px; min-width: 0; }
  .fs-premium-home .fs-premium-project-grid article:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .fs-premium-home .fs-premium-project-grid h3 { font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
  .fs-premium-home .fs-premium-project-grid p,
  .fs-premium-home .fs-premium-journey li p,
  .fs-premium-home .fs-premium-assurance-grid p { font-size: 13px; line-height: 1.7; }
  .fs-premium-home .fs-premium-project-grid a { min-height: 44px; font-size: 12px; line-height: 1.6; gap: 8px; }
  .fs-premium-home .fs-premium-project-grid article > div { margin-bottom: 18px; }
  .fs-premium-home .fs-turnkey-overview,
  .fs-premium-home .fs-premium-journey { padding: 24px 16px; }
  .fs-premium-home .fs-turnkey-steps h3,
  .fs-premium-home .fs-premium-journey h3,
  .fs-premium-home .fs-premium-assurance-grid h3 { font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; }
  .fs-premium-home .fs-premium-assurance-grid article { min-width: 0; }
  .fs-store-layout, .fs-store-detail, .fs-lab-catalogue { min-width: 0; }
  .fs-store-layout > *, .fs-store-detail > * { min-width: 0; }
  .fs-store-product-bottom { flex-wrap: wrap; gap: 12px; }
  .fs-store-product-bottom > a { display: flex; flex: 1 1 100%; justify-content: center; align-items: center; width: auto; min-height: 44px; padding: 9px 12px; font-size: 12px; line-height: 1.4; border-radius: 5px; }
  .fs-store-product-bottom > strong { font-size: 16px; overflow-wrap: anywhere; }
  .fs-store-sidebar > a:nth-of-type(n+6) { display: flex; }
  .fs-store-sidebar > a { min-height: 44px; font-size: 13px; }
  .fs-store-search { flex-wrap: wrap; padding: 10px; }
  .fs-store-search input { min-width: 0; }
  .fs-store-search button { min-height: 44px; }
  .fs-store-pagination a, .fs-store-pagination span { min-width: 36px; min-height: 44px; }
  body main form input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
  body main form select, body main form textarea,
  .woocommerce form .form-row select, .woocommerce form .form-row textarea,
  .fs-request select, .fs-request textarea, .fs-project-brief select, .fs-project-brief textarea,
  .fs-header-search input, .fs-store-search input, .fs-lab-purchase select, .fs-lab-purchase input { font-size: 16px; max-width: 100%; min-width: 0; }
  body main form input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
  body main form select, .fs-lab-purchase select, .fs-lab-purchase input { min-height: 48px; }
  .fs-form-grid, .fs-brief-row { grid-template-columns: minmax(0,1fr); }
  .fs-form-grid > *, .fs-brief-row > * { min-width: 0; }
  .fs-consent, .fs-brief-consent { min-height: 44px; }
  .fs-header summary:focus-visible { outline: 3px solid #087e80; outline-offset: 3px; }
}
@media (prefers-reduced-motion: reduce) {
 .fs-mobile-universe-menu > summary .fs-icon { transition: none; }
}

/* Persistent category rail beside two product columns on mobile. */
@media (max-width: 760px) {
  .fs-store-layout { grid-template-columns: clamp(84px, 24vw, 110px) minmax(0, 1fr); gap: 10px; align-items: start; }
  .fs-store-layout > .fs-store-sidebar { display: block; grid-template-columns: none; position: sticky; top: 12px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: thin; padding: 10px 6px; border-radius: 7px; background: #f3f7f6; }
  .fs-store-layout .fs-store-sidebar > h2 { font-size: 12px; line-height: 1.45; margin: 0 3px 10px; overflow-wrap: anywhere; }
  .fs-store-layout .fs-store-sidebar > a { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 4px; min-height: 48px; padding: 10px 5px; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; hyphens: auto; text-decoration: none; }
  .fs-store-layout .fs-store-sidebar > a:nth-of-type(n+6) { display: flex; }
  .fs-store-layout .fs-store-sidebar > a.is-active { background: #e1f0eb; color: #075e60; font-weight: 800; border-inline-start: 3px solid #087e80; border-radius: 4px; }
  .fs-store-layout .fs-store-sidebar > a > .fs-icon { display: none; }
  .fs-store-layout .fs-store-sidebar > a > span { font-size: 10px; }
  .fs-store-layout > section { min-width: 0; }
  .fs-store-layout .fs-store-products { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 8px; }
  .fs-store-layout .fs-store-product { min-width: 0; }
  .fs-store-layout .fs-store-product-image { height: clamp(100px,28vw,160px); min-height: 0; }
  .fs-store-layout .fs-store-product-body { padding: 12px 8px; }
  .fs-store-layout .fs-store-product h3 { font-size: 12px; line-height: 1.5; min-height: 54px; overflow-wrap: anywhere; hyphens: auto; }
  .fs-store-layout .fs-store-product-family { overflow-wrap: anywhere; }
  .fs-store-layout .fs-store-product-state { font-size: 10px; line-height: 1.6; }
  .fs-store-layout .fs-store-product-bottom > strong { font-size: 14px; line-height: 1.45; }
  .fs-store-layout .fs-store-product-bottom > a { padding: 8px 4px; font-size: 11px; min-height: 44px; }
  .fs-store-layout .fs-lab-image-surface { height: 100%; padding: 8px 6px 22px; }
  .fs-store-layout .fs-lab-image-surface > img { max-height: 100%; }
  .fs-store-layout .fs-store-search { gap: 8px; }
  .fs-store-layout .fs-store-search > input { flex: 1 1 100%; width: 100%; }
  .fs-store-layout .fs-store-search > button { width: 100%; }
  .fs-store-layout .fs-store-search > .fs-icon { display: none; }
  .fs-store-layout .fs-pagination { display: flex; flex-wrap: wrap; gap: 5px; }
  .fs-store-layout .fs-pagination > * { margin: 0; min-width: 32px; min-height: 44px; padding: 10px 7px; }
}
@media (max-width: 360px) {
  .fs-store-layout { gap: 8px; }
  .fs-store-layout .fs-store-product-body { padding-inline: 6px; }
}

/* Shared category navigation and live product collections on universe homes. */
.fs-home-category-rail.fs-store-rayons { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(104px,1fr); grid-template-columns: none; gap: 10px; overflow-x: auto; margin: 22px 0 32px; padding: 0 0 12px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.fs-home-category-rail > a { min-width: 104px; min-height: 104px; padding: 16px 9px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; border-radius: 9px; background: #f3f6f8; color: #173b50; text-align: center; text-decoration: none; scroll-snap-align: start; }
.fs-home-category-rail > a:hover { background: #e3efed; }
.fs-home-category-rail > a > span { font-size: 12px; line-height: 1.5; }
.fs-home-category-rail .fs-icon { width: 24px; height: 24px; color: #25596a; }
.fs-home-collections { margin: 0; }
.fs-home-offer { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 32px 36px; margin: 22px 0 48px; border: 1px solid #cce0d9; border-radius: 12px; background: linear-gradient(110deg,#eff7f3,#e3f0ec); }
.fs-home-offer h2 { font-size: clamp(25px,2.6vw,36px); line-height: 1.25; margin: 8px 0 12px; }
.fs-home-offer p:not(.fs-pro-eyebrow) { color: #536f78; font-size: 14px; line-height: 1.8; max-width: 680px; margin: 0; }
.fs-home-offer .fs-button { flex-shrink: 0; }
.fs-home-collection { margin: 42px 0 56px; }
.fs-home-collection-head,.fs-home-family-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.fs-home-collection-head h2 { margin: 8px 0 10px; font-size: clamp(27px,3vw,39px); line-height: 1.25; }
.fs-home-collection-head p:not(.fs-pro-eyebrow) { color: #637c86; font-size: 14px; margin: 0; }
.fs-home-collection-head > a,.fs-home-family-head > a { flex-shrink: 0; font-size: 13px; font-weight: 700; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.fs-home-family { margin: 30px 0 44px; }
.fs-home-family-head h3 { font-size: 23px; line-height: 1.35; margin: 0; }
.fs-home-product-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; }
.fs-home-product { display: flex; flex-direction: column; min-width: 0; background: white; border: 1px solid #dce6e7; border-radius: 10px; overflow: hidden; }
.fs-home-product-image { height: 210px; padding: 20px; position: relative; display: flex; justify-content: center; align-items: center; overflow: hidden; background: #f7f9fa; }
.fs-home-product-image > img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.fs-home-product-image > small { position: absolute; inset-inline: 10px; bottom: 7px; color: #6a7e84; font-size: 8px; line-height: 1.4; }
.fs-home-product-image .fs-lab-image-surface { width: 100%; height: 100%; padding: 0 0 12px; }
.fs-home-product-image .fs-lab-image-surface > img { max-width: 100%; max-height: 100%; width: auto; height: auto; mix-blend-mode: normal; }
.fs-home-product-copy { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.fs-home-product-copy > p { font-size: 10px; color: #657e86; margin: 0; line-height: 1.5; }
.fs-home-product h3 { font-size: 16px; line-height: 1.55; margin: 0; }
.fs-home-product h3 a { color: #163c4e; text-decoration: none; }
.fs-home-product-reference { font-size: 10px; color: #617b84; overflow-wrap: anywhere; }
.fs-home-product-price { font-size: 17px; font-weight: 750; color: #087e80; margin-top: auto; padding-top: 14px; }
.fs-home-product-link { min-height: 44px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid #e0e9e9; padding-top: 12px; font-size: 13px; font-weight: 700; text-decoration: none; }
@media (max-width: 900px) { .fs-home-product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 760px) {
 .fs-home-category-rail.fs-store-rayons { grid-auto-columns: 104px; margin-block: 18px 25px; gap: 9px; }
 .fs-home-category-rail > a > span { font-size: 11px; }
 .fs-home-offer { display: block; padding: 24px 20px; margin-bottom: 32px; }
 .fs-home-offer .fs-button { margin-top: 20px; min-height: 48px; }
 .fs-home-collection { margin: 30px 0 40px; }
 .fs-home-collection-head,.fs-home-family-head { align-items: start; flex-direction: column; gap: 10px; margin-bottom: 18px; }
 .fs-home-collection-head h2 { font-size: 27px; }
 .fs-home-family-head h3 { font-size: 21px; }
 .fs-home-product-grid { gap: 14px 12px; }
 .fs-home-product-image { height: 160px; padding: 15px 10px 22px; }
 .fs-home-product-copy { padding: 14px 12px; }
 .fs-home-product h3 { font-size: 14px; overflow-wrap: anywhere; }
 .fs-home-product-price { font-size: 16px; }
 .fs-home-product-link { font-size: 12px; }
}

/* Category tabs replace stacked selections without a page reload. */
.fs-home-category-tabs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 0 0 26px; }
.fs-home-category-tabs > a { display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 12px 14px; border: 1px solid #d3e1e4; border-radius: 8px; background: #f2f6f7; color: #254f60; text-align: center; text-decoration: none; font-size: 13px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.fs-home-category-tabs > a:hover { background: #e3efed; border-color: #7eb6af; }
.fs-home-category-tabs > a[aria-selected="true"] { color: #fff; background: #086d70; border-color: #086d70; box-shadow: 0 3px 0 #044b50; }
.fs-home-category-tabs > a:focus-visible,.fs-home-family[role="tabpanel"]:focus-visible { outline: 3px solid #c97520; outline-offset: 4px; }
.fs-home-families .fs-home-family[hidden] { display: none; }
.fs-home-families .fs-home-family { margin-top: 0; }
@media (max-width: 760px) {
 .fs-home-category-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-bottom: 24px; }
 .fs-home-category-tabs > a { font-size: 11px; min-height: 56px; padding: 10px 9px; }
}

/* Mobile merchandising: one horizontal row, swipe plus explicit controls. */
.fs-home-slider-controls { display: none; }
@media (max-width: 760px) {
 .fs-home-category-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 9px; padding: 4px 3px 10px; scroll-snap-type: none; scrollbar-width: thin; }
 .fs-home-category-tabs > a { flex: 0 0 auto; max-width: 210px; min-height: 48px; padding: 12px 16px; font-size: 12px; scroll-snap-align: start; }
 .fs-home-collections .fs-home-product-grid { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 76%; gap: 12px; overflow-x: auto; padding: 3px 2px 13px; scroll-snap-type: x mandatory; scroll-padding-inline: 2px; overscroll-behavior-x: contain; scrollbar-width: thin; }
 .fs-home-collections .fs-home-product-grid > .fs-home-product { scroll-snap-align: start; }
 .fs-home-product-grid:focus-visible { outline: 3px solid #c97520; outline-offset: 3px; }
 .fs-home-slider-controls { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
 .fs-home-slider-controls > span { flex: 1; font-size: 11px; color: #536f78; }
 .fs-home-slider-controls > button { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 8px; border: 1px solid #a8cbcb; border-radius: 50%; color: #086d70; background: #fff; font-size: 22px; cursor: pointer; }
 .fs-home-slider-controls > button:disabled { opacity: .35; cursor: default; }
 .fs-home-slider-controls > button:focus-visible { outline: 3px solid #c97520; outline-offset: 3px; }
 /* Keep the headline and visual side by side; full-width actions stay readable. */
 .fs-market-hero,.fs-dental-hero,.fs-lab-hero { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,.9fr); gap: 14px 12px; padding: 22px 16px; min-height: 0; align-items: start; }
 .fs-market-hero-copy,.fs-dental-hero-copy,.fs-lab-hero > div { display: contents; }
 .fs-market-hero-copy > .fs-pro-eyebrow,.fs-dental-hero-copy > .fs-pro-eyebrow,.fs-lab-hero > div > .fs-pro-eyebrow { grid-column: 1; grid-row: 1; font-size: 8px; line-height: 1.7; letter-spacing: .06em; margin: 0 !important; }
 .fs-market-hero h1,.fs-dental-hero h1,.fs-lab-hero h1 { grid-column: 1; grid-row: 2; font-size: clamp(20px,5.5vw,29px); line-height: 1.17; letter-spacing: -.035em; margin: 0 !important; overflow-wrap: anywhere; }
 .fs-market-intro,.fs-dental-hero-copy > p:not(.fs-pro-eyebrow),.fs-lab-hero > div > p:not(.fs-pro-eyebrow) { grid-column: 1; grid-row: 3; font-size: 12px; line-height: 1.65; margin: 0 !important; }
 .fs-market-spotlight,.fs-dental-hero > figure,.fs-lab-hero > figure { grid-column: 2; grid-row: 1 / 4; align-self: stretch; width: 100%; height: auto; min-height: 230px; margin: 0 !important; border-radius: 8px; overflow: hidden; }
 .fs-dental-hero > figure > img,.fs-lab-hero > figure > img { object-position: center; }
 .fs-dental-image-note,.fs-lab-hero figure > div { display: none; }
 .fs-dental-hero figcaption,.fs-lab-hero figcaption { inset-inline: 5px; bottom: 5px; padding: 4px; font-size: 7px; line-height: 1.4; }
 .fs-dental-actions,.fs-lab-hero > div > .fs-button,.fs-market-search { grid-column: 1 / -1; grid-row: 4; margin: 2px 0 0 !important; min-width: 0; }
 .fs-dental-actions { gap: 10px 16px; }
 .fs-dental-actions .fs-button,.fs-lab-hero > div > .fs-button { min-height: 44px; font-size: 12px; padding: 12px 16px; }
 .fs-dental-text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; }
 .fs-dental-hero-meta,.fs-lab-hero-meta,.fs-market-hero-services { grid-column: 1 / -1; gap: 8px 13px; margin: 2px 0 0; font-size: 10px; line-height: 1.6; }
 .fs-market-search { min-height: 48px; }
 .fs-market-search input { font-size: 16px; }
 .fs-market-search button { min-height: 44px; }
 .fs-market-chips { grid-column: 1 / -1; margin: 0; }
 .fs-market-spotlight { padding: 9px; display: flex; align-items: center; background: #ffffff12; }
 .fs-market-spotlight-top,.fs-market-spotlight-bottom,.fs-market-spotlight-main > div:not(.fs-market-spotlight-image) { display: none; }
 .fs-market-spotlight-main { display: block; width: 100%; }
 .fs-market-spotlight-image { width: 100%; height: 210px; padding: 8px; }
 .fs-market-spotlight-image > small { font-size: 7px; inset-inline: 4px; }
}
