/* ============================================
   AGATHE PUE .COM - feuille de style - 1998
   Optimisé iPhone / Safari mobile
   ============================================ */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 0 30px;
  font-family: "Comic Sans MS", "Chalkboard SE", "Marker Felt", cursive;
  color: #ffff00;
  background-color: #000060;
  background-image: url("Doigt d'honneur.jpg");
  background-size: 90px;
  background-repeat: repeat;
  background-attachment: scroll;
  overflow-x: hidden;
  animation: bgshift 3s linear infinite;
}

/* voile sombre pour rester (un peu) lisible par dessus le papier-peint */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 70, .78);
  z-index: -1;
  pointer-events: none;
}

@keyframes bgshift {
  from { background-position: 0 0; }
  to   { background-position: 90px 90px; }
}

center { position: relative; z-index: 2; padding: 0 8px; }

/* ---------- MARQUEE CSS (marquee natif = pas fiable) ---------- */
.mq { overflow: hidden; white-space: nowrap; }
.mq-inner { display: inline-flex; animation: mqscroll 14s linear infinite; will-change: transform; }
.mq-inner span { white-space: nowrap; }
@keyframes mqscroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ff0000;
  color: #ffff00;
  font-weight: bold;
  font-size: clamp(11px, 3.4vw, 16px);
  padding: 5px 0;
  border-bottom: 3px ridge #ffff00;
  text-shadow: 1px 1px 0 #000;
}

/* ---------- TITRE WORDART ---------- */
.wordart {
  margin: 18px 0 4px;
  font-size: clamp(38px, 14vw, 96px);
  line-height: 1;
  font-weight: bold;
  font-style: italic;
  letter-spacing: 2px;
  background: linear-gradient(180deg, #fff700 0%, #ff9d00 40%, #ff0000 60%, #7a0000 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 2px #000;
  filter: drop-shadow(4px 4px 0 #00ffff) drop-shadow(-2px -2px 0 #ff00ff);
  animation: wobble 1.4s ease-in-out infinite;
  transform-origin: center;
}

@keyframes wobble {
  0%, 100% { transform: rotate(-3deg) scale(1); }
  50%      { transform: rotate(3deg) scale(1.06); }
}

.sub {
  margin: 0 0 10px;
  font-size: clamp(15px, 5vw, 30px);
  color: #00ff00;
  text-shadow: 2px 2px 0 #ff00ff;
}

.blink { animation: blink 0.7s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.tiny { font-size: clamp(10px, 3vw, 14px); }

/* ---------- BARRE ARC-EN-CIEL ---------- */
.hr-rainbow {
  height: 8px;
  margin: 16px auto;
  width: 96%;
  border-radius: 4px;
  background: linear-gradient(90deg, red, orange, yellow, lime, cyan, blue, magenta, red);
  background-size: 200% 100%;
  animation: rainbowslide 1.5s linear infinite;
}
@keyframes rainbowslide { to { background-position: -200% 0; } }

/* ---------- HERO ---------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: nowrap;
  margin: 10px 0;
}

.finger {
  width: clamp(70px, 22vw, 150px);
  height: auto;
  border: 4px ridge #ff00ff;
  background: #fff;
  display: block;
}

.spin { animation: spin 2.4s linear infinite; }
.spin.rev { animation-direction: reverse; }
@keyframes spin {
  0%   { transform: rotate(-18deg) scale(1); }
  50%  { transform: rotate(18deg) scale(1.12); }
  100% { transform: rotate(-18deg) scale(1); }
}

.hero-text { flex: 1 1 auto; min-width: 0; }

.glow {
  margin: 0;
  font-size: clamp(26px, 9vw, 60px);
  font-weight: bold;
  color: #fff;
  text-shadow: 0 0 6px #0ff, 0 0 14px #0ff, 0 0 24px #08f;
  animation: pulse .6s ease-in-out infinite alternate;
}
.glow2 {
  margin: 0;
  font-size: clamp(30px, 11vw, 70px);
  font-weight: bold;
  color: #ff0;
  text-shadow: 0 0 6px #f0f, 0 0 16px #f00, 0 0 30px #f00;
  animation: pulse .6s ease-in-out infinite alternate-reverse;
}
@keyframes pulse { to { transform: scale(1.12); } }

/* ---------- CONSTRUCTION ---------- */
.construction {
  display: inline-block;
  background: #ffcc00;
  color: #000;
  font-weight: bold;
  font-size: clamp(12px, 4vw, 20px);
  padding: 8px 12px;
  border: 4px dashed #000;
  text-shadow: none;
}
.cone { display: inline-block; animation: bounce .5s ease-in-out infinite alternate; font-size: 1.4em; }
@keyframes bounce { to { transform: translateY(-8px); } }

/* ---------- TABLEAU ---------- */
.retro-table {
  width: 96%;
  max-width: 560px;
  margin: 18px auto;
  border: 5px outset #00ffff;
  background: #200040;
  font-size: clamp(11px, 3.6vw, 17px);
}
.retro-table th {
  background: #ff00ff;
  color: #ffff00;
  padding: 8px 4px;
  font-size: clamp(13px, 4.2vw, 20px);
  border-bottom: 3px solid #000;
}
.retro-table td {
  padding: 7px 8px;
  border-bottom: 1px dotted #00ffff;
  text-align: left;
  color: #fff;
}
.retro-table td.ok { color: #00ff00; font-weight: bold; text-align: right; white-space: nowrap; }
.retro-table td.ko { color: #ff2d2d; font-weight: bold; text-align: right; white-space: nowrap; animation: blink 1s steps(1) infinite; }

/* ---------- MUR DE TEXTE ---------- */
.wall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
  max-width: 900px;
  margin: 0 auto;
  padding: 6px;
}
.wall span {
  display: inline-block;
  font-weight: bold;
  font-size: clamp(12px, 4vw, 26px);
  text-shadow: 2px 2px 0 #000;
  animation: shake 1s ease-in-out infinite;
}
@keyframes shake {
  0%,100% { transform: rotate(-4deg) translateY(0); }
  50%     { transform: rotate(4deg) translateY(-5px); }
}

/* ---------- GALERIE ---------- */
.section {
  color: #00ffff;
  font-size: clamp(15px, 5vw, 28px);
  text-shadow: 2px 2px 0 #ff0000;
  margin: 14px 0 8px;
}
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 900px;
  margin: 0 auto;
}
.gallery img {
  width: clamp(58px, 18vw, 100px);
  border: 3px ridge #ffff00;
  background: #fff;
}

/* ---------- BOUTON ---------- */
.big-button {
  font-family: inherit;
  font-weight: bold;
  font-size: clamp(13px, 4.4vw, 22px);
  color: #000;
  background: linear-gradient(#fff, #ffcc00);
  border: 6px outset #ff00ff;
  padding: 14px 18px;
  max-width: 94%;
  cursor: pointer;
  animation: btnpulse .8s ease-in-out infinite alternate;
}
.big-button:active { border-style: inset; transform: scale(.96); }
@keyframes btnpulse {
  from { box-shadow: 0 0 0 0 #ff00ff; }
  to   { box-shadow: 0 0 26px 8px #ff00ff; }
}

.verdict {
  min-height: 2em;
  font-size: clamp(16px, 6vw, 34px);
  font-weight: bold;
  color: #00ff00;
  text-shadow: 2px 2px 0 #000, 0 0 12px #0f0;
  padding: 0 10px;
}

/* ---------- LIVRE D'OR ---------- */
.guestbook {
  width: 96%;
  max-width: 560px;
  margin: 0 auto;
  background: #000;
  border: 4px double #00ff00;
  color: #00ff00;
  font-family: "Courier New", monospace;
  font-size: clamp(11px, 3.4vw, 15px);
  text-align: left;
  padding: 12px 14px;
}
.guestbook h3 { text-align: center; color: #ffff00; margin: 0 0 10px; }
.guestbook p { margin: 8px 0; }
.guestbook b { color: #00ffff; }

/* ---------- COMPTEUR ---------- */
.counter-box {
  margin: 20px auto;
  font-size: clamp(12px, 3.8vw, 18px);
  color: #fff;
}
.counter {
  display: inline-block;
  font-family: "Courier New", monospace;
  font-weight: bold;
  font-size: clamp(20px, 7vw, 34px);
  background: #000;
  color: #ff0000;
  border: 3px inset #888;
  padding: 3px 8px;
  letter-spacing: 3px;
}

.webring {
  margin: 14px auto;
  font-size: clamp(11px, 3.4vw, 16px);
  color: #fff;
}
.webring a { color: #00ffff; }

.footer {
  margin: 24px auto 0;
  font-size: clamp(10px, 3vw, 14px);
  color: #fff;
  line-height: 1.7;
}

/* ---------- PORTE D'ENTRÉE ---------- */
#splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000060;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 20px;
}
#splash.gone { display: none; }
.splash-finger {
  width: clamp(90px, 30vw, 170px);
  border: 5px ridge #ff00ff;
  background: #fff;
  animation: spin 2s linear infinite;
}
.splash-title {
  margin: 0;
  font-size: clamp(26px, 9vw, 56px);
  font-weight: bold;
  font-style: italic;
  color: #ffff00;
  text-shadow: 3px 3px 0 #ff0000, -2px -2px 0 #00ffff;
}
.splash-warn { margin: 0; color: #ff4040; font-size: clamp(14px, 4.6vw, 24px); font-weight: bold; }
#enter-btn {
  font-family: inherit;
  font-weight: bold;
  font-size: clamp(20px, 7vw, 34px);
  color: #000;
  background: linear-gradient(#fff, #00ff00);
  border: 7px outset #00ff00;
  padding: 16px 34px;
  cursor: pointer;
  animation: btnpulse .7s ease-in-out infinite alternate;
}
#enter-btn:active { border-style: inset; transform: scale(.95); }

/* ---------- BOUTON MUET ---------- */
#mute-btn {
  position: fixed;
  right: 8px;
  bottom: 8px;
  z-index: 150;
  font-size: 24px;
  line-height: 1;
  width: 52px;
  height: 52px;
  border: 4px outset #ffff00;
  background: #ff0000;
  cursor: pointer;
  padding: 0;
}
#mute-btn:active { border-style: inset; }

/* ---------- SOUNDBOARD ---------- */
.soundboard {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 620px;
  margin: 10px auto;
  padding: 0 6px;
}
.soundboard button {
  font-family: inherit;
  font-weight: bold;
  font-size: clamp(12px, 3.6vw, 17px);
  color: #000;
  padding: 14px 10px;
  min-width: 44%;
  flex: 1 1 44%;
  border: 5px outset #00ffff;
  background: linear-gradient(#fff, #ffcc00);
  cursor: pointer;
  text-shadow: none;
}
.soundboard button:active {
  border-style: inset;
  transform: scale(.94);
  background: linear-gradient(#ff00ff, #fff);
}
@media (min-width: 520px) {
  .soundboard button { min-width: 0; flex: 0 0 30%; }
}

/* ---------- COUCHES D'ANIMATION ---------- */
#rain-layer, #trail-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  overflow: hidden;
}

.raindrop {
  position: absolute;
  top: -140px;
  width: 52px;
  will-change: transform;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(115vh) rotate(720deg); }
}

.trail {
  position: absolute;
  font-weight: bold;
  font-size: 16px;
  color: #ff00ff;
  text-shadow: 1px 1px 0 #000;
  animation: trailfade .9s ease-out forwards;
}
@keyframes trailfade {
  to { transform: translateY(-50px) scale(1.9); opacity: 0; }
}

/* économie de batterie si l'iPhone est en "réduire les animations" */
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation-duration: .001s !important; animation-iteration-count: 1 !important; }
}
