/* =========================================================
   Galerie 154 — CSS lisible / commenté
   Structure :
   1. Base globale
   2. Fond de page
   3. Header / navigation
   4. Footer
   5. Layout général
   6. Homepage artistes
   7. Page artiste + slider
   8. Contact
   9. Backoffice
   10. Responsive
   ========================================================= */


/* =========================================================
   1. Base globale
   ========================================================= */

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: #fff;
}

a {
  color: inherit;
}


/* =========================================================
   2. Fond de page
   ========================================================= */

body {
  background:
    #000
    url('/public/images/bg1.jpg')
    center center / cover
    fixed
    no-repeat;
}

/* Voile sombre léger au-dessus du background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.18);
}


/* =========================================================
   3. Header / navigation
   ========================================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;

  width: 100%;
  height: 86px;
  padding: 0 5vw;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: rgba(0, 0, 0, 0.92);
  border-bottom: 1px solid #fff;
  backdrop-filter: blur(5px);
}

.logo-link img {
  display: block;
  width: 118px;
  height: auto;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 42px;
  font-size: 16px;
}

.site-header nav a {
  text-decoration: none;
}

.site-header nav a:hover {
  text-decoration: underline;
}


/* =========================================================
   4. Footer
   ========================================================= */

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 1000;

  width: 100%;
  min-height: 58px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 12px;

  background: rgba(0, 0, 0, 0.92);
  border-top: 1px solid #fff;
  backdrop-filter: blur(5px);
}


/* =========================================================
   5. Layout général
   ========================================================= */

.site-content {
  min-height: 100vh;
  padding: 98px 0 80px;
}

.page-section {
  width: min(94vw, 1540px);
  margin: 0 auto;
}

.narrow {
  width: min(92vw, 760px);
}

h1 {
  margin: 0 0 20px;

  text-align: center;
  font-size: 32px;
  color: #000;
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.9);
}


/* =========================================================
   6. Homepage artistes
   ========================================================= */

.artists-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
}

.artist-card {
  position: relative;

  width: 330px;
  height: 300px;
  padding: 15px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  text-align: center;
  text-decoration: none;
  color: #fff;
  background: #000;

  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.25);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.artist-card:hover {
  transform: scale(1.04);
  box-shadow: 0 7px 12px rgba(255, 255, 255, 0.42);
}

.artist-card img,
.artist-placeholder {
  display: block;

  width: 100%;
  max-width: 300px;
  height: 205px;

  object-fit: cover;
  background: #111;
}

.artist-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;

  color: #888;
}

.artist-card h3 {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;

  margin: 0;
  padding: 10px;

  font-size: 18px;
  font-weight: 700;
}


/* =========================================================
   7. Page artiste + slider
   ========================================================= */

.artist-slider-page {
  height: calc(100vh - 178px);
  display: flex;
  flex-direction: column;
}

.artist-swiper {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0 82px 36px;
}

.artist-swiper .swiper-wrapper {
  height: 100%;
}

.artist-swiper .swiper-slide {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.artist-swiper .swiper-zoom-container {
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
}

.artist-swiper .media-loader {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
}

.artist-swiper img,
.artist-swiper video,
.artist-swiper .media-loader img,
.artist-swiper .media-loader video {
  display: block;

  width: auto;
  height: auto;

  max-width: 100%;
  max-height: 100%;

  object-fit: contain;

  background: #000;
  padding: 10px;

  box-shadow: 0 0 12px rgba(0,0,0,.7);
}

.swiper-button-prev,
.swiper-button-next {
  width: 52px;
  height: 52px;

  color: #fff;
  background: #000;

  border: 1px solid #fff;
  border-radius: 50%;
}

.swiper-button-prev {
  left: 18px;
}

.swiper-button-next {
  right: 18px;
}

.swiper-button-prev::after,
.swiper-button-next::after {
  font-size: 18px;
  font-weight: bold;
}

.swiper-pagination-bullet {
  background: #fff;
}


/* =========================================================
   8. Contact
   ========================================================= */

.contact-form {
  display: grid;
  gap: 16px;

  padding: 24px;

  background: rgba(0, 0, 0, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.contact-form label {
  display: grid;
  gap: 8px;

  font-weight: bold;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;

  font: inherit;
  color: #000;
  background: #fff;

  border: 1px solid #fff;
  border-radius: 0;
}

.contact-form button {
  padding: 10px 15px;

  font: inherit;
  color: #fff;
  background: #000;

  border: 1px solid #fff;
  border-radius: 0;

  cursor: pointer;
}

.contact-form button:hover {
  color: #000;
  background: #fff;
}

/* Champ anti-spam invisible */
.honeypot {
  display: none !important;
}


/* =========================================================
   9. Backoffice
   ========================================================= */

.admin-container {
  padding: 28px;

  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-button,
button {
  display: inline-block;

  padding: 10px 15px;

  font: inherit;
  text-decoration: none;
  color: #fff;
  background: #000;

  border: 1px solid #fff;
  border-radius: 0;

  cursor: pointer;
}

.admin-button:hover,
button:hover {
  color: #000;
  background: #fff;
}

.danger {
  color: #ffb3b3;
  border-color: #ff7777;
}

.notice,
.error,
.empty-message {
  margin: 0 0 16px;
  padding: 14px;

  text-align: center;

  background: rgba(0, 0, 0, 0.8);
  border: 1px solid #fff;
}

.error {
  border-color: #ff7777;
}

.admin-table {
  width: 100%;
  margin: 16px 0 30px;

  border-collapse: collapse;
  background: rgba(0, 0, 0, 0.75);
}

.admin-table th,
.admin-table td {
  padding: 10px;

  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.admin-table input {
  width: 100%;
  padding: 10px;

  font: inherit;
  color: #000;
  background: #fff;

  border: 1px solid #fff;
  border-radius: 0;
}

.admin-cover {
  width: 220px;
  max-height: 160px;

  object-fit: cover;
  border: 1px solid #fff;
}

.checkbox {
  display: flex !important;
  align-items: center;
}

.checkbox input {
  width: auto;
}

.media-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;

  margin-top: 18px;
}

.media-admin-card {
  padding: 10px;

  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.media-admin-card img,
.media-admin-card video {
  width: 100%;
  height: 150px;

  object-fit: contain;
  background: #111;
}

.message-card {
  margin-bottom: 16px;
  padding: 18px;

  background: rgba(0, 0, 0, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.message-card.unread {
  border-color: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
}


/* =========================================================
   10. Responsive tablette
   ========================================================= */

@media (max-width: 900px) {
  .site-header {
    height: 78px;
    padding: 0 24px;
  }

  .logo-link img {
    width: 105px;
  }

  .site-header nav {
    gap: 22px;
    font-size: 18px;
  }

  .site-content {
    padding-top: 92px;
  }

  .artist-swiper {
    padding: 0 64px 32px;
  }
}


/* =========================================================
   11. Responsive mobile
   ========================================================= */

@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }

  .site-header {
    height: 72px;
    padding: 0 16px;
  }

  .logo-link img {
    width: 92px;
  }

  .site-header nav {
    gap: 16px;
    font-size: 16px;
  }

  .site-content {
    padding-top: 86px;
  }

  .artist-card {
    width: min(92vw, 330px);
  }

  .artist-slider-page {
    height: calc(100vh - 160px);
  }

  .artist-swiper {
    padding: 0 0 26px;
  }

  .swiper-button-prev,
  .swiper-button-next {
    display: none;
  }

  .swiper-slide img,
  .swiper-slide video {
    max-width: 100vw;
    max-height: 100%;
    padding: 0;
  }

  .admin-container {
    padding: 16px;
  }

  .admin-top {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* =========================================================
   GIF / VIDEO LOADER
   ========================================================= */

.media-loader {
  position: relative;
}

.media-loader.loaded .spinner {
  display: none;
}

.spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 42px;
  height: 42px;
  margin-left: -21px;
  margin-top: -21px;
  border: 3px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 20;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* HOMEPAGE */

.artist-card .media-loader,
.artist-card .artist-preview-loader {
  display: block;
  width: 100%;
  max-width: 300px;
  height: 205px;
  overflow: hidden;
}

.artist-card .media-loader img,
.artist-card .artist-preview-loader img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* PAGE ARTISTE */

.artist-swiper .media-loader {
  display: contents;
}

.artist-swiper .media-loader img,
.artist-swiper .media-loader video {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* =========================================================
   12. Protection légère images / GIFs
   ========================================================= */

.protected-media,
.artist-card img,
.artist-swiper img {
  -webkit-user-drag: none;
  user-select: none;
}
