
/* ===== Style global pour la section rôles ===== */
main.container {
  background: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  animation: fadeIn 0.4s ease-in;
}

/* ===== Titre ===== */
main h2 {
  font-weight: bold;
  color: #0d6efd;
  margin-bottom: 1.5rem;
  position: relative;
}

main h2::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 4px;
  background: #0d6efd;
  bottom: -10px;
  left: 0;
  border-radius: 2px;
}

/* ===== Formulaire ===== */
#roleForm input {
  transition: box-shadow 0.3s ease;
}

#roleForm input:focus {
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  border-color: #0d6efd;
}

#roleForm button {
  transition: background-color 0.3s ease, transform 0.2s ease-in-out;
}

.visually-hidden {
  position: absolute;
  left: -9999px;
}

#roleForm button:hover {
  transform: scale(1.03);
}

/* ===== Liste des rôles ===== */
#listeRoles {
  animation: fadeSlideUp 0.4s ease-in;
}

#listeRoles li {
  background-color: #f8f9fa;
  border-left: 5px solid #0d6efd;
  margin-bottom: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s;
}

#listeRoles li:hover {
  background-color: #e9ecef;
}

#listeRoles li button {
  transition: transform 0.2s ease;
}

#listeRoles li button:hover {
  transform: scale(1.1);
}

/* ===== Animation ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideUp {
  0%   { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 576px) {
  #roleForm {
    flex-direction: column;
  }

  #roleForm input,
  #roleForm button {
    width: 100%;
  }
}
