{% extends "base.html" %}
{% block title %}{{ title }} — GMAO Collège{% endblock %}
{% block content %}
<div class="py-2 py-md-3" style="max-width:600px;">
  <div class="d-flex justify-content-between align-items-center mb-3">
    <h2 class="mb-0 h5"><i class="bi bi-person-dash"></i> {{ title }}</h2>
    <a href="{{ url_for('planning.availability') }}" class="btn btn-sm btn-outline-secondary"><i class="bi bi-arrow-left"></i></a>
  </div>
  <form method="POST" class="card border-0 shadow-sm"><div class="card-body">
    <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
    <div class="mb-3"><label class="form-label">Type</label><select name="leave_type" class="form-select">{% for value in leave_types %}<option value="{{ value }}">{{ value|replace('_', ' ')|title }}</option>{% endfor %}</select></div>
    <div class="row g-3 mb-3"><div class="col-md-6"><label class="form-label">Début</label><input type="date" name="start_date" class="form-control" required></div><div class="col-md-6"><label class="form-label">Fin</label><input type="date" name="end_date" class="form-control" required></div></div>
    <div class="mb-3"><label class="form-label">Notes</label><textarea name="notes" class="form-control" rows="3"></textarea></div>
    <button type="submit" class="btn btn-primary"><i class="bi bi-check-lg"></i> Enregistrer</button>
  </div></form>
</div>
{% endblock %}
