/**
 * Styles pour l'application d'inscription pickleball
 */

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.admin-link {
    display: inline-block;
    margin-top: 15px;
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    border: 2px solid white;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.admin-link:hover {
    background: white;
    color: #4CAF50;
}

/* Main content */
.main-content {
    padding: 30px;
}

/* Notifications */
.notification {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.notification.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.notification.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

/* Section disponibilités */
.availability-section {
    margin-bottom: 40px;
}

.availability-section h2,
.inscription-section h2 {
    color: #4CAF50;
    margin-bottom: 20px;
    font-size: 1.8rem;
    border-bottom: 3px solid #4CAF50;
    padding-bottom: 10px;
}

/* Grille de disponibilités */
.availability-grid {
    overflow-x: auto;
    margin-bottom: 15px;
}

.grid-header,
.grid-row {
    display: grid;
    grid-template-columns: 100px repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.grid-header {
    font-weight: bold;
    background: #f8f9fa;
    padding: 15px 0;
}

.grid-cell {
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.grid-header .grid-cell {
    background: #4CAF50;
    color: white;
    font-weight: 600;
}

.piste-number {
    background: #667eea;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slot {
    border: 2px solid #e0e0e0;
    cursor: pointer;
    font-weight: 500;
}

.slot.available {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.slot.available:hover {
    background: #a8e6b0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.slot.reserved {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
    cursor: not-allowed;
}

/* Légende */
.legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 30px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid #ddd;
}

.legend-color.available {
    background: #d4edda;
}

.legend-color.reserved {
    background: #f8d7da;
}

/* Formulaire */
.inscription-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.required {
    color: #e74c3c;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4CAF50;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 0.9rem;
    color: #666;
}

/* Section joueurs */
.players-section {
    margin-top: 30px;
}

.players-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.player-group {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.player-group h4 {
    color: #667eea;
    margin-bottom: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.small-text {
    font-size: 0.8em; /* ou une autre valeur comme 12px, 14px, etc. */
    margin-top: 5px; /* pour ajouter un peu d'espace au-dessus */
}

.btn-small {
    padding: 6px 15px;
    font-size: 0.9rem;
}

.form-actions {
    margin-top: 30px;
    text-align: center;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Page de connexion admin */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.login-container h1 {
    text-align: center;
    color: #4CAF50;
    margin-bottom: 30px;
}

.login-form .form-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 25px;
}

.login-form .btn {
    flex: 1;
}

.alert {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Dashboard admin */
.admin-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 30px;
}

.admin-header h1 {
    margin-bottom: 15px;
}

.admin-nav {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-nav span {
    margin-right: auto;
}

/* Statistiques */
.stats-section {
    margin-bottom: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-left: 5px solid #667eea;
}

.stat-card.success {
    border-left-color: #4CAF50;
}

.stat-card.info {
    border-left-color: #3498db;
}

.stat-card.warning {
    border-left-color: #f39c12;
}

.stat-card h3 {
    color: #666;
    font-size: 1rem;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c3e50;
}

/* Grille admin */
.admin-grid .grid-header,
.admin-grid .grid-row {
    display: grid;
    grid-template-columns: 100px repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.admin-slot {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-slot.available {
    background: #d4edda;
}

.admin-slot.reserved {
    background: #fff3cd;
    border-color: #ffc107;
}

.reservation-details {
    font-size: 0.85rem;
    text-align: left;
    padding: 10px;
}

.reservation-details strong {
    color: #2c3e50;
}

.players-list {
    list-style: none;
    padding: 5px 0;
    margin: 5px 0;
}

.players-list li {
    padding: 2px 0;
}

.available-text {
    color: #27ae60;
    font-weight: 600;
}

/* Tableau des réservations */
.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

.reservations-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.reservations-table thead {
    background: #2c3e50;
    color: white;
}

.reservations-table th,
.reservations-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.reservations-table tbody tr:hover {
    background-color: #f5f5f5;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Responsive */
@media (max-width: 1024px) {
    .grid-header,
    .grid-row,
    .admin-grid .grid-header,
    .admin-grid .grid-row {
        grid-template-columns: 80px repeat(5, 1fr);
    }

    .grid-cell {
        padding: 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .main-content {
        padding: 20px;
    }

    .inscription-form {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .grid-header,
    .grid-row,
    .admin-grid .grid-header,
    .admin-grid .grid-row {
        grid-template-columns: 60px repeat(5, minmax(80px, 1fr));
        font-size: 0.8rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-nav span {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .login-form .form-actions {
        flex-direction: column;
    }

    .reservations-table {
        font-size: 0.85rem;
    }

    .reservations-table th,
    .reservations-table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .availability-grid,
    .admin-grid {
        overflow-x: scroll;
    }

    .grid-cell {
        padding: 8px;
        font-size: 0.75rem;
    }
}
