/* =========================================================
   Photocolo — Page albums photos des colonies
   ========================================================= */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root {
  --photocolo-box-max: 1380px;
  --photocolo-border: rgba(15, 23, 42, 0.08);
  --photocolo-primary-color: #2563eb;
  --photocolo-accent-color: #38bdf8;
}

html {
  scroll-behavior: smooth;
}

/* ===== HERO pleine largeur ===== */
.photocolo-hero {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  min-height: clamp(560px, 70vh, 860px); /* Aligné sur Colonies/Aide */
  overflow: hidden;
  font-family: var(--codex-body-font);
  background: #0b1220;
  /* Aligné sur Colonies/Aide */
  margin-top: calc(var(--header-height) - 25px);
  /* Remove grid centering from here */
  /* display: grid; */
  /* place-items: center; */
}

.photocolo-hero__media {
  position: absolute;
  inset: 0;
}

.photocolo-hero__media picture,
.photocolo-hero__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  /* filter: removed to match standard pages */
  animation: hero-image-zoom 20s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes hero-image-zoom {
  0% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1.08);
  }
}

.photocolo-hero__overlay {
  position: absolute;
  inset: 0;
  /* Standard dark overlay similar to other pages */
  background: rgba(15, 23, 42, 0.4);
  opacity: 1;
  z-index: 0;
  pointer-events: none;
}

.photocolo-hero__content {
  /* Absolute positioning for robust centering */
  position: absolute; /* Add this */
  top: 50%;           /* Add this */
  left: 50%;          /* Add this */
  transform: translate(-50%, -50%); /* Add this */

  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  /* Aligné sur Colonies/Aide */
  padding: 6vh 4vw;
  min-height: 200px; /* Standard */
}

/* Badge saison */
.photocolo-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.65em 1.05em;
  border-radius: 999px;
  font-weight: 900;
  font-size: clamp(0.95rem, 1.8vw, 1.08rem);
  letter-spacing: 0.5px;
  /* Force white text for readability */
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
  backdrop-filter: saturate(150%) blur(10px);
  margin-bottom: 1.2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

/* Dot animated with dynamic color */
.photocolo-hero__badge::before {
  content: '';
  width: 0.5em;
  height: 0.5em;
  background: var(--photocolo-accent-color);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25);
}

@keyframes badge-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

/* Titre hero */
.photocolo-hero__title {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin: 0 0 1rem 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 
               0 4px 16px rgba(0, 0, 0, 0.6),
               0 6px 24px rgba(0, 0, 0, 0.4);
  letter-spacing: -0.02em;
  color: #fff;
}

/* Description hero */
.photocolo-hero__description {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  font-weight: 500;
  line-height: 1.5;
  margin: 0 0 2.5rem 0;
  max-width: 600px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Navigation saisons */
.photocolo-hero__nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
}

.photocolo-season-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.3px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.3s ease;
}

.photocolo-season-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.photocolo-season-btn.is-active {
  background: var(--photocolo-primary-color);
  border-color: var(--photocolo-accent-color);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.4);
}

.photocolo-season-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== Contenu principal ===== */
.photocolo-main {
  max-width: none;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.photocolo-wrap {
  max-width: var(--photocolo-box-max);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem);
}

.photocolo-header {
  margin-bottom: 3rem;
}

/* Barre de recherche */
.photocolo-search {
  max-width: 600px;
  margin: 0 auto 2rem;
}

.photocolo-search input {
  width: 100%;
  padding: 1rem 1.5rem;
  border: 2px solid var(--photocolo-border);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  background: #fff;
}

.photocolo-search input:focus {
  outline: none;
  border-color: var(--photocolo-primary-color);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Compteur */
.photocolo-count {
  text-align: center;
  font-size: 1rem;
  color: #334155;
  font-weight: 500;
}

/* ===== Grille des séjours ===== */
.photocolo-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.75rem, 3vw, 3rem);
  margin-bottom: 3rem;
  align-items: stretch;
}

@media (min-width: 1024px) {
  .photocolo-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1440px) {
  .photocolo-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Carte séjour avec overlay photo */
.photocolo-card {
  position: relative;
  display: block;
  width: min(100%, 520px);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 0 auto;
}

.photocolo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.photocolo-card__media {
  position: relative;
  width: 100%;
  /* Match Colonies page ratio */
  aspect-ratio: 16/10;
  overflow: hidden;
  cursor: pointer;
  /* Remove fixed height to let aspect-ratio work */
  height: auto; 
}

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

.photocolo-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.photocolo-card:hover .photocolo-card__overlay {
  opacity: 1;
}

.photocolo-card__icon {
  color: #fff;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
  animation: icon-float 2s ease-in-out infinite;
}

@keyframes icon-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.photocolo-card__body {
  padding: 1.75rem 2rem 2.25rem;
}

.photocolo-card__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
}

.photocolo-card__line {
  font-size: 1rem;
  color: #334155;
  margin-bottom: 0.5rem;
}

.photocolo-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 1.25em;
  background: var(--photocolo-primary-color);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-top: 1rem;
  font-size: 1rem;
}

.photocolo-card__cta:hover {
  background: var(--photocolo-accent-color);
  transform: translateX(4px);
}

/* Badge saison sur carte */

/* Message vide */
.photocolo-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: #334155;
}

.photocolo-empty svg {
  margin: 0 auto 1.5rem;
  opacity: 0.3;
}

.photocolo-empty h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: #1e293b;
}

.photocolo-empty p {
  font-size: 1rem;
  margin: 0;
}

/* Révélations au scroll (réutilisation du système existant) */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-up.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .photocolo-hero {
    min-height: clamp(480px, 60vh, 680px);
  }

  .photocolo-hero__content {
    min-height: clamp(480px, 60vh, 680px);
    padding: clamp(24px, 5vw, 72px) 1.5rem clamp(48px, 7vh, 96px);
  }

  .photocolo-hero__title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .photocolo-hero__description {
    font-size: 1.1rem;
  }

  .photocolo-hero__nav {
    gap: 0.75rem;
  }

  .photocolo-season-btn {
    font-size: 0.9rem;
    padding: 0.7em 1.2em;
  }

  .photocolo-list {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}