/*
Theme Name: Orthomédoc
Description: Hello Elementor Child Theme
Author: FJSense
Template: hello-elementor
Version: 1.0.0
*/

/* ===== VARIABLES DE COULEURS ===== */
:root {
    --color-bg-light: #F7F7F7;
    --color-bg-light-transparent: rgba(249, 249, 249, 0.65);
    --color-bg-white: #FFFFFF;
    --color-bg-gray-light: #f5f5f5;
    --color-bg-gray-border: #f0f0f0;
    --color-bg-gray-medium: #e5e5e5;
    --color-primary: #397182;
    --color-primary-hover: #264B56;
    --color-accent: #CEA94A;
    --color-accent-hover: #B5933D;
    --color-text-dark: #7F826C;
    --color-text-light: #BFC3B1;
    --color-text-white: #ffffff;
    
    /* Variables d'animation */
    --transition-header: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: 0.25s ease;
    
    /* Variables de hauteur du header */
    --header-height-desktop: 120px;
    --header-height-desktop-scrolled: 75px;
    --header-height-mobile: 80px;
}

/* ===== Lightbox vidéo (EAEL Magnific Popup) - close minimal ===== */
.mfp-wrap .mfp-iframe-scaler .mfp-close {
    position: absolute;
    top: -50px;
    right: -10px;
    font-size: 40px;
    line-height: 1;
    color: #fff;
    background: none;
    border: none;
    padding: 0.2em;
    cursor: pointer;
}

.mfp-wrap .mfp-iframe-scaler .mfp-close:active,
.mfp-wrap .mfp-iframe-scaler .mfp-close:focus,
.mfp-wrap .mfp-iframe-scaler .mfp-close:hover {
    background: none;
    color: #fff;
    box-shadow: none;
}

.divider{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}
/* ===== GOOGLE FONTS (via Elementor) ===== */
/* Les fonts Roboto et Urbanist sont chargées via Elementor */
/* Utilisation des fonts dans le thème */

body,
.orthomedoc-header,
.orthomedoc-footer {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.orthomedoc-header .menu-list a {
    font-family: 'Urbanist', 'Roboto', sans-serif;
}

.orthomedoc-footer .footer-links a,
.orthomedoc-footer .footer-contact a {
    font-family: 'Roboto', sans-serif;
}

/* Urbanist pour les titres et éléments spéciaux */
.orthomedoc-footer .footer-logo-text h2,
.orthomedoc-footer .footer-nav-title,
.orthomedoc-footer h3 {
    font-family: 'Urbanist', 'Roboto', sans-serif;
}

/* Lenis - Scroll fluide */
html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

/* Accessibilité - Réduire les animations pour les utilisateurs qui le préfèrent */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Désactiver Lenis pour les utilisateurs qui préfèrent moins de mouvement */
    .lenis.lenis-smooth {
        scroll-behavior: auto;
    }
}

/* Optimisations de performance */
.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* Optimiser les animations Elementor pendant le scroll */
.elementor-widget,
.elementor-element {
    will-change: auto;
    transform: translateZ(0);
}

/* Compensation pour le header fixe - Desktop */



/* Blur léger */
.blur-sm {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Blur moyen */
.blur-md {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Blur fort */
.blur-lg {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.blur-background {
    background: var(--color-bg-light-transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ===== HEADER PERSONNALISÉ ===== */
.orthomedoc-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--color-bg-light-transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1rem 0;
    height: var(--header-height-desktop);
    transition: padding var(--transition-header), 
                box-shadow var(--transition-header),
                height var(--transition-header);
    overflow: visible; /* Permet au menu mobile de sortir du header */
}

/* will-change ajouté dynamiquement pendant la transition */
.orthomedoc-header.scrolling {
    will-change: height, padding;
}

/* Header réduit après scroll */
.orthomedoc-header.scrolled {
    padding: 0.5rem 0;
    height: var(--header-height-desktop-scrolled);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Header container */
.orthomedoc-header .header-container {
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 100%;
    overflow: hidden;
}

/* Logo */
.orthomedoc-header .header-logo {
    flex-shrink: 0;
    line-height: 0; /* Supprime l'espace sous le logo */
    margin: 0;
    padding: 0;
}

.orthomedoc-header .header-logo img {
    max-height: 100px;
    max-width: 250px;
    width: auto;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
    transition: max-height var(--transition-header), 
                max-width var(--transition-header);
    object-fit: contain;
}

/* Logo après scroll (réduit) */
.orthomedoc-header.scrolled .header-logo img {
    max-height: 80px;
    max-width: 200px;
}

.orthomedoc-header .logo-link {
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

/* Menu centré */
.orthomedoc-header .header-menu {
    flex: 1;
    display: flex;
    justify-content: center;
}

.orthomedoc-header .menu-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.2rem;
    align-items: center;
}

.orthomedoc-header .menu-list li {
    margin: 0;
}

.orthomedoc-header .menu-list a {
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 500;
    font-size: 1.1rem;
    font-family: 'Urbanist', 'Roboto', sans-serif;
    transition: color 0.3s ease;
    position: relative;
}

.orthomedoc-header .menu-list a.active,
.orthomedoc-header .menu-list a:hover {
    color: var(--color-accent-hover);
}


.orthomedoc-header .menu-list a[href^="#"] {
    cursor: pointer;
}

/* Boutons à droite */
.orthomedoc-header .header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.orthomedoc-header .btn-rdv {
    background-color: var(--color-accent);
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--color-bg-light);
    border-radius: 8px;
    padding: 14px 24px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    white-space: nowrap;
}

.orthomedoc-header .btn-rdv:hover {
    background: var(--color-accent-hover);
    box-shadow: 2px 2px 8px 0px rgba(0, 0, 0, 0.36);
    color: var(--color-bg-light);
}

.orthomedoc-header .btn-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--color-bg-gray-light);
    border-radius: 50%;
    color: var(--color-primary);
    text-decoration: none;
    transition: background 0.3s ease, 
                color 0.3s ease, 
                transform 0.3s ease;
}

.orthomedoc-header .btn-phone:hover {
    background: var(--color-primary);
    color: var(--color-text-white);
    transform: scale(1.1);
}

.orthomedoc-header .btn-phone svg {
    width: 24px;
    height: 24px;
}

/* ===== HAMBURGER MENU ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002; /* Au-dessus de tout */
    position: relative;
    outline: none;
}

/* Masquer le menu mobile sur desktop (au-dessus de 1024px) */
@media (min-width: 1025px) {
    .menu-toggle,
    .mobile-menu-dropdown {
        display: none !important;
    }
}

.menu-toggle:focus {
    outline: 2px solid var(--color-accent-hover);
    outline-offset: 2px;
    border-radius: 4px;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: var(--color-primary);
    border-radius: 2px;
    transition: transform 0.3s ease, 
                opacity 0.3s ease;
    transform-origin: center;
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

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

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* ===== MENU MOBILE DROPDOWN ===== */
.mobile-menu-dropdown {
    position: fixed;
    top: var(--header-height-desktop);
    left: 0;
    right: 0;
    width: 100%;
    height: 0;
    background: var(--color-bg-white);
    overflow: hidden;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s ease, 
                visibility 0.3s ease, 
                top var(--transition-header);
    opacity: 0;
    visibility: hidden;
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.mobile-menu-dropdown.active {
    height: calc(100vh - var(--header-height-desktop));
    opacity: 1;
    visibility: visible;
    overflow-y: auto;
}

body.header-scrolled .mobile-menu-dropdown {
    top: var(--header-height-desktop-scrolled);
}

body.header-scrolled .mobile-menu-dropdown.active {
    height: calc(100vh - var(--header-height-desktop-scrolled));
}

.mobile-menu-blur {
    position: absolute;
    inset: 0;
    background: var(--color-bg-white);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: -1;
    pointer-events: none;
}

.mobile-menu-nav {
    position: relative;
    flex: 1;
    padding: 1.5rem 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1;
}

.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-list li {
    margin: 0;
    border-bottom: 1px solid var(--color-bg-gray-border);
}

.mobile-menu-list a {
    display: block;
    padding: 1.25rem 1.5rem;
    color: var(--color-primary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    font-family: 'Urbanist', 'Roboto', sans-serif;
    transition: background var(--transition-fast), 
                color var(--transition-fast), 
                padding-left var(--transition-fast);
}

.mobile-menu-list a:hover,
.mobile-menu-list a.active {
    background: var(--color-bg-light);
    color: var(--color-accent-hover);
    padding-left: 2rem;
}

.mobile-menu-actions {
    padding: 1.5rem;
    border-top: 1px solid var(--color-bg-gray-medium);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-shrink: 0;
    background: var(--color-bg-white);
}

.mobile-menu-actions .mobile-btn-rdv {
    background-color: var(--color-accent);
    color: var(--color-bg-light);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    transition: background var(--transition-fast);
}

.mobile-menu-actions .mobile-btn-rdv:hover {
    background-color: var(--color-accent-hover);
    color: var(--color-bg-light);
}

.mobile-menu-actions .mobile-btn-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #F0F0F0;
    border-radius: 8px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: background var(--transition-fast), 
                color var(--transition-fast);
}

.mobile-menu-actions .mobile-btn-phone:hover {
    background: var(--color-primary-hover);
    color: #F0F0F0;
}

.mobile-btn-phone svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ===== RESPONSIVE ===== */

/* Grands écrans (1400px+) */
@media (min-width: 1400px) {
    .orthomedoc-header .header-logo img {
        max-height: 110px;
        max-width: 280px;
    }

    .orthomedoc-header.scrolled .header-logo img {
        max-height: 90px;
        max-width: 220px;
    }
    
    .orthomedoc-header .header-container {
        gap: 1.5rem;
    }
    
    .orthomedoc-header .menu-list {
        gap: 1.5rem;
    }
}

/* Écrans moyens-grands (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .orthomedoc-header .header-logo img {
        max-height: 105px;
        max-width: 260px;
    }
    .orthomedoc-header .menu-list a {
        font-size: 1rem;
    }
    
    .orthomedoc-header.scrolled .header-logo img {
        max-height: 85px;
        max-width: 210px;
    }
}

/* Tablettes et petits écrans (1025px - 1199px) */
@media (min-width: 1025px) and (max-width: 1199px) {
    .orthomedoc-header .header-logo img {
        max-height: 75px;
        max-width: 180px;
    }
    .orthomedoc-header .menu-list a {
        font-size: 1rem;
    }
    
    .orthomedoc-header.scrolled .header-logo img {
        max-height: 75px;
        max-width: 180px;
    }
    
    .orthomedoc-header .menu-list {
        gap: 1rem;
    }
}

/* Mobile (max-width: 1024px) */
@media (max-width: 1024px) {
    /* Header mobile - taille fixe 80px (pas de changement au scroll) */
    .orthomedoc-header {
        padding: 0;
        height: var(--header-height-mobile);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    /* Container avec padding réduit */
    .orthomedoc-header .header-container {
        padding: 0 1rem;
        height: 100%;
        display: flex;
        align-items: center;
    }
    
    /* Logo taille fixe petite */
    .orthomedoc-header .header-logo img {
        max-height: 60px;
        max-width: 200px;
    }
    
    /* Masquer éléments desktop */
    .orthomedoc-header .header-menu,
    .orthomedoc-header .btn-rdv,
    .orthomedoc-header .btn-phone {
        display: none;
    }
    
    /* Afficher menu mobile */
    .menu-toggle {
        display: flex;
    }
    
    /* Menu mobile avec hauteur fixe */
    .mobile-menu-dropdown {
        top: var(--header-height-mobile);
        transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                    opacity 0.3s ease, 
                    visibility 0.3s ease;
    }
    
    .mobile-menu-dropdown.active {
        height: calc(100vh - var(--header-height-mobile));
    }
    
    /* Empêcher le scroll du body quand le menu est ouvert */
    body.menu-open {
        overflow: hidden;
    }
}

