:root {
  --bg: #0e0b1a;
  --bg-2: #17122b;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.12);
  --text: #f4f1ff;
  --muted: #a79fc9;
  --accent: #ff3d81;
  --accent-2: #ffb23d;
  --ok: #3ddc84;
  --danger: #ff5a5a;
  --radius: 20px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial,
    sans-serif;
  color: var(--text);
  background: radial-gradient(
      1200px 700px at 15% -10%,
      rgba(255, 61, 129, 0.28),
      transparent 60%
    ),
    radial-gradient(
      1000px 700px at 110% 10%,
      rgba(255, 178, 61, 0.22),
      transparent 55%
    ),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

/* Logo Diapo.party (plateforme) affiche au-dessus du nom de l'evenement.
   width/height fixes ici ET en attributs HTML sur la balise <img> : meme si
   ce CSS ne charge pas (cache navigateur/serveur perime), l'image garde une
   taille raisonnable au lieu de s'afficher a sa taille source (849x547). */
.platform-brand {
  margin-bottom: 18px;
  opacity: 0.9;
}
.platform-brand img {
  display: block;
  width: 130px;
  height: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  font-size: 15px;
  color: var(--muted);
  text-transform: uppercase;
}
.brand .dot {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: #1a0f1f;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px -6px rgba(255, 61, 129, 0.6);
}

h1 {
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1.1;
  margin: 22px 0 8px;
  font-weight: 800;
}
h1 .grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 26px;
  line-height: 1.5;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

label.field {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 8px;
  font-weight: 600;
}

input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 16px;
  outline: none;
}
input[type="text"]:focus {
  border-color: var(--accent);
}

.btn {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  padding: 16px 20px;
  border-radius: 16px;
  color: #1a0f1f;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  width: 100%;
  transition: transform 0.08s ease, filter 0.15s ease;
}
.btn:active { transform: translateY(1px) scale(0.997); }
.btn:disabled { filter: grayscale(0.6) brightness(0.8); cursor: default; }
.btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--card-border);
}
.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--card-border);
}

.drop {
  border: 2px dashed var(--card-border);
  border-radius: 16px;
  padding: 30px 18px;
  text-align: center;
  color: var(--muted);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.drop.has { border-color: var(--accent); color: var(--text); }

.previews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.previews img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
}

.note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.toast {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px;
  display: none;
}
.toast.show { display: block; }
.toast.ok { background: rgba(61, 220, 132, 0.15); color: #b8f5d2; }
.toast.err { background: rgba(255, 90, 90, 0.15); color: #ffc9c9; }

.success {
  text-align: center;
  padding: 20px 6px;
}
.success .big {
  font-size: 54px;
  line-height: 1;
  margin-bottom: 10px;
}

a.link { color: var(--accent-2); }

/* ---------- Galerie ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 8px;
}
@media (min-width: 620px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}
.gcard {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.gcard .ph {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #000;
  cursor: zoom-in;
  display: block;
}
.gcard .info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 10px;
}
.gcard .who {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gcard .who b { color: var(--text); font-weight: 600; }
.gcard .msg {
  padding: 0 10px 10px;
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}

.likebtn {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  transition: transform 0.08s ease, background 0.15s ease;
}
.likebtn .heart { font-size: 15px; line-height: 1; filter: grayscale(1); opacity: 0.7; }
.likebtn.liked { background: rgba(255, 61, 129, 0.18); border-color: var(--accent); }
.likebtn.liked .heart { filter: none; opacity: 1; }
.likebtn:active { transform: scale(0.92); }
.likebtn .pop { animation: pop 0.3s ease; }
@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }
