/* Kesesa — le site vitrine. Les couleurs et les polices de l'app (docs/08-design-system.md). */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-weight: 700;
  font-display: swap;
  src: url('polices/bricolage-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-weight: 800;
  font-display: swap;
  src: url('polices/bricolage-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-weight: 400;
  font-display: swap;
  src: url('polices/figtree-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-weight: 600;
  font-display: swap;
  src: url('polices/figtree-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-weight: 700;
  font-display: swap;
  src: url('polices/figtree-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-weight: 800;
  font-display: swap;
  src: url('polices/figtree-800.woff2') format('woff2');
}

/* The glow behind the phone takes the colour of the fiche on screen, smoothly. */
@property --lueur {
  syntax: '<color>';
  inherits: true;
  initial-value: #2f4a1e;
}

:root {
  --fond: #090b11;
  --surface: #161925;
  --surface-2: #1f2330;
  --trait: #2a2f42;
  --texte: #ffffff;
  --texte-2: #b8b9bc;
  --jaune: #ffd23f;
  --encre: #12141c;
  --violet: #a9a2ff;
  --lueur: #2f4a1e;
  --titre: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --corps: 'Figtree', system-ui, sans-serif;
  --marge: clamp(20px, 5vw, 56px);
  --largeur: 1200px;
  color-scheme: dark;
  transition: --lueur 900ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 400 17px/1.55 var(--corps);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* A fine grain over the whole page: the night has some texture. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--jaune);
  outline-offset: 3px;
  border-radius: 6px;
}
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.cadre {
  width: min(100%, var(--largeur));
  margin-inline: auto;
  padding-inline: var(--marge);
}
.jaune {
  color: var(--jaune);
}

/* ——— En-tête ——— */

.entete {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--fond) 72%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid color-mix(in srgb, var(--trait) 60%, transparent);
}
.entete .cadre {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 68px;
}
.marque {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.marque img {
  width: 30px;
  height: auto;
}
.marque span {
  font: 800 23px/1 var(--titre);
  letter-spacing: -0.02em;
}
.langues {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--trait);
  border-radius: 999px;
  font: 700 12px/1 var(--corps);
  letter-spacing: 0.06em;
}
.langues a,
.langues span {
  padding: 7px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--texte-2);
}
.langues [aria-current] {
  background: var(--surface-2);
  color: var(--texte);
}
.lien-insta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--trait);
  font: 700 14px/1 var(--corps);
  text-decoration: none;
  transition: background 200ms ease;
}
.lien-insta:hover {
  background: var(--surface-2);
}

/* ——— Le haut : la promesse, et une vraie fiche à essayer ——— */

.haut {
  position: relative;
  overflow-x: clip;
}
.haut .cadre {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  min-height: calc(100svh - 68px);
  padding-block: clamp(40px, 7vh, 96px);
}
.pastille-sortie {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 12px;
  border: 1px solid var(--trait);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--texte-2);
  font: 600 14px/1 var(--corps);
}
.pastille-sortie::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--jaune);
  box-shadow: 0 0 0 0 rgba(255, 210, 63, 0.6);
  animation: pouls 2.4s ease-out infinite;
}
@keyframes pouls {
  70%,
  100% {
    box-shadow: 0 0 0 10px rgba(255, 210, 63, 0);
  }
}
.haut h1 {
  margin: 22px 0 22px;
  font: 800 clamp(46px, 6.6vw, 96px) / 0.94 var(--titre);
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.souligne {
  position: relative;
  display: inline-block;
  color: var(--jaune);
  white-space: nowrap;
}
.souligne svg {
  position: absolute;
  left: -2%;
  bottom: -0.16em;
  width: 104%;
  height: 0.32em;
  overflow: visible;
}
.souligne path {
  fill: none;
  stroke: var(--jaune);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: trait 900ms 700ms cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
@keyframes trait {
  to {
    stroke-dashoffset: 0;
  }
}
.chapeau {
  max-width: 34ch;
  margin: 0 0 34px;
  color: var(--texte-2);
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.5;
}
.chapeau strong {
  color: var(--texte);
  font-weight: 700;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.bouton {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-radius: 999px;
  font: 700 17px/1 var(--corps);
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition:
    transform 180ms ease,
    background 180ms ease;
}
.bouton:active {
  transform: scale(0.97);
}
.bouton.plein {
  background: var(--jaune);
  color: var(--encre);
}
.bouton.plein:hover {
  background: #ffdc66;
}
.bouton.contour {
  background: transparent;
  color: var(--texte);
  box-shadow: inset 0 0 0 1.5px var(--trait);
}
.bouton.contour:hover {
  background: var(--surface);
}
.bouton .fleche {
  transition: transform 200ms ease;
}
.bouton:hover .fleche {
  transform: translateX(4px);
}

/* The phone, its glow and the fan of fiches behind it. */
.essai {
  /* The phone's width: the fan of fiches behind it scales with it. */
  --l: clamp(260px, min(25vw, calc((100svh - 250px) * 0.462)), 340px);
  position: relative;
  display: grid;
  justify-items: center;
  gap: 22px;
  scroll-margin-top: 90px;
}
.scene {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
}
.lueur {
  position: absolute;
  inset: -12% -20%;
  z-index: -1;
  background: radial-gradient(closest-side, var(--lueur), transparent);
  opacity: 0.9;
  filter: blur(30px);
}
.eventail {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.carte {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--l) * 0.59);
  height: calc(var(--l) * 0.79);
  margin: calc(var(--l) * -0.44) 0 0 calc(var(--l) * -0.295);
  padding: calc(var(--l) * 0.065) calc(var(--l) * 0.153) 0 calc(var(--l) * 0.059);
  border-radius: calc(var(--l) * 0.07);
  background: var(--c);
  background-image: linear-gradient(
    180deg,
    color-mix(in srgb, var(--c) 88%, white) 0%,
    var(--c) 35%,
    color-mix(in srgb, var(--c) 70%, black) 100%
  );
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font: 800 calc(var(--l) * 0.062) / 1.05 var(--titre);
  letter-spacing: -0.02em;
  color: #fff;
  transform: rotate(0deg);
  animation: distribuer 1100ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--d);
}
.carte.droite {
  padding-right: calc(var(--l) * 0.059);
  padding-left: calc(var(--l) * 0.224);
}
.carte small {
  display: block;
  margin-bottom: 10px;
  font: 800 10px/1 var(--corps);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
}
@keyframes distribuer {
  from {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0;
  }
  to {
    transform: translate(var(--x), var(--y)) rotate(var(--r));
    opacity: 1;
  }
}
.telephone {
  position: relative;
  width: var(--l);
  padding: 11px;
  border-radius: calc(var(--l) * 0.15);
  background: linear-gradient(160deg, #2b3040, #0b0d13 40%, #181b25);
  box-shadow:
    0 0 0 1.5px #3a3f52,
    0 40px 90px -20px rgba(0, 0, 0, 0.8),
    0 0 0 9999px transparent;
}
.ecran {
  position: relative;
  width: 100%;
  aspect-ratio: 390 / 844;
  overflow: hidden;
  border-radius: calc(var(--l) * 0.125);
  background: #0b0d13;
  isolation: isolate;
}
.ecran iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 390px;
  height: 844px;
  border: 0;
  transform: scale(var(--k, 0.8));
  transform-origin: 0 0;
}
.ile {
  position: absolute;
  top: 2.2%;
  left: 50%;
  z-index: 2;
  width: 30%;
  height: 3.4%;
  translate: -50% 0;
  border-radius: 999px;
  background: #000;
  pointer-events: none;
}
.essai:target .telephone {
  animation: appel 700ms ease;
}
@keyframes appel {
  40% {
    transform: translateY(-10px) rotate(-1.5deg);
  }
}
.commandes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 16px;
  color: var(--texte-2);
  font: 600 14px/1.2 var(--corps);
}
.indice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.indice svg {
  animation: glisse 2.2s ease-in-out infinite;
}
@keyframes glisse {
  0%,
  100% {
    transform: translateX(4px);
  }
  50% {
    transform: translateX(-6px);
  }
}
.autre {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--trait);
  border-radius: 999px;
  background: var(--surface);
  color: var(--texte);
  font: 700 14px/1 var(--corps);
  cursor: pointer;
  transition: background 180ms ease;
}
.autre:hover {
  background: var(--surface-2);
}
.autre svg {
  transition: transform 400ms ease;
}
.autre:hover svg {
  transform: rotate(180deg);
}
.compteur {
  font-variant-numeric: tabular-nums;
  color: var(--texte-2);
  font-weight: 600;
}

/* ——— Les sections ——— */

.section {
  padding-block: clamp(80px, 12vw, 150px);
}
.titre-section {
  max-width: 18ch;
  margin: 0 0 18px;
  font: 800 clamp(36px, 4.8vw, 64px) / 1 var(--titre);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.sous-titre {
  max-width: 52ch;
  margin: 0;
  color: var(--texte-2);
  font-size: clamp(17px, 1.4vw, 19px);
}
.reperes {
  display: block;
  margin-bottom: 18px;
  color: var(--jaune);
  font: 800 13px/1 var(--corps);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Une fiche en quatre slides, côte à côte : on la lit comme on la glisse. */
.etapes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
  margin: clamp(40px, 6vw, 72px) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: etape;
}
.etape {
  position: relative;
  counter-increment: etape;
}
.mini {
  position: relative;
  padding: 7px;
  border-radius: 34px;
  background: linear-gradient(160deg, #2b3040, #0b0d13 40%, #181b25);
  box-shadow:
    0 0 0 1px #3a3f52,
    0 30px 60px -24px rgba(0, 0, 0, 0.8);
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mini img {
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 1298;
  border-radius: 28px;
}
.etape:hover .mini {
  transform: translateY(-8px) rotate(-1deg);
}
.etape:not(:last-child) .mini::after {
  content: '';
  position: absolute;
  top: 50%;
  right: calc(-1 * clamp(16px, 2.4vw, 32px));
  width: clamp(16px, 2.4vw, 32px);
  border-top: 2px dashed color-mix(in srgb, var(--jaune) 60%, transparent);
}
.etape h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 8px;
  font: 800 22px/1.1 var(--titre);
  letter-spacing: -0.02em;
}
.etape h3::before {
  content: counter(etape);
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--jaune);
  color: var(--encre);
  font: 800 15px/1 var(--corps);
}
.etape p {
  margin: 0;
  color: var(--texte-2);
  font-size: 16px;
}

/* Des questions à l'infini : le fil, rendu visible. */
.questions {
  overflow: hidden;
}
.defile {
  display: grid;
  gap: 16px;
  margin-top: clamp(40px, 6vw, 64px);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.piste {
  display: flex;
  width: max-content;
  gap: 16px;
  animation: defiler var(--duree, 70s) linear infinite;
}
.piste.inverse {
  animation-direction: reverse;
  --duree: 85s;
}
.lot {
  flex: none;
  display: flex;
  gap: 16px;
}
.defile:hover .piste {
  animation-play-state: paused;
}
@keyframes defiler {
  to {
    transform: translateX(calc(-50% - 8px));
  }
}
.q {
  flex: none;
  padding: 18px 22px;
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--c) 88%, white),
    var(--c) 45%,
    color-mix(in srgb, var(--c) 75%, black)
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font: 800 clamp(17px, 1.6vw, 21px) / 1.15 var(--titre);
  letter-spacing: -0.015em;
  white-space: nowrap;
}

/* Les 19 thèmes, chacun avec son dessin et sa couleur. */
/* 19 themes: five per row and the last row centred (5, 5, 5, 4), never a theme alone. */
.grille-themes {
  --par-rang: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: clamp(40px, 6vw, 64px) 0 0;
  padding: 0;
  list-style: none;
}
.theme {
  flex: 0 0 calc((100% - (var(--par-rang) - 1) * 14px) / var(--par-rang));
  display: grid;
  gap: 6px;
  padding: 14px 14px 16px;
  border-radius: 20px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--c) 88%, white),
    var(--c) 40%,
    color-mix(in srgb, var(--c) 72%, black)
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  transition: transform 250ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.theme img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  transition: transform 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.theme span {
  font: 700 15px/1.2 var(--corps);
}
.theme:hover {
  transform: translateY(-4px);
}
.theme:hover img {
  transform: scale(1.08) rotate(-3deg);
}

/* Trois promesses, en grands chiffres. */
.promesses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.promesse {
  padding-top: 26px;
  border-top: 1px solid var(--trait);
}
.promesse b {
  display: block;
  margin-bottom: 14px;
  color: var(--jaune);
  font: 800 clamp(56px, 7vw, 92px) / 0.9 var(--titre);
  letter-spacing: -0.05em;
}
.promesse h3 {
  margin: 0 0 8px;
  font: 800 22px/1.15 var(--titre);
  letter-spacing: -0.02em;
}
.promesse p {
  margin: 0;
  color: var(--texte-2);
}

/* La fin : le nom, la sortie, Instagram. */
.fin {
  position: relative;
  overflow: hidden;
  text-align: center;
  border-top: 1px solid var(--trait);
  background:
    radial-gradient(
      60% 70% at 50% 100%,
      color-mix(in srgb, var(--violet) 18%, transparent),
      transparent
    ),
    var(--fond);
}
.fin .grand-logo {
  width: clamp(90px, 12vw, 140px);
  margin: 0 auto 28px;
  animation: flotte 6s ease-in-out infinite;
}
@keyframes flotte {
  50% {
    transform: translateY(-10px) rotate(3deg);
  }
}
.fin h2 {
  margin: 0;
  font: 800 clamp(56px, 10vw, 150px) / 0.9 var(--titre);
  letter-spacing: -0.05em;
}
.prononciation {
  margin: 20px auto 0;
  max-width: 40ch;
  color: var(--texte-2);
  font-size: clamp(18px, 1.8vw, 22px);
}
.prononciation q {
  color: var(--texte);
  font-weight: 700;
  quotes: none;
}
.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 40px 0 18px;
}
.store {
  display: inline-grid;
  justify-items: start;
  gap: 4px;
  min-width: 190px;
  padding: 12px 20px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--trait);
  text-align: left;
}
.store small {
  color: var(--jaune);
  font: 800 11px/1 var(--corps);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.store span {
  font: 700 19px/1.1 var(--corps);
}

/* ——— Pied de page ——— */

.pied {
  border-top: 1px solid var(--trait);
  color: var(--texte-2);
  font-size: 14px;
}
.pied .cadre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding-block: 28px;
}
.pied .marque span {
  font-size: 18px;
  color: var(--texte);
}
.pied .marque img {
  width: 24px;
}
.pied nav {
  display: flex;
  gap: 20px;
}
.pied a {
  text-decoration: none;
}
.pied a:hover {
  color: var(--texte);
  text-decoration: underline;
}

/* ——— Apparitions ——— */

.apparait {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 800ms ease,
    transform 800ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--d, 0ms);
}
.apparait.vu {
  opacity: 1;
  transform: none;
}
.haut .apparait {
  animation: monter 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--d, 0ms);
  opacity: 1;
  transform: none;
  transition: none;
}
@keyframes monter {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}

/* ——— Petits écrans ——— */

@media (max-width: 980px) {
  .haut .cadre {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 56px;
    padding-block: 40px 72px;
  }
  .haut h1 {
    font-size: clamp(42px, 11vw, 72px);
  }
  .essai {
    --l: min(300px, 74vw);
  }
  /* On a phone, the fan only shows its colours: cut questions would look untidy. */
  .carte {
    color: transparent;
  }
  .carte small {
    visibility: hidden;
  }
  .etapes {
    display: flex;
    gap: 16px;
    margin-inline: calc(-1 * var(--marge));
    padding: 8px var(--marge) 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .etapes::-webkit-scrollbar {
    display: none;
  }
  .etape {
    flex: none;
    width: min(240px, 64vw);
    scroll-snap-align: center;
  }
  .etape:not(:last-child) .mini::after {
    right: -16px;
    width: 16px;
  }
  .promesses {
    grid-template-columns: minmax(0, 1fr);
  }
  .grille-themes {
    --par-rang: 4;
  }
}
@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .lien-insta .texte {
    display: none;
  }
  .grille-themes {
    --par-rang: 2;
  }
  .actions .bouton {
    flex: 1 1 auto;
    justify-content: center;
  }
  .store {
    min-width: 0;
    flex: 1 1 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .piste {
    flex-wrap: wrap;
    width: auto;
    animation: none !important;
  }
  .piste .lot {
    flex-wrap: wrap;
    justify-content: center;
  }
  .piste [aria-hidden='true'] {
    display: none;
  }
}
