/* ============================================================
   Fessi Photography — Design system
   ============================================================ */
:root {
  --bg:        #0d0d10;
  --bg-soft:   #14141a;
  --bg-card:   #1a1a22;
  --line:      rgba(255,255,255,.09);
  --cream:     #f5f1ea;
  --text:      #ece7df;
  --muted:     #a39c92;
  --gold:      #c8a97e;
  --gold-lt:   #e2c9a0;
  --danger:    #d9776b;
  --ok:        #7fae8a;
  --shadow:    0 20px 60px rgba(0,0,0,.45);
  --radius:    14px;
  --serif:     'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans:      'Poppins', 'Segoe UI', system-ui, sans-serif;
  --script:    'Great Vibes', 'Segoe Script', 'Brush Script MT', cursive;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; }
::selection { background: var(--gold); color: #14141a; }

.container { width: min(1200px, 92vw); margin-inline: auto; }
.eyebrow {
  font-size: .72rem; letter-spacing: .35em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 1rem;
}
.section { padding: clamp(4rem, 9vw, 8rem) 0; }
.section-title { font-size: clamp(2rem, 4.5vw, 3.4rem); margin-bottom: 1.2rem; }
.text-muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .95rem 2rem; border-radius: 100px; cursor: pointer;
  font-family: var(--sans); font-size: .82rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid var(--gold); background: transparent; color: var(--gold);
  transition: all .35s cubic-bezier(.2,.7,.3,1);
}
.btn:hover { background: var(--gold); color: #14141a; transform: translateY(-2px); }
.btn-solid { background: var(--gold); color: #14141a; }
.btn-solid:hover { background: var(--gold-lt); border-color: var(--gold-lt); }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: #fff; color: #14141a; border-color: #fff; }
.btn-sm { padding: .5rem 1.1rem; font-size: .7rem; }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- Navbar ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem clamp(1rem, 4vw, 3rem);
  transition: background .4s, padding .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(13,13,16,.85); backdrop-filter: blur(14px);
  padding-block: 1rem; border-color: var(--line);
}
.brand { font-family: var(--script); font-size: 2rem; font-weight: 400; letter-spacing: .01em; line-height: 1.1; display: inline-block; }
.brand span { color: var(--gold); }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text); opacity: .85; transition: opacity .3s; }
.nav-links a:hover { opacity: 1; color: var(--gold); }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 1.6rem; cursor: pointer; }

/* ---------- Hero / diaporama ---------- */
.hero { position: relative; height: 100vh; min-height: 620px; overflow: hidden; display: grid; place-items: center; }
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0;
  background-size: cover; background-position: center;
  transition: opacity 1.6s ease;
  transform: scale(1.05);
}
.hero-slide.active { opacity: 1; animation: kenburns 8s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.16); } }
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,13,16,.55) 0%, rgba(13,13,16,.35) 45%, rgba(13,13,16,.92) 100%);
}
.hero-content { position: relative; z-index: 2; text-align: center; padding: 0 1.5rem; max-width: 820px; }
.hero-content h1 { font-size: clamp(2.6rem, 7vw, 5.6rem); margin-bottom: 1.4rem; }
.hero-content h1 em { font-style: italic; color: var(--gold-lt); }
.hero-content p { color: var(--cream); font-size: clamp(1rem, 2vw, 1.2rem); max-width: 560px; margin: 0 auto 2.4rem; opacity: .9; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-dots { position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: .6rem; }
.hero-dots button { width: 34px; height: 3px; border: 0; background: rgba(255,255,255,.3); cursor: pointer; transition: background .3s; }
.hero-dots button.active { background: var(--gold); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Services / features ---------- */
.grid-3 { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.feature { padding: 2.4rem 2rem; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .4s, border-color .4s; }
.feature:hover { transform: translateY(-6px); border-color: var(--gold); }
.feature .icon { font-size: 1.8rem; margin-bottom: 1rem; }
.feature h3 { font-size: 1.35rem; margin-bottom: .6rem; }

/* ---------- Galerie ---------- */
.filters { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; margin-bottom: 2.5rem; }
.filter { padding: .5rem 1.2rem; border-radius: 100px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-family: var(--sans); font-size: .78rem; letter-spacing: .08em; text-transform: capitalize; transition: all .3s; }
.filter:hover { color: var(--text); }
.filter.active { background: var(--gold); color: #14141a; border-color: var(--gold); }
.masonry { columns: 3 260px; column-gap: 1rem; }
.masonry .tile { break-inside: avoid; margin-bottom: 1rem; position: relative; border-radius: 10px; overflow: hidden; cursor: pointer; }
.masonry .tile img, .masonry .tile video { width: 100%; transition: transform .6s ease; display: block; }
.masonry .tile:hover img { transform: scale(1.06); }
.tile .tile-info { position: absolute; inset: auto 0 0 0; padding: 1.4rem 1rem .9rem; background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff; opacity: 0; transition: opacity .35s; font-size: .85rem; }
.tile:hover .tile-info { opacity: 1; }
.tile .badge-video { position: absolute; top: .7rem; right: .7rem; background: rgba(0,0,0,.6); border-radius: 100px; padding: .2rem .7rem; font-size: .7rem; color: var(--gold-lt); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(8,8,10,.95); z-index: 200; display: none; place-items: center; padding: 3vw; }
.lightbox.open { display: grid; }
.lightbox img, .lightbox video { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: var(--shadow); }
.lightbox .close { position: absolute; top: 1.4rem; right: 1.8rem; font-size: 2rem; color: #fff; background: none; border: 0; cursor: pointer; }
.lightbox .nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); font-size: 2.4rem; color: #fff; background: none; border: 0; cursor: pointer; padding: 1rem; opacity: .7; }
.lightbox .nav-arrow:hover { opacity: 1; }
.lightbox .prev { left: 1rem; } .lightbox .next { right: 1rem; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(8,8,10,.82); backdrop-filter: blur(6px); z-index: 300; display: none; place-items: center; padding: 5vh 1rem; overflow-y: auto; }
.modal.open { display: grid; }
.modal-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); width: min(520px, 96vw); padding: 2.6rem; box-shadow: var(--shadow); position: relative; animation: pop .4s cubic-bezier(.2,.8,.3,1); }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-card h3 { font-size: 1.9rem; margin-bottom: .4rem; }
.modal-card .close { position: absolute; top: 1rem; right: 1.2rem; font-size: 1.6rem; background: none; border: 0; color: var(--muted); cursor: pointer; }

/* ---------- Forms ---------- */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .45rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .85rem 1rem; background: var(--bg); border: 1px solid var(--line);
  border-radius: 9px; color: var(--text); font-family: var(--sans); font-size: .95rem; transition: border-color .3s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field textarea { resize: vertical; min-height: 90px; }
.row-2 { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; }
.form-note { font-size: .82rem; color: var(--muted); }
.alert { padding: .8rem 1rem; border-radius: 9px; font-size: .88rem; margin-bottom: 1rem; }
.alert-error { background: rgba(217,119,107,.13); border: 1px solid rgba(217,119,107,.4); color: #eeb0a7; }
.alert-ok { background: rgba(127,174,138,.13); border: 1px solid rgba(127,174,138,.4); color: #b6d8bf; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 3rem 0; text-align: center; color: var(--muted); font-size: .85rem; }
.footer .brand { display: inline-block; margin-bottom: .8rem; color: var(--text); }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 1.6rem; left: 50%; transform: translateX(-50%) translateY(30px); background: var(--bg-card); border: 1px solid var(--gold); color: var(--text); padding: .9rem 1.6rem; border-radius: 100px; z-index: 400; opacity: 0; transition: all .4s; font-size: .9rem; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===========================================================
   Espaces admin / mariée
   =========================================================== */
.app-shell { min-height: 100vh; }
.app-nav { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem clamp(1rem,4vw,2.5rem); border-bottom: 1px solid var(--line); background: var(--bg-soft); position: sticky; top: 0; z-index: 50; }
.app-nav .brand { font-size: 1.8rem; }
.app-nav .user-chip { display: flex; align-items: center; gap: 1rem; font-size: .85rem; color: var(--muted); }
.app-main { padding: clamp(1.5rem,4vw,3rem) clamp(1rem,4vw,2.5rem); max-width: 1300px; margin-inline: auto; }
.page-head { margin-bottom: 2rem; }
.page-head h1 { font-size: clamp(1.8rem,4vw,2.6rem); }

.tabs { display: flex; gap: .4rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; flex-wrap: wrap; }
.tab { padding: .8rem 1.3rem; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); cursor: pointer; font-family: var(--sans); font-size: .9rem; letter-spacing: .04em; transition: color .3s, border-color .3s; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--gold); border-color: var(--gold); }
.tab .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: .5rem; border-radius: 100px; background: var(--gold); color: #14141a; font-size: .7rem; font-weight: 700; }
.tab-panel { display: none; } .tab-panel.active { display: block; animation: fade .4s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.card + .card { margin-top: 1.2rem; }
.cards { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); }

.stat-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); margin-bottom: 2rem; }
.stat { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.stat .n { font-family: var(--serif); font-size: 2.2rem; color: var(--gold); line-height: 1; }
.stat .l { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: .4rem; }

.quote-item { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: start; }
.quote-item.traite { opacity: .55; }
.quote-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .85rem; color: var(--muted); margin-top: .5rem; }
.quote-meta b { color: var(--text); font-weight: 500; }
.pill { display: inline-block; padding: .15rem .7rem; border-radius: 100px; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
.pill-new { background: rgba(200,169,126,.16); color: var(--gold-lt); border: 1px solid rgba(200,169,126,.4); }
.pill-done { background: rgba(127,174,138,.14); color: #b6d8bf; border: 1px solid rgba(127,174,138,.35); }

/* Grille de photos (admin & mariée) */
.photo-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); }
.photo { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-card); }
.photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.photo .sel-tags { position: absolute; top: .5rem; left: .5rem; display: flex; gap: .3rem; }
.tag { font-size: .64rem; letter-spacing: .05em; text-transform: uppercase; padding: .18rem .5rem; border-radius: 100px; font-weight: 600; }
.tag-tirage { background: var(--gold); color: #14141a; }
.tag-booth { background: #8ea9d8; color: #14141a; }
.photo-actions { display: flex; border-top: 1px solid var(--line); }
.photo-actions button { flex: 1; padding: .55rem; background: var(--bg-soft); border: 0; color: var(--muted); cursor: pointer; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; transition: all .25s; border-right: 1px solid var(--line); }
.photo-actions button:last-child { border-right: 0; }
.photo-actions button:hover { color: var(--text); }
.photo-actions button.on-tirage { background: var(--gold); color: #14141a; }
.photo-actions button.on-booth { background: #8ea9d8; color: #14141a; }

/* Zone d'upload */
.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 2.4rem; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .3s, background .3s; }
.dropzone:hover, .dropzone.drag { border-color: var(--gold); background: rgba(200,169,126,.05); }
.dropzone .big { font-size: 2rem; margin-bottom: .5rem; }

/* Barre de progression d'upload */
.upload-prog { margin-top: .9rem; }
.upload-prog .bar { height: 8px; border-radius: 100px; background: var(--bg-card); overflow: hidden; border: 1px solid var(--line); }
.upload-prog .bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-lt)); transition: width .3s; }
.upload-prog .lbl { font-size: .8rem; color: var(--muted); margin-top: .4rem; }
.btn-dl { position: absolute; top: .5rem; right: .5rem; background: rgba(13,13,16,.72); color: var(--gold-lt); border: 1px solid var(--line); border-radius: 8px; padding: .25rem .5rem; font-size: .72rem; cursor: pointer; backdrop-filter: blur(4px); }
.btn-dl:hover { background: var(--gold); color: #14141a; }

.list-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list-row:last-child { border-bottom: 0; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--gold-lt)); display: grid; place-items: center; color: #14141a; font-weight: 700; font-family: var(--serif); flex-shrink: 0; }

.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty .big { font-size: 2.4rem; margin-bottom: .6rem; opacity: .6; }
.loader { text-align: center; padding: 3rem; color: var(--muted); }

/* Bandeau de statut mariée */
.status-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.2rem 1.6rem; border-radius: var(--radius); margin-bottom: 1.6rem; }
.status-banner.pending { background: rgba(200,169,126,.1); border: 1px solid rgba(200,169,126,.35); }
.status-banner.done { background: rgba(127,174,138,.1); border: 1px solid rgba(127,174,138,.35); }
.sel-counter { display: flex; gap: 1.6rem; font-size: .9rem; }
.sel-counter b { color: var(--gold); font-size: 1.1rem; }

/* Auth / login */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; background:
  radial-gradient(1200px 600px at 70% -10%, rgba(200,169,126,.14), transparent),
  var(--bg); }
.auth-card { width: min(420px, 96vw); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 18px; padding: 2.8rem; box-shadow: var(--shadow); }
.auth-card .brand { font-size: 2.9rem; display: block; text-align: center; margin-bottom: .3rem; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: .85rem; margin-bottom: 2rem; }
.auth-hint { margin-top: 1.5rem; font-size: .78rem; color: var(--muted); text-align: center; line-height: 1.8; }

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
  .nav-links { position: fixed; inset: 0 0 0 auto; width: 74vw; max-width: 320px; background: var(--bg-soft); flex-direction: column; justify-content: center; gap: 2rem; transform: translateX(100%); transition: transform .4s; border-left: 1px solid var(--line); }
  .nav-links.open { transform: none; }
  .nav-toggle { display: block; z-index: 101; }
  .masonry { columns: 2 160px; }
  .row-2 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .masonry { columns: 1; } }
