
/* GALERIE : vignettes toutes identiques */
.gallery {
  max-width: 1400px;
  margin: 0 auto !important;          /* ✅ plus de marge négative */
  padding: 2rem 1.5rem !important;    /* on garde le même padding */
}

/* Conteneur interne de vignettes – ne gère que l’intérieur */
.gallery {
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* plus AUCUN margin/padding spécifique sur .gallery-page .gallery */



.gallery--grid {
  display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));  
gap: 0;
margin-top: -20px;
}

.gallery-list {
  display: contents;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gallery-item {
  display: contents;
}

.gallery-link {
  display: block;
  position: relative;
  overflow: hidden;
  background-color: #000000;
  /* height: var(--thumb-height); */
  text-decoration: none;
  color: inherit;
}

/* ratio 3/4, comme les cartes de la home */
.gallery-figure {
  margin: 0;
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.gallery-figure picture,
.gallery-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-meta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.6rem 0.9rem;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55),
    rgba(0, 0, 0, 0)
  );
  color: #ffffff;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Arial, sans-serif;
}

.gallery-title {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-subtitle {
  font-size: 0.725rem;
  line-height: 1.35;
  color: #d0d0d0;
}

.gallery-link:hover .gallery-meta,
.gallery-link:focus-visible .gallery-meta {
  opacity: 1;
  transform: translateY(-2px);
}

  /* image qui remplit le cadre */
.gallery-figure picture {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* responsive colonnes */
@media (max-width: 1024px) {
  .gallery--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .gallery--grid {
    grid-template-columns: 1fr;
  }
}

/* Masquer le figcaption visuellement (mais accessible aux lecteurs d'écran) */
.gallery-figure .sr-only {
  display: none;
}

/* ÉTAT VIDE */

.gallery--empty {
  padding: 4rem 1.5rem;
  text-align: center;
}

.gallery-empty-message {
  max-width: 40rem;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.6;
  color: #cccccc;
}

/* RESPONSIVE GALERIE */

@media (max-width: 1024px) {
  .gallery--grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.home-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.home-intro {
  /* margin-bottom: 2.5rem; */
  margin: 0;
  padding: 0;
}

.home-title {
  font-size: 2.3rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.home-baseline {
  margin-top: 0.75rem;
  max-width: 40rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #9da1aa;
}

/* GRILLE RESPONSIVE PAGE ACCUEIL */

/* 4 COLONNES DE LA PAGE D'ACCUEIL */
.home-series-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)); 
  gap: 0;                                           
} 

.series-figure {
  margin: 0;
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;         /* à ajuster : 3/2, 16/9, etc. */
  overflow: hidden;
}

/* covers imposantes */
.series-cover {
  display: block;
  width: 100%;
  height: 100%;        /* grande hauteur proche du site de ref */
  object-fit: cover;
}

.series-card {
  position: relative;
  overflow: hidden;
  /* border-radius: 4px; */
}

.series-card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Titre en overlay au survol */

.series-meta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.6rem 0.9rem;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55),
    rgba(0, 0, 0, 0)
  );
  color: #ffffff;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Arial, sans-serif;
}
/*  TITRE INFOS SUR VIGNETTE */
.series-title {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* SOUS-TITRE INFOS SUR VIGNETTE */
.series-subtitle {
  font-size: 1.125rem;
  line-height: 1.3;
  opacity: 0.9;
  color: #ffffff; /* gris foncé sur fond sombre */
}

.series-card:hover .series-meta,
.series-card:focus-within .series-meta {
  opacity: 1;
  transform: translateY(0);
}

/* Conteneur principal de la page d'accueil */
.home-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}




/* pleine largeur mais avec un peu de marge intérieure */
.page-main.home-page {
  max-width: none;        /* large mais pas full écran sur très grands écrans */
  margin: 0 auto;
  padding: 48px 0 0; /* 60px en haut, à ajuster */
}

.home-series-grid {
  margin-top: 0;
}

.page-main.home-page > *:first-child {
  margin-top: 0;
}


/* 3 colonnes bien espacées */
/* .home-series-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0rem;
}*/

/* RESPONSIVE COLONNES */
@media (max-width: 1024px) {
  .home-series-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .home-series-grid {
    grid-template-columns: 1fr;
  }
}

/* 👉 Ajoute ceci tout en bas du fichier, après tout le reste */
@media (max-width: 1024px) {
  .page-main.home-page {
    padding-left: 20px;
    padding-right: 20px;
  }
}

.gallery {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem; /* 👈 AJOUT UNIQUEMENT CETTE LIGNE */
}

.gallery--grid {
  gap: 1.5rem; /* 👈 AJOUT UNIQUEMENT CETTE LIGNE */
  margin-top: -1rem !important;
}


/* MARGES IDENTIQUES À L'ACCUEIL */
.gallery {
  max-width: 1400px !important;
  margin: 0 auto !important;
  padding: 2rem 1.5rem !important;  /* ← IDENTIQUE accueil */
}

.gallery--grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1.2rem !important;  /* ← IDENTIQUE hero-gallery */
  margin-top: 0 !important;
  padding: 0 !important;
}
/* RESPONSIVE MOBILE - IDENTIQUE ACCUEIL */
@media (max-width: 1024px) {
  .gallery--grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1rem !important;
  }
}

@media (max-width: 768px) {
  .gallery--grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.8rem !important;
  }
  .gallery {
    padding: 1.5rem 1rem !important;
  }
}

@media (max-width: 640px) {
  .gallery--grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
}

/* 25 JANVIER 2026 */
/* FINAL - Vignetage parfait sur figure */
.hero-gallery .series-figure {
  position: relative !important;
  overflow: hidden !important;
  z-index: 1 !important;
}

.hero-gallery .series-figure::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 2 !important;  /* AU-DESSUS de l'image */
  background: radial-gradient(
    circle 35% at center,
    rgba(255,255,255,0.6) 0%,    /* BLANC INTENSE */
    rgba(255,255,255,0.4) 12%,
    transparent 28%,
    rgba(0,0,0,0.92) 55%,
    black 100%
  ) !important;
  opacity: 0 !important;
  transition: opacity 0.4s ease !important;
  pointer-events: none !important;
  border-radius: none !important;
}

@media (hover: hover) {
  .hero-gallery .series-card:hover .series-figure::after {
    opacity: 1 !important;
  }
  .hero-gallery .series-card:hover .series-figure img {
    filter: grayscale(1) !important;
  }
}


/* SUPPRESSION FORCÉE border-radius au hover */
.hero-gallery .series-card:hover,
.hero-gallery .series-card:hover .series-figure,
.hero-gallery .series-card:hover .series-cover,
.hero-gallery .series-figure:hover,
.hero-gallery .series-cover:hover {
  border-radius: 0 !important;
  -webkit-border-radius: 0 !important;
  -moz-border-radius: 0 !important;
  overflow: hidden !important;
}

/* Également pour tous les enfants */
.hero-gallery .series-card:hover * {
  border-radius: 0 !important;
  -webkit-border-radius: 0 !important;
  -moz-border-radius: 0 !important;
}

/* ZÉRO border-radius : vignettes CARRÉES partout */
.hero-gallery .series-card,
.hero-gallery .series-figure,
.hero-gallery .series-cover,
.hero-gallery .series-figure picture,
.hero-gallery .series-figure img {
  border-radius: 0 !important;
  -webkit-border-radius: 0 !important;
  -moz-border-radius: 0 !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

/* Force aussi tous les enfants */
.hero-gallery .series-card *,
.hero-gallery .series-figure * {
  border-radius: 0 !important;
  -webkit-border-radius: 0 !important;
}

/* ANIMATION FIGCAPTION */
/* Animation figcaption : reveal sombre + slide */
.hero-gallery .series-figure {
  overflow: hidden;
}

.hero-gallery .series-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
  color: white;
  padding: 2rem 1.5rem 1.5rem;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

@media (hover: hover) {
  .hero-gallery .series-card:hover .series-meta {
    transform: translateY(0);
  }
}

/* Animations staggered : accueil + GALERIES (SÛR) */
.hero-gallery,
.page-main.gallery-page section[class*="gallery"],
.page-main.gallery-page .gallery-container {
  opacity: 0;
  animation: gridFadeIn 0.4s ease forwards;
}

.hero-gallery .series-card,
.page-main.gallery-page .gallery-link {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 0.6s ease forwards;
}

/* Délais ACCUEIL */
.hero-gallery .series-card:nth-child(1) { animation-delay: 0.1s; }
.hero-gallery .series-card:nth-child(2) { animation-delay: 0.2s; }
.hero-gallery .series-card:nth-child(3) { animation-delay: 0.3s; }
.hero-gallery .series-card:nth-child(4) { animation-delay: 0.4s; }
.hero-gallery .series-card:nth-child(5) { animation-delay: 0.5s; }
.hero-gallery .series-card:nth-child(6) { animation-delay: 0.6s; }
.hero-gallery .series-card:nth-child(7) { animation-delay: 0.7s; }
.hero-gallery .series-card:nth-child(8) { animation-delay: 0.8s; }

/* Délais GALERIES */
.page-main.gallery-page .gallery-link:nth-child(1) { animation-delay: 0.15s; }
.page-main.gallery-page .gallery-link:nth-child(2) { animation-delay: 0.27s; }
.page-main.gallery-page .gallery-link:nth-child(3) { animation-delay: 0.39s; }
.page-main.gallery-page .gallery-link:nth-child(4) { animation-delay: 0.51s; }
.page-main.gallery-page .gallery-link:nth-child(5) { animation-delay: 0.63s; }
.page-main.gallery-page .gallery-link:nth-child(n+6) { animation-delay: calc(0.12s * (var(--n, 6))); }

/* KEYFRAMES SÉCURISÉS */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gridFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* 26 janvier 2026 */
/* Animations staggered : vignettes cascade au chargement */
.hero-gallery {
  opacity: 0;  /* Cache jusqu'au premier paint */
  animation: gridFadeIn 0.3s ease 0.2s forwards;
}

.hero-gallery .series-card {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero-gallery .series-card:nth-child(1) { animation-delay: 0.15s; }
.hero-gallery .series-card:nth-child(2) { animation-delay: 0.25s; }
.hero-gallery .series-card:nth-child(3) { animation-delay: 0.35s; }
.hero-gallery .series-card:nth-child(4) { animation-delay: 0.45s; }
.hero-gallery .series-card:nth-child(5) { animation-delay: 0.55s; }
.hero-gallery .series-card:nth-child(6) { animation-delay: 0.65s; }
.hero-gallery .series-card:nth-child(7) { animation-delay: 0.75s; }
.hero-gallery .series-card:nth-child(8) { animation-delay: 0.85s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gridFadeIn {
  to { opacity: 1; }
}



/* 🔧 MOBILE/TABLETTE : infos catégories PERMANENTES - PRIORITÉ ABSOLUE */
@media (max-width: 1023px) {
  .gallery--grid .gallery-meta {
    opacity: 1 !important;
    transform: translateY(-2px) !important;
  }
}

/* ✅ ACCUEIL + SÉRIES : infos TOUJOURS VISIBLES mobile/tablette */
@media (max-width: 1023px) {
  .series-meta,
  figcaption.series-meta {
    opacity: 1 !important;
    transform: translateY(-2px) !important;
  }
}

@media (max-width: 767px) {
  .series-title, .gallery-title {
    font-size: 0.95rem !important;
    max-width: 100%;
  }
  .series-subtitle, .gallery-subtitle {
    font-size: 0.85rem !important;
    max-width: 100;
    color: #D0D0D0;
      }

    }










