/* BELLEO_AGENDA_DEMO_SWIPE_V2 */

/* Le bandeau démonstration disparaît uniquement de l’agenda. */
body.agenda-page.is-demo-mode .demo-system-banner {
    display: none !important;
}

/* L’agenda récupère toute la hauteur libérée. */
body.agenda-page.is-demo-mode {
    overflow: hidden;
}

body.agenda-page.is-demo-mode .app-workspace {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

body.agenda-page.is-demo-mode .app-topbar {
    flex: 0 0 auto;
}

body.agenda-page.is-demo-mode .app-main {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

body.agenda-page.is-demo-mode .page-container {
    height: 100%;
    min-height: 0;
}

body.agenda-page.is-demo-mode .agenda-shell {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
}

/*
 * Dans la démo, retrait du sélecteur Jour / 3 jours / Semaine
 * et du bouton Nouveau rendez-vous présent dans la barre de l’agenda.
 * Le bouton + noir de la barre supérieure reste inchangé.
 */
body.agenda-page.is-demo-mode .agenda-toolbar .toolbar-group {
    display: none !important;
}

body.agenda-page.is-demo-mode .agenda-toolbar {
    flex: 0 0 auto;
    align-items: center;
}

body.agenda-page.is-demo-mode .agenda-date-nav {
    width: 100%;
}

body.agenda-page.is-demo-mode .agenda-grid-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
}

/*
 * Le balayage est détecté sans déplacer physiquement l’agenda.
 * Le défilement vertical reste disponible.
 */
@media (pointer: coarse) {
    body.agenda-page #agenda-scroll {
        touch-action: pan-y;
        overscroll-behavior-x: none;
        -webkit-overflow-scrolling: touch;
    }
}

/* Retour visuel discret pendant l’ouverture de la nouvelle période. */
body.agenda-page #agenda-scroll.agenda-swipe-loading {
    opacity: .78;
    transition: opacity .12s ease;
    pointer-events: none;
}

body.agenda-page .agenda-swipe-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 48;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 0 15px;

    border: 1px solid var(--b-line);
    border-radius: 13px;

    background: rgba(255, 253, 250, .96);
    color: var(--b-ink);

    box-shadow: 0 12px 35px rgba(42, 25, 15, .17);
    backdrop-filter: blur(12px);

    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;

    opacity: 0;
    transform: translate(-50%, -50%) scale(.96);
    pointer-events: none;

    transition:
        opacity .12s ease,
        transform .12s ease;
}

body.agenda-page .agenda-swipe-feedback.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 680px) {
    body.agenda-page.is-demo-mode .agenda-toolbar {
        padding-bottom: 8px;
    }

    body.agenda-page.is-demo-mode .agenda-date-title {
        flex: 1 1 auto;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.agenda-page #agenda-scroll.agenda-swipe-loading,
    body.agenda-page .agenda-swipe-feedback {
        transition: none;
    }
}
