/* Structure générale */
body {
  font-family: sans-serif;
  background-color: #181818;
  color: #f0f0f0;
  margin: 2rem;
}

/* Liens */
a {
  color: #4ea3ff;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Barre de navigation */
.navbar {
  background-color: #1e1e1e;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #444;
}

/* Cartes */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.card {
  background: #2a2a2a;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 0 5px #000;
}
.card img {
  max-width: 100%;
  border-radius: 5px;
}
.card h3 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

/* Formulaires */
form {
  background: #2a2a2a;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 0 5px #000;
}

input[type="text"],
input[type="url"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.2rem;
  margin-bottom: 1rem;
  border: 1px solid #555;
  border-radius: 5px;
  background-color: #222;
  color: #eee;
  box-sizing: border-box;
}

/* Boutons */
button {
  background-color: #3c6e71;
  color: white;
  border: none;
  padding: 0.7rem 1.2rem;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
}
button:hover {
  background-color: #4f8a8b;
}

/* Dashboard & filtres */
.filters,
.dashboard {
  background-color: #2a2a2a;
  color: #f0f0f0;
  box-shadow: 0 0 5px #000;
  padding: 1rem;
  border-radius: 10px;
  max-width: 700px;
  margin: 2rem auto;
}

.dashboard ul {
  list-style: none;
  padding-left: 0;
}

.pagination {
  text-align: center;
  margin-top: 2rem;
}
.pagination a,
.pagination strong {
  margin: 0 5px;
}
.dashboard a {
  color: #4ea3ff;
  text-decoration: none;
}
.dashboard a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .navbar {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  form,
  .filters,
  .dashboard {
    padding: 1rem 0.8rem;
    margin: 1rem;
  }

  .card {
    padding: 1rem 0.8rem;
  }
}

/* Favoris */
.favorite-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: gold;
}
.favorite-btn:hover {
  transform: scale(1.2);
}

/* Style du bouton Supprimer */
.delete-link {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  margin-left: 0.5rem;
  color: #e74c3c;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  vertical-align: middle;
}

.delete-link:hover {
  color: #ff6b6b;
  text-decoration: underline;
}

/* Bouton supprimer */
.inline-form {
  all: unset;
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
}

/* Reset total du bouton style lien */
.link-delete {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin-left: 0.5rem;
  font: inherit;
  font-size: 1rem;
  color: #e74c3c;
  cursor: pointer;
  text-decoration: none;
  display: inline;
  line-height: 1;
}

/* Comportement au survol */
.link-delete:hover {
  color: #ff6b6b;
  text-decoration: underline;
}

/* Supprime focus/clic (même visuels natifs) */
.link-delete:focus,
.link-delete:focus-visible,
.link-delete:active {
  outline: none !important;
  box-shadow: none !important;
  background-color: transparent !important;
  color: #e74c3c !important;
}

.inline-stats-row {
  display: flex;
  justify-content: start;
  gap: 16px;
  align-items: center;
  margin: 0.5rem 0;
  flex-wrap: wrap;
}

.inline-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.plus-btn {
  padding: 2px 6px;
  font-size: 12px;
  background-color: #4d8a91;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  height: 22px;
}

.plus-btn:hover {
  background-color: #3c6d72;
}
