/*
===============================================================================
Fichier     : ava.css
Projet      : SkinZenitude Framework
Module      : Ava
Description : Styles communs du module Ava — navigation par panneaux de verre
===============================================================================
*/


/* ==========================================================================
   AVA — CONTENEUR
========================================================================== */

#ava {

    position: absolute;

height: auto;

    z-index: 10;

    cursor: pointer;

    opacity: 0;

    transform: scale(0.82);

    transition:
        opacity 3s ease,
        transform 3.2s cubic-bezier(0.22, 1, 0.36, 1);

}


/* ==========================================================================
   AVA — APPARITION
========================================================================== */

#ava.ava-visible {

    opacity: 1;

    transform: scale(1);

}


/* ==========================================================================
   LOTUS PRINCIPAL
========================================================================== */

#ava .ava-lotus {

    display: block;

    width: 100%;
    height: auto;

    opacity: 0.72;

    transition:
        opacity 0.4s ease,
        transform 0.4s ease,
        filter 0.4s ease;

}


/* ==========================================================================
   NOM D'AVA
========================================================================== */

#ava .ava-name {

    position: absolute;

    left: 50%;
    top: 50%;

    transform:
        translate(-50%, -50%);

    z-index: 2;

    font-family:
        "Parisienne",
        "Allura",
        "Ballet",
        "Segoe Script",
        cursive;

    font-size: 0.55em;

    font-weight: 400;
    font-style: normal;

    letter-spacing: 0.02em;

    color:
        rgba(105, 70, 115, 0.34);

    text-shadow:
        1px 1px 1px rgba(255, 255, 255, 0.65),
        -1px -1px 1px rgba(105, 70, 115, 0.06);

    pointer-events: none;

    transition:
        opacity 0.3s ease,
        transform 0.35s ease;

}


/* ==========================================================================
   SURVOL — AVA
========================================================================== */

#ava:hover .ava-lotus {

    opacity: 1;

    transform:
        scale(1.08);

    filter:
        drop-shadow(
            0 8px 16px
            rgba(100, 65, 115, 0.14)
        );

}


/* ==========================================================================
   SURVOL — NOM
========================================================================== */

#ava:hover .ava-name {

    opacity: 0;

    transform:
        translate(-50%, -55%);

}


/* ==========================================================================
   PANNEAUX AVA — ÉTAT INITIAL
========================================================================== */

#ava .ava-child {

    position: absolute;

    display: block;

    width: max-content;

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    text-decoration: none;

    /*
     * IMPORTANT
     *
     * Le JavaScript définit left et top comme
     * le CENTRE du panneau.
     *
     * Le translate permet donc de placer le centre
     * du panneau exactement sur le point calculé.
     */

    transform:
        translate(-50%, -50%)
        scale(0.75);

    transform-origin:
        center center;

    transition:
        opacity 0.6s ease,
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0.7s;

}


/* ==========================================================================
   PANNEAUX AVA — OUVERTURE
========================================================================== */

#ava.ava-open .ava-child {

    opacity: 1;

    visibility: visible;

    pointer-events: auto;

    transform:
        translate(-50%, -50%)
        scale(1);

    transition:
        opacity 0.7s ease,
        transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0s;

}


/* ==========================================================================
   PANNEAU DE VERRE
========================================================================== */

#ava .ava-panel {

    display: block;

    width: max-content;

    padding:
        0.25em
        0.60em;

    box-sizing: border-box;

    white-space: nowrap;

    border-radius: 0.55em;

    background:
        rgba(112, 72, 150, 0.20);

    border:
        1px solid
        rgba(255, 255, 255, 0.42);

    backdrop-filter:
        blur(8px);

    -webkit-backdrop-filter:
        blur(8px);

    color:
        rgba(255, 255, 255, 0.94);

    font-family:
        "Cormorant Garamond",
        Georgia,
        serif;

    font-size: 0.82rem;

    font-weight: 500;

    letter-spacing: 0.02em;

    line-height: 1.1;

    text-align: center;

    text-shadow:
        0 1px 3px
        rgba(70, 45, 80, 0.30);

    box-shadow:
        0 5px 18px
        rgba(70, 45, 90, 0.10);

    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease;

}


/* ==========================================================================
   SURVOL — PANNEAU
========================================================================== */

#ava .ava-child:hover .ava-panel {

    background:
        rgba(112, 72, 150, 0.34);

    border-color:
        rgba(255, 255, 255, 0.68);

    box-shadow:
        0 8px 22px
        rgba(70, 45, 90, 0.18);

    transform:
        translateY(-2px);

}


/* ==========================================================================
   MOBILE
========================================================================== */

@media (max-width: 768px) {

    #ava {

        width: 15%;
        height: auto;

    }


    #ava .ava-name {

        font-size: 0.55em;

    }


    #ava .ava-child {

        transform:
            translate(-50%, -50%)
            scale(0.75);

    }


    #ava.ava-open .ava-child {

        transform:
            translate(-50%, -50%)
            scale(1);

    }


    #ava .ava-panel {

        font-size: 0.82rem;

        padding:
            0.25em
            0.60em;

    }

}

/* ==========================================================================
   AVA — ESPACE BOUTIQUE ET PARCOURS DE COMMANDE
========================================================================== */

.sz-ava-commerce {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 104px;
    height: 104px;
    z-index: 10000;
    pointer-events: none;
}

.sz-ava-commerce #ava {
    pointer-events: auto;
}

.sz-ava-commerce #ava .ava-child {
    z-index: 2;
}

@media (max-width: 600px) {
    .sz-ava-commerce {
        top: 8px;
        right: 8px;
        width: 82px;
        height: 82px;
    }
}


/* ==========================================================================
   Boutique — MENU MOBILE VERTICAL SANS ENCADREMENT
   Mode activé uniquement par la page FR/boutique. Les liens restent
   positionnés absolument par rapport à #ava et suivent le document.
========================================================================== */
@media (max-width: 768px) {
    #ava[data-ava-mobile-layout="vertical-text"] .ava-child {
        width: max-content;
        max-width: 62vw;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 3px 0;
        transform: translate(-50%, -50%) scale(.94);
        transform-origin: center;
    }

    #ava[data-ava-mobile-layout="vertical-text"].ava-open .ava-child {
        transform: translate(-50%, -50%) scale(1);
    }

    #ava[data-ava-mobile-layout="vertical-text"] .ava-panel {
        display: block;
        max-width: 62vw;
        padding: 5px 2px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        color: #fffdf5;
        font-size: clamp(15px, 4.1vw, 18px);
        line-height: 1.15;
        text-align: right;
        white-space: normal;
        text-shadow:
            0 1px 3px rgba(45, 49, 37, .95),
            0 0 7px rgba(45, 49, 37, .55);
    }

    #ava[data-ava-mobile-layout="vertical-text"] .ava-child:hover .ava-panel,
    #ava[data-ava-mobile-layout="vertical-text"] .ava-child:focus-visible .ava-panel {
        background: transparent;
        border: 0;
        box-shadow: none;
        transform: none;
    }
}


/* ==========================================================================
   AVA — TOUTES LES PAGES FR : MENU MOBILE VERTICAL ET ALPHABÉTIQUE
   Les coordonnées inline calculées par les anciens scripts circulaires sont
   neutralisées ici. Le tri est effectué dans ava.php sur les libellés.
========================================================================== */
@media (max-width: 768px) {
    #ava[data-ava-mobile-layout="vertical-text"] {
        z-index: 1000;
    }

    #ava[data-ava-mobile-layout="vertical-text"] .ava-child {
        position: absolute !important;
        left: 50% !important;
        top: calc(100% + 0px) !important;
        width: max-content;
        max-width: min(78vw, 320px);
        min-height: 25px;
        padding: 0 !important;
        margin: 0;
        transform: translate(-50%, 0) scale(.96) !important;
        transform-origin: top center;
        display: block;
        text-align: center;
        z-index: 1001;
    }

    #ava[data-ava-mobile-layout="vertical-text"].ava-open .ava-child {
        transform: translate(-50%, 0) scale(1) !important;
    }

    #ava[data-ava-mobile-layout="vertical-text"] .ava-child:nth-of-type(1) { top: calc(100% + 0px) !important; }
    #ava[data-ava-mobile-layout="vertical-text"] .ava-child:nth-of-type(2) { top: calc(100% + 27px) !important; }
    #ava[data-ava-mobile-layout="vertical-text"] .ava-child:nth-of-type(3) { top: calc(100% + 54px) !important; }
    #ava[data-ava-mobile-layout="vertical-text"] .ava-child:nth-of-type(4) { top: calc(100% + 81px) !important; }
    #ava[data-ava-mobile-layout="vertical-text"] .ava-child:nth-of-type(5) { top: calc(100% + 108px) !important; }
    #ava[data-ava-mobile-layout="vertical-text"] .ava-child:nth-of-type(6) { top: calc(100% + 135px) !important; }
    #ava[data-ava-mobile-layout="vertical-text"] .ava-child:nth-of-type(7) { top: calc(100% + 162px) !important; }
    #ava[data-ava-mobile-layout="vertical-text"] .ava-child:nth-of-type(8) { top: calc(100% + 189px) !important; }

    #ava[data-ava-mobile-layout="vertical-text"] .ava-panel {
        display: block;
        max-width: 78vw;
        padding: 2px 5px !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        color: #fffdf5;
        font-size: clamp(15px, 4.1vw, 18px);
        line-height: 1.2;
        text-align: center;
        white-space: normal;
        text-shadow: 0 1px 3px rgba(35, 35, 35, .95), 0 0 7px rgba(35, 35, 35, .6);
    }

    #ava[data-ava-mobile-layout="vertical-text"] .ava-child:hover .ava-panel,
    #ava[data-ava-mobile-layout="vertical-text"] .ava-child:focus-visible .ava-panel {
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        transform: none;
    }
}
