/**
 * eleveurs.css — Page publique des éleveurs partenaires
 * Maison Velihama
 */

/* ── En-tête ─────────────────────────────────────────────────────────────── */
.page-hero {
  padding: 9rem 0 4rem;
  text-align: center;
  background:
    linear-gradient(to bottom, rgba(30,24,20,0.55) 0%, rgba(30,24,20,0.85) 100%),
    url('../img/hero-eleveurs.jpg') center/cover no-repeat;
  background-color: var(--charbon);
}

.page-hero .page-subtitle {
  max-width: 680px;
  margin: 0 auto;
  color: var(--creme-pale);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* ── Section éleveurs ────────────────────────────────────────────────────── */
.eleveurs-section {
  background: var(--noir);
  padding-top: 3rem;
  padding-bottom: 5rem;
}

.eleveurs-section .eleveur-card:first-child {
  padding-top: 0;
}

.eleveurs-vide {
  text-align: center;
  color: var(--gris);
  font-style: italic;
  padding: 5rem 0;
}

/* ── Liste / Cards ───────────────────────────────────────────────────────── */
.eleveurs-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.eleveur-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
  padding: 5rem 0;
}

.eleveur-card.reverse {
  direction: rtl;
}

.eleveur-card.reverse > * {
  direction: ltr;
}

.eleveur-separator {
  border: none;
  border-top: 1px solid rgba(199, 154, 69, 0.18);
  margin: 0;
  position: relative;
}

.eleveur-separator::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: var(--or);
}

@media (max-width: 860px) {
  .page-hero {
    padding: 6rem 0 3rem;
  }

  .eleveur-card,
  .eleveur-card.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 0;
    padding: 2.5rem 0;
  }

  /* Texte/infos en premier, photos en dessous */
  .eleveur-content {
    order: 1;
    padding-top: 0;
    padding-bottom: 1.8rem;
  }

  .eleveur-media {
    order: 2;
    position: static; /* désactive sticky */
  }

  .eleveur-nom {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }

  .eleveur-desc {
    max-width: 100%;
    font-size: 0.9rem;
  }

  .gallery-thumb {
    width: 52px;
    height: 52px;
  }

  .gallery-img-main {
    max-height: 320px;
  }

  .gallery-main {
    max-height: 320px;
  }

  .fiche-toggle {
    width: 100%;
    justify-content: center;
  }
}

/* ── Galerie photos ──────────────────────────────────────────────────────── */
.eleveur-media {
  position: sticky;
  top: 2rem;
}

.eleveur-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.gallery-main {
  overflow: hidden;
  border-radius: 2px;
  background: var(--charbon);
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 520px;
}

.gallery-img-main {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  display: block;
  transition: opacity 0.3s;
}

.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gallery-thumb {
  width: 64px;
  height: 64px;
  border: 2px solid transparent;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.25s, opacity 0.25s;
  padding: 0;
  background: none;
  opacity: 0.65;
  flex-shrink: 0;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.gallery-thumb.active,
.gallery-thumb:hover {
  border-color: var(--or);
  opacity: 1;
}

.eleveur-no-photo {
  aspect-ratio: 4/3;
  background: var(--charbon);
  border: 1px dashed rgba(199, 154, 69, 0.2);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eleveur-no-photo span {
  font-size: 0.78rem;
  color: var(--gris);
  letter-spacing: 0.06em;
  font-style: italic;
}

/* ── Contenu texte ───────────────────────────────────────────────────────── */
.eleveur-content {
  padding-top: 0.5rem;
}

.eleveur-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.eleveur-type {
  font-family: var(--sans);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--or);
  border: 1px solid rgba(199, 154, 69, 0.4);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

.eleveur-lieu {
  font-size: 0.8rem;
  color: var(--gris);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.eleveur-lieu svg {
  flex-shrink: 0;
  color: var(--or);
}

.eleveur-nom {
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 600;
  color: var(--creme);
  line-height: 1.15;
  margin-bottom: 1.4rem;
  letter-spacing: 0.01em;
}

.eleveur-desc {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--creme-pale);
  line-height: 1.8;
  opacity: 0.85;
  max-width: 500px;
}

/* ── Fiche officielle toggle ─────────────────────────────────────────────── */
.eleveur-fiche {
  margin-top: 2.5rem;
}

.fiche-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: none;
  border: 1px solid rgba(199, 154, 69, 0.3);
  color: var(--or-clair);
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  padding: 0.65rem 1.2rem;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.3s, color 0.3s;
}

.fiche-toggle:hover {
  background: rgba(199, 154, 69, 0.08);
  color: var(--or);
}

.fiche-toggle-icon {
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 300;
}

.fiche-panel {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.fiche-panel[hidden] {
  display: none;
}

.fiche-page-img {
  width: 100%;
  max-width: 600px;
  border: 1px solid rgba(199, 154, 69, 0.12);
  border-radius: 2px;
  display: block;
}

.fiche-pdf-link {
  margin-top: 0.5rem;
}

/* ── Lightbox modal ──────────────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(10, 8, 6, 0.95);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox.open {
  display: flex;
}

.lightbox-img-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100vw - 140px);
  max-height: calc(100vh - 100px);
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: calc(100vh - 100px);
  object-fit: contain;
  display: block;
  user-select: none;
}

.lightbox-close {
  position: fixed;
  top: 1.2rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 9010;
  padding: 0.3rem 0.6rem;
}

.lightbox-close:hover {
  color: var(--or);
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30,24,20,0.6);
  border: 1px solid rgba(199, 154, 69, 0.25);
  color: var(--or-clair);
  font-size: 1.5rem;
  width: 48px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
  z-index: 9010;
  user-select: none;
}

.lightbox-nav:hover {
  background: rgba(199, 154, 69, 0.2);
  color: var(--or);
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-nav.hidden { opacity: 0; pointer-events: none; }

.lightbox-counter {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
}

@media (max-width: 600px) {
  .lightbox-img-wrap {
    max-width: 100vw;
    max-height: calc(100vh - 80px);
    padding: 0 0.5rem;
  }

  .lightbox-img-wrap img {
    max-height: calc(100vh - 80px);
  }

  .lightbox-nav {
    width: 36px;
    height: 48px;
    font-size: 1.2rem;
    background: rgba(10, 8, 6, 0.55);
    border: none;
  }

  .lightbox-prev { left: 0.3rem; }
  .lightbox-next { right: 0.3rem; }

  .lightbox-close {
    top: 0.8rem;
    right: 0.8rem;
    font-size: 1.6rem;
  }
}

/* Curseur zoom sur les images cliquables */
.gallery-img-main,
.gallery-thumb,
.fiche-page-img {
  cursor: zoom-in;
}

.btn-outline-or {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(199, 154, 69, 0.5);
  color: var(--or-clair);
  padding: 0.7rem 1.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
}

.btn-outline-or:hover {
  background: var(--or);
  color: var(--noir);
}
