@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Great+Vibes&family=Inter:wght@400;500;600&display=swap');

:root {
  --gold: #c9a45c;
  --gold-dark: #a8843f;
  --gold-soft: #f3e8d2;
  --ink: #1d1a17;
  --ink-soft: #5d554c;
  --muted: #8d847a;
  --ivory: #fbf8f3;
  --line: #e8dfd2;
  --panel: rgba(251, 248, 243, 0.93);
  --danger: #b4483b;
  --ok: #4f8a5b;
  --radius: 18px;
  --shadow: 0 24px 60px -20px rgba(20, 14, 8, 0.45);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --script: 'Great Vibes', cursive;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: #2a231c;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold-dark); }
[hidden] { display: none !important; }

/* ---------- Fond photo ---------- */
.backdrop {
  position: fixed; inset: 0; z-index: -1;
  background: radial-gradient(1200px 700px at 20% 10%, #6b5236 0%, transparent 60%),
              radial-gradient(900px 600px at 90% 90%, #3e2f22 0%, transparent 60%),
              linear-gradient(135deg, #2b221a, #15110d);
  background-size: cover; background-position: center;
}
.backdrop::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15, 11, 8, 0.25) 0%, rgba(15, 11, 8, 0.55) 45%, rgba(15, 11, 8, 0.82) 100%);
}

/* ---------- Éléments communs ---------- */
.brand {
  font-family: var(--serif); font-weight: 700; font-size: 1.6rem; letter-spacing: 0.02em;
  color: #fff; text-decoration: none; display: inline-flex; align-items: baseline; gap: 2px;
}
.brand span { color: var(--gold); font-style: italic; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px; padding: 10px 18px;
  font-weight: 600; font-size: 0.9rem; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--gold); color: #fff; box-shadow: 0 8px 20px -8px rgba(169, 132, 63, .8); }
.btn-primary:hover { background: var(--gold-dark); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-dark); }
.btn-glass { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.28); backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(255,255,255,.24); }
.btn-danger { background: transparent; color: var(--danger); border-color: #e9c9c4; }
.btn-danger:hover { background: #fbeeec; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
  display: inline-grid; place-items: center; cursor: pointer; color: var(--ink-soft); flex: none;
}
.icon-btn:hover { border-color: var(--gold); color: var(--gold-dark); }
.icon-btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.icon-btn svg, .btn svg { width: 16px; height: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label:not(.dropzone), .label { font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.hint { font-size: .8rem; color: var(--muted); }
.input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,164,92,.2); }
textarea.input { resize: vertical; min-height: 140px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .9rem; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); cursor: pointer; }

.panel {
  background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow);
  backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.6);
}

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  font-size: .72rem; font-weight: 600; background: var(--gold-soft); color: var(--gold-dark); white-space: nowrap;
}
.badge.vip { background: #2b241c; color: var(--gold); }
.badge.muted { background: #efebe5; color: var(--ink-soft); }
.badge.ok { background: #e4f0e6; color: var(--ok); }

.error-box { background: #fbeeec; color: var(--danger); border-radius: 12px; padding: 10px 14px; font-size: .88rem; }

/* ---------- Toast ---------- */
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100% - 32px)); }
.toast {
  background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: .9rem;
  box-shadow: var(--shadow); animation: toast-in .25s ease; border-left: 4px solid var(--gold);
}
.toast.error { border-left-color: #e0705f; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Modale ---------- */
.modal-wrap {
  position: fixed; inset: 0; z-index: 900; background: rgba(15, 11, 8, .6); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 16px; animation: fade .2s;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: var(--ivory); border-radius: var(--radius); box-shadow: var(--shadow);
  width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 26px;
}
.modal.wide { width: min(720px, 100%); }
.modal h2 { font-family: var(--serif); font-size: 1.8rem; margin: 0 0 4px; }
.modal .sub { color: var(--muted); margin: 0 0 18px; font-size: .9rem; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* ---------- Partage ---------- */
.share-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.share-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border-radius: 14px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; cursor: pointer;
  font-size: .82rem; font-weight: 600; text-align: center; transition: border-color .15s, transform .1s;
}
.share-btn svg { width: 24px; height: 24px; color: var(--gold-dark); }
.share-btn:hover { border-color: var(--gold); }
.share-btn:active { transform: translateY(1px); }
.share-btn:disabled { opacity: .5; cursor: wait; }
.share-btn.primary { background: var(--gold); border-color: var(--gold); color: #fff; }
.share-btn.primary svg { color: #fff; }
.share-btn.whatsapp svg { color: #25a35a; }
@media (max-width: 420px) { .share-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.share-section { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); margin: 18px 0 10px; }
.share-native { width: 100%; padding: 13px; margin-top: 4px; }
.share-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.share-btn { padding: 12px 6px; font-size: .76rem; gap: 7px; }
.app-logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.app-logo svg { width: 24px; height: 24px; }
.app-logo.plain { background: var(--gold-soft); }
.app-logo.plain svg { color: var(--gold-dark); width: 20px; height: 20px; }

/* ---------- Pied de page développeur ---------- */
.dev-footer { width: 100%; padding: 28px 16px 32px; color: rgba(255,255,255,.72); font-size: .82rem; }
.dev-inner {
  max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,.16); padding-top: 22px;
}
.dev-who { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dev-who .brand { font-size: 1.3rem; }
.dev-who b { color: #fff; font-weight: 600; }
.dev-contacts, .dev-socials { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.dev-footer a, .dev-socials span { display: inline-flex; align-items: center; gap: 6px; color: rgba(255,255,255,.85); text-decoration: none; }
.dev-footer a:hover { color: var(--gold); }
.dev-footer svg { width: 15px; height: 15px; color: var(--gold); flex: none; }
.dev-copy { width: 100%; text-align: center; font-size: .74rem; color: rgba(255,255,255,.45); }
@media (max-width: 640px) { .dev-inner { flex-direction: column; align-items: flex-start; } .dev-copy { text-align: left; } }
.dev-who { align-items: center; }
.dev-photo {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--gold); box-shadow: 0 6px 18px -6px rgba(0,0,0,.6); flex: none;
}
