/* Centrer la table des modules et limiter la largeur */
#center-table {
  margin: 2rem auto;
  width: 100%;
  max-width: 1500px;
  border-collapse: separate;
  border-spacing: 0 0.5rem;
}

/* Espacement entre les champs du tableau (inputs, textarea) */
#center-table td {
  padding: 0.5rem 0.7rem;
  vertical-align: middle;
}
#center-table input,
#center-table textarea {
  margin: 0.2rem 0;
  width: 100%;
  box-sizing: border-box;
  border-radius: 4px;
  border: 1px solid #ddd;
  padding: 0.3rem 0.5rem;
}
#center-table tr {
  background: #fff;
}
#center-table tr + tr {
  border-top: 1px solid #eee;
}
:root {
  --primary-container: #9cc127;
  --secondary: #8c1d82;
  --secondary-container: #454696;
  --tertiary: #fab800;
  --tertiary-container: #eb6a27;
  --error: #e2002b;
}

/* Main menu active button */

/* Active button: priorité sur le style même si button-outline */
.main-menu button.active {
  background: var(--secondary-container) !important;
  color: #fff !important;
  border: 2px solid var(--secondary-container) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Header and main menu */
header,
.main-menu {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Main menu links and buttons */
.main-menu a,
.main-menu button {
  color: #fff;
  background: var(--primary-container);
  border: none;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  transition: background 0.2s;
  cursor: pointer;
  font-size: 1rem;
  margin: 0;
  outline: none;
  display: inline-block;
  margin-bottom: 1rem;
}

/* Active and hover states */
.main-menu a.active,
.main-menu a:hover,
.main-menu button:hover {
  background: var(--secondary-container);
}

/* Delete button */
.delete-btn {
  background: var(--error) !important;
}

/* General button styles */
button {
  padding: 0.5rem;
  background: var(--primary-container);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin: 0;
}
button:hover {
  background: var(--secondary-container);
}

/* Outline button style */
.button-outline {
  background: transparent !important;
  color: var(--secondary-container) !important;
  border: 2px solid var(--secondary-container) !important;
  box-shadow: none;
}
.button-icon {
  padding: 0.2rem 0.4rem !important;
  margin-bottom: 0.5rem !important;
}

.button-outline:hover,
.button-outline:focus {
  background: var(--secondary-container) !important;
  color: #fff !important;
}

/* Other unchanged styles... */
body {
  font-family: Arial, sans-serif;
  background: #f7f7f7;
  margin: 0;
  padding: 0;
}
h1 {
  color: var(--secondary-container);
  text-align: center;
  margin-top: 2rem;
}
h2 {
  color: var(--secondary);
  text-align: center;
  margin-top: 1rem;
}
form,
#catalog-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 1200px;
  margin: 1rem auto;
}

@media (min-width: 768px) {
  #catalog-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.catalog-item {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#subscription-list {
  max-width: 400px;
  margin: 2rem auto;
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
label {
  display: block;
  margin-top: 1rem;
}
input {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.5rem;
}
#catalog-list .edit-catalog-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-direction: column;
}

#login-message {
  color: var(--error);
  text-align: center;
  margin-top: 1rem;
}

#back-btn {
  margin-right: 1rem;
}

.main-menu a.button-outline.active {
  background: var(--secondary-container) !important;
  color: #fff !important;
  border: 2px solid var(--secondary-container) !important;
}

/* Snackbar styles */
#snackbar {
  visibility: hidden;
  min-width: 250px;
  margin-left: -125px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 2px;
  padding: 16px;
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: 30px;
  font-size: 17px;
}
#snackbar.show {
  visibility: visible;
  -webkit-animation:
    fadein 0.5s,
    fadeout 0.5s 2.5s;
  animation:
    fadein 0.5s,
    fadeout 0.5s 2.5s;
}
@-webkit-keyframes fadein {
  from {
    bottom: 0;
    opacity: 0;
  }
  to {
    bottom: 30px;
    opacity: 1;
  }
}
@keyframes fadein {
  from {
    bottom: 0;
    opacity: 0;
  }
  to {
    bottom: 30px;
    opacity: 1;
  }
}
@-webkit-keyframes fadeout {
  from {
    bottom: 30px;
    opacity: 1;
  }
  to {
    bottom: 0;
    opacity: 0;
  }
}
@keyframes fadeout {
  from {
    bottom: 30px;
    opacity: 1;
  }
  to {
    bottom: 0;
    opacity: 0;
  }
}
