/* ---------- Reset minimal ---------- */
*,
*::before,
*::after {
  font-family: "Cormorant Garamond", serif;
  text-decoration: none;
  box-sizing: border-box;
}

* p {
  font-size: 1.6rem;
}

a {
  color: #dba85a;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #f5e7d5;
  background-color: #050308;
}

.default-bg {
  background: linear-gradient( 
    to bottom, 
    rgb(10, 5, 0) 0%, 
    black 20%, 
    transparent 100%), 
    url("../default-bg.webp");
  background-size: cover;
}

.center {
  text-align: center;
}

.sm {
  font-variant: small-caps;
}

/* Grid d'images */

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  max-width: 80vw;
  margin: 0 auto;
}

.detail-card {
  background: rgba(26, 10, 18, 0.8);
  border: 1px solid rgba(246, 229, 176, 0.3);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.detail-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(246, 229, 176, 0.4);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(246, 229, 176, 0.2);
}

/* ← IMAGE GRISE → COULEUR */
.detail-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(90%) brightness(0.65) contrast(1.15);
  transition: filter 0.4s ease;
}

/* Survol : COULEUR VIVE */
.detail-card:hover img {
  filter: grayscale(0%) brightness(1.02) contrast(1.1) saturate(1.08);
}

.detail-card h3 {
  color: #f6e5b0;
  margin-bottom: 0;
  text-align: center;
  letter-spacing: 0.1em;
  font-variant-caps: small-caps;
}

/* ---------- Barre de navigation ---------- */

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 4vw;
  background: linear-gradient(
    to bottom,
    rgba(10, 5, 0, 0.7),
    rgba(10, 5, 0, 0.45),
    rgba(10, 5, 0, 0)
  );
  height: 6vh;
  backdrop-filter: blur(2px);
}

.nav-logo {
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #f6e5b0;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
  font-weight: 700;
}

.nav-links a {
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  color: #f3e4b9;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.4rem;
  height: 2px;
  transform-origin: center;
  transform: scaleX(0);
  background: linear-gradient(to right, #f3e4b9, #dba85a);
  transition: transform 0.25s ease-out;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

/* ---------- Dégradé ---------- */

.top-gradient::before {
  z-index: 5;
  pointer-events: none; /* Ne bloque pas les interactions */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 1%, rgba(0, 0, 0, 0.2) 5%, transparent 15%);
}

#persona.top-gradient::before {
  background: linear-gradient(to bottom, #050308 0%, transparent 4%);
}

#persona.bottom-gradient::after {
  background: linear-gradient(to top, black 0%, transparent 5%);
  z-index: 5;
}

.bottom-gradient::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.2) 80%, rgba(0, 0, 0, 0.5) 100%);
  background-size: 100px;
  z-index: 0;
  pointer-events: none; /* Ne bloque pas les interactions */
}

#home.bottom-gradient::after,
.stories-hero.bottom-gradient::after {
  background: linear-gradient(to bottom, transparent 30%, black 100%);
  z-index: -1;
}

/* ---------- Boutons ---------- */

.story-link {
  color: #f6e5b0;
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  padding: 0.3rem 1.2rem 0.45rem;
  border: 1px solid rgba(212, 167, 88, 0.6);
  border-radius: 8px;
  transition: all 0.3s ease;
  width: fit-content;
  backdrop-filter: blur(12px) saturate(1);
  -webkit-backdrop-filter: blur(12px) saturate(1);
  font-variant: all-small-caps;
  margin-left: auto;
  margin-top: 1rem;
}

.story-card .story-link {
  position: relative;
  bottom: 1em;
  right: 0em;
}

.story-link:hover {
  background: rgba(219, 168, 90, 0.15);
  border-color: #f6e5b0;
  box-shadow: 0 4px 16px rgba(219, 168, 90, 0.3);
}


/* Hero titre */
.stories-hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: -1;
}

.hero-title {
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;

  background: linear-gradient(
    135deg,
    #785207 10%,
    #b8892d 30%,
    #ffecb3 55%,
    #cfc09f 80%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;

  position: relative;
  text-align: center;
  z-index: 1;

  opacity: 0;
  transform: translateY(2rem);
  animation: fadeInUp 1.2s ease-out 0.5s forwards;
}

/* Keyframes identiques */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/**** SWIPER *****/
.swiper {
  width: 100vw;
  height: 100vh;
}

.swiper-scrollbar-drag {
  background: #ca9e50 !important;
}

/* ---------- Lightbox ---------- */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 100;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

#lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #f5e7d5;
  font-size: 2rem;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.3s ease;
  z-index: 101;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 101;
}

.lightbox-prev,
.lightbox-next {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #f5e7d5;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
}
