/* ============================================================
   style.css — Dr Barbora Ziliak
   One-pager orthopédie pédiatrique
   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; }
h3 { font-size: var(--font-size-h3); font-weight: 800; }
h4 { font-size: var(--font-size-h4); font-weight: 700; }

.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;
}

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

/* CTA primaire (bleu) */
.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); }

/* CTA alternatif (vert secondaire) — utilisé dans la navbar */
.btn-cta-alt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: var(--density-btn-height-cta);
  padding: 0 var(--density-btn-lr-cta);
  background: var(--brand-secondary-medium);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: 700;
  border: var(--border-width-btn) solid var(--brand-secondary-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-alt:hover { background: var(--brand-secondary-dark); border-color: var(--brand-secondary-dark); }

/* CTA inversé (blanc sur fond sombre — 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: 20px;
  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;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.navbar-favicon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  flex-shrink: 0;
}
.navbar-logo-text {
  height: 46px;
  width: auto;
  object-fit: contain;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Overlay sombre + désaturation */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 30, 61, 0.75) 0%, rgba(10, 30, 61, 0.30) 60%, rgba(10, 30, 61, 0.10) 100%);
  mix-blend-mode: multiply;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1116px;
  width: 100%;
}

.hero-copy {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.hero-subtitle {
  font-size: var(--font-size-xl);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.90);
  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;
  display: flex;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.doctor-photo-wrap {
  flex-shrink: 0;
  width: 261px;
  height: 261px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--brand-primary-light);
}
.doctor-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doctor-text {
  flex: 1 1 290px;
  min-width: 290px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.doctor-bio {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.doctor-bio p {
  font-size: var(--font-size-base);
  color: var(--text-default);
  line-height: 1.6;
  margin-bottom: 12px;
}
.doctor-bio p:last-child { margin-bottom: 0; }
.doctor-bio strong { font-weight: 700; }

/* ------------------------------------------------------------
   7. SERVICES 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);
}

.services-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

/* Service card (image + titre + liste) */
.service-block {
  flex: 1 1 320px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  justify-content: center;
}

.service-img-wrap {
  flex-shrink: 0;
  width: 166px;
  height: 166px;
  border-radius: var(--round-photo);
  overflow: hidden;
}
.service-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.service-text {
  flex: 1 1 290px;
  min-width: 290px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.service-name {
  font-size: var(--font-size-h4);
  font-weight: 700;
  color: var(--text-default);
  line-height: 1.3;
}

.service-list {
  list-style: disc;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.service-list li {
  font-size: var(--font-size-base);
  color: var(--text-muted);
  line-height: 1.6;
}

/* Info frames (Documents, Paiement) */
.services-frames {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

/* ------------------------------------------------------------
   8. CONTACT FRAMES (shared component)
   ------------------------------------------------------------ */
.info-frame {
  flex: 1 1 280px;
  min-height: 200px;
  border-radius: var(--round-frame);
  padding: var(--density-frame-inner);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

/* Variante bleue (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 verte (secondaire) */
.info-frame--secondary {
  border: var(--border-width-btn) solid rgba(137, 224, 137, 0.30);
  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-title h4 {
  font-size: var(--font-size-h4);
  font-weight: 700;
  color: var(--text-default);
  min-width: 220px;
  flex: 1 1 auto;
}

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

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

/* Horaires — ligne jour / heure */
.schedule-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: var(--font-size-base);
  line-height: 1.6;
}
.schedule-day { font-weight: 400; color: var(--text-default); flex: 1; }
.schedule-hours { font-weight: 700; color: var(--brand-secondary-darker); text-align: right; flex: 1; }

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

.gallery-row {
  max-width: 1296px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

.gallery-photo {
  flex: 1 1 320px;
  height: 300px;
  border-radius: var(--round-photo);
  overflow: hidden;
}
.gallery-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.gallery-photo:hover img { transform: scale(1.03); }

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

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

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

.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-primary-lighter);
  border-radius: var(--round-frame);
  overflow: hidden;
  height: 400px;
}
.contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.contact-frames {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

/* ------------------------------------------------------------
   11. BOOKING SECTION (CTA centré)
   ------------------------------------------------------------ */
.section-booking {
  padding: var(--density-section-tb) 25px;
  background: var(--surface-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.booking-text {
  font-size: var(--font-size-base);
  color: var(--text-default);
  text-align: center;
}

/* ------------------------------------------------------------
   12. FOOTER
   ------------------------------------------------------------ */
.site-footer {
  background: var(--brand-secondary-darkest);
  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; }

.footer-logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-favicon {
  width: 50px;
  height: 50px;
  object-fit: contain;
}
.footer-logo-img {
  height: 46px;
  width: auto;
  object-fit: contain;
}

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

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

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

/* ------------------------------------------------------------
   14. RESPONSIVE — Mobile (< 640px)
   ------------------------------------------------------------ */
@media (max-width: 640px) {
  .hero-copy { max-width: 100%; }
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1.1rem; }

  .doctor-photo-wrap { width: 200px; height: 200px; }

  .gallery-photo { height: 220px; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-copy { text-align: left; }
}
