/* ============================================
   Mcn Meeting Room Booking - Light Theme
   Modern & Clean Design
   ============================================ */

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.5px;
}

.logo i {
    color: var(--accent-primary);
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a:hover {
    color: var(--accent-primary);
}

.btn-primary {
    background: var(--accent-gradient);
    color: white !important;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    padding: 1rem 1.5rem;
    margin: 1.5rem auto;
    max-width: 1200px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

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

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* ============================================
   FORMS
   ============================================ */

.form-container {
    max-width: 500px;
    margin: 2rem auto;
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group .error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

.form-footer a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   CALENDAR
   ============================================ */

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.calendar-header h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.calendar-nav {
    display: flex;
    gap: 0.5rem;
}

.calendar-nav a {
    padding: 0.6rem 1.25rem;
    background: var(--bg-primary);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.calendar-nav a:hover {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.calendar-day-header {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-day {
    background: var(--bg-card);
    min-height: 110px;
    padding: 0.6rem;
    position: relative;
    transition: var(--transition);
}

.calendar-day:hover {
    background: var(--bg-card-hover);
}

.calendar-day.other-month {
    background: #f1f5f9;
    color: var(--text-muted);
}

.calendar-day.today {
    background: #eef2ff;
}

.calendar-day.weekend {
    background: #f1f5f9;
    color: var(--text-muted);
}

.calendar-day.weekend .calendar-day-number {
    color: var(--text-muted);
}

.calendar-day.weekend .add-reservation-btn {
    background: #cbd5e1;
}

.calendar-day-number {
    font-weight: 600;
    margin-bottom: 0.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.calendar-day.today .calendar-day-number {
    color: var(--accent-primary);
}

.add-reservation-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 0.7rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.add-reservation-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.day-reservations {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.reservation-slot {
    padding: 0.3rem 0.5rem;
    background: var(--accent-gradient);
    color: white;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.reservation-slot:hover {
    opacity: 0.9;
}

.reservation-slot.my-reservation {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.reservation-slot.view-all {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlide 0.3s ease;
}

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

.modal h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-reservation-item {
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent-primary);
    margin-bottom: 0.75rem;
}

.modal-reservation-item.my-reservation {
    border-left-color: var(--success);
    background: #ecfdf5;
}

.modal-reservation-time {
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.modal-reservation-item.my-reservation .modal-reservation-time {
    color: var(--success);
}

.modal-reservation-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.modal-reservation-user {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.modal-footer {
    margin-top: 1.5rem;
    text-align: center;
}

/* ============================================
   RESERVATIONS LIST
   ============================================ */

.reservations-list {
    display: grid;
    gap: 1rem;
}

.reservation-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.reservation-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.reservation-card.upcoming {
    border-left: 3px solid var(--accent-primary);
}

.reservation-card.past {
    opacity: 0.7;
    background: #f8fafc;
}

.reservation-card.cancelled {
    border-left: 3px solid var(--danger);
    opacity: 0.6;
}

.reservation-card .info h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.reservation-card .info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.reservation-card .actions {
    display: flex;
    gap: 0.5rem;
}

.btn-danger {
    padding: 0.6rem 1rem;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

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

.btn-secondary {
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    font-size: 0.875rem;
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

/* Existing Reservations Section */
.existing-reservations {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.existing-reservations h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.no-reservations {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.no-reservations i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.reservations-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent-primary);
    transition: var(--transition);
}

.timeline-item:hover {
    background: #f1f5f9;
}

.timeline-item.my-reservation {
    border-left-color: var(--success);
    background: #f0fdf4;
}

.timeline-main {
    flex: 1;
    display: flex;
    gap: 1rem;
}

.timeline-time {
    min-width: 120px;
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 0.9rem;
}

.timeline-item.my-reservation .timeline-time {
    color: var(--success);
}

.timeline-content {
    flex: 1;
}

.timeline-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.timeline-user {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.badge-mine {
    background: var(--success);
    color: white;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    font-weight: 500;
}

.badge-past {
    background: var(--text-muted);
    color: white;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    margin-left: 0.5rem;
}

.badge-cancelled {
    background: var(--danger);
    color: white;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.timeline-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-style: italic;
}

.timeline-actions {
    display: flex;
    align-items: center;
}

.btn-cancel {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #fef2f2;
    color: var(--danger);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid #fecaca;
}

.btn-cancel:hover {
    background: var(--danger);
    color: white;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--border-color);
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    /* Calendrier - pas de scroll, tout doit tenir */
    .calendar-grid {
        font-size: 0.7rem;
        min-width: auto;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 0.25rem;
    }
    
    /* Navigation mobile - icônes seulement */
    .calendar-header {
        padding: 0.5rem;
        gap: 0.25rem;
    }
    
    .calendar-header h2 {
        font-size: 0.95rem;
    }
    
    .calendar-nav a {
        padding: 0.4rem;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.9rem;
    }
    
    .calendar-nav a span,
    .calendar-nav a .nav-text {
        display: none !important;
    }
    
    /* Jours de la semaine - une seule lettre en mobile */
    .calendar-day-header {
        padding: 0.4rem 0;
        font-size: 0.75rem;
        letter-spacing: 0;
        text-align: center;
    }
    
    .calendar-day-header::before {
        content: attr(data-short);
    }
    
    .calendar-day-header {
        font-size: 0;
    }
    
    .calendar-day-header::before {
        font-size: 0.75rem;
    }
    
    .reservation-card {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timeline-main {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .timeline-actions {
        width: 100%;
    }
    
    .btn-cancel {
        width: 100%;
        justify-content: center;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
