/* ============================================================
   REALISATION-DETAIL.CSS — Casino Evenements
   Page dediee d'une realisation : hero meta, galerie plein format,
   CTA final avec retour liste
   ============================================================ */

/* ============================================================
   HERO — Breadcrumb + titre + meta horizontal
   ============================================================ */

.realisation-hero {
  padding: calc(var(--header-height) + var(--space-2xl)) 0 var(--space-xl);
  background: linear-gradient(180deg, var(--dark-card) 0%, var(--black) 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.realisation-hero .breadcrumb {
  margin-bottom: var(--space-xl);
  font-size: 0.8125rem;
  color: var(--white-muted);
}

.realisation-hero .breadcrumb a {
  color: var(--white-soft);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.realisation-hero .breadcrumb a:hover {
  color: var(--gold);
}

.realisation-hero .breadcrumb span {
  color: var(--gold);
}

.realisation-hero-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-lg);
}

.realisation-hero-title {
  font-family: var(--font-accent);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
  line-height: 1.1;
  color: var(--white);
  margin: 0 0 var(--space-xl);
  max-width: 24ch;
}

/* ----- Meta horizontal ----- */

.realisation-hero-meta {
  list-style: none;
  margin: 0;
  padding: var(--space-lg) 0 0;
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .realisation-hero-meta {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
}

@media (min-width: 1024px) {
  .realisation-hero-meta {
    grid-template-columns: repeat(4, 1fr);
  }
}

.realisation-hero-meta li {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.realisation-hero-meta .meta-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.realisation-hero-meta .meta-value {
  font-size: 1rem;
  color: var(--white-soft);
  line-height: 1.5;
}

/* ============================================================
   DESCRIPTION LONGUE
   ============================================================ */

.realisation-description {
  padding: var(--space-2xl) 0 var(--space-xl);
}

.realisation-description p {
  max-width: 72ch;
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--white-soft);
  text-align: left;
}

/* ============================================================
   GALERIE — Mosaique editoriale "bento"
   Grille 6 colonnes, photos cover (zero espace vide), spans
   alternes pour un rythme magazine. Hero pleine largeur x2 rangs.
   ============================================================ */

.gallery-section {
  padding: clamp(3rem, 2rem + 3vw, 5rem) 0 clamp(4rem, 3rem + 3vw, 7rem);
  position: relative;
  background:
    radial-gradient(ellipse 70% 30% at 50% 0%, rgba(212, 175, 55, 0.04) 0%, transparent 60%),
    var(--black);
}

/* ----- Header de section ----- */

.gallery-header {
  text-align: center;
  margin-bottom: clamp(2rem, 1.5rem + 1.5vw, 3.5rem);
}

.gallery-overline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.gallery-overline-rule {
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}

.gallery-overline-label {
  color: var(--gold);
}

.gallery-overline-count {
  color: var(--white-muted);
  letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
  position: relative;
  padding-left: var(--space-md);
}

.gallery-overline-count::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.6;
  transform: translateY(-50%);
}

.gallery-title {
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  letter-spacing: -0.02em;
  margin: 0;
}

.gallery-title .accent {
  font-size: 1.05em;
  display: inline-block;
  margin-left: 0.1em;
}

/* ============================================================
   MOSAIQUE — bento grid 6 colonnes
   ============================================================ */

.gallery-mosaic {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* Tablet : grille 2 colonnes simple */
@media (min-width: 640px) and (max-width: 999px) {
  .gallery-mosaic {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(240px, auto);
    gap: 14px;
  }

  .gallery-cell:first-child {
    grid-column: 1 / -1;
    aspect-ratio: 21 / 9;
  }
}

/* Desktop : mosaique 6 colonnes avec rythme alterne */
@media (min-width: 1000px) {
  .gallery-mosaic {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 280px;
    gap: 16px;
  }

  /* Hero : pleine largeur, double hauteur */
  .gallery-cell:first-child {
    grid-column: span 6;
    grid-row: span 2;
  }

  /* Defaut pour cellules sans regle specifique */
  .gallery-cell {
    grid-column: span 3;
  }

  /* Cycle de 6 photos apres le hero (positions 2-7, 8-13, ...) */
  /* Pair 1 : 4 + 2 (wide-narrow) */
  .gallery-cell:nth-child(6n + 2) { grid-column: span 4; }
  .gallery-cell:nth-child(6n + 3) { grid-column: span 2; }

  /* Pair 2 : 2 + 4 (narrow-wide) */
  .gallery-cell:nth-child(6n + 4) { grid-column: span 2; }
  .gallery-cell:nth-child(6n + 5) { grid-column: span 4; }

  /* Pair 3 : 3 + 3 (equal) */
  .gallery-cell:nth-child(6n + 6) { grid-column: span 3; }
  .gallery-cell:nth-child(6n + 1):not(:first-child) { grid-column: span 3; }

  /* Orphan fix : si le dernier element serait seul dans sa rangee,
     l'etendre sur toute la largeur pour eviter le trou */
  .gallery-cell:last-child:nth-child(6n + 2),
  .gallery-cell:last-child:nth-child(6n + 4),
  .gallery-cell:last-child:nth-child(6n + 6) {
    grid-column: span 6;
  }
}

/* Mobile : aspect ratio fixe pour homogeneite */
@media (max-width: 639px) {
  .gallery-cell {
    aspect-ratio: 4 / 3;
  }

  .gallery-cell:first-child {
    aspect-ratio: 16 / 10;
  }
}

/* ============================================================
   CELLULE — image, lien, hover, caption
   ============================================================ */

.gallery-cell {
  position: relative;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--dark-card);
  box-shadow:
    0 1px 0 rgba(212, 175, 55, 0.06) inset,
    0 8px 24px -10px rgba(0, 0, 0, 0.5);
  transition: box-shadow var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
}

.gallery-cell:first-child {
  border-radius: 16px;
}

.gallery-cell:hover,
.gallery-cell:focus-within {
  box-shadow:
    0 1px 0 rgba(212, 175, 55, 0.14) inset,
    0 0 0 1px rgba(212, 175, 55, 0.18),
    0 18px 40px -16px rgba(0, 0, 0, 0.7);
  transform: translateY(-2px);
}

.gallery-cell-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: inherit;
}

.gallery-cell-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.gallery-cell picture {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 1.2s var(--ease-out),
              filter var(--duration-normal) var(--ease-out);
  filter: brightness(0.96);
}

.gallery-cell:hover img,
.gallery-cell:focus-within img {
  transform: scale(1.05);
  filter: brightness(1.02);
}

/* Bouton zoom (apparait au hover) */
.gallery-cell-zoom {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(10, 8, 4, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--gold);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
  pointer-events: none;
}

.gallery-cell:hover .gallery-cell-zoom,
.gallery-cell:focus-within .gallery-cell-zoom {
  opacity: 1;
  transform: translateY(0);
  border-color: rgba(212, 175, 55, 0.55);
}

/* Subtle vignette overlay sur chaque cellule */
.gallery-cell-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
  opacity: 0.5;
  transition: opacity var(--duration-normal) var(--ease-out);
  z-index: 1;
}

.gallery-cell:hover .gallery-cell-link::after {
  opacity: 0.25;
}

/* Caption (visible si presente, en overlay bas) */
.gallery-cell-caption {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  margin: 0;
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.85) 80%);
  color: var(--white);
  font-family: var(--font-accent);
  font-size: 0.9375rem;
  font-style: italic;
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: 0.01em;
  transform: translateY(6px);
  opacity: 0.92;
  transition: transform var(--duration-normal) var(--ease-out),
              opacity var(--duration-fast) var(--ease-out);
  pointer-events: none;
}

.gallery-cell:hover .gallery-cell-caption {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 600px) {
  .gallery-cell-zoom {
    opacity: 1;
    transform: translateY(0);
    width: 32px;
    height: 32px;
  }

  .gallery-cell-caption {
    font-size: 0.8125rem;
    padding: var(--space-md);
  }
}

/* ============================================================
   CTA FINAL + RETOUR LISTE
   ============================================================ */

.realisation-detail-cta {
  padding: var(--space-2xl) 0 var(--space-3xl);
  background: var(--dark-card);
  border-top: 1px solid var(--border-subtle);
}

.realisation-detail-cta-inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.realisation-detail-cta-text h2 {
  font-family: var(--font-accent);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  color: var(--white);
  margin: 0 0 var(--space-md);
}

.realisation-detail-cta-text p {
  font-size: 1rem;
  color: var(--white-soft);
  line-height: 1.7;
  margin: 0;
}

.realisation-detail-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}

