/* Styles personnalisés pour le système de réservation */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding-top: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-section h1 {
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-section .btn {
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.hero-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Modals */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    border-radius: 15px 15px 0 0;
    border-bottom: none;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-body {
    padding: 2rem;
}

/* Formulaires */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
}

/* Boutons */
.btn {
    border-radius: 10px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #146c43);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #dee2e6;
    border-radius: 15px 15px 0 0 !important;
    font-weight: 600;
}

/* Table */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
    transform: scale(1.01);
}

/* Alertes */
.alert {
    border: none;
    border-radius: 10px;
    border-left: 4px solid;
}

.alert-info {
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.1), rgba(13, 202, 240, 0.05));
    border-left-color: var(--info-color);
    color: var(--dark-color);
}

/* Toast */
.toast {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.toast-header {
    background: linear-gradient(135deg, var(--success-color), #146c43);
    color: white;
    border-bottom: none;
}

.toast-header .btn-close {
    filter: invert(1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 100px 0 50px;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .modal-dialog {
        margin: 10px;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Status badges */
.badge {
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 20px;
}

/* Google Calendar integration */
.google-calendar-btn {
    background: linear-gradient(135deg, #4285f4, #34a853);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.google-calendar-btn:hover {
    background: linear-gradient(135deg, #3367d6, #2d8f47);
    color: white;
    transform: translateY(-1px);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Focus states */
.form-control:focus,
.form-select:focus,
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Calendrier */
.calendar-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 2px solid #e9ecef;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.calendar-title {
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day-header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    padding: 10px 5px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 5px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
}

.calendar-day:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.calendar-day.available {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: var(--success-color);
    border-color: var(--success-color);
}

.calendar-day.available:hover {
    background: var(--success-color);
    color: white;
}

.calendar-day.unavailable {
    background: #f8d7da;
    color: var(--danger-color);
    cursor: not-allowed;
    opacity: 0.6;
}

.calendar-day.unavailable:hover {
    background: #f8d7da;
    color: var(--danger-color);
    transform: none;
}

.calendar-day.past {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.5;
}

.calendar-day.past:hover {
    background: #e9ecef;
    color: #6c757d;
    transform: none;
}

.calendar-day.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.calendar-day.today {
    border: 2px solid var(--warning-color);
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: var(--warning-color);
}

.calendar-day.today.available {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: var(--success-color);
    border-color: var(--success-color);
}

/* Créneaux horaires */
.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.time-slot {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--dark-color);
}

.time-slot:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.time-slot.available {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: var(--success-color);
    color: var(--success-color);
}

.time-slot.available:hover {
    background: var(--success-color);
    color: white;
}

.time-slot.unavailable {
    background: #f8d7da;
    border-color: var(--danger-color);
    color: var(--danger-color);
    cursor: not-allowed;
    opacity: 0.6;
}

.time-slot.unavailable:hover {
    background: #f8d7da;
    color: var(--danger-color);
    transform: none;
}

.time-slot.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

/* Responsive pour le calendrier */
@media (max-width: 768px) {
    .calendar-container {
        padding: 15px;
    }
    
    .calendar-day {
        font-size: 0.9rem;
        padding: 8px 4px;
    }
    
    .calendar-day-header {
        font-size: 0.75rem;
        padding: 8px 4px;
    }
    
    .time-slots {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .time-slot {
        padding: 10px 6px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .calendar-container {
        padding: 10px;
    }
    
    .calendar-day {
        font-size: 0.8rem;
        padding: 6px 2px;
    }
    
    .calendar-day-header {
        font-size: 0.7rem;
        padding: 6px 2px;
    }
    
    .time-slots {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .time-slot {
        padding: 8px 4px;
        font-size: 0.8rem;
    }
}

/* Styles spécifiques pour la page admin */
.admin-page {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.admin-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.admin-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.admin-table {
    font-size: 0.9rem;
}

.admin-table th {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 8px;
    border-bottom: 2px solid #dee2e6;
}

.admin-table td {
    padding: 12px 8px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f4;
}

.admin-table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Version mobile - cartes */
.mobile-reservation-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.mobile-reservation-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.mobile-reservation-card .card-body {
    padding: 15px;
}

/* Filtres et actions */
.admin-filters {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.admin-filters .form-control,
.admin-filters .btn {
    border-radius: 8px;
}

/* Compteur de réservations */
.reservation-count {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Responsive pour la page admin */
@media (max-width: 1200px) {
    .admin-table {
        font-size: 0.85rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 10px 6px;
    }
}

@media (max-width: 992px) {
    .admin-filters .col-md-3 {
        margin-bottom: 10px;
    }
    
    .admin-filters .btn {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
}

@media (max-width: 768px) {
    .admin-filters {
        margin-bottom: 15px;
    }
    
    .admin-filters .row {
        margin: 0;
    }
    
    .admin-filters .col-md-3 {
        padding: 0 5px;
        margin-bottom: 10px;
    }
    
    .mobile-reservation-card {
        margin: 0 10px 15px 10px;
    }
}

@media (max-width: 576px) {
    .admin-filters .btn {
        font-size: 0.75rem;
        padding: 6px 8px;
    }
    
    .mobile-reservation-card .card-body {
        padding: 12px;
    }
    
    .mobile-reservation-card .btn {
        font-size: 0.8rem;
        padding: 6px 8px;
    }
}

/* Animation pour les cartes mobiles */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-reservation-card {
    animation: slideInUp 0.3s ease-out;
}

/* Amélioration des badges */
.badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
}

/* Boutons d'action */
.btn-group-sm .btn {
    padding: 4px 8px;
    font-size: 0.8rem;
}

/* Calendrier d'indisponibilité */
.availability-calendar-container {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.availability-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-top: 10px;
}

.availability-calendar-day-header {
    background: linear-gradient(135deg, #0d6efd, #0056b3);
    color: white;
    padding: 8px 4px;
    text-align: center;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

.availability-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.85rem;
    position: relative;
    color: #495057;
}

.availability-calendar-day:hover {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-color: #0d6efd;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.2);
}

.availability-calendar-day.other-month {
    background: #f1f3f4;
    color: #adb5bd;
    cursor: not-allowed;
}

.availability-calendar-day.other-month:hover {
    background: #f1f3f4;
    transform: none;
}

.availability-calendar-day.past {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.availability-calendar-day.past:hover {
    background: #e9ecef;
    transform: none;
}

.availability-calendar-day.selected {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.3);
    transform: scale(1.1);
}

.availability-calendar-day.selected:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a);
    transform: scale(1.1);
}

.availability-calendar-day.range-start {
    background: #dc3545;
    color: white;
    border-radius: 6px 0 0 6px;
}

.availability-calendar-day.range-end {
    background: #dc3545;
    color: white;
    border-radius: 0 6px 6px 0;
}

.availability-calendar-day.in-range {
    background: #f8d7da;
    color: #721c24;
    border-radius: 0;
}

.availability-calendar-day.blocked {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    cursor: not-allowed;
    position: relative;
    border-color: #495057;
}

.availability-calendar-day.blocked::after {
    content: '🚫';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.6rem;
}

.availability-calendar-day.blocked:hover {
    background: linear-gradient(135deg, #6c757d, #495057);
    transform: none;
    box-shadow: none;
}

/* Liste des jours bloqués */
.blocked-days-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px;
    background: #f8f9fa;
}

.blocked-day-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    margin-bottom: 4px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    font-size: 0.8rem;
}

.blocked-day-item:last-child {
    margin-bottom: 0;
}

.blocked-day-info {
    flex: 1;
}

.blocked-day-date {
    font-weight: 600;
    color: #dc3545;
}

.blocked-day-reason {
    font-size: 0.7rem;
    color: #6c757d;
    margin-top: 2px;
}

.blocked-day-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.blocked-day-remove:hover {
    background: #dc3545;
    color: white;
}

/* Responsive pour le calendrier d'indisponibilité */
@media (max-width: 768px) {
    .availability-calendar-container {
        padding: 10px;
    }
    
    .availability-calendar-day {
        font-size: 0.75rem;
        padding: 4px 2px;
    }
    
    .availability-calendar-day-header {
        font-size: 0.7rem;
        padding: 6px 2px;
    }
    
    .calendar-header h5 {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .availability-calendar-day {
        font-size: 0.7rem;
    }
    
    .availability-calendar-day-header {
        font-size: 0.65rem;
    }
    
    .blocked-days-list {
        max-height: 150px;
    }
}

/* Print styles */
@media print {
    .navbar,
    .modal,
    .toast-container,
    .admin-filters,
    .btn {
        display: none !important;
    }
    
    .hero-section {
        background: none !important;
        color: black !important;
    }
    
    .admin-table {
        font-size: 0.8rem;
    }
}
