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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f7f8fa;
    color: #333;
    line-height: 1.6;
}

/* Header */
.header {
    background: #000000;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-centered {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.logo-img-large {
    width: 150px;
    height: 50px;
    border-radius: 8px;
}

.btn-primary {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.btn-logout {
    background: rgba(255,107,107,0.2);
    border: 1px solid rgba(255,107,107,0.3);
    color: #ff6b6b;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
}

.btn-logout:hover {
    background: rgba(255,107,107,0.3);
    transform: translateY(-1px);
}

/* Abonnement Info */
.abonnement-info {
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
    padding: 1rem 0;
}

.abonnement-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.abonnement-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
}

.abonnement-status.active {
    background: #e8f5e8;
    color: #27ae60;
}

.abonnement-status.expired {
    background: #ffebee;
    color: #c0392b;
}

.abonnement-status.warning {
    background: #fff3cd;
    color: #856404;
}

.status-icon {
    font-size: 1rem;
}

.abonnement-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #666;
}

.expiration-label {
    font-weight: 500;
}

.expiration-date {
    font-weight: 600;
    color: #333;
}

.days-remaining {
    color: #666;
    font-style: italic;
}

.btn-icon {
    font-size: 1rem;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Date Selector */
.date-selector {
    margin-bottom: 2rem;
}

.date-list {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.date-btn {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 1rem;
    min-width: 80px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.date-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.date-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.date-btn.past {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
    opacity: 0.7;
}

.date-btn.past:hover {
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(173, 181, 189, 0.15);
}

.date-day {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.date-month {
    display: block;
    font-size: 0.875rem;
    opacity: 0.8;
}

.today-indicator {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff6b6b;
    color: white;
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
}

/* Reservations Count */
.reservations-count {
    margin-bottom: 2rem;
}

.count-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #e1e5e9;
}

.count-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.count-label {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

/* Reservations Grid */
.reservations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.reservation-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #e1e5e9;
    transition: all 0.2s ease;
}

.reservation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.time-info {
    flex: 1;
}

.time {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.terrain {
    font-size: 0.875rem;
    color: #666;
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    display: inline-block;
}

.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.confirmed {
    background: #e8f5e8;
    color: #27ae60;
}

.status-badge.checked {
    background: #e3f2fd;
    color: #2980b9;
}

.status-badge.no-show {
    background: #ffebee;
    color: #c0392b;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.user-phone {
    font-size: 0.875rem;
    color: #666;
}

/* Card Actions */
.card-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.card-actions button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 100px;
}

.btn-delete {
    background: #ff6b6b;
    color: white;
}

.btn-delete:hover {
    background: #ff5252;
    transform: translateY(-1px);
}

.btn-noshow {
    background: #ffa726;
    color: white;
}

.btn-noshow:hover {
    background: #ff9800;
    transform: translateY(-1px);
}

.btn-checkin {
    background: #66bb6a;
    color: white;
}

.btn-checkin:hover {
    background: #4caf50;
    transform: translateY(-1px);
}

.btn-undo-checkin {
    background: #42a5f5;
    color: white;
}

.btn-undo-checkin:hover {
    background: #2196f3;
    transform: translateY(-1px);
}

.btn-undo-noshow {
    background: #ab47bc;
    color: white;
}

.btn-undo-noshow:hover {
    background: #9c27b0;
    transform: translateY(-1px);
}

/* Overlap Alert */
.overlap-alert-container {
    margin-bottom: 2rem;
}

.overlap-alert {
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.overlap-alert-danger {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border: 2px solid #ff6b6b;
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.2);
    animation: pulse-danger 2s ease-in-out infinite;
}

.overlap-alert-success {
    background: linear-gradient(135deg, #f0fff4 0%, #e6f9ed 100%);
    border: 2px solid #27ae60;
    box-shadow: 0 4px 16px rgba(39, 174, 96, 0.2);
}

@keyframes pulse-danger {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(255, 107, 107, 0.2);
    }
    50% {
        box-shadow: 0 4px 24px rgba(255, 107, 107, 0.4);
    }
}

.overlap-alert-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.overlap-icon {
    font-size: 2rem;
}

.overlap-alert-danger .overlap-icon {
    animation: shake 1s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.overlap-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    flex: 1;
}

.overlap-alert-danger .overlap-title {
    color: #c0392b;
}

.overlap-alert-success .overlap-title {
    color: #27ae60;
}

.overlap-count {
    background: #c0392b;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.overlap-count-success {
    background: #27ae60;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.overlap-description {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.overlap-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.overlap-item {
    background: white;
    border: 1px solid #ffcdd2;
    border-radius: 12px;
    padding: 1rem;
}

.overlap-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.overlap-terrain {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.overlap-time {
    background: #fff3cd;
    color: #856404;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.overlap-reservations {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.overlap-reservation {
    flex: 1;
    min-width: 200px;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.overlap-res-time {
    font-weight: 600;
    color: #667eea;
    font-size: 1rem;
}

.overlap-res-user {
    font-weight: 500;
    color: #333;
}

.overlap-res-phone {
    font-size: 0.875rem;
    color: #666;
}

.overlap-vs {
    font-weight: 700;
    color: #c0392b;
    font-size: 1.25rem;
    padding: 0.5rem;
}

/* No Reservations */
.no-reservations {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.no-reservations-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.no-reservations h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #333;
}

/* Modal de connexion */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.login-modal {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease-out;
}

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

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 80px;
    height: 40px;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.login-header h2 {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #333;
    font-size: 0.875rem;
}

.form-group input {
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.login-btn {
    background: #000000;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-btn:hover:not(:disabled) {
    background: #333;
    transform: translateY(-1px);
}

.login-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.login-error {
    background: #ffebee;
    color: #c0392b;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    text-align: center;
    margin-top: 1rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e1e5e9;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    
    .reservations-grid {
        grid-template-columns: 1fr;
    }
    
    .date-list {
        gap: 0.5rem;
    }
    
    .date-btn {
        min-width: 70px;
        padding: 0.75rem;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    .card-actions button {
        flex: none;
    }
    
    .overlap-title {
        font-size: 1.25rem;
    }
    
    .overlap-reservations {
        flex-direction: column;
    }
    
    .overlap-reservation {
        min-width: 100%;
    }
    
    .overlap-vs {
        transform: rotate(90deg);
        margin: 0.5rem 0;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .logo-img-large {
        width: 120px;
        height: 40px;
    }
    
    .count-number {
        font-size: 2rem;
    }
}
