/* Murtezi Lab Dental – styles du site. Valeurs : tokens.css. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 6rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
address { font-style: normal; }
main:focus { outline: none; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.section--night :focus-visible, .site-footer :focus-visible { outline-color: var(--ice); }

.sr-only {
  position: absolute; 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; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--navy); color: #fff; padding: var(--s-3) var(--s-4);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--s-4); }

.tabular { font-variant-numeric: tabular-nums; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section); }

/* ---------- Typographie ---------- */
.display, .h1, .h2, .h3, .quote blockquote {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  font-optical-sizing: auto;
  text-wrap: balance;
}
.display { font-size: var(--fs-display); line-height: 1.02; letter-spacing: -0.025em; text-wrap: pretty; }
/* Mots allemands plus longs : le titre d'accueil garde trois ou quatre lignes, pas cinq. */
html[lang="de"] .display { font-size: clamp(2.5rem, 1.4rem + 4.2vw, 4.75rem); }
.h1 { font-size: var(--fs-h1); line-height: 1.05; }
.h2 { font-size: var(--fs-h2); line-height: 1.1; }
.h3 { font-size: var(--fs-h3); line-height: 1.2; }
.display em, .h1 em, .h2 em { font-style: italic; color: var(--navy); }
.section--night .h2 em { color: var(--ice); }

.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--ink-2); max-width: 40ch; text-wrap: pretty; }
.prose p { max-width: var(--measure); text-wrap: pretty; }
.prose p + p { margin-top: var(--s-4); }

.label {
  display: flex; align-items: center; gap: var(--s-3);
  font-size: var(--fs-label); line-height: 1.3; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
}
.label::before { content: ""; width: 24px; height: 1px; background: currentColor; flex: none; }
.section--night .label { color: var(--night-muted); }

.label + .display, .label + .h1, .label + .h2 { margin-top: var(--s-5); }
.display + .lead, .h1 + .lead, .h2 + .lead { margin-top: var(--s-5); }
.lead + .actions { margin-top: var(--s-6); }

/* ---------- Chanfreins ---------- */
.cut {
  --c: var(--cut-m);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.cut--s { --c: var(--cut-s); }
.cut--m { --c: var(--cut-m); }
.cut--l { --c: var(--cut-l); }

/* ---------- Boutons et liens ---------- */
.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

.btn {
  --btn-bg: var(--navy);
  --btn-bg-hover: var(--ink);
  --btn-fg: #fff;
  --c: var(--cut-s);
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: var(--s-3) var(--s-5);
  font-size: 1rem; font-weight: 600; line-height: 1.2; text-decoration: none;
  color: var(--btn-fg);
  transition: color var(--dur-fast) var(--ease);
}
.btn::before, .btn::after {
  content: ""; position: absolute; z-index: -1;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  transition: background-color var(--dur-fast) var(--ease);
}
.btn::before { inset: 0; background: var(--btn-bg); }
.btn .icon { width: 1.125rem; height: 1.125rem; transition: transform var(--dur-fast) var(--ease); }
.btn:hover::before { background: var(--btn-bg-hover); }
.btn:hover .icon:last-child:not(:first-child) { transform: translateX(3px); }
.btn--small { min-height: 44px; padding: var(--s-2) var(--s-4); font-size: var(--fs-small); }

/* Secondaire : filet dessiné par ::before, fond par ::after */
.btn--secondary { --btn-bg: var(--ink); --btn-bg-hover: var(--ink); --btn-fg: var(--ink); --btn-fill: var(--paper); --btn-fill-hover: var(--paper-2); }
.btn--secondary::after { inset: 1px; --c: calc(var(--cut-s) - 0.4px); background: var(--btn-fill); }
.btn--secondary:hover::after { background: var(--btn-fill-hover); }

.btn--ice { --btn-bg: var(--ice); --btn-bg-hover: #A9DCEE; --btn-fg: var(--night); }
.btn--ghost-light { --btn-bg: var(--night-muted); --btn-bg-hover: var(--night-text); --btn-fg: var(--night-text); --btn-fill: var(--night); --btn-fill-hover: var(--night-2); }
.btn--ghost-light::after { inset: 1px; --c: calc(var(--cut-s) - 0.4px); background: var(--btn-fill); }
.btn--ghost-light:hover::after { background: var(--btn-fill-hover); }

.link-quiet {
  display: inline-flex; align-items: center; gap: var(--s-2);
  color: var(--blue); font-weight: 600; text-decoration: none;
  min-height: 44px;
}
.link-quiet .icon { width: 1.125rem; height: 1.125rem; transition: transform var(--dur-fast) var(--ease); }
.link-quiet:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.link-quiet:hover .icon { transform: translateX(4px); }

.prose a:not(.link-quiet) { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.prose a:not(.link-quiet):hover { text-decoration-thickness: 2px; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease);
}
/* Fond sur un pseudo-élément : un backdrop-filter sur l'en-tête lui-même
   enfermerait le menu mobile (position: fixed) dans sa hauteur. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.menu-open .site-header::before { background: var(--paper); }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-5);
  height: 76px; transition: height var(--dur-fast) var(--ease);
}
.site-header.is-scrolled .header-inner { height: 64px; }
.brand { display: flex; align-items: center; flex: none; min-height: 44px; }
.brand img { height: 58px; width: auto; transition: height var(--dur-fast) var(--ease); }
.site-header.is-scrolled .brand img { height: 46px; }

.menu-toggle {
  display: inline-grid; place-items: center; width: 48px; height: 48px; margin-right: -12px;
}
.menu-toggle .icon { width: 26px; height: 26px; }
.menu-toggle-close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle-open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle-close { display: block; }

.nav-link {
  display: inline-flex; align-items: center; gap: var(--s-1);
  min-height: 44px; font-weight: 500; text-decoration: none; color: var(--ink);
}
.nav-link[aria-current="page"], .nav-link[aria-current="true"], .nav-link.is-active { color: var(--navy); text-decoration: underline; text-underline-offset: 0.35em; text-decoration-thickness: 1px; }
.icon-chevron { width: 1rem; height: 1rem; transition: transform var(--dur-fast) var(--ease); }
.sub-toggle[aria-expanded="true"] .icon-chevron { transform: rotate(180deg); }
.sub-link { display: flex; align-items: baseline; gap: var(--s-3); text-decoration: none; min-height: 44px; padding-block: var(--s-2); }
.sub-index { font-size: var(--fs-label); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sub-link[aria-current="page"] { color: var(--navy); font-weight: 600; }

.lang-switch { display: flex; gap: var(--s-1); font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.04em; }
.lang-switch a, .lang-switch .is-soon {
  display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; text-decoration: none;
}
.lang-switch a { color: var(--ink-2); }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 0.35em; }
.lang-switch .is-soon { color: var(--line-strong); cursor: default; }

/* Menu mobile */
@media (max-width: 1023.98px) {
  .site-nav {
    position: fixed; inset: 76px 0 0 0; z-index: 49;
    display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-7);
    padding: var(--s-6) var(--gutter) var(--s-7);
    background: var(--paper); overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), visibility 0s linear var(--dur-fast);
  }
  .site-header.is-scrolled .site-nav { inset-block-start: 64px; }
  .menu-open .site-nav {
    visibility: visible; opacity: 1; transform: none;
    transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  }
  .menu-open { overflow: hidden; }
  .nav-list > li { border-bottom: 1px solid var(--line); }
  .nav-list .nav-link { width: 100%; justify-content: space-between; min-height: 60px; font-family: var(--font-serif); font-size: 1.625rem; }
  .sub-list { display: block; padding-bottom: var(--s-4); }
  .has-sub.is-closed .sub-list { display: none; }
  .nav-phone { display: flex; align-items: center; gap: var(--s-3); min-height: 48px; font-weight: 600; color: var(--navy); text-decoration: none; }
  .sub-link { font-size: 1.0625rem; }
  .nav-aside { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); }
}

@media (min-width: 1024px) {
  .menu-toggle { display: none; }
  .nav-phone { display: none; } /* le téléphone n’est dans le menu que sur mobile ; sur ordinateur il est dans le pied de page et le contact */
  .site-nav { display: flex; align-items: center; gap: var(--s-6); }
  .nav-list { display: flex; align-items: center; gap: var(--s-5); }
  .nav-aside { display: flex; align-items: center; gap: var(--s-4); }
  .has-sub { position: relative; }
  .sub-list {
    position: absolute; left: -1.25rem; top: calc(100% + 0.5rem); min-width: 18rem;
    padding: var(--s-3) var(--s-5);
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-overlay);
    visibility: hidden; opacity: 0; transform: translateY(-4px);
    transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), visibility 0s linear var(--dur-fast);
  }
  .sub-list::before { content: ""; position: absolute; inset: -0.75rem 0 auto 0; height: 0.75rem; }
  .has-sub.is-open .sub-list,
  .has-sub:hover .sub-list {
    visibility: visible; opacity: 1; transform: none;
    transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  }
  .sub-list li + li { border-top: 1px solid var(--line); }
  .sub-link:hover { color: var(--navy); }
}

/* En-tête compact sur les petits écrans d’ordinateur : le menu tient sur une ligne dans les trois langues. */
@media (min-width: 1024px) {
  .site-nav .nav-link, .site-nav .btn { white-space: nowrap; }
}
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .header-inner { gap: var(--s-4); }
  .brand img { height: clamp(2.625rem, 2.625rem + (100vw - 64rem) * 0.0625, 3.625rem); }
  .site-header.is-scrolled .brand img { height: 40px; }
  .site-nav { gap: var(--s-3); }
  .nav-list { gap: clamp(0.625rem, 0.625rem + (100vw - 64rem) * 0.055, 1.5rem); }
  .nav-aside { gap: var(--s-2); }
  .site-nav .nav-link { font-size: 0.9375rem; }
  .lang-switch { gap: 0; }
  .lang-switch a, .lang-switch .is-soon { min-width: 36px; }
  .site-nav .btn { padding-inline: var(--s-3); }
}

/* Aperçu depuis l'administration (textes non enregistrés) */
.preview-bar {
  position: fixed; inset: auto 0 0 0; z-index: 200; margin: 0;
  padding: var(--s-3) var(--gutter); background: #FBF3E2; border-top: 3px solid var(--warn);
  color: var(--ink); font-size: var(--fs-small); text-align: center;
}

/* ---------- Accueil : introduction (hero) ---------- */
.hero { padding-block: var(--s-7) var(--section); }
.hero-grid { display: grid; gap: var(--s-7); }
.hero-text { align-self: center; }
.hero-media { position: relative; }
.media-frame { overflow: hidden; background: var(--paper-2); }
.media-img { width: 100%; height: 100%; object-fit: cover; }
.hero-media .media-frame { aspect-ratio: 4 / 3; }
.hero-facets {
  position: absolute; z-index: -1; width: 70%; left: -18%; bottom: -16%;
  color: var(--line-strong); opacity: 0.55;
}
.hero { position: relative; isolation: isolate; overflow: clip; }

.facts {
  display: grid; gap: var(--s-3);
  padding-top: var(--s-5); border-top: 1px solid var(--line);
  font-size: var(--fs-small); color: var(--ink-2);
}
.facts li { display: flex; align-items: center; gap: var(--s-3); min-height: 44px; }
.facts a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 0.2em; }
.facts a:hover { color: var(--navy); text-decoration-color: currentColor; }
.facts .icon { color: var(--navy); width: 1.125rem; height: 1.125rem; }

@media (min-width: 600px) {
  .facts { grid-template-columns: repeat(3, auto); justify-content: start; column-gap: var(--s-7); }
}
@media (min-width: 900px) {
  .hero { padding-top: var(--s-8); }
  .hero-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-5); row-gap: var(--s-8); }
  .hero-text { grid-column: 1 / span 6; padding-right: var(--s-5); }
  .hero-media { grid-column: 7 / -1; }
  .hero-media .media-frame { aspect-ratio: 4 / 5; }
  .facts { grid-column: 1 / -1; }
}
@media (min-width: 1400px) {
  .hero-text { grid-column: 1 / span 5; }
  .hero-media { grid-column: 6 / -1; }
}

/* ---------- Introduction du laboratoire ---------- */
.intro { border-top: 1px solid var(--line); }
.intro-grid { display: grid; gap: var(--s-6); }
@media (min-width: 900px) {
  .intro-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-5); }
  .intro-head { grid-column: 1 / span 5; }
  .intro-body { grid-column: 7 / -1; padding-top: calc(var(--s-5) + 1.3em); }
  .intro-body p:not(:has(.link-quiet)) { font-size: 1.125rem; }
}

/* ---------- Prestations ---------- */
.services { background: var(--paper-2); }
.section-head { margin-bottom: var(--s-7); }
.service-list { border-top: 1px solid var(--ink); }
.service-row { border-bottom: 1px solid var(--line-strong); }
.service-link {
  position: relative;
  display: grid; grid-template-columns: 1fr auto; gap: var(--s-3) var(--s-4); align-items: center;
  padding-block: var(--s-6); text-decoration: none; color: var(--ink);
}
.service-index { grid-column: 1; grid-row: 1; font-size: var(--fs-small); color: var(--ink-2); }
.service-main { grid-column: 1 / -1; grid-row: 2; display: grid; gap: var(--s-3); }
.service-name { font-family: var(--font-serif); font-size: var(--fs-h3); line-height: 1.2; letter-spacing: -0.01em; }
.service-summary { color: var(--ink-2); max-width: 46ch; }
.service-items {
  grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2) var(--s-4);
  margin-top: var(--s-2); padding-top: var(--s-4); border-top: 1px solid var(--line);
  font-size: var(--fs-small);
  transition: opacity var(--dur-fast) var(--ease);
}
.service-arrow {
  grid-column: 2; grid-row: 1; display: grid; place-items: center;
  width: 44px; height: 44px; border: 1px solid var(--line-strong); color: var(--navy);
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.service-arrow .icon { width: 1.25rem; height: 1.25rem; transition: transform var(--dur-fast) var(--ease); }
.service-link:hover .service-arrow { background: var(--navy); border-color: var(--navy); color: #fff; }
.service-link:hover .service-arrow .icon { transform: translate(2px, -2px); }
.service-link:hover .service-name { color: var(--navy); }
.service-peek { display: none; }

@media (min-width: 900px) {
  .service-link { grid-template-columns: 4rem minmax(0, 5fr) minmax(0, 5fr) 3rem; align-items: start; padding-block: var(--s-7); }
  .service-index { padding-top: 0.55em; }
  .service-main { grid-column: 2; grid-row: 1; }
  .service-items { grid-column: 3; grid-row: 1; grid-template-columns: 1fr; margin-top: 0.55em; padding-top: 0; border-top: 0; }
  .service-arrow { grid-column: 4; }
}
@media (min-width: 1024px) and (hover: hover) {
  .service-peek {
    display: block; position: absolute; z-index: 1; pointer-events: none;
    right: 5rem; top: 50%; width: 300px; aspect-ratio: 4 / 3;
    translate: 0 -50%; overflow: hidden; background: var(--paper);
    clip-path: polygon(var(--c) 100%, 100% 100%, 100% 100%, calc(100% - var(--c)) 100%, 0 100%, 0 100%);
    transition: clip-path 450ms var(--ease);
  }
  .service-peek img { width: 100%; height: 100%; object-fit: cover; scale: 1.08; transition: scale 900ms var(--ease); }
  .service-link:hover .service-peek, .service-link:focus-visible .service-peek {
    clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  }
  .service-link:hover .service-peek img, .service-link:focus-visible .service-peek img { scale: 1; }
  .service-link:hover .service-items, .service-link:focus-visible .service-items { opacity: 0.12; }
}

/* ---------- Section sombre : flux numérique ---------- */
.section--night { background: var(--night); color: var(--night-text); position: relative; isolation: isolate; overflow: clip; }
.section--night .lead { color: var(--night-muted); }
.digital-facets {
  position: absolute; z-index: -1; width: min(720px, 90vw); right: -12%; top: -10%;
  color: var(--ice); opacity: 0.12;
}
.digital-grid { display: grid; gap: var(--s-7); }
.digital-media .media-frame { aspect-ratio: 3 / 2; background: var(--night-2); }
.steps { display: grid; gap: var(--s-6); }
.step { border-top: 1px solid var(--ice); padding-top: var(--s-4); }
.step-index { display: block; font-size: var(--fs-small); color: var(--ice); margin-bottom: var(--s-3); }
.step-title { font-family: var(--font-serif); font-weight: 400; font-size: var(--fs-h3); line-height: 1.2; margin-bottom: var(--s-2); }
.step p { color: var(--night-muted); max-width: 34ch; }
@media (min-width: 700px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
}
@media (min-width: 900px) {
  .digital-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-5); row-gap: var(--s-9); }
  .digital-text { grid-column: 1 / span 5; align-self: center; }
  .digital-media { grid-column: 7 / -1; }
  .steps { grid-column: 1 / -1; }
}

/* ---------- Citation ---------- */
.quote-figure { max-width: 52rem; }
.quote blockquote {
  font-size: var(--fs-h1); line-height: 1.12; font-style: italic; color: var(--navy);
}
.quote blockquote p::before { content: "« "; }
.quote blockquote p::after { content: " »"; }
html[lang="de"] .quote blockquote p::before { content: "«"; }
html[lang="de"] .quote blockquote p::after { content: "»"; }
html[lang="en"] .quote blockquote p::before { content: "“"; }
html[lang="en"] .quote blockquote p::after { content: "”"; }
.quote figcaption { margin-top: var(--s-6); }
@media (min-width: 900px) {
  .quote-figure { margin-left: calc((100% - 0px) * 2 / 12); }
}

/* ---------- Contact ---------- */
.contact-cta { border-top: 1px solid var(--line); }
.contact-grid { display: grid; gap: var(--s-7); }
.contact-card {
  display: grid; gap: var(--s-5); align-self: start;
  padding: var(--s-6); background: var(--surface);
}
.contact-card div { display: grid; gap: var(--s-1); }
.contact-card div + div { border-top: 1px solid var(--line); padding-top: var(--s-5); }
.contact-card dt { font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.contact-card dd { font-size: 1.125rem; }
.contact-card a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 0.2em; }
.contact-card a:hover { color: var(--navy); text-decoration-color: currentColor; }
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-5); }
  .contact-grid > :first-child { grid-column: 1 / span 6; }
  .contact-grid .contact-card { grid-column: 8 / -1; padding: var(--s-7); }
}

/* ---------- En-tête de page simple ---------- */
.page-head { min-height: 50vh; }
.page-head .lead { max-width: 52ch; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--navy); color: var(--night-text); padding-top: var(--s-9); font-size: var(--fs-small); }
.site-footer a { color: var(--night-text); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.footer-grid { display: grid; gap: var(--s-7); padding-bottom: var(--s-8); }
.footer-brand img { height: 64px; width: auto; }
.footer-address { margin-top: var(--s-5); color: var(--night-muted); line-height: 1.7; }
.footer-contact { display: grid; gap: var(--s-3); align-content: start; }
.footer-contact li { display: flex; align-items: center; gap: var(--s-3); min-height: 32px; }
.footer-contact .icon { color: var(--ice); width: 1.125rem; height: 1.125rem; }
.footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); align-content: start; }
.footer-nav li a { display: inline-flex; align-items: center; min-height: 36px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-6);
  position: relative; padding-block: var(--s-4); color: var(--night-muted);
}
.footer-bottom::before {
  content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter);
  border-top: 1px solid rgb(233 238 245 / 0.18);
}
.footer-legal { display: flex; flex-wrap: wrap; gap: var(--s-5); }
.footer-legal a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer .lang-switch a { color: var(--night-muted); }
.site-footer .lang-switch a[aria-current="true"], .site-footer .lang-switch a:hover { color: #fff; }
.site-footer .lang-switch .is-soon { color: rgb(163 179 201 / 0.5); }
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 5fr 4fr 4fr; }
  .footer-legal { margin-right: auto; margin-left: var(--s-6); }
}

/* ---------- Apparitions au défilement ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0; transform: translateY(24px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
  .js [data-reveal="media"] { opacity: 1; transform: none; }
  .js [data-reveal="media"] .media-frame {
    clip-path: polygon(var(--c) 100%, 100% 100%, 100% 100%, calc(100% - var(--c)) 100%, 0 100%, 0 100%);
    transition: clip-path 1100ms var(--ease);
  }
  .js [data-reveal="media"] .media-img { scale: 1.08; transition: scale 1600ms var(--ease); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js [data-reveal="media"].is-in .media-frame {
    clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  }
  .js [data-reveal="media"].is-in .media-img { scale: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* =========================================================
   Pages intérieures
   ========================================================= */

/* Fil d’Ariane */
.breadcrumb { margin-bottom: var(--s-6); font-size: var(--fs-small); color: var(--ink-2); }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); }
.breadcrumb li + li::before { content: "/"; margin-right: var(--s-2); color: var(--line-strong); }
.breadcrumb a { color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; }
.breadcrumb [aria-current] { color: var(--ink); }

/* En-tête de page avec image */
.page-hero { padding-block: var(--s-6) var(--s-8); }
.page-hero-grid { display: grid; gap: var(--s-7); }
.page-hero-media .media-frame { aspect-ratio: 3 / 2; }
/* Photo produit détourée sur fond noir : le cadre prend la couleur du fond de la photo. */
.page-hero-media.is-contain .media-frame { background: #000; display: grid; place-items: center; padding: var(--s-5); }
.page-hero-media.is-contain .media-img { width: auto; height: auto; max-width: 100%; object-fit: contain; }
@media (min-width: 900px) {
  .page-hero { padding-top: var(--s-7); }
  .page-hero-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-5); align-items: end; }
  .page-hero-text { grid-column: 1 / span 6; padding-bottom: var(--s-4); }
  .page-hero-media { grid-column: 7 / -1; }
  .page-hero-media .media-frame { aspect-ratio: 5 / 4; }
}

/* Corps d’une prestation */
.service-body { border-top: 1px solid var(--line); }
.service-body-grid { display: grid; gap: var(--s-7); }
.prose--large p { font-size: 1.125rem; line-height: 1.65; }
.prose--large p:first-child { font-family: var(--font-serif); font-size: var(--fs-h3); line-height: 1.35; color: var(--ink); letter-spacing: -0.01em; }
.item-panel { align-self: start; padding: var(--s-6); background: var(--paper-2); }
.item-panel .label { margin-bottom: var(--s-4); }
.item-list li {
  display: flex; align-items: center; gap: var(--s-3);
  padding-block: var(--s-3); border-bottom: 1px solid var(--line-strong);
}
.item-list li:last-child { border-bottom: 0; }
.item-list li::before { content: ""; width: 6px; height: 6px; flex: none; background: var(--navy); transform: rotate(45deg); }
.fact-list div { padding-block: var(--s-3); border-bottom: 1px solid var(--line-strong); display: grid; gap: var(--s-1); }
.fact-list div:last-child { border-bottom: 0; }
.fact-list dt { font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
@media (min-width: 900px) {
  .service-body-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-5); }
  .service-body-grid > .prose { grid-column: 1 / span 7; }
  .service-body-grid > .item-panel { grid-column: 9 / -1; }
}

/* Questions fréquentes */
.faq { border-top: 1px solid var(--line); }
.faq-grid { display: grid; gap: var(--s-6); }
.faq-list { border-top: 1px solid var(--ink); }
.faq-item { border-bottom: 1px solid var(--line-strong); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  min-height: 64px; padding-block: var(--s-4); cursor: pointer; list-style: none;
  font-family: var(--font-serif); font-size: 1.3125rem; line-height: 1.3;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--navy); }
.faq-icon { width: 1.25rem; height: 1.25rem; color: var(--navy); transition: transform var(--dur-fast) var(--ease); }
.faq-item[open] .faq-icon { transform: rotate(180deg); }
.faq-item p { padding-bottom: var(--s-5); color: var(--ink-2); max-width: var(--measure); }
@media (min-width: 900px) {
  .faq-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-5); }
  .faq-grid > .h2 { grid-column: 1 / span 4; }
  .faq-list { grid-column: 6 / -1; }
}

/* Bandeau d’appel */
.cta-band { background: var(--paper-2); }
.cta-band-inner { display: grid; gap: var(--s-6); align-items: end; }
@media (min-width: 900px) {
  .cta-band-inner { grid-template-columns: 1fr auto; }
}

/* Autres prestations */
.other-services { padding-block: var(--s-8); }
.other-list { display: grid; margin-top: var(--s-4); border-top: 1px solid var(--line-strong); }
.other-list a {
  display: flex; align-items: center; gap: var(--s-4); min-height: 64px;
  border-bottom: 1px solid var(--line-strong); text-decoration: none;
  font-family: var(--font-serif); font-size: var(--fs-h3);
}
.other-list a span { font-family: var(--font-sans); font-size: var(--fs-small); color: var(--ink-2); width: 2.5rem; }
.other-list a .icon { margin-left: auto; color: var(--navy); transition: transform var(--dur-fast) var(--ease); }
.other-list a:hover { color: var(--navy); }
.other-list a:hover .icon { transform: translateX(4px); }
@media (min-width: 900px) {
  .other-list { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--s-5); border-top: 0; }
  .other-list a { border-top: 1px solid var(--line-strong); }
}

/* Choix du type de travail (envoi STL) */
.stl-choices { display: grid; gap: var(--s-5); }
.stl-choices-wrap { margin-top: var(--s-8); }
.stl-choice {
  display: flex; flex-direction: column; height: 100%;
  padding: var(--s-6); background: var(--surface); color: var(--ink); text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease);
}
.stl-choice:hover { background: #FBFAF7; }
.stl-choice-name { font-family: var(--font-serif); font-weight: 400; font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -0.015em; }
.stl-choice-short { margin-top: var(--s-3); color: var(--ink-2); }
.stl-choice-files-title { margin-top: var(--s-6); font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.stl-choice-files { counter-reset: f; margin-top: var(--s-3); border-top: 1px solid var(--line); }
.stl-choice-files li { counter-increment: f; display: flex; gap: var(--s-3); padding-block: var(--s-2); border-bottom: 1px solid var(--line); }
.stl-choice-files li::before { content: counter(f, decimal-leading-zero); font-size: var(--fs-small); color: var(--ink-2); font-variant-numeric: tabular-nums; padding-top: 0.1em; }
.stl-choice-go {
  margin-top: auto; padding-top: var(--s-6);
  display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 600; color: var(--navy);
}
.stl-choice-go .icon { width: 1.125rem; height: 1.125rem; transition: transform var(--dur-fast) var(--ease); }
.stl-choice:hover .stl-choice-go .icon { transform: translateX(4px); }
.section--night .stl-choice { background: var(--night-2); color: var(--night-text); }
.section--night .stl-choice:hover { background: #142C55; }
.section--night .stl-choice-short, .section--night .stl-choice-files-title, .section--night .stl-choice-files li::before { color: var(--night-muted); }
.section--night .stl-choice-files, .section--night .stl-choice-files li { border-color: rgb(163 179 201 / 0.25); }
.section--night .stl-choice-go { color: var(--ice); }
@media (min-width: 700px) {
  .stl-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =========================================================
   Formulaires
   ========================================================= */
.form { display: grid; gap: var(--s-6); }
.form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: var(--s-5); min-width: 0; }
.form .form-step > legend {
  display: flex; align-items: baseline; gap: var(--s-3); width: 100%; padding: 0; margin-bottom: var(--s-1);
  font-family: var(--font-serif); font-size: var(--fs-h3); line-height: 1.2;
}
/* Le filet est porté par la légende : sur le fieldset, il passerait derrière elle. */
.form-step + .form-step { padding-top: var(--s-4); }
.form-step + .form-step > legend { padding-top: var(--s-6); border-top: 1px solid var(--line); }
.form-step-index { font-family: var(--font-sans); font-size: var(--fs-small); color: var(--ink-2); }
.field { display: grid; gap: var(--s-2); min-width: 0; }
.field > label { font-weight: 600; font-size: 1rem; }
.field-opt { font-weight: 400; color: var(--ink-2); }
.field-hint { font-size: var(--fs-small); color: var(--ink-2); margin-top: calc(-1 * var(--s-1)); }
.field-row { display: grid; gap: var(--s-5); }
@media (min-width: 600px) {
  .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Champs : angles droits (un chanfrein rognerait la bordure). */
.input {
  width: 100%; min-height: 52px; padding: var(--s-3) var(--s-4);
  font: inherit; color: var(--ink); background: var(--surface);
  border: 0; box-shadow: inset 0 0 0 1px var(--line-strong);
  border-radius: var(--radius); appearance: none;
  transition: box-shadow var(--dur-fast) var(--ease);
}
textarea.input { min-height: 8rem; resize: vertical; line-height: 1.5; }
.input:hover { box-shadow: inset 0 0 0 1px var(--ink-2); }
.input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; box-shadow: inset 0 0 0 1px var(--blue); }
.input:user-invalid { box-shadow: inset 0 0 0 2px var(--err); }
.select-wrap { position: relative; }
.select-wrap .input { padding-right: var(--s-8); cursor: pointer; }
.select-icon { position: absolute; right: var(--s-4); top: 50%; translate: 0 -50%; pointer-events: none; color: var(--ink-2); }

/* Champ fichier : l’input transparent couvre la zone (clic et dépôt natifs). */
.file-drop {
  position: relative; display: flex; align-items: center; gap: var(--s-3);
  min-height: 64px; padding: var(--s-4);
  background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius);
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.file-drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-drop-icon { color: var(--navy); }
.file-drop-text { color: var(--ink-2); overflow-wrap: anywhere; }
.file-drop:hover, .file-drop.is-over { border-color: var(--ink-2); background-color: #FBFAF7; }
.file-drop.is-over { border-style: solid; }
.file-drop:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.file-drop.has-file { border-style: solid; border-color: var(--ok); }
.file-drop.has-file .file-drop-text { color: var(--ink); font-weight: 500; }
.file-drop.has-file .file-drop-icon { color: var(--ok); }
.file-drop.has-error { border-style: solid; border-color: var(--err); }
.file-drop.has-error .file-drop-text { color: var(--err); }

.form-submit { display: grid; gap: var(--s-4); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.form-submit .btn { justify-self: start; }
.form-privacy { font-size: var(--fs-small); color: var(--ink-2); max-width: 60ch; }
.form-privacy a { color: var(--blue); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Pages formulaire */
.stl-form-grid, .contact-page-grid { display: grid; gap: var(--s-8); }
.stl-form-intro .lead { margin-bottom: var(--s-4); }
.contact-page-grid { margin-top: var(--s-8); }
.contact-aside { display: grid; gap: var(--s-5); align-content: start; }
@media (max-width: 1023.98px) {
  .contact-aside { order: -1; }
  .contact-aside .aside-stl { display: none; } /* le même appel existe déjà sous le formulaire */
}
.aside-stl { padding: var(--s-6); background: var(--night); color: var(--night-text); display: grid; gap: var(--s-4); justify-items: start; }
.aside-stl p { color: var(--night-muted); }
.aside-stl :focus-visible { outline-color: var(--ice); }
@media (min-width: 1024px) {
  .stl-form-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-5); }
  .stl-form-intro { grid-column: 1 / span 4; position: sticky; top: 7rem; align-self: start; }
  .stl-form { grid-column: 6 / -1; }
  .contact-page-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-5); }
  .contact-form { grid-column: 1 / span 7; }
  .contact-aside { grid-column: 9 / -1; }
  .contact-aside .contact-card { padding: var(--s-6); }
}

/* Pages légales */
.legal .h1 { margin-bottom: var(--s-4); }
.legal-updated { color: var(--ink-2); font-size: var(--fs-small); }
.legal-body { margin-top: var(--s-7); max-width: 46rem; }
.legal-body section + section { margin-top: var(--s-7); padding-top: var(--s-6); border-top: 1px solid var(--line); }
.legal-body .h3 { margin-bottom: var(--s-4); }

/* Cibles tactiles de 44 px minimum (liens hors phrase) */
.contact-card dd a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-contact a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-nav li a { min-height: 44px; }

/* =========================================================
   Galerie des réalisations
   ========================================================= */
.gallery-filters { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-block: var(--s-7) var(--s-6); }
.gallery-filters a {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: var(--s-2) var(--s-4);
  border: 1px solid var(--line-strong); text-decoration: none; color: var(--ink); font-weight: 500;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.gallery-filters a span { font-size: var(--fs-small); color: var(--ink-2); }
.gallery-filters a:hover { border-color: var(--ink); }
.gallery-filters a[aria-current="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.gallery-filters a[aria-current="true"] span { color: var(--night-muted); }

.gallery-grid { display: grid; gap: var(--s-7) var(--s-5); grid-template-columns: 1fr; }
.gallery-item[hidden] { display: none; }
.gallery-link { display: block; overflow: hidden; background: var(--paper-2); aspect-ratio: 4 / 3; }
.gallery-link img { width: 100%; height: 100%; object-fit: cover; transition: scale 900ms var(--ease); }
.gallery-link:hover img { scale: 1.04; }
.gallery-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.gallery-caption { margin-top: var(--s-3); }
.gallery-cat { font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.gallery-title { margin-top: var(--s-1); font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.3; }
.gallery-empty, .gallery-empty-cat { margin-top: var(--s-7); padding: var(--s-7) var(--s-5); background: var(--surface); border: 1px dashed var(--line-strong); color: var(--ink-2); }
.gallery-empty .actions { margin-top: var(--s-5); }
@media (min-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Visionneuse */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--night); color: var(--night-text);
}
.lightbox::backdrop { background: rgb(8 23 47 / 0.6); }
html:has(dialog.lightbox[open]) { overflow: hidden; }
.lightbox-inner { display: grid; grid-template-rows: auto 1fr auto; height: 100%; }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) var(--gutter); }
.lightbox-counter { font-size: var(--fs-small); color: var(--night-muted); font-variant-numeric: tabular-nums; }
.lightbox-stage { position: relative; min-height: 0; }
/* Photo centrée et contenue dans l’espace restant entre la barre et la légende. */
.lightbox-stage img { position: absolute; inset: 0; margin: auto; width: auto; height: auto; max-width: calc(100% - 2 * var(--gutter)); max-height: 100%; object-fit: contain; }
.lightbox-btn {
  display: grid; place-items: center; width: 48px; height: 48px; color: var(--night-text);
  border: 1px solid rgb(233 238 245 / 0.25); background: rgb(8 23 47 / 0.6);
}
.lightbox-btn:hover { border-color: var(--ice); color: var(--ice); }
.lightbox-btn:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; translate: 0 -50%; }
.lightbox-prev { left: var(--gutter); }
.lightbox-next { right: var(--gutter); }
.lightbox-prev .icon { transform: rotate(180deg); }
.lightbox-caption { padding: var(--s-4) var(--gutter) var(--s-5); max-width: 60rem; }
.lightbox-caption .gallery-cat { color: var(--night-muted); }
.lightbox-caption .gallery-title { color: var(--night-text); }
.lightbox-caption p + p { margin-top: var(--s-1); }
.lightbox-desc { color: var(--night-muted); font-size: var(--fs-small); }
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation: lightbox-in 220ms var(--ease); }
  @keyframes lightbox-in { from { opacity: 0; } }
}

/* Aperçu sur l'accueil */
.home-gallery-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-6); }
.home-gallery-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(70vw, 22rem); gap: var(--s-4);
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--s-3);
  scrollbar-width: thin;
}
.home-gallery-strip li { scroll-snap-align: start; }
.home-gallery-strip a { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-2); }
.home-gallery-strip img { width: 100%; height: 100%; object-fit: cover; transition: scale 900ms var(--ease); }
.home-gallery-strip a:hover img { scale: 1.04; }
@media (min-width: 900px) {
  .home-gallery-strip { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; padding-bottom: 0; }
  .home-gallery-strip li:nth-child(n + 4) { display: none; }
}

/* =========================================================
   Formulaires : erreurs, progression, confirmation
   ========================================================= */
.form-errors { padding: var(--s-5); background: var(--surface); border-left: 3px solid var(--err); }
.form-errors:focus { outline: 2px solid var(--err); outline-offset: 2px; }
.form-errors-title { font-weight: 600; color: var(--err); }
.form-errors ul { margin-top: var(--s-3); display: grid; gap: var(--s-2); }
.form-errors li { padding-left: var(--s-4); position: relative; }
.form-errors li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 6px; height: 6px; background: var(--err); transform: rotate(45deg); }
.form-errors a { color: var(--ink); }
.form-errors-note { margin-top: var(--s-4); font-size: var(--fs-small); color: var(--ink-2); }
.field-error { display: flex; align-items: center; gap: var(--s-2); color: var(--err); font-size: var(--fs-small); font-weight: 500; }
.field-error .icon { width: 1rem; height: 1rem; }
.input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--err); }

.upload-progress { display: grid; gap: var(--s-2); }
.upload-progress-bar { height: 8px; background: var(--paper-2); overflow: hidden; }
.upload-progress-bar span { display: block; height: 100%; width: 0; background: var(--navy); transition: width 200ms linear; }
.upload-progress-text { font-size: var(--fs-small); color: var(--ink-2); font-variant-numeric: tabular-nums; }

.stl-success { align-self: start; padding: var(--s-7) var(--s-6); background: var(--surface); display: grid; gap: var(--s-4); }
.stl-success:focus { outline: none; }
.stl-success .label { color: var(--ok); }
.stl-success-text { font-family: var(--font-serif); font-size: var(--fs-h3); line-height: 1.3; }
.stl-success-ref { display: grid; gap: var(--s-1); padding: var(--s-4) var(--s-5); background: var(--paper-2); }
.stl-success-ref span { font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.stl-success-ref strong { font-family: var(--font-serif); font-weight: 400; font-size: var(--fs-h2); line-height: 1.1; letter-spacing: 0.01em; }
.stl-success-keep { color: var(--ink-2); }
@media (min-width: 1024px) {
  .stl-success { grid-column: 6 / -1; }
}

/* L’attribut hidden doit primer sur les display des composants. */
[hidden] { display: none !important; }

@media (min-width: 1024px) {
  .contact-success { grid-column: 1 / span 7; }
}

/* =========================================================
   Envoi STL : schéma dentaire, choix, champs du travail
   ========================================================= */
@media (min-width: 1100px) {
  .stl-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.stl-choice-note { margin-top: var(--s-3); font-size: var(--fs-small); color: var(--ink-2); }
.section--night .stl-choice-note { color: var(--night-muted); }

.field-label { font-weight: 600; font-size: 1rem; }
.field--short { max-width: 16rem; }
.file-group { display: grid; gap: var(--s-5); }

/* Choix (boutons radio) : cible de 44 px, bouton natif conservé */
.choice-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice-field > legend { padding: 0; margin-bottom: var(--s-2); }
.choices { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.choice {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-4);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); border-radius: var(--radius);
  cursor: pointer; transition: box-shadow var(--dur-fast) var(--ease);
}
.choice input { accent-color: var(--navy); width: 1.125rem; height: 1.125rem; margin: 0; }
.choice:hover { box-shadow: inset 0 0 0 1px var(--ink-2); }
.choice:has(input:checked) { box-shadow: inset 0 0 0 2px var(--navy); font-weight: 600; }
.choice:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Schéma dentaire (FDI) : 100 × 118 unités, 1 unité = 1 % de la largeur (cqi) */
.tooth-field { gap: var(--s-3); }
.tooth-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.tooth-chart {
  container-type: inline-size;
  position: relative; width: 100%; max-width: 26rem; margin: var(--s-2) auto 0;
  aspect-ratio: 100 / 118;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.tooth { position: absolute; left: calc(var(--x) * 1cqi); top: calc(var(--y) * 1cqi); width: 0; height: 0; cursor: pointer; }
.tooth input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.tooth::before, .tooth-shape, .tooth-num { position: absolute; left: 0; top: 0; }
/* Zone de clic : la dent et son numéro, dans l'axe de la dent */
.tooth::before {
  content: ""; width: calc((var(--w) + 0.4) * 1cqi); height: calc((var(--d) + 9) * 1cqi);
  translate: -50% -50%; rotate: var(--r);
}
.tooth-shape { max-width: none; width: calc(var(--w) * 1cqi); height: calc(var(--d) * 1cqi); translate: -50% -50%; rotate: var(--r); overflow: visible; pointer-events: none; }
/* Les formes sont des <use> : leurs couleurs passent par des variables héritées. */
.tooth { --t-fill: var(--surface); --t-stroke: var(--ink-2); --t-sw: 1.25; --t-groove: var(--line-strong); }
.t-body { fill: var(--t-fill); stroke: var(--t-stroke); stroke-width: var(--t-sw); vector-effect: non-scaling-stroke; }
.t-groove { fill: none; stroke: var(--t-groove); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.tooth-num {
  translate: calc(var(--nx) * 1cqi - 50%) calc(var(--ny) * 1cqi - 50%);
  padding: 0.125rem 0.1875rem; border-radius: var(--radius);
  font-size: clamp(0.6875rem, 3.3cqi, 0.875rem); line-height: 1; font-weight: 500; color: var(--ink-2);
  font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none;
}
.tooth:hover { --t-fill: var(--paper-2); --t-stroke: var(--ink); }
.tooth:hover .tooth-num { color: var(--ink); }
.tooth:has(input:checked) { --t-fill: var(--navy); --t-stroke: var(--navy); --t-groove: var(--ice); }
.tooth:has(input:checked) .tooth-num { color: var(--navy); font-weight: 700; }
.tooth:has(input:focus-visible) { --t-stroke: var(--blue); --t-sw: 3; }
.tooth:has(input:focus-visible) .tooth-num { outline: 2px solid var(--blue); outline-offset: 1px; }
.tooth-field:has(.field-error) .tooth:not(:has(input:checked)) { --t-stroke: var(--err); }
.tooth-mark {
  position: absolute; translate: -50% -50%;
  font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
  pointer-events: none;
}
.tooth-mark--haut { left: 50cqi; top: 33cqi; }
.tooth-mark--bas { left: 50cqi; top: 86cqi; }
.tooth-mark--droite, .tooth-mark--gauche { top: 59cqi; translate: 0 -50%; letter-spacing: 0.04em; text-transform: none; font-size: clamp(0.75rem, 3.4cqi, 0.9375rem); }
.tooth-mark--droite { left: 0; }
.tooth-mark--gauche { right: 0; }
.tooth-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4); }
.tooth-summary { font-size: var(--fs-small); color: var(--ink-2); }
.tooth-summary strong { color: var(--ink); font-weight: 600; }
.tooth-clear { min-height: 44px; padding: 0; border: 0; background: none; font: inherit; font-size: var(--fs-small); cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em; }
@media (forced-colors: active) {
  .tooth:has(input:checked) { --t-fill: Highlight; --t-stroke: Highlight; }
}
/* Schéma dentaire : positions (généré par app/cli/tooth-chart-css.php) */
.tooth[data-n="11"] { --x: 45.88; --y: 10.30; --w: 7.80; --d: 6.35; --r: -8.3deg; --nx: -0.97; --ny: -6.71; }
.tooth[data-n="12"] { --x: 38.73; --y: 12.28; --w: 6.17; --d: 5.81; --r: -22.5deg; --nx: -2.49; --ny: -6.01; }
.tooth[data-n="13"] { --x: 32.60; --y: 15.64; --w: 6.90; --d: 7.26; --r: -34.6deg; --nx: -4.11; --ny: -5.95; }
.tooth[data-n="14"] { --x: 27.21; --y: 20.18; --w: 6.35; --d: 7.62; --r: -45.4deg; --nx: -5.28; --ny: -5.20; }
.tooth[data-n="15"] { --x: 22.95; --y: 25.25; --w: 5.99; --d: 7.62; --r: -54.3deg; --nx: -6.02; --ny: -4.33; }
.tooth[data-n="16"] { --x: 18.86; --y: 32.09; --w: 9.07; --d: 9.44; --r: -63.7deg; --nx: -7.46; --ny: -3.69; }
.tooth[data-n="17"] { --x: 15.49; --y: 40.70; --w: 8.53; --d: 9.07; --r: -73.4deg; --nx: -7.80; --ny: -2.32; }
.tooth[data-n="18"] { --x: 13.64; --y: 49.11; --w: 7.80; --d: 8.53; --r: -81.7deg; --nx: -7.78; --ny: -1.13; }
.tooth[data-n="21"] { --x: 54.12; --y: 10.30; --w: 7.80; --d: 6.35; --r: 8.3deg; --nx: 0.97; --ny: -6.71; }
.tooth[data-n="22"] { --x: 61.27; --y: 12.28; --w: 6.17; --d: 5.81; --r: 22.5deg; --nx: 2.49; --ny: -6.01; }
.tooth[data-n="23"] { --x: 67.40; --y: 15.64; --w: 6.90; --d: 7.26; --r: 34.6deg; --nx: 4.11; --ny: -5.95; }
.tooth[data-n="24"] { --x: 72.79; --y: 20.18; --w: 6.35; --d: 7.62; --r: 45.4deg; --nx: 5.28; --ny: -5.20; }
.tooth[data-n="25"] { --x: 77.05; --y: 25.25; --w: 5.99; --d: 7.62; --r: 54.3deg; --nx: 6.02; --ny: -4.33; }
.tooth[data-n="26"] { --x: 81.14; --y: 32.09; --w: 9.07; --d: 9.44; --r: 63.7deg; --nx: 7.46; --ny: -3.69; }
.tooth[data-n="27"] { --x: 84.51; --y: 40.70; --w: 8.53; --d: 9.07; --r: 73.4deg; --nx: 7.80; --ny: -2.32; }
.tooth[data-n="28"] { --x: 86.36; --y: 49.11; --w: 7.80; --d: 8.53; --r: 81.7deg; --nx: 7.78; --ny: -1.13; }
.tooth[data-n="41"] { --x: 47.15; --y: 107.86; --w: 5.23; --d: 5.61; --r: -174.3deg; --nx: -0.64; --ny: 6.37; }
.tooth[data-n="42"] { --x: 41.38; --y: 106.68; --w: 5.61; --d: 5.79; --r: -162.7deg; --nx: -1.93; --ny: 6.21; }
.tooth[data-n="43"] { --x: 35.39; --y: 104.10; --w: 6.54; --d: 6.92; --r: -150.9deg; --nx: -3.44; --ny: 6.16; }
.tooth[data-n="44"] { --x: 29.65; --y: 100.08; --w: 6.54; --d: 7.10; --r: -139.5deg; --nx: -4.65; --ny: 5.44; }
.tooth[data-n="45"] { --x: 24.75; --y: 95.09; --w: 6.54; --d: 7.29; --r: -129.5deg; --nx: -5.59; --ny: 4.61; }
.tooth[data-n="46"] { --x: 19.89; --y: 87.90; --w: 9.91; --d: 9.35; --r: -118.8deg; --nx: -7.25; --ny: 3.99; }
.tooth[data-n="47"] { --x: 15.90; --y: 78.64; --w: 9.35; --d: 8.97; --r: -108.0deg; --nx: -7.69; --ny: 2.50; }
.tooth[data-n="48"] { --x: 13.71; --y: 69.36; --w: 8.79; --d: 8.60; --r: -98.7deg; --nx: -7.81; --ny: 1.20; }
.tooth[data-n="31"] { --x: 52.85; --y: 107.86; --w: 5.23; --d: 5.61; --r: 174.3deg; --nx: 0.64; --ny: 6.37; }
.tooth[data-n="32"] { --x: 58.62; --y: 106.68; --w: 5.61; --d: 5.79; --r: 162.7deg; --nx: 1.93; --ny: 6.21; }
.tooth[data-n="33"] { --x: 64.61; --y: 104.10; --w: 6.54; --d: 6.92; --r: 150.9deg; --nx: 3.44; --ny: 6.16; }
.tooth[data-n="34"] { --x: 70.35; --y: 100.08; --w: 6.54; --d: 7.10; --r: 139.5deg; --nx: 4.65; --ny: 5.44; }
.tooth[data-n="35"] { --x: 75.25; --y: 95.09; --w: 6.54; --d: 7.29; --r: 129.5deg; --nx: 5.59; --ny: 4.61; }
.tooth[data-n="36"] { --x: 80.11; --y: 87.90; --w: 9.91; --d: 9.35; --r: 118.8deg; --nx: 7.25; --ny: 3.99; }
.tooth[data-n="37"] { --x: 84.10; --y: 78.64; --w: 9.35; --d: 8.97; --r: 108.0deg; --nx: 7.69; --ny: 2.50; }
.tooth[data-n="38"] { --x: 86.29; --y: 69.36; --w: 8.79; --d: 8.60; --r: 98.7deg; --nx: 7.81; --ny: 1.20; }
/* fin des positions */

/* Qui sommes-nous : la personne */
.item-panel-sub { margin-top: var(--s-6); }
.person { border-top: 1px solid var(--line); }
.person + .service-body { padding-top: 0; }
.person-grid { display: grid; gap: var(--s-6); }
.person-aside { display: grid; gap: var(--s-6); align-content: start; }
.person-portrait { aspect-ratio: 4 / 5; max-width: 22rem; overflow: hidden; background: var(--paper-2); }
.person-portrait .media-img { width: 100%; height: 100%; object-fit: cover; }
.person-years { display: grid; gap: var(--s-2); align-content: start; }
.person-years-num { font-family: var(--font-serif); font-size: clamp(4rem, 3rem + 5vw, 7.5rem); line-height: 0.9; letter-spacing: -0.03em; color: var(--navy); }
.person-body .label { margin-bottom: var(--s-3); }
.person-role { margin-top: var(--s-2); font-weight: 600; color: var(--ink-2); }
.person-text { margin-top: var(--s-5); max-width: var(--measure); font-size: var(--fs-lead); line-height: 1.5; }
@media (min-width: 900px) {
  .person-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-5); align-items: start; }
  .person-aside { grid-column: 1 / span 4; }
  .person-body { grid-column: 6 / -1; }
}
.form .choice-field { gap: var(--s-2); }
.field > .input + .field-hint, .field > .select-wrap + .field-hint, .field > datalist + .field-hint { margin-top: 0; }

/* Avis de fermeture du laboratoire (saisi dans l'admin) */
.closure-notice { display: flex; align-items: flex-start; gap: var(--s-3); max-width: 46rem; margin-top: var(--s-5); padding: var(--s-3) var(--s-4); background: #FBF3E2; border-left: 3px solid var(--warn); color: var(--ink); font-weight: 500; }
.closure-notice .icon { flex: none; width: 1.25rem; height: 1.25rem; margin-top: 0.15em; color: var(--warn); }
