{% extends 'nutrition/base.html' %}

{% block title %}Créer une journée - Carb Cycling{% endblock %}

{% block content %}
<div class="row justify-content-center">
    <div class="col-md-8">
        <div class="card">
            <div class="card-header bg-primary text-white">
                <h4 class="mb-0">
                    <i class="bi bi-calendar-plus"></i> Planifier une journée
                </h4>
            </div>
            <div class="card-body">
                <h5 class="mb-4">Date : {{ date_journee|date:"l d F Y" }}</h5>
                
                <form method="post">
                    {% csrf_token %}
                    
                    <div class="mb-4">
                        <label for="{{ form.type_journee.id_for_label }}" class="form-label fw-bold">
                            Type de journée
                        </label>
                        {{ form.type_journee }}
                        
                        <div class="row mt-3">
                            <div class="col-md-4">
                                <div class="alert alert-danger small">
                                    <strong><i class="bi bi-arrow-down-circle"></i> Pauvre</strong><br>
                                    0-1 apport glucides<br>
                                    3-4 protéines<br>
                                    3-4 lipides
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="alert alert-warning small">
                                    <strong><i class="bi bi-dash-circle"></i> Normal</strong><br>
                                    2-3 apports glucides<br>
                                    3-4 protéines<br>
                                    2-3 lipides
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="alert alert-success small">
                                    <strong><i class="bi bi-arrow-up-circle"></i> Riche</strong><br>
                                    4-5 apports glucides<br>
                                    3-4 protéines<br>
                                    1-2 lipides
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <div class="mb-4">
                        <label for="{{ form.notes.id_for_label }}" class="form-label">
                            Notes (optionnel)
                        </label>
                        {{ form.notes }}
                        <div class="form-text">
                            Ajoutez des remarques personnelles pour cette journée
                        </div>
                    </div>
                    
                    <div class="d-flex justify-content-between">
                        <a href="{% url 'tableau_de_bord' %}" class="btn btn-outline-secondary">
                            <i class="bi bi-x-circle"></i> Annuler
                        </a>
                        <button type="submit" class="btn btn-primary">
                            <i class="bi bi-check-circle"></i> Créer la journée
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %}
