/* TYX — page d'attente. Corail #ff6a3d, sable #f4f4ea, texte sombre. */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --corail: #ff6a3d;
  --sable: #f4f4ea;
  --encre: #221a15;
  --encre-douce: #4d423b;
  --encre-texte: #2f2620;
  --teal-texte: #0e6573;
  --titre: "Fraunces", Georgia, "Times New Roman", serif;
  --texte: "Hanken Grotesk", "HK Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --marge: max(20px, env(safe-area-inset-left, 0px));
  --marge-d: max(20px, env(safe-area-inset-right, 0px));
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--sable);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 1rem;
  line-height: 1.5;
  overflow-x: hidden;
}

/* ---------- Mise en page ---------- */
.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(28px, env(safe-area-inset-top, 0px)) var(--marge-d) max(24px, env(safe-area-inset-bottom, 0px)) var(--marge);
}

.hero {
  flex: 1 0 auto;
  width: 100%;
  max-width: 62rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: 1rem;
}

/* ---------- Symbole ---------- */
.symbole {
  position: relative;
  width: clamp(104px, min(36vw, 17svh), 180px);
  aspect-ratio: 1;
  margin-bottom: clamp(1.25rem, 4svh, 2.25rem);
  animation: apparait 1s cubic-bezier(.25, .6, .3, 1) .1s both;
}
.symbole::before {
  content: "";
  position: absolute;
  inset: 8% 8% -6%;
  border-radius: 28%;
  background: var(--corail);
  filter: blur(28px);
  opacity: .22;
  animation: lumiere 8s ease-in-out infinite;
}
.symbole > img { position: relative; display: block; width: 100%; height: 100%; }
.corps {
  position: relative;
  width: 100%;
  height: 100%;
  animation: respire 8s ease-in-out 1.2s infinite;
}
.fond-tuile {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
/* L'étoile TYX (le vrai dessin) : petite balancelle et pulsation lente */
.etoile {
  position: absolute;
  left: 21.35%;
  top: 22.44%;
  width: 57.73%;
  height: 54.47%;
  transform-origin: 50% 50%;
  animation: etoile 5.5s ease-in-out 1.4s infinite;
}

/* ---------- Titre ---------- */
h1 {
  margin: 0 0 clamp(.9rem, 2.4svh, 1.4rem);
  max-width: 24ch;
  font-family: var(--titre);
  font-weight: 800;
  font-size: clamp(1.55rem, min(6.4vw, 5.2svh), 2.6rem);
  line-height: 1.08;
  letter-spacing: -.015em;
  text-wrap: balance;
  animation: apparait .9s ease-out .6s both;
}

/* ---------- Pastille ---------- */
.statut {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  margin: 0 0 clamp(1.1rem, 2.8svh, 1.6rem);
  padding: .65rem 1.3rem;
  border-radius: 1.5rem;
  text-align: center;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(34, 26, 21, .09);
  color: var(--teal-texte);
  font-weight: 600;
  font-size: .9375rem;
  letter-spacing: .005em;
  animation: apparait .9s ease-out 1.4s both;
}
.saut { display: none; }
@media (max-width: 520px) { .saut { display: inline; } }
.point {
  position: relative;
  width: .625rem;
  height: .625rem;
  border-radius: 50%;
  background: var(--corail);
  flex: none;
}
.point::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--corail);
  opacity: 0;
  animation: pulse 3.2s ease-out 2.2s infinite;
}

/* ---------- Définition ---------- */
.definition {
  max-width: 36ch;
  margin: 0 0 clamp(1rem, 2.6svh, 1.5rem);
  color: var(--encre-texte);
  font-size: clamp(1.0625rem, 2.3vw, 1.1875rem);
  line-height: 1.5;
  text-wrap: balance;
  animation: apparait .9s ease-out 1.1s both;
}

/* ---------- Pied de page ---------- */
.pied {
  flex: none;
  width: 100%;
  padding-top: .75rem;
  animation: apparait .9s ease-out 1.95s both;
}
.liens {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .25rem 0;
}
.liens a {
  padding: .7rem .75rem;
  color: var(--encre-douce);
  font-size: .8125rem;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-color: rgba(34, 26, 21, .25);
  text-underline-offset: .25em;
}
.liens a + a { position: relative; margin-left: 1.25rem; }
.liens a + a::before {
  content: "";
  position: absolute;
  left: -.85rem;
  top: 50%;
  width: 3px;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 50%;
  background: rgba(34, 26, 21, .35);
}
.liens a:hover { color: var(--encre); text-decoration-color: var(--corail); }
.liens a:focus-visible { outline: 3px solid var(--teal-texte); outline-offset: 3px; border-radius: 4px; }
.logo {
  display: block;
  width: 72px;
  height: auto;
}
.retour:focus-visible {
  outline: 3px solid var(--teal-texte);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Page des mentions légales ---------- */
.texte-legal {
  flex: 1 0 auto;
  width: 100%;
  max-width: 42rem;
  padding-block: 1rem 2rem;
}
.texte-legal .logo-lien { display: inline-block; margin-bottom: 1.5rem; }
.texte-legal .logo { width: 76px; }
.texte-legal h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2rem, 7vw, 3rem);
  animation: none;
}
.texte-legal h2 {
  margin: 1.75rem 0 .35rem;
  font-family: var(--texte);
  font-size: 1.0625rem;
  font-weight: 600;
}
.texte-legal p { margin: 0; color: var(--encre-douce); }
.texte-legal a { color: var(--teal-texte); text-underline-offset: .2em; }
.texte-legal a:focus-visible { outline: 3px solid var(--teal-texte); outline-offset: 3px; border-radius: 4px; }
.retour-texte { margin-top: 2.25rem !important; }

/* ---------- Page 404 ---------- */
.retour {
  display: inline-block;
  margin-top: .5rem;
  padding: .75rem 1.5rem;
  border-radius: 999px;
  background: var(--encre);
  color: var(--sable);
  font-weight: 600;
  text-decoration: none;
}
.retour:hover { background: var(--teal-texte); }

/* ---------- Animations (transform et opacity uniquement) ---------- */
@keyframes apparait {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
@keyframes respire {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-4px) scale(1.022); }
}
@keyframes etoile {
  0%, 100% { transform: rotate(0deg) scale(1); }
  30%      { transform: rotate(-9deg) scale(1.07); }
  65%      { transform: rotate(7deg) scale(.97); }
}
@keyframes lumiere {
  0%, 100% { opacity: .18; }
  50%      { opacity: .34; }
}
@keyframes pulse {
  0%   { opacity: .45; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(2.6); }
}

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

/* ---------- Grands écrans : composition qui tient dans la hauteur ---------- */
@media (min-width: 700px) {
  .definition { max-width: 66ch; }
}

/* ---------- Petits écrans ---------- */
@media (max-width: 380px) {
  .statut { font-size: .9375rem; padding: .55rem 1rem; }
}
