/* === CONTENEUR PRINCIPAL === */
.corpsAdminTheme {
  margin-top: 80px;
  margin-bottom: 10px;
  background-color: #0e0e0e;
  color: #ffffff;
  font-family: 'Segoe UI', sans-serif;
}

/* === SIDEBAR === */
.sidebar {
  width: 200px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  padding: 15px;
  background-color: #111;
  border-right: 1px solid #2a2a2a;
  color: #fff;
  overflow-y: auto;
}
.abonnes-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.abonnes-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
}

.abonnes-info a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

.abonnes-info a:hover {
  text-decoration: underline;
}

/* === CONTENU DROIT === */
.adminThemeDroit {
  flex: 1;
  margin-left: 200px;
  padding: 20px;
  min-height: 100vh;
  background-color: #0e0e0e;
  display: flex;
  flex-direction: column;
}
.modale-theme-img-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modale-theme-img {
  background-color: #1a1a1a;
  border-radius: 12px;
  padding: 25px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 0 10px #9146FF;
  position: relative;
  color: #fff;
}

.modale-theme-img-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.modale-theme-img-close {
  cursor: pointer;
  font-size: 1.6em;
  color: #ccc;
}

.modale-theme-img-close:hover {
  color: #fff;
}

.upload-label {
  font-weight: 500;
  color: #ccc;
  margin-bottom: 6px;
  display: block;
}

.modale-theme-img input[type="file"] {
  padding: 8px;
  background: #222;
  border: 1px solid #444;
  border-radius: 8px;
  color: #fff;
  width: 100%;
}

.modale-theme-img-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 20px;
  gap: 10px;
}

.btn-theme-upload {
  background-color: #9146FF;
  border: none;
  padding: 8px 16px;
  color: white;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.btn-theme-cancel {
  background-color: transparent;
  border: 1px solid #9146FF;
  color: #9146FF;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-theme-upload:hover,
.btn-theme-cancel:hover {
  opacity: 0.85;
}


/* === TITRE SECTION === */
.theme-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1e1e1e;
  border: 1px solid #2c2c2c;
  border-radius: 10px;
  padding: 15px 20px;
  margin-bottom: 20px;
  transition: transform 0.2s ease-in-out;
}

.theme-section h2 {
  font-size: 18px;
  font-weight: bold;
  color: #ffffff;
  background: #151515;
  padding: 8px 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: inset 3px 0 0 #8b5cf6;
}

.theme-section h2::before {
  content: "🎨";
  font-size: 20px;
}

/* === BOUTON AJOUT === */
.btn-open-theme-modal {
  background: #8b5cf6;
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.btn-open-theme-modal:hover {
  background: #6d28d9;
  transform: translateY(-2px);
}

/* === TABLE DES THEMES === */
.theme-table {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* === CARTE DE THEME === */
.theme-card {
  background: #1b1b1b;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.theme-card:hover {
  transform: translateY(-5px);
}

.theme-name {
  font-size: 20px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 8px;
}

/* === LIEN MODIFIER === */
.theme-card a {
  color: #8b5cf6;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
}

.theme-card a:hover {
  color: #a78bfa;
  text-decoration: underline;
}

/* === LISTE DES SOUS-THEMES === */
.sous-theme-list {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.sous-theme-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  border-bottom: 1px solid #333;
  color: #ccc;
}

.sous-theme-item:last-child {
  border-bottom: none;
}

/* === ICONES === */
.editSousTheme img,
.deleteSousTheme {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin-left: 10px;
  filter: brightness(0.8);
  transition: transform 0.2s;
}

.editSousTheme img:hover,
.deleteSousTheme:hover {
  transform: scale(1.2);
  filter: brightness(1.2);
}

/* === MODALES === */
.theme-modal,
.stSug-modal,
.editSousTheme-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  align-items: center;
  justify-content: center;
}

/* === CONTENU MODALE === */
.theme-modal-content,
.stSug-modal-content,
.editSousTheme-modal-content {
  background: #1e1e1e;
  padding: 25px;
  border-radius: 12px;
  max-width: 90%;
  width: 400px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  animation: fadeIn 0.3s ease-in-out;
  position: relative;
  text-align: center;
}

/* === ANIMATION === */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

/* === CLOSE MODALE === */
.theme-modal-close,
.stSug-modal-close,
.editSousTheme-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  color: #ccc;
}

.theme-modal-close:hover,
.stSug-modal-close:hover,
.editSousTheme-modal-close:hover {
  color: #f87171;
}

/* === FORM INPUT === */
.theme-input,
.stSug-input,
.editSousTheme-input {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  background: #262626;
  color: #fff;
  border: 1px solid #444;
  border-radius: 6px;
  font-size: 16px;
}

.theme-input:focus,
.stSug-input:focus,
.editSousTheme-input:focus {
  border-color: #8b5cf6;
  outline: none;
}

/* === BOUTONS === */
.btn-theme-add,
.stSug-btn,
.editSousTheme-btn {
  background: #8b5cf6;
  color: white;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-theme-add:hover,
.stSug-btn:hover,
.editSousTheme-btn:hover {
  background: #6d28d9;
  transform: translateY(-2px);
}


/* === RESPONSIVE === */
@media (max-width: 768px) {
  .theme-table {
    grid-template-columns: 1fr;
  }
}
