:root { 
  --primary: #2563eb; 
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary: #059669;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg: #ffffff; 
  --bg-light: #f8fafc;
  --card: #ffffff; 
  --text: #1e293b; 
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-warning: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  
  /* Nouvelles variables pour les animations */
  --animation-duration: 0.3s;
  --animation-duration-slow: 0.6s;
  --animation-easing: cubic-bezier(0.4, 0, 0.2, 1);
  --animation-easing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
}

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
  40%, 43% { transform: translate3d(0, -8px, 0); }
  70% { transform: translate3d(0, -4px, 0); }
  90% { transform: translate3d(0, -2px, 0); }
}

@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px rgba(37, 99, 235, 0.5); }
  50% { box-shadow: 0 0 20px rgba(37, 99, 235, 0.8), 0 0 30px rgba(37, 99, 235, 0.6); }
}

@keyframes ripple {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(4); opacity: 0; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes loading-dots {
  0%, 20% { color: rgba(0,0,0,0); text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0); }
  40% { color: var(--text); text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0); }
  60% { text-shadow: .25em 0 0 var(--text), .5em 0 0 rgba(0,0,0,0); }
  80%, 100% { text-shadow: .25em 0 0 var(--text), .5em 0 0 var(--text); }
}

/* Styles généraux pour les boutons avec animations */
.btn-primary, .btn-secondary, button {
  position: relative;
  overflow: hidden;
  transition: all var(--animation-duration) var(--animation-easing);
  cursor: pointer;
  border: none;
  outline: none;
  user-select: none;
}

.btn-primary:active, .btn-secondary:active, button:active {
  transform: scale(0.98);
}

/* Effet ripple pour les boutons */
.btn-primary::before, .btn-secondary::before, button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:active::before, .btn-secondary:active::before, button:active::before {
  width: 300px;
  height: 300px;
}

/* Animation de chargement pour les boutons */
.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Animations pour les formulaires */
.form-group {
  animation: slideInLeft var(--animation-duration) var(--animation-easing);
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }

/* Animations pour les inputs */
input, select, textarea {
  transition: all var(--animation-duration) var(--animation-easing);
}

input:focus, select:focus, textarea:focus {
  transform: scale(1.02);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
  width: 60%;
}

/* Animations pour les listes */
.list-item {
  animation: slideInRight var(--animation-duration) var(--animation-easing);
  transition: all var(--animation-duration) var(--animation-easing);
}

.list-item:hover {
  transform: translateX(8px);
  background: var(--bg-light);
}

/* Animations pour les icônes */
.icon {
  transition: all var(--animation-duration) var(--animation-easing);
}

.icon:hover {
  transform: scale(1.2) rotate(5deg);
}

/* Animations pour les notifications */
.notification {
  animation: slideInRight var(--animation-duration) var(--animation-easing);
}

.notification.success {
  animation: slideInRight var(--animation-duration) var(--animation-easing), glow 2s infinite;
}

.notification.error {
  animation: slideInRight var(--animation-duration) var(--animation-easing), pulse 1s infinite;
}

/* Styles pour les éléments de check-in */
.checkin-item {
  padding: 12px;
  background: var(--bg-light);
  border-radius: 8px;
  margin-bottom: 8px;
  border-left: 4px solid var(--primary);
  transition: all var(--animation-duration) var(--animation-easing);
}

.checkin-item:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow);
}

.checkin-time {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
}

.checkin-coords {
  color: var(--text-light);
  font-size: 0.8rem;
  font-family: monospace;
  margin: 4px 0;
}

.checkin-note {
  color: var(--text);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Amélioration des listes */
#checkins {
  list-style: none;
  padding: 0;
  margin: 0;
}

#checkins li {
  margin-bottom: 8px;
  animation: slideInRight var(--animation-duration) var(--animation-easing);
}

/* Indicateur GPS */
.gps-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.gps-icon {
  font-size: 2rem;
  animation: pulse 1.5s infinite;
}

.gps-text {
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
}

.gps-dots {
  display: flex;
  gap: 4px;
}

.gps-dots span {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: loading-dots 1.4s infinite;
}

.gps-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.gps-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

/* Animation fadeOut */
@keyframes fadeOut {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
}

/* Amélioration du feedback GPS */
.gps-feedback {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  animation: slideInRight var(--animation-duration) var(--animation-easing);
}

.gps-feedback.success {
  border-left: 4px solid var(--success);
}

.gps-feedback.warning {
  border-left: 4px solid var(--warning);
}

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

/* Amélioration des formulaires */
.form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text);
  transition: color var(--animation-duration) var(--animation-easing);
}

.form-group input:focus + label,
.form-group select:focus + label {
  color: var(--primary);
}

/* Effet de focus amélioré */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  transform: scale(1.02);
}

/* Amélioration des sélecteurs géographiques */
.geo-selector {
  position: relative;
  margin-bottom: 1rem;
}

.geo-selector::after {
  content: '📍';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 1.2rem;
  opacity: 0.6;
}

/* Animation pour les éléments qui apparaissent */
.fade-in {
  animation: fadeIn var(--animation-duration-slow) var(--animation-easing);
}

.slide-in-left {
  animation: slideInLeft var(--animation-duration-slow) var(--animation-easing);
}

.slide-in-right {
  animation: slideInRight var(--animation-duration-slow) var(--animation-easing);
}

.scale-in {
  animation: scaleIn var(--animation-duration-slow) var(--animation-easing);
}

/* Effet de survol pour les cartes */
.card:hover .card-header {
  transform: translateY(-2px);
}

.card-header {
  transition: transform var(--animation-duration) var(--animation-easing);
}

/* Amélioration des boutons avec des gradients */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

/* Animation pour les icônes dans les boutons */
.btn-icon {
  transition: transform var(--animation-duration) var(--animation-easing);
}

.btn-primary:hover .btn-icon,
.btn-secondary:hover .btn-icon {
  transform: scale(1.1) rotate(5deg);
}

/* Effet de particules pour les succès */
.success-particles {
  position: relative;
  overflow: hidden;
}

.success-particles::after {
  content: '✨';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  animation: float 2s infinite;
  pointer-events: none;
}

/* Image Hero Section */
.hero-image-section {
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: fadeIn var(--animation-duration-slow) var(--animation-easing);
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  padding: 4px;
}

.hero-image-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, 
    rgba(37, 99, 235, 0.1) 0%, 
    rgba(5, 150, 105, 0.1) 50%, 
    rgba(37, 99, 235, 0.1) 100%);
  border-radius: 20px;
  z-index: -1;
  animation: shimmer 3s infinite;
}

.hero-image-container {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: 16px;
  background: white;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.8s ease;
  filter: brightness(0.9) contrast(1.1);
  animation: subtleZoom 8s ease-in-out infinite;
}

.hero-image-section:hover .hero-image {
  transform: scale(1.05);
  filter: brightness(1) contrast(1.2);
}

@keyframes subtleZoom {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 2rem;
  animation: slideInUp 0.8s ease-out;
}

.hero-overlay h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.6);
}

.hero-overlay p {
  font-size: 1.2rem;
  margin: 0 0 1rem 0;
  color: white;
  opacity: 0.95;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7), 0 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  animation: float 3s ease-in-out infinite;
}

.badge-icon {
  font-size: 1.2rem;
  animation: pulse 2s infinite;
}

/* Responsive pour l'image hero */
@media (max-width: 768px) {
  .hero-image-section {
    margin: 1rem auto;
    border-radius: 12px;
  }
  
  .hero-image-container {
    height: 250px;
  }
  
  .hero-overlay {
    padding: 1rem;
  }
  
  .hero-overlay h2 {
    font-size: 1.5rem;
  }
  
  .hero-overlay p {
    font-size: 1rem;
  }
  
  .hero-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

/* Animation de chargement de l'image hero */
.hero-image {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.hero-image.loaded {
  opacity: 1;
}

* { box-sizing: border-box; }

body { 
  margin: 0; 
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif; 
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
  color: var(--text);
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Pseudo-éléments temporairement désactivés pour éviter les problèmes de déformation */
/*
body::before {
  content: '';
  position: fixed;
  top: -20%;
  left: -10%;
  width: 40%;
  height: 140%;
  background-image: url('/Media/logo-ccrb.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.01;
  z-index: -1;
  pointer-events: none;
  transform: rotate(-15deg);
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(5, 150, 105, 0.05) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}
*/

/* Navigation Bar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1000;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 20px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 15px;
  gap: 16px;
}

.navbar-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  padding: 3px;
}

.navbar-title h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.navbar-subtitle {
  font-size: 16px;
  opacity: 0.9;
  font-weight: 400;
  color: white;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.navbar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  color: white;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  white-space: nowrap;
  font-size: 16px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.navbar-link:hover::before {
  left: 100%;
}

.navbar-link:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.navbar-link-active {
  background: rgba(255, 255, 255, 0.25);
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.navbar-icon {
  font-size: 18px;
}

.navbar-dropdown {
  position: relative;
  z-index: 1002;
}

.navbar-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: none;
  border: none;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 16px;
  white-space: nowrap;
}

.navbar-dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.navbar-arrow {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.navbar-dropdown:hover .navbar-arrow {
  transform: rotate(180deg);
}

.navbar-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  padding: 12px;
  min-width: 280px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1001;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.navbar-dropdown:hover .navbar-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.navbar-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  background: none;
  border: none;
  color: var(--text);
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}

.navbar-dropdown-item:hover {
  background: var(--bg-light);
  color: var(--primary);
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 20px;
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.navbar-user-info {
  font-size: 16px;
  font-weight: 500;
  opacity: 0.9;
}

.navbar-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
  font-weight: 500;
}

.navbar-logout:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

/* Page Header */
.page-header {
  padding: 24px 0;
  background: transparent;
  border-bottom: none;
  margin: 0 0 20px 0;
  text-align: center;
}

.page-header h2 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.page-header p {
  margin: 0 0 16px 0;
  color: var(--text-light);
  font-size: 16px;
}

.page-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.month-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  background: white;
  color: var(--text);
}

.month-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Main Content */
.main-content {
  padding: 20px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  max-width: 1200px;
  width: 100%;
  min-height: calc(100vh - 80px);
}

/* Responsive Navbar */
@media (max-width: 1200px) {
  .navbar {
    padding: 12px 24px;
  }
  
  .navbar-menu {
    gap: 8px;
  }
  
  .navbar-link,
  .navbar-dropdown-toggle {
    padding: 10px 14px;
    font-size: 14px;
  }
  
  .navbar-dropdown-menu {
    min-width: 260px;
    top: calc(100% + 12px);
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 12px 16px;
    flex-direction: column;
    gap: 16px;
  }
  
  .navbar-brand {
    width: 100%;
    justify-content: center;
  }
  
  .navbar-menu {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .navbar-user {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 12px;
    width: 100%;
    justify-content: center;
  }
  
  .navbar-dropdown-menu {
    position: fixed;
    top: auto;
    right: 16px;
    left: 16px;
    min-width: auto;
    width: calc(100% - 32px);
  }
  
  .main-content {
    margin: 0;
    width: 100%;
    padding: 15px;
  }
}

/* Form Styles */
.form-section {
  margin-bottom: 32px;
  padding: 20px;
  background: var(--bg-light);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.form-section-title {
  margin: 0 0 20px 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  background: white;
  color: var(--text);
  transition: all 0.2s ease;
}

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

.form-group small {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* Photo Upload Styles */
.photo-upload-container {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.photo-preview {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  position: relative;
  overflow: hidden;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-size: 14px;
}

.photo-icon {
  font-size: 32px;
  opacity: 0.5;
}

.photo-upload-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-photo-upload,
.btn-photo-remove {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-photo-upload {
  background: var(--primary);
  color: white;
}

.btn-photo-upload:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

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

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

/* Form Actions */
.form-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.btn-cancel {
  padding: 12px 24px;
  background: var(--text-light);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel:hover {
  background: var(--text-muted);
  transform: translateY(-1px);
}

/* Responsive Form */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .photo-upload-container {
    flex-direction: column;
    align-items: center;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .btn-cancel,
  .btn-success {
    width: 100%;
  }
}

/* Legacy header styles for backward compatibility */
header { 
  padding: 24px 32px; 
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid rgba(255, 255, 255, 0.1);
}

header::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -15%;
  width: 300px;
  height: 300px;
  background: url('/Media/logo-ccrb.png') no-repeat center;
  background-size: contain;
  opacity: 0.08;
  z-index: 0;
  transform: rotate(-10deg);
}

header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(255,255,255,0.05) 100%);
  z-index: 1;
}

h1 { 
  margin: 0; 
  font-size: 36px; 
  font-weight: 800;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  letter-spacing: -0.5px;
}

h2 {
  margin: 0 0 16px 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}

main { 
  padding: 32px; 
  display: grid; 
  gap: 32px; 
  max-width: 1200px; 
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.card { 
  background: var(--card); 
  border: 1px solid var(--border-light); 
  border-radius: 16px; 
  padding: 32px;
  box-shadow: var(--shadow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn var(--animation-duration-slow) var(--animation-easing);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-8px) scale(1.02);
  border-color: var(--primary-light);
}

.card:hover::before {
  opacity: 1;
}

.agent-profile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 32px;
  background: white;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.agent-profile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--gradient-success);
}

.agent-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary);
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
}
.org-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 8px;
}

.agent-avatar:hover {
  transform: scale(1.05);
}

.agent-info h3 {
  margin: 0 0 12px 0;
  color: var(--text);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.agent-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  font-size: 14px;
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
}

.detail-item:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.detail-item strong {
  color: var(--primary);
  min-width: 100px;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-present { background: #dcfce7; color: #166534; }
.status-absent { background: #fef2f2; color: #dc2626; }
.status-tolerance { background: #fef3c7; color: #d97706; }

button { 
  background: var(--gradient-primary);
  color: white; 
  border: none; 
  padding: 16px 24px; 
  border-radius: 12px; 
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

button:hover:not([disabled]) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

button:hover:not([disabled])::before {
  left: 100%;
}

button:active:not([disabled]) {
  transform: translateY(0);
}

button[disabled] { 
  opacity: .5; 
  cursor: not-allowed;
  transform: none;
}

.btn-success { 
  background: var(--gradient-success);
}

.btn-warning { 
  background: var(--gradient-warning);
}

.btn-danger { 
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

input, select, textarea { 
  width: 100%; 
  padding: 16px 20px; 
  margin: 12px 0; 
  border-radius: 12px; 
  border: 2px solid var(--border-light); 
  background: white; 
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), var(--shadow-lg);
  transform: translateY(-1px);
}

input:hover, select:hover, textarea:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
}

.hidden { display: none; }

ul { 
  padding-left: 20px; 
  margin: 0;
}

li { 
  margin: 8px 0; 
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

li:last-child {
  border-bottom: none;
}

#status { 
  margin-top: 12px; 
  font-size: 13px; 
  color: var(--text-light);
  padding: 8px 12px;
  background: #f1f5f9;
  border-radius: 6px;
  border-left: 3px solid var(--primary);
}

.row { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 12px; 
  margin: 8px 0; 
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

#map { 
  height: 480px; 
  border-radius: 12px; 
  overflow: hidden; 
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.timeline {
  max-height: 400px;
  overflow-y: auto;
}

.timeline li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: white;
  border-radius: 8px;
  margin: 8px 0;
  box-shadow: var(--shadow);
}

.timeline li::before {
  content: '📍';
  font-size: 16px;
}

.export-link {
  display: inline-block;
  background: var(--secondary);
  color: white;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

.export-link:hover {
  background: #047857;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.presence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.presence-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}

.distance-info {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

@media (max-width: 768px) {
  main {
    padding: 16px;
  }
  
  .row {
    grid-template-columns: 1fr;
  }
  
  .filters {
    grid-template-columns: 1fr;
  }
  
  h1 {
    font-size: 24px;
  }
  
  .agent-profile {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 20px;
  }

  .org-logo { margin: 0 auto; }
  
  /* Améliorations pour le calendrier mobile */
  .calendar-container {
    padding: 16px;
  }
  
  .calendar-day {
    min-height: 44px;
    font-size: 14px;
  }
  
  .calendar-header h3 {
    font-size: 18px;
  }
  
  /* Améliorations pour les boutons mobile */
  button {
    padding: 14px 20px;
    font-size: 16px;
    min-height: 48px;
  }
  
  /* Améliorations pour les inputs mobile */
  input, select, textarea {
    padding: 14px 16px;
    font-size: 16px;
    min-height: 48px;
  }
  
  /* Améliorations pour les cartes mobile */
  .card {
    padding: 20px;
    margin-bottom: 16px;
  }
  
  /* Améliorations pour le profil agent mobile */
  .agent-details {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .detail-item {
    padding: 12px 16px;
    font-size: 13px;
  }
}

/* ===== BOUTONS D'ACCÈS RAPIDE ===== */
.quick-access-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.quick-access-buttons .btn-primary,
.quick-access-buttons .btn-secondary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.quick-access-buttons .btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: white;
}

.quick-access-buttons .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.quick-access-buttons .btn-secondary {
  background: white;
  color: #0ea5e9;
  border: 2px solid #0ea5e9;
}

.quick-access-buttons .btn-secondary:hover {
  background: #0ea5e9;
  color: white;
  transform: translateY(-2px);
}

.btn-icon {
  font-size: 1.2rem;
}

/* ===== INFORMATIONS D'ACCUEIL ===== */
.welcome-info {
  margin-top: 2rem;
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.info-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.info-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.info-card h3 {
  margin: 0 0 1rem 0;
  color: #1f2937;
  font-size: 1.25rem;
}

.info-card p {
  margin: 0;
  color: #6b7280;
  line-height: 1.6;
}

/* ===== AUTHENTIFICATION ===== */
.auth-tabs {
  display: flex;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e5e7eb;
}

.auth-tab {
  background: none;
  border: none;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  font-size: 1rem;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.auth-tab.active {
  color: #0ea5e9;
  border-bottom-color: #0ea5e9;
  font-weight: 600;
}

.auth-tab:hover {
  color: #0ea5e9;
  background-color: #f8fafc;
}

/* ===== PROFIL UTILISATEUR ===== */
.profile-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.profile-info {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: start;
}

.profile-avatar {
  text-align: center;
}

.profile-avatar-img {
  max-width: 180px;
  max-height: 160px;
  width: auto;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  border: 1px solid #e5e7eb;
  background: #fff;
  margin-bottom: 1rem;
}

.profile-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.role-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
}

.role-admin {
  background-color: #fef2f2;
  color: #dc2626;
}

.role-supervisor {
  background-color: #fef3c7;
  color: #d97706;
}

.role-agent {
  background-color: #f0f9ff;
  color: #0284c7;
}

.settings-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.settings-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.setting-item {
  margin-bottom: 1rem;
}

.setting-item label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

/* ===== GESTION DES AGENTS ===== */
.admin-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.btn-icon {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background-color: #f3f4f6;
}

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

.agents-table-container {
  overflow-x: auto;
}

.agents-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.agents-table th,
.agents-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.agents-table th {
  background-color: #f9fafb;
  font-weight: 600;
  color: #374151;
}

.agent-avatar-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.status-active {
  background-color: #f0fdf4;
  color: #166534;
}

.status-inactive {
  background-color: #fef2f2;
  color: #dc2626;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
}

.loading, .no-data {
  text-align: center;
  padding: 2rem;
  color: #6b7280;
  font-style: italic;
}

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

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-card .stat-icon {
  font-size: 2rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  border-radius: 12px;
  color: white;
}

.stat-card .stat-content {
  flex: 1;
}

.stat-card .stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1;
}

.stat-card .stat-label {
  color: #6b7280;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* ===== RAPPORTS ===== */
.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e5e7eb;
}

.report-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.metric-card .metric-icon {
  font-size: 2rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  border-radius: 12px;
  color: white;
}

.metric-card .metric-content {
  flex: 1;
}

.metric-card .metric-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1;
}

.metric-card .metric-label {
  color: #6b7280;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.report-table-container {
  overflow-x: auto;
  margin-bottom: 2rem;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
}

.report-table th,
.report-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.report-table th {
  background-color: #f9fafb;
  font-weight: 600;
  color: #374151;
}

.report-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.chart-container {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-placeholder {
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  border-radius: 8px;
  color: #6b7280;
  text-align: center;
}

.saved-reports {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.saved-report-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.report-info h4 {
  margin: 0 0 0.5rem 0;
  color: #1f2937;
}

.report-info p {
  margin: 0 0 0.25rem 0;
  color: #6b7280;
  font-size: 0.875rem;
}

.report-info small {
  color: #9ca3af;
  font-size: 0.75rem;
}

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

.filter-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

/* ===== ADMINISTRATION ===== */
.admin-dashboard {
  margin-bottom: 2rem;
}

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

.admin-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.units-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.unit-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.unit-info h4 {
  margin: 0 0 0.5rem 0;
  color: #1f2937;
}

.unit-info p {
  margin: 0 0 0.25rem 0;
  color: #6b7280;
  font-size: 0.875rem;
}

.unit-info small {
  color: #9ca3af;
  font-size: 0.75rem;
}

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

.config-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2rem;
}

.config-section {
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.config-section h4 {
  margin: 0 0 1rem 0;
  color: #1f2937;
}

.config-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.config-item label {
  font-weight: 600;
  color: #374151;
}

.config-item input[type="checkbox"] {
  margin-right: 0.5rem;
}

.work-hours-config {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.work-hours-config span {
  color: #6b7280;
  font-weight: 500;
}

.config-actions {
  display: flex;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.maintenance-actions {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.maintenance-item {
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.maintenance-item h4 {
  margin: 0 0 0.5rem 0;
  color: #1f2937;
}

.maintenance-item p {
  margin: 0 0 1rem 0;
  color: #6b7280;
  font-size: 0.875rem;
}

.maintenance-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filters-section {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1rem;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
}

.filter-group input,
.filter-group select {
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: border-color 0.3s ease;
}

.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: #007bff;
}

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

.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.agents-table-container {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.agents-table {
  width: 100%;
  border-collapse: collapse;
}

.agents-table th {
  background: #f8f9fa;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #e0e0e0;
  font-size: 0.9rem;
}

.agents-table td {
  padding: 1rem;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.agents-table tr:hover {
  background: #f8f9fa;
}

.agent-photo {
  width: 60px;
}

.agent-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e0e0e0;
}

.agent-name {
  min-width: 150px;
}

.agent-name-main {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.25rem;
}

.agent-name-sub {
  font-size: 0.8rem;
  color: #666;
}

.agent-email {
  color: #007bff;
  font-size: 0.9rem;
}

.agent-role {
  min-width: 100px;
}

.role-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.role-agent {
  background: #e3f2fd;
  color: #1976d2;
}

.role-supervisor {
  background: #fff3e0;
  color: #f57c00;
}

.role-admin {
  background: #fce4ec;
  color: #c2185b;
}

.agent-phone {
  color: #666;
  font-size: 0.9rem;
}

.agent-location {
  color: #666;
  font-size: 0.9rem;
}

.agent-project {
  color: #333;
  font-size: 0.9rem;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-status {
  min-width: 80px;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-active {
  background: #e8f5e8;
  color: #2e7d32;
}

.status-inactive {
  background: #ffebee;
  color: #c62828;
}

.status-suspended {
  background: #fff3e0;
  color: #ef6c00;
}

.agent-actions {
  min-width: 100px;
  text-align: center;
}

.btn-edit,
.btn-delete {
  background: none;
  border: none;
  padding: 0.5rem;
  margin: 0 0.25rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.btn-edit:hover {
  background: #e3f2fd;
  transform: scale(1.1);
}

.btn-delete:hover {
  background: #ffebee;
  transform: scale(1.1);
}

.no-data {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 2rem;
}

.loading {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 2rem;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.pagination button {
  padding: 0.75rem 1.5rem;
  border: 2px solid #e0e0e0;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

/* === Navbar Layout Override === */
/* Ensures the dynamic navbar is always horizontal */
.navbar .navbar-menu {
    display: flex;
    flex-direction: row !important; /* Force horizontal layout */
    align-items: center;
    justify-content: space-between; /* Distribute items */
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.navbar .circle-actions {
    display: flex;
    flex-direction: row; /* Ensure actions are in a row */
    gap: 8px; /* Space between buttons */
    align-items: center;
}

#page-info {
  font-weight: 600;
  color: #333;
}

/* ===== CALENDRIER DE PRÉSENCE ===== */
.calendar-container {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-light);
}

.calendar-header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  flex: 1;
}

.calendar-nav-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.calendar-nav-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

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

.calendar-day-header {
  text-align: center;
  font-weight: 600;
  color: var(--text-light);
  padding: 12px 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg-light);
  border-radius: 8px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  position: relative;
  border: 2px solid transparent;
  background: white;
  color: var(--text);
}

.calendar-day:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.calendar-day.other-month {
  color: var(--text-muted);
  background: var(--bg-light);
  cursor: default;
}

.calendar-day.other-month:hover {
  transform: none;
  box-shadow: none;
  border-color: transparent;
}

.calendar-day.today {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
}

.calendar-day.today:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.calendar-day.present {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-weight: 700;
}

.calendar-day.present:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.calendar-day.absent {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  font-weight: 700;
}

.calendar-day.absent:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.calendar-day.partial {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  font-weight: 700;
}

.calendar-day.partial:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.calendar-day.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.calendar-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
}

.legend-color.present {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.legend-color.absent {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.legend-color.today {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.legend-color.partial {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Responsive pour le calendrier */
@media (max-width: 768px) {
  .calendar-container {
    padding: 16px;
  }
  
  .calendar-header h3 {
    font-size: 20px;
  }
  
  .calendar-nav-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  
  .calendar-day {
    font-size: 14px;
    min-height: 40px;
  }
  
  .calendar-legend {
    gap: 16px;
  }
  
  .legend-item {
    font-size: 12px;
  }
  
  .legend-color {
    width: 12px;
    height: 12px;
  }
}

/* ===== TABLEAU DE BORD ===== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.metric-card {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.metric-card:hover::before {
  opacity: 1;
}

.metric-icon {
  font-size: 32px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.metric-content {
  flex: 1;
  min-width: 0;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.2;
}

.metric-label {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 500;
  line-height: 1.3;
}

/* Animations pour les métriques */
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
  from { 
    opacity: 0; 
    transform: translateY(30px) scale(0.95); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
}

@keyframes fadeInScale {
  from { 
    opacity: 0; 
    transform: scale(0.9); 
  }
  to { 
    opacity: 1; 
    transform: scale(1); 
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.metric-card.animate {
  animation: countUp 0.6s ease-out;
}

.card.animate-in {
  animation: slideInUp 0.6s ease-out;
}

.agent-profile.animate-in {
  animation: fadeInScale 0.8s ease-out;
}

.calendar-container.animate-in {
  animation: slideInUp 0.7s ease-out;
}

/* Animation de pulsation pour les boutons actifs */
button:not([disabled]):hover {
  animation: pulse 0.3s ease-in-out;
}

/* Animation d'entrée pour les éléments de la page */
.main-content > .card {
  animation: slideInUp 0.6s ease-out;
}

.main-content > .card:nth-child(1) { animation-delay: 0.1s; }
.main-content > .card:nth-child(2) { animation-delay: 0.2s; }
.main-content > .card:nth-child(3) { animation-delay: 0.3s; }
.main-content > .card:nth-child(4) { animation-delay: 0.4s; }
.main-content > .card:nth-child(5) { animation-delay: 0.5s; }

/* Responsive pour le tableau de bord */
@media (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .metric-card {
    padding: 16px;
    flex-direction: column;
    text-align: center;
  }
  
  .metric-icon {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
  
  .metric-value {
    font-size: 24px;
  }
  
  .metric-label {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== MODAL AGENT ===== */
#agent-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

#agent-modal:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

#agent-modal .modal-content {
  background: white;
  padding: 24px;
  border-radius: 12px;
  width: min(900px, 95vw);
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

#agent-modal:not(.hidden) .modal-content {
  transform: scale(1);
}

/* Responsive pour la gestion des agents */
@media (max-width: 768px) {
  .filters-section {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .admin-actions {
    flex-direction: column;
  }
  
  .agents-table-container {
    overflow-x: auto;
  }
  
  .agents-table {
    min-width: 800px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  #agent-modal .modal-content {
    width: 95vw;
    max-height: 95vh;
    padding: 16px;
  }
}

/* Styles pour le modal de suppression */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  padding: 24px;
  border-radius: 12px;
  width: min(400px, 95vw);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal:not(.hidden) .modal-content {
  transform: scale(1);
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

.modal h3 {
  margin: 0 0 16px 0;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 600;
}

.modal p {
  margin: 0 0 20px 0;
  color: var(--text-light);
  line-height: 1.5;
}

/* Boutons du modal */
.btn-cancel {
  background: var(--bg-light);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-cancel:hover {
  background: var(--border-light);
  border-color: var(--text-light);
}

.btn-danger {
  background: var(--danger);
  color: white;
  border: 1px solid var(--danger);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

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

.btn-danger:active {
  background: #b91c1c;
  border-color: #b91c1c;
}

/* Styles pour les groupes d'inputs géographiques */
.geo-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}

.geo-input-group label {
  font-weight: 500;
  color: var(--text);
  font-size: 14px;
}

.geo-input-group select,
.geo-input-group input[type="text"] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  background: white;
  transition: border-color 0.2s ease;
}

.geo-input-group select:focus,
.geo-input-group input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.geo-input-group select:disabled {
  background: var(--bg-light);
  color: var(--text-muted);
  cursor: not-allowed;
}

.toggle-input-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  align-self: flex-start;
  margin-top: 4px;
}

.toggle-input-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.toggle-input-btn:active {
  transform: translateY(0);
}

.toggle-input-btn.active {
  background: var(--secondary);
}

/* Responsive pour les groupes géographiques */
@media (max-width: 768px) {
  .geo-input-group {
    min-width: 100%;
  }
  
  .row {
    flex-direction: column;
    gap: 16px;
  }
}

/* ===== BARRE DE NAVIGATION CIRCULAIRE ===== */
.circular-navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 25px;
  margin: 5px auto;
  max-width: 95%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-circle-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  width: 70px;
  margin: 2px;
  padding: 5px;
  border-radius: 15px;
}

.nav-circle {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
  margin-bottom: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.nav-label {
  font-size: 11px;
  text-align: center;
  color: var(--text-muted);
  transition: all 0.2s ease;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.nav-circle-container:hover {
  background: rgba(var(--primary-rgb), 0.1);
}

.nav-circle-container:hover .nav-circle {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.nav-circle-container:hover .nav-label {
  color: var(--primary);
  font-weight: 600;
}

.nav-circle-container.active {
  background: rgba(var(--primary-rgb), 0.1);
}

.nav-circle-container.active .nav-circle {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  transform: scale(1);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.nav-circle-container.active .nav-label {
  color: var(--primary);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1200px) {
  .circular-navbar {
    gap: 5px;
    padding: 8px 10px;
    max-width: 100%;
  }
  
  .nav-circle-container {
    width: 60px;
    padding: 4px;
  }
  
  .nav-circle {
    width: 45px;
    height: 45px;
    font-size: 18px;
    border-radius: 14px;
  }
  
  .nav-label {
    font-size: 10px;
  }
}

@media (max-width: 768px) {
  .circular-navbar {
    overflow-x: auto;
    justify-content: flex-start;
    padding: 8px 10px;
    border-radius: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 5px 10px;
    max-width: calc(100% - 20px);
  }
  
  .circular-navbar::-webkit-scrollbar {
    display: none;
  }
  
  .nav-circle-container {
    min-width: 55px;
    flex-shrink: 0;
  }
  
  .nav-circle {
    width: 40px;
    height: 40px;
    font-size: 16px;
    border-radius: 12px;
  }
  
  .nav-label {
    font-size: 9px;
  }
}

/* ===== STYLES D'AUTHENTIFICATION ===== */

.auth-container {
  max-width: 500px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--page-primary);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-primary);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header .logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 1rem;
  border: 3px solid var(--border-primary);
}

.auth-header h1 {
  color: var(--text-strong);
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

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

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

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

.auth-form input,
.auth-form select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-primary);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--page-primary);
  color: var(--text-strong);
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.auth-form input:focus,
.auth-form select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.auth-form input:invalid {
  border-color: #dc3545;
}

.auth-form .btn-primary {
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-form .btn-primary:hover {
  background: linear-gradient(135deg, #0056b3, #004085);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.auth-form .btn-primary:disabled {
  background: var(--text-disabled);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-links {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-primary);
}

.auth-links a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.auth-links a:hover {
  color: #0056b3;
  text-decoration: underline;
}

.validation-container {
  text-align: center;
  padding: 2rem;
  background: var(--page-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-primary);
}

.validation-container h2 {
  color: var(--text-strong);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.validation-container p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.validation-form {
  max-width: 300px;
  margin: 0 auto;
}

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

.validation-form input {
  text-align: center;
  font-size: 1.2rem;
  letter-spacing: 0.5rem;
  font-weight: 600;
}

.validation-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.validation-actions .btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.validation-actions .btn-primary {
  background: #28a745;
  color: white;
}

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

.validation-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.success-container {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  border-radius: 12px;
  border: 1px solid #c3e6cb;
}

.success-container h2 {
  color: #155724;
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.success-container p {
  color: #155724;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.success-container .btn-primary {
  background: #28a745;
  color: white;
  padding: 0.875rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.success-container .btn-primary:hover {
  background: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Responsive pour l'authentification */
@media (max-width: 768px) {
  .auth-container {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .auth-header .logo {
    width: 60px;
    height: 60px;
  }
  
  .auth-header h1 {
    font-size: 1.5rem;
  }
  
  .validation-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .validation-actions .btn {
    width: 100%;
    max-width: 200px;
  }
}

/* Footer Styles */
.footer {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  color: white;
  padding: 20px 0;
  margin-top: 40px;
  border-radius: 20px 20px 0 0;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1);
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px;
}

.footer-info h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: white;
}

.footer-info p {
  margin: 0;
  font-size: 12px;
  opacity: 0.9;
  color: white;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-social {
  display: flex;
  gap: 8px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

.footer-social a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.footer-bottom {
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  margin-top: 10px;
}

.footer-bottom a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-bottom a:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* Responsive Footer */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .footer-left,
  .footer-right {
    justify-content: center;
  }
}

/* Améliorations Responsive Globales */
@media (max-width: 768px) {
  .navbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
  }
  
  .navbar-brand {
    flex: 1;
  }
  
  .navbar-title h1 {
    font-size: 1.2rem;
  }
  
  .navbar-subtitle {
    font-size: 0.8rem;
  }
  
  .navbar-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    flex-direction: column;
    padding: 1rem;
  }
  
  .navbar-menu.mobile-open {
    display: flex;
  }
  
  .navbar-link {
    margin: 0.5rem 0;
    padding: 0.75rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    color: #333 !important;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
  }
  
  .navbar-link:hover {
    background-color: #f8f9fa;
    color: #0d6efd !important;
    transform: translateX(4px);
  }
  
  .navbar-link-active {
    background-color: #e3f2fd;
    color: #1976d2 !important;
    font-weight: 600;
  }
  
  .navbar-link .navbar-icon {
    margin-right: 0.75rem;
    font-size: 1.2rem;
    color: inherit;
  }
  
  .navbar-link:hover .navbar-icon {
    transform: scale(1.1);
  }
  
  .navbar-user {
    flex-direction: column;
    align-items: stretch;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
  }
  
  .navbar-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: #333;
  }
  
  /* Améliorations pour les formulaires mobiles */
  .form-control {
    font-size: 16px; /* Évite le zoom sur iOS */
  }
  
  .btn {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
  
  /* Améliorations pour les cartes */
  .card {
    margin: 0.5rem;
    border-radius: 12px;
  }
  
  .card-header {
    padding: 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  /* Améliorations pour les tableaux */
  .table-responsive {
    font-size: 0.9rem;
  }
  
  /* Améliorations pour les modales */
  .modal-dialog {
    margin: 1rem;
    max-width: calc(100% - 2rem);
  }
  
  /* Améliorations pour les notifications */
  .notification {
    margin: 0.5rem;
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .navbar-title h1 {
    font-size: 1rem;
  }
  
  .navbar-subtitle {
    display: none;
  }
  
  .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .card {
    margin: 0.25rem;
  }
  
  .form-control {
    padding: 0.75rem;
  }
}
/* Style des badges de statut */
.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.85em;
  font-weight: 500;
  color: white;
  text-align: center;
  min-width: 80px;
}

.status-present {
  background-color: #10b981; /* Vert */
}

.status-absent {
  background-color: #ef4444; /* Rouge */
}

.status-unknown {
  background-color: #6b7280; /* Gris */
}

/* Amélioration du tableau */
.table-responsive {
  overflow-x: auto;
  margin: 1rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

th {
  background-color: #f9fafb;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

tr:hover {
  background-color: #f3f4f6;
}