/* Barre de navigation mobile Toubarennes (« dock ») + feuilles + tirer-pour-actualiser.
   Contenu : main/dock.py — balisage : templates/includes/dock.html — comportement :
   static/js/tb-dock.js, static/js/tb-pull-refresh.js. Uniquement sous 992px. */

:root {
    --tb-vert: #1b5e20;
    --tb-vert-moyen: #2e7d32;
    --tb-vert-nuit: #0b3d2e;
    --tb-or: #f5c542;
    --tb-encre: #14261d;
    --tb-gris: #5f6f66;
    --tb-ligne: rgba(11, 61, 46, .09);
    --tb-dock-h: 68px;
    --tb-bas: env(safe-area-inset-bottom, 0px);
}

.tb-dock, .tb-feuille, .tb-ptr, .tb-entete { display: none; }
.tb-fab[hidden], .tb-entete-direct[hidden], .tb-direct-carte[hidden] { display: none !important; }

/* Direct public : carte flottante sur ordinateur (static/js/tb-direct.js) */
.tb-direct-carte { position: fixed; right: 20px; bottom: 20px; z-index: 1040; display: flex; align-items: center; gap: 12px; max-width: 420px;
    padding: 12px 16px; border-radius: 18px; color: #fff !important; text-decoration: none !important; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #7a0e18, #c8102e); box-shadow: 0 14px 34px -8px rgba(122, 14, 24, .6); animation: tbCarte .5s cubic-bezier(.2, .9, .25, 1) both; }
@keyframes tbCarte { from { transform: translateY(30px); opacity: 0; } }
.tb-direct-carte:hover { filter: brightness(1.08); }
.tb-direct-pastille { flex: none; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; background: rgba(255, 255, 255, .18); animation: tbClignote 1.2s ease-in-out infinite; }
.tb-direct-titre { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-direct-voir { flex: none; font-weight: 800; color: #ffe39a; }
@keyframes tbClignote { 50% { opacity: .55; } }
@media (max-width: 991.98px) { .tb-direct-carte { display: none !important; } }
.tb-dock, .tb-feuille { font-size: 16px; line-height: 1.4; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }

@media (max-width: 991.98px) {

/* ---------------------------------------------------------------- Barre ------ */
.tb-dock {
    display: block; position: fixed; z-index: 1040;
    left: 10px; right: 10px; bottom: calc(10px + var(--tb-bas));
    transition: transform .32s cubic-bezier(.2, .9, .25, 1), opacity .25s;
    -webkit-tap-highlight-color: transparent;
}
.tb-dock.is-cache { transform: translateY(calc(100% + 24px)); opacity: 0; pointer-events: none; }
.tb-dock.is-entree { animation: tbEntree .6s cubic-bezier(.2, .9, .25, 1.1) both; }
@keyframes tbEntree { from { transform: translateY(120%); opacity: 0; } }

.tb-dock-barre {
    position: relative; display: flex; align-items: stretch; height: var(--tb-dock-h);
    padding: 0 6px; border-radius: 26px;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
    box-shadow: 0 14px 34px -10px rgba(11, 61, 46, .35), 0 2px 6px rgba(11, 61, 46, .08), inset 0 0 0 1px var(--tb-ligne);
}
.tb-dock-cote { flex: 1 1 0; display: flex; min-width: 0; }

.tb-onglet {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    padding: 0; border: 0; background: none; cursor: pointer; font: inherit;
    color: var(--tb-gris) !important; text-decoration: none !important;
    transition: color .2s;
}
.tb-onglet-ic {
    position: relative; display: grid; place-items: center; width: 54px; height: 30px; border-radius: 15px;
    transition: background-color .25s, transform .2s;
}
.tb-onglet svg, .tb-fab svg, .tb-tuile svg, .tb-spirit-tuile svg, .tb-fermer svg, .tb-compte svg, .tb-recherche svg, .tb-pied-btn svg, .tb-ptr svg {
    width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.tb-onglet-txt {
    max-width: 100%; padding: 0 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    font-size: clamp(9.5px, 2.85vw, 11px); font-weight: 700; letter-spacing: 0; line-height: 1.1;
}
.tb-onglet.is-actif { color: var(--tb-vert) !important; }
.tb-onglet.is-actif .tb-onglet-ic { background: #dff1e3; }
.tb-onglet.is-actif .tb-onglet-txt { font-weight: 800; }
.tb-onglet:active .tb-onglet-ic, .tb-onglet.is-ouvert .tb-onglet-ic { transform: scale(.9); background: #e8f3ea; }
.tb-onglet.is-charge .tb-onglet-ic::after, .tb-fab.is-charge .tb-fab-rond::after {
    content: ""; position: absolute; inset: auto 50% -5px auto; width: 5px; height: 5px; margin-right: -2.5px; border-radius: 50%;
    background: var(--tb-vert-moyen); animation: tbPoint .8s ease-in-out infinite alternate;
}
@keyframes tbPoint { to { transform: translateY(-3px); opacity: .3; } }

/* Bouton central, en relief */
.tb-fab-place { flex: 0 0 72px; display: flex; justify-content: center; }
.tb-fab {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px;
    width: 76px; padding: 0 0 9px; margin-top: -26px; border: 0; background: none; cursor: pointer; font: inherit;
    color: var(--tb-vert) !important; text-decoration: none !important;
}
.tb-fab-rond {
    position: relative; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
    color: var(--tb-or);
    background: radial-gradient(circle at 30% 22%, #4caf50 0%, var(--tb-vert-moyen) 30%, var(--tb-vert) 62%, var(--tb-vert-nuit) 100%);
    box-shadow: 0 0 0 4px #fff, 0 14px 26px -8px rgba(11, 61, 46, .7), inset 0 1px 0 rgba(255, 255, 255, .25);
    transition: transform .2s cubic-bezier(.2, .9, .25, 1.3);
}
.tb-fab-rond svg { width: 28px; height: 28px; }
.tb-fab .tb-onglet-txt { font-weight: 800; }
.tb-fab:active .tb-fab-rond, .tb-fab.is-ouvert .tb-fab-rond { transform: scale(.92) rotate(-8deg); }
.tb-fab.is-or .tb-fab-rond { color: #3b2f00; background: radial-gradient(circle at 30% 22%, #ffe08a, var(--tb-or) 45%, #d99a00 100%);
    box-shadow: 0 0 0 4px #fff, 0 14px 26px -8px rgba(217, 154, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .5); }
.tb-fab.is-or { color: #8a6500 !important; }
.tb-fab.is-direct .tb-fab-rond { color: #fff; background: radial-gradient(circle at 30% 22%, #ff6b74, #ff2d3d 45%, #8f0f1a 100%);
    box-shadow: 0 0 0 4px #fff, 0 14px 26px -8px rgba(255, 45, 61, .75); }
.tb-fab.is-direct { color: #c8102e !important; }
.tb-fab.is-direct .tb-fab-rond::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 3px solid rgba(255, 45, 61, .55);
    animation: tbOnde 1.6s ease-out infinite; }
@keyframes tbOnde { to { transform: scale(1.35); opacity: 0; } }
.tb-fab-point { position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px #ff2d3d; }

.tb-badge {
    position: absolute; top: -4px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    display: grid; place-items: center; font-size: .62em; font-weight: 800; line-height: 1; color: #fff;
    background: #e5383b; box-shadow: 0 0 0 2px #fff;
}

body.has-tb-dock { padding-bottom: calc(var(--tb-dock-h) + 30px + var(--tb-bas)) !important; }

/* ---------------------------------------------------------------- Feuilles --- */
.tb-feuille { display: block; position: fixed; inset: 0; z-index: 1080; }
.tb-feuille[hidden] { display: none; }
.tb-feuille-fond {
    position: absolute; inset: 0; background: rgba(6, 22, 15, .5);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    opacity: 0; transition: opacity .3s;
}
.tb-feuille-panneau {
    position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column;
    max-height: 90vh; max-height: 90dvh; padding: 8px 16px calc(18px + var(--tb-bas));
    border-radius: 28px 28px 0 0; background: #f6f8f6; color: var(--tb-encre);
    box-shadow: 0 -18px 50px rgba(6, 22, 15, .3);
    transform: translateY(105%); transition: transform .42s cubic-bezier(.2, .9, .25, 1);
}
.tb-feuille.is-ouverte .tb-feuille-fond { opacity: 1; }
.tb-feuille.is-ouverte .tb-feuille-panneau { transform: none; }
.tb-feuille-panneau.is-glisse { transition: none; }
.tb-feuille-poignee { flex: none; width: 44px; height: 5px; margin: 2px auto 10px; border-radius: 3px; background: #c9d3cd; }
.tb-feuille-tete { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tb-feuille-sur { font-size: .7em; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tb-vert-moyen); }
.tb-feuille-titre { font-size: 1.45em; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; color: var(--tb-encre); }
.tb-fermer {
    flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
    color: var(--tb-encre); background: #e6ece8;
}
.tb-fermer svg { width: 20px; height: 20px; }

/* Spiritualité : 4 grandes tuiles */
.tb-spirit-tete .tb-feuille-sur { color: #b8860b; }
.tb-spirit-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tb-spirit-tuile {
    position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px; min-height: 132px; padding: 16px;
    border-radius: 22px; color: #fff !important; text-decoration: none !important;
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .45);
    opacity: 0; transform: translateY(14px) scale(.97);
    transition: transform .45s cubic-bezier(.2, .9, .25, 1.2), opacity .3s;
    transition-delay: calc(var(--i) * 45ms + 80ms);
}
.tb-feuille.is-ouverte .tb-spirit-tuile { opacity: 1; transform: none; }
.tb-spirit-tuile::after { content: ""; position: absolute; right: -28px; bottom: -28px; width: 96px; height: 96px; border-radius: 50%; background: rgba(255, 255, 255, .13); }
.tb-spirit-tuile:active { transform: scale(.97); }
.tb-spirit-ic { width: 46px; height: 46px; margin-bottom: auto; border-radius: 15px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); }
.tb-spirit-ic svg { width: 25px; height: 25px; }
.tb-spirit-tuile b { margin-top: 12px; font-size: 1.05em; line-height: 1.15; }
.tb-spirit-tuile small { font-size: .76em; line-height: 1.25; opacity: .88; }
.tb-spirit-tuile.ton-vert { background: linear-gradient(140deg, #2e7d32, #0b3d2e); }
.tb-spirit-tuile.ton-or { background: linear-gradient(140deg, #e0a800, #9a6a00); }
.tb-spirit-tuile.ton-rouge { background: linear-gradient(140deg, #e53945, #8f0f1a); }
.tb-spirit-tuile.ton-bleu { background: linear-gradient(140deg, #2b7de9, #1a3f8f); }

/* Horaires de prière (static/js/tb-priere.js) */
.tb-priere { display: block; margin-bottom: 12px; padding: 14px; border-radius: 22px; color: #fff !important; text-decoration: none !important;
    background: radial-gradient(120% 140% at 100% 0%, rgba(245, 197, 66, .35), transparent 55%), linear-gradient(140deg, #123b5c, #0b2236); }
.tb-priere-haut { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tb-priere-haut small { display: block; font-size: .72em; font-weight: 700; letter-spacing: .04em; opacity: .75; }
.tb-priere-haut b { display: block; font-size: 1.05em; color: var(--tb-or); }
.tb-priere-fleche { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); }
.tb-priere-fleche svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tb-priere-jour { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 12px; }
.tb-priere-jour > span { padding: 7px 2px; border-radius: 12px; text-align: center; background: rgba(255, 255, 255, .08); }
.tb-priere-jour small { display: block; font-size: .66em; opacity: .75; }
.tb-priere-jour b { display: block; font-size: .86em; font-variant-numeric: tabular-nums; }
.tb-priere-jour > span.is-prochaine { color: #3b2f00; background: var(--tb-or); }

/* Menu */
.tb-menu-defile { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -16px; padding: 0 16px 6px; -webkit-overflow-scrolling: touch; }
.tb-compte {
    display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 12px; border-radius: 20px;
    color: #fff !important; text-decoration: none !important;
    background: radial-gradient(120% 120% at 100% 0%, rgba(245, 197, 66, .35), transparent 55%), linear-gradient(135deg, var(--tb-vert-moyen), var(--tb-vert-nuit));
}
.tb-avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2em; font-weight: 800;
    color: var(--tb-vert-nuit); background: var(--tb-or); }
.tb-compte-txt { flex: 1; min-width: 0; line-height: 1.25; }
.tb-compte-txt small { display: block; font-size: .72em; opacity: .8; }
.tb-compte-txt b { display: block; font-size: 1.02em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tb-compte-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; font-weight: 800; font-size: .85em;
    color: var(--tb-vert-nuit) !important; background: #fff; text-decoration: none !important; }
.tb-compte-btn svg { width: 18px; height: 18px; }
.tb-compte-fleche { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .18); }
.tb-compte-fleche svg { width: 18px; height: 18px; }

.tb-recherche { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; padding: 0 14px; height: 48px; border-radius: 16px;
    background: #fff; box-shadow: inset 0 0 0 1px var(--tb-ligne); color: var(--tb-gris); cursor: text; }
.tb-recherche input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 1em; color: var(--tb-encre); }
.tb-recherche:focus-within { box-shadow: inset 0 0 0 2px var(--tb-vert-moyen); }
.tb-rien { margin: 18px 0; text-align: center; color: var(--tb-gris); font-size: .9em; }

.tb-section { margin-top: 16px; }
.tb-section[hidden] { display: none; }
.tb-section h3 { margin: 0 0 8px 4px; font-size: .72em; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tb-gris); }
.tb-tuiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tb-tuile {
    display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 4px 11px; border-radius: 18px; text-align: center;
    color: var(--tb-encre) !important; text-decoration: none !important; background: #fff; box-shadow: inset 0 0 0 1px var(--tb-ligne);
    transition: transform .15s;
}
.tb-tuile[hidden] { display: none; }
.tb-tuile:active { transform: scale(.95); }
.tb-tuile-ic { position: relative; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; }
.tb-tuile-ic .tb-badge { top: -6px; right: -8px; }
.tb-tuile-txt { font-size: .78em; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tb-tuile-txt small { display: block; margin-top: 2px; font-size: .85em; font-weight: 600; color: var(--tb-gris); }
.ton-vert .tb-tuile-ic { color: var(--tb-vert); background: #e3f3e6; }
.ton-or .tb-tuile-ic { color: #8a6500; background: #fff1c9; }
.ton-rouge .tb-tuile-ic { color: #b3242f; background: #fde4e4; }
.ton-bleu .tb-tuile-ic { color: #1d5fc2; background: #e4effd; }
.ton-gris .tb-tuile-ic { color: #4b5a52; background: #eaeeeb; }

.tb-menu-pied { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 4px; }
.tb-pied-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer;
    font: inherit; font-size: .86em; font-weight: 700; color: var(--tb-encre) !important; background: #e6ece8; text-decoration: none !important; }
.tb-pied-btn svg { width: 18px; height: 18px; }
.tb-pied-btn.is-rouge { color: #b3242f !important; background: #fde4e4; }
.tb-pied-btn.is-actif { color: #fff !important; background: var(--tb-vert-moyen); }
.tb-pied-btn[hidden] { display: none; }
.tb-legal { margin: 14px 0 4px; text-align: center; font-size: .78em; color: var(--tb-gris); }
.tb-legal a { color: var(--tb-gris) !important; text-decoration: underline !important; }

/* Focus clavier visible partout */
.tb-dock a:focus-visible, .tb-dock button:focus-visible, .tb-feuille a:focus-visible, .tb-feuille button:focus-visible {
    outline: 3px solid var(--tb-or); outline-offset: 2px; border-radius: 14px;
}

/* ------------------------------------------------- Tirer pour actualiser ----- */
.tb-ptr {
    display: grid; place-items: center; position: fixed; top: 0; left: 50%; z-index: 10050; width: 44px; height: 44px; border-radius: 50%;
    color: var(--tb-vert); background: #fff; box-shadow: 0 6px 18px rgba(11, 61, 46, .28);
    transform: translate(-50%, -56px); opacity: 0; pointer-events: none;
}
.tb-ptr svg { width: 22px; height: 22px; stroke-width: 2.4; }
.tb-ptr.is-pret { color: #fff; background: var(--tb-vert-moyen); }
.tb-ptr.is-retour { transition: transform .3s, opacity .3s; }
.tb-ptr.is-actualise { color: #fff; background: var(--tb-vert-moyen); transition: transform .2s; }
.tb-ptr.is-actualise svg { animation: tbTourne .7s linear infinite; }
@keyframes tbTourne { to { transform: rotate(360deg); } }

/* ------------------------------------------------ En-tête du site (mobile) --- */
.tb-entete {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 1030; overflow: hidden;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 11px; color: #fff;
    background: radial-gradient(140% 160% at 100% 0%, rgba(245, 197, 66, .28), transparent 52%),
                linear-gradient(135deg, #062b1f 0%, #0b3d2e 40%, #1b5e20 100%);
    box-shadow: 0 8px 24px -10px rgba(6, 43, 31, .6);
    transition: padding .3s cubic-bezier(.2, .9, .25, 1);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.tb-entete::after {   /* filet doré */
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
    background: linear-gradient(90deg, transparent, #f5c542 20%, #ffe9a6 50%, #f5c542 80%, transparent);
}
.tb-entete-motif {   /* étoiles à huit branches en filigrane */
    position: absolute; inset: 0; pointer-events: none; opacity: .9;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23f5c542' stroke-opacity='.16' stroke-width='1'%3E%3Cpath d='M28 8l6 14 14 6-14 6-6 14-6-14-14-6 14-6z'/%3E%3Crect x='17' y='17' width='22' height='22' transform='rotate(45 28 28)'/%3E%3Ccircle cx='28' cy='28' r='4'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 56px 56px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%, #000); mask-image: linear-gradient(90deg, transparent, #000 35%, #000);
    animation: tbMotif 60s linear infinite;
}
@keyframes tbMotif { to { background-position: 56px 56px; } }
.tb-entete-marque { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; color: #fff !important; text-decoration: none !important; }
.tb-entete-logo {
    flex: none; width: 48px; height: 48px; padding: 2px; border-radius: 50%;
    background: conic-gradient(from 210deg, #f5c542, #fff3c4, #d99a00, #f5c542);
    box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .55); transition: width .3s, height .3s;
}
.tb-entete-logo img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: contain; background: #fff; border: 2px solid #0b3d2e; }
.tb-entete-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tb-entete-nom {
    font-family: 'Cinzel', 'Trajan Pro', Georgia, serif; font-weight: 700; font-size: 1.32rem; line-height: 1.05; letter-spacing: .06em;
    text-transform: uppercase; white-space: nowrap;
    background: linear-gradient(100deg, #f5c542 0%, #fff7d6 22%, #f5c542 40%, #d99a00 60%, #f5c542 100%);
    background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .35));
    animation: tbReflet 6s ease-in-out 1s infinite;
}
@keyframes tbReflet { 0%, 55% { background-position: 100% 0; } 100% { background-position: -120% 0; } }
.tb-entete-ligne { position: relative; height: 1.25rem; margin-top: 3px; overflow: hidden; transition: height .3s, opacity .3s, margin .3s; }
.tb-entete-l {
    position: absolute; inset: 0; display: block; line-height: 1.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-size: .74rem; font-weight: 600; letter-spacing: .01em; color: rgba(255, 255, 255, .86);
    opacity: 0; transform: translateY(100%); transition: opacity .45s, transform .55s cubic-bezier(.2, .9, .25, 1);
}
.tb-entete-l.is-visible { opacity: 1; transform: none; }
.tb-entete-l.is-partie { opacity: 0; transform: translateY(-100%); }
.tb-entete-l svg { display: inline-block; vertical-align: -2px; margin-right: 4px; width: 13px; height: 13px; fill: none; stroke: #f5c542; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tb-entete-l [data-tb-priere-prochaine] { color: #ffe39a; }
.tb-entete-btn {
    position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
    color: #f5c542 !important; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(245, 197, 66, .45);
}
.tb-entete-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tb-entete-btn:active { transform: scale(.92); }
.tb-entete.is-compact { padding-top: calc(6px + env(safe-area-inset-top, 0px)); padding-bottom: 7px; }
.tb-entete.is-compact .tb-entete-logo { width: 36px; height: 36px; }
.tb-entete.is-compact .tb-entete-ligne { height: 0; margin-top: 0; opacity: 0; }
.tb-entete.is-compact .tb-entete-btn { width: 36px; height: 36px; }
.tb-entete a:focus-visible { outline: 3px solid #f5c542; outline-offset: 3px; border-radius: 12px; }

/* Pastille « EN DIRECT » de l'en-tête (remplace le bouton itinéraire pendant le direct) */
.tb-entete-direct { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px;
    font-size: .72rem; font-weight: 800; letter-spacing: .08em; color: #fff !important; text-decoration: none !important;
    background: linear-gradient(135deg, #ff2d3d, #b3121f); box-shadow: 0 0 0 3px rgba(255, 45, 61, .3), 0 6px 16px -4px rgba(255, 45, 61, .6); }
.tb-entete-direct span { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: tbClignote 1.2s ease-in-out infinite; }
.tb-entete-direct:not([hidden]) ~ .tb-entete-btn { display: none; }
.tb-entete-direct .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tb-entete.is-direct .tb-entete-nom { font-size: 1.1rem; letter-spacing: .03em; }

/* ------------------------------------------- Site public : en-tête allégé ----- */
.top-nav { display: none !important; }
.top-bar, .main-navbar { display: none !important; }

/* Bannière « Restez informé » : carte compacte au-dessus de la barre, plus en plein écran */
#push-notification-banner {
    top: auto !important; left: 12px !important; right: 12px !important; bottom: calc(var(--tb-dock-h) + 22px + var(--tb-bas)) !important;
    border-radius: 20px; animation: tbEntree .5s cubic-bezier(.2, .9, .25, 1) both !important;
}
#push-notification-banner .container { padding: 12px 14px !important; }
#push-notification-banner .row { flex-wrap: wrap; --bs-gutter-x: .7rem; --bs-gutter-y: 0; }
#push-notification-banner .col-auto:first-child > div { width: 40px !important; height: 40px !important; }
#push-notification-banner .col-auto:first-child i { font-size: 18px !important; }
#push-notification-banner .col { min-width: 0; }
#push-notification-banner h5 { font-size: 1rem; margin-bottom: 2px !important; }
#push-notification-banner p { font-size: .8rem !important; line-height: 1.35; }
#push-notification-banner .col-auto:last-child { flex: 0 0 100%; display: flex; gap: 8px; margin-top: 10px; }
#push-notification-banner .col-auto:last-child .btn { margin: 0 !important; padding: .45rem .9rem !important; font-size: .88rem; white-space: nowrap; }
#push-notification-banner .col-auto:last-child .btn:first-child { flex: 1; }

/* Ancienne barre des espaces : remplacée par la barre commune */
.gm-dock { display: none !important; }
}

@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) {
    .tb-dock, .tb-dock.is-entree, .tb-feuille-panneau, .tb-feuille-fond, .tb-spirit-tuile, .tb-fab-rond,
    .tb-entete-motif, .tb-entete-nom, .tb-entete-l, .tb-entete-direct span, .tb-direct-pastille { animation: none !important; transition: none !important; }
    .tb-fab.is-direct .tb-fab-rond::before { display: none; }
}
