:root {
  color-scheme: light only;
}

html {
  background-color: var(--off-white);
  forced-color-adjust: none;
}

body {
  background-color: var(--off-white);
  color: var(--text);
}

@media (prefers-color-scheme: dark) {
  html, body {
    background-color: var(--off-white) !important;
    color: var(--text) !important;
  }
}

/* ================================================================
   CENTRE DE RÉÉDUCATION FONCTIONNELLE CHIFA
   Global Stylesheet — Premium Medical 2026
   ================================================================ */

/* Polices chargées via <link> dans le <head> de chaque page (voir preconnect + stylesheet) */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* Navy — dominant professional */
  --navy: #1B2A4A;
  --navy-dark: #0F1C32;
  --navy-light: #2A3D5F;
  --navy-50: rgba(27,42,74,0.06);
  --navy-100: rgba(27,42,74,0.10);
  --navy-200: rgba(27,42,74,0.18);

  /* Accent — logo teal (used sparingly) */
  --accent: #38BDD2;
  --accent-light: #5CD0E0;
  --accent-dark: #2A9DB0;
  --accent-50: rgba(56,189,210,0.08);
  --accent-100: rgba(56,189,210,0.14);

  /* Neutrals — depth system */
  --white: #ffffff;
  --off-white: #F8F9FA;
  --light-gray: #F0F2F5;
  --section-alt: #F5F8FB;
  --blue-tint: #EBF2F8;
  --gray-200: #D1D8E0;
  --gray-300: #A8B5C2;
  --gray-400: #7A8A9A;
  --text: #2D3748;
  --text-secondary: #5A6A7A;
  --dark: #1A2332;

  /* Shadows — soft depth */
  --shadow-xs: 0 1px 3px rgba(27,42,74,0.04);
  --shadow-sm: 0 2px 8px rgba(27,42,74,0.06);
  --shadow-md: 0 8px 24px rgba(27,42,74,0.08);
  --shadow-lg: 0 16px 40px rgba(27,42,74,0.10);
  --shadow-xl: 0 24px 56px rgba(27,42,74,0.14);
  --shadow-card: 0 4px 16px rgba(27,42,74,0.07);
  --shadow-hover: 0 12px 32px rgba(27,42,74,0.12);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;

  /* Transitions — instant */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition: 0.3s var(--ease);

  /* Layout */
  --topbar-height: 42px;
  --header-height: 80px;
  --max-width: 1200px;
}

/* ===== RESET ===== */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--off-white);
  line-height: 1.7;
  padding-top: calc(var(--topbar-height) + var(--header-height));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,svg,video { max-width: 100%; height: auto; display: block; }
iframe { max-width: 100%; border: 0; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ===== ACCESSIBILITY ===== */
.skip-link {
  position: absolute; top: -100%; left: 16px;
  background: var(--navy); color: #fff;
  padding: 12px 24px; border-radius: var(--radius-sm);
  z-index: 99999; font-weight: 600;
}
.skip-link:focus { top: 16px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* ===== UTILITIES ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ===== SECTION SYSTEM ===== */
.section-badge {
  display: inline-block;
  background: var(--accent-50);
  color: var(--accent-dark);
  font-size: 12px; font-weight: 700;
  padding: 6px 18px; border-radius: 50px;
  letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700; color: var(--navy);
  margin-bottom: 16px; line-height: 1.2;
}

.section-subtitle {
  font-size: 16px; color: var(--text-secondary);
  max-width: 640px; margin: 0 auto 28px;
  line-height: 1.8;
}

.green-line {
  width: 60px; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--navy-light));
  border-radius: 2px; margin: 10px auto 16px;
}

/* Alternating section backgrounds */
.bg-white { background: var(--white); }
.bg-offwhite { background: var(--off-white); }
.bg-light { background: var(--light-gray); }
.bg-blue-tint { background: var(--blue-tint); }
.bg-section-alt { background: var(--section-alt); }
.bg-navy { background: var(--navy); color: #fff; }

/* ===== BUTTONS ===== */
.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--navy);
  padding: 14px 32px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px;
  border: 2px solid var(--navy); cursor: pointer;
  transition: all var(--transition); text-decoration: none;
}
.btn-outline:hover {
  background: var(--navy); color: #fff;
  transform: translateY(-2px);
}

.btn-accent {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  padding: 14px 32px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px;
  border: none; cursor: pointer;
  transition: all var(--transition); text-decoration: none;
}
.btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-2px); box-shadow: var(--shadow-md);
}

.btn-white {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--navy);
  padding: 14px 32px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px;
  border: none; cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); text-decoration: none;
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,0.18); }
/* ========================================
   TOP BAR
   ======================================== */
.top-bar {
  position: fixed; top: 0; left: 0; right: 0;
  background: var(--navy-dark);
  color: rgba(255,255,255,0.8);
  font-size: 13px; z-index: 10000;
  height: var(--topbar-height);
}
.top-bar-content {
  max-width: var(--max-width); margin: auto;
  padding: 0 24px; display: flex; gap: 24px;
  align-items: center; justify-content: center;
  height: 100%; flex-wrap: wrap;
}
.top-bar-content span {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.top-bar-content a {
  color: inherit; text-decoration: none;
  transition: opacity 0.2s ease;
}
.top-bar-content a:hover { opacity: 1; text-decoration: underline; }

/* ========================================
   MAIN HEADER
   ======================================== */
.main-header {
  position: fixed;
  top: var(--topbar-height);
  left: 0; right: 0;
  background: var(--white);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 32px; z-index: 9999;
  height: var(--header-height);
  transition: box-shadow 0.08s ease, background 0.08s ease;
  border-bottom: 1px solid rgba(27,42,74,0.06);
}
.main-header.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
}

.logo-title { display: flex; align-items: center; gap: 14px; }
.logo { height: 80px; width: auto; transition: transform var(--transition); }
.logo-title h1 {
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 700;
  color: var(--navy); letter-spacing: -0.3px;
}

/* ===== DESKTOP NAV ===== */
nav ul { list-style: none; display: flex; gap: 2px; align-items: center; }
nav li { display: flex; align-items: center; }
nav a {
  color: var(--text); text-decoration: none;
  font-weight: 500; font-size: 14.5px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  transition: all 0.08s ease; position: relative;
}
nav a:hover { color: var(--navy); background: var(--navy-50); }
nav a.active { color: var(--accent-dark); font-weight: 600; }
nav a.active::after {
  content: ''; position: absolute;
  bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 3px;
  background: var(--accent); border-radius: 2px;
}

/* ===== MEGA MENU ===== */
nav li.dropdown { position: relative; }
nav .menu-parent {
  cursor: pointer; color: var(--text);
  font-weight: 500; font-size: 14.5px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  transition: all 0.08s ease;
  display: inline-flex; align-items: center; gap: 6px;
  position: relative;
}
nav .menu-parent::after {
  content: '\25BE'; font-size: 10px; opacity: 0.4;
  transition: transform 0.15s ease;
}
/* Active indicator bar under "Nos traitements" when open */
nav .menu-parent .parent-indicator {
  position: absolute; bottom: 2px;
  left: 50%; transform: translateX(-50%) scaleX(0);
  width: 24px; height: 3px;
  background: var(--accent); border-radius: 2px;
  transition: transform 0.15s ease;
}
nav li.dropdown:hover .menu-parent,
nav li.dropdown .mega-menu.open ~ .menu-parent {
  color: var(--navy); background: var(--navy-50);
}
nav li.dropdown:hover .menu-parent::after {
  transform: rotate(180deg);
}
nav li.dropdown:hover .menu-parent .parent-indicator {
  transform: translateX(-50%) scaleX(1);
}

/* ===== Mega dropdown panel — DESKTOP 2-panel ===== */
nav .mega-menu {
  position: fixed;
  top: calc(var(--topbar-height) + var(--header-height));
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 90%;
  max-width: 860px;
  background: var(--white);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 12px 48px rgba(15,28,50,0.13), 0 2px 8px rgba(15,28,50,0.06);
  padding: 0;
  z-index: 300;
  opacity: 0; visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  display: flex;
  border-top: 3px solid var(--accent);
  overflow: hidden;
  pointer-events: none;
}
nav li.dropdown:hover .mega-menu,
nav .mega-menu.open {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* --- Left column: categories --- */
.mega-categories {
  width: 280px; min-width: 280px;
  background: var(--navy);
  padding: 12px 0;
  display: flex; flex-direction: column;
  overflow-y: auto;
  max-height: 520px;
}
.mega-cat {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px;
  font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: all 0.12s ease;
  position: relative;
}
.mega-cat-bar {
  width: 3px; height: 0;
  background: var(--accent);
  border-radius: 2px;
  transition: height 0.12s ease;
  flex-shrink: 0;
}
.mega-cat:hover,
.mega-cat.active {
  color: #fff;
  background: rgba(56,189,210,0.1);
}
.mega-cat:hover .mega-cat-bar,
.mega-cat.active .mega-cat-bar {
  height: 18px;
}

/* --- Right column: pathology panels --- */
.mega-panels {
  flex: 1;
  padding: 24px 28px;
  position: relative;
  min-height: 340px;
}
.mega-panel {
  display: none;
  animation: megaPanelIn 0.15s ease-out;
}
.mega-panel.active { display: block; }
@keyframes megaPanelIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mega-panel h4 {
  font-size: 15px; font-weight: 700;
  color: var(--navy); margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-50);
}
.mega-panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 24px;
}
.mega-panel-grid a {
  font-size: 13.5px; color: var(--text-secondary);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.12s ease;
  display: block;
}
.mega-panel-grid a:hover {
  color: var(--accent-dark);
  background: var(--blue-tint);
  padding-left: 16px;
}
.mega-panel-grid a:active {
  color: var(--accent-dark);
  background: var(--blue-tint);
}
.mega-panel-grid a:focus {
  outline: none;
}
.mega-panel-grid a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-radius: var(--radius-sm);
}
.mega-cat:focus {
  outline: none;
}
.mega-cat:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.mega-panel-cta {
  display: inline-block; margin-top: 16px;
  font-size: 12.5px; font-weight: 600;
  color: var(--accent-dark); text-decoration: none;
  transition: color 0.12s ease;
}
.mega-panel-cta:hover { color: var(--navy); }

/* Fallback simple submenu (hidden on desktop when mega-menu exists) */
nav .submenu { display: none; }

/* ========================================
   HERO — Image Above, Text Below
   ======================================== */
.hero-section {
  margin-top: calc(-1 * (var(--topbar-height) + var(--header-height)));
  padding-top: calc(var(--topbar-height) + var(--header-height));
}
.hero-image-wrapper {
  width: 100%; max-height: 520px; overflow: hidden;
  position: relative;
}
.hero-image-wrapper img {
  width: 100%; height: 520px;
  object-fit: cover; display: block;
}
.hero-image-wrapper::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--blue-tint), transparent);
}

.hero-text {
  background: var(--blue-tint);
  padding: 40px 24px 48px; text-align: center;
}
.hero-text h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 800; color: var(--navy);
  margin-bottom: 20px; line-height: 1.2;
}
.hero-tagline {
  font-size: 17px;
  font-weight: 600;
  font-style: italic;
  color: var(--accent-dark);
  margin-bottom: 16px;
}
.hero-text p {
  font-size: clamp(15px, 1.8vw, 17px);
  color: var(--text-secondary);
  max-width: 720px; margin: 0 auto 24px;
  line-height: 1.9;
}
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ========================================
   PAGE HERO (internal pages)
   ======================================== */
.page-hero {
  background: var(--navy);
  color: #fff; text-align: center;
  padding: 80px 24px 50px;
  margin-top: calc(-1 * (var(--topbar-height) + var(--header-height)));
  padding-top: calc(var(--topbar-height) + var(--header-height) + 40px);
  position: relative; overflow: hidden;
}
.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 800; margin-bottom: 16px;
  position: relative;
}
.page-hero p {
  font-size: clamp(15px, 2vw, 18px);
  opacity: 0.85; max-width: 600px;
  margin: 0 auto; line-height: 1.7;
  position: relative;
}

/* ========================================
   SECTION STYLES
   ======================================== */
.intro-section {
  padding: 48px 24px;
}
.intro-section .intro-content {
  max-width: 800px; margin: 0 auto; text-align: center;
}
.intro-section .intro-content p {
  font-size: 16.5px; color: var(--text-secondary);
  line-height: 1.9; margin-bottom: 16px;
}
.intro-section .intro-content p strong {
  color: var(--navy);
  font-weight: 600;
}

/* Section wrappers */
.treatments-section { padding: 40px 0; }
.equipment-section { padding: 40px 0; }

/* --- Treatment Card Grid (icon + title + pathologies) --- */
.treat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px; max-width: var(--max-width);
  margin: 0 auto; padding: 0 24px;
}
.treat-card {
  display: flex; flex-direction: column;
  text-decoration: none;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(27,42,74,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.treat-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
  background: var(--accent);
  opacity: 0; transition: opacity 0.06s ease;
}
.treat-card:hover::before { opacity: 1; }
.treat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(27,42,74,0.14);
}
.treat-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-dark);
  margin-bottom: 14px;
  background: var(--accent-50);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}
.treat-icon svg { width: 28px; height: 28px; }
.treat-icon i {
  font-size: 22px;
  line-height: 1;
}
.treat-card:hover .treat-icon {
  background: var(--accent);
  color: #fff;
  transform: scale(1.08);
}
.treat-card h3 {
  font-size: 15px; font-weight: 700;
  color: var(--navy); margin-bottom: 10px;
  line-height: 1.3;
}
.treat-card ul {
  list-style: none; margin: 0; padding: 0;
}
.treat-card li {
  font-size: 13px; color: var(--text-secondary);
  padding: 2px 0; line-height: 1.5;
}
.treat-card li::before {
  content: '\2022'; color: var(--accent);
  margin-right: 6px; font-weight: 700;
}

/* Navy section overrides for text visibility */
.bg-navy .section-badge {
  background: rgba(56,189,210,0.15);
  color: var(--accent-light);
}
.bg-navy .section-title { color: #fff; }
.bg-navy .green-line { background: var(--accent); }
.bg-navy .section-subtitle { color: rgba(255,255,255,0.75); }

/* --- Doctor Home Section --- */
.doctor-home-section { padding: 48px 0; background: var(--section-alt); }
.doctor-home-text .section-title {
  font-size: clamp(22px, 3vw, 28px);
}
.doctor-home-text p {
  font-size: 15px; color: var(--text-secondary);
  line-height: 1.8; margin-bottom: 12px;
}

/* --- CTA Section --- */
.cta-section {
  background: var(--navy);
  padding: 56px 24px; text-align: center;
  color: #fff; position: relative; overflow: hidden;
}
.cta-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 3.5vw, 36px);
  margin-bottom: 16px;
}
.cta-section p {
  font-size: 16px; opacity: 0.85;
  max-width: 600px; margin: 0 auto 24px;
  line-height: 1.8;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.8);
  padding: 56px 24px 24px;
}
.footer-grid {
  max-width: var(--max-width); margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 28px; padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-col h4 { color: #fff; font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.footer-col p,.footer-col li { font-size: 14px; line-height: 1.8; color: rgba(255,255,255,0.6); }
.footer-col ul { list-style: none; }
.footer-col a { color: rgba(255,255,255,0.6); transition: color 0.2s ease; }
.footer-col a:hover { color: var(--accent-light); }
.footer-social a:hover { color: var(--accent-light) !important; }
.footer-bottom {
  max-width: var(--max-width); margin: 0 auto;
  padding-top: 24px; text-align: center;
  font-size: 13px; color: rgba(255,255,255,0.4);
}

/* ========================================
   FLOATING MOBILE ACTIONS (WhatsApp + Appel)
   ======================================== */
.mobile-float-actions {
  display: none;
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 500;
  flex-direction: column;
  gap: 12px;
}
.float-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s var(--ease);
}
.float-btn svg { width: 28px; height: 28px; color: #fff; }
.float-btn:active { transform: scale(0.94); }
.float-btn-whatsapp { background: #25D366; }
.float-btn-call { background: var(--accent); }

@media (max-width: 1024px) {
  .mobile-float-actions { display: flex; }
}

/* ========================================
   HAMBURGER
   ======================================== */
#hamburger {
  display: none;
  width: 46px;
  height: 46px;
  background: linear-gradient(160deg, rgba(255,255,255,0.93), rgba(239,247,252,0.9));
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 16px;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  z-index: 120;
  box-shadow: 0 10px 22px rgba(27,42,74,0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
#hamburger .bar {
  display: block;
  width: 19px;
  height: 2.2px;
  background: var(--navy);
  border-radius: 3px;
  transition: all 0.25s var(--ease);
  transform-origin: center;
}
#hamburger:hover {
  border-color: rgba(56,189,210,0.45);
  box-shadow: 0 14px 28px rgba(27,42,74,0.2);
  transform: translateY(-1px);
}
#hamburger:active {
  transform: scale(0.97);
}
#hamburger.active {
  background: var(--navy);
  border-color: rgba(27,42,74,0.4);
}
#hamburger.active .bar {
  background: #fff;
}
#hamburger.active .bar:nth-child(1) { transform: rotate(45deg) translate(4.8px, 4.8px); }
#hamburger.active .bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
#hamburger.active .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

body.mobile-menu-open {
  overflow: hidden;
}

/* ========================================
   MOBILE NAV — Modern Drawer
   ======================================== */
.mobile-nav {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  background:
    radial-gradient(circle at 8% 12%, rgba(56,189,210,0.12), transparent 42%),
    rgba(15,28,50,0.52);
  backdrop-filter: blur(6px) saturate(115%);
  -webkit-backdrop-filter: blur(6px) saturate(115%);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease-out, visibility 0.25s ease-out;
}
.mobile-nav.open,
.mobile-nav.closing {
  visibility: visible;
  pointer-events: auto;
}
.mobile-nav.open { opacity: 1; }
.mobile-nav.closing { opacity: 0; }

.mobile-nav .mobile-list {
  overscroll-behavior: contain;
  width: 80vw;
  max-width: 80vw;
  height: calc(100% - 14px);
  margin: 7px;
  background: linear-gradient(165deg, rgba(255,255,255,0.82) 0%, rgba(241,247,252,0.78) 48%, rgba(230,241,248,0.74) 100%);
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.55);
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: -20px 0 42px rgba(15,28,50,0.2), 0 3px 12px rgba(15,28,50,0.1);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  display: flex;
  flex-direction: column;
  position: relative;
  transform: translateX(106%) scale(0.985);
  transform-origin: right center;
  transition: transform 0.25s ease-out;
}
.mobile-nav .mobile-list::before {
  content: '';
  position: absolute;
  top: -24%;
  right: -22%;
  width: 62%;
  height: 42%;
  background: radial-gradient(circle, rgba(56,189,210,0.18) 0%, rgba(56,189,210,0) 72%);
  pointer-events: none;
}
.mobile-nav.open .mobile-list { transform: translateX(0) scale(1); }
.mobile-nav.closing .mobile-list { transform: translateX(106%) scale(0.985); }

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 14px;
  position: sticky;
  top: 0;
  background: linear-gradient(145deg, var(--navy) 0%, #21355B 68%, #254069 100%);
  border-top-left-radius: 27px;
  border-top-right-radius: 27px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.06), 0 8px 18px rgba(15,28,50,0.25);
  z-index: 10;
}
.mobile-menu-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.mobile-menu-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.35px;
}
.mobile-menu-subtitle {
  font-size: 11.5px;
  color: rgba(255,255,255,0.78);
  letter-spacing: 0.2px;
}
.mobile-close-btn {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 17px;
  cursor: pointer;
  color: rgba(255,255,255,0.9);
  border-radius: 50%;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22);
  line-height: 1;
}
.mobile-close-btn:hover {
  background: rgba(255,255,255,0.26);
  color: #fff;
  box-shadow: 0 6px 14px rgba(0,0,0,0.18);
  transform: scale(1.04) rotate(90deg);
}
.mobile-close-btn:active {
  transform: scale(0.96);
}

.mobile-list ul { list-style: none; }
.mobile-list > ul {
  padding: 14px 11px 18px;
}
.mobile-list > ul > li {
  margin-bottom: 10px;
}
.mobile-list > ul > li:last-child {
  margin-bottom: 0;
}
.mobile-list a {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 13px;
  color: var(--navy);
  font-weight: 600;
  font-size: 14.4px;
  line-height: 1.25;
  border-radius: 18px;
  border: 1px solid rgba(27,42,74,0.1);
  background: linear-gradient(160deg, rgba(255,255,255,0.9), rgba(237,245,251,0.82));
  box-shadow: 0 6px 16px rgba(27,42,74,0.1);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}
.mobile-list a:hover {
  background: linear-gradient(160deg, rgba(255,255,255,0.96), rgba(236,247,252,0.9));
  border-color: rgba(56,189,210,0.4);
  box-shadow: 0 12px 24px rgba(27,42,74,0.14);
  transform: translateY(-2px);
}
.mobile-list a:active {
  background: var(--accent-50);
  transform: translateY(0) scale(0.985);
  box-shadow: 0 4px 10px rgba(27,42,74,0.1);
}

/* Lien d'appel — mis en avant, distinct du reste du menu */
.mobile-list a.mobile-call-link {
  background: var(--accent);
  border-color: var(--accent-dark);
  color: #fff;
}
.mobile-list a.mobile-call-link .mobile-link-icon {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}
.mobile-list a.mobile-call-link .mobile-link-arrow {
  background: rgba(255,255,255,0.25);
  color: #fff;
}
.mobile-list a.mobile-call-link:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}
.mobile-list a.mobile-call-link:active {
  background: var(--accent-dark);
}

.mobile-link-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(150deg, rgba(56,189,210,0.24), rgba(56,189,210,0.1));
  border: 1px solid rgba(56,189,210,0.32);
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}
.mobile-link-label {
  flex: 1;
  min-width: 0;
}
.mobile-link-arrow {
  margin-left: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(27,42,74,0.08);
  color: var(--gray-400);
  font-size: 14px;
  line-height: 1;
}

.mobile-list .dropdown-parent {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 13px;
  color: var(--navy);
  font-weight: 600;
  font-size: 14.4px;
  line-height: 1.25;
  border-radius: 18px;
  border: 1px solid rgba(27,42,74,0.1);
  background: linear-gradient(160deg, rgba(255,255,255,0.9), rgba(237,245,251,0.82));
  box-shadow: 0 6px 16px rgba(27,42,74,0.1);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  user-select: none;
  font-family: inherit;
  text-align: left;
  appearance: none;
}
.mobile-list .dropdown-parent:hover {
  background: linear-gradient(160deg, rgba(255,255,255,0.96), rgba(236,247,252,0.9));
  border-color: rgba(56,189,210,0.4);
  box-shadow: 0 12px 24px rgba(27,42,74,0.14);
  transform: translateY(-2px);
}
.mobile-list .dropdown-parent:active {
  background: var(--accent-50);
  transform: translateY(0) scale(0.985);
  box-shadow: 0 4px 10px rgba(27,42,74,0.1);
}
.mobile-list .dropdown-parent .arrow {
  transition: transform 0.2s var(--ease);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(27,42,74,0.08);
  font-size: 10px;
  color: var(--gray-400);
  margin-left: auto;
}
.mobile-list .dropdown-parent.expanded {
  color: var(--navy-dark);
  border-color: rgba(56,189,210,0.35);
}
.mobile-list .dropdown-parent.expanded .arrow {
  transform: rotate(180deg);
  color: var(--accent-dark);
}
.mobile-list .submenu {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin: 2px 6px 0 12px;
  padding-left: 10px;
  border-left: 2px solid rgba(56,189,210,0.45);
  transition: max-height 0.25s ease-out, opacity 0.22s ease-out, margin 0.22s ease-out;
}
.mobile-list .submenu.open {
  max-height: 1200px;
  opacity: 1;
  margin: 8px 6px 2px 12px;
}
.mobile-list .submenu li {
  margin-bottom: 7px;
}
.mobile-list .submenu li:last-child {
  margin-bottom: 0;
}
.mobile-list .submenu a {
  padding: 11px 11px 11px 13px;
  font-size: 13.4px;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: 14px;
  border: 1px solid rgba(27,42,74,0.08);
  background: linear-gradient(160deg, rgba(248,252,255,0.88), rgba(236,246,251,0.84));
  box-shadow: 0 3px 10px rgba(27,42,74,0.07);
}
.mobile-list .submenu a::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(56,189,210,0.62);
  margin-right: 8px;
  flex-shrink: 0;
}
.mobile-list .submenu a:hover {
  color: var(--accent-dark);
  background: var(--accent-50);
  box-shadow: 0 6px 14px rgba(27,42,74,0.1);
  transform: translateY(-1px);
}
.mobile-list .submenu a:active { background: var(--accent-100); }



/* ========================================
   RESPONSIVE — MOBILE (< 13" laptop ≈ < 1024px)
   ======================================== */
@media (max-width: 1024px) {
  .top-bar { display: none; }
  body { padding-top: var(--header-height); }

  .main-header { top: 0; padding: 0 16px; }
  .logo { height: 64px; }
  .logo-title h1 { font-size: 17px; }

  nav { display: none !important; }
  #hamburger { display: inline-flex !important; }

  .hero-section { margin-top: calc(-1 * var(--header-height)); padding-top: var(--header-height); }
  .hero-image-wrapper img { height: 320px; }
  .hero-text { padding: 32px 20px 40px; }
  .hero-text h1 { font-size: 28px; }

  .page-hero {
    margin-top: calc(-1 * var(--header-height));
    padding-top: calc(var(--header-height) + 40px);
    padding-bottom: 50px;
  }

  .treat-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 0 16px; }
  .treat-card { padding: 20px 16px; }
  .treat-icon { width: 44px; height: 44px; }
  .treat-icon i { font-size: 20px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  footer { padding-bottom: 160px; }

  .mega-menu { display: none !important; }

  html, body { overflow-x: hidden; }
}

/* Tablet tweaks */
@media (min-width: 600px) and (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .treat-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .hero-image-wrapper img { height: 380px; }

  .treat-card { text-align: left; }
}

/* ========================================
   RESPONSIVE — DESKTOP (13"+ laptops)
   ======================================== */
@media (min-width: 1025px) {
  .top-bar { display: block; }
  body { padding-top: calc(var(--topbar-height) + var(--header-height)); }
  .main-header { top: var(--topbar-height); }

  nav { display: block !important; }
  nav ul { display: flex !important; }
  #hamburger { display: none !important; }

  .logo { height: 80px; }
  .logo-title h1 { font-size: 20px; }
}

/* ========================================
   RESPONSIVE — PHONE (< 600px)
   ======================================== */
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .section-title { margin-bottom: 12px; }
  .section-subtitle { font-size: 14.5px; margin-bottom: 20px; }

  .hero-image-wrapper img { height: 240px; }
  .hero-text { padding: 24px 16px 32px; }
  .hero-text h1 { font-size: 24px; }
  .hero-text p { font-size: 14.5px; margin-bottom: 24px; }
  .hero-buttons { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero-buttons .btn-accent,
  .hero-buttons .btn-outline { width: 100%; justify-content: center; padding: 14px 20px; text-align: center; }

  .page-hero { padding-bottom: 40px; }
  .page-hero h1 { font-size: 26px; }
  .page-hero p { font-size: 14.5px; }

  .card-grid { grid-template-columns: 1fr; padding: 0 16px; gap: 16px; }
  .treat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 12px; }
  .treat-card {
    padding: 14px 12px;
    flex-direction: column; align-items: center; text-align: center; gap: 0;
  }
  .treat-icon { width: 38px; height: 38px; margin-bottom: 8px; flex-shrink: 0; }
  .treat-icon i { font-size: 17px; }
  .treat-card h3 { font-size: 12.5px; margin-bottom: 4px; line-height: 1.25; }
  .treat-card ul { display: none; }
  .card img { height: 180px; }

  .cta-section { padding: 40px 16px; }
  .cta-section h2 { font-size: 22px; }
  .cta-section p { font-size: 14.5px; margin-bottom: 24px; }
  .btn-white { padding: 12px 24px; font-size: 14px; }

  .intro-section { padding: 32px 16px; }
  .intro-section .intro-content p { font-size: 15px; }

  .treatments-section,
  .equipment-section { padding: 36px 0; }

  .doctor-home-section { padding: 32px 0; }
  .doctor-home-text p { font-size: 14.5px; }

  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { font-size: 12.5px; }

  .mobile-nav .mobile-list {
    width: 80vw;
    max-width: 80vw;
    margin: 5px;
    height: calc(100% - 10px);
    border-radius: 24px;
  }
  .mobile-menu-header {
    padding: 13px 13px 12px;
    border-top-left-radius: 23px;
    border-top-right-radius: 23px;
  }
  .mobile-menu-title {
    font-size: 15px;
  }
  .mobile-menu-subtitle {
    font-size: 11px;
  }
  .mobile-list > ul {
    padding: 11px 8px 14px;
  }
  .mobile-list a,
  .mobile-list .dropdown-parent {
    font-size: 14px;
    padding: 12px 11px;
    border-radius: 14px;
  }
  .mobile-link-icon {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
  .mobile-link-arrow,
  .mobile-list .dropdown-parent .arrow {
    width: 19px;
    height: 19px;
  }
  .mobile-list .submenu a {
    font-size: 13px;
    padding: 10px 10px 10px 11px;
    border-radius: 12px;
  }

  .logo-title h1 { font-size: 14px; max-width: 200px; }
  .logo { height: 52px; }
}
