/* 
 * REPI - Réseau d'Entraide Pastoral International
 * Feuille de style principale
 * Version: 1.0.0
 */

/* ======================================
 * Variables
 * ====================================== */
 :root {
    /* Couleurs principales inspirées du logo REPI */
    --repi-blue: #1e3799;
    --repi-red: #e84118;
    --repi-yellow: #fbc531;
    --repi-green: #4cd137;
    
    /* Déclinaisons des couleurs principales */
    --repi-blue-light: #54a0ff;
    --repi-blue-dark: #0c2461;
    --repi-red-light: #ff6b6b;
    --repi-red-dark: #b71540;
    --repi-yellow-light: #fed330;
    --repi-yellow-dark: #f39c12;
    --repi-green-light: #7bed9f;
    --repi-green-dark: #2ecc71;
    
    /* Couleurs neutres */
    --repi-white: #ffffff;
    --repi-light: #f5f6fa;
    --repi-gray-100: #f1f2f6;
    --repi-gray-200: #dfe4ea;
    --repi-gray-300: #ced6e0;
    --repi-gray-400: #a4b0be;
    --repi-gray-500: #747d8c;
    --repi-gray-600: #57606f;
    --repi-gray-700: #2f3542;
    --repi-gray-800: #222831;
    --repi-gray-900: #1e272e;
    --repi-dark: #0a0a0a;
    
    /* Ombres */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.15);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    
    /* Arrondis */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
    
    /* Typographie */
    --font-family-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-serif: Georgia, Cambria, 'Times New Roman', Times, serif;
    --font-family-mono: Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  }
  
  /* ======================================
   * Réinitialisation et base
   * ====================================== */
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  
  html {
    font-size: 16px;
    scroll-behavior: smooth;
  }
  
  body {
    font-family: var(--font-family-sans);
    color: var(--repi-gray-700);
    background-color: var(--repi-gray-100);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  
  /* Typographie */
  h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--repi-gray-800);
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  h3 {
    font-size: 1.75rem;
  }
  
  h4 {
    font-size: 1.5rem;
  }
  
  h5 {
    font-size: 1.25rem;
  }
  
  h6 {
    font-size: 1rem;
  }
  
  p {
    margin-bottom: 1rem;
  }
  
  a {
    color: var(--repi-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
  }
  
  a:hover {
    color: var(--repi-blue-light);
    text-decoration: none;
  }
  
  /* ======================================
   * Layout
   * ====================================== */
  .container-fluid {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }
  
  main {
    flex: 1;
    padding-bottom: 2rem;
  }
  
  /* ======================================
   * Navigation
   * ====================================== */
  .navbar {
    padding: 0.75rem 1.5rem;
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--repi-blue-dark), var(--repi-blue));
  }
  
  .navbar-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--repi-white);
  }
  
  .navbar-brand img {
    margin-right: 0.75rem;
  }
  
  .navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 15px;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
  }
  
  .navbar-dark .navbar-nav .nav-link:hover {
    color: var(--repi-white);
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  .navbar-dark .navbar-nav .nav-link.active {
    color: var(--repi-white);
    background-color: rgba(255, 255, 255, 0.15);
  }
  
  .dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 0.5rem;
  }
  
  .dropdown-item {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
  }
  
  .dropdown-item:hover, 
  .dropdown-item:focus {
    background-color: var(--repi-gray-100);
  }
  
  /* ======================================
   * Sidebar
   * ====================================== */
  .sidebar {
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);
  }
  
  .sidebar .nav-link {
    font-weight: 500;
    color: var(--repi-gray-600);
    border-radius: var(--radius-md);
    margin: 0.2rem 0.5rem;
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
  }
  
  .sidebar .nav-link:hover {
    color: var(--repi-blue);
    background-color: var(--repi-gray-100);
  }
  
  .sidebar .nav-link.active {
    color: var(--repi-white);
    background-color: var(--repi-blue);
  }
  
  .sidebar .nav-header {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
  
  /* ======================================
   * Cards
   * ====================================== */
  .card {
    border: none;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-lg);
    transition: box-shadow var(--transition-normal);
    margin-bottom: 1.5rem;
  }
  
  .card:hover {
    box-shadow: var(--shadow-lg);
  }
  
  /* Effet de soulèvement réservé aux cartes statistiques (plus de
     « saut » des formulaires ni de menus coupés dans les cartes) */
  .stat-card:hover,
  .stats-card:hover,
  .hover-lift:hover {
    transform: translateY(-3px);
  }
  
  .card > .card-header:first-child {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  
  .card-header {
    background-color: var(--repi-white);
    border-bottom: 1px solid var(--repi-gray-200);
    padding: 1.25rem 1.5rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .card-footer {
    background-color: var(--repi-white);
    border-top: 1px solid var(--repi-gray-200);
    padding: 1rem 1.5rem;
  }
  
  /* Cards spéciales */
  .card.bg-primary {
    background: linear-gradient(135deg, var(--repi-blue), var(--repi-blue-light)) !important;
  }
  
  .card.bg-success {
    background: linear-gradient(135deg, var(--repi-green-dark), var(--repi-green)) !important;
  }
  
  .card.bg-info {
    background: linear-gradient(135deg, #0097e6, #00a8ff) !important;
  }
  
  .card.bg-warning {
    background: linear-gradient(135deg, var(--repi-yellow-dark), var(--repi-yellow)) !important;
  }
  
  .card.bg-danger {
    background: linear-gradient(135deg, var(--repi-red-dark), var(--repi-red)) !important;
  }
  
  .card.bg-secondary {
    background: linear-gradient(135deg, var(--repi-gray-600), var(--repi-gray-500)) !important;
  }
  
  /* ======================================
   * Boutons
   * ====================================== */
  .btn {
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
    border: none;
  }
  
  .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
  
  .btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
  }
  
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
  }
  
  .btn-primary {
    background: linear-gradient(135deg, var(--repi-blue), var(--repi-blue-light));
    color: var(--repi-white);
  }
  
  .btn-primary:hover, 
  .btn-primary:focus {
    background: linear-gradient(135deg, var(--repi-blue-dark), var(--repi-blue));
    color: var(--repi-white);
  }
  
  .btn-success {
    background: linear-gradient(135deg, var(--repi-green), var(--repi-green-light));
    color: var(--repi-white);
  }
  
  .btn-success:hover, 
  .btn-success:focus {
    background: linear-gradient(135deg, var(--repi-green-dark), var(--repi-green));
    color: var(--repi-white);
  }
  
  .btn-danger {
    background: linear-gradient(135deg, var(--repi-red), var(--repi-red-light));
    color: var(--repi-white);
  }
  
  .btn-danger:hover, 
  .btn-danger:focus {
    background: linear-gradient(135deg, var(--repi-red-dark), var(--repi-red));
    color: var(--repi-white);
  }
  
  .btn-outline-primary {
    color: var(--repi-blue);
    border: 2px solid var(--repi-blue);
    background: transparent;
  }
  
  .btn-outline-primary:hover, 
  .btn-outline-primary:focus {
    background-color: var(--repi-blue);
    color: var(--repi-white);
  }
  
  /* ======================================
   * Tableaux
   * ====================================== */
  .table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--repi-gray-700);
    border-collapse: separate;
    border-spacing: 0;
  }
  
  .table th,
  .table td {
    padding: 1rem;
    vertical-align: middle;
  }
  
  .table thead th {
    background-color: var(--repi-gray-100);
    font-weight: 600;
    border-bottom: 2px solid var(--repi-gray-200);
    color: var(--repi-gray-700);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
  }
  
  .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
  }
  
  .table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.04);
  }
  
  .table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* ======================================
   * Formulaires
   * ====================================== */
  .form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--repi-gray-700);
  }
  
  .form-control,
  .form-select {
    border: 2px solid var(--repi-gray-200);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
  }
  
  .form-control:focus,
  .form-select:focus {
    border-color: var(--repi-blue);
    box-shadow: 0 0 0 0.25rem rgba(30, 55, 153, 0.15);
  }
  
  .form-select {
    background-position: right 1rem center;
  }
  
  .input-group-text {
    border: 2px solid var(--repi-gray-200);
    background-color: var(--repi-gray-100);
  }
  
  .form-check-input:checked {
    background-color: var(--repi-blue);
    border-color: var(--repi-blue);
  }
  
  /* ======================================
   * Alertes
   * ====================================== */
  .alert {
    border: none;
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
  }
  
  .alert-success {
    background-color: rgba(76, 209, 55, 0.1);
    color: var(--repi-green-dark);
  }
  
  .alert-danger {
    background-color: rgba(232, 65, 24, 0.1);
    color: var(--repi-red-dark);
  }
  
  .alert-warning {
    background-color: rgba(251, 197, 49, 0.1);
    color: var(--repi-yellow-dark);
  }
  
  .alert-info {
    background-color: rgba(30, 55, 153, 0.1);
    color: var(--repi-blue-dark);
  }
  
  /* ======================================
   * Badges
   * ====================================== */
  .badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: var(--radius-sm);
    font-size: 0.75em;
    text-transform: uppercase;
  }
  
  .badge.bg-primary {
    background-color: var(--repi-blue) !important;
  }
  
  .badge.bg-success {
    background-color: var(--repi-green) !important;
  }
  
  .badge.bg-danger {
    background-color: var(--repi-red) !important;
  }
  
  .badge.bg-warning {
    background-color: var(--repi-yellow) !important;
    color: var(--repi-dark);
  }
  
  .badge.bg-info {
    background-color: var(--repi-blue-light) !important;
  }
  
  /* ======================================
   * Pagination
   * ====================================== */
  .pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 1.5rem 0;
  }
  
  .page-item {
    margin: 0 0.25rem;
  }
  
  .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--repi-blue);
    background-color: var(--repi-white);
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
  }
  
  .page-link:hover {
    color: var(--repi-white);
    background-color: var(--repi-blue-light);
    box-shadow: var(--shadow-md);
  }
  
  .page-item.active .page-link {
    color: var(--repi-white);
    background-color: var(--repi-blue);
    box-shadow: var(--shadow-md);
  }
  
  .page-item.disabled .page-link {
    color: var(--repi-gray-400);
    background-color: var(--repi-gray-100);
    pointer-events: none;
  }
  
  /* ======================================
   * Modals
   * ====================================== */
  .modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
  }
  
  .modal-header {
    border-bottom: 1px solid var(--repi-gray-200);
    padding: 1.25rem 1.5rem;
  }
  
  .modal-footer {
    border-top: 1px solid var(--repi-gray-200);
    padding: 1.25rem 1.5rem;
  }
  
  .modal-title {
    font-weight: 600;
  }
  
  /* ======================================
   * Tabs
   * ====================================== */
  .nav-tabs {
    border-bottom: 1px solid var(--repi-gray-200);
  }
  
  .nav-tabs .nav-link {
    margin-bottom: -1px;
    border: none;
    border-bottom: 3px solid transparent;
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
    color: var(--repi-gray-600);
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    transition: all var(--transition-fast);
  }
  
  .nav-tabs .nav-link:hover {
    color: var(--repi-blue);
    border-color: transparent;
  }
  
  .nav-tabs .nav-link.active {
    color: var(--repi-blue);
    background-color: var(--repi-white);
    border-bottom-color: var(--repi-blue);
  }
  
  /* ======================================
   * Carte de membre
   * ====================================== */
  .member-card {
    transition: all var(--transition-normal);
    cursor: pointer;
  }
  
  .member-card:hover {
    transform: scale(1.02);
  }
  
  .member-card.selected {
    border: 2px solid var(--repi-blue);
    box-shadow: 0 0 0 4px rgba(30, 55, 153, 0.15);
  }
  
  .card-tab {
    cursor: pointer;
    transition: all var(--transition-fast);
  }
  
  .card-tab:hover {
    background-color: var(--repi-gray-200);
  }
  
  .card-tab.active {
    font-weight: 600;
  }
  
  /* ======================================
   * QR Code Scanner
   * ====================================== */
  #scanner {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    max-width: 100%;
    max-height: 400px;
  }
  
  #scan-result {
    border-radius: var(--radius-md);
    word-break: break-word;
  }
  
  /* ======================================
   * Statistiques et graphiques
   * ====================================== */
  .stats-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  }
  
  .stats-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
  }
  
  .stats-icon {
    font-size: 3rem;
    opacity: 0.2;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
  }
  
  .stats-number {
    font-size: 2.5rem;
    font-weight: 700;
  }
  
  /* ======================================
   * Animations
   * ====================================== */
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  @keyframes slideInUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
  
  @keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
  }
  
  .fade-in {
    animation: fadeIn var(--transition-normal);
  }
  
  .slide-in-up {
    animation: slideInUp var(--transition-normal);
  }
  
  .pulse {
    animation: pulse 2s infinite;
  }
  
  /* ======================================
   * Page d'accueil
   * ====================================== */
  .hero-section {
    background: linear-gradient(135deg, var(--repi-blue-dark), var(--repi-blue));
    color: var(--repi-white);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    box-shadow: var(--shadow-lg);
  }
  
  .hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(rgba(255, 255, 255, 0.1) 10%, transparent 10.5%), 
                radial-gradient(rgba(255, 255, 255, 0.1) 10%, transparent 10.5%);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
    transform: rotate(45deg);
    z-index: 1;
    animation: moveBackground 60s linear infinite;
  }
  
  @keyframes moveBackground {
    0% { background-position: 0 0, 25px 25px; }
    100% { background-position: 1000px 1000px, 1025px 1025px; }
  }
  
  .hero-content {
    position: relative;
    z-index: 2;
  }
  
  .hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
  }
  
  .hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .feature-card {
    padding: 2rem;
    text-align: center;
    background-color: var(--repi-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    height: 100%;
  }
  
  .feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
  }
  
  .feature-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    color: var(--repi-white);
    border-radius: 50%;
  }
  
  .icon-blue {
    background: linear-gradient(135deg, var(--repi-blue), var(--repi-blue-light));
  }
  
  .icon-red {
    background: linear-gradient(135deg, var(--repi-red), var(--repi-red-light));
  }
  
  .icon-yellow {
    background: linear-gradient(135deg, var(--repi-yellow), var(--repi-yellow-light));
  }
  
  .icon-green {
    background: linear-gradient(135deg, var(--repi-green), var(--repi-green-light));
  }
  
  .feature-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
  }
  
  /* ======================================
   * Footer
   * ====================================== */
  .footer {
    background-color: var(--repi-white);
    padding: 1.5rem 0;
    border-top: 1px solid var(--repi-gray-200);
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
    
  }
  
  /* ======================================
   * Utilitaires
   * ====================================== */
  .rounded-circle-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--repi-white);
    font-size: 1.25rem;
  }
  
  .bg-gradient-primary {
    background: linear-gradient(135deg, var(--repi-blue-dark), var(--repi-blue));
  }
  
  .bg-gradient-success {
    background: linear-gradient(135deg, var(--repi-green-dark), var(--repi-green));
  }
  
  .bg-gradient-danger {
    background: linear-gradient(135deg, var(--repi-red-dark), var(--repi-red));
  }
  
  .bg-gradient-warning {
    background: linear-gradient(135deg, var(--repi-yellow-dark), var(--repi-yellow));
  }
  
  .text-xs {
    font-size: 0.75rem;
  }
  
  .text-sm {
    font-size: 0.875rem;
  }
  
  .text-lg {
    font-size: 1.125rem;
  }
  
  .text-xl {
    font-size: 1.25rem;
  }
  
  .text-2xl {
    font-size: 1.5rem;
  }
  
  .font-bold {
    font-weight: 700;
  }
  
  .font-semibold {
    font-weight: 600;
  }
  
  /* ======================================
   * Media Queries 
   * ====================================== */
  @media (max-width: 767.98px) {
    .card-body {
      padding: 1.25rem;
    }
    
    .hero-title {
      font-size: 2.5rem;
    }
    
    .hero-subtitle {
      font-size: 1.25rem;
    }
    
    .table th, 
    .table td {
      padding: 0.75rem;
    }
  }
  
  /* ======================================
   * Animations pour les pages de chargement 
   * ====================================== */
  .loader {
    width: 50px;
    height: 50px;
    border: 4px solid var(--repi-gray-200);
    border-radius: 50%;
    border-top-color: var(--repi-blue);
    animation: spin 1s linear infinite;
    margin: 2rem auto;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  .loading-dots {
    display: inline-flex;
    align-items: center;
  }
  
  .loading-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--repi-blue);
    margin: 0 2px;
    animation: dots 1.4s infinite ease-in-out both;
  }
  
  .loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
  }
  
  .loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
  }
  
  @keyframes dots {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
  }
  
  /* ======================================
   * Effets spéciaux pour les éléments interactifs
   * ====================================== */
  .hover-float {
    transition: transform var(--transition-normal);
  }
  
  .hover-float:hover {
    transform: translateY(-5px);
  }
  
  .hover-glow {
    transition: box-shadow var(--transition-normal);
  }
  
  .hover-glow:hover {
    box-shadow: 0 0 15px rgba(30, 55, 153, 0.5);
  }
  
  .hover-scale {
    transition: transform var(--transition-normal);
  }
  
  .hover-scale:hover {
    transform: scale(1.05);
  }
  
  .hover-rotate {
    transition: transform var(--transition-normal);
  }
  
  .hover-rotate:hover {
    transform: rotate(5deg);
  }
  
  /* ======================================
   * Style pour les cartes de membre
   * ====================================== */
  .member-card-container {
    perspective: 1000px;
  }
  
  .member-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
  }
  
  .member-card-container:hover .member-card-inner {
    transform: rotateY(180deg);
  }
  
  .member-card-front, .member-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
  }
  
  .member-card-front {
    background-color: var(--repi-white);
  }
  
  .member-card-back {
    background-color: var(--repi-blue-dark);
    color: var(--repi-white);
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .qr-background {
    background-color: var(--repi-white);
    padding: 1rem;
    border-radius: var(--radius-md);
  }
  
  /* Style pour impression des cartes de membre */
  @media print {
    body * {
      visibility: hidden;
    }
    
    .print-container, .print-container * {
      visibility: visible;
    }
    
    .print-container {
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
    }
    
    .no-print {
      display: none !important;
    }
  }
  
  /* ======================================
   * Scanner QR Code
   * ====================================== */
  .scanner-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
  }
  
  .scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
  }
  
  .scanner-target {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 2px solid var(--repi-green);
    border-radius: 20px;
    box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.3);
  }
  
  .scanner-target::before,
  .scanner-target::after {
    content: "";
    position: absolute;
    width: 30px;
    height: 30px;
    border-color: var(--repi-green);
    border-style: solid;
  }
  
  .scanner-target::before {
    top: -5px;
    left: -5px;
    border-width: 5px 0 0 5px;
    border-radius: 5px 0 0 0;
  }
  
  .scanner-target::after {
    bottom: -5px;
    right: -5px;
    border-width: 0 5px 5px 0;
    border-radius: 0 0 5px 0;
  }
  
  .scan-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--repi-green), transparent);
    top: 50%;
    transform: translateY(-50%);
    animation: scan 2s linear infinite;
  }
  
  @keyframes scan {
    0% {
      transform: translateY(-100px);
    }
    50% {
      transform: translateY(100px);
    }
    100% {
      transform: translateY(-100px);
    }
  }
  
  /* ======================================
   * Dashboard Statistiques
   * ====================================== */
  .stat-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
  }
  
  .stat-card {
    background-color: var(--repi-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
  }
  
  .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
  }
  
  .stat-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 3rem;
    opacity: 0.1;
    color: var(--repi-blue);
  }
  
  .stat-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--repi-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
  }
  
  .stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--repi-gray-800);
  }
  
  .stat-change {
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
  }
  
  .stat-change.positive {
    color: var(--repi-green);
  }
  
  .stat-change.negative {
    color: var(--repi-red);
  }
  
  /* ======================================
   * Timeline pour historique
   * ====================================== */
  .timeline {
    position: relative;
    margin: 2rem 0;
    padding-left: 3rem;
  }
  
  .timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom, var(--repi-blue-light), var(--repi-blue-dark));
    border-radius: var(--radius-full);
  }
  
  .timeline-item {
    position: relative;
    padding-bottom: 2rem;
  }
  
  .timeline-item:last-child {
    padding-bottom: 0;
  }
  
  .timeline-dot {
    position: absolute;
    left: -3.25rem;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--repi-blue);
    border: 3px solid var(--repi-white);
    box-shadow: var(--shadow-md);
  }
  
  .timeline-content {
    position: relative;
    padding: 1.5rem;
    background-color: var(--repi-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
  }
  
  .timeline-content::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 10px;
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-right: 12px solid var(--repi-white);
  }
  
  .timeline-date {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--repi-blue);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
  }
  
  .timeline-date i {
    margin-right: 0.5rem;
  }
  
  .timeline-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
  }
  
  /* ======================================
   * Calendrier d'événements
   * ====================================== */
  .calendar-container {
    background-color: var(--repi-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
  }
  
  .calendar-header {
    background-color: var(--repi-blue);
    color: var(--repi-white);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .calendar-title {
    font-size: 1.5rem;
    font-weight: 600;
  }
  
  .calendar-nav {
    display: flex;
    gap: 0.5rem;
  }
  
  .calendar-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--repi-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
  }
  
  .calendar-nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
  }
  
  .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: var(--repi-gray-200);
  }
  
  .calendar-day-name {
    padding: 0.75rem;
    text-align: center;
    background-color: var(--repi-gray-100);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
  }
  
  .calendar-day {
    padding: 1rem;
    min-height: 100px;
    background-color: var(--repi-white);
    transition: all var(--transition-fast);
    position: relative;
  }
  
  .calendar-day:hover {
    background-color: var(--repi-gray-100);
  }
  
  .calendar-day.today {
    background-color: rgba(30, 55, 153, 0.05);
  }
  
  .calendar-day.has-event::after {
    content: '';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--repi-blue);
  }
  
  .calendar-day-number {
    font-weight: 600;
    margin-bottom: 0.5rem;
  }
  
  .calendar-day.today .calendar-day-number {
    width: 24px;
    height: 24px;
    background-color: var(--repi-blue);
    color: var(--repi-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .calendar-event {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    background-color: rgba(30, 55, 153, 0.1);
    color: var(--repi-blue);
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: all var(--transition-fast);
  }
  
  .calendar-event:hover {
    background-color: var(--repi-blue);
    color: var(--repi-white);
  }
  
  /* ======================================
   * Notifications et alertes
   * ====================================== */
  .notification-badge {
    position: relative;
    display: inline-flex;
  }
  
  .notification-badge::after {
    content: attr(data-count);
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background-color: var(--repi-red);
    color: var(--repi-white);
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
  }
  
  .toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .toast {
    background-color: var(--repi-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
  }
  
  @keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
  }
  
  .toast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
  }
  
  .toast-title {
    font-weight: 600;
    font-size: 1rem;
  }
  
  .toast-close {
    cursor: pointer;
    color: var(--repi-gray-500);
    transition: color var(--transition-fast);
  }
  
  .toast-close:hover {
    color: var(--repi-gray-700);
  }
  
  .toast-body {
    font-size: 0.875rem;
  }
  
  .toast-success {
    border-left: 5px solid var(--repi-green);
  }
  
  .toast-danger {
    border-left: 5px solid var(--repi-red);
  }
  
  .toast-warning {
    border-left: 5px solid var(--repi-yellow);
  }
  
  .toast-info {
    border-left: 5px solid var(--repi-blue);
  }
  
  /* ======================================
   * Logo REPI - Style spécial
   * ====================================== */
  .logo-container {
    position: relative;
  }
  
  .logo-repi {
    display: flex;
    align-items: center;
    font-weight: 700;
    color: var(--repi-white);
    font-size: 2rem;
    letter-spacing: 0.05em;
  }
  
  .logo-accent {
    color: var(--repi-yellow);
  }
  
  .logo-subtitle {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    opacity: 0.8;
    margin-top: -0.25rem;
  }
  
  .logo-icon {
    position: relative;
    width: 50px;
    height: 50px;
    margin-right: 1rem;
  }
  
  .logo-circle {
    position: absolute;
    width: 15px;
    height: 15px;
    border-radius: 50%;
  }
  
  .logo-circle-blue {
    background-color: var(--repi-blue);
    top: 0;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .logo-circle-red {
    background-color: var(--repi-red);
    top: 50%;
    right: 0;
    transform: translateY(-50%);
  }
  
  .logo-circle-yellow {
    background-color: var(--repi-yellow);
    bottom: 0;
    left: 0;
  }
  
  .logo-circle-green {
    background-color: var(--repi-green);
    bottom: 0;
    right: 0;
  }
  
  .logo-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid var(--repi-gray-300);
    border-radius: 50%;
  }
  
  /* ======================================
   * Animations d'arrière-plan
   * ====================================== */
  .bg-animated {
    position: relative;
    overflow: hidden;
  }
  
  .bg-animated::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(rgba(255, 255, 255, 0.05) 8%, transparent 8.5%);
    background-size: 25px 25px;
    transform: rotate(45deg);
    animation: bgMove 60s linear infinite;
    z-index: 1;
  }
  
  @keyframes bgMove {
    0% { background-position: 0 0; }
    100% { background-position: 500px 500px; }
  }
  
  .color-gradient-blue {
    color: var(--repi-blue);
    background: linear-gradient(135deg, var(--repi-blue), var(--repi-blue-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
  }
  
  .color-gradient-multi {
    background: linear-gradient(90deg, 
      var(--repi-blue), 
      var(--repi-red), 
      var(--repi-yellow), 
      var(--repi-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    background-size: 300% 100%;
    animation: gradient-shift 8s ease infinite;
  }
  
  @keyframes gradient-shift {
    0% { background-position: 0% 50% }
    50% { background-position: 100% 50% }
    100% { background-position: 0% 50% }
  }
  
  /* ======================================
   * Thème clair/sombre (préparation)
   * ====================================== */
  .theme-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--repi-white);
    cursor: pointer;
    transition: all var(--transition-fast);
  }
  
  .theme-switch:hover {
    background-color: rgba(255, 255, 255, 0.3);
  }
  
  /* Pour une future implémentation de thème sombre */
  [data-theme="dark"] {
    --repi-white: #1a1a1a;
    --repi-light: #2a2a2a;
    --repi-gray-100: #2c2c2c;
    --repi-gray-200: #3a3a3a;
    --repi-gray-300: #4a4a4a;
    --repi-gray-700: #d0d0d0;
    --repi-gray-800: #e0e0e0;
    --repi-gray-900: #f0f0f0;
    --repi-dark: #f8f8f8;
  }
  
  /* ======================================
   * Personnalisation des scrollbars
   * ====================================== */
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  
  ::-webkit-scrollbar-track {
    background: var(--repi-gray-100);
    border-radius: 10px;
  }
  
  ::-webkit-scrollbar-thumb {
    background: var(--repi-gray-400);
    border-radius: 10px;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: var(--repi-blue);
  }
  
  /* Firefox scrollbar */
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--repi-gray-400) var(--repi-gray-100);
  }
  
  /* ======================================
   * Styles d'impression
   * ====================================== */
  @media print {
    .no-print {
      display: none !important;
    }
    
    .container {
      width: 100%;
      max-width: 100%;
    }
    
    body {
      background-color: white;
      color: black;
    }
    
    a {
      text-decoration: none !important;
      color: black !important;
    }
    
    .card {
      box-shadow: none !important;
      border: 1px solid #ddd;
    }
    
    .table {
      border-collapse: collapse;
    }
    
    .table th, .table td {
      border: 1px solid #ddd;
    }
  }

/* ======================================
 * MISE EN PAGE GLOBALE (v2.1)
 * Couche unique et cohérente qui remplace les anciennes
 * « corrections » contradictoires (navbar, sidebar, modales,
 * menus déroulants). Elle s'appuie sur Bootstrap 5.3 au lieu
 * de le redéfinir.
 * ====================================== */
:root {
  --navbar-height: 70px;
  --sidebar-width: 250px;
}

/* ---------- Barre de navigation fixe ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  min-height: var(--navbar-height);
}

body.has-navbar {
  padding-top: var(--navbar-height);
}

@media (max-width: 991.98px) {
  /* Le menu déplié défile au lieu de déborder de l'écran */
  .navbar-collapse {
    max-height: calc(100vh - var(--navbar-height));
    overflow-y: auto;
  }

  .navbar .dropdown-menu {
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: none;
  }
}

/* ---------- Barre latérale ---------- */
.sidebar {
  position: fixed;
  top: var(--navbar-height);
  bottom: 0;
  left: 0;
  z-index: 1020;
  width: var(--sidebar-width);
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
}

.sidebar-sticky {
  position: static;
  height: auto;
  min-height: 100%;
  padding-top: 0.5rem;
}

.sidebar .nav-link {
  padding: 0.5rem 1rem;
  margin: 0.15rem 0.5rem;
}

@media (min-width: 768px) {
  main.ms-sm-auto {
    margin-left: var(--sidebar-width) !important;
    width: calc(100% - var(--sidebar-width)) !important;
    max-width: none;
    flex: 0 0 auto;
  }

  /* Le pied de page ne passe plus sous la barre latérale */
  body:has(.sidebar) .footer {
    padding-left: var(--sidebar-width) !important;
  }
}

@media (max-width: 767.98px) {
  /* Sur mobile, la navigation se fait par la barre du haut */
  .sidebar {
    display: none !important;
  }

  main.ms-sm-auto {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .container-fluid {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }
}

main {
  min-height: calc(100vh - var(--navbar-height) - 80px);
  padding-top: 0.5rem;
}

/* ---------- Messages flash ---------- */
.alert {
  position: relative;
}

/* Conteneur global (en-tête) : notifications flottantes */
#repi-flash-container {
  position: fixed;
  top: calc(var(--navbar-height) + 10px);
  right: 15px;
  width: 380px;
  max-width: calc(100% - 30px);
  z-index: 1045;
}

#repi-flash-container:empty {
  display: none;
}

#repi-flash-container .alert {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 10px;
  animation: slideInRight 0.3s ease-out;
}

/* ---------- Pied de page ---------- */
.footer {
  position: relative;
  z-index: 1;
  margin-top: 30px;
  width: 100%;
}

/* ---------- Graphiques ---------- */
.chart-container,
.card-body canvas {
  position: relative;
  max-width: 100%;
}

.card-body canvas {
  max-height: 320px;
}

/* ---------- Menus déroulants ----------
 * Bootstrap gère l'affichage (classe .show) : on ne force plus
 * display:block au survol ni de positionnement concurrent. */
.dropdown-menu {
  z-index: 1040;
}

/* ---------- Fenêtres modales ----------
 * Aucune largeur ni marge n'est plus imposée : .modal-lg,
 * .modal-xl, .modal-dialog-centered et .modal-dialog-scrollable
 * fonctionnent de nouveau normalement. */
.modal {
  z-index: 1055;
}

.modal-backdrop {
  z-index: 1050;
}

.modal-content {
  border-radius: var(--radius-lg);
}

body.modal-open {
  overflow: hidden;
}

/* ---------- Message de bienvenue ---------- */
.alert-success.welcome-message {
  margin-top: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
}

/* ---------- Lignes mises en évidence (scan en direct) ---------- */
.highlight-row {
  animation: repiHighlight 3s ease-out;
}

@keyframes repiHighlight {
  0% { background-color: rgba(76, 209, 55, 0.35); }
  100% { background-color: transparent; }
}

/* ---------- Scanner QR (composant partagé) ---------- */
.repi-qr-reader {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #111;
  min-height: 260px;
}

.repi-qr-reader video {
  width: 100% !important;
  height: auto !important;
  object-fit: cover;
  display: block;
}

.repi-qr-reader img[alt="Info icon"],
.repi-qr-reader img[alt="Camera based scan"] {
  display: none !important;
}

.repi-qr-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  padding: 1rem;
  pointer-events: none;
}

.repi-qr-placeholder i {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.repi-qr-reader.is-active .repi-qr-placeholder {
  display: none;
}

.repi-scan-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 24px 32px;
  border-radius: 12px;
  z-index: 2000;
  display: none;
  text-align: center;
  min-width: 260px;
  max-width: 90vw;
}

.repi-scan-popup.show {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

.repi-scan-popup h4 {
  color: #fff;
}

/* ---------- File d'envoi WhatsApp ---------- */
.wa-queue-list {
  max-height: 360px;
  overflow-y: auto;
}

.wa-queue-item.is-current {
  background-color: rgba(25, 135, 84, 0.08);
  border-left: 4px solid #198754;
}

.wa-queue-item.is-sent {
  opacity: 0.6;
}

.wa-queue-item.is-skipped {
  opacity: 0.6;
  text-decoration: line-through;
}


/* Styles pour les reçus dans la timeline */
.receipt-container {
    transition: all 0.3s ease;
    background-color: rgba(248, 249, 250, 0.7);
}

.receipt-container:hover {
    background-color: rgba(236, 236, 236, 0.9);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.timeline-content .receipt-container .btn {
    opacity: 0.7;
    transition: all 0.2s ease;
}

.timeline-content .receipt-container:hover .btn {
    opacity: 1;
}

/* Animation lors de l'ajout d'un reçu */
.receipt-added {
    animation: highlight-receipt 1.5s ease;
}

@keyframes highlight-receipt {
    0% { background-color: rgba(0, 123, 255, 0.3); }
    100% { background-color: rgba(248, 249, 250, 0.7); }
}

/* Style pour les boutons de reçu */
.btn-receipt {
    color: #3B82F6;
    border-color: #3B82F6;
    background-color: transparent;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-receipt:hover {
    color: white;
    background-color: #3B82F6;
}

/* Style pour les boutons d'action sur le reçu */
.receipt-actions {
    display: flex;
    gap: 0.5rem;
}

/* Indicateur de type de fichier */
.file-type-indicator {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-right: 8px;
}

.file-type-pdf {
    background-color: rgba(229, 62, 62, 0.1);
    color: #e53e3e;
}

.file-type-image {
    background-color: rgba(49, 130, 206, 0.1);
    color: #3182ce;
}

/* Responsive design pour petits écrans */
@media (max-width: 576px) {
    .receipt-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .receipt-actions {
        margin-top: 8px;
        width: 100%;
        justify-content: flex-end;
    }
}

/* ======================================
 * Ajouts pour les actions téléphone/WhatsApp
 * À ajouter à la fin du fichier style.css existant
 * ====================================== */

/* Styles pour les actions téléphone */
.phone-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.phone-actions .phone-number {
    font-weight: 500;
}

.phone-actions .phone-buttons {
    display: inline-flex;
    gap: 0.25rem;
}

.phone-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Pour les petits écrans */
@media (max-width: 576px) {
    .phone-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .phone-actions .phone-buttons {
        margin-top: 0.25rem;
    }
}

/* Amélioration des boutons WhatsApp */
.btn-outline-success:hover i.fa-whatsapp {
    transform: scale(1.1);
}

.btn-outline-primary:hover i.fa-phone {
    transform: scale(1.1);
}

/* Animation subtile sur les icônes */
.phone-actions .btn i {
    transition: transform 0.2s ease;
}

/* Styles spécifiques pour WhatsApp */
.btn-outline-success.whatsapp-btn {
    border-color: #25D366;
    color: #25D366;
}

.btn-outline-success.whatsapp-btn:hover {
    background-color: #25D366;
    border-color: #25D366;
    color: white;
}

/* Amélioration de l'affichage dans les tableaux */
.table td .phone-actions {
    margin: 0;
}

.table td .phone-actions .phone-number {
    font-size: 0.875rem;
}

/* Amélioration de l'affichage dans les vues détaillées */
.member-info-item .btn-group {
    vertical-align: middle;
}

.member-info-item .btn-group .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Effet de survol amélioré */
.phone-actions .btn:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Alignement dans les cartes */
.card-body .phone-actions {
    margin-top: 0.25rem;
}

/* Responsive pour tablettes */
@media (max-width: 768px) {
    .phone-actions {
        justify-content: flex-start;
    }
    
    .phone-actions .phone-buttons .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Amélioration de l'accessibilité */
.phone-actions .btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

.phone-actions .btn-outline-success:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-success-rgb), 0.25);
}

/* Style pour les tooltips (si utilisés) */
.phone-actions [data-bs-toggle="tooltip"] {
    cursor: pointer;
}

/* Amélioration visuelle des badges de statut */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
}

/* ======================================
 * Styles additionnels pour les liens dans les tableaux
 * À ajouter au fichier style.css existant
 * ====================================== */

/* Liens dans les tableaux */
.table td a.text-dark {
    color: inherit !important;
    transition: color 0.2s ease;
}

.table td a.text-dark:hover {
    color: var(--repi-blue) !important;
    text-decoration: underline !important;
}

/* Style pour le matricule (lien principal) */
.table td a:not(.btn):not(.text-dark) {
    color: var(--repi-blue-dark);
    font-weight: 500;
}

.table td a:not(.btn):not(.text-dark):hover {
    color: var(--repi-blue);
    text-decoration: underline;
}

/* Amélioration du survol de ligne */
.table-hover tbody tr:hover {
    background-color: rgba(30, 55, 153, 0.03);
    cursor: pointer;
}

/* Indicateur visuel discret */
.table-hover tbody tr:hover td a.text-dark {
    color: var(--repi-blue-dark) !important;
}

/* Pour les petits écrans - améliorer la zone cliquable */
@media (max-width: 768px) {
    .table td a:not(.btn) {
        display: inline-block;
        padding: 0.25rem 0;
        min-width: 100%;
    }
}
/* ---------- Petits écrans : barres d'outils et tableaux ---------- */
@media (max-width: 767.98px) {
  .btn-toolbar {
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 100%;
  }

  .btn-toolbar .btn-group {
    flex-wrap: wrap;
    margin-right: 0 !important;
  }

  /* Un tableau hors .table-responsive défile dans son cadre
     au lieu d'élargir toute la page */
  main table.table:not(.table-responsive table) {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .border-bottom.d-flex h1.h2 {
    font-size: 1.5rem;
  }
}
