
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --warning-color: #f8961e;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-color);
    min-height: 100vh;
}

.main-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin: 2rem auto;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-container {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.3);
    position: relative;
    overflow: hidden;
}

.header-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(-45deg);
}

.header-container h1 {
    margin: 0;
    font-weight: 800;
    font-size: 2.2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-info {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.auth-container {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    margin: 3rem auto;
    max-width: 500px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.auth-container .nav-tabs {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.auth-container .nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    transition: all 0.3s;
}

.auth-container .nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    background: transparent;
}

.stats-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.stat-card {
    text-align: center;
    padding: 1.5rem 1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--light-color), #ffffff);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-label {
    font-size: 0.95rem;
    color: var(--dark-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-form {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.event-form h3 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.25rem rgba(72, 149, 239, 0.25);
    transform: translateY(-2px);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.btn-outline-secondary {
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-outline-secondary:hover {
    transform: translateY(-2px);
}

.btn-light {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.btn-light:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.calendar-tabs-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.calendar-tabs {
    background: linear-gradient(135deg, var(--light-color), #f8f9fa);
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 2rem 0;
}

.calendar-tabs .nav-tabs {
    border-bottom: none;
}

.calendar-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    margin-right: 0.5rem;
    border-radius: 10px 10px 0 0;
    transition: all 0.3s;
}

.calendar-tabs .nav-link.active {
    background: white;
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.calendar-tabs .nav-link:hover {
    background: rgba(255, 255, 255, 0.7);
    color: var(--primary-color);
}

.calendar-content {
    padding: 2rem;
    min-height: 600px;
}

#calendar {
    background: white;
    border-radius: 0 0 15px 15px;
}

.fc-toolbar {
    margin-bottom: 2rem !important;
}

.fc-toolbar-title {
    font-size: 1.8em !important;
    font-weight: 800 !important;
    color: var(--dark-color) !important;
}

.fc-button {
    background: var(--light-color) !important;
    border: 2px solid #e9ecef !important;
    color: var(--dark-color) !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.3s !important;
    padding: 0.5rem 1rem !important;
}

.fc-button:hover, .fc-button:active, .fc-button:focus {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
    transform: translateY(-2px);
}

.fc-button-active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

.fc-daygrid-day-number {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--dark-color);
}

.fc-col-header-cell {
    background: linear-gradient(135deg, var(--light-color), #f8f9fa) !important;
    color: var(--dark-color);
    font-weight: 700;
    padding: 0.8rem 0 !important;
}

.fc-day-today {
    background: rgba(67, 97, 238, 0.1) !important;
}

.fc-event {
    border-radius: 8px;
    border: none;
    padding: 8px 12px;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin: 2px 0;
    transition: all 0.3s;
}

.fc-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.fc-daygrid-event {
    font-size: 0.9em !important;
    line-height: 1.4em;
    white-space: normal !important;
    overflow-wrap: break-word;
}

.fc-daygrid-day-frame {
    min-height: 120px;
}

.event-creator {
    font-size: 0.75em;
    color: #666;
    margin-top: 3px;
    font-style: italic;
}

.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-bottom: none;
    padding: 1.5rem 2rem;
}

.modal-title {
    font-weight: 700;
    font-size: 1.3rem;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1.5rem 2rem;
}

.badge-participant {
    background: linear-gradient(135deg, var(--accent-color), var(--success-color));
    color: white;
    font-size: 0.75em;
    margin-right: 5px;
    margin-bottom: 5px;
    padding: 0.4em 0.8em;
    border-radius: 20px;
    font-weight: 600;
}

.availability-container {
    padding: 1rem;
}

.room-card {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s;
    background: white;
}

.room-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.room-card.available {
    border-left: 4px solid #28a745;
}

.room-card.occupied {
    border-left: 4px solid #dc3545;
}

.room-status {
    font-weight: 600;
    font-size: 0.9em;
    padding: 0.3em 0.8em;
    border-radius: 20px;
}

.status-available {
    background: #d4edda;
    color: #155724;
}

.status-occupied {
    background: #f8d7da;
    color: #721c24;
}

.room-schedule {
    font-size: 0.85em;
    color: #6c757d;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .main-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .header-container {
        padding: 1rem 1.5rem;
    }
    
    .header-container h1 {
        font-size: 1.8rem;
    }
    
    .stats-container,
    .event-form,
    .calendar-content {
        padding: 1.5rem;
    }
    
    .fc-toolbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .user-info {
        font-size: 0.9rem;
        padding: 0.4rem 1rem;
    }
    
    .calendar-tabs {
        padding: 1rem 1rem 0;
    }
    
    .calendar-tabs .nav-link {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.alert {
    border-radius: 10px;
    border: none;
    font-weight: 600;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f1b0b7);
    color: #721c24;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    border-radius: 10px;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.event-participants {
    font-size: 0.75em;
    background: rgba(67, 97, 238, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border-left: 2px solid var(--primary-color);
}

.event-container {
    border-left: 3px solid var(--primary-color);
    background: rgba(255, 255, 255, 0.9);
    margin: 1px 0;
    border-radius: 0 4px 4px 0;
}

.fc-event {
    border: none !important;
    background: transparent !important;
}

.fc-event-main {
    padding: 0 !important;
}
.event-container {
    background: rgba(255, 255, 255, 0.95);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 6px 6px 0;
    margin: 2px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* Correction couleur texte événements */
.fc-event {
    color: #2c3e50 !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #e9ecef !important;
}

.fc-event .fc-event-main {
    color: #2c3e50 !important;
}

/* Container événement */
.event-container {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #2c3e50 !important;
    border-left: 4px solid var(--primary-color);
    border-radius: 0 6px 6px 0;
    margin: 2px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Titre événement */
.event-title {
    color: #2c3e50 !important;
    font-weight: 700;
    line-height: 1.2;
    font-size: 0.85em;
}

/* Participants */
.event-participants {
    color: #4361ee !important;
    background: rgba(67, 97, 238, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(67, 97, 238, 0.2);
    font-size: 0.75em;
    margin-top: 2px;
}

/* Lieu */
.event-location {
    color: #17a2b8 !important;
    background: rgba(23, 162, 184, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border-left: 2px solid #17a2b8;
    font-size: 0.75em;
    margin-top: 2px;
}

/* Heure */
.event-time {
    color: #6c757d !important;
    font-size: 0.7em;
    margin-top: 2px;
}

/* Créateur */
.event-creator {
    color: #6c757d !important;
    font-size: 0.7em;
    font-style: italic;
    margin-top: 2px;
}

/* Override FullCalendar styles */
.fc-daygrid-event {
    background: transparent !important;
    border: none !important;
}

.fc-event-main-frame {
    background: transparent !important;
}

.fc-event-time {
    color: #6c757d !important;
}

.fc-event-title {
    color: #2c3e50 !important;
    font-weight: 600;
}

/* Couleurs par lieu */
.event-container[data-location="SALLE REUNION 1"] {
    border-left-color: #28a745;
}

.event-container[data-location="SALLE REUNION 2"] {
    border-left-color: #ffc107;
}

.event-container[data-location="HORS SITE"] {
    border-left-color: #6c757d;
}

.event-title {
    font-weight: 700;
    line-height: 1.2;
}

.event-participants {
    background: rgba(67, 97, 238, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(67, 97, 238, 0.2);
}

.fc-event {
    border: none !important;
    background: transparent !important;
    margin: 1px 0 !important;
}

.fc-event-main {
    padding: 0 !important;
}

.fc-daygrid-event {
    border-radius: 0 6px 6px 0 !important;
}

/* Améliorer la lisibilité sur les cellules du calendrier */
.fc-daygrid-day-frame {
    background: rgba(248, 249, 250, 0.5);
}

.fc-day-today .fc-daygrid-day-frame {
    background: rgba(67, 97, 238, 0.05) !important;
}
.event-location {
    background: rgba(23, 162, 184, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border-left: 2px solid #17a2b8;
}

/* Style pour les salles dans le calendrier */
.fc-event[data-location="SALLE REUNION 1"] {
    border-left: 4px solid #28a745 !important;
}

.fc-event[data-location="SALLE REUNION 2"] {
    border-left: 4px solid #ffc107 !important;
}

.fc-event[data-location="HORS SITE"] {
    border-left: 4px solid #6c757d !important;
}

/* Styles pour les salles */
.salle-events-header {
    border-radius: 10px 10px 0 0;
}

.salle-events-list {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 10px 10px;
}

.event-item {
    transition: background-color 0.2s;
}

.event-item:hover {
    background-color: #f8f9fa;
}

.event-item h6 {
    color: #2c3e50;
}

.room-card {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.room-card.available {
    border-left: 4px solid #28a745;
}

.room-status {
    padding: 0.3em 0.8em;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.status-available {
    background: #d4edda;
    color: #155724;
}

.status-occupied {
    background: #f8d7da;
    color: #721c24;
}

