/**
 * Visite guidée — habillage.
 *
 * Fichier autonome, chargé sur toutes les pages mais inerte tant que rien ne l'appelle :
 * aucune de ces classes n'existe dans le DOM avant qu'on lance une visite.
 */

.tuto-calque {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 9998;
    animation: tuto-apparait 0.18s ease-out;
}

/* La cible reste éclairée AU-DESSUS du voile : c'est tout le principe — on montre du doigt,
   on ne décrit pas. L'ombre portée fait le halo, sans avoir à découper le voile. */
.tuto-cible {
    position: relative;
    z-index: 9999;
    border-radius: 8px;
    box-shadow: 0 0 0 4px #3B82F6, 0 0 0 9999px rgba(15, 23, 42, 0.55);
    animation: tuto-pulse 1.8s ease-in-out infinite;
}

.tuto-bulle {
    position: fixed;
    z-index: 10000;
    width: min(380px, calc(100vw - 24px));
    background: #fff;
    color: #0f172a;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
    padding: 16px 18px 14px;
    font-family: 'Roboto Condensed', system-ui, sans-serif;
    animation: tuto-apparait 0.2s ease-out;
}

[data-theme='chronofront-dark'] .tuto-bulle {
    background: #1e293b;
    color: #e2e8f0;
}

.tuto-bulle-tete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.tuto-etape {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #3B82F6;
}

.tuto-actions-tete { display: flex; gap: 2px; }

.tuto-icone {
    background: none;
    border: 0;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 6px;
    opacity: 0.6;
}
.tuto-icone:hover { opacity: 1; background: rgba(148, 163, 184, 0.15); }

.tuto-titre  { font-size: 1.05rem; font-weight: 700; color: #1e3a8a; margin-bottom: 6px; }
[data-theme='chronofront-dark'] .tuto-titre { color: #93c5fd; }

.tuto-texte  { font-size: 0.9rem; line-height: 1.5; }

.tuto-astuce {
    margin-top: 10px;
    padding: 8px 10px;
    background: #f0f4ff;
    border-left: 3px solid #3B82F6;
    border-radius: 4px;
    font-size: 0.82rem;
    line-height: 1.45;
}
[data-theme='chronofront-dark'] .tuto-astuce { background: rgba(59, 130, 246, 0.12); }

.tuto-pied {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

.tuto-btn {
    border: 0;
    border-radius: 7px;
    padding: 7px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.tuto-btn-plein   { background: #1e3a8a; color: #fff; }
.tuto-btn-plein:hover { background: #1e40af; }
.tuto-btn-fantome { background: transparent; color: inherit; opacity: 0.6; }
.tuto-btn-fantome:hover:not(:disabled) { opacity: 1; background: rgba(148, 163, 184, 0.15); }
.tuto-btn:disabled { opacity: 0.25; cursor: default; }

@keyframes tuto-apparait { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes tuto-pulse {
    0%, 100% { box-shadow: 0 0 0 4px #3B82F6,             0 0 0 9999px rgba(15, 23, 42, 0.55); }
    50%      { box-shadow: 0 0 0 7px rgba(59,130,246,.45), 0 0 0 9999px rgba(15, 23, 42, 0.55); }
}

/* Écran étroit : la bulle passe en bandeau bas, elle ne peut plus « flotter » utilement. */
@media (max-width: 640px) {
    .tuto-bulle {
        top: auto !important;
        left: 12px !important;
        right: 12px;
        bottom: 12px;
        width: auto;
    }
}
