/* Avis Xerus, la page du client. Charte Xerus : #0A0A0A, un seul accent, Kanit. */

@font-face { font-family: "Kanit"; font-weight: 300; font-display: swap; src: url(fonts/kanit-300.woff2) format("woff2"); }
@font-face { font-family: "Kanit"; font-weight: 400; font-display: swap; src: url(fonts/kanit-400.woff2) format("woff2"); }
@font-face { font-family: "Kanit"; font-weight: 500; font-display: swap; src: url(fonts/kanit-500.woff2) format("woff2"); }

:root {
  --fond: #0A0A0A;
  --surface: #151515;
  --surface-2: #1d1d1d;
  --trait: #2a2a2a;
  --texte: #ffffff;
  --gris: #999999;
  --gris-2: #5c5c5c;
  --accent: #fe1f58;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: "Kanit", sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }

.page {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: max(20px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

.tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 44px;
}
.logo { height: 26px; width: auto; display: block; }

/* Le logo Wonderwall est une lumière qui défile dans les lettres, pas une image figée. */
.logo-led { position: relative; display: block; width: 168px; height: 25px; }
.logo-led span {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, #e5178f 0, #b021a6 54px, #7b2fb5 108px, #4733c4 162px, #1f7fe0 216px, #12b39a 270px, #1aa80f 324px, #86c31a 378px, #f6c21a 432px, #f07d1e 486px, #e5178f 540px);
  background-size: 540px 100%;
  -webkit-mask: url(logos/wonderwall-masque.png) left center / contain no-repeat;
  mask: url(logos/wonderwall-masque.png) left center / contain no-repeat;
  animation: led 5s linear infinite;
}
.logo-led .led-halo { filter: blur(6px); opacity: .7; }
@keyframes led { to { background-position: 540px 0; } }

/* ------------------------------------------------------------ étapes */
.etape { display: none; }
.etape.actif { display: block; animation: entree .35s ease-out; }
@keyframes entree { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

h1 {
  font-weight: 500;
  font-size: clamp(40px, 11vw, 56px);
  line-height: 1.02;
  letter-spacing: -.01em;
  margin: 0 0 16px;
}
.chapeau { color: var(--gris); font-size: 18px; margin: 0 0 36px; max-width: 30em; }
.question {
  font-weight: 500;
  font-size: 26px;
  line-height: 1.12;
  margin: 0 0 8px;
}
.aide { color: var(--gris); margin: 0 0 20px; font-size: 16px; }
.astuce { color: var(--gris-2); font-size: 14px; margin: 8px 0 0; }

/* ------------------------------------------------------------ le projet */
.projet { margin: 0 0 36px; display: grid; gap: 10px; }
.projet div { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: baseline; }
.projet dt { color: var(--gris-2); font-size: 14px; }
.projet dd { margin: 0; font-weight: 400; font-size: 18px; line-height: 1.3; }

/* ------------------------------------------------------------ champs */
.champ { display: block; margin: 0; }
.etiquette { display: block; font-weight: 400; margin: 0 0 10px; }
textarea {
  width: 100%;
  background: var(--surface);
  color: var(--texte);
  border: 1px solid var(--trait);
  border-radius: 16px;
  padding: 14px 16px;
  font: 300 17px/1.5 "Kanit", sans-serif;
  resize: vertical;
  outline: none;
}
textarea:focus { border-color: var(--gris); }
textarea::placeholder { color: var(--gris-2); }

/* ------------------------------------------------------------ l'aide */
.aide-ia {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 22px 0 0; padding: 12px 18px;
  background: var(--surface); border: 1px solid var(--trait); border-radius: 999px;
  font-size: 15px; font-weight: 400; cursor: pointer; text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.aide-ia::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.aide-ia:active { transform: scale(.98); }
.signature-apercu { color: var(--gris); font-size: 15px; margin: 32px 0 0; }

/* ------------------------------------------------------------ le texte */
.ecriture { display: flex; align-items: center; gap: 14px; color: var(--gris); margin: 18px 0 26px; }
.plume { display: inline-flex; gap: 5px; flex: none; }
.plume i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: point 1s infinite ease-in-out; }
.plume i:nth-child(2) { animation-delay: .15s; }
.plume i:nth-child(3) { animation-delay: .3s; }
@keyframes point { 0%, 80%, 100% { opacity: .25; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }

.propositions { display: grid; gap: 12px; margin: 16px 0 12px; }
.propositions:empty { display: none; }
.proposition {
  text-align: left;
  background: var(--surface);
  border: 1.5px solid transparent;
  border-radius: 18px;
  padding: 18px 20px;
  font-size: 17px;
  line-height: 1.45;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .15s, background .15s;
}
.proposition[aria-pressed="true"] { border-color: var(--accent); background: var(--surface-2); }
.proposition:first-child { font-size: 20px; font-weight: 400; line-height: 1.3; }

.liens { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 14px 0 0; }
.lien {
  background: none; border: 0; padding: 6px 0;
  color: var(--gris); font-size: 15px;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--gris-2);
  cursor: pointer;
}

/* ------------------------------------------------------------ actions */
.actions {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 16px;
}
.principal, .secondaire {
  min-height: 54px;
  padding: 0 30px;
  border-radius: 999px;
  border: 0;
  font-weight: 500;
  font-size: 17px;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.principal { background: var(--accent); color: #fff; }
.principal:disabled { opacity: .3; cursor: default; }
.principal:not(:disabled):active, .secondaire:active { transform: scale(.98); }
.secondaire { background: var(--surface-2); color: var(--texte); }
.retour { background: none; border: 0; color: var(--gris); padding: 12px 0; cursor: pointer; }

.consentement { color: var(--gris-2); font-size: 13px; margin: 16px 0 0; }
.erreur {
  color: #ffb3c4;
  background: rgba(254, 31, 88, .1);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 20px 0 0;
  font-size: 15px;
}

@media (min-width: 700px) {
  .page { padding-top: 56px; }
  .tete { padding-bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .etape.actif, .logo-led span, .plume i { animation: none; }
}
