/* --- 1. Variables globales et Réinitialisation --- */
:root {
    --primary-color: #1e7e34;      /* Vert gazon moderne */
    --primary-hover: #155d25;      /* Vert foncé pour le survol */
    --accent-color: #0056b3;       /* Bleu sport premium */
    --danger-color: #dc3545;       /* Rouge alerte pour les annulations/indisponibilités */
    --bg-dark: #111c14;            /* Fond très léger vert/noir pour l'ambiance stade */
    --bg-card: #ffffff;            /* Fond des cartes et formulaires */
    --text-main: #2d3748;          /* Couleur de texte principale */
    --text-muted: #718096;         /* Couleur de texte secondaire */
    --radius: 12px;                /* Arrondis modernes */
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a3020 0%, #0d1a10 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* --- 2. Conteneur Principal --- */
.container {
    background: var(--bg-card);
    max-width: 700px;
    width: 100%;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
}

/* --- 3. Logos et Titres --- */
.brand-logo {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    transition: var(--transition);
}

.brand-logo:hover {
    transform: scale(1.05) rotate(5deg);
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0d1a10;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.description {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.terrain-preview {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-radius: var(--radius);
    margin: 25px 0;
    box-shadow: var(--shadow);
}

/* --- 4. Section Règlement --- */
.rules-section {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02) !important;
}

.rules-section h3 {
    color: var(--accent-color);
    margin-top: 15px;
    margin-bottom: 8px;
    font-size: 1.1rem;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 4px;
}

.rules-section ul {
    list-style-type: none;
    padding-left: 5px;
}

.rules-section li {
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    padding-left: 15px;
}

.rules-section li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* --- 5. Formulaires et Inputs --- */
#reservation-form {
    text-align: left;
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label, label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a202c;
    font-size: 0.95rem;
}

input[type="text"],
input[type="tel"],
input[type="date"],
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--text-main);
    background-color: #f8fafc;
    transition: var(--transition);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(30, 126, 52, 0.15);
}

/* --- 6. Grille des Créneaux --- */
.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    margin: 15px 0 25px 0;
}

.slot-btn {
    padding: 12px 5px;
    background: #ffffff;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-main);
}

.slot-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(30, 126, 52, 0.05);
    transform: translateY(-2px);
}

.slot-btn.selected {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(30, 126, 52, 0.3);
}

.slot-btn:disabled {
    background: #edf2f7;
    border-color: #e2e8f0;
    color: #a0aec0;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* --- 7. Boîtier Récapitulatif (Total Prix) --- */
.summary-box {
    background: linear-gradient(135deg, #f0fff4 0%, #d4edda 100%);
    border: 1px solid #c3e6cb;
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    margin: 25px 0;
}

.summary-box h3 {
    font-size: 1rem;
    color: #155724;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

#total-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* --- 8. Boutons d'Action --- */
button[type="submit"] {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(30, 126, 52, 0.25);
    transition: var(--transition);
}

button[type="submit"]:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 126, 52, 0.35);
}

.separator {
    margin: 35px 0 20px 0;
    border: 0;
    height: 1px;
    background: #e2e8f0;
}

.btn-secondary {
    background: none;
    border: 2px dashed #cbd5e0;
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: #f7fafc;
    color: var(--text-main);
    border-color: var(--text-main);
}

/* --- 9. Panneau Administration --- */
.admin-panel {
    margin-top: 25px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    padding: 20px;
    text-align: left;
    animation: fadeIn 0.4s ease;
}

.admin-panel h2 {
    font-size: 1.3rem;
    color: #1a202c;
    margin-bottom: 15px;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

th, td {
    padding: 12px 15px;
    text-align: left;
    font-size: 0.9rem;
    border-bottom: 1px solid #edf2f7;
}

th {
    background-color: #edf2f7;
    color: #4a5568;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
}

td button {
    padding: 6px 10px;
    margin-right: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #edf2f7;
    transition: var(--transition);
}

td button:hover {
    transform: scale(1.1);
    background: #e2e8f0;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}