html {
  scroll-behavior: smooth;
  font-size: clamp(14px, 1.2vw, 18px);
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #1f2937;
  background: #f5f9ff;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: min(100% - 2rem, 1200px);
  margin: 0 auto;
  padding: 0 1rem;
}

.text-primary {
  color: #0f4c81;
}

.text-text {
  color: #1f2937;
}

.bg-primary {
  background-color: #0f4c81;
}

.bg-secondary {
  background-color: #eaf4ff;
}

.border-primary {
  border-color: #0f4c81;
}

.site-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-logo-frame {
  display: inline-flex;
  width: clamp(8.8rem, 18vw, 11.5rem);
  height: clamp(2.4rem, 5vw, 3.2rem);
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: visible;
  border: 0;
  background: transparent;
  padding: 0;
}

.site-logo--overlay {
  width: clamp(9.5rem, 24vw, 13rem);
  height: clamp(2.7rem, 6vw, 3.8rem);
}

.footer-bs-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.5rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 700;
  line-height: 1;
  color: #001f3f;
}

.header-menu-button {
  margin-left: clamp(0.5rem, 1.2vw, 0.9rem);
}

@media (max-width: 520px) {
  .site-logo-frame {
    width: 8.8rem;
    height: 2.4rem;
    min-width: 0;
  }

  .site-logo--overlay {
    width: 9.5rem;
    height: 2.7rem;
  }
}

.font-display {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: -0.02em;
  font-weight: 700;
}

/* Transitions et animations fluides */
* {
  transition:
    background-color 200ms ease,
    color 200ms ease,
    border-color 200ms ease;
}

/* Typography Improvements */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* Améliorations de liens */
a {
  text-decoration: none;
  color: inherit;
  transition:
    color 200ms ease,
    transform 200ms ease;
}

a:hover {
  color: #0f4c81;
}

/* Boutons améliorés */
button {
  cursor: pointer;
  font-weight: 600;
}

button:active {
  transform: scale(0.98);
}

/* Focus visible pour l'accessibilité */
:focus-visible {
  outline: 3px solid rgba(15, 76, 129, 0.4);
  outline-offset: 2px;
  border-radius: 4px;
}

.medical-gradient {
  background:
    radial-gradient(circle at 12% 20%, rgba(234, 244, 255, 0.92), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #eaf4ff 54%, #ffffff 100%);
}

.hero-overlay {
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.12), transparent 24%),
    radial-gradient(circle at 80% 18%, rgba(234, 244, 255, 0.16), transparent 28%),
    linear-gradient(135deg, #021b3a 0%, #0f4c81 58%, #06284a 100%);
  position: relative;
}

.hero-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.05), transparent);
  pointer-events: none;
}

.glass-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(234, 244, 255, 0.95);
  box-shadow: 0 24px 70px rgba(15, 76, 129, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 300ms ease;
}

.glass-card:hover {
  box-shadow: 0 32px 90px rgba(15, 76, 129, 0.18);
  transform: translateY(-2px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  gap: 1rem;
}

.nav-scrolled {
  box-shadow: 0 16px 45px rgba(15, 76, 129, 0.12);
}

.nav-scrolled .nav-inner {
  box-shadow: 0 16px 45px rgba(3, 28, 52, 0.18);
}

.header-shell {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 26%),
    radial-gradient(circle at 90% 25%, rgba(15, 76, 129, 0.08), transparent 22%);
  pointer-events: none;
}

.nav-scrolled .header-shell {
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

.overlay-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3%);
  transition:
    opacity 300ms ease,
    transform 300ms ease,
    visibility 300ms ease;
}

.overlay-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Ensure overlay content starts below the fixed header so the dark header band remains visible */
.overlay-menu > .relative.mx-auto {
  margin-top: 88px; /* matches header min-height */
}

/* Dark strip behind logo inside the overlay (matches header) */
.overlay-menu .overlay-header {
  background: linear-gradient(135deg, #021B3A 0%, #07263f 100%);
  padding: 18px 0;
  width: 100%;
  position: relative;
}

/* Ensure the site-logo inside the overlay keeps transparent background and good contrast */
.overlay-menu .site-logo-frame {
  background: transparent;
}

/* Utility to center button content vertically/horizontally */
.btn-center, a.inline-flex, a.block.inline-flex {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.overlay-bg {
  opacity: 1;
}

.menu-section button {
  width: 100%;
  text-transform: none;
}

.menu-section.open .accordion-panel {
  opacity: 1;
}

.accordion-panel {
  transition:
    max-height 320ms ease,
    opacity 320ms ease;
}

.accordion-panel a {
  display: block;
}

.overlay-menu-link {
  display: flex;
  min-height: 2.45rem;
  align-items: center;
  gap: 0.5rem;
  border-top: 1px solid #eef2f6;
  padding: 0.55rem 1.25rem;
  color: #08264a;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}

.overlay-menu-link:hover,
.overlay-menu-link.active-link {
  background: #f8fbff;
  color: #0f4c81;
}

.overlay-menu-button {
  justify-content: flex-start;
}

.overlay-menu-button i,
.digestive-submenu-link i {
  margin-left: 0.35rem;
  color: #08264a;
  font-size: 0.72rem;
  transition: transform 180ms ease;
}

.overlay-menu-child {
  padding-left: 2.25rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.digestive-submenu {
  background: #ffffff;
}

.digestive-submenu-link {
  display: flex;
  min-height: 2.45rem;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  width: 100%;
  border-top: 1px solid #eef2f6;
  padding: 0.55rem 1.25rem 0.55rem 2.25rem;
  color: #08264a;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}

.digestive-submenu-link i {
  font-size: 0.72rem;
  color: #08264a;
}

.digestive-submenu-link:hover {
  background: #f8fbff;
  color: #0f4c81;
}

.digestive-submenu-link:hover i {
  color: #0f4c81;
}

.digestive-child-panel {
  background: #ffffff;
}

.digestive-child-link {
  display: flex;
  min-height: 2.35rem;
  align-items: center;
  border-top: 1px solid #eef2f6;
  padding: 0.5rem 1.25rem 0.5rem 3.75rem;
  color: #08264a;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}

.digestive-child-link:hover {
  background: #f8fbff;
  color: #0f4c81;
}

.rotate-180 {
  transform: rotate(180deg);
}

body.overflow-hidden {
  overflow: hidden;
}

/* Sidebar fixe pour les sous-pages */
.page-sidebar {
  position: sticky;
  top: 120px;
  height: fit-content;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  transition: all 300ms ease;
}

.page-sidebar.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.toc-link {
  display: block;
  padding: 0.75rem 0;
  border-left: 3px solid transparent;
  padding-left: 1rem;
  text-decoration: none;
  color: #1f2937;
  font-weight: 500;
  transition: all 200ms ease;
}

.toc-link:hover {
  color: #0f4c81;
  border-left-color: #0f4c81;
}

.toc-link.active {
  color: #0f4c81;
  border-left-color: #0f4c81;
  font-weight: 600;
}

.dropdown-panel {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 180ms ease;
}

.dropdown:hover .dropdown-panel,
.dropdown:focus-within .dropdown-panel,
.dropdown.open .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.placeholder-frame {
  background:
    linear-gradient(135deg, rgba(234, 244, 255, 0.95), rgba(255, 255, 255, 0.72)),
    repeating-linear-gradient(45deg, rgba(15, 76, 129, 0.08) 0 10px, transparent 10px 20px);
  position: relative;
  overflow: hidden;
}

.placeholder-frame img,
.premium-image-frame img,
.hero-overlay .absolute img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.premium-image-frame {
  position: relative;
  overflow: hidden;
  border: 12px solid #0f4c81;
  border-radius: 40px;
  box-shadow: 0 34px 90px rgba(2, 27, 58, 0.22);
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, rgba(234, 244, 255, 0.95), rgba(255, 255, 255, 0.78)),
    repeating-linear-gradient(45deg, rgba(15, 76, 129, 0.08) 0 12px, transparent 12px 24px);
}

.premium-image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 48%);
  pointer-events: none;
}

.premium-image-frame > * {
  transition: transform 420ms ease;
}

.premium-image-frame:hover > * {
  transform: scale(1.045);
}

.premium-summary-card {
  border: 1px solid rgba(15, 76, 129, 0.16);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 60px rgba(2, 27, 58, 0.1);
}

.summary-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #edf2f7;
  padding: 1rem 0;
  color: #08264a;
  font-weight: 800;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.summary-link:last-child {
  border-bottom: 0;
}

.summary-link:hover {
  color: #0f4c81;
  transform: translateX(6px);
}

.summary-link .summary-icon {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eaf4ff;
  color: #0f4c81;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.summary-link:hover .summary-icon {
  background: #0f4c81;
  color: white;
  transform: rotate(-35deg);
}

.image-card {
  display: block;
  overflow: hidden;
  border-radius: 2rem;
  border: 1px solid rgba(15, 76, 129, 0.08);
  background: white;
  box-shadow: 0 30px 80px rgba(15, 76, 129, 0.12);
  transition:
    transform 240ms ease,
    box-shadow 240ms ease;
}

.image-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 34px 90px rgba(15, 76, 129, 0.18);
}

.image-card img {
  width: 100%;
  height: 14rem;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 1.5rem;
}

.card-body span {
  display: inline-flex;
  align-items: center;
}

.premium-medical-band {
  position: relative;
  overflow: hidden;
  background: #f5f9ff;
}

.premium-medical-band::before {
  content: "";
  position: absolute;
  width: 36rem;
  height: 36rem;
  border: 1px solid rgba(15, 76, 129, 0.1);
  border-radius: 999px;
  top: -14rem;
  right: -12rem;
}

.premium-content-card {
  border: 1px solid rgba(15, 76, 129, 0.1);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 70px rgba(2, 27, 58, 0.08);
}

.legacy-toc {
  margin-top: 1.5rem;
}

.section-label {
  color: #0f4c81;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 800;
}

.focus-ring:focus {
  outline: 3px solid rgba(15, 76, 129, 0.22);
  outline-offset: 3px;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 260ms ease;
}

.faq-item.active .faq-answer {
  max-height: 260px;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.nav-inner {
  position: relative;
}

.mobile-menu {
  position: absolute;
  inset: 100% 0 0;
  max-height: 0;
  width: 100%;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(15, 76, 129, 0.16);
  transition: max-height 280ms ease;
  z-index: 30;
}

.mobile-menu.open {
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mobile-nav-row {
  display: flex;
  width: 100%;
  align-items: center;
  min-height: 67px;
  border-bottom: 1px solid #eef2f6;
  padding: 1rem 2.5rem;
  color: #08264a;
  font-size: clamp(1.35rem, 3.8vw, 1.75rem);
  font-weight: 800;
  line-height: 1.15;
  text-align: left;
  transition:
    color 180ms ease,
    background-color 180ms ease;
}

.mobile-nav-row:hover,
.mobile-nav-row.active-link {
  color: #0f4c81;
  background: #f8fbff;
}

.mobile-submenu {
  display: none;
  border-bottom: 1px solid #eef2f6;
  background: #f8fbff;
  padding: 0.35rem 2.5rem 1rem;
}

.mobile-submenu a {
  display: block;
  border-radius: 6px;
  padding: 0.72rem 0.9rem;
  color: #24415f;
  font-size: 1rem;
  font-weight: 700;
}

.mobile-submenu a:hover {
  background: #eaf4ff;
  color: #0f4c81;
}

.mobile-dropdown.open .mobile-submenu {
  display: block;
}

.mobile-dropdown.open .mobile-nav-row i {
  transform: rotate(180deg);
}

.mobile-dropdown .mobile-nav-row i {
  transition: transform 180ms ease;
}

.active-link {
  color: #0f4c81;
  font-weight: 800;
}

.card-hover {
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.card-hover:hover {
  transform: translateY(-6px);
  border-color: rgba(15, 76, 129, 0.28);
  box-shadow: 0 24px 52px rgba(15, 76, 129, 0.14);
}

@media (max-width: 767px) {
  .brand-mark {
    font-size: 4.2rem;
  }

  .brand-lockup span span:first-child {
    font-size: 1.38rem;
  }

  .mobile-nav-row {
    min-height: 67px;
    padding-left: 2.5rem;
    padding-right: 2rem;
  }
}

@media (max-width: 420px) {
  .brand-mark {
    font-size: 3.75rem;
  }

  .brand-lockup {
    gap: 0.6rem;
  }

  .brand-lockup span span:first-child {
    font-size: 1.1rem;
  }

  .brand-lockup span span:last-child {
    font-size: 0.7rem;
  }

  .mobile-nav-row {
    padding-left: 1.5rem;
    padding-right: 1.25rem;
  }

  .mobile-submenu {
    padding-left: 1.5rem;
    padding-right: 1.25rem;
  }
}

/* ===== AMÉLIORATIONS PROFESSIONNELLES ===== */

/* Styles améliorés des inputs et formulaires */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #0f4c81;
  box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1);
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

/* Boutons améliorés */
button {
  position: relative;
  overflow: hidden;
}

button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition:
    width 500ms,
    height 500ms;
}

button:active::before {
  width: 200px;
  height: 200px;
}

/* Cartes d'image améliorées */
.image-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid rgba(15, 76, 129, 0.08);
  background: white;
  box-shadow: 0 30px 80px rgba(15, 76, 129, 0.12);
  transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center bottom;
}

.image-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 40px 100px rgba(15, 76, 129, 0.2);
  border-color: rgba(15, 76, 129, 0.16);
}

.image-card img {
  width: 100%;
  height: 14rem;
  object-fit: cover;
  display: block;
  transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.image-card:hover img {
  transform: scale(1.08);
}

/* Sections gradient premium */
.medical-gradient {
  background:
    radial-gradient(circle at 12% 20%, rgba(234, 244, 255, 0.92), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #eaf4ff 54%, #ffffff 100%);
}

/* Amélioration des badges et tags */
.section-label {
  display: inline-block;
  padding: 0.35rem 0;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #0f4c81 0%, #06284a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Styles des cartes avec effet de profondeur */
.premium-content-card {
  border: 1px solid rgba(15, 76, 129, 0.1);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(15, 76, 129, 0.06),
    0 24px 70px rgba(2, 27, 58, 0.08);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-content-card:hover {
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 8px 20px rgba(15, 76, 129, 0.1),
    0 32px 90px rgba(2, 27, 58, 0.12);
  transform: translateY(-2px);
}

/* Amélioration des icônes */
i {
  transition:
    transform 300ms ease,
    color 300ms ease;
}

.summary-link:hover i {
  transform: translateX(4px) rotate(10deg);
}

/* Smooth scrolling et animations de page */
@supports (scroll-behavior: smooth) {
  html {
    scroll-behavior: smooth;
  }
}

/* Accessibilité - motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Optimisation pour les petits écrans */
@media (max-width: 640px) {
  h1,
  h2 {
    letter-spacing: -0.015em;
  }

  .premium-content-card {
    border-radius: 20px;
    padding: 1.5rem;
  }
}

/* Thème sombre optionnel */
@media (prefers-color-scheme: dark) {
  body {
    background: #0f1419;
    color: #e5e7eb;
  }

  .glass-card {
    background: rgba(15, 20, 25, 0.8);
    border-color: rgba(79, 121, 172, 0.2);
  }
}
