/* ============================================
   TEMPLATE — CHARTE GRAPHIQUE
   Modifier uniquement ces variables pour
   changer toute la palette du site client
   ============================================ */
:root {
  --color-primary:       #7A9E7E;
  --color-primary-dark:  #5A7D5E;
  --color-primary-light: #B8D4BB;
  --color-bg-main:       #F7F5F1;
  --color-bg-section:    #EEE9E1;
  --color-bg-card:       #F2EDE5;
  --color-bg-white:      #FFFFFF;
  --color-text-dark:     #2C2C2A;
  --color-text-muted:    rgba(44, 44, 42, 0.65);
  --color-text-light:    rgba(44, 44, 42, 0.40);
  --font-serif:          'Cormorant Garamond', serif;
  --font-sans:           'Inter', sans-serif;
  --color-border:        rgba(122, 158, 126, 0.18);
  --color-separator:     #D9D4CB;
  --hero-overlay:        rgba(0, 0, 0, 0.38);
  --color-scrollbar-track: #F7F5F1;
  --color-scrollbar-thumb: #B8D4BB;
  --color-cabinet-1:     #7A9E7E; /* L'Hôpital-le-Grand */
  --color-cabinet-2:     #B08A63; /* Veauche */
}

/* Custom CSS for Osteopath Website */

/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Apply animations */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Navigation Link Hover Effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

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

/* Lien actif — section en cours de lecture */
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--color-primary);
}

/* Section Spacing */
section {
    scroll-margin-top: 100px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

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

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

/* Mobile Menu Animation */
#mobileMenu {
    transition: all 0.3s ease;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    section {
        scroll-margin-top: 80px;
    }

    #hero h2 {
        font-size: 2.5rem;
    }
}

/* Print Styles */
@media print {
    #navbar,
    #callButton,
    footer {
        display: none;
    }
}

.animate-fade-in { opacity: 0; }
.animate-fade-in.visible { opacity: 1; animation: fadeIn 0.8s ease-out forwards; }

/* Base — fade up (défaut) */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1s ease, transform 1s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade simple — pour les textes, titres, paragraphes */
.animate-fade {
  opacity: 0;
  transition: opacity 1.1s ease;
}
.animate-fade.visible {
  opacity: 1;
}

/* Slide depuis la gauche — pour images, blocs gauche */
.animate-from-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 1s ease, transform 1s ease;
}
.animate-from-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Slide depuis la droite — pour blocs droite, badges */
.animate-from-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 1s ease, transform 1s ease;
}
.animate-from-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Zoom léger — pour les cards "Pour qui ?" */
.animate-zoom {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.animate-zoom.visible {
  opacity: 1;
  transform: scale(1);
}

/* Hero — image de fond (photo verticale : on centre sur le miroir) */
#hero-img {
    object-position: center 40%;
}

/* Accès & Contact — carte des deux cabinets */
.cabinets-map {
    height: 300px;
    position: relative;
    z-index: 0; /* garde les calques Leaflet sous la navbar */
}
@media (min-width: 1024px) {
    .cabinets-map {
        height: 100%;
        min-height: 460px;
    }
}
.cabinets-map .leaflet-tile-pane {
    filter: saturate(0.6);
}
.cabinet-marker {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.cabinets-map .leaflet-popup-content {
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.5;
    color: var(--color-text-dark);
}
.cabinets-map .leaflet-popup-content a.popup-itineraire {
    display: inline-block;
    margin-top: 6px;
    color: var(--color-primary-dark);
    font-weight: 600;
}

/* Pastille couleur cabinet (cartes, légende, horaires) */
.cabinet-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

/* Horaires — créneaux empilés à droite */
.horaire-slots {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    text-align: right;
    font-weight: 500;
}
.horaire-slot {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Carte cabinet sélectionnée */
.cabinet-card.is-active {
    border-color: var(--color-primary);
}

/* Expertises — hover cards */
.expertise-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.expertise-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
}

/* À propos — photo portrait 4:5 desktop */
@media (min-width: 1024px) {
    #about img[src*="praticien"] {
        aspect-ratio: 4 / 5;
        width: 100%;
        height: auto;
        object-fit: cover;
        object-position: center top;
    }
}

/* À propos — photo carrée mobile */
@media (max-width: 1023px) {
    #about img[src*="praticien"] {
        aspect-ratio: 1 / 1;
        width: 100%;
        height: auto;
        object-fit: cover;
        object-position: center 20%;
    }
}

/* Hero — image portrait sur mobile */
@media (max-width: 1023px) {
    #hero {
        background-image: url('images/hero-bg-mobile.jpg') !important;
        background-position: center center !important;
        background-size: cover !important;
    }
}

/* Horaires — jour en cours */
.horaire-today {
    box-shadow: inset 4px 0 0 var(--color-primary-dark), 0 1px 3px rgba(0, 0, 0, 0.08);
    color: var(--color-primary-dark);
}
