:root {
  --pink: #ff00ff;
  --cyan: #00ffff;
  --yellow: #ffff00;
  --green: #00ff00;
  --orange: #ff6600;
  --rose: #ff3399;
  --comic: "Comic Sans MS", "Comic Neue", "Chalkboard SE", cursive;
  --impact: Impact, "Anton", "Arial Black", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--comic);
  color: #fff;
  background-color: #000033;
  /* Ciel étoilé en mosaïque, comme en 1999 */
  background-image:
    radial-gradient(#fff 1px, transparent 1.6px),
    radial-gradient(var(--yellow) 1px, transparent 1.6px),
    radial-gradient(var(--pink) 1.2px, transparent 1.8px);
  background-size: 60px 60px, 110px 110px, 170px 170px;
  background-position: 0 0, 30px 50px, 80px 20px;
  animation: drift 40s linear infinite;
  overflow-x: hidden;
}
@keyframes drift {
  to { background-position: 60px 60px, 140px 160px, 250px 190px; }
}

/* ---------- Effets classiques ---------- */
.blink { animation: blink 2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.rainbow { animation: rainbow 1.6s linear infinite; }
@keyframes rainbow {
  0%   { color: var(--pink); }
  20%  { color: var(--yellow); }
  40%  { color: var(--green); }
  60%  { color: var(--cyan); }
  80%  { color: var(--orange); }
  100% { color: var(--pink); }
}

.top-marquee {
  display: block;
  background: var(--pink);
  color: var(--yellow);
  font-weight: 700;
  font-size: 18px;
  padding: 6px 0;
  border-bottom: 4px ridge var(--yellow);
  text-shadow: 2px 2px 0 #000;
}

/* ---------- Ouverture ---------- */
.hero {
  min-height: calc(100svh - 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
  padding: 40px 16px;
}

.new {
  font-family: var(--impact);
  font-size: 22px;
  color: var(--yellow);
  background: red;
  padding: 2px 12px;
  rotate: -8deg;
  border: 2px dashed var(--yellow);
}

.wordart {
  font-family: var(--impact);
  font-weight: 400;
  line-height: 0.95;
  font-size: clamp(44px, 11vw, 140px);
  letter-spacing: 0.02em;
}
.wordart .line { display: block; }
.wordart .ch {
  display: inline-block;
  text-shadow:
    3px 3px 0 #000,
    6px 6px 0 var(--pink),
    9px 9px 0 #000;
  animation:
    rainbow 2s linear infinite,
    wave 1.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.12s), calc(var(--i) * -0.1s);
}
@keyframes wave {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -0.12em; }
}

.invite {
  font-size: clamp(24px, 4.5vw, 44px);
  font-weight: 700;
  text-shadow: 3px 3px 0 #000;
}

.construction {
  padding: 8px;
  background: repeating-linear-gradient(45deg, var(--yellow) 0 18px, #000 18px 36px);
}
.construction span {
  display: block;
  background: #000;
  color: var(--yellow);
  font-weight: 700;
  font-size: clamp(15px, 2.5vw, 20px);
  padding: 8px 18px;
}

.scroll-down {
  color: var(--green);
  font-weight: 700;
  font-size: 20px;
}

/* ---------- Les "articles" façon blog ---------- */
.post, .box {
  background: rgba(0, 0, 0, 0.75);
  border: 4px ridge var(--pink);
}
.post-head, .box-head {
  background: linear-gradient(90deg, var(--pink), #6600cc);
  color: var(--yellow);
  font-weight: 700;
  padding: 6px 12px;
  text-shadow: 2px 2px 0 #000;
  border-bottom: 2px solid var(--yellow);
}

/* ---------- Texte au scroll ---------- */
.story {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.story .post { max-width: 900px; width: 100%; }

.story-text {
  padding: clamp(16px, 4vw, 40px);
  font-size: clamp(20px, min(3vw, 4.4svh), 38px);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}
.story-text .word {
  color: var(--yellow);
  text-shadow: 2px 2px 0 var(--pink);
}

/* ---------- Infos + sidebar ---------- */
.layout {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 16px;
  align-items: flex-start;
}
.col-main { flex: 1 1 520px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.col-side { flex: 0 1 260px; display: flex; flex-direction: column; gap: 20px; min-width: 0; width: 100%; }

.infos {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(17px, 2.4vw, 22px);
}
.infos td {
  padding: 12px;
  border: 2px dotted var(--cyan);
}
.infos td:first-child { color: var(--cyan); font-weight: 700; white-space: nowrap; }
.infos .hot { color: var(--yellow); font-weight: 700; }

.btn-rsvp {
  display: block;
  margin: 18px auto;
  width: fit-content;
  padding: 12px 26px;
  font-family: var(--impact);
  font-size: 26px;
  color: #000;
  text-decoration: none;
  background: linear-gradient(var(--green), #009900);
  border: 4px outset var(--green);
  animation: pulse 0.8s ease-in-out infinite;
}
.btn-rsvp:active { border-style: inset; }
@keyframes pulse { 50% { scale: 1.08; } }

.com {
  padding: 10px 14px;
  border-bottom: 1px dashed var(--pink);
  font-size: 17px;
}
.com b { color: var(--cyan); }
.poste-com { padding: 12px 14px; color: var(--yellow); font-weight: 700; }

.counter {
  margin: 12px auto;
  width: fit-content;
  padding: 4px 10px;
  background: #000;
  border: 3px inset #888;
  color: var(--green);
  font-family: "Courier New", monospace;
  font-size: 30px;
  letter-spacing: 0.15em;
  text-shadow: 0 0 6px var(--green);
}

.friends { list-style: none; padding: 10px 14px; line-height: 1.8; }
.friends li { color: var(--rose); text-decoration: underline; cursor: pointer; }
.friends li:hover { color: var(--yellow); }

.box marquee { display: block; padding: 10px 0; color: var(--cyan); }

.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.badge {
  width: 88px;
  height: 31px;
  display: grid;
  place-items: center;
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  border: 2px outset #ccc;
}
.b1 { background: #003399; color: var(--yellow); }
.b2 { background: var(--yellow); color: #000; }
.b3 { background: var(--cyan); color: #003399; }
.b4 { background: #000; color: var(--green); }

.footer {
  text-align: center;
  padding: 40px 16px 60px;
  font-size: 14px;
  color: #aaa;
}
.footer .blink { margin-top: 10px; font-size: 26px; font-weight: 700; }

/* Traînée d'étoiles derrière la souris */
.spark {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  translate: -50% -50%;
  font-size: 18px;
  text-shadow: 0 0 6px currentColor;
}

/* Si les animations sont coupées sur l'appareil */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}

/* ---------- Popup "Je viens" ---------- */
.popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 51, 0.6);
}
.popup-backdrop[hidden] { display: none; }

.win {
  width: min(380px, 100%);
  background: #000;
  border: 5px ridge var(--pink);
  box-shadow: 0 0 0 3px var(--yellow), 0 0 30px var(--pink);
  text-align: center;
}
.win-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(90deg, var(--pink), #6600cc);
  color: var(--yellow);
  font-weight: 700;
  padding: 6px 8px 6px 12px;
  text-shadow: 2px 2px 0 #000;
  border-bottom: 2px solid var(--yellow);
}
.win-x {
  background: none;
  border: none;
  color: var(--yellow);
  font-size: 18px;
  cursor: pointer;
  text-shadow: 2px 2px 0 #000;
}
.win-x:hover { color: var(--cyan); }

.win-body {
  padding: 24px 16px 8px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}
.win-big {
  font-family: var(--impact);
  font-weight: 400;
  font-size: 44px;
  text-shadow: 3px 3px 0 #000, 5px 5px 0 var(--pink);
}
.win-body p:not(.win-big) { color: var(--cyan); text-shadow: 2px 2px 0 #000; }
.win-kiss { color: var(--rose) !important; }

.win-actions { padding: 12px 0 20px; }
.win-ok {
  font-family: var(--impact);
  font-size: 22px;
  padding: 8px 26px;
  color: #000;
  background: linear-gradient(var(--green), #009900);
  border: 4px outset var(--green);
  cursor: pointer;
}
.win-ok:active { border-style: inset; }
.win-ok:focus-visible { outline: 2px dashed var(--yellow); outline-offset: 4px; }

.win-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px 20px;
}
.win-form label {
  color: var(--cyan);
  font-size: 20px;
  font-weight: 700;
  text-shadow: 2px 2px 0 #000;
}
.win-form input {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--comic);
  font-size: 18px;
  color: var(--yellow);
  background: #000;
  border: 3px inset var(--pink);
}
.win-form input::placeholder { color: #777; }
.win-form input:focus { outline: 2px dashed var(--yellow); outline-offset: 2px; }
.win-form .win-ok:disabled { opacity: 0.5; cursor: wait; }
.win-error { color: var(--orange); font-weight: 700; }
.win-error[hidden], .win-done[hidden], .win-form[hidden] { display: none; }

/* ---------- Commentaires ---------- */
.com { overflow-wrap: anywhere; white-space: pre-line; }
.com .com-date { display: block; color: #888; font-size: 13px; margin-top: 2px; }
.com-empty { padding: 12px 14px; color: #aaa; font-style: italic; }
.com-empty[hidden] { display: none; }
.com-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 14px 16px;
}
.com-form input,
.com-form textarea {
  width: 100%;
  padding: 8px 10px;
  font-family: var(--comic);
  font-size: 16px;
  color: var(--yellow);
  background: #000;
  border: 3px inset var(--pink);
  resize: vertical;
}
.com-form input::placeholder,
.com-form textarea::placeholder { color: #777; }
.com-form input:focus,
.com-form textarea:focus { outline: 2px dashed var(--yellow); outline-offset: 2px; }
.com-form .com-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.com-send {
  align-self: flex-start;
  font-family: var(--impact);
  font-size: 18px;
  padding: 6px 20px;
  color: #000;
  background: linear-gradient(var(--yellow), #ccaa00);
  border: 3px outset var(--yellow);
  cursor: pointer;
}
.com-send:active { border-style: inset; }
.com-send:disabled { opacity: 0.5; cursor: wait; }
