@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f2f0eb;
  --ink: #1d1d1b;
  --muted: #74716a;
  --hairline: rgba(29, 29, 27, .16);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --gutter: clamp(16px, 4vw, 48px);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

p {
  margin: 0;
}

/* ---------- Scène ---------- */

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 3.2vh, 32px);
  padding: clamp(48px, 10vh, 120px) var(--gutter) 32px;
  text-align: center;
}

.brand {
  margin: 0 0 clamp(8px, 2vh, 24px);
  width: min(350px, 70vw);
  font-size: inherit;
  font-weight: inherit;
}

.logo {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  fill: var(--ink);
}

.tagline {
  font-size: clamp(.875rem, .82rem + .25vw, 1rem);
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--muted);
}

.sep {
  margin: 0 .55em;
  opacity: .6;
}

.contact,
.social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px clamp(24px, 4vw, 48px);
}

.contact {
  font-size: clamp(1.0625rem, .98rem + .4vw, 1.3125rem);
  font-weight: 600;
  letter-spacing: -.005em;
}

.social {
  font-size: .9375rem;
  font-weight: 500;
}

/* ---------- Liens : une bande qui se dessine de gauche à droite ---------- */

.link {
  position: relative;
  display: inline-block;
  padding: 2px 0;
  color: inherit;
  text-decoration: none;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 0 2px 2px 0;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .6s var(--ease-out);
}

.link:hover::after,
.link:focus-visible::after {
  transform: scaleX(1);
}

.link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ---------- Pied de page ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 20px var(--gutter) 24px;
  font-size: .8125rem;
  color: var(--muted);
}

.footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.footer .link::after {
  height: 1px;
  bottom: 0;
}

/* ---------- Bandeau de consentement ---------- */

.consent {
  position: fixed;
  z-index: 10;
  right: var(--gutter);
  bottom: var(--gutter);
  width: min(360px, calc(100vw - 2 * var(--gutter)));
  padding: 20px 20px 18px;
  background: #fbfaf7;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(29, 29, 27, .06), 0 12px 40px -12px rgba(29, 29, 27, .22);
  font-size: .875rem;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}

.consent.is-visible {
  opacity: 1;
  transform: none;
}

.consent[hidden] {
  display: none;
}

.consent__title {
  margin-bottom: 4px;
  font-weight: 700;
}

.consent__text {
  color: var(--muted);
}

.consent__text .link {
  color: var(--ink);
  padding: 0;
}

.consent__text .link::after {
  height: 1px;
  bottom: 0;
}

.consent__actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.btn {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--ink);
  border-radius: 0 999px 999px 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out);
}

.btn:first-child {
  border-radius: 999px 0 0 999px;
}

.btn:hover,
.btn--solid {
  background: var(--ink);
  color: var(--bg);
}

.btn--solid:hover {
  background: #000;
}

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

/* ---------- Entrée en scène (pilotée par main.js) ---------- */

.js .brand .band {
  opacity: 0;
}

.js.is-ready .brand .band {
  opacity: 1;
}

.js .brand .letter,
.js .reveal {
  opacity: 0;
}

/* Les lettres arrivent une à une, dans le sens des bandes de leur ligne :
   « adrien » vers la gauche comme le haut du symbole, « baud » vers la droite comme le bas */
.js.is-ready .brand .letter {
  animation: letter-in-left .85s var(--ease-out) both;
  animation-delay: calc(.42s + var(--i, 0) * 48ms);
}

.js.is-ready .brand .letter--bottom {
  animation-name: letter-in-right;
}

/* Le point du i tombe en dernier et rebondit sur le i comme une balle :
   chute, trois rebonds de plus en plus petits, un léger écrasement à chaque impact */
.js.is-ready .brand .letter--dot {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation:
    dot-bounce .9s linear .95s both,
    dot-squash .9s linear .95s both,
    dot-fade .14s linear .95s both;
}

.js.is-ready .reveal {
  animation: reveal-in 1s var(--ease-out) both;
  animation-delay: calc(1s + var(--d, 0) * .11s);
}

/* le pied de page touche le bas de l'écran : un simple fondu, sinon le glissement
   allonge la page de quelques pixels et fait apparaître la barre de défilement */
.js.is-ready .footer.reveal {
  animation-name: fade-in;
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes letter-in-left {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: none; }
}

@keyframes letter-in-right {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: none; }
}

/* Trajectoires paraboliques : chute en accélération, remontée en décélération.
   Chaque rebond monte à ~37 % du précédent (60 → 22 → 8 → 3), les temps suivent la gravité. */
@keyframes dot-bounce {
  0%    { translate: 0 -60px; animation-timing-function: cubic-bezier(.11, 0, .5, 0); }
  29.5% { translate: 0 0;     animation-timing-function: cubic-bezier(.5, 1, .89, 1); }
  47.4% { translate: 0 -22px; animation-timing-function: cubic-bezier(.11, 0, .5, 0); }
  65.3% { translate: 0 0;     animation-timing-function: cubic-bezier(.5, 1, .89, 1); }
  76%   { translate: 0 -8px;  animation-timing-function: cubic-bezier(.11, 0, .5, 0); }
  86.8% { translate: 0 0;     animation-timing-function: cubic-bezier(.5, 1, .89, 1); }
  93.4% { translate: 0 -3px;  animation-timing-function: cubic-bezier(.11, 0, .5, 0); }
  100%  { translate: 0 0; }
}

@keyframes dot-squash {
  0%, 27%     { scale: 1; }
  29.5%       { scale: 1.2 .8; }
  34%         { scale: .95 1.06; }
  39%, 63%    { scale: 1; }
  65.3%       { scale: 1.1 .9; }
  69%, 85%    { scale: 1; }
  86.8%       { scale: 1.04 .96; }
  90%, 100%   { scale: 1; }
}

@keyframes dot-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes reveal-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Pages légales ---------- */

.page-legal {
  grid-template-rows: auto 1fr auto;
}

.site-header {
  padding: 28px var(--gutter);
}

.site-logo {
  display: inline-block;
  width: 132px;
}

.site-logo:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
  border-radius: 2px;
}

.legal {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(24px, 6vh, 64px) var(--gutter) clamp(56px, 10vh, 96px);
  color: #3b3935;
  line-height: 1.7;
}

.legal h1 {
  margin: 0 0 clamp(28px, 5vh, 48px);
  color: var(--ink);
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
}

/* chaque titre est précédé d'une bande, comme celles du symbole */
.legal h2 {
  position: relative;
  margin: 2.6em 0 .8em;
  padding-top: 1.1em;
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
}

.legal h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 5px;
  border-radius: 0 5px 5px 0;
  background: var(--ink);
}

.legal h3 {
  margin: 1.8em 0 .6em;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
}

.legal p + p {
  margin-top: .9em;
}

.legal ul {
  margin: .9em 0;
}

.legal li {
  position: relative;
  padding-left: 22px;
}

.legal li + li {
  margin-top: .5em;
}

.legal li::before {
  content: "";
  position: absolute;
  top: .78em;
  left: 0;
  width: 10px;
  height: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--muted);
}

.legal strong {
  color: var(--ink);
  font-weight: 600;
}

.legal a:not(.link) {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.legal a:not(.link):hover {
  text-decoration-thickness: 2px;
}

.legal p button.link {
  padding: 0;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal p button.link::after {
  content: none;
}

.legal p button.link:hover {
  text-decoration-thickness: 2px;
}

.footer [aria-current="page"] {
  color: var(--ink);
}

.legal__back {
  margin-top: clamp(40px, 8vh, 72px);
  font-weight: 600;
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  .js .brand .band,
  .js .brand .letter,
  .js .reveal {
    opacity: 1;
    animation: none !important;
  }

  .link::after,
  .consent {
    transition: none;
  }
}

@media (max-width: 560px) {
  .contact {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .footer {
    justify-content: center;
    gap: 6px 24px;
    font-size: .78rem;
    text-align: center;
  }

  .footer ul {
    justify-content: center;
    gap: 4px 10px;
  }
}
