/* ==========================================
   Admin Interface — Famille Goli-Baudon
========================================== */

:root {
  --a-navy: #0f1d31;
  --a-navy-soft: #1a2f4a;
  --a-gold: #b08d57;
  --a-gold-light: #d4b887;
  --a-cream: #faf6ee;
  --a-bg: #f4eee2;
  --a-white: #ffffff;
  --a-text: #2d3748;
  --a-text-soft: #5a6878;
  --a-border: #e0d7c5;
  --a-success: #2f855a;
  --a-danger: #c03b3b;
  --a-info: #1f6991;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  color: var(--a-text);
  background: var(--a-bg);
  font-size: 15px; line-height: 1.55;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; }
.serif { font-family: 'Cormorant Garamond', Georgia, serif; }

/* ==========================
   Login page
========================== */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    linear-gradient(rgba(15, 29, 49, 0.85), rgba(15, 29, 49, 0.85)),
    url('../../assets/stock/paris-church.jpg') center/cover fixed;
}
.login-box {
  background: var(--a-white);
  border-radius: 16px;
  padding: 44px 32px;
  box-shadow: 0 30px 70px rgba(0,0,0,.3);
  width: 100%; max-width: 420px;
}
.login-brand {
  text-align: center; margin-bottom: 30px;
}
.login-brand .script {
  font-family: 'Great Vibes', cursive;
  font-size: 2.6rem; color: var(--a-gold); display: block;
  line-height: 1;
}
.login-brand small {
  display: block;
  text-transform: uppercase; letter-spacing: 3px; font-size: .7rem;
  color: var(--a-text-soft); margin-top: 10px;
}
.login-title {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem; color: var(--a-navy); margin-bottom: 4px;
}
.login-sub {
  text-align: center; color: var(--a-text-soft); font-size: .92rem;
  margin-bottom: 30px;
}
.login-form .field { margin-bottom: 18px; }
.login-form label {
  display: block; font-size: .76rem; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--a-navy); font-weight: 600; margin-bottom: 6px;
}
.login-form input {
  width: 100%; padding: 13px 15px;
  border: 1.5px solid var(--a-border); border-radius: 8px;
  font: inherit; background: var(--a-cream);
  transition: border .2s, box-shadow .2s;
}
.login-form input:focus {
  outline: none; border-color: var(--a-gold);
  box-shadow: 0 0 0 3px rgba(176,141,87,.15);
}
.login-btn {
  width: 100%; padding: 14px 22px;
  background: var(--a-navy); color: var(--a-cream);
  border-radius: 999px;
  font-size: .78rem; letter-spacing: 2.5px; text-transform: uppercase; font-weight: 600;
  transition: all .2s ease;
  margin-top: 10px;
}
.login-btn:hover { background: var(--a-gold); }
.login-error {
  background: #fbe3e3; color: var(--a-danger);
  padding: 12px; border-radius: 8px;
  font-size: .9rem; text-align: center;
  margin-bottom: 16px; display: none;
}
.login-error.show { display: block; }
.login-back {
  text-align: center; margin-top: 24px;
  font-size: .82rem; color: var(--a-text-soft);
}
.login-back a { color: var(--a-gold); font-weight: 600; }
.login-hint {
  margin-top: 20px;
  font-size: .78rem; text-align: center;
  color: var(--a-text-soft);
  background: var(--a-bg); padding: 12px; border-radius: 8px;
}

/* ==========================
   Admin Layout
========================== */
.admin-app { min-height: 100vh; display: flex; flex-direction: column; }

.admin-header {
  background: var(--a-navy);
  color: var(--a-cream);
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.admin-header .brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem; color: var(--a-cream);
  letter-spacing: 1.5px;
}
.admin-header .brand small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: .62rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--a-gold-light);
}
.admin-header .user {
  display: flex; align-items: center; gap: 12px;
  font-size: .85rem;
}
.admin-header .user-name { color: var(--a-gold-light); font-weight: 500; }
.logout-btn {
  padding: 8px 18px;
  background: transparent; color: var(--a-cream);
  border: 1px solid var(--a-gold-light); border-radius: 999px;
  font-size: .7rem; letter-spacing: 2px; text-transform: uppercase;
  transition: background .2s;
}
.logout-btn:hover { background: rgba(212, 184, 135, .2); }

.admin-body { display: flex; flex: 1; flex-direction: column; }
.admin-sidebar {
  background: var(--a-white);
  padding: 16px;
  border-right: 1px solid var(--a-border);
  overflow-x: auto;
}
.admin-sidebar ul { list-style: none; display: flex; gap: 8px; }
.admin-sidebar li { flex-shrink: 0; }
.admin-sidebar a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: .88rem; color: var(--a-text);
  transition: all .2s;
  white-space: nowrap;
}
.admin-sidebar a:hover { background: var(--a-bg); }
.admin-sidebar a.active { background: var(--a-navy); color: var(--a-cream); }
.admin-sidebar .icon { font-size: 1.15rem; }

.admin-main { flex: 1; padding: 28px 20px; max-width: 100%; }
.admin-main-inner { max-width: 1100px; margin: 0 auto; }

.page-head { margin-bottom: 28px; }
.page-head h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  color: var(--a-navy); margin-bottom: 6px;
  font-weight: 500;
}
.page-head p { color: var(--a-text-soft); font-size: .95rem; }

/* ==========================
   Stats cards
========================== */
.stats-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 30px;
}
.stat-card {
  background: var(--a-white);
  border-radius: 12px;
  padding: 22px 18px;
  border: 1px solid var(--a-border);
}
.stat-card .label {
  font-size: .68rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--a-text-soft); font-weight: 600; margin-bottom: 10px;
}
.stat-card .value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem; color: var(--a-navy); line-height: 1;
  font-weight: 500;
}
.stat-card .hint {
  font-size: .78rem; color: var(--a-gold); margin-top: 6px;
}

/* ==========================
   Cards / Panels
========================== */
.panel {
  background: var(--a-white);
  border-radius: 12px;
  border: 1px solid var(--a-border);
  padding: 24px;
  margin-bottom: 24px;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 14px;
  border-bottom: 1px solid var(--a-border);
  flex-wrap: wrap; gap: 12px;
}
.panel-head h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem; color: var(--a-navy); font-weight: 500;
}

/* ==========================
   Forms
========================== */
.form-grid {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
.form-grid.cols-2 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
}
.field label {
  display: block; font-size: .75rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--a-navy); font-weight: 600; margin-bottom: 6px;
}
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--a-border); border-radius: 8px;
  font: inherit; background: var(--a-cream);
  transition: border .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--a-gold);
  box-shadow: 0 0 0 3px rgba(176,141,87,.15);
}
.field textarea { min-height: 80px; resize: vertical; }
.field-hint { font-size: .78rem; color: var(--a-text-soft); margin-top: 4px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px;
  background: var(--a-navy); color: var(--a-cream);
  border-radius: 999px;
  font-size: .76rem; letter-spacing: 2px; text-transform: uppercase; font-weight: 600;
  transition: all .2s;
}
.btn:hover { background: var(--a-gold); transform: translateY(-1px); }
.btn-sm { padding: 7px 14px; font-size: .7rem; letter-spacing: 1.5px; }
.btn-outline { background: transparent; color: var(--a-navy); border: 1.5px solid var(--a-navy); }
.btn-outline:hover { background: var(--a-navy); color: var(--a-cream); }
.btn-danger { background: var(--a-danger); }
.btn-danger:hover { background: #9a2a2a; }
.btn-ghost { background: transparent; color: var(--a-text); }
.btn-ghost:hover { background: var(--a-bg); }
.btn-row { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* Toast / Notif */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--a-navy); color: var(--a-cream);
  padding: 14px 22px;
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(0,0,0,.2);
  font-size: .85rem; font-weight: 500;
  z-index: 1000;
  transform: translateY(100px); opacity: 0;
  transition: all .3s ease;
  max-width: calc(100vw - 48px);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--a-success); }
.toast.error { background: var(--a-danger); }

/* ==========================
   Article list
========================== */
.article-list {
  display: grid; gap: 14px;
}
.article-row {
  display: grid; gap: 14px;
  grid-template-columns: 90px 1fr;
  padding: 14px;
  background: var(--a-white);
  border: 1px solid var(--a-border);
  border-radius: 12px;
  align-items: center;
}
.article-row.hidden { opacity: .5; }
.article-row .thumb {
  width: 90px; height: 72px; background: var(--a-bg);
  border-radius: 8px; overflow: hidden;
}
.article-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-info .title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem; color: var(--a-navy);
  margin-bottom: 4px;
}
.article-info .meta {
  font-size: .75rem; color: var(--a-text-soft);
  letter-spacing: 1px; text-transform: uppercase;
}
.article-actions {
  display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap;
}
@media (min-width: 640px) {
  .article-row { grid-template-columns: 110px 1fr auto; }
  .article-row .thumb { width: 110px; height: 85px; }
  .article-actions { margin-top: 0; }
}

/* Photo grid */
.admin-photo-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 520px) { .admin-photo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .admin-photo-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .admin-photo-grid { grid-template-columns: repeat(5, 1fr); } }
.admin-photo {
  position: relative;
  aspect-ratio: 1/1;
  background: var(--a-bg);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--a-border);
}
.admin-photo img { width: 100%; height: 100%; object-fit: cover; }
.admin-photo .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(15,29,49,.8) 0%, transparent 50%);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-end;
  padding: 10px;
  opacity: 0; transition: opacity .2s;
}
.admin-photo:hover .overlay { opacity: 1; }
.admin-photo .del {
  padding: 6px 12px;
  background: var(--a-danger); color: white;
  border-radius: 999px;
  font-size: .68rem; letter-spacing: 1.5px; text-transform: uppercase;
}
.admin-photo .cat-tag {
  position: absolute; top: 8px; left: 8px;
  padding: 3px 8px;
  background: rgba(0,0,0,.6); color: white;
  border-radius: 4px;
  font-size: .65rem; letter-spacing: 1px; text-transform: uppercase;
}

/* Drop area */
.dropzone {
  border: 2px dashed var(--a-border);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  background: var(--a-cream);
  margin-bottom: 20px;
  transition: all .2s;
}
.dropzone.drag { border-color: var(--a-gold); background: #fdf6e8; }
.dropzone .icon { font-size: 2rem; color: var(--a-gold); margin-bottom: 10px; }
.dropzone p { color: var(--a-text-soft); font-size: .9rem; margin-bottom: 10px; }

/* RSVP list */
.rsvp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  background: var(--a-white);
  border-radius: 8px;
  overflow: hidden;
}
.rsvp-table thead th {
  background: var(--a-navy); color: var(--a-cream);
  text-align: left; padding: 12px;
  font-size: .72rem; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600;
}
.rsvp-table tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--a-border);
  vertical-align: top;
}
.rsvp-table tbody tr:last-child td { border-bottom: none; }
.rsvp-table .presence-oui { color: var(--a-success); font-weight: 600; }
.rsvp-table .presence-non { color: var(--a-danger); font-weight: 600; }
.rsvp-scroll { overflow-x: auto; }

.empty-state {
  text-align: center; padding: 40px 20px;
  color: var(--a-text-soft);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 14px; color: var(--a-gold-light); }
.empty-state p { margin-bottom: 16px; }

/* ==========================
   Responsive
========================== */
@media (min-width: 720px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .admin-main { padding: 36px 32px; }
}
@media (min-width: 960px) {
  .admin-body { flex-direction: row; }
  .admin-sidebar {
    width: 240px;
    padding: 26px 16px;
    flex-shrink: 0;
    overflow-x: visible;
    border-right: 1px solid var(--a-border);
  }
  .admin-sidebar ul { flex-direction: column; gap: 4px; }
  .admin-sidebar a { padding: 12px 14px; }
}
