/* willyume.com : scène sous-marine, sans JavaScript. Tout vient du site
   lui-même (CSP du serveur : ni style en ligne ni ressource externe). */

:root {
  --sea-top: #0a4d7a;
  --sea-mid: #06325a;
  --sea-deep: #021a33;
  --abyss: #010d1c;
  --text: #ffffff;
  --muted: #a9d4f5;
  --faint: #7fb2d9;
  --glass: rgb(255 255 255 / 8%);
  --glass-hover: rgb(255 255 255 / 16%);
  --glass-line: rgb(255 255 255 / 14%);
  color-scheme: dark;
}

/* Polices hébergées sur le site, sous-ensembles latins de Google Fonts,
   licence OFL (fonts/OFL-*.txt) : Baloo 2 ExtraBold pour le titre
   « Willyume », comme sur la page Carrd ; Roboto pour l'accroche. */
@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/baloo2-800-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/roboto-400-latin.woff2") format("woff2");
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(180deg, var(--sea-top) 0%, var(--sea-mid) 35%, var(--sea-deep) 75%, var(--abyss) 100%) fixed;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
  flex: none;
}

/* --- Décor : rayons, bulles, Blåhaj ------------------------------------- */

.rays,
.bubbles,
.shark {
  position: fixed;
  pointer-events: none;
}

.rays {
  inset: 0;
  opacity: 0.25;
  background: repeating-linear-gradient(100deg, transparent 0 60px, rgb(255 255 255 / 15%) 60px 90px, transparent 90px 180px);
  mask-image: linear-gradient(180deg, #000 0%, transparent 55%);
  animation: sway 9s ease-in-out infinite alternate;
}

@keyframes sway {
  to {
    transform: translateX(-40px) skewX(-3deg);
  }
}

.bubbles {
  inset: 0;
  overflow: hidden;
}

.bubbles span {
  position: absolute;
  bottom: -20px;
  width: 10px;
  height: 10px;
  border: 1px solid rgb(255 255 255 / 50%);
  border-radius: 50%;
  animation: rise linear infinite;
}

.bubbles span:nth-child(1) { left: 8%;  width: 8px;  height: 8px;  animation-duration: 11s; animation-delay: -2s; }
.bubbles span:nth-child(2) { left: 22%; width: 12px; height: 12px; animation-duration: 15s; animation-delay: -7s; }
.bubbles span:nth-child(3) { left: 37%; width: 6px;  height: 6px;  animation-duration: 9s;  animation-delay: -4s; }
.bubbles span:nth-child(4) { left: 55%; width: 10px; height: 10px; animation-duration: 13s; animation-delay: -1s; }
.bubbles span:nth-child(5) { left: 68%; width: 7px;  height: 7px;  animation-duration: 10s; animation-delay: -6s; }
.bubbles span:nth-child(6) { left: 81%; width: 14px; height: 14px; animation-duration: 17s; animation-delay: -3s; }
.bubbles span:nth-child(7) { left: 92%; width: 9px;  height: 9px;  animation-duration: 12s; animation-delay: -9s; }

@keyframes rise {
  to {
    transform: translate(20px, -110vh);
  }
}

.shark {
  top: 18vh;
  left: -220px;
  width: 180px;
  height: auto;
  opacity: 0.9;
  animation: swim 22s linear infinite;
}

@keyframes swim {
  0% {
    left: -220px;
    transform: translateY(0);
  }
  50% {
    transform: translateY(30px);
  }
  100% {
    left: 110vw;
    transform: translateY(0);
  }
}

/* --- Contenu ------------------------------------------------------------- */

main {
  position: relative;
  z-index: 1;
  width: min(30rem, 100%);
  margin: 0 auto;
  padding: 44vh 1.25rem 3rem;
  text-align: center;
}

h1 {
  margin: 0;
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-shadow: 0 4px 18px rgb(0 0 0 / 50%);
}

.tagline {
  margin: 0.35rem 0 0;
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 1.05rem;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.1rem 0.5rem;
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  background: var(--glass);
  backdrop-filter: blur(6px);
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.grid a:hover,
.grid a:focus-visible {
  background: var(--glass-hover);
  transform: translateY(-3px);
}

.grid svg {
  width: 1.6rem;
  height: 1.6rem;
}

.grid small {
  color: var(--muted);
}

.mail {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.8rem 2rem;
  border-radius: 999px;
  background: #f2f7fb;
  color: var(--sea-mid);
  font-weight: 700;
  text-decoration: none;
}

.mail svg {
  width: 1rem;
  height: 1rem;
}

.hint {
  margin: 1.25rem 0 0;
  font-size: 0.85rem;
  color: var(--faint);
}

@media (max-width: 360px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  /* Immobile, Blåhaj reste visible au lieu d'attendre hors champ. */
  .shark {
    left: 8vw;
  }
}
