/* --- 1. Variables globales et Réinitialisation --- */
:root {
    --primary-color: #FFCC00;      /* Jaune/Or vif officiel KBT SPORT */
    --primary-hover: #E6B800;      /* Jaune foncé pour le survol */
    --accent-color: #0056b3;       /* Bleu sport premium pour liens */
    --danger-color: #dc3545;       /* Rouge alerte */
    --bg-dark: #0A0A0A;            /* Noir carbone */
    --bg-card: #141414;            /* Gris très sombre */
    --text-main: #FFFFFF;          /* Blanc */
    --text-muted: #A0AEC0;         /* Gris clair */
    --radius: 12px;
    --shadow: 0 10px 30px rgba(255, 204, 0, 0.05);
    --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, #121212 0%, #050505 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.7);
    text-align: center;
    border: 1px solid #222;
}

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

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

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    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: 0 8px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
}

/* --- 4. Section Règlement --- */
.rules-section {
    text-align: left;
    background: #1A1A1A;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.rules-section h2 {
    text-align: center;
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.rules-subtitle {
    text-align: center;
    font-style: italic;
    font-weight: bold;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.rules-section h3 {
    color: #3182ce;
    margin-top: 15px;
    margin-bottom: 8px;
    font-size: 1.1rem;
    border-bottom: 1px solid #2d3748;
    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;
    color: #E2E8F0;
}

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

.danger-highlight {
    color: var(--danger-color);
    font-weight: bold;
}

.rules-footer {
    text-align: center;
    font-weight: bold;
    margin-bottom: 0;
    margin-top: 15px;
    color: #FFF;
}

/* --- 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: var(--primary-color);
    font-size: 0.95rem;
}

input[type="text"],
input[type="tel"],
input[type="date"],
input[type="email"],
input[type="password"],
select,
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #333;
    border-radius: var(--radius);
    font-size: 1rem;
    color: #FFFFFF;
    background-color: #1A1A1A;
    transition: var(--transition);
}

input:focus, select:focus, .comment-form input:focus, .comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #222;
    box-shadow: 0 0 0 4px rgba(255, 204, 0, 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: #1A1A1A;
    border: 2px solid #333;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: #FFFFFF;
}

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

.slot-btn.selected {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #000000 !important;
    font-weight: bold;
    animation: pulseSelected 0.5s ease-in-out;
}

.slot-btn:disabled {
    background: #262626;
    border-color: #333;
    color: #555;
    cursor: not-allowed;
    text-decoration: line-through;
}

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

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

#total-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: #FFFFFF;
}

/* --- 8. Boutons d'Action --- */
button[type="submit"], #btn-auth-primary, .comment-form button {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: #000000;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(255, 204, 0, 0.2);
    transition: var(--transition);
}

button[type="submit"]:hover, #btn-auth-primary:hover, .comment-form button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 204, 0, 0.35);
}

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

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

.btn-secondary:hover {
    background: #1a1a1a;
    color: #FFFFFF;
    border-color: var(--primary-color);
}

/* --- 9. Espace Discussion (Chat Intégré) --- */
.chat-global-container {
    max-width: 100%;
    margin: 30px auto 10px auto;
    background: #141414;
    border: 2px solid #2d3748;
    border-radius: 20px;
    padding: 25px;
    text-align: left;
}

.chat-global-container h2 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: center;
}

.comments-stream {
    height: 300px;
    overflow-y: auto;
    border: 1px solid #333;
    background: #0D0D0D;
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.message-bubble {
    background: #1A1A1A;
    border: 1px solid #262626;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.new-message-anim {
    animation: slideInMessage 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.comment-form input, .comment-form textarea {
    margin-bottom: 12px;
}

.comment-form textarea {
    height: 80px;
    resize: none;
}

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

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

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

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: #141414;
    border-radius: 8px;
    overflow: hidden;
}

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

th {
    background-color: #262626;
    color: var(--primary-color);
    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: #262626;
    color: #FFF;
    transition: var(--transition);
}

td button:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    color: #000;
}

/* --- 11. Zone Fenêtre Pop-up Connexion --- */
#auth-modal {
    background: rgba(0, 0, 0, 0.65) !important; /* Laisse passer la lumière du site flouté en arrière-plan */
    backdrop-filter: blur(5px);                  /* Effet de flou de verre givré ultra haut de gamme */
    -webkit-backdrop-filter: blur(5px);
}

/* --- 12. Animations Dynamiques --- */
@keyframes pulseSelected {
    0% { transform: scale(1); box-shadow: 0 4px 12px rgba(255, 204, 0, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 4px 20px rgba(255, 204, 0, 0.6); }
    100% { transform: scale(1); box-shadow: 0 4px 12px rgba(255, 204, 0, 0.4); }
}

@keyframes slideInMessage {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes flashSend {
    0% { background-color: var(--primary-color); }
    50% { background-color: #28a745; }
    100% { background-color: var(--primary-color); }
}

.btn-flash-success {
    animation: flashSend 0.6s ease;
}

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