/* Moteur de didacticiel Newscloud. Source unique : newscloud/suitespaces, resources/tour. */
/* Chaque application règle ces variables sur sa propre palette. */
:root {
    --nct-accent: #25372f;
    --nct-accent-hover: #30483d;
    --nct-on-accent: #fff;
    --nct-surface: #fffdf9;
    --nct-text: #292524;
    --nct-muted: #78716c;
    --nct-line: #e7e5e4;
    --nct-soft: #e6eee7;
    --nct-ring: #2f6750;
    --nct-dim: rgb(28 25 23 / .52);
}
.dark {
    --nct-accent: #9fc9b5;
    --nct-accent-hover: #b8dac9;
    --nct-on-accent: #17221d;
    --nct-surface: #1c1917;
    --nct-text: #e7e5e4;
    --nct-muted: #a8a29e;
    --nct-line: #292524;
    --nct-soft: #24382f;
    --nct-ring: #9fc9b5;
    --nct-dim: rgb(0 0 0 / .66);
}

.nct { position: fixed; inset: 0; z-index: 1000; font-family: inherit; }
/* Visite rangée dans une fenêtre <dialog> modale, affichée au-dessus d'elle (popover) : sans le cadre par défaut. */
.nct[popover] { width: auto; height: auto; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; overflow: visible; }
.nct-blocker { position: fixed; inset: 0; background: transparent; transition: background .25s; }
.nct.is-centered .nct-blocker { background: var(--nct-dim); }

.nct-spot {
    position: fixed; pointer-events: none;
    box-shadow: 0 0 0 3px var(--nct-ring), 0 0 0 9999px var(--nct-dim);
    transition: top .3s ease, left .3s ease, width .3s ease, height .3s ease, opacity .2s;
}

.nct-bubble {
    position: fixed; width: min(340px, calc(100vw - 32px)); padding: 18px 18px 14px;
    border-radius: 20px; background: var(--nct-surface); color: var(--nct-text);
    box-shadow: 0 1px 0 rgb(41 37 36 / .04), 0 24px 60px rgb(28 25 23 / .24);
    outline: none; animation: nct-in .22s ease;
}
.nct-bubble:focus-visible { box-shadow: 0 0 0 3px var(--nct-ring), 0 24px 60px rgb(28 25 23 / .24); }
.nct.is-centered .nct-bubble { top: 50%; left: 50%; width: min(400px, calc(100vw - 32px)); transform: translate(-50%, -50%); padding: 24px 22px 16px; }

.nct-arrow { position: absolute; width: 14px; height: 14px; background: var(--nct-surface); transform: translate(-50%, -50%) rotate(45deg); border-radius: 3px; }
.nct-bubble[data-side=bottom] .nct-arrow { top: 0; }
.nct-bubble[data-side=top] .nct-arrow { top: 100%; }
.nct-bubble[data-side=right] .nct-arrow { left: 0; }
.nct-bubble[data-side=left] .nct-arrow { left: 100%; }
.nct-bubble[data-side=""] .nct-arrow,
.nct-bubble[data-side^=sheet] .nct-arrow { display: none; }

.nct-bubble[data-side^=sheet] { left: 16px; right: 16px; width: auto; }
.nct-bubble[data-side=sheet-bottom] { bottom: calc(16px + env(safe-area-inset-bottom)); }
.nct-bubble[data-side=sheet-top] { top: calc(16px + env(safe-area-inset-top)); }

.nct-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.nct-progress { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--nct-muted); }
/* Préfixe .nct : l'emporte sur les styles de boutons communs à la suite (thèmes sombres compris). */
.nct .nct-close { display: grid; place-items: center; width: 32px; height: 32px; margin: -6px -6px 0 0; border: 0; border-radius: 50%; background: transparent; color: var(--nct-muted); cursor: pointer; }
.nct .nct-close:hover { background: var(--nct-soft); color: var(--nct-text); }
.nct .nct-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.nct-title { margin: 0 0 6px; font-size: 17px; font-weight: 650; letter-spacing: -.02em; line-height: 1.3; }
.nct.is-centered .nct-title { font-size: 21px; }
.nct-text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--nct-muted); }

.nct-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nct-dots { display: flex; gap: 5px; margin: 16px 0 14px; }
.nct-dots span { width: 6px; height: 6px; border-radius: 99px; background: var(--nct-line); transition: width .25s, background .25s; }
.nct-dots span.is-on { width: 18px; background: var(--nct-accent); }

.nct-actions { display: flex; align-items: center; gap: 8px; }
.nct-spacer { flex: 1; }
.nct .nct-actions button { min-height: 40px; border: 0; border-radius: 99px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.nct .nct-link { padding: 0 8px; margin-left: -8px; background: transparent; color: var(--nct-muted); }
.nct .nct-link:hover { color: var(--nct-text); }
.nct .nct-secondary { padding: 0 14px; background: transparent; color: var(--nct-text); box-shadow: inset 0 0 0 1px var(--nct-line); }
.nct .nct-secondary:hover { background: var(--nct-soft); }
.nct .nct-primary { padding: 0 18px; background: var(--nct-accent); color: var(--nct-on-accent); }
.nct .nct-primary:hover { background: var(--nct-accent-hover); }
.nct .nct-actions button:focus-visible, .nct .nct-close:focus-visible { outline: 3px solid var(--nct-ring); outline-offset: 2px; }

/* Aide de la page sans visite guidée (bouton « Aide sur cette page »), fenêtre <dialog> native. */
.nct-help { box-sizing: border-box; width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 22px; border: 0; border-radius: 20px; background: var(--nct-surface); color: var(--nct-text); box-shadow: 0 24px 60px rgb(28 25 23 / .24); font: inherit; }
.nct-help::backdrop { background: var(--nct-dim); }
.nct-help-head { display: flex; align-items: flex-start; gap: 12px; }
.nct-help-title { flex: 1; margin: 0 0 8px; font-size: 19px; line-height: 1.3; color: var(--nct-text); }
.nct-help .nct-close { display: grid; place-items: center; width: 32px; height: 32px; margin: -6px -6px 0 0; border: 0; border-radius: 50%; background: transparent; color: var(--nct-muted); cursor: pointer; }
.nct-help .nct-close:hover { background: var(--nct-soft); color: var(--nct-text); }
.nct-help .nct-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.nct-help-text { margin: 0 0 18px; font-size: 14px; line-height: 1.55; color: var(--nct-muted); }
.nct-help-actions { display: grid; gap: 8px; }
.nct-help-actions a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 99px; font-size: 14px; font-weight: 600; text-align: center; text-decoration: none; }
.nct-help .nct-primary { background: var(--nct-accent); color: var(--nct-on-accent); }
.nct-help .nct-primary:hover { background: var(--nct-accent-hover); }
.nct-help .nct-secondary { color: var(--nct-text); box-shadow: inset 0 0 0 1px var(--nct-line); }
.nct-help .nct-secondary:hover { background: var(--nct-soft); }
.nct-help a:focus-visible, .nct-help .nct-close:focus-visible { outline: 3px solid var(--nct-ring); outline-offset: 2px; }

@keyframes nct-in { from { opacity: 0; translate: 0 6px; } }
@media (prefers-reduced-motion: reduce) {
    .nct-spot, .nct-dots span, .nct-blocker { transition: none; }
    .nct-bubble { animation: none; }
}
