/* Centre dentaire La Prairie
   Editorial layout: white page, dark text, hairline rules, red reserved for the brand and primary action. */
:root {
  --paper: #ffffff;
  --ink: #161312;
  --text: #2b2624;
  --text-2: #4d4643;
  --rule: #e3ddd9;
  --rule-strong: #161312;
  --red: #c8141c;
  --red-dark: #9e0f15;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Base */
*, *::before, *::after { box-sizing: border-box }
html { scroll-behavior: smooth; scroll-padding-top: 6rem }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden }
button, input, select { font: inherit; color: inherit }
button { cursor: pointer }
button:disabled { cursor: wait; opacity: .7 }
a { color: inherit; text-decoration: none }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px }
img { display: block; max-width: 100%; height: auto; object-fit: cover }
figure { margin: 0 }
h1, h2, h3, p { margin: 0 }
h1, h2 { color: var(--ink); font-weight: 500; text-wrap: balance }
h1 em, h2 em { font-style: normal }
h1 { font-size: clamp(2.75rem, 5.6vw, 4.75rem); line-height: 1.04; letter-spacing: -.035em }
h2 { max-width: 15em; font-size: clamp(2rem, 3.4vw, 2.875rem); line-height: 1.1; letter-spacing: -.03em }
h3 { color: var(--ink); font-size: 1.25rem; font-weight: 600; line-height: 1.3; letter-spacing: -.01em }
.container { width: min(75rem, 100% - 5rem); margin-inline: auto }
.skip-link { position: fixed; top: -80px; left: 0.75rem; z-index: 100; padding: 0.625rem 1rem; background: var(--ink); color: #fff }
.skip-link:focus { top: 0.75rem }

/* Buttons and links */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9375rem 1.5rem;
  border: 1px solid var(--red);
  border-radius: 3px;
  background: var(--red);
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.button:hover { background: var(--red-dark); border-color: var(--red-dark) }
.button-small { padding: 0.6875rem 1.125rem; font-size: 1rem }
.button-secondary { background: transparent; border-color: var(--ink); color: var(--ink) }
.button-secondary:hover { background: var(--ink); border-color: var(--ink); color: #fff }
.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3125rem;
  text-decoration-color: #b9b0ab;
  transition: color .15s, text-decoration-color .15s;
}
.link:hover { color: var(--red); text-decoration-color: currentColor }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 2.5rem }

/* Header */
.header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--rule); background: var(--paper) }
.header-inner { display: flex; align-items: center; gap: 2.5rem; height: 5rem }
.brand { display: inline-flex; align-items: center; gap: 0.75rem; flex-shrink: 0 }
.brand-mark { display: block; width: 2.375rem; height: 2.375rem; color: var(--red) }
.brand-mark svg { display: block; width: 100%; height: 100% }
.brand-type { color: var(--text-2); font-size: 0.8125rem; line-height: 1.1 }
.brand-type strong { display: block; margin-top: 3px; color: var(--ink); font-size: 1.125rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase }
.header nav { display: flex; gap: 1.75rem }
.header nav a { color: var(--ink); font-size: 1rem; font-weight: 500; transition: color .15s }
.header nav a:hover { color: var(--red) }
.header-actions { display: flex; align-items: center; gap: 1.5rem; margin-left: auto }
.header-phone { color: var(--ink); font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap }
.header-phone:hover { color: var(--red) }
.language { color: var(--ink); font-size: 0.9375rem; font-weight: 600 }
.language:hover { color: var(--red) }
.menu-toggle { display: none }

/* Hero */
.hero { padding-top: 4.5rem }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 4.5rem; align-items: center }
.kicker { margin-bottom: 1.5rem; color: var(--text-2); font-size: 1.0625rem; font-weight: 500 }
.hero-intro { max-width: 30em; margin-top: 1.75rem; color: var(--text); font-size: 1.3125rem; line-height: 1.55 }
.hero-figure img { width: 100%; aspect-ratio: 4 / 5; object-position: center 36%; background: #eee8e4 }
.hero-figure figcaption, .tech-figure figcaption { margin-top: 0.75rem; color: var(--text-2); font-size: 0.9375rem }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; margin-top: 5rem; padding-block: 2rem 0.5rem; border-top: 1px solid var(--rule-strong) }
.fact-title { margin-bottom: 0.375rem; color: var(--ink); font-size: 1.125rem; font-weight: 600 }
.facts p:not(.fact-title) { color: var(--text-2); font-size: 1.0625rem }

/* Sections */
.section { padding-top: 6.5rem }
.split { display: grid; grid-template-columns: 1fr 3fr; gap: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--rule-strong) }
.split-label { padding-top: 0.375rem }
.label { position: sticky; top: 7rem; color: var(--ink); font-size: 1rem; font-weight: 600 }
.lede { max-width: 34em; margin-top: 1.5rem; color: var(--text); font-size: 1.25rem; line-height: 1.55 }

/* Services */
.tabs { display: flex; flex-wrap: wrap; gap: 0 1.75rem; margin-top: 3rem; border-bottom: 1px solid var(--rule) }
.filter { margin-bottom: -1px; padding: 0.75rem 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-2); font-size: 1rem; font-weight: 500; transition: color .15s, border-color .15s }
.filter:hover { color: var(--ink) }
.filter.active { border-bottom-color: var(--red); color: var(--ink) }
.service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) 1.375rem;
  gap: 2rem;
  align-items: baseline;
  width: 100%;
  padding: 1.5rem 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: none;
  text-align: left;
}
.service-name { color: var(--ink); font-size: 1.3125rem; font-weight: 500; letter-spacing: -.01em; line-height: 1.3; transition: color .15s }
.service-desc { color: var(--text-2); font-size: 1.0625rem; line-height: 1.5 }
.service-row svg { width: 1.375rem; height: 1.375rem; align-self: center; color: var(--ink); transition: transform .2s, color .15s }
.service-row:hover .service-name, .service-row:hover svg { color: var(--red) }
.service-row:hover svg { transform: translateX(0.25rem) }
.view-all { display: inline-flex; align-items: center; gap: 0.625rem; margin-top: 1.75rem; font-size: 1.0625rem }
.view-all span { font-size: 1.25rem; font-weight: 400; line-height: 1 }
.note { max-width: 40em; margin-top: 3rem; padding-left: 1.25rem; border-left: 3px solid var(--red); color: var(--text); font-size: 1.125rem }
.note strong { color: var(--ink); font-weight: 600 }
.note a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 0.25rem; white-space: nowrap }
.note a:hover { color: var(--red) }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3.5rem }
.dentist-photo { display: block; width: 100%; padding: 0; border: 0; background: #eee8e4; overflow: hidden }
.dentist-photo img { width: 100%; aspect-ratio: 4 / 5; object-position: center 25%; transition: transform .5s }
.dentist-photo:hover img { transform: scale(1.03) }
.dentist h3 { margin-top: 1.25rem; font-size: 1.3125rem }
.dentist h3 span { color: var(--text-2); font-weight: 400 }
.dentist > p { margin-top: 0.25rem; color: var(--text-2); font-size: 1rem; line-height: 1.5 }
.dentist > p.availability { margin-top: 0.5rem; color: var(--text); font-style: italic }
.dentist .link { margin-top: 0.875rem; font-size: 1rem }

/* Technology */
.tech-figure { margin-top: 3rem }
.tech-figure img { width: 100%; aspect-ratio: 16 / 8; object-position: 56% 40%; background: #eee8e4 }
.tech-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; margin: 3rem 0 0; padding: 0; list-style: none; counter-reset: tech }
.tech-list li { padding-top: 1.25rem; border-top: 1px solid var(--rule); counter-increment: tech }
.tech-list li::before { content: '0' counter(tech); display: block; margin-bottom: 0.75rem; color: var(--red); font-size: 0.9375rem; font-weight: 600; font-variant-numeric: tabular-nums }
.tech-list p { margin-top: 0.5rem; color: var(--text-2); font-size: 1.0625rem }

/* FAQ */
.faq-list { margin-top: 3rem; border-top: 1px solid var(--rule) }
.faq-list details { border-bottom: 1px solid var(--rule) }
summary { cursor: pointer; list-style: none }
summary::-webkit-details-marker { display: none }
.faq-list summary { display: flex; align-items: baseline; justify-content: space-between; gap: 2rem; padding: 1.5rem 0; color: var(--ink); font-size: 1.25rem; font-weight: 500; line-height: 1.4; transition: color .15s }
.faq-list summary::after { content: '+'; flex-shrink: 0; width: 1.25rem; color: var(--red); font-size: 1.625rem; font-weight: 300; line-height: 1; text-align: center }
.faq-list details[open] summary::after { content: '−' }
.faq-list summary:hover { color: var(--red) }
.faq-list details p { max-width: 38em; padding-bottom: 1.75rem; color: var(--text); font-size: 1.125rem; line-height: 1.65 }
.resource { margin-top: 2rem; color: var(--text-2); font-size: 1.0625rem }
.resource a { color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 0.25rem }
.resource a:hover { color: var(--red) }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; margin-top: 4rem; padding-top: 1.75rem; border-top: 1px solid var(--rule) }
.contact-grid h3 { margin-bottom: 0.875rem; font-size: 1.0625rem }
.contact-grid p { color: var(--text); font-size: 1.0625rem }
.contact-grid p + .link, .contact-grid p + p { margin-top: 0.625rem }
.contact-grid .link { display: inline-block; font-size: 1.0625rem }
.contact-hours dl { margin: 0; font-size: 1.0625rem }
.contact-hours dl > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4375rem 0; border-bottom: 1px solid var(--rule) }
.contact-hours dl > div:first-child { padding-top: 0 }
.contact-hours dt { color: var(--text) }
.contact-hours dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums }
.contact-hours .today dt, .contact-hours .today dd { color: var(--ink); font-weight: 600 }
.contact-hours .today dt::after { content: ''; display: inline-block; width: 0.4375rem; height: 0.4375rem; margin-left: 0.5rem; border-radius: 50%; background: var(--red); vertical-align: middle }
.contact-phone { color: var(--ink); font-size: 1.75rem; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums }
.contact-phone:hover { color: var(--red) }
.socials { display: flex; gap: 1.5rem }

/* Footer */
.footer { margin-top: 7.5rem; border-top: 1px solid var(--rule) }
.footer-inner { display: flex; align-items: center; gap: 2rem; padding-block: 2rem }
.footer-inner p { color: var(--text-2); font-size: 0.9375rem }
.privacy-link { margin-left: auto; font-size: 0.9375rem }
.mobile-booking { display: none }

/* Dialogs */
dialog { width: min(35rem, 100% - 2rem); max-height: 92dvh; padding: 2.75rem; border: 0; border-radius: 0.25rem; background: var(--paper); color: var(--text); box-shadow: 0 1.875rem 5rem rgb(22 19 18 / .3) }
dialog::backdrop { background: rgb(22 19 18 / .6) }
dialog h2 { margin-bottom: 0.75rem; padding-right: 2rem; font-size: 2.125rem }
dialog .eyebrow { margin-bottom: 0.625rem; color: var(--text-2); font-size: 0.9375rem; font-weight: 500 }
dialog p { color: var(--text); font-size: 1.0625rem; line-height: 1.6 }
dialog .dialog-close { position: absolute; top: 0.875rem; right: 0.875rem; width: 2.5rem; height: 2.5rem; border: 0; background: none; color: var(--ink); font-size: 1.875rem; font-weight: 300; line-height: 1 }
dialog .dialog-close:hover { color: var(--red) }
#appointment-form { margin-top: 1.75rem }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.125rem 1rem }
.form-grid label { display: block; min-width: 0; color: var(--ink); font-size: 0.9375rem; font-weight: 600 }
.form-grid label > span { color: var(--red) }
.form-grid .full { grid-column: 1 / -1 }
input, select {
  display: block;
  width: 100%;
  min-width: 0;
  height: 3.125rem;
  margin-top: 0.375rem;
  padding: 0 0.875rem;
  border: 1px solid #b9b0ab;
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 400;
}
select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23161312' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  background-size: 1.125rem;
}
input:focus, select:focus { outline: 2px solid var(--red); outline-offset: -1px; border-color: var(--red) }
.hp { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important }
.form-privacy { margin-top: 1.25rem; color: var(--text-2) !important; font-size: 0.9375rem !important; line-height: 1.5 !important }
.form-submit { width: 100%; margin-top: 1.25rem }
.form-note { margin-top: 0.625rem; color: var(--text-2) !important; font-size: 0.9375rem !important; text-align: center }
.form-error { margin-top: 0.875rem; padding-left: 0.875rem; border-left: 3px solid var(--red); color: var(--red-dark) !important; font-size: 1rem !important }
#appointment-success { padding: 1rem 0 0.25rem }
#appointment-success .button { margin-top: 1.75rem }
.info-photo { width: 100%; height: 18.75rem; margin-bottom: 1.5rem; object-position: center 25%; background: #eee8e4 }
.info-role { margin: -4px 0 1rem; color: var(--text-2) !important; font-size: 1rem !important; font-weight: 500 }
.info-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 1.75rem }
.info-actions a { color: var(--ink); font-size: 1rem; font-weight: 500; text-decoration: underline; text-underline-offset: 0.25rem }
.info-actions a:hover { color: var(--red) }
[hidden] { display: none !important }

/* Large screens: scale the whole layout with the root font size */
@media (min-width: 1600px) { html { font-size: 18px } }
@media (min-width: 1920px) { html { font-size: 20px } }
@media (min-width: 2400px) { html { font-size: 23px } }
@media (min-width: 3200px) { html { font-size: 30px } }

/* Medium screens */
@media (max-width: 1100px) {
  .container { width: min(75rem, 100% - 3.5rem) }
  .header-inner { gap: 1.75rem }
  .header nav { gap: 1.25rem }
  .header-phone { display: none }
  .hero-grid { gap: 3rem }
  .split { grid-template-columns: 1fr 4fr; gap: 2rem }
}

/* Tablet: collapsed navigation, single column */
@media (max-width: 900px) {
  .header-inner { height: 4.5rem }
  .menu-toggle { display: flex; flex-direction: column; justify-content: center; gap: 0.4375rem; width: 2rem; height: 2.5rem; padding: 0; border: 0; background: none }
  .menu-toggle span { display: block; width: 1.5rem; height: 2px; background: var(--ink); transition: transform .2s }
  .menu-toggle[aria-expanded=true] span:first-child { transform: translateY(0.2812rem) rotate(45deg) }
  .menu-toggle[aria-expanded=true] span:last-child { transform: translateY(-4.5px) rotate(-45deg) }
  .header nav { position: absolute; top: 100%; right: 0; left: 0; display: none; padding: 0 1.75rem 1rem; border-bottom: 1px solid var(--rule); background: var(--paper) }
  .header nav.open { display: flex; flex-direction: column; gap: 0 }
  .header nav a { padding: 1rem 0; border-bottom: 1px solid var(--rule); font-size: 1.1875rem }
  .header nav a:last-child { border-bottom: 0 }
  .hero { padding-top: 3rem }
  .hero-grid { grid-template-columns: 1fr; gap: 3rem }
  .hero-figure img { aspect-ratio: 5 / 4 }
  .facts { grid-template-columns: 1fr; gap: 1.5rem; margin-top: 3.5rem }
  .section { padding-top: 5.5rem }
  .split { grid-template-columns: 1fr; gap: 1.25rem }
  .label { position: static }
  .team-grid { grid-template-columns: repeat(2, 1fr) }
  .tech-list { grid-template-columns: 1fr; gap: 0 }
  .tech-list li { padding-block: 1.25rem 0.25rem }
  .contact-grid { grid-template-columns: 1fr 1fr }
}

/* Phone */
@media (max-width: 640px) {
  html { scroll-padding-top: 5rem }
  body { font-size: 1.0625rem }
  .container { width: calc(100% - 2.5rem) }
  .header-inner { height: 4rem; gap: 1.25rem }
  .header .button-small { display: none }
  .header nav { padding-inline: 1.25rem }
  .brand-mark { width: 2.125rem; height: 2.125rem }
  .brand-type strong { font-size: 1rem }
  .hero { padding-top: 2.25rem }
  h1 { font-size: clamp(2.5rem, 11vw, 3.25rem) }
  .kicker { margin-bottom: 1rem; font-size: 1rem }
  .hero-intro { font-size: 1.1875rem }
  .actions { margin-top: 2rem }
  .actions .button { width: 100% }
  .hero-figure img { aspect-ratio: 4 / 5 }
  .section { padding-top: 4.5rem }
  h2 { font-size: clamp(1.875rem, 8.5vw, 2.375rem) }
  .lede { font-size: 1.125rem }
  .tabs { flex-wrap: nowrap; overflow-x: auto; margin-right: -1.25rem; padding-right: 1.25rem; scrollbar-width: none }
  .tabs::-webkit-scrollbar { display: none }
  .filter { flex-shrink: 0 }
  .service-row { grid-template-columns: minmax(0, 1fr) 1.375rem; gap: 0.25rem 1rem; padding: 1.25rem 0 }
  .service-desc { grid-row: 2; grid-column: 1 }
  .service-row svg { grid-row: 1 / span 2; grid-column: 2 }
  .service-name { font-size: 1.25rem }
  .service-desc { font-size: 1rem }
  .team-grid { grid-template-columns: 1fr; gap: 3rem }
  .tech-figure img { aspect-ratio: 4 / 3 }
  .faq-list summary { font-size: 1.125rem; gap: 1.25rem }
  .faq-list details p { font-size: 1.0625rem }
  .contact-grid { grid-template-columns: 1fr; gap: 2.25rem; margin-top: 3rem }
  .footer { margin-top: 5.5rem }
  .footer-inner { flex-wrap: wrap; gap: 1rem 1.5rem; padding-bottom: 6.5rem }
  .footer-inner p { order: 3; width: 100% }
  .mobile-booking { position: fixed; z-index: 25; right: 0; bottom: 0; left: 0; display: flex; gap: 0.625rem; padding: 0.75rem 1.25rem max(0.75rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); background: var(--paper) }
  .mobile-booking .button { flex: 1; padding-inline: 0.75rem }
  .mobile-booking .button-secondary { flex: 0 0 auto }
  dialog { padding: 2rem 1.25rem 1.5rem }
  dialog h2 { font-size: 1.75rem }
  .form-grid label:not(.full) { grid-column: 1 / -1 }
  .info-photo { height: 15rem }
}

@media (max-width: 380px) {
  .container { width: calc(100% - 2rem) }
  .brand-type { display: none }
  .header-actions { gap: 1rem }
}

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