{% extends "base.html" %}
{% block title %}Nouveau consommable — GMAO{% endblock %}
{% block content %}
<div class="container-fluid">
    <h2 class="h4 mb-3"><i class="bi bi-droplet"></i> Nouveau consommable</h2>
    <form method="POST">
        <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
        <div class="row">
            <div class="col-md-6">
                <div class="mb-3"><label class="form-label">Nom *</label><input type="text" name="name" class="form-control" required></div>
                <div class="mb-3"><label class="form-label">Reference</label><input type="text" name="reference" class="form-control"></div>
                <div class="mb-3"><label class="form-label">Categorie</label><input type="text" name="category" class="form-control"></div>
            </div>
            <div class="col-md-6">
                <div class="mb-3"><label class="form-label">Quantite</label><input type="number" name="quantity" class="form-control" value="0"></div>
                <div class="mb-3"><label class="form-label">Quantite min</label><input type="number" name="min_quantity" class="form-control" value="0"></div>
                <div class="mb-3"><label class="form-label">Unite</label><input type="text" name="unit" class="form-control" value="piece"></div>
                <div class="mb-3"><label class="form-label">Prix unitaire</label><input type="number" step="0.01" name="unit_price" class="form-control"></div>
            </div>
        </div>
        <div class="mb-3"><label class="form-label">Emplacement</label><input type="text" name="location" class="form-control"></div>
        <div class="mb-3"><label class="form-label">Notes</label><textarea name="notes" class="form-control" rows="2"></textarea></div>
        <button type="submit" class="btn btn-primary"><i class="bi bi-save"></i> Creer</button>
    </form>
</div>
{% endblock %}