/*
 * Les Mascottes — feuille de style publique.
 * Les composants sont regroupés par zone d'interface, sans dépendance externe.
 */

:root {
  --lm-primary: #2a5f73;
  --lm-primary-dark: #1c4758;
  --lm-secondary: #4a8ba8;
  --lm-ink: #20323b;
  --lm-muted: #61717a;
  --lm-surface: #f5f8fa;
  --lm-white: #fff;
  --lm-border: #dce6ea;
  --lm-success: #1f8b54;
  --lm-warning: #9b6200;
  --lm-danger: #b42336;
  --lm-radius: 0.85rem;
  --lm-radius-large: 1.25rem;
  --lm-shadow: 0 0.5rem 1.8rem rgb(22 49 61 / 10%);
  --lm-shadow-raised: 0 1rem 2.8rem rgb(22 49 61 / 18%);
  --lm-transition: 180ms ease;
  --lm-header-height: 5.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--lm-header-height) + 1.25rem);
}

body {
  min-width: 20rem;
  margin: 0;
  overflow-x: hidden;
  color: var(--lm-ink);
  background: var(--lm-white);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

body:has(dialog[open]) {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--lm-primary);
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--lm-primary-dark);
}

:focus-visible {
  outline: 3px solid #e9a900;
  outline-offset: 3px;
}

h1,
h2,
h3,
h4,
p,
dl {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--lm-primary);
  font-weight: 750;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 4rem);
}

h2 {
  font-size: clamp(1.9rem, 3vw, 2.7rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.site-container {
  width: min(100% - 2rem, 87.5rem);
  margin-inline: auto;
}

.screen-reader-text {
  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: fixed;
  z-index: 9999;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  transform: translateY(-160%);
  border-radius: 0.4rem;
  color: var(--lm-white);
  background: var(--lm-primary-dark);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--lm-white);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.2rem;
  border: 2px solid transparent;
  border-radius: 0.65rem;
  cursor: pointer;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform var(--lm-transition), box-shadow var(--lm-transition), background var(--lm-transition), color var(--lm-transition);
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  color: var(--lm-white);
  background: linear-gradient(135deg, var(--lm-primary), var(--lm-secondary));
  box-shadow: 0 0.4rem 1.2rem rgb(42 95 115 / 28%);
}

.button--primary:hover {
  color: var(--lm-white);
  box-shadow: 0 0.65rem 1.5rem rgb(42 95 115 / 36%);
}

.button--secondary {
  border-color: var(--lm-primary);
  color: var(--lm-primary);
  background: var(--lm-white);
}

.button--secondary:hover {
  color: var(--lm-white);
  background: var(--lm-primary);
}

.button--large {
  min-height: 3.55rem;
  padding-inline: 1.65rem;
  font-size: 1.08rem;
}

/* Header and navigation */
.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  border-bottom: 1px solid rgb(220 230 234 / 90%);
  background: rgb(255 255 255 / 95%);
  box-shadow: 0 0.2rem 1rem rgb(22 49 61 / 7%);
  backdrop-filter: blur(0.7rem);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--lm-header-height);
  gap: 1.5rem;
}

.site-brand {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.7rem;
  color: var(--lm-primary);
  text-decoration: none;
}

.site-brand:hover {
  color: var(--lm-primary);
}

.site-brand__mark {
  width: 3.15rem;
  height: 3.15rem;
  object-fit: contain;
}

.site-brand__text {
  display: grid;
  line-height: 1.15;
}

.site-brand__title {
  font-size: 1.08rem;
  font-weight: 800;
}

.site-brand__subtitle {
  color: var(--lm-secondary);
  font-size: 0.94rem;
  font-weight: 700;
}

.site-navigation__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: end;
  gap: 0.15rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-navigation__list a {
  display: block;
  padding: 0.58rem 0.72rem;
  border-radius: 0.5rem;
  color: var(--lm-ink);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: color var(--lm-transition), background var(--lm-transition);
}

.site-navigation__list a:hover,
.site-navigation__list .current-menu-item > a {
  color: var(--lm-white);
  background: var(--lm-primary);
}

.navigation-toggle {
  display: none;
  width: 2.9rem;
  height: 2.75rem;
  padding: 0.55rem;
  border: 0;
  border-radius: 0.5rem;
  cursor: pointer;
  background: transparent;
}

.navigation-toggle span[aria-hidden] {
  display: block;
  width: 100%;
  height: 2px;
  margin-block: 0.32rem;
  border-radius: 1px;
  background: var(--lm-primary);
  transition: transform var(--lm-transition), opacity var(--lm-transition);
}

.navigation-toggle[aria-expanded="true"] span:nth-of-type(2) {
  transform: translateY(0.41rem) rotate(45deg);
}

.navigation-toggle[aria-expanded="true"] span:nth-of-type(3) {
  opacity: 0;
}

.navigation-toggle[aria-expanded="true"] span:nth-of-type(4) {
  transform: translateY(-0.41rem) rotate(-45deg);
}

/* Announcements */
.announcement {
  color: var(--lm-white);
  background: #22506a;
}

.announcement--warning {
  color: #241500;
  background: #ffcf59;
}

.announcement--urgent {
  background: var(--lm-danger);
}

.announcement__inner {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding-block: 0.75rem;
}

.announcement__icon {
  flex: 0 0 auto;
  font-size: 1.2rem;
}

.announcement p {
  display: inline;
  margin: 0 0 0 0.35rem;
}

.announcement a {
  color: inherit;
  font-weight: 800;
}

/* Hero */
.hero {
  position: relative;
  display: grid;
  min-height: clamp(30rem, 62vh, 44rem);
  place-items: center;
  isolation: isolate;
  color: var(--lm-white);
  background: url("../images/hero-waiting-room.jpg") 31% center / cover no-repeat;
}

.hero__overlay {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(135deg, rgb(25 73 91 / 91%), rgb(65 134 160 / 83%));
}

.hero__content {
  padding-block: 5.5rem;
  text-align: center;
}

.hero h1 {
  max-width: 21ch;
  margin: 0 auto 1.1rem;
  color: var(--lm-white);
  text-shadow: 0 0.12rem 0.35rem rgb(0 0 0 / 30%);
}

.hero h1 span {
  font-size: 0.7em;
}

.hero__lead {
  max-width: 42rem;
  margin: 0 auto 2rem;
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  text-wrap: balance;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.opening-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.45rem;
  padding: 0.75rem 1.1rem;
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: 99rem;
  cursor: pointer;
  color: var(--lm-white);
  background: rgb(255 255 255 / 14%);
  box-shadow: 0 0.3rem 1rem rgb(0 0 0 / 12%);
  font-weight: 750;
  transition: transform var(--lm-transition), background var(--lm-transition);
}

.opening-status:hover {
  transform: translateY(-2px);
  background: rgb(255 255 255 / 23%);
}

.opening-status[data-status="open"] {
  border-color: rgb(129 242 176 / 70%);
  background: rgb(17 110 59 / 45%);
}

.opening-status[data-status="closing-soon"] {
  border-color: rgb(255 221 121 / 75%);
  background: rgb(144 91 0 / 45%);
}

.opening-status[data-status="closed"] {
  border-color: rgb(255 196 196 / 65%);
  background: rgb(141 34 47 / 45%);
}

/* Shared sections */
.site-section {
  padding-block: clamp(3.75rem, 7vw, 6rem);
}

.site-section--cabinet {
  background: var(--lm-surface);
}

.section-heading {
  max-width: 48rem;
  margin: 0 auto clamp(2rem, 4vw, 3.5rem);
  text-align: center;
}

.section-heading h2 {
  margin-bottom: 0;
}

.eyebrow {
  margin-bottom: 0.4rem;
  color: var(--lm-danger);
  font-size: 0.83rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.contact-card,
.team-card {
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius-large);
  background: var(--lm-white);
  box-shadow: var(--lm-shadow);
}

.contact-card__icon,
.team-card__icon {
  display: grid;
  width: 3.1rem;
  height: 3.1rem;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: #e6f1f5;
  font-size: 1.55rem;
}

.contact-card h3,
.team-card h3 {
  margin-bottom: 1rem;
}

.contact-card__details,
.hours-list {
  margin: 0;
}

.contact-card__details > div {
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--lm-border);
}

.contact-card__details > div:first-child {
  padding-top: 0;
}

.contact-card__details > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.contact-card__details dt,
.hours-list dt {
  color: var(--lm-primary);
  font-weight: 800;
}

.contact-card__details dd,
.hours-list dd {
  margin: 0;
}

.hours-list__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.67rem;
  border-bottom: 1px solid var(--lm-border);
}

.hours-list__row:first-child {
  padding-top: 0;
}

.hours-list__row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.hours-list__row--closed {
  color: var(--lm-muted);
}

.hours-list__row--closed dt {
  color: var(--lm-muted);
}

.map-embed {
  overflow: hidden;
  min-height: 20rem;
  border-radius: 0.7rem;
}

.map-embed iframe {
  display: block;
  width: 100%;
  min-height: 20rem;
  border: 0;
}

/* Click & Collect */
.site-section--collect {
  background: linear-gradient(110deg, #fff, #edf7fa);
}

.collect-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.collect-content .section-heading {
  margin-bottom: 1.25rem;
}

.collect-content__copy {
  max-width: 52rem;
  margin-bottom: 1.6rem;
  font-size: 1.08rem;
  text-align: center;
}

/* Cabinet gallery */
.cabinet-copy {
  max-width: 66rem;
  margin: 0 auto clamp(2.3rem, 4vw, 3.5rem);
  font-size: 1.08rem;
  text-align: center;
  text-wrap: pretty;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  margin: 0;
  border-radius: var(--lm-radius-large);
  background: var(--lm-primary);
  box-shadow: var(--lm-shadow);
}

.carousel {
  position: relative;
  overflow: hidden;
  /* Le ratio 4:3 épouse les photos originales du cabinet (1920 × 1446). */
  aspect-ratio: 4 / 3;
}

.carousel__track {
  display: flex;
  height: 100%;
  transition: transform 500ms cubic-bezier(0.22, 0.7, 0.3, 1);
}

.carousel__slide {
  flex: 0 0 100%;
  min-width: 0;
}

.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel__control {
  position: absolute;
  top: 50%;
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: var(--lm-white);
  background: rgb(0 0 0 / 42%);
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
  transition: background var(--lm-transition), transform var(--lm-transition);
}

.carousel__control:hover {
  background: rgb(0 0 0 / 65%);
}

.carousel__control--previous {
  left: 0.75rem;
}

.carousel__control--next {
  right: 0.75rem;
}

.gallery-card figcaption {
  padding: 0.8rem 1rem;
  color: var(--lm-white);
  font-weight: 800;
  text-align: center;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.team-card {
  text-align: center;
}

.team-card__icon {
  margin-inline: auto;
}

.team-card__role {
  color: var(--lm-secondary);
  font-weight: 800;
}

.team-card p:last-child {
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  color: var(--lm-white);
  background: var(--lm-primary-dark);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding-block: 3.5rem 2.5rem;
}

.site-footer h2 {
  margin-bottom: 0.8rem;
  color: var(--lm-white);
  font-size: 1.18rem;
}

.site-footer p {
  margin-bottom: 0.65rem;
}

.site-footer a,
.site-footer__legal-button {
  color: var(--lm-white);
}

.site-footer a:hover,
.site-footer__legal-button:hover {
  color: #bee9f5;
}

.site-footer__appointment {
  color: #ffb4b4;
  font-weight: 800;
}

.site-footer__hours {
  color: rgb(255 255 255 / 84%);
  font-size: 0.91rem;
}

.site-footer__legal-button {
  padding: 0;
  border: 0;
  cursor: pointer;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.site-footer__bottom {
  padding-block: 1.15rem;
  border-top: 1px solid rgb(255 255 255 / 18%);
  color: rgb(255 255 255 / 76%);
  font-size: 0.9rem;
  text-align: center;
}

/* Floating actions */
.emergency-button,
.back-to-top {
  position: fixed;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  border: 0;
  cursor: pointer;
  color: var(--lm-white);
  box-shadow: 0 0.55rem 1.5rem rgb(22 49 61 / 26%);
  font-weight: 800;
  transition: transform var(--lm-transition), opacity var(--lm-transition), background var(--lm-transition);
}

.emergency-button {
  right: 1.5rem;
  bottom: 1.5rem;
  min-height: 3rem;
  padding: 0.7rem 1rem;
  border-radius: 99rem;
  background: var(--lm-danger);
}

.emergency-button:hover {
  transform: translateY(-2px);
  background: #8f1d2a;
}

.back-to-top {
  bottom: 1.5rem;
  left: 1.5rem;
  width: 3rem;
  height: 3rem;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  background: var(--lm-primary);
  font-size: 1.4rem;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-2px);
  background: var(--lm-secondary);
}

/* Dialogues */
.site-dialog {
  width: min(calc(100% - 2rem), 60rem);
  max-height: min(90dvh, 50rem);
  padding: 0;
  border: 0;
  border-radius: var(--lm-radius-large);
  color: var(--lm-ink);
  box-shadow: 0 1.4rem 4rem rgb(0 0 0 / 35%);
}

.site-dialog::backdrop {
  background: rgb(9 28 37 / 62%);
  backdrop-filter: blur(0.18rem);
}

.site-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.6rem;
  color: var(--lm-white);
  background: var(--lm-primary);
}

.site-dialog__header h2 {
  margin: 0;
  color: inherit;
  font-size: 1.4rem;
}

.site-dialog__close {
  position: relative;
  display: flex;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: var(--lm-white);
  background: transparent;
}

.site-dialog__close::before,
.site-dialog__close::after {
  position: absolute;
  width: 1.15rem;
  height: 2px;
  content: "";
  border-radius: 2px;
  background: currentColor;
}

.site-dialog__close::before {
  transform: rotate(45deg);
}

.site-dialog__close::after {
  transform: rotate(-45deg);
}

.site-dialog__close:hover {
  background: rgb(255 255 255 / 16%);
}

.site-dialog__body {
  overflow: auto;
  padding: 1.6rem;
}

.appointment-options {
  display: grid;
  gap: 1rem;
}

.appointment-option {
  padding: 1.35rem;
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius);
  background: var(--lm-surface);
  text-align: center;
}

.appointment-option__icon {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 2.2rem;
}

.appointment-option h3 {
  margin-bottom: 0.5rem;
}

.emergency-section + .emergency-section {
  margin-top: 1.8rem;
}

.emergency-section > h3 {
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--lm-primary);
  font-size: 1.2rem;
}

.emergency-clinic,
.legal-content section {
  padding: 1.15rem;
  border-left: 4px solid var(--lm-secondary);
  border-radius: 0 var(--lm-radius) var(--lm-radius) 0;
  background: var(--lm-surface);
}

.emergency-clinic + .emergency-clinic,
.legal-content section + section {
  margin-top: 1rem;
}

.emergency-clinic h4,
.legal-content h3 {
  margin-bottom: 0.6rem;
  font-size: 1.1rem;
}

.emergency-clinic p:last-child,
.legal-content p:last-child {
  margin-bottom: 0;
}

.emergency-clinic__note {
  color: var(--lm-danger);
  font-weight: 700;
}

/* Standard WordPress content */
.standard-page {
  min-height: 55vh;
  padding-block: clamp(3rem, 7vw, 6rem);
}

.standard-page__content {
  max-width: 50rem;
  margin-inline: auto;
}

.standard-page__header {
  margin-bottom: 2rem;
}

.entry-content > * + * {
  margin-top: 1.25rem;
}

.entry-content img {
  height: auto;
}

/* Responsive layout */
@media (max-width: 68rem) {
  .site-header__inner {
    gap: 0.75rem;
  }

  .site-navigation__list a {
    padding-inline: 0.5rem;
    font-size: 0.9rem;
  }

  .contact-grid,
  .gallery-grid,
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-card--map {
    grid-column: 1 / -1;
  }
}

@media (max-width: 70rem) {
  :root {
    --lm-header-height: 4.7rem;
  }

  .site-header__inner {
    position: relative;
    min-height: var(--lm-header-height);
  }

  .site-brand__mark {
    width: 2.65rem;
    height: 2.65rem;
  }

  .site-brand__title {
    font-size: 0.96rem;
  }

  .site-brand__subtitle {
    font-size: 0.82rem;
  }

  .navigation-toggle {
    display: block;
  }

  .site-navigation {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    border-bottom: 1px solid transparent;
    background: var(--lm-white);
    transition: grid-template-rows 220ms ease, border-color 220ms ease;
  }

  .site-navigation.is-open {
    grid-template-rows: 1fr;
    border-bottom-color: var(--lm-border);
    box-shadow: 0 0.8rem 1rem rgb(22 49 61 / 12%);
  }

  .site-navigation__list {
    display: grid;
    min-height: 0;
    gap: 0;
    padding: 0.55rem 1rem 0.85rem;
    width: 100%;
  }

  .site-navigation__list li,
  .site-navigation__list a {
    width: 100%;
  }

  .site-navigation__list a {
    padding: 0.8rem 1rem;
  }

  .hero__content {
    padding-block: 4.6rem;
  }

  .contact-grid,
  .gallery-grid,
  .team-grid,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .contact-card--map {
    grid-column: auto;
  }

  .map-embed,
  .map-embed iframe {
    min-height: 18rem;
  }

  .site-footer__inner {
    gap: 1.4rem;
    padding-block: 2.75rem 2rem;
    text-align: center;
  }

  .emergency-button {
    right: 1rem;
    bottom: 1rem;
  }

  .back-to-top {
    bottom: 1rem;
    left: 1rem;
  }
}

@media (max-width: 31rem) {
  .site-container {
    width: min(100% - 1.25rem, 75rem);
  }

  .site-brand__text {
    display: none;
  }

  .hero__actions {
    align-items: stretch;
  }

  .hero__actions > * {
    width: 100%;
  }

  .hours-list__row {
    display: block;
  }

  .hours-list dd {
    margin-top: 0.15rem;
  }

  .site-dialog__header,
  .site-dialog__body {
    padding: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
