/* Général */
body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  background-color: white;
  color: #333; /* Texte foncé pour bien contraster */
}

/* Style des liens */
a {
  text-decoration: none;
  color: #ff0000; /* Rouge vif pour les liens */
  font-size: 1rem;
  margin-bottom: 20px;
  transition: color 0.3s;
}

a:hover {
  color: #d10000; /* Rouge plus foncé pour le hover */
}

/*------------------------------------*\
      NAVBAR
\*------------------------------------*/
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-family: 'Inter', sans-serif;
}

.nav-logo {
  height: 30px;
  width: auto;
}

.left {
  flex: 1;
  text-align: left;
}

.menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

.center {
  flex: 1;
  text-align: center;
  font-family: 'Anton', sans-serif;
  font-size: 24px;
  font-weight: 400;
}

.right {
  flex: 1;
  text-align: right;
}

.right a {
  margin-left: 15px;
  text-decoration: none;
  color: black;
  font-size: 16px;
  font-weight: 400;
}

nav a {
  position: relative;
  text-decoration: none;
  color: black;
  padding: 5px 10px;
  transition: color 0.3s ease-in-out;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background: black;
  transform: scaleX(0);
  transition: transform 0.3s ease-in-out;
}

nav a:hover {
  stroke: black;
}

nav a:hover::after {
  transform: scaleX(1);
}

nav a.active {
  color: red;
}

nav a#home-link.clicked {
  color: black !important;
}

/* Sur les écrans, quand la largeur de la fenêtre fait au maximum 1280px */
@media screen and (max-width: 1280px) {
  nav {
    padding: 15px;
  }
  .center {
    font-size: 22px;
  }
}

/* Sur tous types d'écran, quand la largeur de la fenêtre est comprise entre 1024px et 1280px */
@media all and (min-width: 1024px) and (max-width: 1280px) {
  .center {
    font-size: 22px;
  }
}

/* Sur tous types d'écrans orientés verticalement */
@media all and (orientation: portrait) {
  .center {
    display: none;
  }
  .nav-logo {
    height: 30px;
  }

  .menu-toggle {
    display: block;
  }

  .right {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 20px;
    background: white;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    padding: 10px;
  }

  .right.active {
    display: flex;
  }

  .right a {
    display: block;
    margin: 10px 0;
  }
}


/* Conteneur du formulaire */
.form-container {
  max-width: 700px;
  margin: 5vh auto;
  padding: 30px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
}

h1 {
  font-family: 'Anton', sans-serif;
  font-size: 2rem;
  color: #333;
  margin-bottom: 20px;
}

p {
  font-size: 1.1rem;
  color: #555;
}

/* Style des champs du formulaire */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

input[type="text"],
input[type="number"],
select,
input[type="file"] {
  width: 90%;
  padding: 12px;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 6px;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
input[type="file"]:focus {
  border-color: red;
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.2);
}

/* Bouton de soumission */
input[type="submit"] {
  width: 90%;
  background-color: #ff0000; /* Rouge vif pour les boutons */
  color: white;
  padding: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

input[type="submit"]:hover {
  background-color: #d10000; /* Rouge plus foncé pour le hover */
}

input[type="submit"]:active {
  transform: scale(0.98);
}

/* Style des messages */
h2 {
  color: #4CAF50;
  font-size: 1.5rem;
  margin-top: 20px;
}

/* Catalogue des albums */
.catalogue-title {
  text-align: center;
  font-size: 24px;
  margin-top: 30px;
  color: #333;
}

/* Conteneur des albums */
.catalogue-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
  justify-items: center;
}

.catalogue-item {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  padding: 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 250px;
  height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.catalogue-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.catalogue-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 15px;
}

.catalogue-item h3 {
  font-size: 18px;
  font-weight: bold;
  margin: 10px 0;
  color: #333;
}

.catalogue-item p {
  font-size: 14px;
  margin: 5px 0;
  color: #555;
}

/* Responsive : 1 colonne sur mobile */
@media (max-width: 768px) {
  .catalogue-container {
    grid-template-columns: repeat(1, 1fr);
  }
}

.admin-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

/* Style des boutons admin */
.admin-buttons a {
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  background-color: #ff0000; /* Rouge vif pour les boutons admin */
  padding: 12px 30px;
  border-radius: 8px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.admin-buttons a:hover {
  background-color: #d10000; /* Rouge plus foncé pour le hover */
}

.admin-buttons a:active {
  transform: scale(0.95);
}

/* Responsive */
@media (max-width: 576px) {
  .admin-buttons {
    flex-direction: column;
    align-items: center;
  }

  .admin-buttons a {
    width: 80%;
    text-align: center;
  }
}

/* ----- Liens et boutons ----- */
.btn {
  text-decoration: none;
  font-size: 1rem;
  font-weight: bold;
  padding: 10px 15px;
  border-radius: 5px;
  transition: background 0.3s, transform 0.2s;
  display: inline-block;
}

/* Bouton retour */
.btn-retour {
  background-color: #ff0000;
  color: white;
}

.btn-retour:hover {
  background-color: #d10000;
  transform: scale(1.05);
}

/* Bouton ajouter */
.btn-ajouter {
  background-color: #28a745;
  color: white;
}

.btn-ajouter:hover {
  background-color: #218838;
  transform: scale(1.05);
}

/* Boutons Supprimer & Modifier */
.btn-supprimer {
  background-color: #dc3545;
  color: white;
  padding: 6px 12px;
}

.btn-supprimer:hover {
  background-color: #c82333;
}

.btn-modifier {
  background-color: #ffc107;
  color: black;
  padding: 6px 12px;
}

.btn-modifier:hover {
  background-color: #e0a800;
}

/* ----- Titre ----- */
.page-title {
  font-family: 'Anton', sans-serif;
  font-size: 2rem;
  color: #333;
  margin-bottom: 20px;
}

/* ----- Tableau ----- */
#albums-table {
  width: 100%;
  max-width: 1000px;
  margin: 20px auto;
  border-collapse: collapse;
  background-color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s ease; /* Effet d'ombre douce sur le survol */
}

#albums-table thead {
  background-color: #ff0000; /* Rouge vif pour l'en-tête du tableau */
  color: white;
  font-weight: bold;
  text-transform: uppercase;
}

#albums-table th, #albums-table td {
  padding: 16px;
  border: 1px solid #ddd;
  text-align: center;
  font-size: 1rem;
  color: #333; /* Texte foncé pour un bon contraste */
}

#albums-table th {
  background-color: #ff0000; /* Rouge vif pour l'en-tête */
  color: white;
}

.album-cover {
  width: 50px; /* Taille réduite des images */
  height: 50px; /* Taille réduite des images */
  object-fit: cover;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#albums-table tbody tr:nth-child(even) {
  background-color: #f9f9f9; /* Couleur de fond plus claire pour les lignes paires */
}

#albums-table tbody tr:hover {
  background-color: #f2f2f2; /* Légère couleur de survol */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1); /* Effet d'ombre sur le survol */
}

#albums-table tbody tr td {
  vertical-align: middle; /* Aligner le contenu verticalement */
}

#albums-table tbody tr:hover .album-cover {
  transform: scale(1.05); /* Zoom sur l'image lors du survol */
}

.error-message {
  color: red;
  font-weight: bold;
}

/* Style des liens */
a {
  text-decoration: none;
  color: #ff0000; /* Rouge vif pour les liens */
  font-size: 1rem;
  margin-bottom: 20px;
  transition: color 0.3s;
}

a:hover {
  color: #d10000; /* Rouge plus foncé pour le hover */
}

/* Titre principal */
h1 {
  text-align: center;
  font-family: 'Anton', sans-serif;
  font-size: 2.5rem;
  margin: 20px 0;
  color: #333;
}

/* Titre du tableau */
table {
  width: 90%;
  margin: 20px auto;
  border-collapse: collapse;
  background-color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

th, td {
  padding: 15px;
  border: 1px solid #ddd;
  text-align: center;
  font-size: 1rem;
  color: #333;
}

thead {
  background-color: #ff0000;
  color: white;
}

thead th {
  text-transform: uppercase;
}

tr:nth-child(even) {
  background-color: #f9f9f9;
}

tr:hover {
  background-color: #f2f2f2;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 5px;
}

/* Liens dans le tableau */
.table-link {
  color: #ff0000;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
}

.table-link:hover {
  background-color: #f2f2f2;
  transform: scale(1.05);
}

/* Ajout de son */
.add-sound-link {
  display: block;
  text-align: center;
  background-color: #28a745;
  color: white;
  padding: 12px 30px;
  font-size: 1.2rem;
  border-radius: 8px;
  margin: 20px auto;
  width: 200px;
  transition: background 0.3s, transform 0.2s;
}

.add-sound-link:hover {
  background-color: #218838;
  transform: scale(1.05);
}

hr {
  border: 1px solid #ddd;
  margin: 20px 0;
}

/* Responsive : 1 colonne sur mobile */
@media (max-width: 768px) {
  table {
    width: 100%;
  }

  td, th {
    padding: 10px;
    font-size: 0.9rem;
  }
}
