/* =============================== Font ================================ */
@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;700&display=swap');

/* =============================== Reset ================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =============================== Body ================================ */
body {
  font-family: 'Comfortaa', cursive;
  color: #f8f8f2;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem;
  background: transparent;
  overflow-x: hidden;
}

/* =============================== Background Media ================================ */
#bg-video,
#bg-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -2;
  pointer-events: none;
  display: none;
}

/* Dark overlay for readability */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(40, 42, 54, 0.55);
  z-index: -1;
  pointer-events: none;
}

/* =============================== Main Container ================================ */
.container {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ============================== Descriptions ============================== */
.description {
  position: relative;
  z-index: 1;
  margin-top: 3rem;
  text-align: center;
  color: #6272a4;
  font-size: 0.9rem;
}

/* =============================== Header ================================ */
h1 {
  font-size: 2.5rem;
  color: #bd93f9;
  margin-bottom: 1rem;
  text-align: center;
}

header {
  text-align: center;
  color: #6272a4;
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* =============================== Cards ================================ */
.card {
  background-color: rgba(68, 71, 90, 0.95);
  color: #f8f8f2;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.2rem;
  text-align: center;
  width: 100%;
  margin: 0.7rem 0;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.card:hover {
  background-color: #6272a4;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.card a {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

/* =============================== Images ================================ */
.img {
  max-height: 200px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* =============================== Forms ================================ */
form {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgba(68, 71, 90, 0.95);
  padding: 2rem;
  border-radius: 12px;
  max-width: 400px;
  width: 100%;
  margin: 1rem 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

label {
  width: 100%;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

input[type="text"],
select {
  width: 100%;
  padding: 0.6rem 1rem;
  margin-bottom: 1rem;
  border: none;
  border-radius: 8px;
  outline: none;
  background-color: #6272a4;
  color: #f8f8f2;
  font-family: inherit;
  font-size: 1rem;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

input[type="text"]:focus,
select:focus {
  background-color: #50fa7b;
  color: #282a36;
  transform: scale(1.02);
}

/* =============================== Buttons ================================ */
button {
  background-color: #bd93f9;
  color: #282a36;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

button:hover {
  background-color: #ff79c6;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* =============================== Footer ================================ */
footer {
  position: relative;
  z-index: 1;
  margin-top: 3rem;
  text-align: center;
  color: #6272a4;
  font-size: 0.9rem;
}

/* =============================== PHP Directory Index ================================ */
.card .file-type {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.9rem;
  color: #bd93f9;
}

/* =============================== Cookies ================================ */
.cookie-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

button.cookie-btn {
  background-color: #bd93f9 !important;
  color: #282a36 !important;
}

button.cookie-btn:hover {
  background-color: #ff79c6 !important;
}

/* ============================= Barre de chargement ============================= */
#loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff69b4, #ff1493);
  width: 0%;
  transition: width 0.3s ease;
  z-index: 9999;
  box-shadow: 0 0 10px rgba(255, 105, 180, 0.6);
}

/* =============================== Dashboard Layout ================================ */
.dashboard-wrapper {
  width: 100%;
  display: grid;
  grid-template-columns: 450px 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Card avec image */
.card-with-image {
  padding: 1rem;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-with-image .img {
  max-height: 200px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* =============================== Stats Section ================================ */
.stats-section {
  width: 100%;
}

.stats-section h2 {
  color: #bd93f9;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.stat-card {
  background-color: rgba(68, 71, 90, 0.95);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
}

.stat-card:hover {
  background-color: #6272a4;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.stat-label {
  font-size: 0.95rem;
  color: #6272a4;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 700;
  color: #50fa7b;
  transition: color 0.3s ease;
}

.stat-subtitle {
  font-size: 0.85rem;
  color: #6272a4;
  margin-top: 0.3rem;
}

/* =============================== Other Links Section ================================ */
.other-section {
  width: 100%;
}

.other-section h2 {
  color: #bd93f9;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.other-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.small-card {
  padding: 1rem 1.5rem;
  font-size: 1rem;
}

/* =============================== Credits Section ================================ */
.credits-section {
  width: 100%;
}

.credits-section h2 {
  color: #bd93f9;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.credits-category {
  margin-bottom: 2.5rem;
}

.credits-category:last-child {
  margin-bottom: 0;
}

.credits-category h3 {
  color: #ff79c6;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.credits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.credit-card {
  background-color: rgba(68, 71, 90, 0.95);
  padding: 1.2rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: #f8f8f2;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.credit-card:hover {
  background-color: #6272a4;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  border-color: #bd93f9;
}

.credit-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background-color: rgba(189, 147, 249, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bd93f9;
}

.artist-card .credit-icon {
  background-color: rgba(255, 121, 198, 0.2);
  color: #ff79c6;
}

.credit-info {
  flex: 1;
}

.credit-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f8f8f2;
  margin-bottom: 0.3rem;
}

.credit-desc {
  font-size: 0.9rem;
  color: #6272a4;
}

.small-credits {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.credit-tag {
  background-color: rgba(68, 71, 90, 0.95);
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.credit-tag:hover {
  background-color: #6272a4;
  transform: translateY(-2px);
}

.credit-tag a {
  color: #f8f8f2;
  text-decoration: none;
  font-size: 0.95rem;
  display: block;
}

.credits-thanks {
  background-color: rgba(68, 71, 90, 0.95);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
}

.credits-thanks p {
  margin: 0.5rem 0;
  color: #f8f8f2;
  font-size: 1rem;
  line-height: 1.6;
}

.credits-thanks strong {
  color: #50fa7b;
  font-weight: 700;
}

/* =============================== Responsive ================================ */
@media (max-width: 1200px) {
  .dashboard-wrapper {
    grid-template-columns: 380px 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .dashboard-wrapper {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  body {
    padding: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  .card,
  form {
    font-size: 1.1rem;
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-value {
    font-size: 1.8rem;
  }

  .other-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-wrapper {
    gap: 1rem;
  }

  .credits-grid {
    grid-template-columns: 1fr;
  }
  
  .small-credits {
    grid-template-columns: 1fr;
  }
}

/* =============================== Reduced Motion ================================ */
@media (prefers-reduced-motion: reduce) {
  #bg-video {
    display: none !important;
  }

  #bg-image {
    display: block !important;
  }
}
