/*
 * La page d'attente de Quiet Obsession. Les couleurs et les polices sont
 * celles du kit de marque (storefront/theme.css) ; rien n'est chargé
 * d'ailleurs, et la page n'a aucun script.
 */

@font-face {
  font-family: "Baskervville";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url("/fonts/baskervville-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Baskervville";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url("/fonts/baskervville-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Baskervville";
  font-style: italic;
  font-display: swap;
  font-weight: 400 700;
  src: url("/fonts/baskervville-latin-wght-italic.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Baskervville";
  font-style: italic;
  font-display: swap;
  font-weight: 400 700;
  src: url("/fonts/baskervville-latin-ext-wght-italic.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/atkinson-hyperlegible-next-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/atkinson-hyperlegible-mono-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/atkinson-hyperlegible-mono-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── Le jour, puis la veillée ─────────────────────────────────────────── */
:root {
  --fond: #fbf8f1;
  --texte: #1a1f4d;
  --texte-2: #565b85;
  --filet: #e3ded1;
  --corail: #f26b4e;
  --azur: #1766b0;
  --accent: #1766b0;
  --cachet: #e0563a;
  --ombre: rgb(26 31 77 / 0.2);
  --titre: "Baskervville", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --lecture: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mesure: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #0f1330;
    --texte: #f3efe6;
    --texte-2: #b4b7d6;
    --filet: #2d3266;
    --azur: #3d86d1;
    --accent: #f2b441;
    --cachet: #ff7a59;
    --ombre: rgb(0 0 0 / 0.45);
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 400 1.0625rem/1.6 var(--lecture);
  -webkit-font-smoothing: antialiased;
}

/* ── Le pli : un liseré « par avion » tout autour de la page ──────────── */
.pli {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(1.75rem, 5vh, 3.5rem);
  padding: clamp(1.25rem, 3.2vw, 2.75rem) max(clamp(1.25rem, 5vw, 4.5rem), env(safe-area-inset-left, 0px)) clamp(1.25rem, 3vw, 2.25rem);
  border: 12px solid;
  border-image: repeating-linear-gradient(-45deg, var(--corail) 0 16px, var(--fond) 16px 32px, var(--azur) 32px 48px, var(--fond) 48px 64px) 12;
}

.tete,
main,
.pied {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
}

.nom {
  display: block;
  height: clamp(1.75rem, 2.8vw, 2.3rem);
  width: auto;
}

/* ── Le message et les timbres ────────────────────────────────────────── */
main {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.texte {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.35rem;
  min-width: 0;
}

.mesure {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font: 500 0.8125rem/1 var(--mesure);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--texte-2);
}
.points {
  width: 1.9rem;
  height: auto;
  flex: none;
}
.points .rond {
  fill: var(--corail);
}
.points .losange {
  fill: var(--azur);
}

h1 {
  margin: 0;
  font: 400 clamp(2.5rem, 1.15rem + 4.7vw, 4.75rem)/1.03 var(--titre);
  letter-spacing: -0.012em;
  text-wrap: balance;
}
h1 em {
  font-style: italic;
  color: var(--accent);
}

.chapo,
.suite {
  margin: 0;
  max-width: 33rem;
}
.chapo {
  font-size: clamp(1.0625rem, 0.98rem + 0.4vw, 1.25rem);
  line-height: 1.55;
}
.suite {
  color: var(--texte-2);
}

.gestes {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--filet);
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.4rem;
  font: 500 0.8125rem/1.3 var(--mesure);
  letter-spacing: 0.06em;
  color: var(--texte-2);
}
.gestes li {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.gestes li::before {
  content: "";
  flex: none;
  width: 0.38rem;
  height: 0.38rem;
  background: var(--corail);
  transform: rotate(45deg);
}

.timbres {
  position: relative;
  margin: 0;
  min-width: 0;
}
.timbres img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 1.1rem 1.6rem var(--ombre));
}
.cachet {
  position: absolute;
  left: -7%;
  bottom: -10%;
  width: 31%;
  height: auto;
  color: var(--cachet);
  fill: currentColor;
  stroke: currentColor;
  transform: rotate(-12deg);
  filter: drop-shadow(0 0.35rem 0.7rem var(--ombre));
}
.cachet .disque {
  fill: var(--fond);
}
.cachet text {
  font: 600 14.5px/1 var(--mesure);
  letter-spacing: 0.13em;
  stroke: none;
}
.cachet .cachet-bas {
  font-size: 11.5px;
  letter-spacing: 0.2em;
  dominant-baseline: hanging;
}

/* ── La signature ─────────────────────────────────────────────────────── */
.pied {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.6rem 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--filet);
}
.pied p {
  margin: 0;
}
.signature {
  grid-row: span 2;
  font: italic 400 clamp(1.35rem, 1.1rem + 1vw, 1.75rem)/1.25 var(--titre);
}
.signature .traduction {
  display: block;
  margin-top: 0.2rem;
  font: 400 0.9375rem/1.4 var(--lecture);
  color: var(--texte-2);
}
.ailleurs,
.petit {
  text-align: right;
  font-size: 0.875rem;
  color: var(--texte-2);
}
.petit {
  font: 500 0.75rem/1.4 var(--mesure);
  letter-spacing: 0.08em;
}

/* ── Une page qui n'existe pas encore ─────────────────────────────────── */
.absente main {
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
}
.retour {
  font: 500 0.875rem/1 var(--mesure);
  letter-spacing: 0.08em;
  color: var(--texte);
  text-underline-offset: 0.3em;
  text-decoration-color: var(--corail);
  text-decoration-thickness: 2px;
}
.retour:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ── Plus étroit : une colonne, les timbres sous le texte ─────────────── */
@media (max-width: 860px) {
  .pli {
    border-width: 9px;
    border-image-slice: 9;
  }
  main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.35rem;
  }
  .texte {
    display: contents;
  }
  .mesure {
    order: 1;
  }
  h1 {
    order: 2;
  }
  .timbres {
    order: 3;
    max-width: 30rem;
    width: 100%;
    margin: 0.9rem auto 1.6rem;
  }
  .chapo {
    order: 4;
  }
  .suite {
    order: 5;
  }
  .gestes {
    order: 6;
    width: 100%;
  }
  .cachet {
    left: -3%;
    bottom: -9%;
    width: 34%;
  }
  .pied {
    grid-template-columns: minmax(0, 1fr);
  }
  .signature {
    grid-row: auto;
  }
  .ailleurs,
  .petit {
    text-align: left;
  }
}

/* ── Les timbres se posent, puis le cachet tombe ──────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .timbres img {
    animation: pose 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .cachet {
    animation: tampon 0.45s 0.75s cubic-bezier(0.3, 1.4, 0.5, 1) both;
  }
  @keyframes pose {
    from {
      opacity: 0;
      transform: translateY(0.9rem) rotate(-1.2deg);
    }
  }
  @keyframes tampon {
    from {
      opacity: 0;
      transform: rotate(-12deg) scale(1.3);
    }
  }
}
