/* ============================================
   VARIABLES CSS - Thème Investigation Division
   ============================================ */
:root {
  --primary-dark: #1a1a1a;
  --secondary-dark: #2c2c2c;
  --tertiary-dark: #1e2a27;
  --accent-gold: #c9a65c;
  --accent-orange: #e85d2a;
  --accent-green: #2d5047;
  --text-light: #f5f5f5;
  --text-muted: #a8a8a8;
  --border-gold: #d4a574;
  --shadow-intense: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-medium: 0 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-subtle: 0 2px 10px rgba(0, 0, 0, 0.2);
  --glow-gold: 0 0 20px rgba(201, 166, 92, 0.3);
  --glow-orange: 0 0 20px rgba(232, 93, 42, 0.3);
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--tertiary-dark) 100%);
  color: var(--text-light);
  line-height: 1.6;
  min-height: 100vh;
}

/* ============================================
   PAGE DE CONNEXION
   ============================================ */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: 
    radial-gradient(circle at 20% 50%, rgba(45, 80, 71, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(232, 93, 42, 0.15) 0%, transparent 50%),
    linear-gradient(135deg, var(--primary-dark) 0%, var(--tertiary-dark) 100%);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border: 2px solid var(--accent-gold);
  border-radius: 50%;
  top: -250px;
  right: -250px;
  opacity: 0.1;
}

.login-page::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border: 2px solid var(--accent-orange);
  border-radius: 50%;
  bottom: -200px;
  left: -200px;
  opacity: 0.1;
}

.login-container {
  width: 100%;
  max-width: 440px;
  padding: 20px;
  z-index: 1;
}

.login-box {
  background: rgba(44, 44, 44, 0.95);
  backdrop-filter: blur(10px);
  padding: 50px 40px;
  border-radius: 16px;
  box-shadow: var(--shadow-intense);
  border: 1px solid rgba(201, 166, 92, 0.2);
  position: relative;
  overflow: hidden;
}

.login-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-gold) 0%, var(--accent-orange) 100%);
}

.login-box h1 {
  text-align: center;
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.login-box h2 {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 35px;
  font-weight: 400;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 0;
  box-shadow: var(--shadow-medium);
  border-bottom: 2px solid var(--accent-gold);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-container h1 {
  font-size: 1.5rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--text-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 5px;
  align-items: center;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.nav-links a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-links a:hover::before,
.nav-links a.active::before {
  width: 80%;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(201, 166, 92, 0.15);
  color: var(--accent-gold);
}

/* ============================================
   DROPDOWN NAVIGATION
   ============================================ */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.nav-dropdown-toggle::after {
  content: '';
  border: solid var(--text-light);
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 3px;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  margin-top: -3px;
}

.nav-dropdown:hover .nav-dropdown-toggle::after {
  transform: rotate(-135deg);
  border-color: var(--accent-gold);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--primary-dark) 100%);
  min-width: 180px;
  border-radius: 8px;
  box-shadow: var(--shadow-medium);
  border: 1px solid rgba(201, 166, 92, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 200;
  overflow: hidden;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(5px);
}

.nav-dropdown-menu a {
  display: block;
  padding: 12px 20px;
  border-radius: 0;
  border-bottom: 1px solid rgba(201, 166, 92, 0.1);
}

.nav-dropdown-menu a:last-child {
  border-bottom: none;
}

.nav-dropdown-menu a::before {
  display: none;
}

.nav-dropdown-menu a:hover {
  background: rgba(201, 166, 92, 0.2);
  padding-left: 25px;
}

/* ============================================
   CONTAINER PRINCIPAL
   ============================================ */
.container {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 30px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 35px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(201, 166, 92, 0.2);
}

.page-header h2 {
  color: var(--text-light);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--text-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   FORMULAIRES
   ============================================ */
.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--accent-gold);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(44, 44, 44, 0.8);
  border: 1px solid rgba(201, 166, 92, 0.3);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-light);
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: var(--glow-gold);
  background: rgba(44, 44, 44, 0.95);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group small {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 30px;
}

/* ============================================
   BOUTONS
   ============================================ */
.btn {
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-orange) 100%);
  color: var(--primary-dark);
  box-shadow: var(--shadow-subtle);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-gold);
}

.btn-secondary {
  background: rgba(108, 117, 125, 0.8);
  color: var(--text-light);
  border: 1px solid rgba(201, 166, 92, 0.3);
}

.btn-secondary:hover {
  background: rgba(108, 117, 125, 1);
  border-color: var(--accent-gold);
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(220, 53, 69, 0.4);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
}

/* ============================================
   MESSAGES
   ============================================ */
.error-message {
  background: rgba(220, 53, 69, 0.15);
  color: #ff6b7a;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 25px;
  border-left: 4px solid #dc3545;
  backdrop-filter: blur(10px);
}

/* ============================================
   STATS GRID
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.stat-card {
  background: linear-gradient(135deg, rgba(44, 44, 44, 0.95) 0%, rgba(30, 42, 39, 0.95) 100%);
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--shadow-medium);
  border: 1px solid rgba(201, 166, 92, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-gold) 0%, var(--accent-orange) 100%);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--glow-gold);
  border-color: var(--accent-gold);
}

.stat-card h3 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   DASHBOARD GRID
   ============================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 25px;
}

.dashboard-card {
  background: linear-gradient(135deg, rgba(44, 44, 44, 0.95) 0%, rgba(30, 42, 39, 0.95) 100%);
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--shadow-medium);
  border: 1px solid rgba(201, 166, 92, 0.2);
  backdrop-filter: blur(10px);
}

.dashboard-card h3 {
  margin-bottom: 20px;
  color: var(--accent-gold);
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid rgba(201, 166, 92, 0.2);
  padding-bottom: 12px;
}

/* ============================================
   LISTES
   ============================================ */
.list-container {
  max-height: 450px;
  overflow-y: auto;
  padding-right: 8px;
}

.list-container::-webkit-scrollbar {
  width: 8px;
}

.list-container::-webkit-scrollbar-track {
  background: rgba(26, 26, 26, 0.5);
  border-radius: 4px;
}

.list-container::-webkit-scrollbar-thumb {
  background: var(--accent-gold);
  border-radius: 4px;
}

.list-item {
  padding: 15px;
  border-bottom: 1px solid rgba(201, 166, 92, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.list-item:hover {
  background: rgba(201, 166, 92, 0.1);
  padding-left: 20px;
}

.list-item:last-child {
  border-bottom: none;
}

.rank {
  font-weight: 800;
  color: var(--accent-gold);
  margin-right: 15px;
  font-size: 1.2rem;
}

/* ============================================
   TABLEAUX
   ============================================ */
.table-container {
  background: linear-gradient(135deg, rgba(44, 44, 44, 0.95) 0%, rgba(30, 42, 39, 0.95) 100%);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  margin-bottom: 25px;
  border: 1px solid rgba(201, 166, 92, 0.2);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--tertiary-dark) 100%);
  color: var(--accent-gold);
}

.data-table th {
  padding: 18px 20px;
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  border-bottom: 2px solid var(--accent-gold);
}

.data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(201, 166, 92, 0.1);
  color: var(--text-light);
}

.data-table tbody tr {
  transition: all 0.3s ease;
}

.data-table tbody tr:hover {
  background: rgba(201, 166, 92, 0.1);
  transform: scale(1.01);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: var(--shadow-subtle);
}

.badge-ouverte {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
}

.badge-en_cours {
  background: linear-gradient(135deg, var(--accent-orange) 0%, #ff8c42 100%);
  color: white;
}

.badge-cloturee {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: white;
}

.badge-archivee {
  background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%);
  color: white;
}

/* ============================================
   FILTRES
   ============================================ */
.filters {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}

.search-input {
  flex: 1;
  padding: 14px 18px;
  background: rgba(44, 44, 44, 0.8);
  border: 1px solid rgba(201, 166, 92, 0.3);
  border-radius: 8px;
  color: var(--text-light);
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: var(--glow-gold);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.filter-select {
  padding: 14px 18px;
  background: rgba(44, 44, 44, 0.8);
  border: 1px solid rgba(201, 166, 92, 0.3);
  border-radius: 8px;
  min-width: 220px;
  color: var(--text-light);
  transition: all 0.3s ease;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: var(--glow-gold);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  text-align: center;
  padding: 25px;
  color: var(--text-muted);
}

/* ============================================
   ONGLETS
   ============================================ */
.tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 25px;
  border-bottom: 2px solid rgba(201, 166, 92, 0.2);
}

.tab-btn {
  padding: 14px 28px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
  transition: all 0.3s ease;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tab-btn:hover {
  color: var(--accent-gold);
  background: rgba(201, 166, 92, 0.1);
}

.tab-btn.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
  background: rgba(201, 166, 92, 0.1);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   CARDS
   ============================================ */
.detail-card {
  background: linear-gradient(135deg, rgba(44, 44, 44, 0.95) 0%, rgba(30, 42, 39, 0.95) 100%);
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--shadow-medium);
  margin-bottom: 25px;
  border: 1px solid rgba(201, 166, 92, 0.2);
}

.detail-card h3 {
  margin-bottom: 25px;
  color: var(--accent-gold);
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid rgba(201, 166, 92, 0.2);
  padding-bottom: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 20px;
}

.detail-grid > div {
  padding: 15px;
  background: rgba(26, 26, 26, 0.4);
  border-radius: 8px;
  border-left: 3px solid var(--accent-gold);
}

.detail-grid label {
  font-weight: 700;
  color: var(--accent-gold);
  display: block;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.detail-grid p {
  color: var(--text-light);
  font-size: 1rem;
}

/* ============================================
   SECTION HEADER
   ============================================ */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(201, 166, 92, 0.2);
}

.section-header h3 {
  color: var(--accent-gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================
   PARTIES
   ============================================ */
.parties-section {
  margin-bottom: 35px;
}

.partie-card {
  background: linear-gradient(135deg, rgba(44, 44, 44, 0.9) 0%, rgba(30, 42, 39, 0.9) 100%);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: var(--shadow-subtle);
  border: 1px solid rgba(201, 166, 92, 0.2);
  transition: all 0.3s ease;
}

.partie-card:hover {
  transform: translateX(5px);
  border-color: var(--accent-gold);
}

/* ============================================
   PREUVES
   ============================================ */
.preuves-container {
  display: grid;
  gap: 25px;
}

.preuve-card {
  background: linear-gradient(135deg, rgba(44, 44, 44, 0.95) 0%, rgba(30, 42, 39, 0.95) 100%);
  padding: 25px;
  border-radius: 12px;
  box-shadow: var(--shadow-medium);
  border: 1px solid rgba(201, 166, 92, 0.2);
  transition: all 0.3s ease;
}

.preuve-card:hover {
  box-shadow: var(--glow-gold);
}

.preuve-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(201, 166, 92, 0.2);
}

.preuve-header h4 {
  color: var(--accent-gold);
  margin-bottom: 8px;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.preuve-content {
  margin-top: 20px;
}

.preuve-texte {
  white-space: pre-wrap;
  line-height: 1.9;
  color: var(--text-light);
}

.preuve-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-medium);
  border: 2px solid rgba(201, 166, 92, 0.3);
}

.preuve-video {
  width: 100%;
  min-height: 400px;
  border-radius: 8px;
  border: 2px solid rgba(201, 166, 92, 0.3);
}

/* ============================================
   MODAL
   ============================================ */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  overflow: auto;
}

.modal-content {
  background: linear-gradient(135deg, rgba(44, 44, 44, 0.98) 0%, rgba(30, 42, 39, 0.98) 100%);
  margin: 50px auto;
  padding: 40px;
  border-radius: 16px;
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-intense);
  border: 2px solid rgba(201, 166, 92, 0.3);
}

.close {
  color: var(--text-muted);
  float: right;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
}

.close:hover {
  color: var(--accent-gold);
  transform: rotate(90deg);
}

/* ============================================
   PROFILE
   ============================================ */
.profile-container {
  display: grid;
  gap: 30px;
}

.profile-section {
  background: linear-gradient(135deg, rgba(44, 44, 44, 0.95) 0%, rgba(30, 42, 39, 0.95) 100%);
  padding: 35px;
  border-radius: 12px;
  box-shadow: var(--shadow-medium);
  border: 1px solid rgba(201, 166, 92, 0.2);
}

.profile-section h3 {
  margin-bottom: 25px;
  color: var(--accent-gold);
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid rgba(201, 166, 92, 0.2);
  padding-bottom: 12px;
}

.avatar-section {
  text-align: center;
}

.avatar-large {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 4px solid var(--accent-gold);
  box-shadow: var(--glow-gold);
  transition: all 0.3s ease;
}

.avatar-large:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(201, 166, 92, 0.5);
}

.avatar-placeholder {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--tertiary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--accent-gold);
  border: 4px solid var(--accent-gold);
  font-size: 4rem;
  font-weight: 700;
}

/* ============================================
   ROLES
   ============================================ */
.role-card {
  background: linear-gradient(135deg, rgba(44, 44, 44, 0.9) 0%, rgba(30, 42, 39, 0.9) 100%);
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(201, 166, 92, 0.2);
  transition: all 0.3s ease;
}

.role-card:hover {
  transform: translateX(5px);
  border-color: var(--accent-gold);
  box-shadow: var(--glow-gold);
}

.role-card h4 {
  color: var(--accent-gold);
  margin-bottom: 8px;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.permissions-list {
  margin-top: 15px;
}

.permission-item {
  background: linear-gradient(135deg, rgba(44, 44, 44, 0.9) 0%, rgba(30, 42, 39, 0.9) 100%);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: var(--shadow-subtle);
  border-left: 4px solid var(--accent-gold);
  transition: all 0.3s ease;
}

.permission-item:hover {
  transform: translateX(5px);
  box-shadow: var(--glow-gold);
}

.permissions-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 15px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 12px 15px;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: rgba(26, 26, 26, 0.4);
  border: 1px solid rgba(201, 166, 92, 0.2);
  color: var(--text-light);
}

.checkbox-label:hover {
  background: rgba(201, 166, 92, 0.15);
  border-color: var(--accent-gold);
  transform: translateX(3px);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent-gold);
}

/* ============================================
   SCROLLBAR PERSONNALISÉE
   ============================================ */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(26, 26, 26, 0.5);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-orange) 100%);
  border-radius: 6px;
  border: 2px solid rgba(26, 26, 26, 0.5);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-gold) 100%);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(201, 166, 92, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(201, 166, 92, 0);
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .nav-container {
    padding: 15px 20px;
  }

  .container {
    padding: 0 20px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 15px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }

  .nav-links a {
    padding: 8px 15px;
    font-size: 0.9rem;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .page-header h2 {
    font-size: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .filters {
    flex-direction: column;
  }

  .filter-select {
    min-width: 100%;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }

  .login-box {
    padding: 35px 25px;
  }

  .login-box h1 {
    font-size: 1.6rem;
  }

  .modal-content {
    padding: 25px;
    margin: 20px;
  }

  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .tab-btn {
    white-space: nowrap;
    padding: 12px 20px;
  }

  .permissions-checkboxes {
    grid-template-columns: 1fr;
  }

  .role-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .nav-container h1 {
    font-size: 1.2rem;
  }

  .stat-value {
    font-size: 2rem;
  }

  .page-header h2 {
    font-size: 1.3rem;
  }

  .data-table {
    font-size: 0.85rem;
  }

  .data-table th,
  .data-table td {
    padding: 12px 10px;
  }

  .avatar-large,
  .avatar-placeholder {
    width: 140px;
    height: 140px;
  }
}

/* ============================================
   UTILITAIRES
   ============================================ */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

.text-gold {
  color: var(--accent-gold);
}

.text-orange {
  color: var(--accent-orange);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.hidden {
  display: none;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ============================================
   ÉTATS DE CHARGEMENT
   ============================================ */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(201, 166, 92, 0.3);
  border-radius: 50%;
  border-top-color: var(--accent-gold);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(44, 44, 44, 0.8) 25%,
    rgba(60, 60, 60, 0.8) 50%,
    rgba(44, 44, 44, 0.8) 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   IMPRESSIONS
   ============================================ */
@media print {
  body {
    background: white;
    color: black;
  }

  .navbar,
  .btn,
  .filters,
  .form-actions {
    display: none;
  }

  .detail-card,
  .table-container,
  .dashboard-card {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
}

/* ============================================
   FIN DU FICHIER CSS
   ============================================ */