/**
 * Styles CSS pour ResaBox
 * Compatible avec Bootstrap 5
 */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Global Styles */
body {
    font-family: var(--font-family);
    background-color: #f5f5f5;
    color: #333;
}

/* Header & Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,165.3C384,171,480,149,576,128C672,107,768,85,864,90.7C960,96,1056,128,1152,128C1248,128,1344,96,1392,80L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

/* Étapes de réservation */
.reservation-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 150px;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.step.completed .step-number {
    background: var(--success-color);
    color: white;
}

.step-separator {
    flex: 1;
    height: 2px;
    background: #dee2e6;
    margin: 0 10px;
    align-self: center;
    margin-bottom: 30px;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.box-card {
    cursor: pointer;
    height: 100%;
}

.box-card .card-img-top {
    height: 200px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

/* Box Images */
.box-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: #f8f9fa;
}

.box-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .box-image {
    transform: scale(1.05);
}

.box-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
}

.box-card .badge-difficulty {
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Badges de difficulté */
.difficulty-1 { background-color: #28a745; }
.difficulty-2 { background-color: #17a2b8; }
.difficulty-3 { background-color: #ffc107; color: #333; }
.difficulty-4 { background-color: #fd7e14; }
.difficulty-5 { background-color: #dc3545; }

/* Sélection de créneaux horaires */
.time-slot {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.time-slot:hover {
    border-color: var(--primary-color);
    background-color: #f0f8ff;
}

.time-slot.selected {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: white;
}

.time-slot.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Calendrier de disponibilité */
.availability-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-day:hover {
    background-color: #f0f8ff;
}

.calendar-day.unavailable {
    background-color: #f8d7da;
    color: #721c24;
    cursor: not-allowed;
}

.calendar-day.selected {
    background-color: var(--primary-color);
    color: white;
}

/* Prix et résumé */
.price-summary {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.price-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.price-option {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.price-option:last-child {
    border-top: none !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
    font-size: 0.9rem !important;
}

.price-total {
    border-top: 2px solid #dee2e6;
    padding-top: 8px;
    margin-top: 8px;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}

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

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

.animate-on-scroll {
    opacity: 0;
}

/* Admin Dashboard */
.admin-page {
    background-color: #f8f9fa;
}

.admin-sidebar {
    background-color: #343a40;
    min-height: calc(100vh - 56px);
    padding: 20px 0;
}

.admin-sidebar .nav-link {
    color: #adb5bd;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover {
    color: white;
    background-color: rgba(255,255,255,0.1);
}

.admin-sidebar .nav-link.active {
    color: white;
    background-color: var(--primary-color);
}

.admin-sidebar .nav-link i {
    width: 20px;
    margin-right: 10px;
}

/* Statistiques Dashboard */
.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 15px;
}

.stat-card.primary .stat-icon { background-color: rgba(0,123,255,0.1); color: var(--primary-color); }
.stat-card.success .stat-icon { background-color: rgba(40,167,69,0.1); color: var(--success-color); }
.stat-card.warning .stat-icon { background-color: rgba(255,193,7,0.1); color: var(--warning-color); }
.stat-card.danger .stat-icon { background-color: rgba(220,53,69,0.1); color: var(--danger-color); }

/* Tableaux */
.table-hover tbody tr:hover {
    background-color: rgba(0,123,255,0.05);
}

.booking-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.booking-status.pending_payment { background-color: #fff3cd; color: #856404; }
.booking-status.pending_pickup { background-color: #cce5ff; color: #004085; }
.booking-status.with_customer { background-color: #d4edda; color: #155724; }
.booking-status.returned { background-color: #f8d7da; color: #721c24; }
.booking-status.completed { background-color: #d1ecf1; color: #0c5460; }

/* Formulaires */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

/* Upload d'images */
.image-upload-preview {
    max-width: 200px;
    max-height: 200px;
    margin-top: 10px;
    border-radius: 8px;
    display: none;
}

.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: #f0f8ff;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Toast notifications */
.toast-container {
    z-index: 10000;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .reservation-steps {
        flex-direction: column;
    }
    
    .step-separator {
        width: 2px;
        height: 30px;
        margin: 10px 0;
    }
    
    .admin-sidebar {
        position: fixed;
        top: 56px;
        left: -250px;
        width: 250px;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .admin-sidebar.show {
        left: 0;
    }
}

/* Statuts des réservations */
.status-badge {
    padding: 6px 12px;
    font-weight: 500;
    border-radius: 20px;
    font-size: 0.875rem;
}

.status-pending_payment {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-pending_deposit {
    background-color: #fff3cd;
    color: #f39c12;
    border: 1px solid #f39c12;
}

.status-pending_pickup {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

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

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

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

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

.badge-lg {
    padding: 8px 16px;
    font-size: 1rem;
}

/* Impression */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}
