@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600&family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --lavender: #959bcd;
  --lavender-deep: #7f86be;
  --lavender-soft: #eceeff;
  --orange: #dc6017;
  --orange-deep: #bf4f0f;
  --ink: #2e3150;
  --cream: #fffdf7;
  --white: #ffffff;
  --line: rgba(149, 155, 205, 0.24);
  --shadow: 0 24px 60px rgba(46, 49, 80, 0.14);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(
      circle at top left,
      rgba(220, 96, 23, 0.12),
      transparent 28%
    ),
    radial-gradient(
      circle at right 10% top 20%,
      rgba(149, 155, 205, 0.3),
      transparent 24%
    ),
    linear-gradient(180deg, #f7f6ff 0%, #fffdf8 44%, #fff8f0 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 40% 60% 48% 52% / 57% 44% 56% 43%;
  opacity: 0.55;
}

body::before {
  width: 240px;
  height: 240px;
  left: -90px;
  top: 80px;
  background: rgba(149, 155, 205, 0.18);
}

body::after {
  width: 180px;
  height: 180px;
  right: -60px;
  bottom: 80px;
  background: rgba(220, 96, 23, 0.12);
}

a {
  color: var(--orange-deep);
}

.page {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.hero,
.panel,
.summary-card,
.table-shell,
.login-shell,
.flash {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 44px;
  padding: 24px;
  background: var(--lavender);
  color: var(--white);
  border: 6px solid rgba(255, 255, 255, 0.92);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -38px -42px auto;
  width: 170px;
  height: 120px;
  border-radius: 60px;
  background: rgba(255, 255, 255, 0.2);
}

.hero-top {
  display: flex;
  gap: 16px;
  align-items: center;
}

.hero-top-form {
  align-items: flex-start;
  justify-content: space-between;
}

.hero-copy {
  max-width: 28rem;
}

.logo-badge {
  width: 90px;
  flex: 0 0 90px;
  padding: 8px;
  border-radius: 30px;
}

.logo-badge-large {
  width: 124px;
  flex-basis: 124px;
}

.logo-badge img {
  display: block;
  width: 100%;
  height: auto;
}

.hero h1,
.hero h2,
.section-title,
.summary-card strong,
.auth-title {
  margin: 0;
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  letter-spacing: 0.01em;
}

.hero h1 {
  font-size: clamp(2.3rem, 7vw, 4rem);
  line-height: 0.92;
}

.hero p {
  margin: 10px 0 0;
  max-width: 34rem;
  font-size: 0.98rem;
  line-height: 1.55;
}

.hero-notes {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.hero-note {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 24px;
  font-size: 0.93rem;
}

.hero-note strong {
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  font-size: 1.05rem;
}

.eyebrow-light {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.flash {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 20px;
}

.flash.success {
  border-left: 6px solid #38a169;
}

.flash.error {
  border-left: 6px solid var(--orange);
}

.panel {
  margin-top: 18px;
  padding: 20px;
  border-radius: var(--radius-xl);
}

.panel-header {
  margin-bottom: 16px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange-deep);
  background: rgba(220, 96, 23, 0.12);
}

.section-title {
  font-size: 1.6rem;
  color: var(--lavender-deep);
}

.section-copy {
  margin: 8px 0 0;
  line-height: 1.55;
}

.stack {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 10px;
}

.field-label,
.choice-group legend {
  font-weight: 700;
  font-size: 0.96rem;
}

.field-help {
  margin: -4px 0 0;
  color: rgba(46, 49, 80, 0.72);
  font-size: 0.9rem;
}

.choice-group {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 10px;
}

.choice-grid {
  display: grid;
  gap: 10px;
}

.choice-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.step-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 30px;
  border: 2px solid rgba(149, 155, 205, 0.18);
  background:
    radial-gradient(
      circle at top right,
      rgba(220, 96, 23, 0.08),
      transparent 22%
    ),
    linear-gradient(180deg, #fffdfa 0%, #f8f7ff 100%);
}

.step-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.step-head h3 {
  margin: 0;
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  font-size: 1.28rem;
  color: var(--lavender-deep);
}

.step-head p {
  margin: 4px 0 0;
  line-height: 1.45;
  color: rgba(46, 49, 80, 0.72);
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: var(--orange);
  color: var(--white);
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  font-size: 1.2rem;
}

.toggle-option,
.check-option {
  position: relative;
  display: block;
}

.toggle-option input,
.check-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 14px 16px;
  border: 2px solid rgba(149, 155, 205, 0.24);
  border-radius: 22px;
  background: #fff;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.toggle-option input:checked + span {
  border-color: var(--orange);
  background: rgba(220, 96, 23, 0.12);
  transform: translateY(-1px);
}

.checkbox-list {
  display: grid;
  gap: 12px;
}

.check-option span {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: 24px;
  border: 2px solid rgba(149, 155, 205, 0.22);
  background: #fff;
}

.check-option span::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 2px solid var(--lavender);
  background: #fff;
}

.check-option input:checked + span {
  border-color: var(--orange);
  background: rgba(220, 96, 23, 0.08);
}

.check-option input:checked + span::before {
  background: linear-gradient(180deg, var(--orange), var(--orange-deep));
  border-color: var(--orange);
  box-shadow: inset 0 0 0 4px #fff;
}

.check-option strong,
.conditional-title {
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
}

.check-option small {
  display: block;
  margin-top: 2px;
  color: rgba(46, 49, 80, 0.68);
  font-size: 0.88rem;
  width: 300px;
}

.conditional-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(149, 155, 205, 0.08);
  border: 1px dashed rgba(149, 155, 205, 0.38);
}

.conditional-title {
  font-size: 1.05rem;
  color: var(--lavender-deep);
}

.binary-group {
  padding-top: 4px;
}

.count-box {
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(149, 155, 205, 0.16);
}

/* ── Buffet canadien ─────────────────────────────────────── */
.buffet-counts {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(149, 155, 205, 0.2);
}

.buffet-counts-title {
  margin: 0 0 10px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--lavender-deep);
}

.buffet-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.buffet-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(149, 155, 205, 0.06);
  border: 1px solid transparent;
  transition:
    background 180ms ease,
    border-color 180ms ease;
}

.buffet-list-item.buffet-taken {
  background: rgba(220, 96, 23, 0.07);
  border-color: rgba(220, 96, 23, 0.18);
}

.buffet-list-item.buffet-selected {
  background: rgba(220, 96, 23, 0.15);
  border-color: var(--orange);
}

.buffet-cat {
  font-size: 0.92rem;
}

.buffet-badge {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(149, 155, 205, 0.18);
  color: var(--lavender-deep);
}

.buffet-list-item.buffet-taken .buffet-badge {
  background: rgba(220, 96, 23, 0.18);
  color: var(--orange-deep);
}

.buffet-list-item.buffet-selected .buffet-badge {
  background: var(--orange);
  color: #fff;
}

.counts-grid,
.filters,
.stats-grid {
  display: grid;
  gap: 12px;
}

.hidden {
  display: none !important;
}

input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid rgba(149, 155, 205, 0.35);
  border-radius: 16px;
  background: var(--cream);
  color: var(--ink);
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(220, 96, 23, 0.18);
  border-color: var(--orange);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.button,
button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 160ms ease,
    opacity 160ms ease,
    background 160ms ease;
}

.button-primary {
  color: var(--white);
  background: linear-gradient(180deg, var(--orange), var(--orange-deep));
}

.button-secondary {
  color: var(--lavender-deep);
  background: rgba(149, 155, 205, 0.16);
}

.button-danger {
  color: var(--white);
  background: linear-gradient(180deg, #d64545, #b93232);
}

.button-xs {
  padding: 8px 12px;
  font-size: 0.86rem;
}

.button-outline {
  color: var(--ink);
  background: transparent;
  border: 2px solid rgba(149, 155, 205, 0.5);
}

.button-outline:hover {
  border-color: var(--lavender);
  background: rgba(149, 155, 205, 0.08);
}

/* ── Récap avant validation ──────────────────────────────── */
.recap-card {
  border-color: rgba(220, 96, 23, 0.3);
  background:
    radial-gradient(
      circle at top right,
      rgba(149, 155, 205, 0.12),
      transparent 45%
    ),
    radial-gradient(
      circle at bottom left,
      rgba(220, 96, 23, 0.09),
      transparent 35%
    ),
    linear-gradient(160deg, #fffdf9 0%, #f3f2ff 100%);
  box-shadow:
    0 4px 24px rgba(149, 155, 205, 0.18),
    0 1px 4px rgba(0, 0, 0, 0.06);
}

.step-number-check {
  background: linear-gradient(135deg, #38a169, #2d8257);
  font-size: 1.4rem;
  box-shadow: 0 3px 10px rgba(56, 161, 105, 0.4);
}

.recap-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.recap-item {
  display: grid;
  grid-template-columns: 2em 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(149, 155, 205, 0.18);
  backdrop-filter: blur(4px);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.recap-item--event {
  border-color: rgba(149, 155, 205, 0.4);
  background: rgba(149, 155, 205, 0.07);
}

.recap-item--buffet {
  border-color: rgba(220, 96, 23, 0.25);
  background: rgba(220, 96, 23, 0.05);
}

.recap-item--absent {
  opacity: 0.55;
}

.recap-item--extra {
  border-color: rgba(56, 161, 105, 0.2);
  background: rgba(56, 161, 105, 0.04);
}

.recap-item--name {
  border-color: var(--orange);
  background: rgba(220, 96, 23, 0.05);
  font-size: 1.05rem;
}

.recap-item--diet {
  border-color: rgba(149, 155, 205, 0.3);
}

.recap-icon {
  font-size: 1.25rem;
  text-align: center;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lavender-deep);
}

.recap-item--event .recap-icon {
  color: var(--lavender-deep);
}
.recap-item--buffet .recap-icon {
  color: var(--orange);
}
.recap-item--name .recap-icon {
  color: var(--orange-deep);
}
.recap-item--extra .recap-icon {
  color: #2d8257;
}
.recap-item--diet .recap-icon {
  color: #2d8257;
}
.recap-item--absent .recap-icon {
  color: rgba(46, 49, 80, 0.35);
}

.recap-label {
  font-size: 0.85rem;
  color: rgba(46, 49, 80, 0.6);
}

.recap-value {
  font-weight: 700;
  font-size: 0.95rem;
  text-align: right;
  color: var(--ink);
}

.recap-item--name .recap-value {
  color: var(--orange-deep);
  font-size: 1.05rem;
}

.recap-email-block {
  display: grid;
  gap: 14px;
  padding-top: 16px;
  border-top: 2px dashed rgba(149, 155, 205, 0.25);
  margin-top: 8px;
}

/* Champ e-mail stylisé */
.email-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.email-input-icon {
  position: absolute;
  left: 16px;
  font-size: 1.2rem;
  color: var(--lavender-deep);
  pointer-events: none;
  transition: color 0.2s;
}

.email-input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border-radius: 18px;
  border: 2px solid rgba(149, 155, 205, 0.35);
  background: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  outline: none;
}

.email-input::placeholder {
  color: rgba(46, 49, 80, 0.35);
}

.email-input:focus {
  border-color: var(--lavender);
  box-shadow: 0 0 0 4px rgba(149, 155, 205, 0.18);
}

.email-input-wrapper:focus-within .email-input-icon {
  color: var(--lavender);
}

.email-input:valid:not(:placeholder-shown) {
  border-color: #38a169;
  background: rgba(56, 161, 105, 0.04);
}

.email-input-wrapper:has(.email-input:valid:not(:placeholder-shown))
  .email-input-icon {
  color: #38a169;
}

.button:hover,
button:hover {
  transform: translateY(-1px);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.actions-inline {
  justify-content: flex-start;
  gap: 8px;
}

.actions-inline form {
  margin: 0;
}

.summary-card {
  border-radius: 24px;
  padding: 16px;
}

.summary-card strong {
  display: block;
  font-size: 1.7rem;
  color: var(--orange-deep);
}

.summary-card span {
  display: block;
  margin-top: 4px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.table-shell {
  margin-top: 18px;
  border-radius: 28px;
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.96);
}

thead {
  background: rgba(149, 155, 205, 0.14);
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(149, 155, 205, 0.12);
  vertical-align: top;
}

tbody tr:nth-child(even) {
  background: rgba(236, 238, 255, 0.22);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.pill.lavender {
  color: var(--lavender-deep);
  background: rgba(149, 155, 205, 0.18);
}

.pill.orange {
  color: var(--orange-deep);
  background: rgba(220, 96, 23, 0.15);
}

.pill.green {
  color: #23603c;
  background: rgba(56, 161, 105, 0.14);
}

.bottom-totals {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(46, 49, 80, 0.92);
  color: var(--white);
  box-shadow: 0 -14px 30px rgba(46, 49, 80, 0.18);
}

.bottom-totals strong {
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  font-size: 1.35rem;
}

.login-shell {
  width: min(100%, 460px);
  margin: 10vh auto 0;
  border-radius: 32px;
  padding: 24px;
}

.auth-title {
  font-size: 2rem;
  color: var(--lavender-deep);
}

.muted {
  color: rgba(46, 49, 80, 0.7);
}

@media (min-width: 720px) {
  .page {
    padding: 28px 22px 56px;
  }

  .hero {
    padding: 28px;
  }

  .hero-notes,
  .counts-grid,
  .filters,
  .stats-grid,
  .bottom-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 719px) {
  .hero-top-form {
    flex-direction: column-reverse;
  }

  .logo-badge-large {
    width: 112px;
    flex-basis: 112px;
  }

  .choice-grid-2 {
    grid-template-columns: 1fr;
  }

  .actions {
    justify-content: stretch;
  }

  .actions > * {
    width: 100%;
    text-align: center;
  }
}

@media (min-width: 980px) {
  .hero-notes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stats-grid,
  .bottom-totals {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ── Dropzone ─────────────────────────────────────────────── */
.field-error {
  outline: 3px solid rgba(214, 69, 69, 0.35) !important;
  border-color: #d64545 !important;
}

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  border-radius: 28px;
  border: 2.5px dashed rgba(149, 155, 205, 0.45);
  background: rgba(149, 155, 205, 0.06);
  cursor: pointer;
  text-align: center;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.dropzone:hover {
  border-color: var(--lavender);
  background: rgba(149, 155, 205, 0.1);
}

.dropzone-active {
  border-color: var(--orange);
  background: rgba(220, 96, 23, 0.08);
  transform: scale(1.01);
}

.dropzone-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dropzone-warning {
  margin: -6px 0 0;
  padding: 10px 14px;
  border-radius: 14px;
  color: #b93232;
  background: rgba(214, 69, 69, 0.08);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
}

.dropzone-content {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.dropzone-icon {
  font-size: 2.6rem;
  color: var(--lavender-deep);
}

.dropzone-title {
  margin: 0;
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  font-size: 1.1rem;
  color: var(--lavender-deep);
}

.dropzone-sub {
  margin: 0 0 6px;
  font-size: 0.88rem;
  color: rgba(46, 49, 80, 0.65);
}

/* ── File upload de la queue ──────────────────────────────── */
.upload-queue {
  display: grid;
  gap: 10px;
}

.upload-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(149, 155, 205, 0.2);
  font-size: 0.85rem;
}

.upload-row-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.upload-row-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(149, 155, 205, 0.18);
  overflow: hidden;
}

.upload-row-progress {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lavender), var(--orange));
  transition: width 160ms ease;
}

.upload-row-status {
  font-size: 0.78rem;
  color: rgba(46, 49, 80, 0.65);
}

.upload-row-done .upload-row-progress {
  background: linear-gradient(90deg, #38a169, #2d8257);
}

.upload-row-done .upload-row-status {
  color: #2d8257;
  font-weight: 700;
}

.upload-row-error {
  border-color: rgba(214, 69, 69, 0.4);
  background: rgba(214, 69, 69, 0.05);
}

.upload-row-error .upload-row-status {
  color: #b93232;
  font-weight: 700;
}

/* ── Galerie ──────────────────────────────────────────────── */
.gallery-empty {
  padding: 24px;
  text-align: center;
  color: rgba(46, 49, 80, 0.6);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.gallery-tile {
  position: relative;
  display: grid;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(149, 155, 205, 0.1);
  appearance: none;
}

.gallery-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.gallery-tile-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent);
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Galerie admin : vignettes plus grandes avec actions visibles */
.gallery-grid-admin {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-tile-admin {
  aspect-ratio: auto;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(149, 155, 205, 0.2);
  cursor: default;
}

.gallery-tile-admin .gallery-thumb {
  position: static;
  width: 100%;
  height: 160px;
  border-radius: 14px;
  object-fit: cover;
}

.gallery-tile-admin .gallery-tile-name {
  position: static;
  background: none;
  color: var(--ink);
  padding: 0;
}

.gallery-tile-name-unknown {
  color: var(--orange-deep);
  font-style: italic;
}

.gallery-tile-admin .gallery-tile-name-unknown {
  color: var(--orange-deep);
}

.lightbox-claim {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.lightbox-claim input {
  width: auto;
  min-width: 200px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: inherit;
}

.lightbox-claim input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.lightbox-claim input:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  border-color: transparent;
}

.gallery-tile-actions {
  display: flex;
  gap: 8px;
}

.gallery-tile-actions form {
  margin: 0;
}

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(20, 20, 32, 0.92);
  padding: 16px;
}

.lightbox-content {
  display: grid;
  gap: 12px;
  max-width: min(94vw, 900px);
  max-height: 92vh;
  justify-items: center;
}

.lightbox-media {
  display: grid;
  place-items: center;
  max-width: 100%;
  max-height: 76vh;
}

.lightbox-media img,
.lightbox-media video {
  max-width: 100%;
  max-height: 76vh;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.lightbox-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  font-size: 0.9rem;
  flex-wrap: wrap;
  text-align: center;
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  appearance: none;
  border: 0;
  border-radius: 999px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  z-index: 51;
}

.lightbox-close {
  top: 16px;
  right: 16px;
}

.lightbox-prev {
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.28);
}

@media (min-width: 620px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .gallery-grid-admin {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
