SPB Git

Repository Public

tabbar.css 4.1 KB 124 lines css

1/**2 * =============================================================================3 * SP BOUCHER | SOURCE FILE4 * =============================================================================5 * Project      : Vrai-Prix6 * File         : src/styles/tabbar.css7 * Author       : Simon-Pierre Boucher | https://spboucher.ai8 * Contact      : contact@spboucher.ai9 * Copyright    : (c) 2026 Simon-Pierre Boucher10 * License      : None specified (no license file in this repository)11 * =============================================================================12 * END OF SP BOUCHER SOURCE HEADER13 * =============================================================================14 */1516/* ============================================================17   Barre d'onglets mobile : pilule flottante détachée du bas18   d'écran, 4-5 onglets, safe-area iOS, thème clair ou sombre.19     --tb-accent        couleur du trait actif et de l'icône20     --tb-active-label  couleur du libellé actif (défaut : encre)21     .vp-tabbar--dark   variante sombre22     --tb-bg            fond23   ============================================================ */2425.vp-tabbar { display: none; }2627@media (max-width: 760px) {28  .vp-tabbar {29    /* thème clair (défaut) — papier off-white légèrement translucide */30    --tb-bg: rgba(250, 249, 245, 0.94);31    --tb-ink: var(--ink, #16191a);32    --tb-dim: var(--ink-3, #70756d);33    --tb-accent: var(--accent, #d6336c);34    --tb-line: var(--hairline-strong, rgba(20, 24, 20, 0.16));35    --tb-shadow: 0 10px 30px rgba(20, 24, 20, 0.16), 0 2px 6px rgba(20, 24, 20, 0.07);3637    position: fixed;38    left: max(12px, env(safe-area-inset-left));39    right: max(12px, env(safe-area-inset-right));40    bottom: calc(10px + env(safe-area-inset-bottom));41    z-index: var(--z-bottombar, 600);42    display: grid;43    grid-auto-flow: column;44    grid-auto-columns: 1fr;45    max-width: 440px;46    margin-inline: auto;47    padding: 5px;48    background: var(--tb-bg);49    -webkit-backdrop-filter: blur(14px) saturate(1.1);50    backdrop-filter: blur(14px) saturate(1.1);51    border: 1px solid var(--tb-line);52    border-radius: 18px;53    box-shadow: var(--tb-shadow);54  }5556  .vp-tabbar--dark {57    --tb-bg: rgba(18, 22, 19, 0.93);58    --tb-ink: #f5f3ee;59    --tb-dim: rgba(245, 243, 238, 0.62);60    --tb-line: rgba(245, 243, 238, 0.16);61    --tb-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);62  }6364  .vp-tabbar a,65  .vp-tabbar button {66    appearance: none;67    background: none;68    border: 0;69    cursor: pointer;70    display: flex;71    flex-direction: column;72    align-items: center;73    justify-content: center;74    gap: 3px;75    min-height: 50px;76    padding: 6px 2px 5px;77    border-radius: 13px;78    font-family: var(--font-display, inherit);79    font-size: 10px;80    font-weight: 650;81    letter-spacing: 0.01em;82    line-height: 1;83    color: var(--tb-dim);84    text-decoration: none;85    -webkit-tap-highlight-color: transparent;86    transition: color 0.15s ease;87  }88  .vp-tabbar svg { display: block; transition: transform 0.15s ease; }89  .vp-tabbar a:active svg,90  .vp-tabbar button:active svg { transform: translateY(1px) scale(0.9); }9192  /* état actif : icône couleur signature, label encre, trait accent */93  .vp-tabbar .active { color: var(--tb-active-label, var(--tb-ink)); }94  .vp-tabbar .active svg { color: var(--tb-accent); animation: tb-pop 0.25s ease; }95  .vp-tabbar .active::after {96    content: "";97    width: 16px;98    height: 2.5px;99    border-radius: 2px;100    background: var(--tb-accent);101    animation: tb-under 0.22s ease;102  }103104  /* le contenu respire sous la pilule (footer compris) */105  body:has(.vp-tabbar) { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }106107  /* un CTA sticky de fiche prend le bas d'écran : la pilule s'efface */108  body:has(.cta-sticky) .vp-tabbar { display: none; }109  body:has(.cta-sticky) { padding-bottom: 0; }110111}112113@keyframes tb-under {114  from { transform: scaleX(0); opacity: 0; }115}116@keyframes tb-pop {117  40% { transform: translateY(-2px); }118}119120@media (prefers-reduced-motion: reduce) {121  .vp-tabbar svg { transition: none; }122  .vp-tabbar .active svg, .vp-tabbar .active::after { animation: none; }123}124
Files main
Menu

Theme