/* Variables CSS */
:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --background-color: #f8fafc;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
}

/* Page de connexion */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
}

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

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

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Boutons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #475569;
}

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

.btn-danger:hover {
    background-color: #dc2626;
}

/* Header */
.header {
    background-color: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.5rem;
    color: var(--text-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#username-display {
    font-weight: 500;
}

/* Container principal */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Messages d'erreur */
.error-message {
    color: var(--danger-color);
    margin-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
}

/* Info box et listes de réservations */
.info-box {
    background-color: #dbeafe;
    border: 1px solid #60a5fa;
    color: #1e40af;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.reservation-info-container {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.reservation-info-container p {
    margin: 0;
    color: var(--secondary-color);
}

#reservation-info h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--text-color);
}

.reservations-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Scrollbar personnalisée */
.reservations-list::-webkit-scrollbar {
    width: 6px;
}

.reservations-list::-webkit-scrollbar-track {
    background: var(--background-color);
    border-radius: 3px;
}

.reservations-list::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 3px;
}

.reservations-list::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Résumé des réservations (admin) */
.reservations-summary {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.reservations-summary h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background-color: var(--background-color);
    border-radius: 6px;
    text-align: center;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
}

.stat-value.available {
    color: var(--success-color);
}

.stat-value.reserved {
    color: var(--warning-color);
}

.stat-value.closed {
    color: var(--secondary-color);
}

.users-summary {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.users-summary h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.user-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background-color: var(--background-color);
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.user-name {
    font-weight: 500;
}

.user-count {
    color: var(--secondary-color);
}

/* Contrôles admin */
.admin-controls {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-controls h2 {
    margin-bottom: 0.5rem;
}

.admin-controls p {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Légende */
.legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-color.available {
    background-color: var(--success-color);
}

.legend-color.reserved {
    background-color: var(--warning-color);
}

.legend-color.closed {
    background-color: var(--secondary-color);
}

/* Calendrier */
#calendar {
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-height: 800px;
    overflow-y: auto;
}

/* Optimisation pour beaucoup de créneaux */
.fc-timegrid-slot {
    height: 2.5em !important; /* Réduit la hauteur des créneaux pour mieux voir en 24h */
}

.fc-timegrid-slot-minor {
    border-top-style: dotted !important;
}

/* Events du calendrier */
.fc-event {
    cursor: pointer;
    border: none !important;
    font-size: 0.75rem; /* Texte plus petit pour mieux s'adapter */
    padding: 2px 4px;
}

/* Ajustement pour vue 24h */
.fc-timegrid-event {
    overflow: hidden;
}

.fc-event-title {
    font-weight: 500;
}

.fc-event.available {
    background-color: var(--success-color) !important;
}

.fc-event.reserved {
    background-color: var(--warning-color) !important;
}

.fc-event.closed {
    background-color: var(--secondary-color) !important;
}

/* Liste des réservations */
#reservations-list {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#reservations-list h3 {
    margin-bottom: 1rem;
}

.reservation-item {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.reservation-item:hover {
    background-color: var(--background-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.reservation-info {
    flex: 1;
}

.reservation-date {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.reservation-time {
    color: var(--primary-color);
    font-size: 0.95rem;
}

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

/* Notes de réservation */
.reservation-note {
    font-size: 0.875rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
    font-style: italic;
}

.reservation-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Menu de réservation (overlay) */
.reservation-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-in-out;
}

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

.reservation-menu h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.reservation-menu p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.menu-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Dialogue de note */
.note-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    animation: fadeIn 0.2s ease-in-out;
}

.note-dialog {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 350px;
    width: 90%;
    animation: slideIn 0.3s ease-out;
}

.note-dialog h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.note-dialog p {
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.note-dialog input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    transition: border-color 0.3s;
}

.note-dialog input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.char-counter {
    text-align: right;
    font-size: 0.75rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.dialog-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Système de compteur */
.counter-container {
    margin-bottom: 2rem;
}

.counter-box {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 1.5rem;
}

.counter-box h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.3rem;
}

.counter-display {
    font-size: 4rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 1.5rem 0;
    font-family: 'Courier New', monospace;
}

#counter-value {
    display: inline-block;
    transition: all 0.3s ease;
}

.counter-animate {
    animation: counterPulse 0.6s ease-in-out;
}

@keyframes counterPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); color: var(--success-color); }
    100% { transform: scale(1); }
}

.counter-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.stats-box {
    background-color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stats-box h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--text-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background-color: var(--background-color);
    border-radius: 8px;
    transition: transform 0.2s;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1100;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid var(--success-color);
    color: var(--success-color);
}

.notification-error {
    border-left: 4px solid var(--danger-color);
    color: var(--danger-color);
}

.notification-info {
    border-left: 4px solid var(--primary-color);
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .container {
        margin: 1rem auto;
    }
    
    .legend {
        justify-content: center;
    }
    
    .summary-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .reservation-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .reservation-actions {
        width: 100%;
        justify-content: center;
    }
    
    .btn-sm {
        flex: 1;
    }
    
    .reservation-menu,
    .note-dialog {
        width: 95%;
        padding: 1.5rem;
    }
    
    .counter-display {
        font-size: 3rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* style.css */

.login-container {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: -webkit-flex !important;
  display: flex !important;
  -webkit-flex-direction: column !important;
  -ms-flex-direction: column !important;
  flex-direction: column !important;
  -webkit-align-items: center !important;
  -ms-flex-align: center !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100%;
  min-height: 100vh;
  padding-top: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 2) dimension et centrage de l’image */
.login-logo {
  display: block;
  width: 60%;                 /* s’adapte au conteneur */
  max-width: 200px;           /* limite en grand écran */
  height: auto;
  margin-bottom: 1.5rem;      /* espace sous le logo */
}

/* 3) taille du cadre de connexion et centrage */
.login-box {
  width: 90%;
  max-width: 360px;           /* largeur fixe max */
  margin: 0 auto;             /* centré */
  padding: 2rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* 4) ajustement mobile */
@media (max-width: 480px) {
  .login-logo {
    width: 50%;
    max-width: 150px;
    margin-bottom: 1rem;
  }
  .login-box {
    padding: 1.5rem;
  }
}

