/* ==========================================================================
   1. TYPOGRAPHIE ET POLICES DE SECOURS (FALLBACKS)
   ========================================================================== */

/* --- Polices Principales --- */

@font-face {
    font-family: 'Parisienne';
    src: 
        url('../fonts/Parisienne-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Sacramento';
    src: 
        url('../fonts/Sacramento-Regular.woff2') format('woff2'),
        url('../fonts/Sacramento-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: 
        url('../fonts/Roboto-Regular.woff2') format('woff2'),
        url('../fonts/Roboto-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* --- Polices de Secours (Optimisation CLS / PageSpeed) --- */

@font-face {
    font-family: 'Roboto-Fallback';
    src: local('Arial');
    size-adjust: 100.00%;
    ascent-override: 92.77%;
    descent-override: 24.41%;
    line-gap-override: 0.00%;
}

@font-face {
    font-family: 'Parisienne-Fallback';
    src: local('Times New Roman'), local('Georgia');
    size-adjust: 108.50%; 
    ascent-override: 100.78%;
    descent-override: 39.06%;
    line-gap-override: 0.00%;
}

@font-face {
    font-family: 'Sacramento-Fallback';
    src: local('Times New Roman'), local('Georgia');
    size-adjust: 110.00%;
    ascent-override: 108.80%;
    descent-override: 31.30%;
    line-gap-override: 0.00%;
}

/* ==========================================================================
   2. MENU MOBILE (THÈME SAVOY) - ACCORDÉON ANIMÉ (SMART)
   ========================================================================== */

/* Masquer le header de retour natif de Savoy (inutile avec l'accordéon) */
#nm-mobile-menu .nm-mobile-sub-menu-header {
    display: none !important;
}

/* 1. Neutraliser l'icône de base (toggle) de Savoy */
.nm-mobile-menu-main .nm-menu-toggle {
    display: none !important;
}

/* 2. Zone de clic du parent et création de la nouvelle flèche (›) */
.nm-mobile-menu-main ul li.menu-item-has-children > a {
    position: relative;
    display: block;
    padding-right: 50px !important;
    line-height: 45px;
    transition: color 0.3s ease;
}

/* Apparence de la flèche par défaut (fermée) */
.nm-mobile-menu-main ul li.menu-item-has-children > a:after {
    content: '›'; 
    font-family: Arial, sans-serif;
    position: absolute;
    right: 20px;
    top: 50%;
    font-size: 24px;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Courbe douce "Apple" */
    pointer-events: none;
}

/* Changement de couleur au clic (Menu ouvert) */
.nm-mobile-menu-main li.nm-item-open > a {
    color: #ff6b6b !important;
}

/* Rotation de la flèche vers le bas (Menu ouvert) */
.nm-mobile-menu-main li.nm-item-open > a:after {
    transform: translateY(-50%) rotate(90deg);
    color: #ff6b6b;
}

/* 3. L'Accordéon : Animation fluide du sous-menu */
.nm-mobile-menu-main .sub-menu {
    display: block !important; 
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    visibility: visible !important;
    box-shadow: none !important;
    background: transparent !important;
    
    /* Variables de base pour cacher le menu (hauteur 0) */
    height: auto !important;
    max-height: 0 !important; 
    opacity: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    
    /* Animation de la hauteur et de l'opacité */
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease !important;
}

/* Déploiement du sous-menu quand la classe nm-item-open est active */
.nm-mobile-menu-main li.nm-item-open > .sub-menu {
    max-height: 1000px !important; /* Hauteur max arbitraire assez grande pour tout révéler */
    opacity: 1 !important;
    padding-bottom: 20px !important;
}
