/* ============================================================
   EGB Photographie — Gallery Card (L1 / L2 / L3)
   Modèle : tirage encadré sur fond blanc galerie
   ============================================================ */

/* ---- Page ---- */
.egb-cat-page {
  background: #ffffff;
  min-height: 80vh;
  padding-bottom: 80px;
}

/* ---- Header ---- */
.egb-cat-header {
  padding: 56px 0 28px;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 24px;
}
.egb-cat-header h1 {
  color: #111111;
  margin: 0 0 16px;
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 3px;
}

/* ---- Breadcrumb + lien retour sur la même ligne ---- */
.egb-breadcrumb-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
  margin-bottom: 0;
}
.egb-breadcrumb {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.egb-breadcrumb li              { font-size: .875rem; letter-spacing: .5px; color: #666; }
.egb-breadcrumb li a            { color: #666; text-decoration: none; transition: color .2s; font-size: .875rem; }
.egb-breadcrumb li a:hover      { color: #111; }
.egb-breadcrumb li.active       { color: #222; font-weight: 500; }
.egb-breadcrumb li::before      { content: '/'; margin-right: 6px; color: #bbb; }
.egb-breadcrumb li:first-child::before { display: none; }

/* ---- Retour ---- */
.egb-back       { display: inline-flex; align-items: center; color: #888; font-size: .75rem; letter-spacing: 1.5px; text-transform: uppercase; text-decoration: none; transition: color .2s; }
.egb-back:hover { color: #111; }
.egb-filters {
  display: flex; align-items: center;
  margin-bottom: 24px; border-bottom: 2px solid #d0d0d0;
  gap: 4px;
  /* Évite que les liens (Tout/Alpes/…/Paris) débordent la page sur mobile :
     barre d'onglets défilable horizontalement au lieu de casser la largeur. */
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;          /* Firefox */
}
.egb-filters::-webkit-scrollbar { display: none; }  /* Chrome/Safari */
.egb-filters a {
  display: inline-block; padding: 11px 22px 11px 0; margin-right: 4px;
  font-size: .8rem; letter-spacing: 2px; text-transform: uppercase;
  text-decoration: none; color: #333; font-weight: 500;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: color .2s, border-color .2s;
  white-space: nowrap; flex: 0 0 auto;   /* pas de compression / retour ligne */
}
.egb-filters a:hover       { color: #000; }
.egb-filters a.active      { color: #000; border-bottom-color: #000; }

/* ============================================================
   GRILLE DE PHOTOS — tirage encadré
   ============================================================ */

.egb-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 32px;
  row-gap: 48px;
}
@media (max-width: 768px) { .egb-grid { grid-template-columns: 1fr; column-gap: 0; row-gap: 36px; } }

/* ---- Carte ---- */
.egb-card {
  display: block;
  text-decoration: none;
}

/* Fond neutre — la "carte" sur laquelle le cadre est posé */
.egb-card-img {
  background: #F0EEED;
  padding: 24px 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
  transition: transform .4s ease, box-shadow .4s ease;
}
.egb-card:hover .egb-card-img {
  transform: translateY(-5px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

/* Le cadre — fin, sombre */
.egb-frame {
  border: 6px solid #303030;
  background: #ffffff;
  padding: 12px;
  box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.20);
}

/* Zone image — proportions naturelles, pas de recadrage */
.egb-frame-inner {
  overflow: hidden;
}
.egb-frame-inner img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .7s cubic-bezier(.25, .46, .45, .94);
}
.egb-card:hover .egb-frame-inner img {
  transform: scale(1.04);
}

/* ---- Caption ---- */
.egb-card-caption { padding: 12px 2px 0; }
.egb-card-title {
  color: #111; font-size: 1rem; font-weight: 600;
  letter-spacing: .1px; margin: 0 0 5px; line-height: 1.3;
  transition: color .2s;
}
.egb-card:hover .egb-card-title { color: #000; }

.egb-card-price {
  color: #333; font-size: .88rem; margin: 0; letter-spacing: .2px; font-weight: 500;
}

/* ---- Badge "Coup de cœur" ---- */
.egb-badge {
  display: inline-block;
  font-size: .6rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 400;
  color: #111;
  border-bottom: 1px solid #111;
  padding-bottom: 2px;
  margin-bottom: 10px;
  background: none;
}

/* ---- Intro SEO ---- */
.egb-seo-intro {
  color: #555; font-size: .95rem; line-height: 1.85;
  margin-bottom: 24px;
  font-weight: 300; letter-spacing: .2px;
}
/* Contenu RichText interne */
.egb-seo-intro > :first-child { margin-top: 0; }
.egb-seo-intro > :last-child { margin-bottom: 0; }
.egb-seo-intro p { margin: 0 0 .9em; }
.egb-seo-intro h2,
.egb-seo-intro h3,
.egb-seo-intro h4 {
  color: #222; font-weight: 500; line-height: 1.3;
  margin: 1.2em 0 .5em; letter-spacing: 0;
}
.egb-seo-intro ul,
.egb-seo-intro ol { margin: 0 0 .9em 1.2em; }
.egb-seo-intro li { margin-bottom: .3em; }
.egb-seo-intro a { color: inherit; text-decoration: underline; }
.egb-seo-intro a:hover { color: #111; }
.egb-seo-intro blockquote {
  margin: 1em 0; padding-left: 1em;
  border-left: 2px solid #ddd; font-style: italic;
}

/* ---- Intro SEO : « Lire plus » mobile ----
   Le texte complet reste TOUJOURS dans le DOM (uniquement tronqué visuellement
   via line-clamp) → aucun impact SEO. Toggle 100 % CSS, fonctionne sans JS. */
.egb-seo-toggle {              /* case à cocher cachée mais focusable */
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
/* Troncature + « Lire plus » à TOUTES les largeurs (desktop inclus).
   Robuste (compatible contenu RichText multi-blocs + iOS Safari) : on évite
   -webkit-line-clamp qui ne tronque pas un enfant bloc <p>.
   Le texte complet reste TOUJOURS dans le DOM (aucun impact SEO). */
.egb-seo-intro {
  position: relative;
  max-height: 7.4em;            /* ~4 lignes à line-height 1.85 */
  overflow: hidden;
  margin-bottom: 6px;
}
.egb-seo-intro::after {         /* fondu de bas indiquant la suite */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2.4em;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
  pointer-events: none;
}
.egb-seo-toggle:checked ~ .egb-seo-intro {
  max-height: none;
  overflow: visible;
}
.egb-seo-toggle:checked ~ .egb-seo-intro::after { display: none; }
.egb-seo-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #111;
  cursor: pointer;
  border-bottom: 1px solid #111;
  padding-bottom: 2px;
}
.egb-seo-more::after { content: "Lire plus"; }
.egb-seo-more::before {
  content: "\25BE";              /* chevron ▾ */
  font-size: .7rem;
  line-height: 1;
  transition: transform .2s;
}
.egb-seo-toggle:checked ~ .egb-seo-more::after  { content: "Lire moins"; }
.egb-seo-toggle:checked ~ .egb-seo-more::before { transform: rotate(180deg); }
.egb-seo-toggle:focus-visible ~ .egb-seo-more {
  outline: 2px solid #111;
  outline-offset: 3px;
}
/* Le texte tient dans la zone tronquée → bouton inutile (classe posée en JS) */
.egb-seo-block.egb-seo-fits .egb-seo-more { display: none; }
.egb-seo-block.egb-seo-fits .egb-seo-intro { max-height: none; overflow: visible; }
.egb-seo-block.egb-seo-fits .egb-seo-intro::after { display: none; }

/* ---- Maillage ---- */
.egb-maillage       { margin-top: 40px; padding-top: 24px; border-top: 1px solid #e8e8e8; }
.egb-maillage-label { color: #555; font-size: .7rem; letter-spacing: 2.5px; text-transform: uppercase; margin-bottom: 16px; }
.egb-maillage a     { color: #111; font-size: .9rem; text-decoration: none; margin-right: 20px; border-bottom: 1px solid #bbb; padding-bottom: 1px; transition: border-color .2s, color .2s; }
.egb-maillage a:hover { color: #000; border-bottom-color: #111; }



/* ---- État vide ---- */
.egb-empty            { text-align: center; padding: 100px 0; }
.egb-empty-label      { color: #bbb; font-size: .72rem; letter-spacing: 3px; text-transform: uppercase; margin: 0 0 12px; }
.egb-empty-text       { color: #888; font-size: .85rem; margin: 0 0 30px; }
.egb-empty a          { color: #666; font-size: .8rem; letter-spacing: 1px; text-decoration: none; border-bottom: 1px solid #ccc; padding-bottom: 2px; transition: color .2s; }
.egb-empty a:hover    { color: #222; }
