/* Styles maison, minimalistes, par-dessus Bootstrap.
   Principe UX du cahier des charges : écran de vente rapide, gros
   contrôles tactiles, total toujours visible. */

/* ============================================================================
   SYSTÈME DE DESIGN — un seul endroit qui règle l'aspect de TOUS les
   boutons, champs, tableaux et cartes de l'application. Toucher une valeur
   ici change tout le site d'un coup ; c'est volontaire, pour ne jamais avoir
   à styler un écran à la fois.
   ============================================================================ */
:root {
    --pt-radius: .6rem;      /* boutons, champs, cellules */
    --pt-radius-sm: .45rem;
    --pt-radius-lg: .9rem;   /* cartes */
    --pt-border: #e2e6ec;
    --pt-ink: #111827;       /* titres */
    --pt-ink-soft: #374151;  /* texte courant */
    --pt-muted: #6b7280;
    --pt-shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
    --pt-shadow-sm: 0 2px 10px -2px rgba(16, 24, 40, .09);
    --pt-shadow-md: 0 10px 28px -10px rgba(16, 24, 40, .16);
    --pt-focus-ring: 0 0 0 3px rgba(13, 110, 253, .16);
}

body {
    background: #f4f6f8;
    color: var(--pt-ink-soft);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 700;
    letter-spacing: -0.012em;
    color: var(--pt-ink);
}
/* La marque dans la barre du haut (fond sombre) doit rester blanche —
   elle porte la classe .h1 pour sa taille, pas pour sa couleur. */
.navbar-brand.h1 {
    color: #fff;
}

label, .form-label { color: var(--pt-ink-soft); }

/* ---------- Boutons : poids, profondeur, retour au clic ---------- */
.btn {
    border-radius: var(--pt-radius);
    font-weight: 600;
    padding: .55rem 1.1rem;
    box-shadow: var(--pt-shadow-xs);
    transition: transform .08s ease-out, box-shadow .15s ease-out, background-color .15s, border-color .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { box-shadow: var(--pt-focus-ring); outline: none; }
.btn-sm { border-radius: var(--pt-radius-sm); padding: .35rem .75rem; font-size: .82rem; }
.btn-lg { border-radius: var(--pt-radius); }

.btn-primary {
    box-shadow: 0 4px 14px -4px rgba(13, 110, 253, .45), var(--pt-shadow-xs);
}
.btn-primary:hover, .btn-primary:focus-visible {
    box-shadow: 0 6px 18px -4px rgba(13, 110, 253, .55);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline-secondary {
    border-color: var(--pt-border);
    color: var(--pt-ink-soft);
    background: #fff;
}
.btn-outline-secondary:hover {
    background: #f3f5f9;
    border-color: #cdd5e0;
    color: var(--pt-ink);
}
.btn-outline-primary, .btn-outline-danger, .btn-outline-success, .btn-outline-warning {
    box-shadow: none;
    background: #fff;
}
.btn-outline-primary:hover, .btn-outline-danger:hover, .btn-outline-success:hover, .btn-outline-warning:hover {
    transform: translateY(-1px);
}

/* ---------- Bouton retour : le petit lien "‹ Retour aux X" en tête de
   chaque écran de détail/formulaire, unifié sur tout le site plutôt que
   du texte souligné brut. ---------- */
.btn-retour {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .9rem .4rem .7rem;
    border-radius: 999px;
    border: 1px solid var(--pt-border);
    background: #fff;
    color: var(--pt-ink-soft);
    font-weight: 600;
    font-size: .85rem;
    text-decoration: none;
    box-shadow: var(--pt-shadow-xs);
    transition: background-color .15s ease-out, border-color .15s ease-out, color .15s ease-out, transform .15s ease-out, box-shadow .15s ease-out;
}
.btn-retour:hover, .btn-retour:focus-visible {
    background: #f3f5f9;
    border-color: #cdd5e0;
    color: var(--pt-ink);
    box-shadow: var(--pt-shadow-sm);
}
.btn-retour:focus-visible {
    box-shadow: var(--pt-focus-ring);
    outline: none;
}
.btn-retour:active {
    transform: translateY(1px);
}
.btn-retour-icone {
    font-size: .8rem;
    line-height: 1;
    transition: transform .15s ease-out;
}
.btn-retour:hover .btn-retour-icone {
    transform: translateX(-3px);
}

/* ---------- Champs : hauteur cohérente, focus net ---------- */
.form-control, .form-select {
    border-radius: var(--pt-radius);
    border-color: var(--pt-border);
    padding: .55rem .85rem;
    color: var(--pt-ink);
    transition: border-color .15s, box-shadow .15s;
}
.form-control::placeholder { color: #9aa3b0; }
.form-control:focus, .form-select:focus {
    border-color: #8fb3ff;
    box-shadow: var(--pt-focus-ring);
}
.form-control-sm, .form-select-sm { border-radius: var(--pt-radius-sm); }
.form-control-lg, .form-select-lg { border-radius: var(--pt-radius); }

/* Bouton afficher/masquer sur les champs mot de passe (voir PT.initTogglesMotDePasse). */
.champ-mdp-wrap { position: relative; }
.champ-mdp-wrap .form-control { padding-right: 2.75rem; }
.champ-mdp-toggle {
    position: absolute;
    top: 50%;
    right: .3rem;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    font-size: 1.15rem;
    line-height: 1;
    padding: .5rem .6rem;
    border-radius: var(--pt-radius-sm);
    cursor: pointer;
}
.champ-mdp-toggle:hover { background: rgba(17, 24, 39, .06); }
.champ-mdp-toggle:focus-visible { outline: 2px solid #0d6efd; outline-offset: 1px; }
.form-label {
    font-weight: 600;
    font-size: .85rem;
}
.input-group-text {
    border-radius: var(--pt-radius);
    border-color: var(--pt-border);
    background: #f7f8fa;
    color: var(--pt-muted);
}

/* ---------- Cartes : ombre douce plutôt que trait dur ---------- */
.card {
    border: 1px solid var(--pt-border);
    border-radius: var(--pt-radius-lg);
    box-shadow: var(--pt-shadow-xs);
}

/* ---------- Tableaux : en-tête discret, lignes qui respirent ---------- */
.table {
    --bs-table-border-color: #eef0f3;
}
.table > thead > tr > th {
    text-transform: uppercase;
    font-size: .72rem;
    letter-spacing: .05em;
    font-weight: 700;
    color: var(--pt-muted);
    background: #fafbfc;
    padding: .85rem 1rem;
    border-bottom-width: 1px;
}
.table > tbody > tr > td {
    padding: .7rem 1rem;
    vertical-align: middle;
}
.table-hover > tbody > tr:hover > * {
    background-color: #f6f9ff;
}

/* ---------- Badges : toujours en pilule, poids cohérent ---------- */
.badge {
    border-radius: 999px;
    font-weight: 600;
    padding: .38em .75em;
    letter-spacing: .01em;
}

/* ---------- Messages flash : carte discrète avec liseré coloré, plutôt
   que le bloc plat Bootstrap par défaut — même famille visuelle que le
   reste du site (rayon, ombre douce). ---------- */
.alert {
    display: flex;
    align-items: center;
    gap: .6rem;
    border: none;
    border-left: 4px solid transparent;
    border-radius: var(--pt-radius);
    padding: .85rem 1.1rem;
    font-weight: 500;
    box-shadow: var(--pt-shadow-sm);
}
.alert-dismissible {
    padding-right: 3rem;
}
.alert .btn-close {
    width: .7rem;
    height: .7rem;
    padding: .55rem;
    border-radius: 50%;
    opacity: .55;
    transition: opacity .15s ease-out, background-color .15s ease-out;
}
.alert .btn-close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, .06);
}
.alert-success {
    background: #eafaf1;
    border-left-color: #198754;
    color: #0f5132;
}
.alert-danger {
    background: #fdedee;
    border-left-color: #dc3545;
    color: #7f1d24;
}
.alert-warning {
    background: #fff8e6;
    border-left-color: #f0ad4e;
    color: #7a5200;
}
.alert-info {
    background: #eaf4ff;
    border-left-color: #0d6efd;
    color: #0a3d7a;
}
.alert-secondary {
    background: #f1f3f5;
    border-left-color: #6c757d;
    color: #343a40;
}

/* --------------------------------------------------------------------
   Menu déroulant "intelligent" — remplace visuellement un <select> par
   un déclencheur + panneau avec recherche et icônes, sans rien casser :
   le <select> d'origine reste la source de vérité (valeur, validation,
   soumission du formulaire), on ne fait que le piloter depuis l'UI
   personnalisée. Voir PT.ameliorerSelect dans app.js.
   -------------------------------------------------------------------- */
.select-pro-wrap {
    position: relative;
}
.select-pro-natif {
    display: none;
}
.select-pro-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    width: 100%;
    background: #fff;
    border: 1px solid var(--pt-border);
    border-radius: var(--pt-radius);
    padding: .55rem .85rem;
    font-size: .95rem;
    color: var(--pt-ink);
    cursor: pointer;
    text-align: left;
    transition: border-color .15s, box-shadow .15s;
}
.select-pro-trigger:hover {
    border-color: #cdd5e0;
}
.select-pro-wrap.open .select-pro-trigger {
    border-color: #8fb3ff;
    box-shadow: var(--pt-focus-ring);
}
.select-pro-trigger-texte {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.select-pro-trigger-texte.select-pro-trigger-vide {
    color: #9aa3b0;
}
.select-pro-trigger-chevron {
    flex-shrink: 0;
    font-size: .7rem;
    color: var(--pt-muted);
    transition: transform .15s;
}
.select-pro-wrap.open .select-pro-trigger-chevron {
    transform: rotate(180deg);
}

.select-pro-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1055;
    background: #fff;
    border: 1px solid var(--pt-border);
    border-radius: var(--pt-radius);
    box-shadow: var(--pt-shadow-md);
    overflow: hidden;
}
.select-pro-wrap.open .select-pro-panel {
    display: block;
}

.select-pro-recherche {
    border: none;
    border-bottom: 1px solid var(--pt-border);
    width: 100%;
    padding: .6rem .85rem;
    font-size: .88rem;
    outline: none;
}
.select-pro-liste {
    max-height: 260px;
    overflow-y: auto;
}
.select-pro-option {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .55rem .85rem;
    cursor: pointer;
    font-size: .88rem;
    color: var(--pt-ink-soft);
}
.select-pro-option-icone {
    flex-shrink: 0;
    width: 1.3rem;
    text-align: center;
}
.select-pro-option-sous {
    margin-left: auto;
    flex-shrink: 0;
    font-size: .76rem;
    color: var(--pt-muted);
}
.select-pro-option:hover, .select-pro-option.survol {
    background: #f6f9ff;
}
.select-pro-option.selectionne {
    background: #eaf2ff;
    color: var(--pt-ink);
    font-weight: 600;
}
.select-pro-vide {
    padding: .85rem;
    text-align: center;
    color: var(--pt-muted);
    font-size: .85rem;
}

/* Barre du haut : reste visible quand on défile (sur téléphone, le bouton menu et la pastille hors ligne
   ne doivent jamais partir avec la page). --pt-topbar inclut l'encoche / la barre d'état quand l'app est
   installée (viewport-fit=cover dans le gabarit) : sans cela l'entête passerait dessous. */
:root { --pt-topbar: calc(56px + env(safe-area-inset-top, 0px)); }
.topbar {
    position: sticky;
    top: 0;
    z-index: 1050;
    height: var(--pt-topbar);
    padding-top: env(safe-area-inset-top, 0px);
    flex-wrap: nowrap;
    gap: .5rem;
}
.topbar .navbar-brand { min-width: 0; margin-right: 0; }

.app-layout {
    display: flex;
    min-height: calc(100vh - var(--pt-topbar));
}

.app-sidebar {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #17262f 0%, #1c2b36 55%, #17232c 100%);
    padding: 0;
    position: sticky;
    top: var(--pt-topbar);
    align-self: flex-start;
    height: calc(100vh - var(--pt-topbar));
}

.app-sidebar-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: .85rem .6rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .16) transparent;
}
.app-sidebar-scroll::-webkit-scrollbar { width: 6px; }
.app-sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .16);
    border-radius: 3px;
}

.app-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin: .1rem .15rem;
    padding: .55rem .65rem;
    border-radius: var(--pt-radius-sm);
    color: #a9b7c2;
    font-size: .9rem;
    font-weight: 500;
    position: relative;
    transition: background-color .15s ease-out, color .15s ease-out, transform .15s ease-out;
}

.app-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
    transform: translateX(2px);
}

.app-sidebar .nav-link:focus-visible {
    outline: 2px solid #5b9dff;
    outline-offset: 1px;
}

.app-sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(13, 110, 253, .28), rgba(13, 110, 253, .07));
    color: #fff;
    font-weight: 600;
}

.app-sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    left: -.15rem;
    top: 18%;
    bottom: 18%;
    width: 3px;
    border-radius: 3px;
    background: #5b9dff;
    box-shadow: 0 0 8px rgba(91, 157, 255, .7);
}

.nav-icon-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: .5rem;
    background: rgba(255, 255, 255, .05);
    transition: background-color .15s ease-out;
}
.app-sidebar .nav-link:hover .nav-icon-chip,
.app-sidebar .nav-link.active .nav-icon-chip {
    background: rgba(255, 255, 255, .14);
}

.app-sidebar .nav-icon {
    display: inline-block;
    font-size: 1rem;
    line-height: 1;
}

/* Sections repliables : un bouton-titre + son contenu, une seule
   ouverte à la fois (voir PT.initSidebarAccordeon), pour que le menu
   tienne sur un écran même avec beaucoup de liens. */
.app-sidebar-groupe {
    margin-top: .3rem;
    padding-top: .3rem;
    border-top: 1px solid rgba(255, 255, 255, .05);
}
/* Le premier groupe garde son séparateur : le lien "Tableau de bord" qui
   le précède n'est pas un .app-sidebar-groupe, donc ce n'est plus le tout
   premier élément du menu. */

.app-sidebar-titre {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    border: none;
    background: none;
    border-radius: var(--pt-radius-sm);
    padding: .55rem .65rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #8496a8;
    cursor: pointer;
    transition: color .15s ease-out, background-color .15s ease-out;
}
.app-sidebar-titre:hover {
    color: #dbe3e9;
    background: rgba(255, 255, 255, .04);
}
.app-sidebar-titre:focus-visible {
    outline: 2px solid #5b9dff;
    outline-offset: 1px;
}
.app-sidebar-groupe.open .app-sidebar-titre {
    color: #e7ecf0;
}

.app-sidebar-titre-icone {
    font-size: .82rem;
    opacity: .85;
    line-height: 1;
}

.app-sidebar-titre-texte {
    flex: 1;
    text-align: left;
}

.app-sidebar-chevron {
    font-size: .95rem;
    line-height: 1;
    opacity: .6;
    transition: transform .2s ease-out;
}
.app-sidebar-groupe.open .app-sidebar-chevron {
    transform: rotate(-180deg);
    opacity: .9;
}

.app-sidebar-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height .22s ease-out;
}
.app-sidebar-groupe.open .app-sidebar-items {
    max-height: 500px;
}

/* Carte utilisateur épinglée en bas du menu — repère qui est connecté
   et permet de se déconnecter même sur mobile, où la barre du haut
   masque le nom/rôle faute de place. */
.app-sidebar-footer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .7rem .85rem;
    background: rgba(0, 0, 0, .18);
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.app-sidebar-avatar {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5b9dff, #0d6efd);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
}

.app-sidebar-footer-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.app-sidebar-footer-nom {
    color: #e7ecf0;
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-sidebar-footer-role {
    color: #8496a8;
    font-size: .72rem;
}

.app-sidebar-footer-logout {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #a9b7c2;
    font-size: 1rem;
    text-decoration: none;
    transition: background-color .15s ease-out, color .15s ease-out;
}
.app-sidebar-footer-logout-texte { display: none; }
@media (max-width: 575.98px) { .app-sidebar-footer-logout-texte { display: inline; } }
.app-sidebar-footer-logout:hover {
    background: rgba(220, 53, 69, .22);
    color: #ff8a95;
}

.app-content {
    flex: 1;
    padding: 1.5rem;
    max-width: 100%;
    overflow-x: auto;
}

/* Ecran de connexion */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd, #1c2b36);
}

.login-card {
    width: 100%;
    max-width: 380px;
}

/* Boutons tactiles larges (caisse / vente) */
.btn-touch {
    min-height: 56px;
    font-size: 1.05rem;
}

/* --------------------------------------------------------------------
   Écran de vente : recherche, chips de catégorie, grille de produits.
   -------------------------------------------------------------------- */
.pos-recherche {
    position: relative;
}
.pos-recherche-icone {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: .5;
    pointer-events: none;
}
.pos-recherche input {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}
.pos-recherche-effacer {
    position: absolute;
    right: .5rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: #e9ecef;
    color: #495057;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    line-height: 1;
    font-size: .85rem;
}

.pos-chips {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding-bottom: .25rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.pos-chips::-webkit-scrollbar { display: none; }

.pos-chip {
    flex-shrink: 0;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #495057;
    border-radius: 999px;
    padding: .4rem 1rem;
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color .15s, color .15s, border-color .15s;
}
.pos-chip.active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

/* Chips génériques (sélecteur de période des rapports, etc.) : même style,
   nom neutre pour un usage hors écran de vente. */
.chip-select {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.chip {
    border: 1px solid #dee2e6;
    background: #fff;
    color: #495057;
    border-radius: 999px;
    padding: .45rem 1.1rem;
    font-size: .88rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color .15s, color .15s, border-color .15s;
}
.chip.active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.pos-carte {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 96px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .1rem;
    padding: .75rem .9rem;
    background: #fff;
    border: 1px solid #e4e8ed;
    border-radius: .9rem;
    text-align: left;
    transition: transform .1s ease-out, box-shadow .15s, border-color .15s;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.pos-carte:hover:not(:disabled) {
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, .12);
}
.pos-carte:active:not(:disabled) {
    transform: scale(.97);
}
.pos-carte:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.pos-carte-icone {
    font-size: 1.4rem;
    line-height: 1;
}
.pos-carte-nom {
    font-weight: 700;
    font-size: .95rem;
    color: #1c2b36;
}
.pos-carte-prix {
    font-size: .82rem;
    color: #495057;
}
.pos-carte-stock {
    font-size: .74rem;
    font-weight: 600;
    margin-top: auto;
    padding-top: .3rem;
}
.pos-stock-ok { color: #1a7f37; }
.pos-stock-faible { color: #b8860b; }
.pos-stock-rupture { color: #d1242f; }

.pos-carte-badge-qte {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: #0d6efd;
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(13, 110, 253, .4);
}

@keyframes pos-carte-pulse {
    0% { box-shadow: 0 0 0 0 rgba(13, 110, 253, .45); }
    100% { box-shadow: 0 0 0 10px rgba(13, 110, 253, 0); }
}
.pos-carte-ajoutee {
    animation: pos-carte-pulse .5s ease-out;
    border-color: #0d6efd;
}

/* KPI dashboard */
.kpi-card .kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
}

/* --------------------------------------------------------------------
   Ticket de vente : un même balisage sert deux présentations.
   - À l'écran : carte moderne, dégradé, ombre — c'est ce que le
     caissier regarde pour confirmer la vente.
   - À l'impression (thermique 80mm) : bascule automatique vers une
     mise en page plate, monospace, sans décor — ce que le papier peut
     réellement rendre (voir le bloc @media print plus bas).
   -------------------------------------------------------------------- */
.ticket-wrap {
    max-width: 420px;
    margin: 0 auto;
    padding: 0 1rem;
}

.ticket {
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 12px 32px -12px rgba(13, 43, 74, .25);
    overflow: hidden;
}

.ticket-header {
    background: linear-gradient(135deg, #0d6efd, #0a4fb8);
    color: #fff;
    padding: 1.75rem 1.5rem 1.5rem;
    text-align: center;
}

.ticket-header .ticket-logo {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: .35rem;
}

.ticket-header .ticket-brand {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.ticket-header .ticket-tagline {
    font-size: .8rem;
    opacity: .85;
    margin-top: .15rem;
}

.ticket-header .ticket-phones {
    font-size: .75rem;
    opacity: .75;
    margin-top: .5rem;
}

.ticket-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .9rem 1.5rem;
    background: #f4f7fc;
    border-bottom: 1px dashed #cfd8e3;
    font-size: .82rem;
}

.ticket-meta .ticket-numero {
    font-weight: 700;
    font-family: "Courier New", monospace;
    color: #0d6efd;
}

.ticket-body {
    padding: 1.25rem 1.5rem;
}

.ticket-item {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    padding: .55rem 0;
    border-bottom: 1px solid #f0f2f5;
}

.ticket-item:last-child {
    border-bottom: none;
}

.ticket-item .ticket-item-nom {
    font-weight: 600;
}

.ticket-item .ticket-item-detail {
    font-size: .78rem;
    color: #8a94a3;
}

.ticket-item .ticket-item-total {
    font-weight: 700;
    white-space: nowrap;
}

.ticket-totals {
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px dashed #cfd8e3;
}

.ticket-total-line {
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    color: #6c757d;
    padding: .2rem 0;
}

.ticket-grand-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: .5rem;
    padding: .85rem 1rem;
    background: #eaf2ff;
    border-radius: .75rem;
    font-size: 1.3rem;
    font-weight: 800;
    color: #0a3d91;
}

.ticket-payments {
    margin-top: .9rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.ticket-payment-line {
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
}

.ticket-credit-alert {
    margin-top: .9rem;
    padding: .85rem 1rem;
    background: #fff4e5;
    border: 1px solid #ffdca8;
    border-radius: .75rem;
    color: #935800;
    font-size: .85rem;
}

.ticket-credit-alert strong {
    font-size: 1.05rem;
}

.ticket-footer {
    text-align: center;
    padding: 1.1rem 1.5rem 1.5rem;
    font-size: .8rem;
    color: #8a94a3;
}

.ticket-footer .ticket-thanks {
    font-weight: 600;
    color: #0d6efd;
    margin-bottom: .15rem;
}

@media print {
    /* Sans ceci, le navigateur imprime sur le format/l'orientation
       utilisé la dernière fois (ex: paysage A4) et le ticket, large de
       302px seulement, se retrouve minuscule au milieu d'une immense
       page blanche. On force donc explicitement le format bande de
       caisse (80mm de large) en portrait, sans marge — correct sur une
       imprimante thermique 80mm, et au pire réduit nettement le gâchis
       de papier sur une imprimante classique.
       Note : "80mm auto" n'est PAS une valeur CSS valide pour `size`
       (auto ne peut pas se combiner avec une longueur) — le navigateur
       ignore alors toute la règle en silence. Il faut une vraie paire
       de longueurs ; 297mm est une hauteur volontairement généreuse,
       le reste de la bande reste simplement blanc (normal sur un rouleau
       thermique, qui ne "remplit" jamais la page). */
    @page {
        size: 80mm 297mm;
        margin: 0;
    }

    .app-sidebar, .topbar, .sidebar-backdrop, .menu-toggle, .no-print { display: none !important; }
    .app-content { padding: 0; }

    /* Une imprimante thermique ne rend ni dégradé ni ombre ni coins
       arrondis : on repasse alors sur une mise en page plate, étroite
       (80mm) et monospace — la même donnée, juste sans le décor. */
    .ticket-wrap { max-width: none; padding: 0; }
    .ticket {
        width: 302px; /* ~80mm à 96dpi */
        margin: 0 auto;
        box-shadow: none;
        border-radius: 0;
    }
    .ticket-header {
        background: none !important;
        color: #000;
        padding: 0 0 .5rem;
        -webkit-print-color-adjust: exact;
    }
    .ticket-header .ticket-logo { font-size: 1.8rem; margin-bottom: .1rem; }
    .ticket-header .ticket-brand { font-size: 1rem; }
    .ticket-meta {
        background: none;
        border-bottom: 1px dashed #000;
        padding: .5rem 0;
        font-size: .75rem;
    }
    .ticket-meta .ticket-numero { color: #000; }
    .ticket-body { padding: .5rem 0; font-size: .75rem; }
    .ticket-item { border-bottom: none; padding: .3rem 0; }
    .ticket-item .ticket-item-detail { color: #000; }
    .ticket-totals { border-top: 1px dashed #000; }
    .ticket-total-line { color: #000; }
    .ticket-grand-total {
        background: none !important;
        color: #000;
        border-top: 1px solid #000;
        border-radius: 0;
        padding: .5rem 0;
        -webkit-print-color-adjust: exact;
    }
    .ticket-credit-alert {
        background: none !important;
        border: 1px dashed #000;
        color: #000;
        border-radius: 0;
        -webkit-print-color-adjust: exact;
    }
    .ticket-footer { color: #000; padding: .5rem 0 0; }
    .ticket-footer .ticket-thanks { color: #000; }
}

/* Bouton hamburger : masqué sur desktop, où le menu reste toujours visible. */
.menu-toggle {
    display: none;
}

/* --------------------------------------------------------------------
   Téléphone et tablette (< 992px) : le menu latéral n'est plus une
   colonne fixe qui grignote la largeur en permanence — c'est un tiroir
   qui s'ouvre par-dessus le contenu, pour laisser tout l'écran au
   travail (vente, tableaux...) qui est l'usage principal sur ces
   appareils.
   -------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }

    .app-sidebar {
        position: fixed;
        top: var(--pt-topbar);
        bottom: 0;
        left: 0;
        width: 270px;
        max-width: 80vw;
        transform: translateX(-100%);
        transition: transform .22s cubic-bezier(.22, .9, .32, 1);
        z-index: 1040;
        box-shadow: 2px 0 18px rgba(0, 0, 0, .3);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .app-sidebar-scroll {
        padding: 1rem .65rem;
    }

    .app-sidebar .nav-link {
        font-size: 1.02rem;
        padding: .8rem .75rem;
    }

    .nav-icon-chip {
        width: 32px;
        height: 32px;
    }

    .app-sidebar .nav-icon {
        font-size: 1.15rem;
    }

    .app-sidebar-titre {
        font-size: .72rem;
        padding: .8rem .75rem;
    }

    .app-sidebar-footer {
        padding: .85rem .9rem calc(.85rem + env(safe-area-inset-bottom, 0px));
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: var(--pt-topbar) 0 0 0;
        background: rgba(0, 0, 0, .45);
        backdrop-filter: blur(1px);
        z-index: 1030;
        transition: opacity .2s ease-out;
    }

    .sidebar-backdrop.open {
        display: block;
    }

    .app-content {
        padding: 1rem;
    }

    /* Cibles tactiles confortables partout, pas seulement sur l'écran de vente. */
    .btn, .form-select, .form-control {
        min-height: 44px;
    }
    .btn-sm {
        min-height: 40px;
        padding-top: .4rem;
        padding-bottom: .4rem;
    }
    .champ-mdp-toggle {
        min-width: 44px;
        min-height: 44px;
    }
}

/* --------------------------------------------------------------------
   Tableaux -> cartes empilées sous 768px. Même balisage HTML des deux
   côtés (desktop = tableau normal) : chaque <td> porte juste un
   attribut data-label repris en petite étiquette. Réutiliser la classe
   .table-cards pour toute nouvelle liste (fournisseurs, ventes...).
   -------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .table-cards thead {
        display: none;
    }
    .table-cards, .table-cards tbody, .table-cards tr, .table-cards td {
        display: block;
        width: 100%;
    }
    .table-cards tr {
        margin-bottom: .75rem;
        border: 1px solid var(--bs-border-color, #dee2e6);
        border-radius: .5rem;
        padding: .25rem .9rem;
    }
    .table-cards td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: .75rem;
        text-align: right;
        border: none;
        padding: .55rem 0;
    }
    .table-cards td:not(:last-child) {
        border-bottom: 1px solid #eef1f3;
    }
    .table-cards td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6c757d;
        text-align: left;
        flex-shrink: 0;
    }
    .table-cards td[data-label=""]::before,
    .table-cards td:not([data-label])::before {
        content: none;
    }
}

/* --------------------------------------------------------------------
   Barre panier flottante — écran de vente sur mini tablette/mobile.
   Sous 992px, la grille produits et le panier sont empilés en une seule
   colonne (voir .col-lg-7/.col-lg-5) : sans repère, le caissier doit
   faire défiler toute la grille pour voir le total. Cette barre reste
   collée en bas pendant qu'il ajoute des produits ; il ne l'utilise que
   pour remonter au panier quand il a fini.
   -------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .pos-barre-mobile {
        position: fixed;
        left: .75rem;
        right: .75rem;
        bottom: calc(.75rem + env(safe-area-inset-bottom, 0px));
        z-index: 1020;
        display: flex;
        align-items: center;
        gap: .6rem;
        width: auto;
        padding: .8rem 1.1rem;
        background: #0d6efd;
        color: #fff;
        border: none;
        border-radius: .9rem;
        box-shadow: 0 8px 24px -6px rgba(13, 110, 253, .5);
        font-weight: 600;
    }
    .pos-barre-mobile:active {
        transform: scale(.98);
    }
    .pos-barre-mobile-qte {
        font-size: .82rem;
        font-weight: 500;
        opacity: .85;
        white-space: nowrap;
    }
    .pos-barre-mobile-total {
        font-size: 1.1rem;
        margin-right: auto;
    }
    .pos-barre-mobile-action {
        font-size: .85rem;
        white-space: nowrap;
    }
    .pos-barre-mobile {
        transition: opacity .15s, transform .15s;
    }
    .pos-barre-mobile-masquee {
        opacity: 0;
        transform: translateY(8px);
        pointer-events: none;
    }
}

/* ====================================================================
   Mode hors ligne (voir assets/js/offline.js) : pastille de la barre du
   haut, bandeau d'information, notifications, centre hors ligne,
   confirmation d'une saisie gardée et reçu provisoire.
   ==================================================================== */

/* ---------- Pastille (toujours visible : elle dit si l'appareil est prêt) ---------- */
.pt-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 32px;
    padding: .3rem .8rem;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color .15s;
}
.pt-chip:hover { background: rgba(255, 255, 255, .18); }
.pt-dot {
    flex: none;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #9aa3b0;
}
.pt-chip.is-ready .pt-dot { background: #3ddc84; box-shadow: 0 0 0 3px rgba(61, 220, 132, .25); }
.pt-chip.is-notready { border-color: #f59f00; }
.pt-chip.is-notready .pt-dot { background: #f59f00; animation: pt-pulse 1.6s ease-in-out infinite; }
.pt-chip.is-offline { background: #5b6472; border-color: #5b6472; }
.pt-chip.is-pending { background: #f59f00; border-color: #f59f00; color: #1f2937; }
.pt-chip.is-error { background: #d1242f; border-color: #d1242f; }
@keyframes pt-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 159, 0, .55); }
    50% { box-shadow: 0 0 0 5px rgba(245, 159, 0, 0); }
}
@media (max-width: 991.98px) {
    .pt-chip { min-height: 40px; min-width: 40px; justify-content: center; }
}
@media (max-width: 767.98px) {
    .pt-chip-texte { display: none; }
}

/* ---------- Bandeau d'information en haut de page ---------- */
.pt-banniere {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: 1rem;
    padding: .75rem .9rem;
    border: 1px solid transparent;
    border-radius: var(--pt-radius-lg);
}
.pt-banniere-ic {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .7);
    font-size: 1.15rem;
}
.pt-banniere-txt {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    font-size: .86rem;
    line-height: 1.35;
}
.pt-banniere-txt strong { font-size: .95rem; }
.pt-banniere .btn-light { flex: none; border: 1px solid rgba(0, 0, 0, .12); }
.pt-banniere-hors { background: #fff4d6; border-color: #f3d98a; color: #5c4300; }
.pt-banniere-session { background: #fde8ea; border-color: #f3b5bb; color: #7a1520; }
.pt-banniere-info { background: #e8f1ff; border-color: #c5dbff; color: #0a3d91; }
.pt-banniere-x {
    flex: none;
    padding: .25rem .5rem;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 1rem;
    opacity: .55;
}
.pt-banniere-x:hover { opacity: 1; }
@media (max-width: 575.98px) {
    .pt-banniere { flex-wrap: wrap; }
    .pt-banniere-txt { flex-basis: calc(100% - 60px); }
}

/* ---------- Notifications ---------- */
.pt-toasts {
    position: fixed;
    top: 64px;
    left: 50%;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    width: min(92vw, 26rem);
    transform: translateX(-50%);
    pointer-events: none;
}
.pt-toast {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .8rem 1rem;
    border-left: 4px solid #6b7280;
    border-radius: var(--pt-radius-lg);
    background: #111827;
    box-shadow: var(--pt-shadow-md);
    color: #fff;
    cursor: pointer;
    pointer-events: auto;
    transition: opacity .35s, transform .35s;
}
.pt-toast-success { border-left-color: #3ddc84; }
.pt-toast-warning { border-left-color: #f59f00; }
.pt-toast-danger { border-left-color: #ff6b6b; }
.pt-toast-ic { font-size: 1.15rem; line-height: 1.3; }
.pt-toast-corps { display: flex; flex-direction: column; font-size: .9rem; line-height: 1.35; }
.pt-toast-corps strong { font-size: .92rem; }
.pt-toast-sortie { opacity: 0; transform: translateY(-8px); }

/* ---------- Centre hors ligne ---------- */
.pt-centre { overflow: hidden; border: none; border-radius: 1.1rem; }
.pt-centre-hero { display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.25rem; color: #fff; }
.pt-hero-ok { background: linear-gradient(135deg, #0d6efd, #0a4bb3); }
.pt-hero-hors { background: linear-gradient(135deg, #5b6472, #343a46); }
.pt-hero-session { background: linear-gradient(135deg, #e8590c, #b3420a); }
.pt-hero-ic {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .18);
    font-size: 1.5rem;
}
.pt-hero-titre { font-size: 1.1rem; font-weight: 700; }
.pt-hero-sous { font-size: .85rem; opacity: .9; }
.pt-centre-section + .pt-centre-section { margin-top: 1.25rem; }
.pt-centre-titre {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 .6rem;
    color: var(--pt-muted);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.pt-centre-nb { padding: .05rem .5rem; border-radius: 999px; background: #0d6efd; color: #fff; font-size: .72rem; }

.pt-checklist { display: flex; flex-direction: column; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.pt-check {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .6rem .75rem;
    border: 1px solid var(--pt-border);
    border-radius: var(--pt-radius);
    background: #fff;
}
.pt-check-warn { border-color: #f3d98a; background: #fffaf0; }
.pt-check-ic {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: .8rem;
    font-weight: 800;
}
.pt-check-ok .pt-check-ic { background: #d9f4e4; color: #146c43; }
.pt-check-warn .pt-check-ic { background: #ffe8b8; color: #8a5a00; }
.pt-check-titre { color: var(--pt-ink); font-size: .92rem; font-weight: 600; }
.pt-check-detail { color: var(--pt-muted); font-size: .8rem; }

.pt-item {
    display: flex;
    gap: .75rem;
    padding: .7rem .8rem;
    border: 1px solid var(--pt-border);
    border-radius: var(--pt-radius-lg);
    background: #fff;
}
.pt-item-ic {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #eef4ff;
    font-size: 1.2rem;
}
.pt-item-corps { flex: 1; min-width: 0; }
.pt-item-ligne { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.pt-item-detail { color: var(--pt-muted); font-size: .8rem; }
.pt-item-msg { margin-top: .25rem; color: #b42318; font-size: .82rem; }
.pt-item-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }
.pt-etat { padding: .15rem .55rem; border-radius: 999px; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.pt-etat-attente { background: #fff0c7; color: #7a5300; }
.pt-etat-erreur { background: #fde0e2; color: #a1121f; }
.pt-vide { padding: 1rem; color: var(--pt-muted); text-align: center; }
.pt-vide-ic { margin-bottom: .2rem; font-size: 1.6rem; }

/* ---------- Confirmation d'une saisie gardée ---------- */
.pt-confirm .modal-content { border: none; border-radius: 1.2rem; box-shadow: var(--pt-shadow-md); }
.pt-coche { width: 72px; height: 72px; margin: .4rem auto .8rem; }
.pt-coche svg { width: 100%; height: 100%; }
.pt-coche-cercle {
    stroke: #198754;
    stroke-width: 3;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: pt-trace .6s ease-out forwards;
}
.pt-coche-trait {
    stroke: #198754;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 36;
    stroke-dashoffset: 36;
    animation: pt-trace .35s .5s ease-out forwards;
}
@keyframes pt-trace { to { stroke-dashoffset: 0; } }
.pt-confirm-resume {
    padding: .35rem .8rem;
    border: 1px solid var(--pt-border);
    border-radius: var(--pt-radius);
    background: #f8fafc;
    text-align: left;
}
.pt-confirm-ligne { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; font-size: .9rem; }
.pt-confirm-ligne + .pt-confirm-ligne { border-top: 1px dashed var(--pt-border); }
.pt-confirm-fort { color: var(--pt-ink); font-size: 1.05rem; font-weight: 800; }
@media (prefers-reduced-motion: reduce) {
    .pt-coche-cercle, .pt-coche-trait { animation: none; stroke-dashoffset: 0; }
    .pt-chip.is-notready .pt-dot { animation: none; }
}

/* ---------- Reçu provisoire (imprimé sur la bande de caisse) ---------- */
/* Le reçu est un écran à part entière (aperçu + bouton Imprimer), qui reste ouvert jusqu'à « Fermer ». */
#pt-recu {
    position: fixed;
    inset: 0;
    z-index: 2000;
    overflow-y: auto;
    padding: .75rem 0 1.5rem;
    background: #e9edf2;
}
.pt-recu-barre { display: flex; justify-content: center; gap: .5rem; padding: 0 1rem .75rem; }
.pt-confirm-articles { max-height: 9rem; overflow-y: auto; }
.pt-recu-provisoire {
    margin: .4rem 0 0;
    padding: .35rem .5rem;
    border: 1px dashed #000;
    color: #000;
    font-size: .75rem;
    font-weight: 800;
    text-align: center;
}
.pt-recu-note { margin-top: .4rem; font-size: .68rem; }

@media print {
    .pt-chip, .pt-banniere, .pt-toasts { display: none !important; }
    body.pt-impression-recu > *:not(#pt-recu) { display: none !important; }
    body.pt-impression-recu #pt-recu { display: block !important; position: static; inset: auto; overflow: visible; padding: 0; background: none; }
    /* Reçu provisoire : entête réduit (pas de logo ni de slogan) pour raccourcir la bande. */
    #pt-recu .ticket-logo, #pt-recu .ticket-tagline { display: none; }
    #pt-recu .ticket-header { padding-bottom: .25rem; }
    #pt-recu .pt-recu-provisoire { margin: .25rem 0 0; padding: .15rem 0; }
    #pt-recu .ticket-body { padding: .3rem 0; }
    #pt-recu .ticket-item { padding: .15rem 0; }
    #pt-recu .ticket-footer { padding-top: .3rem; }
    #pt-recu .pt-recu-note { margin-top: .15rem; }
}

/* ---------- Ticket modifié : mention, lignes ajoutées et détail des changements ---------- */
.ticket-modif-badge {
    margin: .6rem 1rem 0;
    padding: .4rem .6rem;
    border: 1px solid #f3d98a;
    border-radius: .5rem;
    background: #fff4d6;
    color: #5c4300;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-align: center;
}
.ticket-modif {
    margin: .75rem 0 0;
    padding: .65rem .75rem;
    border: 1px dashed #d8b45a;
    border-radius: .6rem;
    background: #fffaf0;
    font-size: .78rem;
}
.ticket-modif-titre { margin-bottom: .2rem; font-weight: 800; }
.ticket-modif-date { margin-top: .45rem; color: #6b7280; font-size: .72rem; }
.ticket-modif-ligne { display: flex; justify-content: space-between; gap: .6rem; padding: .1rem 0; }
.ticket-modif-plus span:first-child { color: #146c43; font-weight: 700; }
.ticket-modif-moins span:first-child { color: #a1121f; }
.ticket-modif-total { margin-top: .25rem; padding-top: .25rem; border-top: 1px solid #e8d9a8; font-weight: 700; }
.ticket-tag {
    display: inline-block;
    margin-left: .4rem;
    padding: 0 .45rem;
    border-radius: 999px;
    background: #d9f4e4;
    color: #146c43;
    font-size: .65rem;
    font-weight: 800;
    vertical-align: middle;
}

@media print {
    .ticket-modif-badge { margin: .4rem 0 0; border: 1px solid #000; background: none; color: #000; }
    .ticket-modif { margin: .5rem 0 0; padding: .4rem 0; border: none; border-top: 1px dashed #000; border-bottom: 1px dashed #000; border-radius: 0; background: none; color: #000; }
    .ticket-modif-date, .ticket-modif-plus span:first-child, .ticket-modif-moins span:first-child { color: #000; }
    .ticket-modif-total { border-top-color: #000; }
    .ticket-tag { border: 1px solid #000; background: none; color: #000; }
}

/* ---------- Ticket court : un produit en plusieurs lignes n'écrit son nom qu'une fois ---------- */
.ticket-item-groupe { display: block; }
.ticket-sous-ligne { display: flex; justify-content: space-between; gap: .75rem; }
.ticket-modif-badge { margin: .4rem 1rem 0; padding: .25rem .5rem; font-size: .72rem; font-weight: 700; letter-spacing: 0; }

@media print {
    .ticket-modif-badge { margin: .3rem 0 0; padding: .2rem 0; border: none; border-top: 1px dashed #000; border-bottom: 1px dashed #000; border-radius: 0; }
}

/* Modification de vente : les lignes d'un même produit forment un seul bloc (nom écrit une fois) */
.ligne-panier-suite { margin-top: calc(-.5rem - 1px); border-top-style: dashed; border-top-left-radius: 0; border-top-right-radius: 0; }
.ligne-panier-groupe { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

/* Téléphone (< 576px) : barre du haut resserrée. « Déconnexion » n'y figure plus : elle est dans le menu
   (pied du tiroir) — une déconnexion par mégarde hors ligne viderait le cache de l'appareil. */
@media (max-width: 575.98px) {
    .topbar { padding-left: .75rem !important; padding-right: .75rem !important; }
    .topbar .btn-deconnexion { display: none; }
    .topbar .navbar-brand { font-size: 1.1rem; }

    /* La déconnexion n'est plus dans la barre du haut : dans le tiroir elle s'écrit en toutes lettres. */
    .app-sidebar-footer { flex-wrap: wrap; }
    .app-sidebar-footer-logout {
        flex: 1 0 100%;
        width: auto;
        height: 42px;
        gap: .4rem;
        border: 1px solid rgba(255, 255, 255, .18);
        border-radius: var(--pt-radius);
        font-size: .95rem;
    }
    .app-sidebar-footer-logout-texte { font-size: .82rem; font-weight: 600; }
}
