/* ============================================================
   style.css — Dr Patricia Redondo Sáez
   One-pager neurologie, Mons
   Structure reprise du one-pager Dr Ziliak
   Tokens générés par includes/tokens.php
   ============================================================ */

/* ------------------------------------------------------------
   1. RESET & BASE
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  min-width: 320px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-primary-light) transparent;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--brand-primary-light); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-primary-medium); }

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  color: var(--text-default);
  background: var(--surface-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
address { font-style: normal; }

h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.1; }
h1 { font-size: var(--font-size-h1); font-weight: 900; }

:focus-visible {
  outline: 3px solid var(--brand-primary-light);
  outline-offset: 3px;
}

.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: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--brand-primary-darker);
  color: #ffffff;
  font-weight: 700;
  border-radius: var(--round-button);
}
.skip-link:focus { top: 12px; }

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

/* ------------------------------------------------------------
   2. BUTTONS
   ------------------------------------------------------------ */

/* CTA primaire (or) */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: var(--density-btn-height-cta);
  padding: 0 var(--density-btn-lr-cta);
  background: var(--brand-primary-medium);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: 700;
  border: var(--border-width-btn) solid var(--brand-primary-medium);
  border-radius: var(--round-button);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}
.btn-cta:hover { background: var(--brand-primary-dark); border-color: var(--brand-primary-dark); }

/* Variante navbar : plus compacte, libellé court en mobile */
.btn-cta--nav {
  height: var(--density-btn-height);
  padding: 0 var(--density-btn-lr);
  font-size: var(--font-size-sm);
  gap: 6px;
}
.btn-cta--nav .label-short { display: none; }

/* CTA inversé (blanc sur fond image — hero) */
.btn-cta-inverted {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: var(--density-btn-height-cta);
  padding: 0 var(--density-btn-lr-cta);
  background: #ffffff;
  color: var(--brand-primary-darker);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: 700;
  border: none;
  border-radius: var(--round-button);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}
.btn-cta-inverted i { color: var(--brand-primary-light); }
.btn-cta-inverted:hover { background: var(--brand-primary-lightest); }

/* ------------------------------------------------------------
   3. SIGNIFIER (icône dans une boîte colorée)
   ------------------------------------------------------------ */
.signifier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--round-signifier);
  flex-shrink: 0;
  font-size: 22px;
  color: #ffffff;
}
.signifier--primary { background: var(--brand-primary-dark); }
.signifier--secondary { background: var(--brand-secondary-dark); }

/* ------------------------------------------------------------
   4. NAVBAR
   ------------------------------------------------------------ */
.site-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--navbar-height);
  background: var(--surface-primary);
  transition: box-shadow var(--transition-fast);
}
.site-navbar.scrolled { box-shadow: var(--shadow-navbar); }

.navbar-contents {
  height: 100%;
  padding: 10px 25px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-inner {
  width: 100%;
  max-width: 1116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  min-width: 0;
}
.navbar-logo-text {
  height: 42px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* ------------------------------------------------------------
   5. HERO SECTION
   ------------------------------------------------------------ */
.section-hero {
  position: relative;
  overflow: hidden;
  padding: var(--density-hero-tb) 25px 80px;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--brand-secondary-lighter);
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% center;
  display: block;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1116px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px 5px;
}

/* Colonne vide côté illustration (H1 Photo Container dans la maquette) */
.hero-spacer {
  flex: 1 1 320px;
  min-width: 290px;
  height: 261px;
}

/* Dégradé radial discret derrière le H1 pour la lisibilité */
.hero-copy {
  flex: 1 1 290px;
  max-width: 542px;
  min-width: 290px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: radial-gradient(ellipse closest-side at center,
    rgba(20, 20, 26, 0.38) 0%,
    rgba(20, 20, 26, 0.22) 55%,
    rgba(20, 20, 26, 0) 100%);
}

.hero-title {
  font-size: var(--font-size-h1);
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
}

.hero-subtitle {
  font-size: var(--font-size-xl);
  font-weight: 400;
  color: #ffffff;
  line-height: 1.5;
}

/* ------------------------------------------------------------
   6. DOCTOR SECTION
   ------------------------------------------------------------ */
.section-doctor {
  padding: var(--density-section-tb) 25px;
  background: var(--surface-primary);
}

.doctor-inner {
  max-width: 1116px;
  margin: 0 auto;
}

.doctor-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.doctor-name {
  font-size: var(--font-size-h3);
  font-weight: 800;
  color: var(--text-default);
  line-height: 1;
}

.doctor-bio p {
  font-size: var(--font-size-base);
  color: var(--text-default);
  line-height: 1.5;
  margin-bottom: 12px;
}
.doctor-bio p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------
   7. CONSULTATIONS SECTION
   ------------------------------------------------------------ */
.section-services {
  padding: var(--density-section-tb) 25px;
  background: var(--surface-primary);
}

.services-inner {
  max-width: 1116px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.services-title {
  text-align: center;
  font-size: var(--font-size-h3);
  font-weight: 800;
  color: var(--text-default);
  line-height: 1;
}

/* Grille 2 colonnes → 1 colonne */
.consult-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 24px;
}

.consult-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.consult-name {
  font-size: var(--font-size-h5);
  font-weight: 700;
  color: var(--text-default);
  line-height: 1.2;
  max-width: 46ch;
}

/* ------------------------------------------------------------
   8. INFO FRAMES (composant partagé)
   ------------------------------------------------------------ */
.info-frame {
  flex: 1 1 280px;
  min-height: 290px;
  border-radius: var(--round-frame);
  padding: var(--density-frame-inner);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}

/* Encart pleine largeur (Important) */
.info-frame--wide {
  flex: none;            /* parent en colonne : pas de flex-basis 280px en hauteur */
  min-height: 0;
  gap: 24px;
}

/* Variante or (primaire) */
.info-frame--primary {
  border: var(--border-width-btn) solid var(--brand-primary-lighter);
  background:
    linear-gradient(90deg, rgba(237, 240, 245, 0.6), rgba(237, 240, 245, 0.6)),
    linear-gradient(90deg, var(--brand-primary-lighter), var(--brand-primary-lighter));
}

/* Variante grise (secondaire) */
.info-frame--secondary {
  border: var(--border-width-btn) solid var(--brand-secondary-subtle);
  background:
    linear-gradient(90deg, rgba(237, 240, 245, 0.6), rgba(237, 240, 245, 0.6)),
    linear-gradient(90deg, var(--brand-secondary-lighter), var(--brand-secondary-lighter));
}

.info-frame-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.info-frame-heading {
  font-size: var(--font-size-h4);
  font-weight: 700;
  color: var(--text-default);
  line-height: 1;
  min-width: 200px;
  flex: 1 1 auto;
}

.info-frame-list {
  list-style: disc;
  padding-left: 27px;
  display: flex;
  flex-direction: column;
}
.info-frame-list li {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--text-default);
  line-height: 1.5;
}
.info-frame-list--regular li { font-weight: 400; }

.info-frame-text {
  font-size: var(--font-size-base);
  font-weight: 400;
  color: var(--text-default);
  line-height: 1.5;
}
.info-frame-text strong { font-weight: 700; }

.info-frame-email a {
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: var(--brand-primary-medium);
  text-underline-offset: 3px;
}
.info-frame-email a:hover { color: var(--brand-primary-darker); }

/* ------------------------------------------------------------
   9. CONTACT SECTION
   ------------------------------------------------------------ */
.section-contact {
  padding: 40px 25px var(--density-section-tb);
  background: var(--surface-primary);
}

.contact-inner {
  max-width: 1116px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-title {
  text-align: center;
  font-size: var(--font-size-h3);
  font-weight: 800;
  color: var(--text-default);
  line-height: 1;
}

.contact-subtitle {
  text-align: center;
  font-size: var(--font-size-xl);
  color: var(--text-default);
  line-height: 1.5;
}

.contact-map {
  border: var(--border-width-btn) solid var(--brand-secondary-dark);
  border-radius: var(--round-frame);
  overflow: hidden;
  height: 478px;
}
.contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.contact-frames {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.contact-frames .info-frame { padding: 14px; min-height: 0; }

/* ------------------------------------------------------------
   10. FOOTER
   ------------------------------------------------------------ */
.site-footer {
  background: var(--brand-secondary-darker);
  padding: 24px 25px;
}

.footer-inner {
  max-width: 1116px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand { display: flex; align-items: center; min-height: 80px; }

.footer-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.footer-copy {
  text-align: right;
  display: flex;
  flex-direction: column;
}
.footer-copy p {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.5;
}
.footer-dm-link { color: var(--brand-secondary-light); }
.footer-dm-link:hover { text-decoration: underline; }

/* ------------------------------------------------------------
   11. RESPONSIVE — Tablet (< 1000px)
   ------------------------------------------------------------ */
@media (max-width: 999px) {
  .section-hero,
  .section-doctor,
  .section-services,
  .section-contact {
    padding-left: var(--page-margin);
    padding-right: var(--page-margin);
  }

  .contact-map { height: 320px; }
}

/* ------------------------------------------------------------
   12. RESPONSIVE — Mobile (< 640px)
   ------------------------------------------------------------ */
@media (max-width: 640px) {
  .navbar-contents { padding: 10px 16px; }
  .navbar-logo-text { height: 34px; }
  .btn-cta--nav .label-long {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap;
  }
  .btn-cta--nav .label-short { display: inline; }

  .section-hero { padding-top: 40px; padding-bottom: 40px; }
  .hero-bg img { object-position: 20% center; }
  .hero-inner { gap: 24px; }
  .hero-spacer { height: 200px; }
  .hero-copy { max-width: 100%; }
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1.1rem; }

  .consult-grid { grid-template-columns: 1fr; gap: 36px; }

  .contact-map { height: 260px; }

  .footer-inner { flex-direction: column; justify-content: center; gap: 8px; }
  .footer-brand { min-height: 0; }
  .footer-copy { text-align: center; }
}

/* Liens dans les info-frames (téléphone, RDV en ligne, Rosa) */
.info-frame-link {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--brand-primary-medium);
  text-underline-offset: 3px;
}
.info-frame-link:hover { color: var(--brand-primary-darker); }
