/* Barre en haut collée et visible au scroll */
.main-header {
  position: sticky;  /* Ou fixed si tu veux qu’elle soit toujours visible */
  top: 0;
  z-index: 1000;
  background-color: #111;
  color: white;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Titre à gauche */
.logo {
  margin: 0;
  font-size: 24px;
  color: #e50914;
}

/* Pseudo + bouton à droite */
.user-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-name {
  font-size: 14px;
  color: #fff;
}

.bloodpoints {
  color: #fff;
  font-size: 14px;
  margin-left: 10px;
}

/* Formulaire de déconnexion */
.logout-form button {
  background-color: #e50914;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.logout-form button:hover {
  background-color: #c40812;
}

.title {
    color: #e63946; /* Titre en rouge */
}

/* Style des tableaux */
.table-container {
    margin: 20px 0;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.custom-table th,
.custom-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #444; /* Bordures plus foncées */
}

.custom-table th {
    background-color: #e63946; /* Fond rouge pour l'en-tête */
    color: white;
    text-transform: uppercase;
}

.custom-table tr:nth-child(even) {
    background-color: #333; /* Lignes paires en gris foncé */
}

.custom-table tr:hover {
    background-color: #444; /* Changement de couleur au survol */
}

/* Style des formulaires */
.form-container {
    margin: 20px 0;
    background-color: #222; /* Fond sombre pour les formulaires */
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.form-input,
.form-select {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #555; /* Bordure sombre */
    border-radius: 5px;
    background-color: #333; /* Fond sombre */
    color: #f0f0f0; /* Texte en blanc */
}

.form-button {
    background-color: #e63946; /* Fond rouge pour les boutons */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.form-button:hover {
    background-color: #d62828; /* Rouge plus foncé au survol */
}

/* Style des cases à cocher */
.checkbox-input {
    transform: scale(1.2);
}

/* Style pour les images */
.image-preview {
    max-width: 100px;
    height: auto;
    border-radius: 5px;
}

/* Ajout d'un bouton de suppression */
.delete-button {
    background-color: #ff4c4c; /* Fond rouge clair pour supprimer */
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
}

.delete-button:hover {
    background-color: #e60000; /* Fond rouge foncé au survol */
}

/* Ajustement de l'apparence des cartes */
.object-card,
.lieu-card {
    width: 200px;
    border: 2px solid #555; /* Bordure sombre */
    border-radius: 10px;
    background-color: #222; /* Fond sombre */
    padding: 15px;
    text-align: center;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.object-card:hover,
.lieu-card:hover {
    transform: scale(1.03);
    border-color: #e63946; /* Bordure rouge au survol */
}

/* Message de blocage */
.message-blocked {
    background-color: #661111; /* Fond rouge sombre */
    border: 1px solid #aa0000; /* Bordure rouge clair */
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    color: #fff;
}

/* Formulaire de réservation */
form {
    margin-top: 20px;
}

form input[type="date"] {
    padding: 10px;
    font-size: 16px;
    border-radius: 4px;
    border: 1px solid #555;
    margin-bottom: 20px;
}

form input[type="date"]:focus {
    outline: none;
    border: 1px solid #e63946; /* Bordure rouge au focus */
}

/* Styles supplémentaires */
#categorie-select,
button {
    margin-top: 20px;
}

#categorie-select {
    background-color: #333; /* Fond sombre pour le select */
    color: #f0f0f0; /* Texte en blanc */
}

/* Style pour la section des utilisateurs */
.user-list {
    margin-top: 40px;
    padding: 20px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
}

/* Style du tableau des utilisateurs */
.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.user-table th, .user-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #444;
    color: #f0f0f0;
}

.user-table th {
    background-color: #e50914; /* Rouge */
    color: #fff;
    text-transform: uppercase;
}

.user-table tr:nth-child(even) {
    background-color: #222;
}

.user-table tr:hover {
    background-color: #333; /* Un peu plus clair au survol */
}

.user-table td {
    background-color: #333;
}

/* Style pour les utilisateurs bloqués */
.user-table td.bloque {
    color: #e50914;
    font-weight: bold;
}

/* Section avec un fond sombre et bordures claires */
.user-list h2 {
    color: #e50914;  /* Rouge pour le titre */
    font-size: 24px;
}


body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #111;
  color: #f0f0f0;
  padding: 0 10px;
}

h2, h3 {
  color: #e63946;
}

select, button, input[type="date"] {
  margin-top: 10px;
  padding: 5px;
  background-color: #333;
  color: #f0f0f0;
  border: 1px solid #555;
  border-radius: 4px;
}

button {
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #444;
}

.object-grid, .lieu-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
  margin-top: 20px;
}

.categorie-groupe {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
}

.object-card, .lieu-card {
  border: 2px solid #555;
  border-radius: 10px;
  background-color: #222;
  padding: 15px;
  text-align: center;
  width: 200px;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.object-card:hover,
.lieu-card:hover {
  transform: scale(1.03);
  border-color: #e63946;
}

.object-card img,
.lieu-card img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  margin-bottom: 10px;
}

.object-card input[type="radio"],
.lieu-card input[type="radio"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.object-card input[disabled] + img {
  filter: grayscale(100%) brightness(50%);
  cursor: not-allowed;
}

.object-card input[disabled] {
  cursor: not-allowed;
}

.message-blocked {
  background-color: #661111;
  border: 1px solid #aa0000;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  color: #fff;
}

/* Ajustement pour garantir que les cartes se placent correctement */
@media (max-width: 768px) {
  .object-card, .lieu-card {
    width: 45%; /* Prendre 45% de la largeur sur des écrans plus petits */
  }
}

@media (max-width: 480px) {
  .object-card, .lieu-card {
    width: 100%; /* Prendre 100% de la largeur sur des écrans très petits */
  }
}

/* Styles spécifiques à la page accueil_auth.php */
body.accueil-auth {
  display: flex;
  justify-content: center;  /* Centrer horizontalement */
  align-items: center;      /* Centrer verticalement */
  height: 100vh;            /* Prendre toute la hauteur de la fenêtre */
  margin: 0;                /* Enlever les marges par défaut */
}

.accueil-auth .container {
  text-align: center;           /* Centrer le texte à l'intérieur */
  background-color: #333;       /* Couleur de fond */
  padding: 20px;                /* Espacement interne */
  border-radius: 10px;          /* Coins arrondis */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);  /* Ombre portée */
  width: 100%;
  max-width: 600px;             /* Limiter la largeur */
}

.accueil-auth .image-container img {
  max-width: 100%;    /* Adapter l'image à la taille du conteneur */
  height: auto;       /* Garder le ratio de l'image */
  border-radius: 10px;
  margin-bottom: 20px; /* Espacement sous l'image */
}

.accueil-auth .btn {
  display: inline-block;
  padding: 10px 20px;
  margin: 10px;
  background-color: #e63946;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.accueil-auth .btn:hover {
  background-color: #d62828; /* Changer la couleur au survol */
}

.accueil-auth .container form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

/* Harmonise les titres de section */
section {
  margin-top: 40px;
  padding: 20px;
  background-color: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.6);
}

/* Espacement des paragraphes d’intro */
.container > p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 30px;
}

/* Ajout de marge sous les boutons */
form button {
  margin-top: 15px;
}

/* Style pour les filtres (ex: catégories) */
#categorie-select {
  width: 200px;
  margin-bottom: 20px;
}

/* Alignement propre de la liste des réservations */
section ul {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}

section ul li {
  background-color: #222;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 6px;
  border: 1px solid #333;
}

/* Bouton de retour intégré à la ligne */
section ul li form button {
  margin-left: 10px;
  padding: 3px 8px;
  font-size: 13px;
  background-color: #e63946;
  border-radius: 4px;
}

section ul li form button:hover {
  background-color: #c92a2a;
}

/* Section de réservation d'objet */
.section-reservation-objet,
.section-reservation-lieu {
    margin-bottom: 40px;
}

.section-reservation-objet h3,
.section-reservation-lieu h3 {
    font-size: 22px;
    color: #e63946;
}

.object-grid,
.lieu-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
    margin-top: 20px;
}

.categorie-groupe {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.object-card,
.lieu-card {
    width: 200px;
    border: 2px solid #555;
    border-radius: 10px;
    background-color: #222;
    padding: 15px;
    text-align: center;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.object-card:hover,
.lieu-card:hover {
    transform: scale(1.03);
    border-color: #e63946;
}

.object-card {
    border: 2px solid transparent;
    padding: 10px;
    border-radius: 10px;
    transition: border 0.3s ease;
    cursor: pointer;
}

.object-card img,
.lieu-card img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
}

.object-card input[type="radio"],
.lieu-card input[type="radio"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.object-card:has(input[type="radio"]:checked),
.lieu-card:has(input[type="radio"]:checked) {
  border: 2px solid red;
}

.object-card input[disabled] + img {
    filter: grayscale(100%) brightness(50%);
    cursor: not-allowed;
}

.object-card input[disabled] {
    cursor: not-allowed;
}

/* Message de blocage */
.message-blocked {
    background-color: #661111;
    border: 1px solid #aa0000;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    color: #fff;
}

/* Ajustement pour garantir que les cartes se placent correctement */
@media (max-width: 768px) {
    .object-card, .lieu-card {
        width: 45%; /* Prendre 45% de la largeur sur des écrans plus petits */
    }
}

@media (max-width: 480px) {
    .object-card, .lieu-card {
        width: 100%; /* Prendre 100% de la largeur sur des écrans très petits */
    }
}

/* Formulaire de réservation */
form {
    margin-top: 20px;
}

form input[type="date"] {
    padding: 10px;
    font-size: 16px;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
}

form input[type="date"]:focus {
    outline: none;
    border: 1px solid #28a745;
}

/* Styles supplémentaires */
#categorie-select,
button {
    margin-top: 20px;
}
