/* Top-it — site vitrine, direction artistique « Galerie » (la même que l'app).
 *
 *  1. Un papier chaud, une encre brune presque noire : on lit un catalogue
 *     d'exposition, pas une page produit.
 *  2. Un seul accent, le bordeaux, pour l'action principale. Or, argent et
 *     bronze ne servent qu'aux rangs.
 *  3. La hiérarchie vient du sérif (Fraunces), de l'espace et de filets fins.
 */

:root {
  color-scheme: light dark;

  --bg: #F5F1E8;
  --surface: #FFFCF6;
  --paper: #EDE7DA;
  --line: #E2DBCC;
  --line-2: #D9D0BE;
  --ink: #1E1C18;
  --ink-2: #4A463E;
  --ink-3: #6B665C;
  --faint: #A09A8D;
  --accent: #7A2233;
  --accent-hover: #5E1826;
  --on-accent: #FFFCF6;
  --gold: #B8862B;
  --silver: #8E918F;
  --bronze: #9A6238;
  --success: #3F6B45;

  /* Surfaces « encre » : restent sombres dans les deux thèmes. */
  --night: #1E1C18;
  --night-2: #2B271F;
  --night-ink: #F2ECDF;
  --night-ink-2: #CAC2B2;
  --night-line: #3B352B;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --measure: 34rem;
  --wide: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16140F;
    --surface: #1F1C16;
    --paper: #27231C;
    --line: #2A261E;
    --line-2: #3B352B;
    --ink: #F2ECDF;
    --ink-2: #CAC2B2;
    --ink-3: #968E7F;
    --faint: #645D51;
    --accent: #D98594;
    --accent-hover: #E6A2AE;
    --on-accent: #16140F;
    --gold: #D9A94A;
    --silver: #B9BCB8;
    --bronze: #C58858;
    --success: #7FAE84;
    --night: #0F0E0A;
    --night-2: #1F1C16;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  line-height: 1.04;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 30;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; }

/* ── En-tête ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4rem;
}

.wordmark {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.65rem;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
  margin-right: auto;
}

.nav-links { display: flex; align-items: center; gap: 1.5rem; font-size: 0.95rem; }
.nav-links a:not(.store) { color: var(--ink-2); text-decoration: none; }
.nav-links a:not(.store):hover { color: var(--ink); text-decoration: underline; }
.nav-links a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

@media (max-width: 760px) {
  .nav-links a:not(.store) { display: none; }
}

/* ── Boutons ─────────────────────────────────────────────────────────────── */

.store {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}
.store:hover { background: var(--accent-hover); }
.store svg { width: 1.05em; height: 1.05em; flex: none; fill: currentColor; }
.store.large { min-height: 3.25rem; padding: 0 1.6rem; font-size: 1.02rem; }
.nav .store { min-height: 2.4rem; padding: 0 1rem; font-size: 0.9rem; }

.text-link { font-weight: 600; color: var(--ink); }

/* ── Héros : la cimaise ──────────────────────────────────────────────────── */

.hero { padding-block: clamp(3rem, 8vw, 6.5rem) clamp(3rem, 7vw, 5.5rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.hero h1 {
  font-size: clamp(3rem, 7.4vw, 6rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.96;
}

.hero-lede {
  max-width: 27rem;
  margin-top: 1.5rem;
  color: var(--ink-2);
  font-size: 1.15rem;
}

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }

.hero-note { margin-top: 1.1rem; color: var(--ink-3); font-size: 0.9rem; }

.wall {
  position: relative;
  padding-top: 2.75rem;
}

/* La tringle de la cimaise. */
.wall::before {
  content: "";
  position: absolute;
  inset: 0 -1rem auto;
  height: 3px;
  border-radius: 2px;
  background: var(--line-2);
}

.wall-title {
  margin-top: 1.75rem;
  color: var(--ink-3);
  font-size: 0.88rem;
}

.hanging {
  display: grid;
  grid-template-columns: 1fr 1.22fr 1fr;
  align-items: start;
  gap: clamp(0.75rem, 2.4vw, 1.5rem);
}

.piece {
  position: relative;
  margin: 0;
  transform-origin: 50% -2.75rem;
}
.piece.rank-2 { margin-top: 2.2rem; }
.piece.rank-3 { margin-top: 3.4rem; }

/* Les deux tiges de la cimaise, de la tringle au haut du cadre. */
.piece::before,
.piece::after {
  content: "";
  position: absolute;
  bottom: 100%;
  width: 1px;
  height: 2.75rem;
  background: var(--faint);
}
.piece::before { left: 22%; }
.piece::after { right: 22%; }
.piece.rank-2::before,
.piece.rank-2::after { height: 4.95rem; }
.piece.rank-3::before,
.piece.rank-3::after { height: 6.15rem; }

/* Un cadre fin et un passe-partout : les mêmes dans les deux thèmes. */
.frame {
  padding: clamp(0.35rem, 0.9vw, 0.55rem);
  background: #F7F3EA;
  border: clamp(3px, 0.5vw, 5px) solid #2B2620;
  box-shadow: 0 0 0 1px var(--line-2), 0 18px 34px -18px rgba(0, 0, 0, 0.5);
}

.canvas {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 3 / 4;
  padding: clamp(0.7rem, 1.8vw, 1.1rem);
  color: #F5F1E8;
  overflow: hidden;
}
.canvas strong {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(0.78rem, 1.55vw, 1.2rem);
  line-height: 1.04;
  hyphens: none;
  letter-spacing: -0.02em;
}
.rank-1 .canvas strong { font-size: clamp(1.05rem, 2.3vw, 1.7rem); }
.canvas span { margin-top: 0.4rem; font-size: clamp(0.62rem, 1.1vw, 0.75rem); opacity: 0.78; }

.canvas.c1 { background: linear-gradient(160deg, #8A2C3D 0%, #5E1826 100%); }
.canvas.c2 { background: linear-gradient(160deg, #35557A 0%, #22374F 100%); }
.canvas.c3 { background: linear-gradient(160deg, #A8741A 0%, #7A4F12 100%); }

/* Le cartel, comme au musée. */
.cartel {
  margin-top: 0.9rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line-2);
}
.cartel .rank {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1;
}
.rank-1 .rank { color: var(--gold); }
.rank-2 .rank { color: var(--silver); }
.rank-3 .rank { color: var(--bronze); }
.cartel p { margin-top: 0.3rem; font-size: 0.82rem; line-height: 1.35; color: var(--ink-3); }
.cartel p b { display: block; color: var(--ink); font-weight: 600; }

@media (prefers-reduced-motion: no-preference) {
  .piece { animation: hang 1.6s cubic-bezier(0.2, 0.75, 0.25, 1) both; }
  .piece.rank-1 { animation-delay: 0.15s; }
  .piece.rank-2 { animation-delay: 0.35s; }
  .piece.rank-3 { animation-delay: 0.5s; }
  @keyframes hang {
    0% { opacity: 0; rotate: -4deg; translate: 0 -0.6rem; }
    35% { opacity: 1; }
    60% { rotate: 1.2deg; translate: 0 0; }
    80% { rotate: -0.4deg; }
    100% { opacity: 1; rotate: 0deg; translate: 0 0; }
  }
}

@media (max-width: 560px) {
  .canvas { padding: 0.45rem; }
  .canvas strong { font-size: 0.7rem; }
  .rank-1 .canvas strong { font-size: 0.9rem; }
  .canvas span { display: none; }
  .cartel p { font-size: 0.75rem; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .wall { max-width: 34rem; }
}

/* ── Sections ────────────────────────────────────────────────────────────── */

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); border-top: 1px solid var(--line); }

.section-head { display: grid; gap: 1rem; max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
.section-head p { color: var(--ink-2); max-width: var(--measure); }

/* Dix univers : une liste d'exposition à filets, pas des cartes. */
.univers {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-2);
}
.univers li {
  display: grid;
  gap: 0.15rem;
  padding: 1.4rem 1rem 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.univers img { width: 4.5rem; height: 4.5rem; margin-bottom: 0.7rem; }
.univers strong { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; letter-spacing: -0.01em; }
.univers span { color: var(--ink-3); font-size: 0.85rem; }

@media (max-width: 900px) { .univers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Comment ça marche : une vraie séquence, donc numérotée. */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li { counter-increment: step; border-top: 1px solid var(--ink); padding-top: 1rem; }
.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 0.8rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--ink-3);
}
.steps h3 { font-size: 1.55rem; margin-bottom: 0.5rem; }
.steps p { color: var(--ink-2); }

@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Fonctionnalités : un titre à gauche, un index à filets à droite. */
.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 5rem); }
.split .section-head { position: sticky; top: 6rem; align-self: start; margin-bottom: 0; }

.index { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-2); }
.index li {
  display: grid;
  grid-template-columns: minmax(9rem, 0.7fr) minmax(0, 1.3fr);
  gap: 0.4rem 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.index h3 { font-size: 1.3rem; letter-spacing: -0.01em; line-height: 1.2; }
.index p { color: var(--ink-2); }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split .section-head { position: static; }
}
@media (max-width: 560px) { .index li { grid-template-columns: 1fr; } }

/* Un espace sûr : bande « encre », sombre dans les deux thèmes. */
.night {
  background: var(--night);
  color: var(--night-ink);
  border-top: 0;
}
.night .section-head p,
.night .index p { color: var(--night-ink-2); }
.night .index,
.night .index li { border-color: var(--night-line); }
.night a { color: var(--night-ink); }

/* L'échelle des offres, comme dans l'app. */
.ladder { max-width: 44rem; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-2); }
.ladder li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.ladder .places {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 2.6rem;
  line-height: 1;
  text-align: center;
  color: var(--ink-3);
}
.ladder li:nth-child(2) .places { color: var(--bronze); }
.ladder li:nth-child(3) .places { color: var(--silver); }
.ladder li:nth-child(4) .places { color: var(--gold); }
.ladder b { display: block; font-weight: 600; }
.ladder span { color: var(--ink-3); font-size: 0.92rem; }
.ladder .price { font-weight: 600; font-size: 1.05rem; white-space: nowrap; }
.fine { margin-top: 1.25rem; max-width: 44rem; color: var(--ink-3); font-size: 0.92rem; }

/* FAQ courte. */
.qa { max-width: 46rem; border-top: 1px solid var(--line-2); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.25;
  cursor: pointer;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font-family: var(--sans); color: var(--ink-3); transition: rotate 0.2s ease; }
.qa details[open] summary::after { rotate: 45deg; }
.qa details p { max-width: 40rem; padding-bottom: 1.25rem; color: var(--ink-2); }
.qa details p + p { margin-top: -0.5rem; }

/* Appel final. */
.finale { text-align: center; }
.finale h2 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 400; }
.finale p { margin: 1.1rem auto 2rem; max-width: 30rem; color: var(--ink-2); }

/* ── Pages de texte (FAQ, légal, support) ────────────────────────────────── */

.doc { padding-block: clamp(3rem, 7vw, 5rem) clamp(4rem, 8vw, 6rem); }
.doc-head { max-width: 46rem; padding-bottom: 2rem; margin-bottom: 2.5rem; border-bottom: 1px solid var(--line-2); }
.doc-head h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 400; }
.doc-head p { margin-top: 1rem; color: var(--ink-2); font-size: 1.12rem; max-width: var(--measure); }
.doc-head .updated { margin-top: 1.25rem; color: var(--ink-3); font-size: 0.9rem; }

.prose { max-width: 42rem; }
.prose h2 { font-size: 1.7rem; margin: 2.75rem 0 0.9rem; letter-spacing: -0.015em; line-height: 1.15; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.25rem; margin: 1.75rem 0 0.6rem; }
.prose p,
.prose ul,
.prose ol { color: var(--ink-2); margin: 0 0 1rem; }
.prose ul,
.prose ol { padding-left: 1.2rem; }
.prose li + li { margin-top: 0.4rem; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--ink); font-weight: 500; }
.prose .qa { margin-top: 0.5rem; }
.prose .qa summary { font-size: 1.2rem; }

.callout {
  margin: 0 0 2.5rem;
  padding: 1.25rem 1.4rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  color: var(--ink-2);
}
.callout strong { color: var(--ink); }

/* ── Pied de page ────────────────────────────────────────────────────────── */

.site-footer { padding-block: 3.5rem 2.5rem; border-top: 1px solid var(--line-2); font-size: 0.92rem; color: var(--ink-3); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr)); gap: 2rem 3rem; }
.footer-grid .wordmark { display: inline-block; margin-bottom: 0.75rem; color: var(--ink); }
.footer-grid h2 { font-family: var(--sans); font-size: 0.92rem; font-weight: 600; letter-spacing: 0; color: var(--ink); margin-bottom: 0.75rem; }
.footer-grid ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.45rem; }
.footer-grid a { color: var(--ink-2); text-decoration: none; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; }
.credits { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: 0.82rem; line-height: 1.6; }
.credits p + p { margin-top: 0.5rem; }

@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }
