/*
==================================================
VISIONNEUSE SVG
==================================================
*/

.visosvg_container {

    box-sizing: border-box;

    border: 1px solid #d0d0d0;

    border-radius: 5px;

    background: #eeeeee;

    overflow: hidden;

    display: flex;

    flex-direction: column;

}


/*
==================================================
ZONE D'AFFICHAGE
==================================================
*/

.visosvg_viewer {

    position: relative;

    flex: 1 1 auto;

    min-width: 0;

    min-height: 0;

    overflow: auto;

    background: white;

    display: flex;

    justify-content: safe center;

    align-items: safe center;

    /* AJOUT : Bloque le pinch-to-zoom et les gestes natifs du navigateur sur cette zone */
    touch-action: none; 

}


/*
==================================================
IMAGE SVG
==================================================
*/

.visosvg_image {

    display: block;

    /*
    Les dimensions sont définies par JavaScript.
    */

    max-width: none !important; 

    max-height: none !important; 

    flex-shrink: 0;

    
    user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none; /* Optionnel : transfère les clics directement au conteneur parent */

}


/*
==================================================
BARRE DE NAVIGATION
==================================================
*/

.visosvg_navigation {

    flex-shrink: 0;

    width: 100%;

    height: 48px;

    min-height: 48px;

    box-sizing: border-box;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

    padding: 5px 10px;

    background: #fafafa;

    border-top: 1px solid #d0d0d0;

}


/*
==================================================
BOUTONS
==================================================
*/

.visosvg_button {

    width: 34px;

    height: 32px;

    padding: 0;

    font-family: inherit;

    font-size: 17px;

    line-height: 1;

    cursor: pointer;

    border: 1px solid #c5c5c5;

    border-radius: 4px;

    background: #ffffff;

}


.visosvg_button:hover:not(:disabled) {

    background: #eeeeee;

}


.visosvg_button:active:not(:disabled) {

    background: #e3e3e3;

}


.visosvg_button:disabled {

    opacity: 0.35;

    cursor: default;

}


/*
==================================================
INDICATEUR DE ZOOM
==================================================
*/

.visosvg_zoomReset {

    width: 58px;

    white-space: nowrap;

}


/*
==================================================
NUMERO DE PAGE
==================================================
*/

.visosvg_pageNumber {

    min-width: 65px;

    text-align: center;

    font-size: 14px;

    color: #555555;

}


/*
==================================================
SEPARATEUR
==================================================
*/

.visosvg_separator {

    width: 1px;

    height: 24px;

    margin: 0 4px;

    background: #d0d0d0;

}


/*
==================================================
POPOVER
==================================================
*/


/* Bouton d'aide */
.visosvg_help {
    font-weight: bold;
}

/* Popover (bulle d'aide) - Version Body */
.visosvg_popover {
    display: none;
    position: fixed; /* Fixé par rapport à la fenêtre */
    background: #ffffff;
    color: #1e1e2f;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    padding: 14px 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    line-height: 1.5;
    z-index: 10000; /* Très haut pour passer par-dessus tout */
    min-width: 220px;
    max-width: 320px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.visosvg_popover.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.visosvg_popover h4 {
    margin: 15px 0 4px 0;  /* Espace avant chaque titre, un peu en dessous */
    font-weight: 600;
    font-size: 13px;
    color: #444;
}

.visosvg_popover h4:first-of-type {
    margin-top: 0;  /* Pas d'espace avant le premier titre */
}

.visosvg_popover ul {
    margin: 0 0 10px 0;  /* Ajoute un petit espace après chaque liste */
    padding: 0;
    list-style: none;
}

.visosvg_popover li {
    margin-bottom: 4px;
    font-size: 13px;
}

.visosvg_popover kbd {
    display: inline-block;
    background: #f0f0f4;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 600;
    font-family: monospace;
    color: #333;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    margin: 0 1px;
}

.visosvg_popover .visosvg_popover_close {
    margin: 8px 0 0 0;
    font-size: 11px;
    color: #888;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 6px;
}
