/* PSM Galeries : reprend les polices et couleurs du thème ; --psm-accent pour les éléments mis en valeur */
.psm-gal { --psm-accent: #C8B296; --psm-line: rgba(127, 127, 127, .3); max-width: 1200px; margin: 0 auto; }
.psm-gal h2 { margin: 0 0 .2em; }
.psm-gal .psm-ev-date { margin: 0; opacity: .7; }
.psm-gal .psm-note { opacity: .8; }

.psm-btn {
  display: inline-block; text-align: center; line-height: 1.3;
  padding: .7em 1.3em; border: 2px solid var(--psm-accent); border-radius: 6px;
  background: var(--psm-accent); color: #1a1a1a; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.psm-btn:hover { filter: brightness(.95); }
.psm-btn:disabled { opacity: .45; cursor: default; }
.psm-btn-ghost { background: transparent; color: inherit; }
.psm-link, .psm-back { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Liste des événements : noms et dates seulement */
.psm-events { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.psm-events a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap;
  padding: 18px 20px; border: 1px solid var(--psm-line); border-left: 4px solid var(--psm-accent); border-radius: 6px;
  color: inherit; text-decoration: none;
}
.psm-events a:hover { border-color: var(--psm-accent); }
.psm-ev-name { font-weight: 600; font-size: 1.1em; }

/* Mot de passe */
.psm-login { max-width: 420px; margin: 0 auto 1.5em; padding: 28px; border: 1px solid var(--psm-line); border-top: 4px solid var(--psm-accent); border-radius: 6px; display: grid; gap: 10px; }
.psm-login label { font-weight: 600; margin-top: 10px; }
.psm-login input[type="password"] { width: 100%; padding: .7em; font: inherit; border: 1px solid var(--psm-line); border-radius: 6px; box-sizing: border-box; }
.psm-error { color: #c62828; margin: 0; font-weight: 600; }

/* Galerie */
.psm-head { margin-bottom: 14px; }
.psm-search { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; padding: 14px 16px; border: 1px solid var(--psm-line); border-radius: 6px; }
.psm-search label { font-weight: 600; }
.psm-search input { width: 8em; padding: .6em; font: inherit; font-size: 1.1em; border: 1px solid var(--psm-line); border-radius: 6px; }
.psm-count { margin: 0 0 12px; font-weight: 600; }
.psm-zip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.psm-zip-hint { font-size: .85em; opacity: .7; }
.psm-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.psm-item { margin: 0; }
.psm-thumb { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 4px; background: rgba(127, 127, 127, .12); }
.psm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.psm-thumb:hover img { transform: scale(1.03); }
.psm-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 2px 0; font-size: .9em; }
.psm-pick { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.psm-item.is-picked .psm-thumb { outline: 3px solid var(--psm-accent); outline-offset: 2px; }
.psm-dl { color: inherit; margin-left: auto; }
.psm-pages { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0; }
.psm-page { min-width: 2.4em; padding: .4em .6em; text-align: center; border: 1px solid var(--psm-line); border-radius: 4px; color: inherit; text-decoration: none; }
.psm-page.is-current { background: var(--psm-accent); border-color: var(--psm-accent); color: #1a1a1a; font-weight: 600; }

/* Agrandissement */
.psm-lightbox { position: fixed; inset: 0; z-index: 100000; background: rgba(10, 10, 12, .94); display: flex; align-items: center; justify-content: center; }
.psm-lightbox[hidden] { display: none; }
.psm-lightbox img { max-width: 92vw; max-height: 82vh; object-fit: contain; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.psm-lb-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 12px; padding: 16px; }
.psm-lb-btn { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .3); border-radius: 6px; padding: .6em 1.1em; font: inherit; cursor: pointer; text-decoration: none; }
.psm-lb-btn:hover { background: rgba(255, 255, 255, .22); }
.psm-lb-close { position: absolute; top: 14px; right: 16px; }
.psm-lb-prev, .psm-lb-next { position: absolute; top: 50%; transform: translateY(-50%); font-size: 1.6em; padding: .3em .7em; }
.psm-lb-prev { left: 12px; }
.psm-lb-next { right: 12px; }
@media (max-width: 600px) {
  .psm-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .psm-lb-prev, .psm-lb-next { top: auto; bottom: 70px; transform: none; }
}
