/*
 * Les visites guidées des modules (js/kofreo-visite.js) : un voile sur toute la
 * fenêtre, un cadre autour de la zone montrée — son ombre immense fait le voile
 * autour d'elle —, et une bulle à côté.
 *
 * Dessinés par le script dans <body>, donc hors de toute feuille isolée : la
 * feuille est globale, et ne lit que les jetons de kofreo-tokens.css (charte
 * v2). L'accent est celui de la société. Les boutons reprennent le dessin de
 * Components/Button.razor.css, qui ne peut pas les atteindre d'ici.
 */

/* Au-dessus de tout ce que l'application empile, fenêtres modales comprises. */
.visite {
    position: fixed;
    inset: 0;
    z-index: 2000;
    font-family: var(--police);
}

/* Prend chaque clic : rien sous le voile ne se clique pendant la visite. */
.visite-voile {
    position: absolute;
    inset: 0;
    background-color: transparent;
}

/* Sans zone à montrer, le voile assombrit toute la fenêtre. */
.visite-voile-plein {
    background-color: var(--voile);
}

.visite-cadre {
    position: fixed;
    border-radius: var(--rayon-petit);
    box-shadow: 0 0 0 3px var(--accent), 0 0 0 9999px var(--voile);
    pointer-events: none;
    transition: left 0.2s ease, top 0.2s ease, width 0.2s ease, height 0.2s ease;
}

.visite-cadre[hidden] {
    display: none;
}

.visite-bulle {
    position: fixed;
    box-sizing: border-box;
    width: min(380px, calc(100vw / var(--zoom) - 24px));
    max-height: calc(100vh / var(--zoom) - 24px);
    overflow: auto;
    padding: var(--marge-encart-haut) var(--marge-carte-rail) var(--marge-encart);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-encart);
    background-color: var(--surface);
    color: var(--texte-courant);
    box-shadow: var(--ombre-fenetre);
    transition: left 0.2s ease, top 0.2s ease;
    outline: none;
}

/* Le temps qu'un écran s'ouvre, la bulle attend sans clignoter. */
.visite-attente .visite-bulle {
    opacity: 0.6;
}

.visite-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.visite-etape {
    color: var(--texte-attenue);
    font-size: var(--taille-aide);
}

.visite-fermer {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: var(--rayon-petit);
    background-color: transparent;
    color: var(--texte-attenue);
    font-size: var(--taille-chiffre);
    line-height: 1;
    cursor: pointer;
}

.visite-fermer:hover {
    background-color: var(--surface-douce);
    color: var(--texte);
}

.visite-titre {
    margin: 0 0 8px;
    color: var(--texte);
    font-size: var(--taille-titre-section);
    font-weight: 700;
}

.visite-texte {
    font-size: var(--taille);
    line-height: 1.5;
}

.visite-paragraphe {
    margin: 0 0 8px;
}

.visite-paragraphe:last-child {
    margin-bottom: 0;
}

.visite-points {
    display: flex;
    gap: 5px;
    margin: 14px 0 10px;
}

.visite-point {
    width: 7px;
    height: 7px;
    border-radius: var(--rayon-pastille);
    background-color: var(--filet-fort);
}

.visite-point-actif {
    background-color: var(--accent);
}

.visite-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.visite-bouton {
    min-height: var(--hauteur-bouton-compact);
    padding: 0 14px;
    border: 1px solid var(--bouton-bordure);
    border-radius: var(--rayon-champ);
    background-color: var(--bouton);
    color: var(--texte-bouton);
    font: inherit;
    font-size: var(--taille);
    font-weight: 600;
    cursor: pointer;
}

.visite-bouton:hover:not(:disabled) {
    background-color: var(--bouton-survol);
    border-color: var(--bouton-bordure-survol);
    color: var(--accent);
}

.visite-bouton:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.visite-bouton:focus-visible,
.visite-fermer:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.visite-bouton-principal {
    border-color: var(--accent);
    background-color: var(--accent);
    color: var(--surface);
    font-weight: 700;
}

.visite-bouton-principal:hover:not(:disabled) {
    border-color: var(--accent-survol);
    background-color: var(--accent-survol);
    color: var(--surface);
}

@media (prefers-reduced-motion: reduce) {
    .visite-cadre,
    .visite-bulle {
        transition: none;
    }
}
