/* ============================
   SYSTEME D'AMIS
============================ */
#btn-amis {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 9999;
  width: 48px;
  height: 48px;
  background: rgba(26, 26, 46, 0.95);
  border: 2px solid #e74c3c;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
#btn-amis:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(231, 76, 60, 0.5);
}
#btn-amis svg { width: 24px; height: 24px; }
#badge-amis {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e74c3c;
  color: white;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: bold;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

#panel-amis {
  position: fixed;
  right: 0;
  top: 0;
  width: 25vw;
  min-width: 320px;
  max-width: 420px;
  height: 100vh;
  background: #1a1a2e;
  z-index: 9998;
  border-left: 3px solid #e74c3c;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  box-shadow: -5px 0 25px rgba(0,0,0,0.5);
}
.panel-amis-ferme { transform: translateX(100%); }
.panel-amis-ouvert { transform: translateX(0); }

.panel-amis-header {
  background: #2c3e50;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(231,76,60,0.3);
}
.panel-amis-header span {
  color: #ecf0f1;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 3px;
}
.panel-amis-header button {
  background: none;
  border: none;
  color: #e74c3c;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}
.panel-amis-header button:hover { background: rgba(231,76,60,0.2); }

.panel-amis-recherche {
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.panel-amis-recherche input {
  flex: 1;
  padding: 10px 14px;
  background: #2c3e50;
  border: 1px solid #566573;
  border-radius: 8px;
  color: #ecf0f1;
  font-family: Arial, sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.panel-amis-recherche input:focus { border-color: #e74c3c; }
.panel-amis-recherche input::placeholder { color: #7f8c8d; }
.panel-amis-recherche button {
  padding: 10px 16px;
  background: #e74c3c;
  border: none;
  border-radius: 8px;
  color: white;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  letter-spacing: 1px;
  transition: background 0.2s;
}
.panel-amis-recherche button:hover { background: #c0392b; }

.panel-amis-tabs {
  display: flex;
  padding: 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.tab-ami {
  flex: 1;
  padding: 12px 8px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #7f8c8d;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.2s, border-color 0.2s;
}
.tab-ami:hover { color: #bdc3c7; }
.tab-ami.active { color: #e74c3c; border-bottom-color: #e74c3c; }
.tab-ami .count-demandes {
  background: #e74c3c;
  color: white;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 8px;
  margin-left: 4px;
}

.panel-amis-liste {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  scrollbar-width: thin;
  scrollbar-color: #e74c3c transparent;
}

.ami-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 12px;
  transition: background 0.15s;
  cursor: default;
}
.ami-item:hover { background: rgba(255,255,255,0.03); }
.ami-statut-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ami-statut-dot.online { background: #2ecc71; box-shadow: 0 0 6px rgba(46,204,113,0.5); }
.ami-statut-dot.offline { background: #7f8c8d; }
.ami-pseudo {
  flex: 1;
  color: #ecf0f1;
  font-family: Arial, sans-serif;
  font-size: 14px;
}
.ami-pseudo.offline-text { color: #7f8c8d; }
.ami-btn-inviter {
  padding: 6px 12px;
  background: #3498db;
  border: none;
  border-radius: 6px;
  color: white;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.ami-btn-inviter:hover { background: #2980b9; }
.ami-btn-supprimer {
  width: 26px;
  height: 26px;
  background: transparent;
  border: 1px solid #e74c3c;
  border-radius: 50%;
  color: #e74c3c;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}
.ami-btn-supprimer:hover { background: #e74c3c; color: white; }
.ami-last-seen {
  color: #7f8c8d;
  font-size: 11px;
  font-style: italic;
  flex-shrink: 0;
}

.demande-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 10px;
}
.demande-pseudo {
  flex: 1;
  color: #f39c12;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: bold;
}
.demande-btn-accepter {
  padding: 6px 12px;
  background: #2ecc71;
  border: none;
  border-radius: 6px;
  color: white;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.demande-btn-accepter:hover { background: #27ae60; }
.demande-btn-refuser {
  padding: 6px 12px;
  background: #e74c3c;
  border: none;
  border-radius: 6px;
  color: white;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.demande-btn-refuser:hover { background: #c0392b; }

.panel-amis-vide {
  text-align: center;
  color: #566573;
  font-family: Arial, sans-serif;
  font-size: 13px;
  padding: 40px 20px;
}

/* Popup invitation recue */
#popup-invitation {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #1a1a2e;
  border: 2px solid #f39c12;
  border-radius: 12px;
  padding: 24px;
  z-index: 10000;
  display: none;
  text-align: center;
  box-shadow: 0 0 30px rgba(0,0,0,0.7);
  min-width: 300px;
}
#popup-invitation h3 {
  color: #f39c12;
  font-family: Arial, sans-serif;
  margin-bottom: 8px;
}
#popup-invitation p {
  color: #ecf0f1;
  font-family: Arial, sans-serif;
  font-size: 14px;
  margin-bottom: 16px;
}
#popup-invitation .popup-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* Overlay choix de camp espion */
#espion-choix-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.85); z-index: 10000;
  display: none; justify-content: center; align-items: center; flex-direction: column;
}
#espion-choix-overlay h2 { color: #9b59b6; font-family: Arial, sans-serif; font-size: 28px; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 3px; }
#espion-choix-overlay p { color: #ecf0f1; font-family: Arial, sans-serif; font-size: 14px; margin-bottom: 30px; }
.espion-btn-camp { padding: 15px 40px; font-size: 18px; border: none; border-radius: 10px; cursor: pointer; margin: 10px; font-weight: bold; letter-spacing: 1px; transition: transform 0.2s, box-shadow 0.2s; }
.espion-btn-camp:hover { transform: scale(1.05); box-shadow: 0 0 15px rgba(255,255,255,0.3); }
.espion-btn-virus { background: #e74c3c; color: white; }
.espion-btn-innocent { background: #27ae60; color: white; }

