:root {
  --bg: #09090f;
  --surface: rgba(255, 255, 255, .04);
  --surface-2: #14141f;
  --border: rgba(255, 255, 255, .09);
  --text: #ececf1;
  --muted: #8b8b9e;
  --accent: #b46bff;
  --accent2: #ff5fa2;
  --gold: #ffcc4d;
  --danger: #ff6b6b;
  --radius: 20px;
}

* { box-sizing: border-box; margin: 0; }
html { color-scheme: dark; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(1000px 600px at 15% -10%, rgba(140, 60, 255, .28), transparent 60%),
    radial-gradient(800px 500px at 100% 20%, rgba(255, 60, 150, .18), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
[hidden] { display: none !important; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 3.5rem 1rem 1rem; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); border: 1px solid rgba(180, 107, 255, .35); padding: .35rem .9rem; border-radius: 999px;
  background: rgba(180, 107, 255, .08);
}
.hero h1 {
  margin-top: 1rem;
  font-size: clamp(2.2rem, 6vw, 3.8rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.05;
  background: linear-gradient(100deg, #fff 10%, var(--accent) 50%, var(--accent2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub { color: var(--muted); margin: .9rem auto 0; max-width: 520px; line-height: 1.5; }
.summary { color: var(--muted); font-size: .9rem; margin-top: 1rem; min-height: 1.2em; }

.tabs { display: flex; gap: .6rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }
.tabs button {
  font: inherit; font-weight: 600; font-size: 1rem;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  padding: .7rem 1.6rem; border-radius: 999px; cursor: pointer; transition: .25s;
  backdrop-filter: blur(10px);
}
.tabs button:hover { color: #fff; border-color: rgba(180, 107, 255, .5); }
.tabs button.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(100deg, var(--accent), var(--accent2));
  box-shadow: 0 8px 30px rgba(180, 107, 255, .35);
}

/* ---------- Grille de cartes ---------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem;
  padding: 1.5rem 1rem 3rem; max-width: 1240px; margin: auto;
}
.card {
  position: relative; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  cursor: pointer; transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s, border-color .35s;
  animation: rise .5s both;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(180, 107, 255, .5);
  box-shadow: 0 24px 50px rgba(0, 0, 0, .55), 0 0 40px rgba(180, 107, 255, .15);
}
.card.prio { border-color: rgba(255, 204, 77, .35); }
.card.reserved { cursor: default; opacity: .45; filter: grayscale(.8); }
.card.reserved:hover { transform: none; box-shadow: none; border-color: var(--border); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.media, .m-media {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 20%, #2b1b45, #15121f);
}
.media span, .m-media span { font-size: 3rem; opacity: .5; }
.media img, .m-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card:hover .media img { transform: scale(1.06); }
.media::after {
  content: ''; position: absolute; inset: auto 0 0; height: 40%;
  background: linear-gradient(transparent, rgba(9, 9, 15, .6));
}

.body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.body h3 { font-size: 1.05rem; font-weight: 700; line-height: 1.35; }
.price { color: var(--accent2); font-weight: 800; font-size: 1.25rem; margin-top: .35rem; }
.row { display: flex; gap: .5rem; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 1rem; }

.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-size: .72rem; font-weight: 800; letter-spacing: .03em;
  background: linear-gradient(100deg, var(--gold), #ff9f43); color: #241500;
  padding: .35rem .75rem; border-radius: 999px; box-shadow: 0 4px 18px rgba(255, 180, 60, .45);
}
.tag { color: var(--muted); font-size: .85rem; border: 1px solid var(--border); padding: .35rem .8rem; border-radius: 999px; }
.empty { color: var(--muted); text-align: center; grid-column: 1 / -1; padding: 3rem 1rem; }
.muted { color: var(--muted); }

/* ---------- Boutons ---------- */
.btn, .ghost {
  font: inherit; cursor: pointer; border-radius: 12px; padding: .7rem 1.3rem;
  font-weight: 600; font-size: .95rem; text-decoration: none; display: inline-block;
  transition: .2s; border: 1px solid transparent; white-space: nowrap;
}
.btn { background: linear-gradient(100deg, var(--accent), var(--accent2)); color: #fff; }
.btn:hover { filter: brightness(1.12); box-shadow: 0 6px 24px rgba(255, 95, 162, .35); }
.btn:disabled { opacity: .6; cursor: wait; }
.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.ghost:hover { border-color: var(--accent); background: rgba(180, 107, 255, .08); }
.ghost.danger:hover { border-color: var(--danger); color: var(--danger); background: rgba(255, 107, 107, .08); }
.small { padding: .45rem .85rem; font-size: .85rem; border-radius: 10px; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font: inherit; font-size: .8rem; text-align: left; }
.link:hover { text-decoration: underline; }

/* ---------- Modale ---------- */
dialog {
  margin: auto;
  border: 1px solid var(--border); border-radius: 24px; background: var(--surface-2); color: var(--text);
  padding: 0; width: min(440px, calc(100vw - 32px)); overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 60px rgba(180, 107, 255, .15);
}
dialog[open] { animation: pop .3s cubic-bezier(.2, .9, .3, 1.2); }
dialog::backdrop { background: rgba(5, 5, 10, .7); backdrop-filter: blur(8px); }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(10px); } }
dialog form { display: flex; flex-direction: column; gap: 1rem; padding: 0 1.6rem 1.6rem; }
.m-media { aspect-ratio: 16 / 9; margin: 0 -1.6rem; }
dialog h2 { font-size: 1.3rem; margin-bottom: -.6rem; }
.confirm { padding: .8rem 1rem; border-radius: 12px; background: rgba(180, 107, 255, .08); border: 1px solid rgba(180, 107, 255, .25); }

/* ---------- Formulaires ---------- */
.stack { display: flex; flex-direction: column; gap: 1rem; }
label { display: flex; flex-direction: column; gap: .45rem; font-size: .88rem; font-weight: 500; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: .65rem; color: var(--text); cursor: pointer; }
input, select {
  font: inherit; background: #0d0d16; border: 1px solid var(--border); color: var(--text);
  padding: .75rem 1rem; border-radius: 12px; font-size: 1rem; outline: none; transition: .2s; width: 100%;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(180, 107, 255, .2); }
input[type=checkbox] { accent-color: var(--accent); width: 18px; height: 18px; flex: none; padding: 0; }
.actions { display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translate(-50%, 200%); z-index: 100;
  background: var(--surface-2); border: 1px solid var(--accent); padding: .9rem 1.4rem; border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5); transition: transform .4s cubic-bezier(.2, .9, .3, 1.2);
  max-width: calc(100vw - 32px); visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.toast.error { border-color: var(--danger); }

.foot { text-align: center; padding: 1rem 1rem 2.5rem; }
.foot a { color: var(--muted); font-size: .85rem; text-decoration: none; }
.foot a:hover { color: var(--accent); }

/* ---------- Admin ---------- */
.admin-head {
  max-width: 1100px; margin: 2rem auto 0; padding: 0 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.admin-head h1 {
  font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em;
  background: linear-gradient(100deg, #fff, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; margin: 1.25rem auto; max-width: 1100px; width: calc(100% - 32px);
  backdrop-filter: blur(12px);
}
.panel h2 { font-size: 1.1rem; margin-bottom: 1rem; }
.panel.narrow { max-width: 380px; margin-top: 18vh; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.panel-head h2 { margin: 0; }
.panel-head select { width: auto; }
.back { display: block; text-align: center; margin-top: 1.2rem; color: var(--muted); font-size: .85rem; text-decoration: none; }

.inline { display: flex; gap: .6rem; max-width: 420px; }
.chips { list-style: none; padding: 0; display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.chips li {
  display: flex; align-items: center; gap: .4rem;
  background: var(--surface-2); border: 1px solid var(--border); padding: .4rem .5rem .4rem 1rem; border-radius: 999px;
}
.chips li.muted { padding: .4rem 1rem; }
.chips small { background: rgba(180, 107, 255, .2); color: var(--accent); border-radius: 999px; padding: .1rem .5rem; font-weight: 700; }
.chips button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: .9rem; padding: .2rem .35rem; border-radius: 6px; }
.chips button:hover { color: var(--accent2); background: rgba(255, 95, 162, .1); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .9rem; }
.prio-check { align-self: end; padding: .75rem 1rem; border: 1px solid rgba(255, 204, 77, .3); border-radius: 12px; color: var(--gold); }
.prio-check input { accent-color: var(--gold); }
.preview img { max-height: 140px; border-radius: 12px; border: 1px solid var(--border); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .75rem .6rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { color: var(--muted); font-weight: 500; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.table tr:hover td { background: rgba(255, 255, 255, .02); }
.table a { text-decoration: none; }
.thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; background: #1a1a26; display: grid; place-items: center; }
.star { color: var(--gold); font-size: 1.1rem; }
.resa { display: flex; flex-direction: column; gap: .15rem; }
.resa small { color: var(--muted); }
.nowrap { white-space: nowrap; }
.nowrap .small + .small { margin-left: .3rem; }

@media (max-width: 600px) {
  .hero { padding-top: 2.5rem; }
  .grid { grid-template-columns: 1fr 1fr; gap: .8rem; padding-inline: .8rem; }
  .body { padding: .8rem; }
  .body h3 { font-size: .92rem; }
  .price { font-size: 1.05rem; }
  .row .small { padding: .4rem .65rem; font-size: .78rem; }
  .inline { max-width: none; }
}
@media (max-width: 380px) { .grid { grid-template-columns: 1fr; } }
