/**
 * admin_system.css - SYSTÈME ADMIN UNIFIÉ
 * Un seul fichier CSS pour toutes les modals admin
 */

/* ============================================================
   BADGE ADMIN
   ============================================================ */

.admin-badge {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  vertical-align: middle;
  object-fit: contain;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.5));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
    transform: scale(1.1);
  }
}

/* ============================================================
   MODAL PRINCIPALE - Base commune
   ============================================================ */

.admin-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(3px);
}

.admin-modal.active {
  display: flex;
}

.admin-modal-box {
  background: linear-gradient(145deg, #1e1e2e, #2a2a3e);
  border: 2px solid #FFD700;
  border-radius: 16px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(255, 215, 0, 0.3);
}

.admin-modal-box h3 {
  margin: 0 0 20px 0;
  color: #FFD700;
  font-size: 1.5em;
  text-align: center;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.admin-modal-username {
  text-align: center;
  font-size: 1.1em;
  color: #fff;
  margin-bottom: 25px;
  font-weight: 600;
}

/* ============================================================
   MENU PRINCIPAL - 3 boutons
   ============================================================ */

.admin-menu-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.admin-menu-btn {
  padding: 18px 12px;
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  color: #fff;
  background: none;
}

.admin-menu-btn:nth-child(3) {
  grid-column: 1 / -1;
}

.admin-menu-btn.roles {
  background: linear-gradient(145deg, #d69e2e, #b7791f);
  border-color: #ecc94b;
}

.admin-menu-btn.roles:hover {
  background: linear-gradient(145deg, #b7791f, #975a16);
  border-color: #f6e05e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(214, 158, 46, 0.5);
}

.admin-menu-btn.sanctions {
  background: linear-gradient(145deg, #e53e3e, #c53030);
  border-color: #fc8181;
}

.admin-menu-btn.sanctions:hover {
  background: linear-gradient(145deg, #c53030, #9b2c2c);
  border-color: #feb2b2;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 62, 62, 0.5);
}

.admin-menu-btn.history {
  background: linear-gradient(145deg, #667eea, #764ba2);
  border-color: #a8a0ff;
}

.admin-menu-btn.history:hover {
  background: linear-gradient(145deg, #5568d3, #6a4193);
  border-color: #c3baff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* ============================================================
   SECTIONS - Rôles, Sanctions, etc.
   ============================================================ */

.admin-section {
  display: none;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.admin-section.active {
  display: flex;
}

/* ============================================================
   BOUTONS DE RÔLES
   ============================================================ */

.admin-role-btn {
  padding: 14px 20px;
  border: 2px solid transparent;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  color: #fff;
  background: none;
}

.admin-role-btn.user {
  background: linear-gradient(145deg, #4a5568, #2d3748);
  border-color: #718096;
}

.admin-role-btn.user:hover {
  background: linear-gradient(145deg, #2d3748, #1a202c);
  border-color: #a0aec0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(113, 128, 150, 0.4);
}

.admin-role-btn.mini-modo {
  background: linear-gradient(145deg, #38a169, #2f855a);
  border-color: #48bb78;
}

.admin-role-btn.mini-modo:hover {
  background: linear-gradient(145deg, #2f855a, #276749);
  border-color: #68d391;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.admin-role-btn.modo {
  background: linear-gradient(145deg, #3182ce, #2c5282);
  border-color: #4299e1;
}

.admin-role-btn.modo:hover {
  background: linear-gradient(145deg, #2c5282, #2a4365);
  border-color: #63b3ed;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
}

.admin-role-btn.modo-superviseur {
  background: linear-gradient(145deg, #9f7aea, #805ad5);
  border-color: #b794f4;
}

.admin-role-btn.modo-superviseur:hover {
  background: linear-gradient(145deg, #805ad5, #6b46c1);
  border-color: #d6bcfa;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(159, 122, 234, 0.4);
}

.admin-role-btn.admin {
  background: linear-gradient(145deg, #d69e2e, #b7791f);
  border-color: #ecc94b;
}

.admin-role-btn.admin:hover {
  background: linear-gradient(145deg, #b7791f, #975a16);
  border-color: #f6e05e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(214, 158, 46, 0.4);
}

/* ============================================================
   BOUTONS DE SANCTIONS
   ============================================================ */

.admin-sanction-btn {
  padding: 16px 20px;
  border: 2px solid transparent;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  color: #fff;
  background: none;
}

.admin-sanction-btn.pornography {
  background: linear-gradient(145deg, #d53f8c, #b83280);
  border-color: #f687b3;
}

.admin-sanction-btn.pornography:hover {
  background: linear-gradient(145deg, #b83280, #97266d);
  border-color: #fbb6ce;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(213, 63, 140, 0.4);
}

.admin-sanction-btn.spam {
  background: linear-gradient(145deg, #e53e3e, #c53030);
  border-color: #fc8181;
}

.admin-sanction-btn.spam:hover {
  background: linear-gradient(145deg, #c53030, #9b2c2c);
  border-color: #feb2b2;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(229, 62, 62, 0.4);
}

/* ============================================================
   MODAL SECONDAIRE (Historique, etc.)
   ============================================================ */

/* Onglets */
.history-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(255, 215, 0, 0.2);
}

.history-tab {
  flex: 1;
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #999;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.history-tab:hover {
  color: #fff;
  background: rgba(255, 215, 0, 0.05);
}

.history-tab.active {
  color: #FFD700;
  border-bottom-color: #FFD700;
}

.history-tab-content {
  display: none;
}

.history-tab-content.active {
  display: block;
}

.admin-history-content {
  max-height: 60vh;
  overflow-y: auto;
}

.history-section {
  margin-bottom: 25px;
}

.history-section h4 {
  color: #FFD700;
  font-size: 1.1em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  border-left: 3px solid #FFD700;
}

.history-item.ban {
  border-left-color: #e53e3e;
}

.history-item.mute {
  border-left-color: #ed8936;
}

.history-item.note {
  border-left-color: #4299e1;
}

.history-item .item-content {
  color: #fff !important;
  font-size: 0.95em !important;
  margin-bottom: 8px !important;
}

.history-item .item-footer {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 5px !important;
}

.history-item .item-duration {
  font-size: 0.9em !important;
  color: #fff !important;
}

.sanction-type {
  color: #ff4458 !important;
}

.history-item .item-date {
  font-size: 0.85em !important;
  color: #999 !important;
}

.history-item .item-admin {
  font-size: 0.85em !important;
  color: #FFD700 !important;
  font-weight: 600 !important;
}

.history-item .item-admin-link {
  font-size: 0.85em !important;
  color: #FFD700 !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
}

.history-item .item-admin-link:hover {
  color: #fff !important;
  text-decoration: underline !important;
}

/* Couleurs par rôle */
.item-admin-link.role-admin {
  color: #FFD700 !important;
}

.item-admin-link.role-modo-superviseur {
  color: #b794f4 !important;
}

.item-admin-link.role-modo {
  color: #63b3ed !important;
}

.item-admin-link.role-mini-modo {
  color: #68d391 !important;
}

.item-admin-link.role-user {
  color: #a0aec0 !important;
}

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

/* ============================================================
   SECTION COMMENTAIRES
   ============================================================ */

.comments-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Formulaire en haut */
.comment-form {
  background: rgba(255, 255, 255, 0.03);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.comment-form textarea {
  width: 100%;
  padding: 12px;
  background: #1a1a2e;
  border: 2px solid #444;
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.comment-form textarea:focus {
  outline: none;
  border-color: #FFD700;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.comment-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.char-counter {
  color: #666;
  font-size: 12px;
}

.comment-form .admin-btn {
  padding: 10px 24px;
}

/* Liste des commentaires en bas */
.comments-list {
  max-height: 45vh;
  overflow-y: auto;
  padding: 10px 0;
}

.comment-item {
  display: flex !important;
  flex-direction: column !important;
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 12px;
  border-left: 3px solid #4299e1;
}

/* Header : Pseudo+Date à gauche, Modifier à droite */
.comment-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: -10px !important;
}

/* Container pour pseudo + date */
.comment-info {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

/* Pseudo */
.comment-author {
  color: #FFD700 !important;
  font-weight: 600 !important;
  font-size: 14px !important;
}

/* Date à côté du pseudo */
.comment-date {
  color: #999 !important;
  font-size: 11px !important;
}

/* Bouton modifier tout à droite */
.comment-edit-btn {
  padding: 6px 12px !important;
  background: rgba(66, 153, 225, 0.2) !important;
  border: 1px solid #4299e1 !important;
  border-radius: 6px !important;
  color: #4299e1 !important;
  font-size: 12px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
}

.comment-edit-btn:hover {
  background: rgba(66, 153, 225, 0.3) !important;
  transform: translateY(-1px) !important;
}

/* Commentaire en dessous */
.comment-body {
  display: block !important;
  width: 100% !important;
  clear: both !important;
  color: #fff !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
}

/* Édition inline */
.comment-edit-textarea {
  width: 100% !important;
  min-height: 80px !important;
  padding: 10px !important;
  background: #1a1a2e !important;
  border: 2px solid #4299e1 !important;
  border-radius: 8px !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 14px !important;
  resize: vertical !important;
  box-sizing: border-box !important;
  margin-top: 5px !important;
}

.comment-edit-textarea:focus {
  outline: none !important;
  border-color: #FFD700 !important;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1) !important;
}

.comment-edit-actions {
  display: flex !important;
  gap: 10px !important;
  margin-top: 10px !important;
}

.comment-edit-save,
.comment-edit-cancel {
  padding: 8px 16px !important;
  border: none !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.comment-edit-save {
  background: linear-gradient(145deg, #48bb78, #38a169) !important;
  color: #fff !important;
}

.comment-edit-save:hover {
  background: linear-gradient(145deg, #38a169, #2f855a) !important;
  transform: translateY(-1px) !important;
}

.comment-edit-cancel {
  background: #4a5568 !important;
  color: #fff !important;
}

.comment-edit-cancel:hover {
  background: #2d3748 !important;
  transform: translateY(-1px) !important;
}

/* ============================================================
   MODAL PORNOGRAPHIE
   ============================================================ */

.porno-modal-field {
  margin-bottom: 20px;
}

.porno-modal-field label {
  display: block;
  color: #FFD700;
  font-weight: 600;
  margin-bottom: 8px;
}

.porno-restriction-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.porno-restriction-option {
  display: flex;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.porno-restriction-option:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 215, 0, 0.3);
}

.porno-restriction-option input[type="radio"] {
  margin-right: 10px;
}

.porno-restriction-option label {
  cursor: pointer;
  margin: 0;
  color: #fff;
  font-weight: normal;
}

.porno-reason-textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #2b2b2b;
  color: #eee;
  font-family: inherit;
  resize: vertical;
}

.porno-reason-counter {
  text-align: right;
  margin-top: 5px;
  color: #666;
  font-size: 12px;
}

.porno-warning {
  background: rgba(255, 100, 100, 0.1);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid #ff4444;
}

.porno-warning-title {
  margin: 0;
  color: #ff4444;
  font-weight: 600;
}

.porno-warning-text {
  margin: 8px 0 0 0;
  font-size: 13px;
  color: #999;
}

.porno-info {
  background: rgba(100, 150, 255, 0.1);
  padding: 12px;
  border-radius: 6px;
  margin-top: 15px;
  border-left: 3px solid #6496ff;
  font-size: 13px;
  color: #aaa;
}

/* ============================================================
   BOUTONS D'ACTIONS (Annuler, Appliquer, etc.)
   ============================================================ */

.admin-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
}

.admin-btn {
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-btn.cancel {
  background: #4a5568;
  color: #fff;
}

.admin-btn.cancel:hover {
  background: #2d3748;
  transform: translateY(-1px);
}

.admin-btn.apply {
  background: linear-gradient(145deg, #48bb78, #38a169);
  color: #fff;
}

.admin-btn.apply:hover {
  background: linear-gradient(145deg, #38a169, #2f855a);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.admin-btn.danger {
  background: linear-gradient(145deg, #e53e3e, #c53030);
  color: #fff;
}

.admin-btn.danger:hover {
  background: linear-gradient(145deg, #c53030, #9b2c2c);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(229, 62, 62, 0.4);
}

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

@media (max-width: 600px) {
  .admin-modal-box {
    padding: 20px;
  }
  
  .admin-menu-buttons {
    grid-template-columns: 1fr;
  }
  
  .admin-menu-btn:nth-child(3) {
    grid-column: 1;
  }
  
  .admin-badge {
    width: 18px;
    height: 18px;
    margin-right: 4px;
  }
}

/* ============================================================
   BOUTON PROFIL
   ============================================================ */

.admin-profile-btn {
  width: 100%;
  padding: 15px 20px;
  background: linear-gradient(145deg, #4299e1, #3182ce);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.admin-profile-btn:hover {
  background: linear-gradient(145deg, #3182ce, #2c5282);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(66, 153, 225, 0.4);
}

.admin-profile-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
}

/* Style pour le bouton Profil dans le menu principal */
.admin-menu-btn.profile {
  background: linear-gradient(145deg, #4299e1, #3182ce);
  border-color: #90cdf4;
}

.admin-menu-btn.profile:hover {
  background: linear-gradient(145deg, #3182ce, #2c5282);
  border-color: #bee3f8;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(66, 153, 225, 0.5);
}
