/* ========================================
   GLOBAL.CSS - Fichier CSS Principal
   ======================================== */

/* ============ FONTS ============ */
/* Option 1: Police locale (si vous avez le fichier) */

/* Option 2: Google Fonts (recommandé) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ============ VARIABLES CSS ============ */
/* ============ VARIABLES CSS CORRIGÉES ============ */
:root {
  /* Couleurs principales */
  --primary-color: #667eea;
  --primary-dark: #5a6fd8;
  --primary-light: #8fa4f3;
  --secondary-color: #764ba2;
  --accent-color: #f093fb;
  
  /* AJOUT: Dégradé principal manquant */
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  
  /* Couleurs neutres */
  --text-dark: #1a202c;
  --text-medium: #4a5568;
  --text-light: #718096;
  --text-blanc: #ffffff;
  --text-muted: #a0aec0;
  
  /* Backgrounds */
  --bg-primary1: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #e2e8f0;
  --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  --bg-pattern: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23667eea' fill-opacity='0.15'%3E%3Ccircle cx='20' cy='20' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  
  /* Ombres */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.25);
  /* AJOUT: Ombres supplémentaires pour les tableaux */
  --shadow-light: 0 4px 8px rgba(0,0,0,0.1);
  --shadow-medium: 0 8px 25px rgba(0,0,0,0.15);
  --shadow-heavy: 0 10px 20px rgba(0,0,0,0.4);
  
  /* Bordures et rayons */
  --border-radius-sm: 6px;
  --border-radius: 12px;
  --border-radius-lg: 16px;
  /* AJOUT: Rayon petit pour cohérence */
  --border-radius-small: 6px;
  --border-color: #e2e8f0;
  
  /* Transitions */
  --transition-fast: all 0.2s ease;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Espacements */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  
  /* Tailles de police */
  --font-xs: 12px;
  --font-sm: 14px;
  --font-md: 16px;
  --font-lg: 18px;
  --font-xl: 20px;
  --font-2xl: 24px;
  --font-3xl: 32px;
  
  /* AJOUT: Dégradés pour les tableaux et boutons */
  --success-gradient: linear-gradient(135deg, #4caf50, #45a049);
  --danger-gradient: linear-gradient(135deg, #f44336, #d32f2f);
  --warning-gradient: linear-gradient(135deg, #ff9800, #f57c00);
  --info-gradient: linear-gradient(135deg, #2196f3, #1976d2);
  
  /* AJOUT: Police pour cohérence */
  --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  
  /* Variables navbar harmonisées avec votre thème */
  --navbar-primary: var(--primary-color);        /* #667eea */
  --navbar-secondary: var(--secondary-color);    /* #764ba2 */
  --navbar-accent: var(--accent-color);          /* #f093fb */
  --navbar-dark: #1a202c;                        /* Cohérent avec --text-dark */
  --navbar-darker: #2d3748;                      /* Cohérent avec --text-medium */
  --navbar-light: #e2e8f0;                       /* Plus cohérent avec votre palette */
  --navbar-white: var(--text-blanc);             /* #ffffff */
  --navbar-danger: #f56565;                      /* Plus cohérent avec votre style */


    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --success-gradient: linear-gradient(135deg, #4caf50, #45a049);
  --danger-gradient: linear-gradient(135deg, #f44336, #d32f2f);
  --warning-gradient: linear-gradient(135deg, #ff9800, #f57c00);
  --info-gradient: linear-gradient(135deg, #2196f3, #1976d2);
  --shadow-light: 0 4px 8px rgba(0,0,0,0.1);
  --shadow-medium: 0 8px 25px rgba(0,0,0,0.15);
  --shadow-heavy: 0 10px 20px rgba(0,0,0,0.4);
  --border-radius: 12px;
  --border-radius-small: 6px;
  --transition: all 0.3s ease;
  --font-family: Poppins-Regular, sans-serif;
}

.text-blanc,
.text-blanc * {
  color: var(--text-blanc);
}
.text-sombre,
.text-sombre * {
  color: var(--text-dark) !important;
}
/* ============ RESET & BASE ============ */
* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  margin: 0;
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  height: 100%;
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg-gradient);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  
  /* Background moderne avec motif subtil */
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(240, 147, 251, 0.03) 0%, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* ============ LAYOUT COMPONENTS ============ */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-lg) 0;
}

.container-fluid {
  width: 100%;
  padding: var(--spacing-md);
}

.wrapper {
  min-height: calc(100vh - 98px);
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
}

/* ===== NAVBAR HARMONISÉE AVEC VOS COULEURS - REMPLACER LA SECTION NAVBAR DANS global.css ===== */


/* ===== SUPPRESSION COMPLÈTE DES BORDURES BOUTONS D'ACTION ===== */
/* Navbar principale - styles de base */
nav.navbar.navbar-custom,
.navbar.navbar-expand-lg.navbar-custom {
    background: linear-gradient(135deg, var(--navbar-dark) 0%, var(--navbar-darker) 100%) !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: var(--shadow-sm) !important;
    padding: 0.25rem 0 !important;
    border-bottom: 1px solid var(--primary-color) !important;
    min-height: 50px !important;
}

/* Brand logo */
nav.navbar-custom .navbar-brand,
.navbar.navbar-custom a.navbar-brand {
    font-weight: bold !important;
    font-size: 1.1rem !important;
    color: var(--navbar-white) !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.3rem !important;
    transition: var(--transition) !important;
    padding: 0.2rem 0 !important;
}

nav.navbar-custom .navbar-brand:hover,
.navbar.navbar-custom a.navbar-brand:hover {
    color: var(--primary-color) !important;
    transform: scale(1.02) !important;
    text-decoration: none !important;
}

nav.navbar-custom .navbar-brand img,
.navbar.navbar-custom .navbar-brand img {
    width: 24px !important;
    height: 24px !important;
    transition: var(--transition) !important;
    filter: brightness(1.1) !important;
}

/* Liens de navigation */
nav.navbar-custom .navbar-nav .nav-link,
.navbar.navbar-custom ul.navbar-nav li.nav-item a.nav-link {
    color: var(--navbar-light) !important;
    font-weight: 500 !important;
    padding: 0.4rem 0.6rem !important;
    margin: 0 0.05rem !important;
    border-radius: 0 !important;
    transition: var(--transition) !important;
    position: relative !important;
    text-transform: uppercase !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.2px !important;
}

/* Barre de soulignement */
nav.navbar-custom .navbar-nav .nav-link::before,
.navbar.navbar-custom .nav-link::before {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 50% !important;
    width: 0 !important;
    height: 1px !important;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color)) !important;
    transition: var(--transition) !important;
    transform: translateX(-50%) !important;
}

nav.navbar-custom .navbar-nav .nav-link:hover,
nav.navbar-custom .navbar-nav .nav-link.active,
.navbar.navbar-custom .nav-link:hover,
.navbar.navbar-custom .nav-link.active {
    color: var(--navbar-white) !important;
    background: rgba(102, 126, 234, 0.05) !important;
}

nav.navbar-custom .navbar-nav .nav-link:hover::before,
nav.navbar-custom .navbar-nav .nav-link.active::before {
    width: 60% !important;
}

/* Navbar toggler pour mobile */
nav.navbar-custom .navbar-toggler,
.navbar.navbar-custom button.navbar-toggler {
    border: none !important;
    border-radius: 4px !important;
    padding: 0 !important;
    width: 40px !important;
    height: 36px !important;
    background: rgba(102, 126, 234, 0.08) !important;
    margin-left: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}

nav.navbar-custom .navbar-toggler-icon,
.navbar.navbar-custom .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    width: 20px !important;
    height: 15px !important;
    background-size: 20px 15px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    margin: 0 !important;
    display: block !important;
}

nav.navbar-custom .navbar-toggler:hover,
.navbar.navbar-custom .navbar-toggler:hover {
    background: rgba(102, 126, 234, 0.12) !important;
}

nav.navbar-custom .navbar-toggler:focus,
.navbar.navbar-custom .navbar-toggler:focus {
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.4) !important;
    outline: none !important;
    background: rgba(102, 126, 234, 0.12) !important;
}

/* Container navbar */
nav.navbar-custom .container-fluid,
.navbar.navbar-custom .container-fluid {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 1rem !important;
}

/* Responsive mobile */
@media (max-width: 991px) {
    nav.navbar.navbar-custom {
        padding: 0.3rem 0 !important;
        min-height: 50px !important;
    }
    
    nav.navbar-custom .container-fluid,
    .navbar.navbar-custom .container-fluid {
        padding: 0 0.75rem !important;
    }
    
    nav.navbar-custom .navbar-brand {
        order: 1 !important;
        margin-right: auto !important;
    }
    
    nav.navbar-custom .navbar-toggler {
        order: 2 !important;
        margin-left: 0.5rem !important;
        margin-right: 0 !important;
    }
    
    nav.navbar-custom .navbar-collapse {
        order: 3 !important;
        width: 100% !important;
    }
    
    nav.navbar-custom .navbar-nav,
    .navbar.navbar-custom .navbar-nav {
        text-align: center !important;
        padding-top: 0.5rem !important;
        width: 100% !important;
    }
}


/* Boutons d'action - AUCUNE bordure */
nav.navbar-custom .action-buttons .btn-action,
.navbar.navbar-custom .action-buttons button.btn-action {
    background: transparent !important; /* Fond transparent */
    border: none !important; /* AUCUNE BORDURE */
    color: var(--navbar-light) !important;
    padding: 0.4rem !important;
    border-radius: 4px !important;
    transition: var(--transition-fast) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    position: relative !important;
    overflow: hidden !important;
    opacity: 0.8 !important; /* Légèrement transparent par défaut */
    outline: none !important; /* Supprime bordure de focus par défaut */
    box-shadow: none !important; /* Aucune ombre par défaut */
}

/* Effet hover - sans bordure */
nav.navbar-custom .action-buttons .btn-action:hover,
.navbar.navbar-custom .action-buttons button.btn-action:hover {
    background: rgba(102, 126, 234, 0.1) !important; /* Fond léger au hover */
    border: none !important; /* TOUJOURS pas de bordure */
    color: var(--navbar-white) !important;
    transform: scale(1.1) !important;
    opacity: 1 !important;
    box-shadow: none !important; /* Pas d'ombre même au hover */
    outline: none !important;
}

/* Effet actif - sans bordure */
nav.navbar-custom .action-buttons .btn-action:active,
.navbar.navbar-custom .action-buttons button.btn-action:active {
    background: rgba(102, 126, 234, 0.15) !important;
    border: none !important;
    transform: scale(1.05) !important;
    transition: transform 0.05s ease !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Bouton de déconnexion - sans bordure aussi */
nav.navbar-custom .action-buttons .btn-logout:hover,
.navbar.navbar-custom .action-buttons button.btn-logout:hover {
    background: rgba(245, 101, 101, 0.1) !important;
    border: none !important; /* Pas de bordure même en rouge */
    color: var(--navbar-danger) !important;
    box-shadow: none !important;
    outline: none !important;
}

/* États de focus - pour l'accessibilité mais sans bordure visible */
nav.navbar-custom .action-buttons .btn-action:focus,
.navbar.navbar-custom .action-buttons button.btn-action:focus {
    background: rgba(102, 126, 234, 0.08) !important;
    border: none !important; /* Toujours pas de bordure */
    outline: none !important; /* Supprime outline par défaut */
    box-shadow: none !important; /* Pas de box-shadow de focus */
    /* Focus invisible mais fonctionnel pour l'accessibilité */
}

/* Container des boutons - aucun style qui pourrait créer des bordures */
nav.navbar-custom .action-buttons,
.navbar.navbar-custom .action-buttons {
    display: flex !important;
    gap: 0.3rem !important;
    align-items: center !important;
    margin-left: 1rem !important;
    padding: 0 !important;
    background: none !important; /* Aucun fond */
    border: none !important; /* Aucune bordure sur le container */
    border-radius: 0 !important;
    box-shadow: none !important; /* Aucune ombre */
    outline: none !important;
}

/* Icônes Material - styles optimisés */
nav.navbar-custom .btn-action .material-icons,
.navbar.navbar-custom .btn-action .material-icons {
    font-size: 20px !important;
    line-height: 1 !important;
    transition: inherit !important; /* Hérite de la transition du bouton parent */
}

/* ===== RESPONSIVE MOBILE - SANS BORDURES ===== */
@media (max-width: 991px) {
    /* Boutons d'action mobile - toujours sans bordure */
    nav.navbar-custom .action-buttons,
    .navbar.navbar-custom .action-buttons {
        margin-top: 0.5rem !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        margin-left: 0 !important;
        gap: 0.4rem !important;
        width: 100% !important;
        border: none !important; /* Pas de bordure même sur mobile */
        background: none !important;
    }
    
    nav.navbar-custom .action-buttons .btn-action,
    .navbar.navbar-custom .action-buttons button.btn-action {
        width: 36px !important;
        height: 36px !important;
        padding: 0.3rem !important;
        border: none !important; /* Confirmé : pas de bordure sur mobile */
        background: transparent !important;
        box-shadow: none !important;
    }
    
    /* Hover sur mobile - sans bordure */
    nav.navbar-custom .action-buttons .btn-action:hover {
        border: none !important;
        box-shadow: none !important;
    }
}

/* ===== SUPPRESSION FORCÉE DE TOUTES LES BORDURES POSSIBLES ===== */

/* Au cas où Bootstrap ou d'autres CSS ajoutent des bordures */
.navbar .action-buttons button,
.navbar .action-buttons .btn-action,
.action-buttons button,
.action-buttons .btn-action,
button.btn-action {
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Suppression des bordures au focus pour tous les navigateurs */
.action-buttons button:focus,
.action-buttons .btn-action:focus,
.btn-action:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Suppression des bordures actives pour tous les navigateurs */
.action-buttons button:active,
.action-buttons .btn-action:active,
.btn-action:active {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* ===== VERSION ALTERNATIVE ULTRA-MINIMALE ===== */

/* Si vous voulez un effet encore plus discret */
.btn-action-ghost {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.6) !important;
    padding: 0.4rem !important;
    transition: all 0.2s ease !important;
}

.btn-action-ghost:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    transform: scale(1.05) !important;
}




/* ============ MATERIAL ICONS SUPPORT ============ */
.material-icons {
  font-family: 'Material Icons' !important;
  font-weight: normal !important;
  font-style: normal !important;
  font-size: 24px !important;
  line-height: 1 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  display: inline-block !important;
  white-space: nowrap !important;
  word-wrap: normal !important;
  direction: ltr !important;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle !important;
}

/* Boutons avec Material Icons */
.btn.material-icons {
  font-family: 'Material Icons' !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 50px;
  font-weight: normal !important;
  font-style: normal !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

/* Correction pour les boutons Bootstrap avec icônes */
button.material-icons,
.btn.material-icons {
  font-family: 'Material Icons' !important;
  font-size: 24px !important;
  line-height: 1 !important;
}

/* Boutons carrés avec icônes */
.btn-icon-square {
  width: 50px !important;
  height: 50px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: var(--border-radius) !important;
}

/* Boutons ronds avec icônes */
.btn-icon-round {
  width: 50px !important;
  height: 50px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
}

/* Tailles d'icônes */
.material-icons.md-18 { font-size: 18px !important; }
.material-icons.md-24 { font-size: 24px !important; }
.material-icons.md-36 { font-size: 36px !important; }
.material-icons.md-48 { font-size: 48px !important; }

/* Fix pour Bootstrap qui peut écraser les styles */
.btn[class*="material-icons"] {
  font-family: 'Material Icons' !important;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md) var(--spacing-lg);
  border: none;
  border-radius: var(--border-radius);
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: var(--font-sm);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  min-height: 50px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-primary1);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

/* Effet de brillance pour les boutons SAUF les boutons de présence */
.btn:not(.btn-primary):not(.btn-danger):not(.btn-warning)::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:not(.btn-primary):not(.btn-danger):not(.btn-warning):hover {
  transform: translateY(-2px);
}

.btn:not(.btn-primary):not(.btn-danger):not(.btn-warning):hover::before {
  left: 100%;
}

/* Styles spécifiques pour boutons de présence - NE PAS TOUCHER */
.btn.btn-primary.text-white,
.btn.btn-danger.text-white,
.btn.btn-warning.text-dark {
  /* Laisser le contrôle total à aastyle.css */
  all: unset;
  /* Réappliquer les bases Bootstrap nécessaires */
  display: inline-block;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  background-color: transparent;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: .25rem;
}

.btn:not(.btn-primary):not(.btn-danger):not(.btn-warning):active {
  transform: translateY(1px);
}

/* ============ CARDS ============ */
.card {
  background: var(--bg-primary1);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card-body {
  padding: var(--spacing-lg);
}

.card-header {
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  color: var(--text-dark);
}

.card-footer {
  padding: var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  opacity: 0;
  transition: var(--transition);
}

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

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

/* ============ FORMS ============ */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  font-family: 'Poppins', sans-serif;
  color: var(--text-dark);
  font-weight: 500;
  font-size: var(--font-sm);
  margin-bottom: var(--spacing-xs);
}

.form-input {
  width: 100%;
  padding: var(--spacing-md);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-family: 'Poppins', sans-serif;
  font-size: var(--font-sm);
  transition: var(--transition);
  background: var(--bg-primary1);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ============ BACKGROUND UTILITIES ============ */
.bg-pattern {
  background-image: var(--bg-pattern) !important;
  background-size: 40px 40px !important;
  background-repeat: repeat !important;
  position: relative;
}

/* Spécifique pour le body avec Bootstrap */
body.bg-pattern {
  background-image: var(--bg-pattern), 
    radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(240, 147, 251, 0.03) 0%, transparent 50%) !important;
  background-size: 40px 40px, 100% 100%, 100% 100%, 100% 100% !important;
  background-attachment: fixed !important;
}

.bg-dots {
  background-image: radial-gradient(circle, rgba(102, 126, 234, 0.1) 1px, transparent 1px);
  background-size: 25px 25px;
  background-repeat: repeat;
  position: relative;
  z-index: 1;
}

.bg-dots::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  z-index: -1;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.bg-gradient-light {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
}

.bg-overlay {
  position: relative;
}

.bg-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
  pointer-events: none;
  z-index: -1;
}

/* Background alternatifs plus visibles */
.bg-geometric {
  background-image: 
    linear-gradient(45deg, rgba(102, 126, 234, 0.05) 25%, transparent 25%), 
    linear-gradient(-45deg, rgba(102, 126, 234, 0.05) 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, rgba(118, 75, 162, 0.05) 75%), 
    linear-gradient(-45deg, transparent 75%, rgba(118, 75, 162, 0.05) 75%);
  background-size: 30px 30px;
  background-position: 0 0, 0 15px, 15px -15px, -15px 0px;
}

.bg-waves {
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='20' viewBox='0 0 100 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21.184 20c.357-.13.72-.264 1.088-.402l1.768-.661C33.64 15.347 39.647 14 50 14c10.271 0 15.362 1.222 24.629 4.928.955.383 1.869.74 2.75 1.072h6.225c-2.51-.73-5.139-1.691-8.233-2.928C65.888 13.278 60.562 12 50 12c-10.626 0-16.855 1.397-26.66 5.063l-1.767.662c-2.475.923-4.66 1.674-6.724 2.275h6.335zm0-20C13.258 2.892 8.077 4 0 4V2c5.744 0 9.951-.574 14.85-2h6.334zM77.38 0C85.239 2.966 90.502 4 100 4V2c-6.842 0-11.386-.542-16.396-2h-6.225zM0 14c8.44 0 13.718-1.21 22.272-4.402l1.768-.661C33.64 5.347 39.647 4 50 4c10.271 0 15.362 1.222 24.629 4.928C84.112 12.722 89.438 14 100 14v-2c-10.271 0-15.362-1.222-24.629-4.928C65.888 3.278 60.562 2 50 2 39.374 2 33.145 3.397 23.34 7.063l-1.767.662C13.223 10.84 8.163 12 0 12v2z' fill='%23667eea' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: 0 bottom;
}

/* ================================================
   STYLES UNIFIÉS POUR TOUS LES TABLEAUX DU SITE
   ================================================ */

/* =====================================
   POLICES ET VARIABLES GLOBALES
   ===================================== */
@font-face {
  font-family: Poppins-Regular;
  src: url('../fonts/poppins/Poppins-Regular.ttf');
}

@font-face {
  font-family: Poppins-Thin;
  src: url('../fonts/poppins/Poppins-Light.ttf');
}



/* =====================================
   STYLES DE BASE POUR TOUS LES TABLEAUX
   ===================================== */

/* Container wrapper pour tableaux avec scroll horizontal */
.table-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  margin: 10px 0;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  width: 100%;
  max-width: 100%;
  position: relative;
  box-sizing: border-box;
  background: white;
}

/* Scrollbar personnalisée */
.table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #764ba2;
}

/* Style de base pour tous les tableaux */
table {
  box-shadow: var(--shadow-medium);
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  vertical-align: center;
  text-align: center;
  font-family: var(--font-family);
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  margin: 10px 0;
}

/* Cellules de base */
table tr th,
table tr td {
  border-right: 1px solid #e0e6ed;
  border-bottom: 1px solid #e0e6ed;
  padding: 12px 8px;
  transition: var(--transition);
}

table tr th:first-child,
table tr td:first-child {
  border-left: none;
}

/* En-têtes de tableaux */
table tr th {
  border-top: none;
  text-align: center;
  background: var(--primary-gradient);
  color: white;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 16px 12px;
}

/* Coins arrondis pour les en-têtes */
table tr:first-child th:first-child {
  border-top-left-radius: var(--border-radius);
}

table tr:first-child th:last-child {
  border-top-right-radius: var(--border-radius);
}

table tr:last-child td:first-child {
  border-bottom-left-radius: var(--border-radius);
}

table tr:last-child td:last-child {
  border-bottom-right-radius: var(--border-radius);
}

/* Alternance des couleurs de lignes */
tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

tbody tr:nth-child(odd) {
  background-color: white;
}

/* Effet hover moderne pour les lignes */
tbody tr:hover {
  background-color: #e3f2fd !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-light);
}

/* En-têtes sticky */
thead th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  font-family: var(--font-family);
  z-index: 10;
}

/* Première colonne sticky */
.headcol {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  background-color: white;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  z-index: 5;
}

thead th:first-child {
  left: 0;
  z-index: 11;
  background: var(--primary-gradient);
}

tbody tr:nth-child(even) .headcol {
  background-color: #f8fafc;
}

tbody tr:hover .headcol {
  background-color: #e3f2fd !important;
}

/* =====================================
   STYLES POUR BOUTONS DANS LES TABLEAUX
   ===================================== */

/* Boutons de présence génériques */
.presence-btn,
.btn-table {
  width: 60px;
  min-width: 60px;
  max-width: 60px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border-radius: var(--border-radius-small);
  padding: 0;
  border: none;
  font-size: 0 !important;
  line-height: 0;
  text-indent: -9999px;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}

/* Bouton Présent (Vert) */
.btn-present,
.btn.btn-primary.text-white,
 {
  background: var(--success-gradient) !important;
  border-color: #4caf50 !important;
  color: transparent !important;
  box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.btn-present::before,
.btn.btn-primary.text-white::before{
  content: "✓";
  font-size: 20px;
  font-weight: bold;
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-indent: 0;
}

/* Bouton Absent (Rouge) */
.btn-absent,
.btn.btn-danger.text-white {
  background: var(--danger-gradient) !important;
  border-color: #f44336 !important;
  color: transparent !important;
  box-shadow: 0 2px 4px rgba(244, 67, 54, 0.3);
}

.btn-absent::before,
.btn.btn-danger.text-white::before{
  content: "✗";
  font-size: 20px;
  font-weight: bold;
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-indent: 0;
}

/* Bouton Absence Justifiée (Orange) */
.btn-justified,
.btn.btn-warning.text-dark {
  background: var(--warning-gradient) !important;
  border-color: #ff9800 !important;
  color: transparent !important;
  box-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
}

.btn-justified::before,
.btn.btn-warning.text-dark::before {
  content: "✗";
  font-size: 18px;
  font-weight: bold;
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-indent: 0;
}

/* Petit check vert pour absence justifiée */
.btn-justified::after,
.btn.btn-warning.text-dark::after {
  content: "✓";
  font-size: 10px;
  font-weight: bold;
  color: #4caf50;
  position: absolute;
  bottom: 2px;
  right: 4px;
  text-indent: 0;
  background: white;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Effet hover pour tous les boutons de présence */
.btn-present:hover,
.btn-absent:hover,
.btn-justified:hover,
.btn.btn-primary.text-white:hover,
.btn.btn-danger.text-white:hover,
.btn.btn-warning.text-dark:hover {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

/* =====================================
   BOUTONS FICHE PERSONNALISÉS
   ===================================== */

/* Boutons fiche avec icône personne */
.btn-fiche,
.table-wrapper table td:last-child button {
  position: relative;
  width: 40px;
  height: 50px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  color: transparent !important;
  text-indent: -9999px;
}

/* Icône principale (personne) */
.btn-fiche::before,
.table-wrapper table td:last-child button::before {
  content: "👤";
  font-size: 20px;
  color: white !important;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-indent: 0;
}


/* Icône principale (personne) */
.btn-edit::before,
.table-wrapper table td:last-child button::before {
  content: "📝";
  font-size: 20px;
  color: white !important;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-indent: 0;
}

/* Petit indicateur en bas à droite */
.btn-fiche::after,
.table-wrapper table td:last-child button::after {
  font-size: 8px;
  font-weight: bold;
  color: white;
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  text-indent: 0;
  line-height: 1;
}

/* Fiche complète (vert) */
.btn-fiche.comp,
.table-wrapper table td:last-child button.comp {
  background: var(--success-gradient);
  box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.btn-fiche.comp::after,
.table-wrapper table td:last-child button.comp::after {
  content: "✓";
}

/* Fiche incomplète (rouge) */
.btn-fiche.pascomp,
.table-wrapper table td:last-child button.pascomp {
  background: var(--danger-gradient);
  box-shadow: 0 2px 4px rgba(244, 67, 54, 0.3);
}

.btn-fiche.pascomp::after,
.table-wrapper table td:last-child button.pascomp::after {
  content: "✗";
}

.btn-fiche:hover {
  transform: scale(1.05);
  transition: transform 0.2s ease;
}

/* =====================================
   BOUTONS D'ACTION
   ===================================== */

/* Boutons d'action génériques */
.btn-action {
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  font-family: var(--font-family);
  padding: 12px 20px;
  margin: 5px;
  transition: var(--transition);
  cursor: pointer;
  font-size: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


/* =====================================
   ÉLÉMENTS SPÉCIAUX
   ===================================== */

/* Checkbox moderne */
.checkbox-modern,
#CheckComp,
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #667eea;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  margin-right: 8px;
}

.checkbox-modern:checked,
#CheckComp:checked,
input[type="checkbox"]:checked {
  background: var(--primary-gradient);
  border-color: #667eea;
}

.checkbox-modern:checked::before,
#CheckComp:checked::before,
input[type="checkbox"]:checked::before {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 12px;
}

.checkbox-modern:hover,
#CheckComp:hover,
input[type="checkbox"]:hover {
  border-color: #764ba2;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}


/* Container des boutons d'action */
.action-buttons,
.sp {
  justify-content: space-around;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
  padding: 15px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

/* Lien highlighted */
.Highlighted a {
  background: var(--success-gradient) !important;
  background-image: none !important;
  color: white !important;
  font-weight: bold !important;
  font-size: 12pt;
  border-radius: 8px;
  padding: 10px 16px;
  text-decoration: none;
  box-shadow: 0 3px 6px rgba(76, 175, 80, 0.3);
  transition: var(--transition);
}

.Highlighted a:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4);
}

/* =====================================
   GESTION DU TEXTE LONG AVEC TOOLTIPS
   ===================================== */

/* Gestion spécifique du texte long pour NOM et PRÉNOM */
table tr td:nth-child(2),  /* Colonne NOM */
table tr td:nth-child(3) { /* Colonne PRÉNOM */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  position: relative;
}

/* Tooltip pour NOM et PRÉNOM uniquement */
table tr td:nth-child(2)[title]:hover::after,
table tr td:nth-child(3)[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 5px;
}

table tr td:nth-child(2)[title]:hover::before,
table tr td:nth-child(3)[title]:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
}

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

/* Tablettes */
@media screen and (max-width: 768px) {
  .table-wrapper {
    width: 100%;
    max-width: 100vw;
    border-radius: 8px;
    overflow-x: auto;
    overflow-y: visible;
    margin: 10px 0;
    box-sizing: border-box;
  }
  
  table {
    font-size: 12px;
    width: auto;
    min-width: 100%;
    display: table;
  }
  
  table tr th,
  table tr td {
    white-space: nowrap;
    min-width: 60px;
    padding: 10px 6px;
  }
  
  /* Première colonne sticky sur tablette */
  table tr th:first-child,
  table tr td:first-child {
    position: sticky;
    left: 0;
    z-index: 5;
    background: white;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    width: 80px;
    min-width: 80px;
    max-width: 80px;
  }
  
  table tr th:not(:first-child),
  table tr td:not(:first-child) {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
  }
  
  thead th:first-child {
    background: var(--primary-gradient);
    z-index: 11;
  }
  
  tbody tr:nth-child(even) td:first-child {
    background-color: #f8fafc;
  }
  
  tbody tr:hover td:first-child {
    background-color: #e3f2fd !important;
  }
  
  /* Boutons plus petits sur tablette */
  .presence-btn,
  .btn.btn-primary.text-white,
  .btn.btn-danger.text-white,
  .btn.btn-warning.text-dark {
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    padding: 6px 2px;
  }
  
  .btn-action {
    width: 45px;
    height: 45px;
    margin: 3px;
  }

}

/* Téléphones */
@media screen and (max-width: 480px) {
  body {
    overflow-x: hidden;
  }
  
  .table-wrapper {
    width: 100%;
    max-width: 100vw;
    border-radius: var(--border-radius-small);
    margin: 10px 0;
    overflow-x: auto;
    box-sizing: border-box;
  }
  
  table {
    font-size: 11px;
    width: auto;
    min-width: 100%;
    table-layout: fixed;
  }
  
  /* Première colonne encore plus petite sur mobile */
  table tr th:first-child,
  table tr td:first-child {
    width: 70px;
    min-width: 70px;
    max-width: 70px;
    font-size: 10px;
  }
  
  table tr th:not(:first-child),
  table tr td:not(:first-child) {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    padding: 8px 4px;
  }
  
  table tr th,
  table tr td {
    padding: 8px 4px;
    min-width: 60px;
  }
  
  thead th {
    padding: 12px 6px;
    font-size: 10px;
  }
  
  /* Boutons encore plus petits sur mobile */
  .presence-btn,
  .btn.btn-primary.text-white,
  .btn.btn-danger.text-white,
  .btn.btn-warning.text-dark {
    width: 45px;
    min-width: 45px;
    max-width: 45px;
    padding: 4px 2px;
  }
  
  .btn-action {
    width: 40px;
    height: 40px;
    margin: 2px;
  }
  
  
  .checkbox-modern,
  #CheckComp,
  input[type="checkbox"] {
    width: 18px;
    height: 18px;
  }
  
  .badge-count,
  #LabelNbPres {
    font-size: 11px;
    padding: 5px 10px;
  }
  
  .action-buttons,
  .sp {
    gap: 5px;
    padding: 10px;
  }
}

/* Très petits écrans */
@media screen and (max-width: 320px) {
  .table-wrapper {
    width: 100%;
    max-width: 100vw;
    margin: 5px 0;
  }
  
  table {
    font-size: 10px;
    width: auto;
    min-width: 100%;
  }
  
  table tr th:first-child,
  table tr td:first-child {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
  }
  
  table tr th:not(:first-child),
  table tr td:not(:first-child) {
    width: 70px;
    min-width: 70px;
    max-width: 70px;
    padding: 8px 2px;
  }
  
  .presence-btn,
  .btn.btn-primary.text-white,
  .btn.btn-danger.text-white,
  .btn.btn-warning.text-dark {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    padding: 3px 1px;
  }
  
  .btn-action {
    width: 35px;
    height: 35px;
    margin: 1px;
  }
}

/* =====================================
   CLASSES UTILITAIRES
   ===================================== */

/* Classes d'état pour les tableaux */
.table-loading {
  opacity: 0.6;
  pointer-events: none;
}

.table-empty {
  text-align: center;
  font-style: italic;
  color: #999;
  padding: 40px 20px;
}

.table-striped tbody tr:nth-child(odd) {
  background-color: white;
}

.table-striped tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.table-hover tbody tr:hover {
  background-color: #e3f2fd !important;
  transform: translateY(-1px);
}

/* Classes de taille pour les tableaux */
.table-sm {
  font-size: 12px;
}

.table-sm th,
.table-sm td {
  padding: 8px 6px;
}

.table-lg {
  font-size: 16px;
}

.table-lg th,
.table-lg td {
  padding: 16px 12px;
}

/* Classes de couleur pour les cellules */
.cell-success {
  background-color: #d4edda !important;
  color: #155724;
}

.cell-danger {
  background-color: #f8d7da !important;
  color: #721c24;
}

.cell-warning {
  background-color: #fff3cd !important;
  color: #856404;
}

.cell-info {
  background-color: #d1ecf1 !important;
  color: #0c5460;
}

.cell-primary {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1)) !important;
  color: #667eea;
}

/* Classes pour le texte dans les tableaux */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-center {
  text-align: center !important;
}

.text-left {
  text-align: left !important;
}

.text-right {
  text-align: right !important;
}

.font-weight-bold {
  font-weight: bold !important;
}

.font-weight-normal {
  font-weight: normal !important;
}

/* Classes pour les bordures */
.border-none {
  border: none !important;
}

.border-top {
  border-top: 1px solid #e0e6ed !important;
}

.border-bottom {
  border-bottom: 1px solid #e0e6ed !important;
}

.border-left {
  border-left: 1px solid #e0e6ed !important;
}

.border-right {
  border-right: 1px solid #e0e6ed !important;
}

/* =====================================
   STYLES SPÉCIALISÉS POUR DIFFÉRENTS TYPES DE TABLEAUX
   ===================================== */

/* Tableau de données avec pagination */
.data-table-wrapper {
  position: relative;
}

.data-table-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  font-family: var(--font-family);
}

.data-table-info {
  color: #666;
  font-size: 14px;
}

.data-table-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Boutons de pagination */
.pagination-btn {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-family);
  transition: var(--transition);
}

.pagination-btn:hover {
  background: #f8fafc;
  border-color: #667eea;
}

.pagination-btn.active {
  background: var(--primary-gradient);
  color: white;
  border-color: #667eea;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Tableau de dashboard/statistiques */
.stats-table {
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(248,250,252,0.9));
}

.stats-table th {
  background: var(--primary-gradient);
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stats-table .stat-number {
  font-size: 18px;
  font-weight: bold;
  color: #667eea;
}

.stats-table .stat-label {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Tableau de comparaison */
.comparison-table {
  border: 2px solid #e0e6ed;
}

.comparison-table th {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
}

.comparison-table .comparison-winner {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(69, 160, 73, 0.1));
  font-weight: bold;
  color: #4caf50;
}

.comparison-table .comparison-loser {
  background: linear-gradient(135deg, rgba(244, 67, 54, 0.1), rgba(211, 47, 47, 0.1));
  color: #f44336;
}

/* Tableau d'édition en ligne */
.editable-table input,
.editable-table select,
.editable-table textarea {
  width: 100%;
  border: none;
  background: transparent;
  padding: 4px 8px;
  font-family: var(--font-family);
  font-size: inherit;
  border-radius: 4px;
  transition: var(--transition);
}

.editable-table input:focus,
.editable-table select:focus,
.editable-table textarea:focus {
  outline: none;
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid #667eea;
}

.editable-table .edit-mode {
  background: rgba(255, 243, 205, 0.5) !important;
}

/* =====================================
   ANIMATIONS ET TRANSITIONS
   ===================================== */

/* Animation d'apparition des lignes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.table-animated tbody tr {
  animation: fadeInUp 0.3s ease forwards;
}

.table-animated tbody tr:nth-child(1) { animation-delay: 0.1s; }
.table-animated tbody tr:nth-child(2) { animation-delay: 0.2s; }
.table-animated tbody tr:nth-child(3) { animation-delay: 0.3s; }
.table-animated tbody tr:nth-child(4) { animation-delay: 0.4s; }
.table-animated tbody tr:nth-child(5) { animation-delay: 0.5s; }

/* Animation de chargement */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.table-loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Animation pour les boutons */
@keyframes buttonPress {
  0% { transform: scale(1); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.btn-animate:active {
  animation: buttonPress 0.1s ease;
}

/* =====================================
   MODES SOMBRES ET THÈMES ALTERNATIFS
   ===================================== */

/* Mode sombre */
.dark-theme table {
  background: #2d3748;
  color: #e2e8f0;
}

.dark-theme table tr th {
  background: linear-gradient(135deg, #4a5568, #2d3748);
  color: #e2e8f0;
  border-color: #4a5568;
}

.dark-theme table tr td {
  border-color: #4a5568;
}

.dark-theme tbody tr:nth-child(even) {
  background-color: #374151;
}

.dark-theme tbody tr:nth-child(odd) {
  background-color: #2d3748;
}

.dark-theme tbody tr:hover {
  background-color: #4a5568 !important;
}

.dark-theme .headcol {
  background-color: #2d3748;
}

.dark-theme tbody tr:nth-child(even) .headcol {
  background-color: #374151;
}

.dark-theme tbody tr:hover .headcol {
  background-color: #4a5568 !important;
}

/* Thème minimal */
.minimal-theme table {
  box-shadow: none;
  border: 1px solid #e0e6ed;
}

.minimal-theme table tr th {
  background: #f8fafc;
  color: #4a5568;
  font-weight: 600;
  border-bottom: 2px solid #e0e6ed;
}

.minimal-theme tbody tr:hover {
  background-color: #f8fafc !important;
  transform: none;
  box-shadow: none;
}

/* Thème coloré */
.colorful-theme table tr th {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57);
  background-size: 500% 500%;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* =====================================
   ACCESSIBILITÉ ET CONTRASTE ÉLEVÉ
   ===================================== */

/* Mode contraste élevé */
.high-contrast table {
  border: 3px solid #000;
}

.high-contrast table tr th {
  background: #000;
  color: #fff;
  border: 2px solid #fff;
}

.high-contrast table tr td {
  border: 1px solid #000;
  color: #000;
}

.high-contrast tbody tr:nth-child(even) {
  background-color: #f0f0f0;
}

.high-contrast tbody tr:nth-child(odd) {
  background-color: #fff;
}

.high-contrast tbody tr:hover {
  background-color: #ffff00 !important;
  color: #000 !important;
}

/* Focus visible pour l'accessibilité */
.table-wrapper:focus-within {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

table th:focus,
table td:focus,
.btn-table:focus {
  outline: 2px solid #667eea;
  outline-offset: 1px;
  z-index: 10;
  position: relative;
}

/* =====================================
   PRINT STYLES
   ===================================== */

@media print {
  .table-wrapper {
    box-shadow: none;
    border: 1px solid #000;
    page-break-inside: avoid;
  }
  
  table {
    box-shadow: none;
    border-collapse: collapse;
  }
  
  table tr th {
    background: #f0f0f0 !important;
    color: #000 !important;
    border: 1px solid #000;
  }
  
  table tr td {
    border: 1px solid #000;
    background: #fff !important;
  }
  
  /* Masquer les boutons d'action en impression */
  .btn-table,
  .btn-action,
  .action-buttons {
    display: none !important;
  }
  
  /* Afficher le texte des boutons pour l'impression */
  .btn-present::before { content: "Présent"; }
  .btn-absent::before { content: "Absent"; }
  .btn-justified::before { content: "Abs. Just."; }
}

/* =====================================
   SUPPORT RTL (Right-to-Left)
   ===================================== */

[dir="rtl"] .table-wrapper {
  direction: rtl;
}

[dir="rtl"] table tr th:first-child,
[dir="rtl"] table tr td:first-child {
  border-left: 1px solid #e0e6ed;
  border-right: none;
}

[dir="rtl"] table tr th:last-child,
[dir="rtl"] table tr td:last-child {
  border-right: 1px solid #e0e6ed;
  border-left: none;
}

[dir="rtl"] .headcol {
  left: auto;
  right: 0;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
}

[dir="rtl"] thead th:first-child {
  left: auto;
  right: 0;
}

/* =====================================
   FIXES ET COMPATIBILITY
   ===================================== */

/* Fix pour Safari */
@supports (-webkit-appearance: none) {
  .table-wrapper {
    -webkit-overflow-scrolling: touch;
  }
}

/* Fix pour Edge */
@supports (-ms-overflow-style: none) {
  .table-wrapper {
    -ms-overflow-style: -ms-autohiding-scrollbar;
  }
}

/* Fix pour Firefox */
@-moz-document url-prefix() {
  .table-wrapper {
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f1f1;
  }
}

/* Fallback pour anciens navigateurs */
.no-flexbox .action-buttons,
.no-flexbox .sp {
  display: block;
  text-align: center;
}

.no-flexbox .btn-action {
  display: inline-block;
  margin: 5px;
}

/* Fix pour très anciens navigateurs */
.no-cssgrid table {
  width: 100%;
  table-layout: fixed;
}

/* =====================================
   VARIABLES PERSONNALISABLES
   ===================================== */

/* Variables CSS personnalisables pour faciliter la customisation */
.custom-table {
  --table-bg: #ffffff;
  --table-header-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --table-header-color: #ffffff;
  --table-border-color: #e0e6ed;
  --table-hover-bg: #e3f2fd;
  --table-stripe-bg: #f8fafc;
  --table-shadow: 0 8px 25px rgba(0,0,0,0.15);
  --table-border-radius: 12px;
  --table-padding: 12px 8px;
  --table-font-size: 14px;
  --table-line-height: 1.5;
}

.custom-table table {
  background: var(--table-bg);
  box-shadow: var(--table-shadow);
  border-radius: var(--table-border-radius);
  font-size: var(--table-font-size);
  line-height: var(--table-line-height);
}

.custom-table table tr th {
  background: var(--table-header-bg);
  color: var(--table-header-color);
  padding: var(--table-padding);
}

.custom-table table tr td {
  border-color: var(--table-border-color);
  padding: var(--table-padding);
}

.custom-table tbody tr:nth-child(even) {
  background-color: var(--table-stripe-bg);
}

.custom-table tbody tr:hover {
  background-color: var(--table-hover-bg) !important;
}


/* ====================================
   CORRECTION POUR LE BOUTON D'ÉDITION
   ==================================== */

/* Bouton d'édition avec le même style que btn-fiche */
.btn-edit {
  position: relative !important;
  width: 40px !important;
  height: 50px !important;
  border: none !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0 !important; /* Cache le texte comme btn-fiche */
  background: linear-gradient(135deg, #2196f3, #1976d2) !important; /* Bleu pour différencier */
  box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3) !important;
  color: transparent !important;
  text-indent: -9999px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

/* Icône principale (crayon) - même style que btn-fiche */
.btn-edit::before {
  content: "✏️" !important;
  font-size: 20px !important;
  color: white !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 2 !important;
  text-indent: 0 !important;
  display: block !important;
}

/* Pas d'indicateur en bas à droite pour le bouton edit */
.btn-edit::after {
  display: none !important;
  content: none !important;
}

/* Règles responsive pour btn-edit - identiques à btn-fiche */
@media screen and (max-width: 768px) {
  .btn-edit {
    width: 40px !important;
    height: 40px !important;
  }
  
  .btn-edit::before {
    font-size: 18px !important;
  }
}


  .btn-edit::before {
    font-size: 16px !important;
  }
}

/* Hover effect identique à btn-fiche */
.btn-edit:hover {
  transform: scale(1.05) !important;
  transition: transform 0.2s ease !important;
}

/* Spécifique au contexte du tableau pour éviter les conflits */
.table-wrapper .btn-edit,
#TabRecap .btn-edit {
  background: linear-gradient(135deg, #2196f3, #1976d2) !important;
  color: transparent !important;
  font-size: 0 !important;
}

/* Alternative avec icône Material Icons si l'emoji ne fonctionne pas */
.btn-edit.material-icon::before {
  content: "edit" !important;
  font-family: 'Material Icons' !important;
  font-size: 20px !important;
  color: white !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 2 !important;
  text-indent: 0 !important;
}
/* =====================================
   DOCUMENTATION ET EXEMPLES D'USAGE
   ===================================== */

/*
EXEMPLES D'UTILISATION :

1. Tableau de base :
<div class="table-wrapper">
  <table>
    <thead>
      <tr><th>Colonne 1</th><th>Colonne 2</th></tr>
    </thead>
    <tbody>
      <tr><td>Données 1</td><td>Données 2</td></tr>
    </tbody>
  </table>
</div>

2. Tableau avec boutons de présence :
<td><button class="btn-present">Présent</button></td>
<td><button class="btn-absent">Absent</button></td>
<td><button class="btn-justified">Abs. Just.</button></td>

3. Tableau avec boutons de fiche :
<td><button class="btn-fiche comp">Fiche</button></td>
<td><button class="btn-fiche pascomp">Fiche</button></td>

4. Boutons d'action :
<div class="action-buttons">
  <button id="btsauv" class="btn-action">Sauvegarder</button>
  <button id="btmail" class="btn-action">Mail</button>
  <button id="btsupp" class="btn-action">Supprimer</button>
</div>

5. Tableau avec thème personnalisé :
<div class="table-wrapper custom-table">
  <table>...</table>
</div>

6. Tableau en mode sombre :
<div class="table-wrapper dark-theme">
  <table>...</table>
</div>

CLASSES UTILES :
- .table-sm : Tableau compact
- .table-lg : Tableau large
- .table-striped : Lignes alternées
- .table-hover : Effet hover
- .table-animated : Animation d'apparition
- .text-truncate : Texte tronqué avec ...
- .cell-success/.cell-danger/.cell-warning : Cellules colorées
*/


/* ============ UTILITIES ============ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--text-medium); }
.text-muted { color: var(--text-muted); }

.bg-white { background-color: var(--bg-primary1); }
.bg-light { background-color: var(--bg-secondary); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.rounded { border-radius: var(--border-radius); }
.rounded-sm { border-radius: var(--border-radius-sm); }
.rounded-lg { border-radius: var(--border-radius-lg); }

/* Marges et paddings */
.m-0 { margin: 0; }
.p-0 { padding: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.pt-1 { padding-top: var(--spacing-xs); }
.pt-2 { padding-top: var(--spacing-sm); }
.pt-3 { padding-top: var(--spacing-md); }
.pt-4 { padding-top: var(--spacing-lg); }

/* ============ GRID SYSTEM ============ */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 calc(var(--spacing-sm) * -1);
}

.col {
  flex: 1;
  padding: 0 var(--spacing-sm);
}

.col-auto { flex: 0 0 auto; }
.col-12 { flex: 0 0 100%; }
.col-6 { flex: 0 0 50%; }
.col-4 { flex: 0 0 33.333333%; }
.col-3 { flex: 0 0 25%; }


/* ============ ANIMATIONS ============ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

/* ============ RESPONSIVE DESIGN ============ */
@media (max-width: 1024px) {
  .container {
    width: 95%;
  }
}

@media (max-width: 768px) {
  :root {
    --font-md: 14px;
    --font-lg: 16px;
    --spacing-lg: 16px;
    --spacing-xl: 24px;
  }
  
  .container {
    width: 95%;
    padding: var(--spacing-md) 0;
  }
  
  .nav-container {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  .nav-links {
    flex-direction: column;
    width: 100%;
    text-align: center;
  }
  
  .col-6, .col-4, .col-3 {
    flex: 0 0 100%;
  }
  
  .btn {
    width: 100%;
    margin: var(--spacing-xs) 0;
  }
}

@media (max-width: 480px) {
  .card-body {
    padding: var(--spacing-md);
  }
}

/* ============ ACCESSIBILITY ============ */
.btn:focus,
.form-input:focus,
.nav-link:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
  :root {
    --text-dark: #1a202c;
    --text-medium: #2d3748;
    --text-light: #4a5568;
    --bg-primary1: #ffffff;
  
    --bg-secondary: #4a5568;
    --bg-tertiary: #718096;
    --border-color: #4a5568;
  }
}

/* ===== FOOTER STYLES - COHÉRENT AVEC NAVBAR ===== */

.site-footer {
    position: relative;
    bottom: 0;
    width: 100%;
    margin-top: auto;
    background: linear-gradient(135deg, var(--navbar-dark) 0%, var(--navbar-darker) 100%) !important;
    border-top: 1px solid var(--primary-color) !important;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1) !important;
    min-height: 50px !important;
}

.site-footer .container-fluid {
    max-width: 100%;
    padding: 0 1rem !important;
    display: flex !important;
    align-items: center !important;
}

.site-footer .row {
    width: 100% !important;
    margin: 0 !important;
    align-items: center !important;
}

/* Style pour le nom d'établissement */
.footer-etablissement {
    font-weight: bold !important;
    font-size: 1.1rem !important;
    color: var(--navbar-white) !important;
    transition: var(--transition) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.2px !important;
}

/* Style pour l'année scolaire */
.footer-annee {
    font-weight: 500 !important;
    font-size: 0.85rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.2px !important;
}

.footer-annee a {
    color: var(--navbar-light) !important;
    text-decoration: none !important;
    padding: 0.4rem 0.6rem !important;
    border-radius: 4px !important;
    transition: var(--transition) !important;
    position: relative !important;
    background: rgba(102, 126, 234, 0.05) !important;
    border: 1px solid rgba(102, 126, 234, 0.2) !important;
}

.footer-annee a::before {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 50% !important;
    width: 0 !important;
    height: 1px !important;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color)) !important;
    transition: var(--transition) !important;
    transform: translateX(-50%) !important;
}

.footer-annee a:hover {
    color: var(--navbar-white) !important;
    background: rgba(102, 126, 234, 0.15) !important;
    border-color: rgba(102, 126, 234, 0.4) !important;
    text-decoration: none !important;
    transform: scale(1.02) !important;
}

.footer-annee a:hover::before {
    width: 60% !important;
}

/* Style pour les CGU */
.footer-cgu {
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    color: var(--navbar-light) !important;
    text-decoration: none !important;
    padding: 0.4rem 0.6rem !important;
    border-radius: 4px !important;
    transition: var(--transition) !important;
    position: relative !important;
    text-transform: uppercase !important;
    letter-spacing: 0.2px !important;
}

.footer-cgu::before {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 50% !important;
    width: 0 !important;
    height: 1px !important;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color)) !important;
    transition: var(--transition) !important;
    transform: translateX(-50%) !important;
}

.footer-cgu:hover {
    color: var(--navbar-white) !important;
    background: rgba(102, 126, 234, 0.1) !important;
    text-decoration: none !important;
}

.footer-cgu:hover::before {
    width: 60% !important;
}

/* Responsive design */
@media (max-width: 767.98px) {
    .site-footer {
        text-align: center !important;
    }
    
    .footer-etablissement,
    .footer-annee,
    .footer-cgu {
        font-size: 0.85rem;
    }
    
    .site-footer .row > div {
        margin-bottom: 0.5rem;
    }
    
    .site-footer .row > div:last-child {
        margin-bottom: 0;
    }
}

/* Pour s'assurer que le footer reste en bas de page */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body > .container,
body > .container-fluid {
    flex: 1;
}

/* Style alternatif si vous voulez un footer "sticky" */
.footer-sticky {
    position: sticky;
    bottom: 0;
    z-index: 1020;
}

/* ===== CORRECTION NAVBAR - À AJOUTER DANS VOTRE global.css ===== */

/* FORCER LE MASQUAGE DU BOUTON HAMBURGER SUR DESKTOP */
@media (min-width: 992px) {
    /* Masquer complètement le bouton hamburger sur desktop */
    nav.navbar-custom .navbar-toggler,
    .navbar.navbar-custom button.navbar-toggler,
    .navbar-toggler {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* S'assurer que le contenu navbar est toujours visible sur desktop */
    nav.navbar-custom .navbar-collapse,
    .navbar.navbar-custom .navbar-collapse,
    .navbar-collapse {
        display: flex !important;
        visibility: visible !important;
    }
    
    /* Réorganiser le layout sur desktop */
    nav.navbar-custom .container-fluid,
    .navbar.navbar-custom .container-fluid {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }
    
    /* Navigation links à gauche du logo */
    nav.navbar-custom .navbar-nav,
    .navbar.navbar-custom .navbar-nav {
        display: flex !important;
        flex-direction: row !important;
        margin-left: 1rem !important;
        flex: 1 !important;
    }
    
    /* Boutons d'action restent à droite */
    nav.navbar-custom .action-buttons,
    .navbar.navbar-custom .action-buttons {
        margin-left: auto !important;
        order: 3 !important;
    }
}

/* MOBILE ET TABLETTE - Comportement normal */
@media (max-width: 991.98px) {
    /* Le bouton hamburger doit être visible sur mobile */
    nav.navbar-custom .navbar-toggler,
    .navbar.navbar-custom button.navbar-toggler {
        display: flex !important;
        visibility: visible !important;
    }
    
    /* Contenu collapsible par défaut sur mobile */
    nav.navbar-custom .navbar-collapse,
    .navbar.navbar-custom .navbar-collapse {
        display: none !important;
    }
    
    /* Contenu visible quand ouvert */
    nav.navbar-custom .navbar-collapse.show,
    .navbar.navbar-custom .navbar-collapse.show {
        display: block !important;
    }
    
    /* Réorganisation mobile */
    nav.navbar-custom .container-fluid {
        flex-wrap: wrap !important;
    }
    
    nav.navbar-custom .navbar-brand {
        order: 1 !important;
        flex: 1 !important;
    }
    
    nav.navbar-custom .navbar-toggler {
        order: 2 !important;
    }
    
    nav.navbar-custom .navbar-collapse {
        order: 3 !important;
        width: 100% !important;
        margin-top: 0.5rem !important;
    }
    
    /* Navigation verticale sur mobile */
    nav.navbar-custom .navbar-nav,
    .navbar.navbar-custom .navbar-nav {
        flex-direction: column !important;
        text-align: center !important;
        margin-left: 0 !important;
    }
    
    /* Boutons d'action centrés sur mobile */
    nav.navbar-custom .action-buttons,
    .navbar.navbar-custom .action-buttons {
        justify-content: center !important;
        margin: 0.5rem 0 0 0 !important;
        order: 4 !important;
    }
}

/* ===== AMÉLIORATIONS SUPPLÉMENTAIRES POUR VOTRE NAVBAR ===== */

/* Correction pour éviter les conflits Bootstrap */
.navbar-expand-lg .navbar-nav {
    flex-direction: row !important;
}

.navbar-expand-lg .navbar-nav .nav-link {
    padding-right: 0.5rem !important;
    padding-left: 0.5rem !important;
}

/* Animation smooth pour le collapse */
.navbar-collapse {
    transition: all 0.3s ease-in-out !important;
}

/* Fix pour l'espacement des éléments */
@media (min-width: 992px) {
    .navbar-expand-lg .navbar-collapse {
        display: flex !important;
        flex-basis: auto !important;
        flex-grow: 1 !important;
        align-items: center !important;
    }
    
    .navbar-expand-lg .navbar-nav {
        margin-left: 1rem !important;
        margin-right: auto !important;
    }
}

/* Style alternatif si les boutons d'action doivent être dans le collapse */
.action-buttons-in-collapse .action-buttons {
    display: flex !important;
    gap: 0.3rem !important;
    align-items: center !important;
    margin-left: auto !important;
}

@media (max-width: 991.98px) {
    .action-buttons-in-collapse .action-buttons {
        margin-top: 1rem !important;
        margin-left: 0 !important;
        justify-content: center !important;
        border-top: 1px solid rgba(255,255,255,0.1) !important;
        padding-top: 1rem !important;
    }
}

.divider {
    text-align: center;
    width: 60%;
    height: 1px;
    background: var(--primary-gradient);
    margin: 20px auto; /* auto centre l'élément */
    border-radius: 2px;
}

/* En-tête de la page */
    .page-header {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      padding: 25px 30px;
      position: relative;
      overflow: hidden;
    }

    .page-header::before {
      content: '';
      position: absolute;
      top: -50%;
      right: -50%;
      width: 100%;
      height: 200%;
      background: rgba(255,255,255,0.1);
      transform: rotate(45deg);
    }

    .page-header-content {
      position: relative;
      z-index: 2;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
    }

    .page-title {
      font-size: 1.8rem;
      font-weight: 700;
      margin: 0;
      display: flex;
      align-items: center;
      gap: 15px;
    }

    .header-actions {
      display: flex;
      gap: 10px;
      align-items: center;
    }

        /* Responsive */
    @media (max-width: 768px) {
      .page-header {
        padding: 6px 15px;
      }
      
      .page-header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 0;
      }
      
      .page-title {
        font-size: 1.1rem;
      }
      }

      
.select-controls {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .select-controls .row > div {
        margin-bottom: 15px;
    }
    .select-controls .row > div:last-child {
        margin-bottom: 0;
        text-align: center !important;
    }
}

.custom-select {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #495057;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    height: 55px;
    line-height: normal;
    vertical-align: middle;
}

.custom-select:focus {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 4px 8px rgba(0,0,0,0.1);
    outline: none;
}

.custom-select:hover {
    border-color: var(--primary-light);
    background: white;
}

.input-group-text {
    background: var(--primary-gradient);
    color: white;
    border: none;
    font-weight: 600;
    font-size: 15px;
    border-radius: 8px 0 0 8px;
    padding: 12px 20px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    /* Boutons Nouvel Adhérent */
    .btn-success-modern {
      background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
      color: white;
      border: none;
      border-radius: 8px;
      padding: 10px 20px;
      font-weight: 500;
      transition: all 0.3s ease;
      box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .btn-success-modern:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(17, 153, 142, 0.6);
      color: white;
    }
