/* ============================================================
   DIEU EST DIEU — Styles
   Apple-style: off-white bg, gold accents, dark text
   ============================================================ */

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

:root {
  --bg:        #F5F5F7;
  --surface:   #FFFFFF;
  --gold:      #C9A23F;
  --gold-dark: #A8832A;
  --dark:      #1D1D1F;
  --mid:       #3D3D3F;
  --muted:     #86868B;
  --border:    #E0E0E0;
  --radius:    20px;
  --radius-sm: 12px;
  --font:      -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

html { font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--dark);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── NAVIGATION ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(245,245,247,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}
.logo-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}
.logo-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1;
  white-space: nowrap;
}
.logo-sub {
  font-family: 'Dancing Script', cursive;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.3;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--mid);
  text-decoration: none;
  transition: color .15s;
}
.nav-links a:hover { color: var(--dark); }
.nav-links a.contact {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #25D366;
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  transition: opacity .15s;
}
.nav-links a.contact:hover { opacity: .88; }

/* ── VIEW SYSTEM ── */
.view { display: none; }
.view.active { display: block; }

/* ── HERO ── */
.hero {
  text-align: center;
  padding: 52px 24px 32px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.hero h1 {
  font-size: 32px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
  letter-spacing: -.5px;
}
.tagline {
  font-size: 15px;
  color: var(--muted);
}

/* ── IMAGE WRAPPER ── */
.image-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px 40px;
  gap: 16px;
}

.image-card {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1125 / 2436;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 8px 32px rgba(0,0,0,.10);
  position: relative;
}
.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder cross */
.no-image {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: linear-gradient(160deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 32px;
}
.cross {
  width: 44px;
  height: 44px;
  position: relative;
}
.cross::before, .cross::after {
  content: '';
  position: absolute;
  background: var(--gold);
  border-radius: 3px;
}
.cross::before { width: 6px; height: 100%; left: 50%; transform: translateX(-50%); }
.cross::after  { width: 100%; height: 6px; top: 33%; }
.no-image blockquote {
  font-size: 13px;
  color: rgba(255,255,255,.9);
  text-align: center;
  font-style: italic;
  line-height: 1.6;
}
.no-image cite {
  font-size: 11px;
  color: var(--gold);
  font-style: normal;
  letter-spacing: 1px;
}

/* Format selector */
.format-selector {
  display: flex;
  gap: 8px;
}
.fmt-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  color: var(--mid);
  cursor: pointer;
  transition: all .15s;
}
.fmt-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,162,63,.07);
}
.fmt-btn:hover:not(.active) { border-color: var(--dark); color: var(--dark); }

.format-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .5px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-dark  { background: var(--dark); color: #fff; }
.btn-dark:hover:not(:disabled)  { background: var(--mid); }
.btn-gold  { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-dark); }
.btn-wa    { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1ebe59; }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { color: var(--dark); border-color: var(--dark); }
.btn-full { width: 100%; }
.btn-sm   { padding: 8px 16px; font-size: 12px; }
.btn-danger { background: #FF3B30; color: #fff; }
.btn-danger:hover { background: #d4322a; }

/* ── ARCHIVE / GRID ── */
.archive-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.section-header, .page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark);
}
.see-all {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--gold);
  cursor: pointer;
  padding: 0;
}
.see-all:hover { text-decoration: underline; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.grid-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  aspect-ratio: 1125 / 2436;
  position: relative;
}
.grid-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
.grid-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.grid-card .card-date {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px 10px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  text-align: center;
}

/* Skeleton */
.grid-skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, #e8e8e8 25%, #f0f0f0 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  aspect-ratio: 1125 / 2436;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Month filters */
.month-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.month-btn {
  padding: 6px 14px;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  color: var(--mid);
  cursor: pointer;
  transition: all .15s;
  text-transform: capitalize;
}
.month-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,162,63,.07);
}

.load-more {
  display: block;
  margin: 24px auto 0;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 500;
  color: var(--mid);
  cursor: pointer;
  transition: all .15s;
}
.load-more:hover { border-color: var(--dark); color: var(--dark); }

/* ── MODAL / VIEWS ── */
#view-prompt, #view-form, #view-confirmation, #view-done, #view-about {
  min-height: calc(100vh - 57px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
#view-prompt.active, #view-form.active, #view-confirmation.active,
#view-done.active, #view-about.active { display: flex; }

.modal-inner {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 36px 32px 32px;
  box-shadow: 0 12px 48px rgba(0,0,0,.10);
}
.modal-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
}
.modal-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.35;
  margin-bottom: 10px;
}
.modal-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ── FORM ── */
.form-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.form-row   { display: flex; gap: 8px; }
.field {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  color: var(--dark);
  background: var(--bg);
  outline: none;
  transition: border-color .15s;
}
.field:focus { border-color: var(--gold); background: #fff; }
.field-cc   { width: 72px; flex-shrink: 0; }
.form-note  { font-size: 11px; color: var(--muted); text-align: center; margin-top: 10px; }

/* ── CONFIRMATION ── */
#view-confirmation .modal-inner {
  text-align: center;
}
#view-confirmation .wa-preview {
  text-align: left;
}
.success-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.wa-preview {
  background: #ECE5DD;
  border-radius: 16px;
  padding: 16px;
  margin: 20px 0 24px;
}
.wa-preview .sender {
  font-size: 12px;
  font-weight: 700;
  color: #25D366;
  margin-bottom: 6px;
}
.wa-preview .message {
  font-size: 13px;
  line-height: 1.6;
  color: var(--dark);
}
.wa-preview .time {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  margin-top: 6px;
}

/* ── COUNTDOWN OVERLAY ── */
#countdown-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.45);
  border-radius: var(--radius);
  gap: 6px;
  z-index: 2;
}
.cd-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
}
.cd-time {
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 3px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.cd-sub {
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 1px;
}

/* ── MONTH BLOCKS (homepage) ── */
.month-block {
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  border: 1.5px solid var(--border);
}
.month-block:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  border-color: var(--gold);
}
.month-block-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  text-transform: capitalize;
}

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.92);
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.lightbox.active { display: flex; }

.lb-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  font-size: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  z-index: 10;
  font-family: var(--font);
}
.lb-close:hover { background: rgba(255,255,255,.25); }

.lb-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  width: 100%;
  max-width: 520px;
  padding: 56px 16px 0;
  overflow: hidden;
  min-height: 0;
}

.lb-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
}

.lb-img-wrap img {
  max-height: calc(100vh - 160px);
  max-width: 100%;
  border-radius: 16px;
  object-fit: contain;
  display: block;
}

.lb-arrow {
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  font-size: 30px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s, opacity .15s;
  line-height: 1;
  font-family: var(--font);
}
.lb-arrow:hover:not(:disabled) { background: rgba(255,255,255,.30); }
.lb-arrow:disabled { opacity: .2; cursor: default; }

.lb-footer {
  width: 100%;
  max-width: 520px;
  padding: 14px 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lb-date {
  font-size: 13px;
  color: rgba(255,255,255,.65);
  font-weight: 500;
}


/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 20px;
}
.footer-social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
}
.footer-social a {
  color: var(--muted);
  transition: color .2s;
  display: flex;
  align-items: center;
}
.footer-social a:hover { color: var(--gold); }
.footer-copy { font-size: 12px; color: var(--muted); }

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  nav { padding: 12px 16px; }
  .nav-links { gap: 12px; }
  .nav-links a:not(.contact) { display: none; }
  .hero { padding: 36px 16px 24px; }
  .hero h1 { font-size: 26px; }
  .archive-section { padding: 0 16px 48px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .modal-inner { padding: 28px 20px 24px; }
  .image-card { max-width: 260px; }
  .lb-arrow { width: 36px; height: 36px; font-size: 24px; }
  .lb-main { gap: 6px; padding: 52px 8px 0; }
  .lb-footer { padding: 10px 12px 20px; }
  .lb-date { font-size: 12px; }
}
