/* Bouton flottant */
.floating-precache-button {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    background-color: #0077cc;
    color: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: background-color 0.2s;
}

.floating-precache-button svg {
    stroke: #fff;
}

/* Hover state */
.floating-precache-button:hover {
    background-color: #005fa3;
}

/* Infobulle repositionnée à gauche du bouton */
.floating-precache-button::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 50%;            /* centre verticalement */
    right: 100%;         /* tout à gauche du bouton */
    transform: translateX(-0.5rem) translateY(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    white-space: normal;    /* autorise le retour à la ligne */
    text-align: center;
    max-width: 12rem;       /* limite la largeur avant wrapping */
    font-size: 0.85rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* Afficher au hover / focus / active */
.floating-precache-button:hover::after,
.floating-precache-button:focus::after,
.floating-precache-button:active::after {
    opacity: 1;
    min-width: 100px;
}