/* ================================================================
   GDS (Gestion Du Site) — Styles partagés
   Espace mémoriel Delacroix · Version statique de démonstration
   ================================================================ */

/* --- POLICES --------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Aboreto&family=Abhaya+Libre:wght@400;600;800&family=Inter:wght@400;500;600;700&display=swap');

/* --- CORPS / FOND -------------------------------------------- */
body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f5f5f5 100%);
  min-height: 100vh;
  color: #1a1a1a;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(212,175,55,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,175,55,0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

/* --- HEADER (dark override sur fond clair) ------------------- */
header { background: #1a1a1a; }
header .close { background: #1a1a1a !important; backdrop-filter: none !important; }
header .open  { background: #1a1a1a !important; backdrop-filter: none !important; }
header .close img { height: 30px; object-fit: contain; }
header .open  img { height: 50px; object-fit: contain; }
header .close p   { color: #d4af37; }
.back-to-memory {
  padding: 8px 16px;
  background: linear-gradient(135deg, #d4af37 0%, #c19b2a 100%);
  color: #1a1a1a !important;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.3s;
}
.back-to-memory:hover { opacity: 0.85; }

/* --- CONTENEUR PRINCIPAL ------------------------------------ */
.gds-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 1;
}

/* --- CARTE UTILISATEUR (dashboard) -------------------------- */
.user-info-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.25rem 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border-left: 4px solid #d4af37;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.user-avatar {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, #d4af37 0%, #c19b2a 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.user-info-text h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 2px; }
.user-info-text p  { font-size: 0.9rem; color: #666; }
.user-role-badge {
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, #d4af37 0%, #c19b2a 100%);
  color: #1a1a1a;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* --- EN-TÊTE DE SECTION ------------------------------------- */
.dashboard-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.dashboard-header h1 {
  font-family: 'Aboreto', serif;
  font-size: 2.5rem;
  font-weight: 400;
  color: #1a1a1a;
  display: inline-block;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #d4af37;
  margin-bottom: 0.75rem;
}
.dashboard-header p { font-size: 1rem; color: #666; }

/* --- GRILLE STATS DASHBOARD --------------------------------- */
.stats-section h2,
.actions-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.stats-section h2::after,
.actions-section h2::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, #d4af37 0%, transparent 100%);
  border-radius: 1px;
}
.stats-grid-dash {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.stat-card-dash {
  background: #fff;
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border-top: 4px solid transparent;
  transition: all 0.3s ease;
}
.stat-card-dash:hover {
  border-top-color: #d4af37;
  box-shadow: 0 8px 30px rgba(212,175,55,0.25);
  transform: translateY(-2px);
}
.stat-icon-dash {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, #d4af37 0%, #c19b2a 100%);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}
.stat-content-dash h3  { font-size: 1rem; font-weight: 600; color: #666; margin-bottom: 4px; }
.stat-value-dash { font-size: 2.25rem; font-weight: 800; color: #1a1a1a; line-height: 1; margin-bottom: 4px; }
.stat-sub-dash  { font-size: 0.82rem; color: #888; }

/* --- GRILLE ACTIONS DASHBOARD ------------------------------- */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.action-card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  text-decoration: none;
  color: #1a1a1a;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  display: block;
}
.action-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, #d4af37 0%, #c19b2a 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.action-card:hover::before { transform: scaleX(1); }
.action-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(212,175,55,0.3);
}
.action-card .badge {
  position: absolute;
  top: 1rem; right: 1rem;
  background: #e74c3c;
  color: #fff;
  border-radius: 50%;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
  animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
  0%,100% { box-shadow: 0 0 0 0 rgba(231,76,60,0.4); }
  50%      { box-shadow: 0 0 0 6px rgba(231,76,60,0); }
}
.action-card .card-icon  { font-size: 2.5rem; margin-bottom: 1rem; }
.action-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.action-card p  { font-size: 0.9rem; color: #666; line-height: 1.6; }

/* --- EN-TÊTE PAGE DE MODÉRATION ----------------------------- */
.page-header {
  text-align: center;
  margin-bottom: 2rem;
}
.page-header h1 {
  font-family: 'Aboreto', serif;
  font-size: 2rem;
  font-weight: 400;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.page-header p { font-size: 1rem; color: #666; }

/* --- STATS (pages modération) ------------------------------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-box {
  background: #fff;
  padding: 1.25rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  text-align: center;
  border-left: 4px solid #007bff;
  transition: transform 0.3s;
}
.stat-box:hover { transform: translateY(-2px); }
.stat-box.total    { border-left-color: #007bff; }
.stat-box.pending  { border-left-color: #ffc107; }
.stat-box.valid    { border-left-color: #28a745; }
.stat-box.rejected { border-left-color: #dc3545; }
.stat-box .stat-label {
  display: block;
  font-size: 0.78rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.stat-box .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: #1a1a1a;
}

/* --- CONTRÔLES (filtres + recherche) ------------------------ */
.controls-bar {
  background: #fff;
  padding: 1.25rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  margin-bottom: 2rem;
}
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}
.filter-tab {
  padding: 0.6rem 1.25rem;
  border: 2px solid #e0e0e0;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s;
  color: #666;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.filter-tab:hover { border-color: #007bff; color: #007bff; background: #f8f9fa; }
.filter-tab.active {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border-color: #007bff;
  color: #fff;
  box-shadow: 0 3px 8px rgba(0,123,255,0.3);
}
.search-box {
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 0.7rem 2.5rem 0.7rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.92rem;
  transition: all 0.3s;
}
.search-box input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}
.search-box .search-icon {
  position: absolute;
  right: 1rem; top: 50%;
  transform: translateY(-50%);
  color: #999;
}

/* --- GRILLES DE CARTES DE MODÉRATION ----------------------- */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.item-card {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  border: 1px solid #eee;
}
.item-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.item-card h3 {
  font-family: 'Aboreto', serif;
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}
.item-card h4 { font-size: 1rem; color: #555; margin-bottom: 0.5rem; }
.item-card p  { font-size: 0.9rem; color: #555; line-height: 1.6; margin-bottom: 0.4rem; }
.item-card small { font-size: 0.82rem; color: #999; display: block; margin: 0.5rem 0; }
.item-card .item-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

/* --- BADGES DE STATUT --------------------------------------- */
.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.status-badge.pending  { background: linear-gradient(135deg,#ffc107,#e0a800); color: #1a1a1a; }
.status-badge.valid    { background: linear-gradient(135deg,#28a745,#1e7e34); color: #fff; }
.status-badge.rejected { background: linear-gradient(135deg,#dc3545,#c82333); color: #fff; }

/* --- BOUTONS D'ACTION SUR LES CARTES ----------------------- */
.card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}
.btn-act {
  padding: 0.45rem 0.9rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.btn-view    { background: linear-gradient(135deg,#007bff,#0056b3); color: #fff; }
.btn-approve { background: linear-gradient(135deg,#28a745,#1e7e34); color: #fff; }
.btn-reject  { background: linear-gradient(135deg,#dc3545,#c82333); color: #fff; }
.btn-delete  { background: linear-gradient(135deg,#dc3545,#c82333); color: #fff; }
.btn-edit    { background: linear-gradient(135deg,#ffc107,#e0a800); color: #1a1a1a; }
.btn-act:hover { opacity: 0.85; transform: translateY(-1px); }

/* --- MODAL -------------------------------------------------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: #fff;
  border-radius: 14px;
  padding: 2rem;
  max-width: 640px;
  width: 92%;
  max-height: 88vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}
.modal-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
  margin-bottom: 1.5rem;
}
.modal-title-row h2 { font-family: 'Aboreto', serif; font-size: 1.4rem; font-weight: 400; }
.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: #999;
  transition: color 0.3s;
}
.modal-close-btn:hover { color: #1a1a1a; }
.modal-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
}
.modal-meta-grid div { display: flex; flex-direction: column; }
.modal-meta-grid strong { font-size: 0.76rem; color: #888; text-transform: uppercase; margin-bottom: 3px; }
.modal-body-text {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  line-height: 1.8;
  color: #444;
  margin-bottom: 1.5rem;
  max-height: 200px;
  overflow-y: auto;
}
.modal-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.modal-btn {
  padding: 0.65rem 1.4rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.modal-btn.primary   { background: linear-gradient(135deg,#28a745,#1e7e34); color: #fff; }
.modal-btn.danger    { background: linear-gradient(135deg,#dc3545,#c82333); color: #fff; }
.modal-btn.secondary { background: #ecf0f1; color: #2c3e50; border: 1px solid #bdc3c7; }
.modal-btn:hover { opacity: 0.88; transform: translateY(-1px); }

/* --- GALERIE MÉDIAS ---------------------------------------- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.media-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s;
  border: 1px solid #eee;
}
.media-card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.media-thumb {
  width: 100%; height: 165px;
  object-fit: cover;
  background: #f0f0f0;
}
.media-thumb-placeholder {
  width: 100%; height: 165px;
  background: linear-gradient(135deg, #2d3a2d, #1a2a3a);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.media-info { padding: 1rem; }
.media-info h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
.media-info small { font-size: 0.78rem; color: #999; }
.media-info .card-actions { margin-top: 0.75rem; padding-top: 0.75rem; }

/* --- TABLEAU ACCÈS ----------------------------------------- */
.access-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
  font-size: 0.9rem;
}
.access-table th {
  background: #1a1a1a;
  color: #d4af37;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.access-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  color: #444;
}
.access-table tr:last-child td { border-bottom: none; }
.access-table tr:hover td { background: #fafafa; }

/* --- ONGLETS DE PAGE --------------------------------------- */
.page-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #eee;
  margin-bottom: 2rem;
}
.page-tab {
  padding: 10px 22px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: #888;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.3s;
}
.page-tab:hover { color: #007bff; }
.page-tab.active { color: #007bff; border-bottom-color: #007bff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* --- BADGE DÉMO -------------------------------------------- */
.demo-badge {
  position: fixed;
  bottom: 18px; right: 18px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
  color: #d4af37;
  border: 1.5px solid #d4af37;
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 0.78rem;
  font-family: 'Aboreto', serif;
  z-index: 9999;
  box-shadow: 0 4px 16px rgba(0,0,0,0.45);
  letter-spacing: 1px;
  pointer-events: none;
}

/* --- ANIMATIONS -------------------------------------------- */
@keyframes fadeIn  { from {opacity:0} to {opacity:1} }
@keyframes slideUp { from {transform:translateY(40px);opacity:0} to {transform:translateY(0);opacity:1} }

/* --- RESPONSIVE -------------------------------------------- */
@media (max-width: 1024px) {
  .stats-grid-dash { grid-template-columns: repeat(2, 1fr); }
  .actions-grid    { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .gds-main { padding: 1rem; }
  .dashboard-header h1 { font-size: 1.8rem; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .stats-grid-dash { grid-template-columns: 1fr; }
  .actions-grid { grid-template-columns: 1fr; }
  .items-grid { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-meta-grid { grid-template-columns: 1fr; }
  .filter-tabs { flex-direction: column; }
  .filter-tab  { width: 100%; }
  .access-table th, .access-table td { padding: 8px 10px; font-size: 0.82rem; }
}
@media (max-width: 480px) {
  .media-grid { grid-template-columns: 1fr; }
  .stats-row  { grid-template-columns: 1fr; }
}
