/* === HEADER & NAVIGATION WITH WAVE DESIGN === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.header.scrolled {
    padding: 0;
    box-shadow: var(--shadow-md);
}

/* Header Wave Design */
.header-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.1;
    transition: opacity var(--transition-normal);
    overflow: hidden;
}

.header.scrolled .header-wave {
    opacity: 0.05;
}

.header-wave svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: var(--primary-dark);
}

.header-wave path {
    animation: waveFloat 20s ease-in-out infinite;
}

.header-wave path:nth-child(1) {
    animation-delay: 0s;
    fill: var(--primary-dark);
    opacity: 0.15;
}

.header-wave path:nth-child(2) {
    animation-delay: 5s;
    fill: var(--primary);
    opacity: 0.2;
}

.header-wave path:nth-child(3) {
    animation-delay: 10s;
    fill: var(--primary-light);
    opacity: 0.25;
}

@keyframes waveFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Top Info Bar - First Line */
.top-info-bar {
    background: #fff;
    padding: 12px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

.info-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.cabinet-info {
    display: flex;
    align-items: center;
    gap: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-item i {
    color: var(--primary);
}

.info-item.two {
    margin-left: 50px;
}

.info-text {
    display: flex;
    flex-direction: column;
}

.logo-img{
    width: 60px;
    height: 60px;
    margin-right: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(58, 156, 141, 0.1);
}

.info-label {
    font-size: 0.8rem;
    color: var(--gray-3);
}

.ctr-btn{
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--primary);
    line-height: 1.2;
}

.info-value {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--dark);
    line-height: 1.2;
}

.info-value2 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
}

.fa-clock.one{
    color: var(--primary);
    font-size: large;
    font-weight: 400;
}

.top-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.call-btn, .rdv-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-normal);
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
    color: #fff !important;
}

.call-btn {
    background: var(--primary);
    color: var(--white);
}

.call-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--primary-dark);
}

.rdv-btn {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: #fff !important;
}

.rdv-btn i{
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: #fff !important;
}

.rdv-btn i::before{
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: #fff !important;
}

.rdv-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--secondary-dark), var(--secondary));
}

/* Main Navigation - Second Line */
.main-nav {
    padding: 20px 0;
    position: relative;
    z-index: 2;
    overflow: visible;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    overflow: visible;
}


@keyframes badgePulse {
    0%, 100% {
        box-shadow: var(--shadow-sm);
    }
    50% {
        box-shadow: 0 4px 20px rgba(58, 156, 141, 0.3);
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    animation: pulse 4s infinite ease-in-out;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.logo-sub {
    font-size: 0.8rem;
    color: var(--gray-3);
    margin-top: 3px;
    font-weight: 500;
}

.nav-item.mobile-buttons{
    margin-top: 120px;
}

/* Make sure buttons are clickable */
.mobile-call-btn,
.mobile-rdv-btn {
    pointer-events: auto !important;
    cursor: pointer;
    width : 350px !important;
    color: #fff !important;
}

/* Navigation Menu Styles */

.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
    margin-right: 200px; /* Space for the badge */
    flex-wrap: nowrap;
}

.nav-item {
    position: relative;
    flex-shrink: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    padding: 12px 20px;
    color: var(--dark);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.nav-link span {
    white-space: nowrap;
    font-size: 0.95rem; /* Slightly smaller font */
    line-height: 1.2;
}

/* Specifically target longer menu items with smaller font */
.nav-item:nth-child(3) .nav-link span, /* "Thérapies Avancées" */
.nav-item:nth-child(4) .nav-link span, /* "Avis des Patients" */
.nav-item:nth-child(5) .nav-link span { /* "Contact & RDV" */
    font-size: 0.9rem;
}

.nav-link i {
    font-size: 0.9rem;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(58, 156, 141, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(58, 156, 141, 0.08);
    color: var(--primary);
}

.nav-link-underline {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    transition: width var(--transition-normal);
}

.nav-link:hover .nav-link-underline,
.nav-link.active .nav-link-underline {
    width: 80%;
}

/* === DROPDOWN MENU STYLES === */
.nav-item.dropdown {
    position: relative;
    z-index: 100;
}

.dropdown-icon {
    margin-left: 5px;
    font-size: 0.8rem;
    transition: transform var(--transition-normal);
}

.nav-item.dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 280px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    z-index: 1100;
    overflow: visible;
    border: 1px solid var(--light-2);
}

.nav-item.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 30px;
    width: 16px;
    height: 16px;
    background: var(--white);
    transform: rotate(45deg);
    border-top: 1px solid var(--light-2);
    border-left: 1px solid var(--light-2);
    z-index: 1101;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: var(--dark);
    text-decoration: none;
    transition: all var(--transition-fast);
    border-bottom: 1px solid var(--light-2);
    position: relative;
    overflow: hidden;
    pointer-events: auto !important;
    cursor: pointer;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(58, 156, 141, 0.1), transparent);
    transition: left 0.5s ease;
}

.dropdown-item:hover::before {
    left: 100%;
}

.dropdown-item:hover {
    background-color: rgba(58, 156, 141, 0.05);
    color: var(--primary);
    padding-left: 25px;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--primary);
    font-size: 1.1rem;
}

.dropdown-item span {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Mobile Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 3000;
    pointer-events: auto !important;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: var(--dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Show hamburger on mobile */
@media (max-width: 992px) {
    .hamburger {
        z-index: 2001;
        display: flex;
    }
    
    .nav-link,
    .dropdown-item,
    .mobile-call-btn,
    .mobile-rdv-btn {
        pointer-events: auto !important;
        cursor: pointer !important;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 120px 20px 30px;
        transition: right 0.3s ease;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
        z-index: 2000;
        overflow-y: auto;
        margin-right: 0;
    }

    .nav-menu * {
    pointer-events: auto !important;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-item {
        margin: 0;
        width: 100%;
    }
    
    .nav-link {
        padding: 15px 20px;
        border-radius: var(--radius-md);
        margin-bottom: 5px;
        justify-content: flex-start;
    }
    
    /* Mobile dropdown styles */
    .nav-item.dropdown .dropdown-menu {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(58, 156, 141, 0.05);
        border-radius: var(--radius-md);
        margin-top: 5px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        pointer-events: auto !important;
}
    
    .nav-item.dropdown.active .dropdown-menu {
        max-height: 400px;
    }
    
    .nav-item.dropdown.active .dropdown-icon {
        transform: rotate(180deg);
    }
    
    .dropdown-menu::before {
        display: none;
    }
    
    .dropdown-item {
        pointer-events: auto !important;
        cursor: pointer;
        padding: 12px 20px 12px 40px;
        border-bottom: 1px solid rgba(58, 156, 141, 0.1);
    }
    
    .hamburger.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        padding: 80px 20px 20px;
    }
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    display: none !important;
}

/* Hide "Contact & RDV" from desktop menu */
@media (min-width: 993px) {
    .nav-item:last-child {
        display: none;
    }
    
    /* Keep top actions visible only in desktop */
    .top-actions {
        display: flex;
    }
}

/* Top info bar mobile responsive */
@media (max-width: 992px) {
    .nav-item:last-child {
        display: block;
    }
    
    /* Hide top actions buttons (they'll be in mobile menu) */
    .top-actions {
        display: none;
    }
    
    /* Keep top info bar visible */
    .top-info-bar {
        display: block;
        padding: 10px 0;
    }
    
    .info-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .cabinet-info {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .info-item {
        margin-left: 0 !important;
        justify-content: center;
        width: 100%;
    }
    
    .info-item.two {
        margin-left: 0 !important;
    }
    
    /* Mobile call buttons in menu */
    .mobile-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid var(--gray-1);
    }
    
    .mobile-call-btn, .mobile-rdv-btn {
        color: #fff !important;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 15px 20px;
        border-radius: var(--radius-lg);
        font-family: var(--font-heading);
        font-weight: 600;
        text-decoration: none;
        transition: all var(--transition-normal);
        text-align: center;
        width: 100%;
        font-size: 1rem;
    }
    
    .mobile-call-btn {
        background: var(--primary);
        color: var(--white);
    }
    
    .mobile-call-btn:hover {
        background: var(--primary-dark);
        transform: translateY(-2px);
    }
    
    .mobile-rdv-btn {
        background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
        color: #fff !important;
        margin-top: 10px;
    }
    
    .mobile-rdv-btn:hover {
        background: linear-gradient(135deg, var(--secondary-dark), var(--secondary));
        transform: translateY(-2px);
    }
}

@media (max-width: 768px) {
    .info-container {
        padding: 0 15px;
    }
    
    .logo-img {
        width: 50px;
        height: 50px;
        margin-right: 15px;
    }
    
    .info-value {
        font-size: 1.1rem;
    }
    
    .info-value2 {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .info-item {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .logo-img {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .info-text {
        align-items: center;
    }
    
    .nav-menu {
        width: 85%;
        padding: 90px 15px 20px;
    }
}

/* Add missing animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   CORRECTIONS POUR DROPDOWN MOBILE
   ============================================ */

@media (max-width: 992px) {
    /* 1. Style du dropdown sur mobile */
    .nav-item.dropdown .dropdown-menu {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        display: block !important; /* FORCE l'affichage */
        opacity: 1 !important;
        visibility: visible !important;
        position: static !important;
        box-shadow: none !important;
        border: none !important;
        background: rgba(58, 156, 141, 0.05) !important;
    }
    
    /* 2. Quand le dropdown est actif */
    .nav-item.dropdown.active .dropdown-menu {
        max-height: 400px !important;
        overflow: visible !important;
    }
    
    /* 3. Style des liens dans le dropdown */
    .dropdown-item {
        padding: 12px 20px !important;
        border-bottom: 1px solid rgba(58, 156, 141, 0.1) !important;
        pointer-events: auto !important;
        cursor: pointer !important;
    }
    
    /* 4. Icone de flèche */
    .nav-item.dropdown.active .dropdown-icon {
        transform: rotate(180deg) !important;
    }
    
    /* 5. Assurer que le menu mobile est visible */
    .nav-menu.active {
        display: flex !important;
        right: 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* 6. Overlay */
    .mobile-menu-overlay.active {
        display: block !important;
        opacity: 1 !important;
    }
}

/* ============================================
   STYLES GÉNÉRAUX POUR TOUS LES ÉCRANS
   ============================================ */

/* Assurer que les liens sont cliquables */
.nav-link, .dropdown-item {
    cursor: pointer !important;
}

/* Empêcher le scroll quand menu ouvert */
body.menu-open {
    overflow: hidden !important;
}

/* ==================== CORRECTION MENU ACTIF ==================== */
.nav-link.active {
    color: var(--primary) !important;
    position: relative;
    font-weight: 600;
}

.nav-link.active .nav-link-underline {
    width: 100%;
    opacity: 1;
    background-color: var(--primary);
}

.nav-link.active i {
    color: var(--primary) !important;
}

/* Pour le dropdown ouvert */
.nav-item.dropdown:hover .nav-link.active {
    background-color: rgba(66, 183, 165, 0.1);
}

/* Animation du soulignement */
.nav-link-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary);
    border-radius: 2px;
    transition: width 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.nav-link.active .nav-link-underline {
    width: 100%;
    opacity: 1;
}

/* Assurer que le lien actif reste visible */
.nav-item .nav-link.active {
    pointer-events: auto;
}

/* Correction pour le hover sur le lien actif */
.nav-link.active:hover {
    color: var(--primary-dark) !important;
}

.nav-link.active:hover .nav-link-underline {
    background-color: var(--primary-dark);
}

/* ==================== CORRECTION ULTIME POUR LE MENU THÉRAPIES ==================== */

/* Règle ABSOLUE : Sur la page Therapies, seul le lien Therapies peut être actif */
body[data-current-page="therapies"] .nav-link.active:not([href*="therapies.html"]):not(:has(i.fa-hand-holding-medical)),
body.therapies-page .nav-link.active:not([href*="therapies.html"]):not(:has(i.fa-hand-holding-medical)) {
    color: var(--dark) !important;
    background-color: transparent !important;
    font-weight: normal !important;
}

body[data-current-page="therapies"] .nav-link.active:not([href*="therapies.html"]):not(:has(i.fa-hand-holding-medical)) .nav-link-underline,
body.therapies-page .nav-link.active:not([href*="therapies.html"]):not(:has(i.fa-hand-holding-medical)) .nav-link-underline {
    width: 0 !important;
    opacity: 0 !important;
    background-color: transparent !important;
}

/* Règle ABSOLUE : Sur la page Therapies, le lien Therapies DOIT être actif */
body[data-current-page="therapies"] a[href="therapies.html"],
body.therapies-page a[href="therapies.html"],
body[data-current-page="therapies"] .nav-link:has(i.fa-hand-holding-medical),
body.therapies-page .nav-link:has(i.fa-hand-holding-medical) {
    color: var(--primary) !important;
    font-weight: 600 !important;
    background-color: rgba(66, 183, 165, 0.1) !important;
}

body[data-current-page="therapies"] a[href="therapies.html"] .nav-link-underline,
body.therapies-page a[href="therapies.html"] .nav-link-underline,
body[data-current-page="therapies"] .nav-link:has(i.fa-hand-holding-medical) .nav-link-underline,
body.therapies-page .nav-link:has(i.fa-hand-holding-medical) .nav-link-underline {
    width: 100% !important;
    opacity: 1 !important;
    background-color: var(--primary) !important;
}

/* Désactiver toutes les animations de changement de menu sur la page Therapies */
body[data-current-page="therapies"] .nav-link,
body.therapies-page .nav-link {
    transition: none !important;
}

/* Empêcher le hover de changer la couleur sur la page Therapies */
body[data-current-page="therapies"] .nav-link:not([href*="therapies.html"]):not(:has(i.fa-hand-holding-medical)):hover,
body.therapies-page .nav-link:not([href*="therapies.html"]):not(:has(i.fa-hand-holding-medical)):hover {
    color: var(--dark) !important;
    background-color: transparent !important;
}

/* Style IMPORTANT pour forcer l'affichage */
.nav-link.active[href="therapies.html"],
.nav-link.active:has(i.fa-hand-holding-medical) {
    color: #42b7a5 !important;
    background-color: rgba(66, 183, 165, 0.1) !important;
    border-radius: 8px !important;
}

.nav-link.active[href="therapies.html"] i,
.nav-link.active:has(i.fa-hand-holding-medical) i {
    color: #42b7a5 !important;
}

/* Supprimer le style actif de "Nos Services" */
.nav-link[href="#"]:not([href*="therapies.html"]):not(:has(i.fa-hand-holding-medical)) {
    color: var(--dark) !important;
    background-color: transparent !important;
}

.nav-link[href="#"]:not([href*="therapies.html"]):not(:has(i.fa-hand-holding-medical)) .nav-link-underline {
    width: 0 !important;
    opacity: 0 !important;
}

/* ==================== CORRECTION SPÉCIFIQUE POUR LE MENU CONTACT ==================== */

/* Règle ABSOLUE : Sur la page Contact, seul le lien Contact peut être actif */
body[data-current-page="contact"] .nav-link.active:not([href*="contact.html"]):not(:has(i.fa-phone)),
body.contact-page .nav-link.active:not([href*="contact.html"]):not(:has(i.fa-phone)) {
    color: var(--dark) !important;
    background-color: transparent !important;
    font-weight: normal !important;
}

body[data-current-page="contact"] .nav-link.active:not([href*="contact.html"]):not(:has(i.fa-phone)) .nav-link-underline,
body.contact-page .nav-link.active:not([href*="contact.html"]):not(:has(i.fa-phone)) .nav-link-underline {
    width: 0 !important;
    opacity: 0 !important;
    background-color: transparent !important;
}

/* Règle ABSOLUE : Sur la page Contact, le lien Contact DOIT être actif */
body[data-current-page="contact"] a[href="contact.html"],
body.contact-page a[href="contact.html"],
body[data-current-page="contact"] .nav-link:has(i.fa-phone),
body.contact-page .nav-link:has(i.fa-phone) {
    color: var(--primary) !important;
    font-weight: 600 !important;
    background-color: rgba(66, 183, 165, 0.1) !important;
}

body[data-current-page="contact"] a[href="contact.html"] .nav-link-underline,
body.contact-page a[href="contact.html"] .nav-link-underline,
body[data-current-page="contact"] .nav-link:has(i.fa-phone) .nav-link-underline,
body.contact-page .nav-link:has(i.fa-phone) .nav-link-underline {
    width: 100% !important;
    opacity: 1 !important;
    background-color: var(--primary) !important;
}

/* Désactiver les animations sur la page Contact */
body[data-current-page="contact"] .nav-link,
body.contact-page .nav-link {
    transition: none !important;
}

/* Empêcher le hover sur la page Contact */
body[data-current-page="contact"] .nav-link:not([href*="contact.html"]):not(:has(i.fa-phone)):hover,
body.contact-page .nav-link:not([href*="contact.html"]):not(:has(i.fa-phone)):hover {
    color: var(--dark) !important;
    background-color: transparent !important;
}

/* Style IMPORTANT pour forcer l'affichage */
.nav-link.active[href="contact.html"],
.nav-link.active:has(i.fa-phone) {
    color: #42b7a5 !important;
    background-color: rgba(66, 183, 165, 0.1) !important;
    border-radius: 8px !important;
}

.nav-link.active[href="contact.html"] i,
.nav-link.active:has(i.fa-phone) i {
    color: #42b7a5 !important;
}

/* ==================== CORRECTION DES ICÔNES "NOS SERVICES" ==================== */

/* Désactiver la couleur verte pour l'icône stethoscope et la flèche sur la page Therapies */
body[data-current-page="therapies"] .nav-link:has(i.fa-stethoscope) i,
body.therapies-page .nav-link:has(i.fa-stethoscope) i {
    color: var(--dark) !important;
}

/* Spécifiquement pour la flèche dropdown */
body[data-current-page="therapies"] .nav-link:has(i.fa-stethoscope) .dropdown-icon,
body.therapies-page .nav-link:has(i.fa-stethoscope) .dropdown-icon {
    color: var(--gray-2) !important;
}

/* Sur la page Therapies, désactiver le hover pour l'icône stethoscope */
body[data-current-page="therapies"] .nav-link:has(i.fa-stethoscope):hover i,
body.therapies-page .nav-link:has(i.fa-stethoscope):hover i {
    color: var(--dark) !important;
}

/* Sur la page Therapies, désactiver la rotation de la flèche */
body[data-current-page="therapies"] .nav-item.dropdown:has(i.fa-stethoscope):hover .dropdown-icon,
body.therapies-page .nav-item.dropdown:has(i.fa-stethoscope):hover .dropdown-icon {
    transform: rotate(0deg) !important;
}

/* ==================== CORRECTION GÉNÉRALE POUR LES ICÔNES ==================== */

/* Règle générale : Les icônes dans les liens non-actifs doivent être sombres */
.nav-link:not(.active) i:not(.fa-hand-holding-medical) {
    color: var(--dark) !important;
}

/* Spécifiquement pour l'icône stethoscope - toujours sombre sur la page Therapies */
body[data-current-page="therapies"] .fa-stethoscope,
body.therapies-page .fa-stethoscope {
    color: var(--dark) !important;
}

/* Empêcher le changement de couleur au hover sur la page Therapies */
body[data-current-page="therapies"] .nav-link:has(i.fa-stethoscope):hover .fa-stethoscope,
body.therapies-page .nav-link:has(i.fa-stethoscope):hover .fa-stethoscope {
    color: var(--dark) !important;
}

/* ==================== CORRECTION SPÉCIFIQUE POUR LA FLÈCHE ==================== */

/* La flèche doit toujours être grise, sauf quand le dropdown est actif (et PAS sur la page Therapies) */
.dropdown-icon {
    color: var(--gray-2) !important;
}

body:not([data-current-page="therapies"]) .nav-item.dropdown:hover .dropdown-icon,
body:not(.therapies-page) .nav-item.dropdown:hover .dropdown-icon {
    color: var(--primary) !important;
}

/* Sur la page Therapies, la flèche doit rester grise */
body[data-current-page="therapies"] .dropdown-icon,
body.therapies-page .dropdown-icon {
    color: var(--gray-2) !important;
}

body[data-current-page="therapies"] .nav-item.dropdown:hover .dropdown-icon,
body.therapies-page .nav-item.dropdown:hover .dropdown-icon {
    color: var(--gray-2) !important;
    transform: rotate(0deg) !important;
}

/* ==================== RÈGLES DE PRIORITÉ ==================== */

/* Assurer que ces règles ont la plus haute priorité */
.nav-link i.fa-stethoscope {
    color: var(--dark) !important;
}

.nav-link.active i.fa-stethoscope {
    color: var(--dark) !important;
}

/* Règle ABSOLUE pour la page Therapies */
body[data-current-page="therapies"] .nav-link i,
body.therapies-page .nav-link i {
    color: var(--dark) !important;
}

body[data-current-page="therapies"] .nav-link.active i.fa-hand-holding-medical,
body.therapies-page .nav-link.active i.fa-hand-holding-medical {
    color: var(--primary) !important;
}

/* ============================================
   CORRECTION ULTIME POUR TOUTES LES PAGES
   ============================================ */

/* ==================== PAGE CONTACT ==================== */

/* Règle ABSOLUE pour la page Contact */
body[data-current-page="contact"] .nav-link:has(i.fa-phone),
body.contact-page .nav-link:has(i.fa-phone) {
    color: #42b7a5 !important;
    background-color: rgba(66, 183, 165, 0.1) !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
}

body[data-current-page="contact"] .nav-link:has(i.fa-phone) i,
body.contact-page .nav-link:has(i.fa-phone) i {
    color: #42b7a5 !important;
}

body[data-current-page="contact"] .nav-link:has(i.fa-phone) .nav-link-underline,
body.contact-page .nav-link:has(i.fa-phone) .nav-link-underline {
    width: 100% !important;
    opacity: 1 !important;
    background-color: #42b7a5 !important;
}

/* Icône stethoscope NOIRE sur Contact */
body[data-current-page="contact"] .nav-link:has(i.fa-stethoscope) i,
body.contact-page .nav-link:has(i.fa-stethoscope) i {
    color: #333 !important;
}

/* Icône hand-holding-medical NOIRE sur Contact */
body[data-current-page="contact"] .nav-link:has(i.fa-hand-holding-medical) i,
body.contact-page .nav-link:has(i.fa-hand-holding-medical) i {
    color: #333 !important;
}

/* ==================== PAGE THÉRAPIES ==================== */

/* Règle ABSOLUE pour la page Thérapies */
body[data-current-page="therapies"] .nav-link:has(i.fa-hand-holding-medical),
body.therapies-page .nav-link:has(i.fa-hand-holding-medical) {
    color: #42b7a5 !important;
    background-color: rgba(66, 183, 165, 0.1) !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
}

body[data-current-page="therapies"] .nav-link:has(i.fa-hand-holding-medical) i,
body.therapies-page .nav-link:has(i.fa-hand-holding-medical) i {
    color: #42b7a5 !important;
}

body[data-current-page="therapies"] .nav-link:has(i.fa-hand-holding-medical) .nav-link-underline,
body.therapies-page .nav-link:has(i.fa-hand-holding-medical) .nav-link-underline {
    width: 100% !important;
    opacity: 1 !important;
    background-color: #42b7a5 !important;
}

/* Icône stethoscope NOIRE sur Thérapies */
body[data-current-page="therapies"] .nav-link:has(i.fa-stethoscope) i,
body.therapies-page .nav-link:has(i.fa-stethoscope) i {
    color: #333 !important;
}

/* Icône phone NOIRE sur Thérapies */
body[data-current-page="therapies"] .nav-link:has(i.fa-phone) i,
body.therapies-page .nav-link:has(i.fa-phone) i {
    color: #333 !important;
}

/* ==================== DÉSACTIVER TOUTES LES AUTRES ICÔNES ==================== */

/* Désactiver toutes les icônes sauf celles actives */
body[data-current-page="contact"] .nav-link:not(:has(i.fa-phone)) i,
body.contact-page .nav-link:not(:has(i.fa-phone)) i,
body[data-current-page="therapies"] .nav-link:not(:has(i.fa-hand-holding-medical)) i,
body.therapies-page .nav-link:not(:has(i.fa-hand-holding-medical)) i {
    color: #333 !important;
}

/* Supprimer les soulignements des autres liens */
body[data-current-page="contact"] .nav-link:not(:has(i.fa-phone)) .nav-link-underline,
body.contact-page .nav-link:not(:has(i.fa-phone)) .nav-link-underline,
body[data-current-page="therapies"] .nav-link:not(:has(i.fa-hand-holding-medical)) .nav-link-underline,
body.therapies-page .nav-link:not(:has(i.fa-hand-holding-medical)) .nav-link-underline {
    width: 0 !important;
    opacity: 0 !important;
    background-color: transparent !important;
}

/* ==================== CORRECTION DES FLÈCHES DROPDOWN ==================== */

/* Flèche NOIRE sur Contact et Thérapies (pour stethoscope) */
body[data-current-page="contact"] .nav-link:has(i.fa-stethoscope) .dropdown-icon,
body.contact-page .nav-link:has(i.fa-stethoscope) .dropdown-icon,
body[data-current-page="therapies"] .nav-link:has(i.fa-stethoscope) .dropdown-icon,
body.therapies-page .nav-link:has(i.fa-stethoscope) .dropdown-icon {
    color: #777 !important;
}

/* Pas de rotation sur Contact et Thérapies */
body[data-current-page="contact"] .nav-item.dropdown:has(i.fa-stethoscope):hover .dropdown-icon,
body.contact-page .nav-item.dropdown:has(i.fa-stethoscope):hover .dropdown-icon,
body[data-current-page="therapies"] .nav-item.dropdown:has(i.fa-stethoscope):hover .dropdown-icon,
body.therapies-page .nav-item.dropdown:has(i.fa-stethoscope):hover .dropdown-icon {
    transform: rotate(0deg) !important;
}

/* ==================== RÈGLES DE PRIORITÉ MAXIMALE ==================== */

/* Forcer la couleur des icônes actives */
.nav-link.active i.fa-phone,
.nav-link.active i.fa-hand-holding-medical {
    color: #42b7a5 !important;
}

/* Forcer la couleur NOIRE des icônes inactives sur ces pages */
body.contact-page .nav-link:not(.active) i,
body[data-current-page="contact"] .nav-link:not(.active) i,
body.therapies-page .nav-link:not(.active) i,
body[data-current-page="therapies"] .nav-link:not(.active) i {
    color: #333 !important;
}

/* Exception: Icônes actives doivent être vertes */
body.contact-page .nav-link.active i.fa-phone,
body[data-current-page="contact"] .nav-link.active i.fa-phone,
body.therapies-page .nav-link.active i.fa-hand-holding-medical,
body[data-current-page="therapies"] .nav-link.active i.fa-hand-holding-medical {
    color: #42b7a5 !important;
}

