Spaces:
Running
Running
| /* ===== Base mobile / terrain ===== */ | |
| html, body { | |
| touch-action: manipulation; | |
| -webkit-tap-highlight-color: transparent; | |
| } | |
| #app { | |
| -webkit-user-select: none; | |
| user-select: none; | |
| } | |
| /* ===== Ligne produit ===== */ | |
| .product-row { | |
| border-bottom: 1px solid #f3f4f6; | |
| padding: 0.75rem 1rem; | |
| transition: background-color 0.2s ease, padding 0.25s ease; | |
| cursor: pointer; | |
| position: relative; | |
| } | |
| .product-row:active { | |
| background-color: #f8fafc; | |
| } | |
| .product-row.active { | |
| background-color: #f1f5f9; | |
| padding-top: 1rem; | |
| padding-bottom: 1rem; | |
| } | |
| /* ===== Contenu principal de la ligne ===== */ | |
| .row-main { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| gap: 1rem; | |
| } | |
| .product-meta { | |
| min-width: 0; | |
| } | |
| .product-name { | |
| font-size: 0.95rem; | |
| line-height: 1.25; | |
| font-weight: 500; | |
| color: #0f172a; | |
| white-space: nowrap; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| } | |
| .product-unit { | |
| font-size: 0.75rem; | |
| color: #64748b; | |
| margin-top: 0.15rem; | |
| } | |
| .qty-badge { | |
| display: inline-flex; | |
| align-items: center; | |
| justify-content: center; | |
| min-width: 2.5rem; | |
| height: 2rem; | |
| padding: 0 0.75rem; | |
| background-color: #f1f5f9; | |
| border-radius: 9999px; | |
| font-weight: 700; | |
| font-size: 0.95rem; | |
| color: #0f172a; | |
| transition: background-color 0.2s ease, color 0.2s ease; | |
| } | |
| .product-row.active .qty-badge { | |
| background-color: #e2e8f0; | |
| } | |
| /* ===== Actions (apparaissent à l’activation) ===== */ | |
| .row-actions { | |
| display: flex; | |
| gap: 0.75rem; | |
| max-height: 0; | |
| opacity: 0; | |
| overflow: hidden; | |
| margin-top: 0; | |
| transition: max-height 0.25s ease, opacity 0.2s ease, margin-top 0.2s ease; | |
| } | |
| .product-row.active .row-actions { | |
| max-height: 80px; | |
| opacity: 1; | |
| margin-top: 0.75rem; | |
| } | |
| /* ===== Boutons d’action ===== */ | |
| .btn-action { | |
| flex: 1 1 0%; | |
| height: 3.5rem; /* 56 px – cible tactile optimale */ | |
| display: inline-flex; | |
| align-items: center; | |
| justify-content: center; | |
| border-radius: 0.75rem; | |
| font-weight: 600; | |
| border: 1px solid #e2e8f0; | |
| background-color: #ffffff; | |
| color: #ff0000; | |
| cursor: pointer; | |
| transition: transform 0.1s ease, background-color 0.15s ease, border-color 0.15s ease; | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .btn-action:active { | |
| transform: scale(0.97); | |
| } | |
| .btn-action.btn-minus { | |
| border-color: #cbd5e1; | |
| } | |
| .btn-action.btn-plus { | |
| background-color: #2563eb; | |
| color: #ffffff; | |
| border-color: #2563eb; | |
| } | |
| .btn-action.btn-plus:active { | |
| background-color: #1d4ed8; | |
| } | |
| .btn-action.btn-delete { | |
| background-color: #fef2f2; | |
| color: #ef4444; | |
| border-color: #fecaca; | |
| } | |
| .btn-action.btn-delete:active { | |
| background-color: #fee2e2; | |
| } | |
| /* Ascenseur fin pour plus de lisibilité */ | |
| ::-webkit-scrollbar { | |
| width: 4px; | |
| } | |
| ::-webkit-scrollbar-thumb { | |
| background-color: #cbd5e1; | |
| border-radius: 4px; | |
| } |