/* ==========================================================================
   UNITAS Global Stylesheet - foundations and structural design system
   ========================================================================== */

/* 1. Imports and Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* 2. Custom Properties and Tokens */
:root {
  /* Core brand palette */
  --color-navy: #1A3A6B;
  --color-navy-rgb: 26, 58, 107;
  --color-teal: #2E7D32;
  --color-teal-rgb: 46, 125, 50;
  --color-amber: #1A3A6B;
  --color-slate: #546E7A;
  --color-white: #FFFFFF;
  --color-light-bg: #F5F5F5;
  --color-border: #E0E0E0;

  /* Typography values */
  --font-title: 'DM Serif Display', Georgia, serif;
  --font-body: 'Outfit', system-ui, -apple-system, sans-serif;

  /* Elevation and shadows */
  --shadow-sm: 0 2px 4px rgba(26, 46, 74, 0.05);
  --shadow-md: 0 4px 12px rgba(26, 46, 74, 0.08);
  --shadow-lg: 0 8px 30px rgba(26, 46, 74, 0.12);

  /* Animations */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --header-height: 96px;
  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
}

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-navy);
  background-color: var(--color-light-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 400;
  color: var(--color-navy);
  line-height: 1.25;
}

p {
  color: var(--color-slate);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

a {
  color: var(--color-teal);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-navy);
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* 4. Modern Custom Scrollbar */
@supports (scrollbar-color: var(--color-slate) var(--color-light-bg)) {
  html {
    scrollbar-color: var(--color-slate) var(--color-light-bg);
    scrollbar-width: thin;
  }
}

/* Fallback for Webkit (Chrome, Safari, newer Edge) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-light-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-slate);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-navy);
}

/* 5. Layout and Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 1.5rem;
  padding-left: 1.5rem;
}

/* 6. Typography & Headings */
.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--color-teal);
  border-radius: 2px;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--color-slate);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-align: center;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* 7. Interactive Components (Buttons & Badges) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-teal);
  color: var(--color-white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  text-transform: none;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-primary:hover {
  background-color: #166B53;
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--color-navy);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  border: 2px solid var(--color-navy);
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.btn-secondary:hover {
  background-color: var(--color-navy);
  color: var(--color-white);
  transform: translateY(-2px);
}

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

.tag {
  display: inline-flex;
  align-items: center;
  background-color: rgba(31, 140, 110, 0.1);
  color: var(--color-teal);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tag-amber {
  background-color: rgba(232, 150, 12, 0.1);
  color: var(--color-amber);
}

/* 8. Modern UI Utilities (Glassmorphism & Gradients) */
.glass-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.gradient-teal-navy {
  background: linear-gradient(135deg, var(--color-teal), var(--color-navy));
}

/* 9. Multi-language Display Logic */
[lang="en"] {
  display: none !important;
}

body.lang-en [lang="en"] {
  display: inherit !important;
}

body.lang-en [lang="fr"] {
  display: none !important;
}

/* 10. Core Layout Grid Utilities */
.grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==========================================================================
   11. Header and Navigation Styles
   ========================================================================== */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: background-color var(--transition-normal), box-shadow var(--transition-normal);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  flex-wrap: nowrap;
  gap: 0.75rem;
  padding-left: 20px;
  padding-right: 20px;
}

/* Logo brand styles */
.nav-brand {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.nav-brand:hover {
  transform: scale(1.02);
}

.nav-logo-img {
  height: 70px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.nav-brand .brand-uni {
  color: var(--color-navy);
}

.nav-brand .brand-tas {
  color: var(--color-teal);
}

/* Nav Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

/* Text Language Switcher */
.lang-switch-btn {
  background: transparent;
  border: none;
  color: var(--color-slate);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.lang-switch-btn:hover {
  color: var(--color-teal);
  transform: translateY(-1px);
}

/* Navigation Links (Desktop First default styling) */
.nav-menu-wrapper {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.nav-menu, .nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: nowrap;
  flex-shrink: 1;
  min-width: 0;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--color-navy);
  padding: 0.5rem 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-cta {
  font-size: 15px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  background-color: var(--color-teal);
  color: var(--color-white);
  border-radius: 999px;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nav-cta:hover {
  color: var(--color-white);
}

.nav-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg);
  transition: all 0.6s ease;
  z-index: 1;
}

.nav-cta:hover::before {
  left: 150%;
}

.nav-cta:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
}

.nav-cta:focus-visible {
  outline-offset: 2px;
}

.nav-cta--patient {
  background-color: #1A3A6B;
  border: 2px solid #FFFFFF;
  color: var(--color-white) !important;
}
.nav-cta--patient:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 25px rgba(26, 58, 107, 0.45);
  background-color: #0F2A55;
  cursor: pointer;
}
.nav-cta--patient:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.nav-cta--patient:focus-visible {
  outline: 2px solid #1A3A6B;
}

.nav-cta--rdv {
  background-color: #2E7D32;
  box-shadow: 0 4px 14px rgba(46, 125, 50, 0.35);
  color: var(--color-white) !important;
  border: none;
}
.nav-cta--rdv:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 125, 50, 0.45);
  cursor: pointer;
}
.nav-cta--rdv:focus-visible {
  outline: 2px solid #2E7D32;
}

@media (prefers-reduced-motion: reduce) {
  .nav-cta {
    transition: none !important;
  }
  .nav-cta:hover {
    transform: none !important;
  }
  .nav-cta::before {
    display: none !important;
  }
}
/* Occurrence fusionnée plus haut */

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-teal);
  transition: width var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-teal);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--color-teal);
  font-weight: 600;
}

/* Hamburger mobile toggle icon */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1010;
}

/* Base rules for CTA in menu */
.nav-menu-cta {
  display: none;
}

.mobile-nav-toggle .hamburger-bar {
  width: 100%;
  height: 2px;
  background-color: var(--color-navy);
  border-radius: 2px;
  transition: transform var(--transition-normal), opacity var(--transition-normal), background-color var(--transition-normal);
}

/* Mobile Responsive Overrides */
@media (max-width: 1199.98px) {
  .mobile-nav-toggle {
    display: flex;
  }

  /* Hamburger transform when menu is active */
  .mobile-nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background-color: var(--color-teal);
  }

  .mobile-nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
    opacity: 0;
  }

  .mobile-nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background-color: var(--color-teal);
  }

  /* Mobile menu panel overlay styling */
  .nav-menu-wrapper {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 88vw);
    max-width: 88vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: -10px 0 30px rgba(26, 46, 74, 0.08);
    padding: 100px 2.5rem 2rem;
    z-index: 999;
    flex-direction: column;
    align-items: flex-start;
    transition: right var(--transition-normal) cubic-bezier(0.77, 0.2, 0.05, 1);
  }

  .nav-menu-wrapper.active {
    right: 0;
  }

  .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 1.5rem;
  }

  .nav-link {
    font-size: 1.15rem;
    width: 100%;
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(26, 46, 74, 0.05);
  }
  
  .nav-link::after {
    display: none;
  }

  .nav-link.active {
    border-bottom-color: var(--color-teal);
  }

  /* Hide CTA inside actions container on small viewports, or make it responsive */
  .header-actions .nav-cta {
    display: none !important;
  }

  .nav-menu-cta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-top: 1.5rem;
  }
  /* Re-autoriser l'affichage des CTA UNIQUEMENT dans le menu mobile */
  .nav-menu-cta .nav-cta { display: inline-flex !important; width: 100%; }
  
  .nav-menu-cta--top {
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(26,46,74,0.08);
  }

  .nav-dropdown-panel,
  .nav-dropdown-panel--hours {
    position: static;
    min-width: 0;
    width: 100%;
    box-shadow: none;
    left: auto;
    right: auto;
    opacity: 1;
  }

  /* We can add mobile CTA within the menu instead */
  .nav-menu::after {
    content: "";
    width: 100%;
    height: 1px;
    background-color: rgba(26, 46, 74, 0.05);
    margin: 1rem 0;
  }
}

/* Adjust top bar spacing for target page headers if sticky */
body {
  padding-top: var(--header-height);
}

/* ==========================================================================
   12. Scroll Reveal Animations
   ========================================================================== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Delay modifiers for sequential entry effects */
.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   13. Header Language Switcher FR | EN
   ========================================================================== */
.lang-switch-btn {
  background: transparent !important;
  border: 1px solid #64748B !important; /* Fine border slate */
  padding: 4px 10px !important; /* Padding horizontal 10px */
  border-radius: 6px !important; /* Border-radius 6px */
  color: #64748B !important; /* Text slate */
  font-family: var(--font-body);
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  cursor: pointer !important;
  transition: all var(--transition-fast) !important;
  outline: none;
}

.lang-switch-btn:hover {
  border-color: var(--color-teal) !important;
  color: var(--color-teal) !important;
  transform: translateY(-1px) !important;
}

.lang-switch-btn .lang-label-fr,
.lang-switch-btn .lang-label-en {
  color: #64748B !important;
  font-weight: 400 !important;
  transition: color var(--transition-fast), font-weight var(--transition-fast);
}

/* Default state: French active (body does NOT have class lang-en) */
body:not(.lang-en) .lang-switch-btn .lang-label-fr {
  color: var(--color-teal) !important; /* Teal */
  font-weight: 700 !important; /* Gras */
}

body:not(.lang-en) .lang-switch-btn .lang-label-en {
  color: #64748B !important; /* Slate */
  font-weight: 400 !important;
}

/* Active state after click: English active (body HAS class lang-en) */
body.lang-en .lang-switch-btn .lang-label-fr {
  color: #64748B !important; /* Slate */
  font-weight: 400 !important;
}

body.lang-en .lang-switch-btn .lang-label-en {
  color: var(--color-teal) !important; /* Teal */
  font-weight: 700 !important; /* Gras */
}

/* ==========================================================================
   13. Footer Global
   ========================================================================== */

.footer {
  background-color: var(--color-navy);
  color: var(--color-white);
  padding: 100px 0 35px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  margin-bottom: 4.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .footer-grid {
    grid-template-columns: 1.4fr 0.90fr 0.90fr 0.80fr;
  }
}

.footer-brand h3 {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 1.25rem;
  letter-spacing: 0.05em;
}

.footer-brand h3 .brand-tas {
  color: var(--color-teal);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-column h4 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-white);
  margin-bottom: 1.75rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-column h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 2px;
  background-color: var(--color-teal);
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  transition: color var(--transition-fast), padding-left var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-teal);
  padding-left: 4px;
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-contact-item svg {
  color: var(--color-teal);
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.footer-contact-item span {
  line-height: 1.4;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  text-align: center;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.5);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-legal-links {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-legal-link {
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition-fast);
}

.footer-legal-link:hover {
  color: var(--color-teal);
}

.footer-lang-switch {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.8);
  padding: 0.4rem 1.1rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.footer-lang-switch:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--color-teal);
  color: var(--color-white);
}

/* ========================================================
   14. Animations & Micro-interactions globales
   ======================================================== */

/* Keyframes animations declarations */
@keyframes ctaPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(31, 140, 110, 0.35);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 6px 28px rgba(31, 140, 110, 0.65), 0 0 0 6px rgba(31, 140, 110, 0.12);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(31, 140, 110, 0.35);
  }
}

@keyframes ctaShimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

@keyframes tagBounceIn {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  70% {
    transform: scale(1.08);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 1. Bouton CTA .btn-primary — Animation principale du site */
.btn-primary {
  position: relative;
  overflow: hidden;
  animation: ctaPulse 2.4s ease-in-out infinite;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
  animation: ctaShimmer 3.2s ease-in-out infinite;
  animation-delay: 1.2s;
  pointer-events: none;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 35px rgba(31, 140, 110, 0.55), 0 0 0 8px rgba(31, 140, 110, 0.15);
  background-color: #178a5e;
  transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation-play-state: paused;
}

.btn-primary:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 4px 12px rgba(31, 140, 110, 0.4);
  transition: all 0.1s ease;
}

/* 2. Animations d'entrée au scroll — éléments .animate-on-scroll */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.22s; }
.animate-delay-3 { transition-delay: 0.34s; }
.animate-delay-4 { transition-delay: 0.46s; }
.animate-delay-5 { transition-delay: 0.58s; }
.animate-delay-6 { transition-delay: 0.70s; }

/* 3. Micro-interactions sur les cartes et FAQ */
.service-card,
.doc-card,
.service-card-wrapper,
.placeholder-card {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card:hover,
.doc-card:hover,
.service-card-wrapper:hover,
.placeholder-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(26, 46, 74, 0.13);
}

.faq-item {
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-item:hover {
  background-color: #fafbfc;
  box-shadow: 0 4px 12px rgba(26, 46, 74, 0.04);
}

/* 4. Micro-interactions sur la navigation et boutons secondaires */
.nav-link::after {
  content: "";
  display: block;
  height: 2px;
  background-color: var(--color-teal);
  width: 0;
  transition: width 0.28s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.btn-secondary {
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color var(--transition-fast), color var(--transition-fast);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 46, 74, 0.15);
}

/* 5. Animation d'entrée du hero */
.tag {
  animation: tagBounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.3s;
}

/* 6. Animations des badges langues et pills */
.lang-badge,
.founder-badge,
.tag {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lang-badge:hover,
.founder-badge:hover,
.tag:hover {
  transform: scale(1.08);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* 7. Animation du logo UNITAS */
.nav-brand {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-brand .brand-tas {
  transition: letter-spacing 0.3s ease;
}

.nav-brand:hover .brand-tas {
  letter-spacing: 0.08em;
}

/* 8. Règle globale prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn-primary {
    animation: none !important;
  }
  .btn-primary::before {
    display: none !important;
  }
}

/* ==========================================================================
   15. Logos image header et footer
   ========================================================================== */



.nav-brand:hover .nav-logo-img {
  transform: scale(1.05);
}

/* Logo dans le footer — sur fond navy, inverser si le logo est sombre */
.footer-logo-img {
  height: 52px;
  width: auto;
  display: block;
  object-fit: contain;
  margin-bottom: 1.25rem;
  filter: brightness(0) invert(1);
}

/* Responsive mobile */
@media (max-width: 767px) {
  :root {
    --header-height: 72px;
  }
  .hero-tag-wrapper {
    padding-top: 1rem;
    position: relative;
    z-index: 1;
  }
  .hero-badge-cta {
    font-size: 0.72rem;
    padding: 0.5rem 0.9rem;
    max-width: 90vw;
    white-space: normal;
    text-align: center;
  }
  .hero-desc {
    font-size: 1.05rem;
  }
  .btn-primary,
  .btn-secondary {
    font-size: 1rem;
  }
  .nav-cta {
    font-size: 0.95rem;
  }

  .nav-logo-img {
    height: 48px;
  }

  .footer-logo-img {
    height: 44px;
  }

  html {
    font-size: 16px;   /* base mobile légèrement réduite vs desktop */
  }
  p {
    font-size: 1.05rem;
    line-height: 1.8;
  }
  .section-title {
    font-size: 1.8rem;
  }
  .section-subtitle {
    font-size: 1rem;
  }
  .btn {
    font-size: 0.95rem;
  }
  .engagements-card-title,
  .engagements-desc {
    font-size: 1rem;
  }
  .nav-hours-day,
  .nav-hours-time {
    font-size: 0.95rem;
  }
}

/* ================================================================
   DROPDOWN NAVIGATION — Services & Horaires
   ================================================================ */

/* Bouton toggle — même apparence que .nav-link */
.nav-dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-navy);
  padding: 0.5rem 0;
  position: relative;
  transition: color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.dropdown-open .nav-dropdown-toggle {
  color: var(--color-teal);
}

/* Chevron animé */
.nav-chevron {
  transition: transform var(--transition-fast);
  color: inherit;
}

.nav-dropdown.dropdown-open .nav-chevron {
  transform: rotate(180deg);
}

/* Underline identique aux nav-link */
.nav-dropdown-toggle::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-teal);
  transition: width var(--transition-fast);
}

.nav-dropdown-toggle:hover::after,
.nav-dropdown.dropdown-open .nav-dropdown-toggle::after {
  width: calc(100% - 18px);
}

/* Conteneur dropdown */
.nav-dropdown {
  position: relative;
}

/* Panneau dropdown */
.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--color-white);
  border-radius: var(--border-radius-md);
  box-shadow: 0 12px 40px rgba(26, 46, 74, 0.14);
  border: 1px solid rgba(26, 46, 74, 0.07);
  min-width: 300px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  z-index: 500;
  overflow: hidden;
}

/* Petite flèche décorative en haut du panneau */
.nav-dropdown-panel::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: var(--color-white);
  border-left: 1px solid rgba(26, 46, 74, 0.07);
  border-top: 1px solid rgba(26, 46, 74, 0.07);
}

/* Panneau ouvert */
.nav-dropdown.dropdown-open .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* ── Items de dropdown Services ── */
.nav-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  transition: background-color var(--transition-fast);
  text-decoration: none;
  border-bottom: 1px solid rgba(26, 46, 74, 0.05);
}

.nav-dropdown-item:last-child {
  border-bottom: none;
}

.nav-dropdown-item:hover {
  background-color: rgba(31, 140, 110, 0.05);
}

.nav-dropdown-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(31, 140, 110, 0.1);
  color: var(--color-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.nav-dropdown-item:hover .nav-dropdown-icon {
  background: var(--color-teal);
  color: var(--color-white);
}

.nav-dropdown-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-dropdown-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-navy);
  line-height: 1.3;
  transition: color var(--transition-fast);
}

.nav-dropdown-item:hover .nav-dropdown-label {
  color: var(--color-teal);
}

.nav-dropdown-desc {
  font-size: 0.9rem;
  color: var(--color-slate);
  line-height: 1.4;
}

/* ── Panneau Horaires ── */
.nav-dropdown-panel--hours {
  min-width: 340px;
  left: auto;
  right: 0;
  transform: translateY(-6px);
  padding: 1.25rem;
}

.nav-dropdown-panel--hours::before {
  left: auto;
  right: 24px;
  transform: rotate(45deg);
}

.nav-dropdown.dropdown-open .nav-dropdown-panel--hours {
  transform: translateY(0);
}

.nav-hours-block {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.nav-hours-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-teal);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-hours-divider {
  height: 1px;
  background: rgba(26, 46, 74, 0.08);
  margin: 1rem 0;
}

.nav-hours-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.nav-hours-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.nav-hours-day {
  font-size: 0.95rem;
  color: var(--color-navy);
  font-weight: 500;
  white-space: nowrap;
}

.nav-hours-time {
  font-size: 0.95rem;
  color: var(--color-slate);
  font-weight: 600;
  text-align: right;
}

.nav-hours-time--note {
  font-size: 0.88rem;
  text-align: right;
  line-height: 1.4;
}

.nav-hours-note {
  display: block;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-slate);
  font-style: italic;
}

.nav-hours-closed {
  color: #c0392b;
  font-weight: 600;
}

/* ================================================================
   DROPDOWN — MOBILE (≤ 1199px)
   ================================================================ */
@media (max-width: 1199.98px) {

  .nav-dropdown-toggle {
    font-size: 1.15rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(26, 46, 74, 0.05);
    border-radius: 0;
  }

  .nav-dropdown-toggle::after {
    display: none;
  }

  .nav-dropdown.dropdown-open .nav-dropdown-toggle {
    border-bottom-color: var(--color-teal);
  }

  .nav-dropdown-panel {
    position: static;
    transform: none !important;
    box-shadow: none;
    border: none;
    border-radius: 0;
    border-left: 3px solid rgba(31, 140, 110, 0.3);
    margin: 0.5rem 0 0.5rem 0.5rem;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;
    min-width: unset;
    background: rgba(31, 140, 110, 0.03);
  }

  .nav-dropdown-panel::before {
    display: none;
  }

  .nav-dropdown.dropdown-open .nav-dropdown-panel {
    display: block;
    opacity: 1;
    visibility: visible;
  }

  .nav-dropdown-panel--hours {
    right: auto;
    left: auto;
    min-width: unset;
    padding: 0.75rem 1rem;
  }

  .nav-dropdown-item {
    padding: 0.85rem 0.75rem;
  }

  .nav-hours-row {
    padding: 0.2rem 0;
  }
}

/* ============================================================
   ANIMATIONS UNITAS — Vie et professionnalisme
   ============================================================ */

/* 1. Pulse discret sur le badge hero CTA */
@keyframes pulse-badge {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(232, 150, 12, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(232, 150, 12, 0);
  }
}
.hero-badge-cta {
  animation: pulse-badge 2.5s ease-in-out infinite;
}
.hero-badge-cta:hover {
  animation: none;
}

/* 2. Ligne animée sous les titres de section */
.section-title {
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-teal), var(--color-amber));
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.section-title.visible::after,
.section-title.animate-on-scroll.visible::after {
  width: 60px;
}

/* 3. Compteurs animés — style */
.stat-number {
  font-family: var(--font-title);
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-teal);
  line-height: 1;
  display: block;
}
.stat-label {
  font-size: 0.9rem;
  color: var(--color-slate);
  margin-top: 0.4rem;
  display: block;
}
.stats-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding: 2.5rem;
  background: var(--color-white);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
}
.stat-item {
  text-align: center;
  min-width: 120px;
}
.stat-item .stat-number {
  transition: color var(--transition-normal);
}
.stat-item:hover .stat-number {
  color: var(--color-amber);
}

/* 4. Renforcement hover cards services */
.service-card {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease !important;
}
.service-card:hover {
  transform: translateY(-8px) scale(1.01) !important;
  box-shadow: 0 16px 40px rgba(26, 46, 74, 0.12) !important;
}

/* 5. Entrée hero plus fluide */
@keyframes hero-fade-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero .hero-badge-cta {
  animation: hero-fade-up 0.6s ease forwards,
             pulse-badge 2.5s ease-in-out 0.6s infinite;
}
.hero h1 {
  animation: hero-fade-up 0.7s 0.15s ease both;
}
.hero p {
  animation: hero-fade-up 0.7s 0.3s ease both;
}
.hero .hero-buttons {
  animation: hero-fade-up 0.7s 0.45s ease both;
}

/* 6. Accessibilité — désactiver si préférence */
@media (prefers-reduced-motion: reduce) {
  .hero-badge-cta,
  .hero h1,
  .hero p,
  .hero .hero-buttons {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .section-title::after {
    transition: none !important;
    width: 60px;
  }
}

/* Titre hero tricolore — inline, une seule ligne */
.hero-word--blue,
.hero-word--white,
.hero-word--green {
  display: inline;
  white-space: nowrap;
}
.hero-word--blue  { color: #1A3A6B; } /* bleu des boutons */
.hero-word--white { color: #FFFFFF; } /* blanc pur */
.hero-word--green { color: #2E7D32; } /* vert des boutons */

.hw-un  { color: #1A3A6B; display: inline; white-space: nowrap; }
.hw-it  { color: #FFFFFF; display: inline; white-space: nowrap; }
.hw-as  { color: #2E7D32; display: inline; white-space: nowrap; }

/* Description courte sous le slogan */
.hero-desc {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 580px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* Bouton Devenir patient — bleu navy dans le hero */
.btn-hero-patient {
  background-color: var(--color-navy) !important;
  color: var(--color-white) !important;
  border: 2px solid var(--color-white);
}
.btn-hero-patient:hover {
  background-color: var(--color-white) !important;
  color: var(--color-navy) !important;
}

/* Bouton Prendre RDV — vert dans le hero */
.btn-hero-rdv {
  background-color: var(--color-teal) !important;
  color: var(--color-white) !important;
  border: 2px solid var(--color-teal);
}
.btn-hero-rdv:hover {
  background-color: #1B5E20 !important;
}

/* Icône dans chaque ligne acrostiche */
.acrostic-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

/* Lettre bleue */
.acrostic-letter--blue {
  background-color: var(--color-navy) !important;
  color: var(--color-white) !important;
}
.acrostic-row.acrostic-blue .acrostic-icon-wrap {
  background-color: rgba(26, 58, 107, 0.1);
  color: var(--color-navy);
}

/* Lettre verte */
.acrostic-letter--green {
  background-color: var(--color-teal) !important;
  color: var(--color-white) !important;
}
.acrostic-row.acrostic-green .acrostic-icon-wrap {
  background-color: rgba(46, 125, 50, 0.1);
  color: var(--color-teal);
}

/* Cartes highlights Services/Équipe */
.highlights-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .highlights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.highlight-card {
  background: var(--color-white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(26, 58, 107, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.highlight-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(26, 58, 107, 0.14);
}
.highlight-img-wrap {
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #1A3A6B 0%, #2E7D32 100%);
}
.highlight-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.highlight-card:hover .highlight-img-wrap img {
  transform: scale(1.05);
}
.highlight-body {
  padding: 2rem;
}
.highlight-icon {
  margin-bottom: 1rem;
}
.highlight-title {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--color-navy);
  margin-bottom: 0.75rem;
  font-weight: 400;
}
.highlight-desc {
  color: var(--color-slate);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.btn-outline-teal {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border: 2px solid var(--color-teal);
  border-radius: 999px;
  color: var(--color-teal);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.25s ease;
}
.btn-outline-teal:hover {
  background-color: var(--color-teal);
  color: var(--color-white);
}
.btn-outline-navy {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border: 2px solid var(--color-navy);
  border-radius: 999px;
  color: var(--color-navy);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.25s ease;
}
.btn-outline-navy:hover {
  background-color: var(--color-navy);
  color: var(--color-white);
}

/* ==========================================================================
   Global Responsive Safety Net
   ========================================================================== */
/* Anti-débordement horizontal global */
html, body { overflow-x: hidden; max-width: 100%; }
/* Médias jamais plus larges que leur conteneur */
img, video, svg, iframe, table { max-width: 100%; height: auto; }
/* Mots/URL longs qui cassent la mise en page */
p, h1, h2, h3, h4, li, a, span { overflow-wrap: break-word; }
/* box-sizing cohérent (ne rien faire si déjà défini globalement) */
*, *::before, *::after { box-sizing: border-box; }

/* ════ Modal Vérification Patient (RDV Gate) ════ */
  .rdv-gate-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(26,46,107,0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex; align-items: center;
    justify-content: center; padding: 1rem;
  }
  .rdv-gate-box {
    background: #fff; border-radius: 16px;
    padding: 2.5rem 2rem; max-width: 460px; width: 100%;
    position: relative; text-align: center;
    box-shadow: 0 20px 60px rgba(26,46,107,0.18);
  }
  .rdv-gate-close {
    position: absolute; top: 1rem; right: 1rem;
    background: none; border: none; cursor: pointer;
    color: #64748b; padding: 0.25rem;
    transition: color 0.2s ease;
  }
  .rdv-gate-close:hover { color: var(--color-navy); }
  .rdv-gate-icon { color: var(--color-teal); margin-bottom: 1rem; }
  .rdv-gate-title {
    font-family: var(--font-title); color: var(--color-navy);
    font-size: 1.4rem; font-weight: 700; margin-bottom: 1rem;
  }
  .rdv-gate-msg {
    color: #374151; font-size: 0.95rem;
    line-height: 1.6; margin-bottom: 1.75rem;
  }
  .rdv-gate-actions {
    display: flex; flex-direction: column; gap: 0.875rem;
  }
  .rdv-gate-btn {
    display: block; padding: 0.85rem 1.5rem;
    border-radius: 999px; font-weight: 600; font-size: 1.05rem;
    text-decoration: none; text-align: center;
    border: none; cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: var(--font-body);
  }
  .rdv-gate-btn--yes {
    background: var(--color-teal); color: #fff;
    box-shadow: 0 4px 14px rgba(46,125,50,0.35);
  }
  .rdv-gate-btn--yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46,125,50,0.45);
  }
  .rdv-gate-btn--no {
    background: #1A3A6B; color: #fff;
    box-shadow: 0 4px 14px rgba(21,101,192,0.30);
  }
  .rdv-gate-btn--no:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(21,101,192,0.40);
  }
  @media (max-width: 480px) {
    :root {
      --header-height: 68px;
    }
    .hero-tag-wrapper {
      padding-top: 1.25rem;
    }
    .rdv-gate-box { padding: 2rem 1.25rem; }
    .rdv-gate-title { font-size: 1.2rem; }
  }
