@font-face { font-family: "Familjen Grotesk"; src: url("familjen-grotesk-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Familjen Grotesk"; src: url("familjen-grotesk-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Shrikhand"; src: url("shrikhand.woff2") format("woff2"); font-display: swap; }

:root {
  --lagon: #3fe8d2;      /* le fond de la pochette */
  --serviette: #ff7a1a;  /* la serviette sur la tête du chien */
  --laisse: #e8353a;     /* le rouge du logo */
  --acide: #e4f53a;      /* les traînées de glitch */
  --patte: #2b1020;      /* la patte de la pochette */
  --blanc: #fffdf6;
  --trait: 4px solid var(--patte);
}

* { box-sizing: border-box; }

html { background: var(--lagon); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--lagon);
  color: var(--patte);
  font: 400 clamp(1.0625rem, .95rem + .4vw, 1.3rem) / 1.5 "Familjen Grotesk", system-ui, sans-serif;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

a:focus-visible, button:focus-visible { outline: 4px solid var(--patte); outline-offset: 4px; border-radius: 4px; }

.page {
  position: relative;
  max-width: 78rem;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1rem, 4vw, 3rem) 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(3rem, 7vw, 6.5rem);
  grid-template-areas:
    "logo   logo"
    "devise devise"
    "cover  intro"
    "cover  outs"
    "player outs"
    "player contact"
    "foot   foot";
  grid-template-rows: auto auto auto auto auto 1fr auto;
}

.logo { grid-area: logo; margin: 0 auto; width: min(100%, 62rem); transform: rotate(-2.5deg); }

.devise {
  grid-area: devise;
  margin: .6rem 0 clamp(1.5rem, 4vw, 3rem);
  font: 400 clamp(1.25rem, 3vw, 2rem)/1.1 "Shrikhand", serif;
  text-align: center;
  transform: rotate(-1deg);
}

.cover {
  grid-area: cover;
  position: relative;
  margin: .5rem 0 0;
  align-self: start;
  transform: rotate(2.5deg);
  border: var(--trait);
  box-shadow: 14px 14px 0 var(--serviette);
}

.cover img { width: 100%; }

.cover.aboie img { animation: aboie .42s steps(6) both; }

.cover.aboie { animation: saut .42s cubic-bezier(.3, 1.8, .5, 1) both; }

@keyframes saut {
  35% { transform: rotate(-3deg) scale(1.05); }
  100% { transform: rotate(2.5deg); }
}

@keyframes aboie {
  0%   { transform: none; filter: none; }
  16%  { transform: translate(-7px, 3px) skewX(-2deg); filter: hue-rotate(120deg) saturate(1.6); clip-path: inset(0 0 12% 0); }
  33%  { transform: translate(6px, -4px) skewX(2deg); filter: hue-rotate(-80deg) contrast(1.3); clip-path: inset(18% 0 0 0); }
  50%  { transform: translate(-3px, 0); filter: invert(1) hue-rotate(180deg); clip-path: inset(0); }
  66%  { transform: translate(5px, 2px) skewX(-1deg); filter: hue-rotate(60deg) saturate(2); clip-path: inset(0 0 30% 0); }
  100% { transform: none; filter: none; clip-path: inset(0); }
}

/* L'anneau du collier, au-dessus de la médaille : d'ici part la laisse. */
.out {
  position: absolute;
  left: 49.5%;
  top: 78.5%;
  width: 1.5rem;
  height: 1.5rem;
  margin: -.75rem;
  border-radius: 50%;
  border: .32rem solid var(--acide);
  box-shadow: 0 0 0 3px var(--patte), inset 0 0 0 3px var(--patte);
}

.intro { grid-area: intro; font-size: 1.12em; }

.intro p { margin: 0 0 .7em; }

.intro p:last-child { margin: 0; font: 400 1.9em/1.1 "Shrikhand", serif; color: var(--laisse); transform: rotate(-2deg); transform-origin: left; }

.outs {
  grid-area: outs;
  display: grid;
  gap: 1.1rem;
  align-content: start;
  margin-top: 1.75rem;
  padding: 1.5rem;
  background: var(--serviette);
  border: var(--trait);
  border-radius: 14px;
  box-shadow: 10px 10px 0 var(--patte);
}

.jack {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 1rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.jack[hidden] { display: none; }

.socket {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: radial-gradient(circle, var(--patte) 0 34%, var(--blanc) 37% 100%);
  border: var(--trait);
  transition: transform .15s;
}

.jack.is-plugged .socket { background: radial-gradient(circle, var(--patte) 0 34%, var(--acide) 37% 100%); }

.jack:hover .socket { transform: scale(1.1) rotate(-12deg); }

.what strong { display: block; font: 400 1.65em/1.1 "Shrikhand", serif; }

.jack:hover strong, .jack:focus-visible strong { color: var(--blanc); }

.what span { display: block; margin-top: .2rem; font-size: .88em; line-height: 1.4; }

.player { grid-area: player; margin-top: clamp(2.5rem, 6vw, 4rem); transform: rotate(-1.2deg); }

.player iframe { display: block; width: 100%; height: 262px; border: var(--trait); box-shadow: 10px 10px 0 var(--laisse); background: #fff; }

.contact {
  grid-area: contact;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding: 1.5rem 1.6rem;
  background: var(--acide);
  border: var(--trait);
  font-size: .92em;
  transform: rotate(1.2deg);
  align-self: start;
}

.contact h2 { margin: 0 0 .3em; font: 400 1.9em/1.1 "Shrikhand", serif; }

.contact p { margin: 0 0 .7em; }

.contact p:last-child { margin: 0; }

.foot { grid-area: foot; display: flex; gap: 1.5rem; margin-top: 3rem; font-weight: 700; }

.foot a { text-underline-offset: .2em; }

.foot a:hover { color: var(--laisse); }

/* La laisse, dessinée par cable.js. Sans JS, le site reste complet. */
.laisse { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 2; }

.laisse .ombre { fill: none; stroke: var(--patte); stroke-width: 12; stroke-linecap: round; }

.laisse .fil { fill: none; stroke: var(--laisse); stroke-width: 7; stroke-linecap: round; }

.laisse .manchon { fill: var(--laisse); stroke: var(--patte); stroke-width: 3; }

.laisse .corps { fill: var(--laisse); stroke: var(--patte); stroke-width: 3; }

.laisse .vis { fill: var(--blanc); stroke: var(--patte); stroke-width: 3; }

/* Les pattes que laisse le pointeur. */
.pattes { position: fixed; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }

.pattes svg { position: absolute; width: 26px; height: 26px; margin: -13px; fill: var(--patte); animation: efface 1.4s ease-in both; }

@keyframes efface { 0%, 40% { opacity: .55; } 100% { opacity: 0; } }

@media (max-width: 52rem) {
  .page {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: "logo" "devise" "cover" "outs" "intro" "player" "contact" "foot";
  }
  .cover { box-shadow: 8px 8px 0 var(--serviette); }
  .outs { margin-top: 3.5rem; }
  .intro { margin-top: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cover.aboie, .cover.aboie img { animation: none; }
  .socket { transition: none; }
}

.not-found { min-height: 100vh; display: grid; place-content: center; padding: 1.5rem; text-align: center; font-weight: 700; }
.not-found img { width: min(30rem, 84vw); margin: 0 auto 2rem; transform: rotate(-2.5deg); }
