/*
 * Fichier  : assets/css/scanner_terrain.css
 * Auteur   : KREMER Régis
 * Version  : 2.5.0
 * Date     : 2026-03-01
 * Description : Lot 5 — UX terrain (plein écran + actions rapides)
 */

/* ── Mode terrain : masquer le chrome de l'app ────────────────── */
body.sm-terrain-mode .sidebar,
body.sm-terrain-mode .mobile-bottom-nav,
body.sm-terrain-mode .top-header { display: none !important; }

body.sm-terrain-mode .main-area    { width: 100%; }
body.sm-terrain-mode .main-content { padding: 8px !important; }

body.sm-terrain-mode #pgScanner .scanner-container {
    max-width: 980px;
    margin: 0 auto;
}

/* Preview plus grande en mode terrain */
body.sm-terrain-mode #pgScanner .scanner-preview {
    aspect-ratio: 3 / 4;
}

/* ── Panneau terrain ─────────────────────────────────────────── */
#pgScanner .terrain-panel {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--bg-elevated);
}

/* Lignes de champs */
#pgScanner .terrain-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
#pgScanner .terrain-row:last-of-type { margin-bottom: 0; }

/* Colonnes flexibles - min-width réduit pour tenir sur 320px */
#pgScanner .terrain-col {
    flex: 1 1 140px;
    min-width: 0;
}

/* Saisie quantité */
#pgScanner .terrain-qty {
    display: flex;
    gap: 6px;
    align-items: center;
}
#pgScanner .terrain-qty .inp {
    flex: 1;
    min-width: 0;
    text-align: center;
}
#pgScanner .terrain-qty .btn {
    flex-shrink: 0;
    padding: 0 12px;
    min-width: 44px;
}

/* Actions terrain */
#pgScanner .terrain-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}
#pgScanner .terrain-actions .btn {
    flex: 1 1 120px;
    max-width: 200px;
}

/* Hint hors-ligne */
#pgScanner .terrain-hint {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.4;
}

/* ── Responsive mobile ───────────────────────────────────────── */
@media (max-width: 480px) {
    #pgScanner .terrain-col {
        flex-basis: 100%;
    }
    #pgScanner .terrain-actions .btn {
        flex-basis: calc(50% - 4px);
        max-width: none;
    }
    #pgScanner .terrain-qty .btn {
        min-width: 38px;
        padding: 0 8px;
    }
}
