/* === Apparition douce === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === Cards générales === */
.pgi-card,
.pgi-card-stat,
.pgi-table-container,
.pgi-home {
  animation: fadeIn 0.6s ease-out;
}

.pgi-card {
  max-width: 500px;
  margin: 20px auto;
  padding: 25px;
  border-radius: 12px;
  background-color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}
.pgi-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.pgi-card h3 {
  font-size: 1.4em;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* === Champs et boutons === */
.pgi-card input,
.pgi-card button,
.pgi-card input[type="submit"] {
  display: block;
  width: 100%;
  margin-bottom: 15px;
  padding: 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  transition: transform 0.2s ease;
}
.pgi-card button,
.pgi-card input[type="submit"] {
  background-color: #0073aa;
  color: white;
  border: none;
  cursor: pointer;
}
.pgi-card button:hover,
.pgi-card input[type="submit"]:hover {
  background-color: #005a87;
  transform: scale(1.03);
}

/* === Bouton danger */
.pgi-danger-btn {
  background-color: #c0392b;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}
.pgi-danger-btn:hover {
  background-color: #a5281f;
  transform: scale(1.05);
}

/* === Tableau responsive === */
.pgi-table-container {
  overflow-x: auto;
  margin-top: 20px;
  padding: 0 10px;
}
table.dataTable {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}
table.dataTable thead th {
  background-color: #0073aa;
  color: white;
  padding: 12px;
  font-weight: 600;
}
table.dataTable tbody td {
  padding: 10px;
  border-top: 1px solid #eee;
}

/* === Cartes statistiques === */
.pgi-stats-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
  padding: 10px;
}
.pgi-card-stat {
  width: 260px;
  padding: 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0073aa, #00588a);
  color: white;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  text-align: center;
}
.pgi-card-stat h3 {
  font-size: 1.2em;
  margin-bottom: 10px;
}
.pgi-card-stat p {
  font-size: 1.6em;
  margin: 0;
}
.pgi-card-stat i {
  font-size: 32px;
  margin-bottom: 10px;
}

/* === Boutons admin actions === */
.action-btn {
  margin-right: 5px;
  padding: 6px 10px;
  border-radius: 6px;
  background-color: #f1f1f1;
  display: inline-block;
  transition: transform 0.2s ease, background-color 0.3s;
}
.action-btn:hover {
  background-color: #ddd;
  transform: scale(1.05);
}

/* === Responsive mobile === */
@media screen and (max-width: 600px) {
  .pgi-card,
  .pgi-card-stat,
  .pgi-home {
    width: 95%;
    padding: 15px;
  }
  .pgi-stats-container {
    flex-direction: column;
    align-items: center;
  }
  table.dataTable {
    font-size: 14px;
  }
}

/* === Page d’accueil avec image de fond === */
.pgi-home {
  background-image: url('https://tonsite.com/wp-content/uploads/2023/07/fond-invitation.jpg'); /* 🌄 à personnaliser */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1000px rgba(0,0,0,0.5);
  color: white;
  text-align: center;
  padding: 40px 20px;
}
.pgi-home h1,
.pgi-home p {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}
#pgi-menu-toggle {
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}
#pgi-mobile-menu {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#pgi-mobile-menu a {
  background: rgba(255,255,255,0.9);
  padding: 12px;
  border-radius: 8px;
  color: #333;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, background-color 0.3s;
}
#pgi-mobile-menu a:hover {
  background-color: #e0e0e0;
  transform: scale(1.02);
}

/* 🔲 Carte de scan QR */
.pgi-scan-wrapper {
  animation: fadeIn 0.6s ease-out;
}

/* 📦 Zone du scanner */
.pgi-qr-reader,
.pgi-scan-box {
  position: relative;
  width: 300px;
  height: 300px;
  max-width: 95vw;
  border: 3px solid #ffffff;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0,0,0,0.3);
  margin: 20px auto;
  overflow: hidden;
  transition: border-color 0.5s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 🚦 Barre verticale animée */
.pgi-scan-bar {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #00ffc3, #0073aa);
  transform: translateX(-50%);
  animation: scanMove 2.8s linear infinite;
  z-index: 2;
}

@keyframes scanMove {
  0%   { top: 0%; }
  50%  { top: 100%; }
  100% { top: 0%; }
}

/* 💡 Flash visuel lors du scan */
.pgi-scan-flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.5);
  animation: flashPulse 0.4s ease-out;
  border-radius: 12px;
  pointer-events: none;
}

@keyframes flashPulse {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

/* 🎬 Animation d’apparition générale */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}

