/* ============================================
   Centre d'Ostéopathie du Crès — Modern Redesign
   Mobile-First · Clean · Accessible
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Palette — respectée */
  --bg-page: #7DC5E7;
  --bg-page-light: #9ad4ee;
  --accent: #4F9FAA;
  --accent-dark: #3d8490;
  --title-dark: #2a5a72;
  --card-bg: #E8F5A3;
  --card-bg-soft: #eef8bf;
  --text-light: #ffffff;
  --text-dark: #1e3a4a;
  --text-muted: #4a7080;
  --nav-link: #3a5f6f;
  --nav-bg: #ffffff;

  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Typography */
  --font-heading: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-body: 'DM Sans', 'Inter', system-ui, sans-serif;

  /* Layout */
  --nav-height: 60px;
  --max-width: 1200px;
  --content-width: 800px;

  /* Effects */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: 0.25s cubic-bezier(.4,0,.2,1);
  --transition-slow: 0.4s cubic-bezier(.4,0,.2,1);
}

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

html, body {
  overflow-x: hidden;
  width: 100%;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--text-light);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-width: 0;
}

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

/* Prevent horizontal overflow globally */
*,
*::before,
*::after {
  max-width: 100vw;
}

.main-content,
.hero,
.footer,
.navbar,
.section,
.intro-section,
.team-section,
.services-section {
  max-width: 100%;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--title-dark);
}

/* ============================================
   NAVBAR — Mobile First
   ============================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-md);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: box-shadow var(--transition);
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar .logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.navbar .logo-link img {
  height: 65px;
  width: auto;
}

/* Mobile nav — default */
.nav-links {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  transform: translateX(100%);
  height: 100dvh;
  background: var(--nav-bg);
  flex-direction: column;
  align-items: flex-start;
  padding: 80px var(--space-lg) var(--space-xl);
  gap: 2px;
  box-shadow: -8px 0 30px rgba(0,0,0,0.12);
  transition: transform var(--transition-slow);
  overflow-y: auto;
  display: flex;
}

.nav-links.open {
  transform: translateX(0);
}

.nav-links a {
  color: var(--nav-link);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  transition: var(--transition);
  white-space: nowrap;
  width: 100%;
  position: relative;
}

.nav-links a:hover {
  background: rgba(79,159,170,0.08);
  color: var(--accent);
}

.nav-links a.active {
  color: var(--accent);
  font-weight: 600;
  background: rgba(79,159,170,0.1);
}

/* Hamburger — visible par défaut (mobile-first) */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1100;
  border-radius: var(--radius-xs);
  transition: var(--transition);
}

.hamburger:hover {
  background: rgba(0,0,0,0.04);
}

.hamburger span {
  width: 24px;
  height: 2.5px;
  background: var(--nav-link);
  border-radius: 3px;
  transition: var(--transition);
  display: block;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5.5px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5.5px);
}

/* Overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(2px);
  z-index: 999;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.nav-overlay.show {
  display: block;
  opacity: 1;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  width: 100%;
  height: 50vh;
  min-height: 280px;
  max-height: 500px;
  overflow: hidden;
  box-sizing: border-box;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30,58,74,0.15) 0%, rgba(30,58,74,0.6) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-lg);
}

.hero-overlay h1 {
  font-size: clamp(1.6rem, 5vw, 3.2rem);
  color: var(--text-light);
  text-shadow: 0 2px 20px rgba(0,0,0,0.25);
  max-width: 700px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-overlay .hero-subtitle {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  color: rgba(255,255,255,0.9);
  margin-top: var(--space-sm);
  text-shadow: 0 1px 8px rgba(0,0,0,0.2);
  font-weight: 400;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  background: var(--bg-page);
  padding: 0;
}

/* ============================================
   SECTION (pages intérieures)
   ============================================ */
.section {
  padding: var(--space-xl) var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.section h1 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin-bottom: var(--space-md);
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.section h2 {
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  margin-bottom: var(--space-md);
  margin-top: var(--space-xl);
  font-weight: 700;
}

.section h3 {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  margin-bottom: var(--space-sm);
  margin-top: var(--space-lg);
  font-weight: 600;
}

.section p {
  margin-bottom: var(--space-md);
  font-size: 1rem;
  max-width: var(--content-width);
  line-height: 1.75;
}

.section ul.content-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: var(--space-lg);
}

.section ul.content-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  line-height: 1.6;
}

.section ul.content-list li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--card-bg);
}

/* ============================================
   INTRO SECTION (accueil — centré)
   ============================================ */
.intro-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-md);
  text-align: center;
}

.intro-section .intro-logo {
  width: 100px;
  margin: 0 auto var(--space-lg);
  opacity: 0.9;
}

.intro-section h2 {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  color: var(--title-dark);
  margin-bottom: var(--space-lg);
  font-weight: 800;
}

.intro-section p {
  max-width: 700px;
  margin: 0 auto var(--space-md);
  color: var(--text-light);
  line-height: 1.75;
  text-align: center;
}

.intro-section ul.content-list {
  max-width: 700px;
  margin: 0 auto var(--space-lg);
  text-align: left;
  display: inline-block;
}

.intro-section ul.content-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  color: var(--text-light);
}

.intro-section ul.content-list li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--card-bg);
}

/* ============================================
   TEAM SECTION (equipe)
   ============================================ */
.team-section {
  padding: var(--space-xl) var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.team-intro h2 {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  color: var(--title-dark);
  margin-bottom: var(--space-sm);
  font-weight: 800;
}

.team-intro .stat {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text-light);
  font-weight: 600;
  opacity: 0.85;
}

.osteo-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-md);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  color: var(--text-dark);
}

.osteo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.osteo-card-content {
  flex: 1;
}

.osteo-card-content h3 {
  font-size: 1.15rem;
  color: var(--title-dark);
  margin-bottom: var(--space-xs);
  font-weight: 700;
}

.osteo-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
}

.osteo-card-content p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.osteo-card .osteo-photo {
  width: 100px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

/* ============================================
   BOUTON RDV
   ============================================ */
.btn-rdv {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--nav-bg);
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 10px 24px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
  letter-spacing: 0;
}

.btn-rdv:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(79,159,170,0.3);
}

.btn-rdv:active {
  transform: translateY(0);
}

/* ============================================
   BOUTON DOCTOLIB
   ============================================ */
.btn-doctolib {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #107ACA;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 50px;
  text-decoration: none;
  transition: var(--transition);
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
}

.btn-doctolib img {
  height: 18px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

.btn-doctolib:hover {
  background-color: #0b5fa0;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(16,122,202,0.35);
  color: #ffffff;
}

.btn-doctolib:active {
  transform: translateY(0);
}

.doctolib-buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

/* ============================================
   SERVICES GRID
   ============================================ */
.services-section {
  padding: var(--space-2xl) var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

.services-section > h2 {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  color: var(--title-dark);
  text-align: center;
  margin-bottom: var(--space-xl);
  font-weight: 800;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.service-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  color: var(--text-dark);
  text-align: center;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.service-card .service-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-md);
  object-fit: contain;
  opacity: 0.85;
}

.service-card h3 {
  font-size: 0.85rem;
  color: var(--title-dark);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.03em;
  font-weight: 700;
  text-transform: uppercase;
}

.service-card p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ============================================
   PAGE CONTENT CARDS
   ============================================ */
.content-card {
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.1);
}

.content-card h2 {
  margin-top: 0;
}

.pillars-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.pillar-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: var(--space-lg);
  color: var(--text-dark);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

.pillar-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.pillar-card h3 {
  color: var(--title-dark);
  font-size: 1rem;
  margin-bottom: var(--space-sm);
  margin-top: 0;
  font-weight: 600;
}

.pillar-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================
   TARIF
   ============================================ */
.tarif-big {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 800;
  color: var(--accent);
  text-align: center;
  margin: var(--space-xl) 0;
  letter-spacing: -0.04em;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: #1e3d4d;
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  color: var(--text-light);
  margin-top: var(--space-xl);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.footer-map iframe {
  width: 100%;
  height: 220px;
  border: none;
  border-radius: var(--radius);
}

.footer-info h3 {
  font-size: 1.2rem;
  color: var(--card-bg);
  margin-bottom: var(--space-md);
  font-weight: 700;
}

.footer-info p {
  margin-bottom: var(--space-sm);
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-info a {
  color: var(--card-bg);
  font-weight: 600;
  transition: var(--transition);
}

.footer-info a:hover {
  color: #fff;
}

.footer-reviews {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}

.review-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  text-decoration: none;
  transition: var(--transition);
  min-width: 170px;
}

.review-card:hover {
  background: rgba(255,255,255,0.14);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.review-stars {
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-score {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
}

.review-card .stars {
  color: #FBBC04;
  font-size: 1.1rem;
  letter-spacing: 2px;
}

.review-name {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin-top: 2px;
}

.review-source {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
}

.footer-logo {
  width: 70px;
  margin-top: var(--space-md);
  opacity: 0.7;
  transition: opacity var(--transition);
}

.footer-logo:hover {
  opacity: 1;
}

.footer-bottom {
  text-align: center;
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  opacity: 0.6;
  font-family: var(--font-heading);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.observe {
  opacity: 0;
  transform: translateY(24px);
}

.fade-in {
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stagger delays for grids */
.services-grid .service-card:nth-child(1).fade-in { animation-delay: 0s; }
.services-grid .service-card:nth-child(2).fade-in { animation-delay: 0.06s; }
.services-grid .service-card:nth-child(3).fade-in { animation-delay: 0.12s; }
.services-grid .service-card:nth-child(4).fade-in { animation-delay: 0.18s; }
.services-grid .service-card:nth-child(5).fade-in { animation-delay: 0.24s; }
.services-grid .service-card:nth-child(6).fade-in { animation-delay: 0.3s; }
.services-grid .service-card:nth-child(7).fade-in { animation-delay: 0.36s; }
.services-grid .service-card:nth-child(8).fade-in { animation-delay: 0.42s; }

.pillars-grid .pillar-card:nth-child(1).fade-in { animation-delay: 0s; }
.pillars-grid .pillar-card:nth-child(2).fade-in { animation-delay: 0.08s; }
.pillars-grid .pillar-card:nth-child(3).fade-in { animation-delay: 0.16s; }
.pillars-grid .pillar-card:nth-child(4).fade-in { animation-delay: 0.24s; }

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .observe { opacity: 1; transform: none; }
}

/* ============================================
   RESPONSIVE — Tablet (640px+)
   ============================================ */
@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  .osteo-card {
    flex-direction: row;
    text-align: left;
    gap: var(--space-lg);
  }

  .footer-map iframe {
    height: 260px;
  }

  .section {
    padding: var(--space-2xl) var(--space-lg);
  }

  .content-card {
    padding: var(--space-xl);
  }
}

/* ============================================
   RESPONSIVE — Desktop (1100px+)
   ============================================ */
@media (min-width: 1100px) {
  :root {
    --nav-height: 64px;
  }

  .hamburger {
    display: none;
  }

  .nav-links {
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 2px;
    box-shadow: none;
    overflow: visible;
    display: flex;
    transform: none;
  }

  .nav-links a {
    font-size: 12.5px;
    padding: 8px 10px;
    width: auto;
    position: relative;
  }

  .nav-links a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 50%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: transform var(--transition);
  }

  .nav-links a:hover::after,
  .nav-links a.active::after {
    transform: translateX(-50%) scaleX(1);
  }

  .nav-links a:hover {
    background: transparent;
  }

  .nav-links a.active {
    background: transparent;
  }
}

/* ============================================
   RESPONSIVE — Layout Desktop (960px+)
   ============================================ */
@media (min-width: 960px) {
  .team-section {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    padding: var(--space-2xl) var(--space-lg);
  }

  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .services-section {
    padding: var(--space-3xl) var(--space-lg);
  }

  .hero {
    height: 55vh;
    max-height: 550px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  .footer {
    padding: var(--space-2xl) var(--space-lg) var(--space-lg);
  }

  .footer-map iframe {
    height: 300px;
  }
}

/* ============================================
   RESPONSIVE — Large Desktop (1200px+)
   ============================================ */
@media (min-width: 1200px) {
  .navbar {
    padding: 0 var(--space-xl);
  }

  .nav-links a {
    font-size: 14px;
    padding: 8px 14px;
  }
}
