/*

Theme Name:   NXT Chiropractor Child

Theme URI:    https://novexthemes.com/product/nxtchiropractor-free-chiropractor-wordpress-theme/

Description:  Thème enfant de NXT Chiropractor. Permet d'ajouter des personnalisations sans modifier le thème parent.

Author:       ICT

Template:     nxt-chiropractor

Version:      1.0.0

Requires at least: 5.5

Requires PHP: 7.4

License: GNU General Public License v3 or later.

License URI: https://www.gnu.org/licenses/gpl-3.0.html

Text Domain:  nxt-chiropractor-child

*/



/* ===== Personnalisations ===== */



:root {
    --color-ink: #1A2E4A !important;
    --color-brand: #D24B16 !important;
	--color-brand-hover: #D24B16 !important;
	--color-footer-copyright : #1A2E4A !important;
}

p.site-title {
    display: none;
}



.container {
    width: 90% !important;
}



.custom-logo {

    max-height: 70px;

    margin: 10px 0px 10px 0px;

}



.footer-side {

    background-color: var(--color-ink);

}



.main-navigation a{

	font-size:1rem !important;

	letter-spacing: 0.03em !important;

}



.footer-copyright {

    background-color: var(--color-footer-copyright);

}



header.entry-header {

    display: none;

}



.content-wrapper {

    width: 90% !important;

	padding: 0px;

}



.single .site-main, .page .site-main {

    padding:0px;

}



.elementor-element > .elementor-container {

    max-width: 90% !important;

    margin: auto !important;

    justify-content: center;

    justify-items: center;

}







.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6 {

    margin-top: var(--space-3);

}



/* ===== Bouton RENDEZ-VOUS (remplace .header-search) ===== */

/* Make the header sticky */
#masthead {

    position: sticky;

    top: 0;

    z-index: 999;

    /* Nécessaire pour que #mobile-nav-panel (position:absolute) se positionne par rapport au header */
    overflow: visible;

    width: 100%;

}



.header-rdv-btn {

    display: inline-flex;

    align-items: center;

    gap: var(--space-2);

    padding: 0.6rem 1.25rem;

    border-radius:0.65rem;

    background: linear-gradient(125deg, var(--color-brand), var(--color-brand-3));

    color: #fff;

    font-weight: 700;

    letter-spacing: 0.04em;

    text-transform: uppercase;

    line-height: 1;

    text-decoration: none;

    white-space: nowrap;

    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;

}



.header-rdv-btn:hover,

.header-rdv-btn:focus {

    background: linear-gradient(125deg, var(--color-brand-hover), var(--color-brand-3));

    color: #fff;

    transform: translateY(-1px);

    box-shadow: 0 6px 16px color-mix(in srgb, var(--color-brand) 35%, transparent);

}



.header-rdv-btn:focus-visible {

    outline: 2px solid var(--color-brand);

    outline-offset: 2px;

}



.header-rdv-icon {

    display: inline-flex;

}



.header-rdv-icon svg {

    width: 1.15em;

    height: 1.15em;

    fill: currentColor;

}



.container{

	padding: 0;

}



.underline:after{

    content: "";

    display: block;

    width: 60px;

    height: 3px;

    margin-top: 3px;

    border-radius: 5px;

    background-color: var(--color-brand);

}



/* Scroll Top Button */

.scroll-top {

    position: fixed;

    bottom: 30px;

    right: 30px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: 50px;

    height: 50px;

    background-color: var(--color-brand);

    color: white;

    border: none;

    border-radius: 50%;

    cursor: pointer;

    opacity: 0;

    visibility: hidden;

    z-index: 998;

    transition: all 0.3s ease;

    box-shadow: 0 2px 10px rgba(0,0,0,0.2);

}



.scroll-top.show {

    opacity: 1;

    visibility: visible;

}



.scroll-top:hover {

    background-color: var(--color-brand-hover);

    transform: translateY(-3px);

}



.scroll-top:focus {

    outline: 2px solid var(--color-brand);

    outline-offset: 2px;

}



.scroll-top-icon {

    width: 25px;

    height: 20px;

}



span.scroll-top-icon svg

{

    width: 20px !important;

}



/* ===== Sidebar sociale fixe (remplace .header-utility) ===== */



.sticky-social-sidebar {

    position: fixed;

    left: 0;

    top: 50%;

    transform: translateY(-50%);

    z-index: 1000;

    display: flex;

    flex-direction: column;

    gap: 2px;

    background-color: var(--color-brand);

    border-radius: 0 8px 8px 0;

    padding: 8px 6px;

    box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.15);

}



.sticky-social-sidebar .utility-social-link {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 36px;

    height: 36px;

    border-radius: 6px;

    color: #fff;

    transition: background 0.2s ease, transform 0.2s ease;

    text-decoration: none;

}



.sticky-social-sidebar .utility-social-link:hover {

    background-color: rgba(255, 255, 255, 0.2);

    transform: translateX(3px);

}



.sticky-social-sidebar .utility-social-link svg {

    width: 20px;

    height: 20px;

    fill: currentColor;

}



@media (max-width: 768px) {

    .sticky-social-sidebar {

        top: auto;

        bottom: 80px;

        transform: none;

    }

}

/* Quand le menu mobile est ouvert, la sidebar passe derrière le menu.
   Explication : #masthead (position:sticky; z-index:999) crée un stacking context.
   Le menu mobile est à l'intérieur de ce contexte (z-index:10000 local).
   La sidebar fixe (z-index:1000) est dans le stacking context racine, donc
   1000 > 999 → elle passait AU-DESSUS. En la passant sous 999, elle reste derrière. */
body.mobile-menu-open .sticky-social-sidebar {
    z-index: 0;
}



/* Fix: le bouton submenu-toggle reste fixe sur la ligne du lien en mobile */

@media (max-width: 768px) {

    .main-navigation.toggled .submenu-toggle {

        top: 0.75rem;

        transform: none;

    }

}


/* ===== Mega Menu — Menu Principal ===== */

/* Le lien parent intègre le chevron en ligne */
.main-navigation .mega-menu-item-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.mega-menu-chevron {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    transition: transform 0.22s ease;
}

.mega-menu-item:hover > .mega-menu-item-link .mega-menu-chevron,
.mega-menu-item.mega-open > .mega-menu-item-link .mega-menu-chevron {
    transform: rotate(180deg);
}

/* Dropdown — position:fixed pour se placer exactement sous le header sticky
   quel que soit l'ancêtre positionné intermédiaire */
.main-navigation .mega-menu-dropdown {
    position: fixed;
    top: var(--header-height, 90px);
    left: 5%;
    right: 5%;
    background: #f5f7fa;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.14), 0 2px 10px rgba(0, 0, 0, 0.07);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    z-index: 9999;
    overflow: hidden;
    pointer-events: none;
    max-height: 80vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Trait d'accent coloré en haut du panel */
.main-navigation .mega-menu-dropdown::before {
    content: '';
    display: block;
    height: 3px;
    background: var(--color-brand, #D24B16);
    flex-shrink: 0;
}

/* Affichage au survol / à l'ouverture */
.main-navigation .mega-menu-item:hover > .mega-menu-dropdown,
.main-navigation .mega-menu-item.mega-open > .mega-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Grille de cartes
   IMPORTANT : neutralise les règles du parent (.main-navigation ul ul)
   qui ciblent tout <ul> imbriqué et le masquent (opacity:0, visibility:hidden,
   position:absolute…). Notre grille vit dans un <div>, pas dans un <li>,
   donc le sélecteur hover parent « li:hover > ul » ne la démasque jamais. */
.main-navigation .mega-menu-dropdown .mega-menu-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)) !important;
    gap: 1rem !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 1.5rem 2rem 2rem !important;
    /* Annule les valeurs héritées de .main-navigation ul ul */
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    min-width: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    z-index: auto !important;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 1.5rem 2rem 2rem;
}

/* Carte (item enfant) */
.mega-menu-card {
    list-style: none;
}

/* Neutralise les styles du nav principal dans le dropdown */
.main-navigation .mega-menu-dropdown a {
    letter-spacing: normal !important;
    text-transform: none !important;
    font-weight: inherit !important;
}

/* Spécificité haute pour écraser .main-navigation a { display:block; padding:... } du parent */
.main-navigation .mega-menu-dropdown .mega-menu-card-link {
    display: flex !important;
    flex-direction: column !important;
    text-decoration: none !important;
    padding: 0.9rem !important;
    border-radius: 12px !important;
    border: 1px solid rgba(26, 46, 74, 0.09) !important;
    background: #ffffff !important;
    color: var(--color-ink, #1A2E4A) !important;
    font-size: 0.85rem !important;
    font-weight: normal !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    height: auto !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.main-navigation .mega-menu-dropdown .mega-menu-card-link:hover {
    background: #ffffff !important;
    border-color: var(--color-brand, #D24B16) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.11);
    transform: translateY(-3px);
    color: var(--color-ink, #1A2E4A) !important;
}

/* Image de la carte */
.mega-menu-card-img {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
    margin-bottom: 0.8rem;
    background: #eef1f4;
    flex-shrink: 0;
}

/* Forcer l'affichage correct de l'image quelle que soit la règle parente */
.main-navigation .mega-menu-dropdown .mega-menu-card-img img,
.mega-menu-card-img img {
    width: 100% !important;
    height: 120px !important;
    object-fit: cover !important;
    display: block !important;
    max-width: 100% !important;
    border-radius: 0;
}

.mega-menu-card-img--placeholder {
    height: 120px;
    background: linear-gradient(135deg, #edf0f5 0%, #dfe4ed 100%);
}

/* Corps texte */
.mega-menu-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
}

.mega-menu-card-title {
    font-size: 0.88rem;
    font-weight: 700 !important;
    color: var(--color-ink, #1A2E4A) !important;
    line-height: 1.35;
    display: block;
}

.mega-menu-card-desc {
    font-size: 0.78rem;
    color: #666 !important;
    line-height: 1.5;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mega-menu-card-cta {
    display: block;
    font-size: 0.78rem;
    font-weight: 600 !important;
    color: var(--color-brand, #D24B16) !important;
    margin-top: 0.35rem;
}

/* ===== Mega Menu — Mobile (≤ 900px) : accordéon dans le menu hamburger ===== */

@media (max-width: 900px) {

    /* Sur mobile le chevron doit être à droite */
    .main-navigation.toggled .mega-menu-item-link {
        display: flex !important;
        justify-content: space-between;
        width: 100%;
    }

    /* Dropdown : inline statique (accordéon), pas floating */
    .main-navigation.toggled .mega-menu-dropdown {
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: transparent !important;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, opacity 0.25s ease, visibility 0.25s ease;
        padding: 0 !important;
    }

    .main-navigation.toggled .mega-menu-dropdown::before {
        display: none !important;
    }

    /* Ouvert */
    .main-navigation.toggled .mega-menu-item.mega-open > .mega-menu-dropdown {
        opacity: 1;
        visibility: visible;
        max-height: 700px;
        padding: 0.4rem 0 0.4rem 1.25rem !important;
        border-left: 2px solid rgba(210, 75, 22, 0.35);
    }

    /* Grille → colonne unique sur mobile */
    .main-navigation.toggled .mega-menu-grid {
        grid-template-columns: 1fr;
        padding: 0;
        gap: 0;
    }

    /* Carte mobile : ligne horizontale avec miniature */
    .main-navigation.toggled .mega-menu-dropdown .mega-menu-card-link {
        flex-direction: row !important;
        align-items: center;
        gap: 0.7rem;
        padding: 0.5rem 0.25rem !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        border-radius: 0 !important;
        height: auto;
    }

    .main-navigation.toggled .mega-menu-card-img {
        width: 38px;
        height: 38px;
        min-width: 38px;
        border-radius: 6px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .main-navigation.toggled .mega-menu-card-img img,
    .main-navigation.toggled .mega-menu-card-img--placeholder {
        height: 38px;
    }

    .main-navigation.toggled .mega-menu-card-body {
        gap: 0;
    }

    .main-navigation.toggled .mega-menu-card-title {
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.85);
    }

    /* Masquer description et CTA pour compacité */
    .main-navigation.toggled .mega-menu-card-desc,
    .main-navigation.toggled .mega-menu-card-cta {
        display: none;
    }

    /* Liens du dropdown : couleur du menu hamburger */
    .main-navigation.toggled .mega-menu-dropdown a {
        color: rgba(255, 255, 255, 0.82) !important;
    }
}

/* ===== Menu Mobile — Panneau latéral ===== */

/* Masqué sur desktop */
#mobile-nav-panel {
    display: none;
}

@media (max-width: 900px) {

    /* Quand un menu mobile est affecté : masquer le panneau du menu principal */
    body.has-mobile-menu #site-navigation .menu-wrapper {
        display: none !important;
    }

    /* Panneau : positionné sous le header sticky */
    #mobile-nav-panel {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-ink, #1A2E4A);
        max-height: 0;
        overflow: hidden;
        overflow-y: auto;
        transition: max-height 0.35s ease;
        z-index: 9998;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    }

    body.mobile-menu-open #mobile-nav-panel {
        max-height: 85vh;
    }

    /* Arbre de navigation */
    .mobile-menu {
        list-style: none;
        margin: 0;
        padding: 0.5rem 0 1.5rem;
    }

    .mobile-menu-item {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mobile-menu-item-wrap {
        display: flex;
        align-items: stretch;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    /* Lien niveau 0 */
    .mobile-menu-link--depth-0 {
        flex: 1;
        display: block;
        padding: 0.85rem 1.25rem;
        color: #fff;
        text-decoration: none;
        font-size: 0.95rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        line-height: 1.4;
        transition: color 0.2s ease, background 0.2s ease;
    }

    .mobile-menu-link--depth-0:hover,
    .mobile-menu-link--depth-0:focus {
        color: var(--color-brand, #D24B16);
        background-color: rgba(255, 255, 255, 0.04);
    }

    /* Lien niveau 1 */
    .mobile-menu-link--depth-1 {
        flex: 1;
        display: block;
        padding: 0.65rem 1.25rem 0.65rem 2.5rem;
        color: rgba(255, 255, 255, 0.78);
        text-decoration: none;
        font-size: 0.88rem;
        font-weight: 400;
        line-height: 1.4;
        transition: color 0.2s ease;
    }

    .mobile-menu-link--depth-1:hover,
    .mobile-menu-link--depth-1:focus {
        color: #fff;
    }

    /* Lien niveau 2+ */
    .mobile-menu-link--depth-2,
    .mobile-menu-link--depth-3 {
        flex: 1;
        display: block;
        padding: 0.55rem 1.25rem 0.55rem 3.75rem;
        color: rgba(255, 255, 255, 0.6);
        text-decoration: none;
        font-size: 0.82rem;
        font-weight: 400;
        line-height: 1.4;
        transition: color 0.2s ease;
    }

    .mobile-menu-link--depth-2:hover,
    .mobile-menu-link--depth-3:hover {
        color: rgba(255, 255, 255, 0.9);
    }

    /* Bouton accordéon */
    .mobile-sub-toggle {
        flex-shrink: 0;
        background: none;
        border: none;
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        color: rgba(255, 255, 255, 0.7);
        padding: 0 1.1rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: color 0.2s ease, background 0.2s ease;
    }

    .mobile-sub-toggle:hover,
    .mobile-sub-toggle:focus {
        background-color: rgba(255, 255, 255, 0.06);
        color: #fff;
    }

    .mobile-sub-chevron {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        transition: transform 0.25s ease;
    }

    .mobile-sub-toggle[aria-expanded="true"] .mobile-sub-chevron {
        transform: rotate(180deg);
    }

    /* Sous-menus : accordéon */
    .mobile-sub-menu {
        list-style: none;
        margin: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-left: 2px solid rgba(210, 75, 22, 0.45);
        margin-left: 1.25rem;
    }

    .mobile-sub-menu.open {
        max-height: 1000px;
    }

    .mobile-sub-menu .mobile-menu-item-wrap {
        border-bottom-color: rgba(255, 255, 255, 0.05);
    }

    /* Accent couleur sur l'item courant */
    .mobile-menu-item.current-menu-item > .mobile-menu-item-wrap > .mobile-menu-link,
    .mobile-menu-item.current-page-ancestor > .mobile-menu-item-wrap > .mobile-menu-link {
        color: var(--color-brand, #D24B16);
    }
}

.widget {
    background: none;
    border: none;
}

h3.widget-title.title {
    font-family: 'Space Grotesk';
    letter-spacing: 1.2px;
}

.fullwidth > .elementor-container {
    max-width: 100% !important;
    width: 100% !important;
}

.content-wrapper.page-full-width-wrapper {
    width: 100% !important;
}

.utility-social.sticky-social-sidebar {
    display: none;
}

.footer-copyright .site-info {
    justify-content: center;
}