/* Ajouts propres au site Astro (le reste du design vient de wordpress.css et theme.css) */

/* ---------- Visionneuse des photos ---------- */
.crz-vis-ouverte { overflow: hidden; }
.crz-vis {
  position: fixed; inset: 0; z-index: 100000;
  display: grid; grid-template-rows: auto 1fr auto auto;
  background: #e6e4e0; color: #4a4744; padding: 14px 16px 10px;
  font-family: var(--crz-police);
}
.crz-vis[hidden] { display: none; }
.crz-vis-fermer {
  position: absolute; top: 8px; right: 12px; z-index: 2;
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  color: #363636 !important; font-size: 34px !important; line-height: 1; padding: 4px 10px !important; cursor: pointer;
}
.crz-vis-titre { margin: 0 48px 8px; text-align: center; font-size: 17px; font-weight: 700; line-height: 1.3; min-height: 1.3em; }
.crz-vis-scene { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; }
.crz-vis-img { max-width: calc(100vw - 120px); max-height: calc(100vh - 240px); width: auto; height: auto; object-fit: contain; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
.crz-vis-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  color: #363636 !important; font-size: 52px !important; line-height: 1; padding: 0 12px !important; cursor: pointer;
}
.crz-vis-nav:hover, .crz-vis-fermer:hover { color: var(--crz-orange) !important; }
.crz-vis-prec { left: 0; }
.crz-vis-suiv { right: 0; }
.crz-vis-infos { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 12px; margin: 10px auto 6px; width: min(100%, 1100px); }
.crz-vis-diapo {
  justify-self: start; background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 2px 4px !important;
  font-size: 14px !important; font-weight: 700; letter-spacing: .04em; text-transform: none !important; color: #7d7a75 !important; cursor: pointer;
}
.crz-vis-diapo:hover { color: var(--crz-orange) !important; }
.crz-vis-diapo span { font-size: 11px; margin-right: 3px; }
.crz-vis-legende { margin: 0; text-align: center; font-size: 15px; line-height: 1.35; color: #7d7a75; }
.crz-vis-compteur { margin: 0; justify-self: end; font-size: 14px; font-weight: 700; letter-spacing: .06em; color: #7d7a75; }
.crz-vis-vignettes { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; justify-content: safe center; padding-bottom: 2px; }
.crz-vis-vignette {
  flex: 0 0 auto; width: 78px; height: 52px; padding: 0 !important; border: 2px solid transparent !important; border-radius: 3px;
  background: #ccc !important; overflow: hidden; cursor: pointer; opacity: .55; transition: opacity .2s ease, border-color .2s ease;
}
.crz-vis-vignette:hover { opacity: .9; }
.crz-vis-vignette.actif { opacity: 1; border-color: var(--crz-orange) !important; }
.crz-vis-vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 600px) {
  .crz-vis { padding: 10px 8px 8px; }
  .crz-vis-img { max-width: calc(100vw - 24px); max-height: calc(100vh - 220px); }
  .crz-vis-nav { font-size: 40px !important; padding: 0 4px !important; color: #fff !important; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
  .crz-vis-vignette { width: 58px; height: 40px; }
  .crz-vis-infos { grid-template-columns: auto 1fr auto; }
}


/* ---------- Recherche et page 404 ---------- */
#crz-recherche { --pagefind-ui-primary: #c8700a; --pagefind-ui-font: var(--crz-police); --pagefind-ui-scale: .95; padding: 1em 0 2em; }
#crz-recherche .pagefind-ui__result-link { color: #363636; }
#crz-recherche .pagefind-ui__result-link:hover { color: #c8700a; }
#crz-recherche mark { background: #f3d2a6; }
.crz-404-recherche { display: flex; gap: .5em; max-width: 520px; margin: 1em 0; }
.crz-404-recherche input { flex: 1; border: 1px solid #d6d2cc; padding: .5em .7em; font: inherit; }
.crz-vide { padding: 1em 20px; color: #8a8580; }
