/* ===== PascalWorld — style kitsch 2003 assumé ===== */

@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700&family=Bungee&display=swap');

:root {
  --gold: #ffcf40;
  --gold-dark: #b8860b;
  --purple: #7b2ff7;
  --pink: #ff5fa2;
  --green: #39ff88;
  --bg: #1a0033;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: #fff;
  font-family: 'Comic Neue', cursive, sans-serif;
  overflow-x: hidden;
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32"><circle cx="16" cy="16" r="14" fill="%23ffcf40" stroke="%23b8860b" stroke-width="2"/><text x="16" y="21" font-size="14" text-anchor="middle">€</text></svg>') 16 16, auto;
}

/* fond étoilé scintillant */
#starfield {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: radial-gradient(ellipse at bottom, #2d0a5e 0%, #1a0033 60%, #000 100%);
}
.star {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  animation: twinkle 2s infinite ease-in-out;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.8); }
}

/* pluie de pièces */
#coin-rain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.coin {
  position: absolute;
  top: -40px;
  font-size: 24px;
  animation-name: fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  filter: drop-shadow(0 0 4px gold);
}
@keyframes fall {
  0% { transform: translateY(-5vh) rotate(0deg); }
  100% { transform: translateY(105vh) rotate(720deg); }
}

/* nav fixée en haut de page */
body {
  padding-top: 64px;
}
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 10px;
  background: repeating-linear-gradient(45deg, var(--purple), var(--purple) 20px, var(--pink) 20px, var(--pink) 40px);
  border-bottom: 4px dashed var(--gold);
}

/* sous 700px : une seule ligne défilante plutôt qu'un wrap multi-lignes
   (hauteur de nav imprévisible sinon, qui viendrait chevaucher le contenu) */
@media (max-width: 700px) {
  nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  background: rgba(0,0,0,0.4);
  padding: 6px 12px;
  border-radius: 20px;
  border: 2px solid var(--gold);
  transition: transform .2s;
  white-space: nowrap;
  font-size: 14px;
  flex-shrink: 0;
}
nav a:hover {
  transform: scale(1.15) rotate(-3deg);
  background: var(--gold);
  color: #1a0033;
}

section {
  position: relative;
  max-width: 900px;
  margin: 40px auto;
  padding: 30px;
  background: rgba(0,0,0,0.55);
  border: 3px solid var(--gold);
  border-radius: 18px;
  box-shadow: 0 0 30px rgba(255,207,64,0.4);
}

@media (max-width: 480px) {
  section {
    margin: 25px 10px;
    padding: 18px;
    border-radius: 12px;
  }
  .mirror-box {
    width: 160px;
    height: 160px;
    font-size: 44px;
  }
  #retirement-countdown {
    font-size: 16px;
    padding: 10px 14px;
  }
  #visitor-counter {
    font-size: 14px;
    letter-spacing: 2px;
  }
}

h1, h2 {
  font-family: 'Bungee', cursive;
  text-align: center;
  text-shadow: 3px 3px 0 var(--purple), -2px -2px 0 var(--pink);
}

h1 {
  font-size: clamp(28px, 6vw, 64px);
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-15px) rotate(1deg); }
}

h2 {
  font-size: clamp(22px, 4vw, 38px);
  color: var(--gold);
}

.blink {
  animation: blink 1s step-start infinite;
  color: var(--green);
}
@keyframes blink { 50% { opacity: 0; } }

.typewriter {
  display: inline-block;
  border-right: 3px solid var(--gold);
  white-space: nowrap;
  overflow: hidden;
  animation: typing 3.5s steps(40, end) infinite, blinkcursor .7s step-end infinite;
}
@keyframes typing { 0%, 90%, 100% { width: 0 } 45%, 80% { width: 100% } }
@keyframes blinkcursor { 50% { border-color: transparent; } }

/* hero */
#hero {
  text-align: center;
  padding-top: 50px;
}
#retirement-countdown {
  font-size: 24px;
  background: var(--purple);
  display: inline-block;
  padding: 15px 25px;
  border-radius: 12px;
  margin-top: 20px;
  border: 3px dashed var(--gold);
  animation: wiggle 3s infinite;
}
@keyframes wiggle {
  0%, 100% { transform: rotate(-1deg); }
  50% { transform: rotate(1deg); }
}

/* visitor counter old school */
#visitor-counter {
  font-family: monospace;
  background: #000;
  color: var(--green);
  display: inline-block;
  padding: 8px 14px;
  border: 2px solid #444;
  letter-spacing: 4px;
  margin-top: 10px;
}

/* calvitie shine meter */
.shine-meter {
  width: 100%;
  height: 30px;
  background: #333;
  border-radius: 15px;
  overflow: hidden;
  border: 2px solid var(--gold);
  margin: 15px 0;
}
.shine-fill {
  height: 100%;
  width: 97%;
  background: linear-gradient(90deg, #fff8dc, #ffd700, #fff8dc);
  background-size: 200% 100%;
  animation: shine-move 1.5s linear infinite;
}
@keyframes shine-move {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

.mirror-box {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 20px auto;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, #ddd 40%, #bbb 70%);
  border: 6px solid var(--gold);
  box-shadow: inset 0 0 30px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
}
.mirror-box .glare {
  position: absolute;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  filter: blur(8px);
  animation: glare-move 4s infinite ease-in-out;
}
@keyframes glare-move {
  0%, 100% { top: 20px; left: 30px; }
  50% { top: 60px; left: 140px; }
}

/* fake outlook calendar */
.agenda {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.agenda-slot {
  background: #fff;
  color: #333;
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  text-align: center;
  box-shadow: 0 4px 0 rgba(0,0,0,0.3);
  transition: transform .2s;
}
.agenda-slot:hover { transform: translateY(-6px) rotate(-2deg); background: var(--gold); }
.agenda-slot b { display: block; color: var(--purple); margin-bottom: 4px; }

/* coin gallery 3D */
.coin-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  justify-content: center;
  margin-top: 20px;
  perspective: 600px;
}
.coin-3d {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe066, var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border: 3px solid #fff8dc;
  animation: spin3d 4s linear infinite;
  box-shadow: 0 0 15px gold;
}
@keyframes spin3d {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}
.estimation {
  text-align: center;
  margin-top: 15px;
  font-size: 22px;
  color: var(--green);
  font-weight: bold;
}

/* forge of empires parody bars */
.foe-bar-label { display: flex; justify-content: space-between; font-size: 14px; margin-top: 15px; }
.foe-bar {
  width: 100%;
  height: 22px;
  background: #333;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--green);
}
.foe-fill {
  height: 100%;
  background: repeating-linear-gradient(45deg, var(--green), var(--green) 10px, #1a5c33 10px, #1a5c33 20px);
  animation: grow-bar 6s ease-in-out infinite alternate;
}
@keyframes grow-bar {
  0% { width: 2%; }
  100% { width: 8%; }
}

/* chat easter egg */
#cat {
  position: fixed;
  bottom: 85px;
  right: 20px;
  width: 60px;
  height: 60px;
  font-size: 50px;
  z-index: 999;
  pointer-events: auto;
  cursor: pointer;
  transition: left .4s ease, top .4s ease;
  filter: drop-shadow(0 0 6px #000);
}
#cat.muted-glow {
  animation: cat-glow 0.6s ease-in-out infinite alternate;
}
@keyframes cat-glow {
  from { filter: drop-shadow(0 0 6px #000); }
  to { filter: drop-shadow(0 0 14px var(--green)); }
}

/* encart Lucien */
.baby-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  justify-content: center;
  margin-top: 15px;
}
.baby-emoji {
  font-size: 70px;
  animation: baby-bounce 2s infinite;
}
@keyframes baby-bounce {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-10px) rotate(4deg); }
}
.baby-age {
  background: var(--purple);
  border: 3px dashed var(--gold);
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 18px;
  text-align: center;
}

/* travel gallery */
.travel-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.travel-card {
  background: linear-gradient(160deg, var(--purple), #3a0d75);
  border-radius: 14px;
  padding: 15px;
  text-align: center;
  border: 3px solid var(--pink);
  transition: transform .3s;
  overflow: hidden;
}
.travel-card:hover { transform: rotate(2deg) scale(1.05); }
.travel-card .emoji-scene { font-size: 50px; margin-bottom: 10px; }
.travel-card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 10px;
  display: block;
  background: #333;
  min-height: 100px;
  object-fit: cover;
}
.travel-card figcaption { font-weight: bold; color: var(--gold); }

/* confetti countdown button */
.confetti-btn {
  display: block;
  margin: 20px auto 0;
  padding: 14px 28px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 30px;
  border: 3px solid var(--gold);
  background: var(--pink);
  color: #fff;
  cursor: pointer;
  transition: transform .2s;
}
.confetti-btn:hover { transform: scale(1.1) rotate(-2deg); }

/* guestbook */
form.guestbook {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}
form.guestbook input, form.guestbook textarea {
  padding: 10px;
  border-radius: 8px;
  border: 2px solid var(--gold);
  font-family: inherit;
  background: #fff;
  color: #222;
}
.guestbook-entries {
  margin-top: 20px;
  max-height: 300px;
  overflow-y: auto;
}
.gb-entry {
  background: rgba(255,255,255,0.1);
  border-left: 4px solid var(--green);
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 6px;
  font-size: 14px;
}
.gb-entry b { color: var(--gold); }

footer {
  text-align: center;
  padding: 30px 10px;
  font-size: 12px;
  color: #aaa;
}

.mute-btn {
  position: fixed;
  bottom: 15px;
  right: 15px;
  z-index: 100;
  background: var(--purple);
  border: 2px solid var(--gold);
  color: #fff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 20px;
  cursor: pointer;
}

.marquee-wrap {
  overflow: hidden;
  white-space: nowrap;
  background: var(--green);
  color: #000;
  font-weight: bold;
  padding: 6px 0;
  border-top: 3px solid #000;
  border-bottom: 3px solid #000;
}
.marquee-track {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 18s linear infinite;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
