/* =========================================================
   tour.css — visite guidée du site (js/tour.js), 23/11/2026.
   Sélecteurs : .tp-tour(.is-on .is-moving .is-switching .is-out .has-target .is-nav) > .tp-tour__hole + .tp-tour__bubble
                (.is-in, [data-side=bottom|top|left|right|over|center]) > .tp-tour__arrow + .tp-tour__in >
                .tp-tour__top (.tp-tour__count, .tp-tour__close) · .tp-tour__title · .tp-tour__text · .tp-tour__bar ·
                .tp-tour__actions
   Mouvements relevés sur Trello avec REA : bulle 250 ms scale(0.95 -> 1) + fondu cubic-bezier(0.4, 0, 0, 1), sortie
   200 ms cubic-bezier(0.6, 0, 0.8, 0.6), fond 250 ms / 200 ms. Coupés par prefers-reduced-motion (base.css).
   ========================================================= */
.tp-tour { --tp-tour-ease: cubic-bezier(0.4, 0, 0, 1); position: fixed; inset: 0; z-index: 1200; }

/* La zone éclairée : un rectangle transparent dont l'ombre géante assombrit tout le reste de la page. */
.tp-tour__hole {
  position: fixed; border-radius: 12px; box-shadow: 0 0 0 200vmax rgba(0, 0, 0, 0.68); opacity: 0; pointer-events: none;
  transition: opacity 250ms var(--tp-tour-ease);
}
.tp-tour.has-target .tp-tour__hole { outline: 2px solid rgba(255, 255, 255, 0.28); outline-offset: 0; }
.tp-tour.is-on .tp-tour__hole { opacity: 1; }
.tp-tour.is-moving .tp-tour__hole {
  transition: opacity 250ms var(--tp-tour-ease), left 250ms var(--tp-tour-ease), top 250ms var(--tp-tour-ease),
    width 250ms var(--tp-tour-ease), height 250ms var(--tp-tour-ease);
}
/* Phase « menu » : la zone éclairée est le lien de la page dans le menu de gauche ; elle se clique comme lui. */
.tp-tour.is-nav .tp-tour__hole { border-radius: 10px; outline-color: var(--tp-accent); cursor: pointer; pointer-events: auto; }
.tp-tour.is-out .tp-tour__hole { opacity: 0; transition: opacity 200ms cubic-bezier(0.6, 0, 0.8, 0.6); }

.tp-tour__bubble {
  position: fixed; left: 0; top: 0; width: 348px; max-width: calc(100vw - 24px); padding: 14px 18px 16px;
  border: 1px solid #3d3d3d; border-radius: 14px; background: var(--tp-surface-2, #282828); color: var(--tp-text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4); opacity: 0; outline: none;
}
.tp-tour__bubble.is-in { animation: tp-tour-in 250ms var(--tp-tour-ease) both; }
.tp-tour.is-switching .tp-tour__bubble { animation: none; opacity: 0; pointer-events: none; }
.tp-tour.is-out .tp-tour__bubble { animation: tp-tour-out 200ms cubic-bezier(0.6, 0, 0.8, 0.6) both; }
@keyframes tp-tour-in { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: none; } }
@keyframes tp-tour-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(0.95); } }

/* Pointe de la bulle, tournée vers la zone éclairée. */
.tp-tour__arrow { position: absolute; width: 12px; height: 12px; border: 1px solid #3d3d3d; background: inherit; transform: rotate(45deg); }
.tp-tour__bubble[data-side="bottom"] .tp-tour__arrow { top: -7px; left: calc(var(--tp-tour-ax, 50%) - 6px); border-right: 0; border-bottom: 0; }
.tp-tour__bubble[data-side="top"] .tp-tour__arrow { bottom: -7px; left: calc(var(--tp-tour-ax, 50%) - 6px); border-left: 0; border-top: 0; }
.tp-tour__bubble[data-side="right"] .tp-tour__arrow { left: -7px; top: calc(var(--tp-tour-ay, 50%) - 6px); border-right: 0; border-top: 0; }
.tp-tour__bubble[data-side="left"] .tp-tour__arrow { right: -7px; top: calc(var(--tp-tour-ay, 50%) - 6px); border-left: 0; border-bottom: 0; }
.tp-tour__bubble[data-side="center"] .tp-tour__arrow, .tp-tour__bubble[data-side="over"] .tp-tour__arrow { display: none; }
.tp-tour__bubble[data-side="center"] { width: 400px; padding: 20px 24px 22px; }

.tp-tour__in { position: relative; }
.tp-tour__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; margin-bottom: 4px; }
.tp-tour__count { color: var(--tp-text-subtlest); font-size: 12px; line-height: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tp-tour__count--brand { color: var(--tp-accent); }
.tp-tour__close {
  display: grid; place-items: center; flex: none; width: 28px; height: 28px; margin-right: -6px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--tp-text-subtle); cursor: pointer; transition: background-color 150ms cubic-bezier(0.4, 1, 0.6, 1), color 150ms cubic-bezier(0.4, 1, 0.6, 1);
}
.tp-tour__close:hover, .tp-tour__close:focus-visible { background: rgba(255, 255, 255, 0.1); color: var(--tp-text-strong); }
.tp-tour__close .tp-icon { width: 16px; height: 16px; }
.tp-tour__title { margin: 0 0 6px; color: var(--tp-text-strong); font-size: 17px; line-height: 24px; font-weight: 700; }
.tp-tour__bubble[data-side="center"] .tp-tour__title { font-size: 22px; line-height: 28px; }
.tp-tour__text { margin: 0; color: var(--tp-text-subtle); font-size: 14px; line-height: 21px; }
.tp-tour__bar { height: 3px; margin-top: 14px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, 0.1); }
.tp-tour__bar i { display: block; height: 100%; border-radius: 2px; background: var(--tp-accent); }
.tp-tour__actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.tp-tour__actions .tp-button--primary { margin-left: auto; }
.tp-tour__bubble[data-side="center"] .tp-tour__actions { margin-top: 20px; }
@media (max-width: 479px) {
  .tp-tour__bubble, .tp-tour__bubble[data-side="center"] { width: calc(100vw - 24px); padding: 14px 16px 16px; }
}
