/* ==========================================================================
   Les Chemins Vers Compostelle — Photos
   Palette : jaune Compostelle (flèche du chemin), terre (sentier), coquille
   (parchemin), nuit (texte). Signature : la "borne" (coquille + flèche
   jaune) reprise comme séparateur entre les étapes, comme un vrai balisage.
   ========================================================================== */

:root{
  --jaune-chemin: #F2A900;   /* flèche jaune du Camino */
  --jaune-chemin-clair: #FBD877;
  --terre: #7A4B28;          /* sentier de terre battue */
  --terre-clair: #B08256;
  --coquille: #FBF3E4;       /* fond parchemin / coquille */
  --coquille-ombre: #F1E4CC;
  --nuit: #2E2013;           /* texte principal, marron très foncé */
  --sauge: #5C7A52;          /* accent nature, discret */
  --blanc: #FFFDF8;

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Work Sans", "Segoe UI", sans-serif;

  --rayon: 14px;
  --ombre: 0 6px 20px rgba(46, 32, 19, 0.12);
  --ombre-forte: 0 10px 30px rgba(46, 32, 19, 0.22);
}

@media (prefers-reduced-motion: no-preference){
  html{ scroll-behavior: smooth; }
}

*, *::before, *::after{ box-sizing: border-box; }

body{
  margin: 0;
  background: var(--coquille);
  color: var(--nuit);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img{ max-width: 100%; display: block; }

a{ color: inherit; }

.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;
}

a:focus-visible, button:focus-visible{
  outline: 3px solid var(--jaune-chemin);
  outline-offset: 2px;
}

/* ---------------------------- Header ---------------------------- */

.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--blanc);
  border-bottom: 1px solid var(--coquille-ombre);
}

.header-inner{
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--nuit);
}

.brand-mark{ width: 44px; height: 44px; flex: none; border-radius: 50%; }

.brand-text{
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  font-size: 1rem;
}
.brand-text small{
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--terre);
  letter-spacing: .02em;
}

.nav-toggle{
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: none;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span{
  display: block;
  height: 2px;
  width: 24px;
  margin: 0 auto;
  background: var(--nuit);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

.main-nav{
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--blanc);
  border-bottom: 1px solid var(--coquille-ombre);
  display: flex;
  flex-direction: column;
  padding: 6px 16px 14px;
  gap: 4px;
  transform-origin: top;
  transform: scaleY(0);
  opacity: 0;
  pointer-events: none;
  transition: transform .18s ease, opacity .18s ease;
}
.main-nav.is-open{
  transform: scaleY(1);
  opacity: 1;
  pointer-events: auto;
}
.main-nav a{
  text-decoration: none;
  padding: 10px 6px;
  border-radius: 8px;
  font-weight: 500;
}
.main-nav a:hover{ background: var(--coquille); }

@media (min-width: 760px){
  .nav-toggle{ display: none; }
  .main-nav{
    position: static;
    flex-direction: row;
    background: none;
    border: none;
    padding: 0;
    gap: 4px;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
}

/* ---------------------------- Hero ---------------------------- */

.hero{
  padding: 40px 16px 28px;
  text-align: center;
}
.hero-eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--terre);
  font-weight: 600;
}
.hero h1{
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin: .4em 0 .3em;
  color: var(--nuit);
}
.hero p{
  max-width: 60ch;
  margin: 0 auto;
  color: var(--terre);
  font-size: 1.02rem;
}
.hero-stats{
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}
.hero-stats div{ text-align: center; }
.hero-stats strong{
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--jaune-chemin);
  -webkit-text-stroke: .5px var(--terre);
}
.hero-stats span{
  font-size: .78rem;
  color: var(--terre);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* -------------------- Navigation rapide (chips) -------------------- */

.quick-nav{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 4px 16px 22px;
}
.quick-nav a{
  flex: none;
  width: max-content;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--blanc);
  border: 1px solid var(--coquille-ombre);
  white-space: nowrap;
}
.quick-nav a:hover{
  border-color: var(--jaune-chemin);
  background: var(--jaune-chemin-clair);
}

/* ---------------------------- Balise / séparateur ---------------------------- */

.balise{
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}
.balise::before,
.balise::after{
  content: "";
  flex: 1;
  height: 1px;
  background: var(--coquille-ombre);
}
.balise svg{ width: 26px; height: 26px; flex: none; }

.groupe-titre{
  max-width: 1180px;
  margin: 46px auto 6px;
  padding: 0 16px;
  font-family: var(--font-display);
  font-size: 1.5rem;
}
.groupe-soustitre{
  max-width: 1180px;
  margin: 0 auto 18px;
  padding: 0 16px;
  color: var(--terre);
  font-size: .92rem;
}

/* ---------------------------- Bandes de catégories ---------------------------- */

.categories{
  max-width: 1180px;
  margin: 0 auto;
  padding: 6px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.categorie{
  background: var(--blanc);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 18px 16px 20px;
}

.categorie-entete{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.categorie-numero{
  font-family: var(--font-display);
  color: var(--jaune-chemin);
  font-size: 1rem;
  font-weight: 600;
  margin-right: 8px;
}

.categorie-titres h2{
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 2px;
}
.categorie-titres p{
  margin: 0;
  font-size: .9rem;
  color: var(--terre);
}

.categorie-lien{
  flex: none;
  text-decoration: none;
  font-weight: 600;
  font-size: .88rem;
  color: var(--nuit);
  background: var(--jaune-chemin-clair);
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .15s ease, transform .15s ease;
}
.categorie-lien:hover{
  background: var(--jaune-chemin);
  transform: translateY(-1px);
}

.categorie-photos{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.categorie-photos a{
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--coquille-ombre);
}
.categorie-photos img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.categorie-photos a:hover img{ transform: scale(1.05); }

@media (min-width: 640px){
  .categorie-photos{
    grid-auto-columns: unset;
    grid-template-columns: repeat(4, 1fr);
    overflow-x: visible;
  }
}

/* ---------------------------- Page de catégorie ---------------------------- */

.hero-categorie{ padding-top: 28px; }

.fil-ariane{
  font-size: .82rem;
  color: var(--terre);
  margin: 0 0 10px;
}
.fil-ariane a{
  text-decoration: none;
  font-weight: 600;
  color: var(--terre);
}
.fil-ariane a:hover{ text-decoration: underline; }

.grille-photos{
  max-width: 1180px;
  margin: 10px auto 0;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.grille-photos figure{
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--coquille-ombre);
  box-shadow: var(--ombre);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.grille-photos img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.photo-declencheur{
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

/* ---------------------------- Lightbox ---------------------------- */

.lightbox{
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(46, 32, 19, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.lightbox.is-open{
  opacity: 1;
  pointer-events: auto;
}
.lightbox img{
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: var(--ombre-forte);
  cursor: zoom-out;
}
.lightbox-fermer{
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--blanc);
  color: var(--nuit);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-fermer:hover{ background: var(--jaune-chemin-clair); }

@media (min-width: 640px){
  .grille-photos{ grid-template-columns: repeat(3, 1fr); gap: 14px; }
}
@media (min-width: 1000px){
  .grille-photos{ grid-template-columns: repeat(4, 1fr); }
}

.retour-lien{
  max-width: 1180px;
  margin: 30px auto 10px;
  padding: 0 16px;
}
.retour-lien a{
  text-decoration: none;
  font-weight: 600;
  color: var(--nuit);
  background: var(--jaune-chemin-clair);
  padding: 10px 16px;
  border-radius: 999px;
  display: inline-block;
}
.retour-lien a:hover{ background: var(--jaune-chemin); }

/* ---------------------------- Footer ---------------------------- */

.site-footer{
  margin-top: 60px;
  background: var(--nuit);
  color: var(--coquille);
  padding: 32px 16px 26px;
}
.footer-inner{
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
}
.footer-inner a{
  color: var(--jaune-chemin-clair);
  text-decoration: none;
  font-size: .9rem;
}
.footer-inner a:hover{ text-decoration: underline; }
.footer-copy{
  font-size: .8rem;
  color: var(--terre-clair);
  width: 100%;
  margin-top: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 14px;
}
