/* ============================================================
   Mariage — style épuré, magazine, noir & blanc
   ============================================================ */

:root {
  --bg:        #ffffff;
  --bg-soft:   #f6f5f3;
  --ink:       #111111;
  --ink-soft:  #5a5a5a;
  --muted:     #9a968f;
  --line:      #e5e3de;
  --accent:    #111111;

  --font-sans:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Archivo", "Inter", system-ui, sans-serif;

  --maxw: 1440px;
  --pad-x: clamp(20px, 4vw, 64px);
  --radius: 2px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font-family: inherit; cursor: pointer; }

.kicker {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

.display {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(44px, 8vw, 128px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0;
}

.display-sm {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(26px, 3.4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
}

.muted { color: var(--muted); }

/* ========= Nav ========= */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad-x);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-brand {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 15px;
}
.nav-links {
  display: flex; gap: 24px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { white-space: nowrap; transition: color .2s; }
.nav-links a:hover,
.nav-links a.is-active { color: var(--ink); }
.nav-links a.is-active { border-bottom: 1px solid var(--ink); padding-bottom: 2px; }

/* ========= Hero ========= */
.hero {
  position: relative;
  min-height: 92vh;
  background-size: cover;
  background-position: center;
  color: #fff;
  display: flex; align-items: center;
  filter: grayscale(0.15) contrast(1.02);
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.45) 60%, rgba(0,0,0,.65) 100%);
}
.hero-inner {
  position: relative; z-index: 2;
  width: 100%;
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--pad-x);
  text-align: center;
}
.hero .kicker { color: rgba(255,255,255,.8); }
.hero .display { color: #fff; }
.hero-date {
  margin-top: 24px;
  font-size: 14px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255,255,255,.88);
}
.hero-baseline {
  margin-top: 22px;
  font-style: italic;
  font-weight: 300;
  opacity: 0.85;
}
.hero-arrow {
  display: inline-flex; margin-top: 60px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 999px;
  color: #fff;
  transition: transform .3s, background .3s;
  animation: bob 2.2s ease-in-out infinite;
}
.hero-arrow:hover { background: rgba(255,255,255,.15); transform: translateY(2px); }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* ========= Albums section ========= */
.albums {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(80px, 10vw, 160px) var(--pad-x);
}
.section-head { margin-bottom: 64px; text-align: center; }

.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: clamp(28px, 3vw, 56px) clamp(20px, 2vw, 32px);
}
.album-card {
  display: block;
  position: relative;
  transition: transform .5s cubic-bezier(.2,.6,.2,1);
}
.album-card:hover { transform: translateY(-6px); }
.album-cover {
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--bg-soft);
}
.album-cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .9s ease, filter .6s ease;
  filter: grayscale(0.1);
}
.album-card:hover .album-cover img { transform: scale(1.04); filter: grayscale(0); }
.album-meta {
  display: flex; align-items: baseline; gap: 16px;
  padding-top: 18px;
}
.album-num {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.album-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  margin: 0;
  flex: 1;
  letter-spacing: -0.005em;
}
.album-count {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ========= Album page ========= */
.album-head {
  text-align: center;
  padding: clamp(60px, 8vw, 120px) var(--pad-x) clamp(40px, 5vw, 72px);
  max-width: var(--maxw); margin: 0 auto;
}

.gallery {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x) clamp(60px, 8vw, 120px);
  columns: 3;
  column-gap: 12px;
}
@media (max-width: 900px) { .gallery { columns: 2; } }
@media (max-width: 560px) { .gallery { columns: 1; } }

.gallery-item {
  break-inside: avoid;
  margin: 0 0 12px;
  background: var(--bg-soft);
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
}
.gallery-item img {
  width: 100%;
  transition: transform .5s ease, opacity .4s ease;
  opacity: 0;
}
.gallery-item img.loaded { opacity: 1; }
.gallery-item:hover img { transform: scale(1.02); }

/* ========= Album navigation ========= */
.album-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) var(--pad-x);
  border-top: 1px solid var(--line);
}
.album-nav-btn {
  display: flex; flex-direction: column; gap: 6px;
  transition: transform .3s;
}
.album-nav-btn.prev { text-align: left; }
.album-nav-btn.next { text-align: right; justify-self: end; }
.album-nav-btn:hover { transform: translateY(-2px); }
.album-nav-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
}
.album-nav-home {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 10px 18px;
  transition: all .2s;
}
.album-nav-home:hover { border-color: var(--ink); color: var(--ink); }

@media (max-width: 720px) {
  .album-nav { grid-template-columns: 1fr; text-align: center; }
  .album-nav-btn.prev, .album-nav-btn.next { text-align: center; justify-self: center; }
}

/* ========= Footer ========= */
.site-foot {
  padding: 64px var(--pad-x);
  text-align: center;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
}
.site-foot p { margin: 0 0 6px; }
.site-foot .muted { font-style: italic; font-size: 12px; }

/* ========= Lightbox ========= */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8, 8, 8, 0.97);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox[hidden] { display: none; }

.lb-stage {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(60px, 8vh, 110px) clamp(70px, 8vw, 120px);
}
.lb-img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
  transition: opacity .25s ease;
}
.lb-img.is-loading { opacity: 0.3; }

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: transparent;
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  border-radius: 50%;
  transition: all .2s ease;
  z-index: 2;
}
.lb-close {
  top: 20px; right: 20px;
  width: 44px; height: 44px;
  font-size: 16px;
}
.lb-prev, .lb-next {
  top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px;
  font-size: 28px; line-height: 1;
  font-family: var(--font-sans);
  font-weight: 300;
}
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.6);
}

.lb-info {
  position: absolute; bottom: 22px; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: rgba(255,255,255,.78);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  z-index: 2;
}
.lb-download {
  color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.3);
  padding: 7px 14px;
  transition: all .2s;
}
.lb-download:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }

@media (max-width: 640px) {
  .lb-stage { padding: 70px 10px 110px; }
  .lb-prev, .lb-next { width: 42px; height: 42px; font-size: 22px; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
  .lb-close { top: 14px; right: 14px; width: 40px; height: 40px; }
}

/* ========= Login page ========= */
body.login {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft);
}
.login-box {
  text-align: center;
  padding: 48px 40px;
  background: #fff;
  border: 1px solid var(--line);
  max-width: 420px; width: 90%;
}
.login-box .display { font-size: clamp(36px, 6vw, 56px); }
.login-form {
  margin-top: 32px;
  display: flex; flex-direction: column; gap: 14px;
}
.login-form label {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
}
.login-form input {
  font-family: inherit;
  font-size: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}
.login-form input:focus { outline: none; border-color: var(--ink); }
.login-form button {
  margin-top: 8px;
  padding: 14px;
  background: var(--ink);
  color: #fff;
  border: none;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  transition: background .2s;
}
.login-form button:hover { background: #000; }
.error { color: #a94444; font-size: 13px; margin: 0; text-align: left; }
