@font-face {
  font-family: Inter;
  src: url("inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Financer Serif";
  src: url("financer-serif.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --paper: #f8f5ef;
  --ink: #1b1427;
  --muted: #514659;
  --violet: #6242a6;
  --lavender: #d7c8fa;
  --orange: #ff6749;
  --dark: #1b132c;
  --hairline: #d9d1d8;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: style;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 4px; }
:is(h1, h2, h3, p, figure) { margin: 0; }
section[id] { scroll-margin-top: 1.5rem; }

.wrap { width: min(100% - 2.5rem, 77rem); margin-inline: auto; }
.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}
.skip:focus {
  position: fixed;
  z-index: 4;
  top: 1rem;
  left: 1rem;
  padding: .75rem 1rem;
  background: var(--paper);
}

.header { border-bottom: 1px solid var(--hairline); }
.header-inner, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.header-inner { min-height: 5rem; padding-block: .75rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.035em;
  text-decoration: none;
  white-space: nowrap;
}
.brand img { width: 2.5rem; height: 2.5rem; border-radius: .55rem; }
.navigation { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.4rem; }
.navigation a { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .9rem; }
.navigation a:not(.button) { text-decoration: none; font-weight: 620; }
.navigation a:hover:not(.button) { text-decoration: underline; text-underline-offset: .25em; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 3rem;
  padding: .6rem 1.15rem;
  border: 1px solid transparent;
  border-radius: .45rem;
  background: transparent;
  font-size: .95rem;
  font-weight: 720;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out), border-color .25s var(--ease-out);
}
.primary { background: var(--orange); color: var(--ink); }
.primary:hover { background: #ff866f; }
.outline { border-color: var(--ink); }
.outline:hover { background: var(--ink); color: var(--paper); }
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: .95rem;
  font-weight: 690;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .24em;
  text-decoration-color: currentColor;
}
.text-link:hover { text-decoration-thickness: 2px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1.2rem; }
.kicker {
  color: var(--violet);
  font-weight: 780;
  font-size: .875rem;
  letter-spacing: .08em;
  line-height: 1.4;
  text-transform: uppercase;
}
.intro { max-width: 37ch; color: var(--muted); font-size: clamp(1.1rem, 1.65vw, 1.3rem); line-height: 1.55; }
h1, h2 { font-weight: 770; letter-spacing: -.053em; line-height: 1; }
h2 { font-size: clamp(2.9rem, 6.3vw, 5.9rem); }
h1 em, h2 em {
  font-family: "Financer Serif", Georgia, serif;
  font-weight: 530;
  color: var(--violet);
  letter-spacing: -.045em;
}

.hero {
  display: grid;
  grid-template-columns: 1.04fr 1fr;
  align-items: center;
  gap: clamp(1.75rem, 4vw, 4rem);
  padding-block: clamp(1.75rem, 4.2vw, 4rem);
}
.hero h1 {
  font-size: clamp(3.15rem, 6.1vw, 6.15rem);
  margin-block: .9rem 1.5rem;
}
.hero .actions { margin-top: 1.7rem; }
.hero-line { display: block; overflow: clip; padding: .035em .06em .15em 0; margin-bottom: -.15em; }
.hero-line > span { display: block; }
.hero-art { position: relative; isolation: isolate; perspective: 64rem; }
.hero-visual {
  position: relative;
  overflow: hidden;
  background: var(--lavender);
  border-radius: .65rem;
  box-shadow: 0 1.4rem 4rem -2.3rem #3e2b67a1;
}
.hero-visual img { height: auto; width: 100%; }

.mission {
  border-top: 1px solid var(--hairline);
  padding-block: clamp(3.5rem, 8vw, 7.25rem);
}
.mission-intro {
  display: grid;
  grid-template-columns: 1.04fr 1fr;
  align-items: end;
  gap: clamp(1.5rem, 5vw, 5rem);
  margin-bottom: clamp(2rem, 4.5vw, 4rem);
}
.mission h2 { margin-top: .7rem; }
.mission .text-link { margin-top: .5rem; }
.mission-list {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  border-block: 1px solid var(--hairline);
}
.mission-list li { padding: 1.5rem clamp(1.25rem, 2.45vw, 2.3rem) 1.6rem; }
.mission-list li:first-child { padding-inline-start: 0; }
.mission-list li + li { border-left: 1px solid var(--hairline); }
.mission-list h3 { margin: .55rem 0 .4rem; font-size: 1.33rem; letter-spacing: -.05em; }
.mission-list p { color: var(--muted); font-size: 1rem; line-height: 1.55; max-width: 31ch; }
.mission-icon {
  display: inline-block;
  position: relative;
  width: 2rem;
  height: 2rem;
  color: var(--violet);
}
.mission-icon::before, .mission-icon::after { content: ""; position: absolute; }
.explain::before { inset: .2rem 0 .35rem .1rem; border: 2px solid; border-radius: .4rem .4rem .4rem .02rem; }
.explain::after { inset: .65rem .35rem auto .5rem; border-top: 2px solid; box-shadow: 0 .35rem 0 currentColor; }
.prepare::before { inset: .15rem .35rem .2rem .25rem; border: 2px solid; border-radius: .2rem; }
.prepare::after { inset: .8rem .65rem auto .55rem; border-top: 2px solid; box-shadow: 0 .35rem 0 currentColor; }
.compare::before { inset: .85rem 0 .25rem .05rem; background: currentColor; border-radius: .15rem; width: .45rem; }
.compare::after { inset: .25rem .12rem .25rem auto; width: .45rem; background: currentColor; border-radius: .15rem; box-shadow: -.66rem .32rem 0 -.005rem currentColor; clip-path: inset(0 0 0 -1rem); }

.library { background: var(--dark); color: var(--paper); }
.library :focus-visible { outline-color: var(--lavender); }
.library-inner { padding-block: clamp(3.25rem, 7.25vw, 6.75rem); }
.library-intro { margin-bottom: 2.5rem; }
.library h2 em { color: var(--lavender); }
.library-intro p { margin-top: .85rem; color: #e0d5ed; font-size: 1.13rem; line-height: 1.5; }
.library--single .library-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 2rem clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.library--single .library-intro { margin-bottom: 0; }
.library--single .guide-row {
  grid-template-columns: minmax(4.5rem, 8rem) minmax(0, 1fr);
  padding: clamp(1rem, 2.5vw, 2rem);
  gap: .85rem clamp(1rem, 2.8vw, 2rem);
  border: 1px solid #665779;
  border-radius: .8rem;
  background: linear-gradient(130deg, #38294d, #241a36 70%);
  position: relative;
}
.library--single .guide-row h3 { font-size: clamp(1.23rem, 2.5vw, 2.15rem); line-height: 1.12; }
.library--single :is(.guide-cover, .guide-emblem) { grid-row: span 2; }
.library--single .guide-actions { grid-column: 2; }
.guide-cover {
  width: 100%;
  height: auto;
  border: 1px solid #d9d1d8;
  border-radius: .24rem;
  box-shadow: .33rem .45rem 0 #0f09239e;
}
.filters {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: .8rem;
  margin-bottom: 1.25rem;
}
.search, .filter-category { position: relative; }
.search input, .filter-category select {
  width: 100%;
  min-height: 3.1rem;
  border: 1px solid #746682;
  border-radius: .45rem;
  background: #271e38;
  color-scheme: dark;
}
.search input { padding: .55rem .9rem .55rem 2.65rem; }
.search input::placeholder { color: #e0d5ed; opacity: 1; }
.search-icon {
  position: absolute;
  pointer-events: none;
  inset: 50% auto auto 1rem;
  width: .85rem;
  height: .85rem;
  transform: translateY(-60%);
  border: 1.8px solid;
  border-radius: 50%;
}
.search-icon::after {
  content: "";
  position: absolute;
  top: .62rem;
  left: .62rem;
  width: .38rem;
  border-top: 1.8px solid;
  transform: rotate(45deg);
  transform-origin: left;
}
.filter-category select { padding: .55rem 2rem .55rem .9rem; appearance: none; }
.filter-category::after {
  content: "";
  position: absolute;
  top: 44%;
  right: 1rem;
  width: .5rem;
  height: .5rem;
  border-right: 1.5px solid;
  border-bottom: 1.5px solid;
  transform: rotate(45deg);
  pointer-events: none;
}
.result-count { min-width: 5.2rem; color: #e0d5ed; font-size: .875rem; text-align: right; }
.guide-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid #52465f;
}
.guide-row:last-of-type { border-bottom: 1px solid #52465f; }
.theme-dossier { --tile: #d7c8fa; }
.theme-assurance { --tile: #ffad9d; }
.theme-pret { --tile: #d1e2fc; }
.theme-achat { --tile: #f4dbaa; }
.theme-investissement { --tile: #c7ead7; }
.guide-emblem {
  display: grid;
  place-items: center;
  width: 3.5rem;
  aspect-ratio: 1;
  background: var(--tile);
  color: var(--ink);
  border-radius: .45rem;
  font-size: .72rem;
  font-weight: 800;
}
.guide-emblem span {
  position: relative;
  display: grid;
  place-items: end center;
  padding-bottom: .22rem;
  width: 2rem;
  height: 2.4rem;
  border: 1.5px solid;
  border-radius: .13rem;
  background: var(--paper);
  line-height: 1;
}
.guide-emblem span::before {
  content: "";
  position: absolute;
  top: .35rem;
  right: .28rem;
  left: .28rem;
  height: .45rem;
  border-block: 1px solid;
}
.guide-description { min-width: 0; }
.guide-row .guide-meta { color: #d8cce5; font-size: .875rem; margin-bottom: .25rem; }
.guide-row h3 { font-weight: 690; font-size: clamp(1.05rem, 1.9vw, 1.35rem); line-height: 1.25; letter-spacing: -.032em; }
.guide-row h3 a { text-decoration: none; }
.guide-row h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.guide-description > p:last-child { margin-top: .28rem; color: #e0d5ed; line-height: 1.5; }
.guide-actions { display: flex; align-items: center; gap: .4rem; }
.guide-actions a { min-width: 5.75rem; }
.library .outline { border-color: #a194af; color: var(--paper); }
.library .outline:hover, .library .more:hover { color: var(--dark); background: var(--lavender); border-color: var(--lavender); }
.copy-icon {
  display: block;
  position: relative;
  width: 1rem;
  height: 1rem;
}
.copy-icon::before, .copy-icon::after {
  content: "";
  position: absolute;
  width: .67rem;
  height: .73rem;
  border: 1.5px solid;
  border-radius: .1rem;
}
.copy-icon::before { inset: 0 auto auto 0; }
.copy-icon::after { inset: auto 0 0 auto; background: var(--dark); }
.share-icon { min-width: 3rem; padding-inline: .65rem; border-color: #a194af; }
.share-icon:hover { background: #35284a; }
.share-icon:hover .copy-icon::after { background: #35284a; }
.more { margin-top: 1.3rem; border-color: #a194af; }
.empty-state { padding: 1.25rem 0; color: #e0d5ed; }

.site-footer { padding-block: 1.3rem; min-height: 6rem; }
.site-footer p { max-width: 58ch; line-height: 1.5; color: var(--muted); font-size: .875rem; }
.site-footer .text-link { overflow-wrap: anywhere; text-align: right; }

.guide-page { min-height: 100vh; display: flex; flex-direction: column; }
.guide-layout { flex: 1; padding-block: 2rem 3.5rem; }
.back { margin-bottom: 1.15rem; }
.guide-sheet {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(0, 2.35fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: center;
  border-block: 1px solid var(--hairline);
  padding-block: clamp(2rem, 6vw, 5rem);
}
.guide-sheet .guide-emblem {
  width: 100%;
  max-width: 21rem;
  font-size: clamp(1.1rem, 3vw, 2.5rem);
}
.guide-sheet .guide-cover { width: min(100%, 17rem); margin: auto; }
.guide-sheet .guide-emblem span {
  width: 42%;
  height: 53%;
  border-radius: .35rem;
  border-width: 2px;
  padding-bottom: 11%;
  transform: rotate(-8deg);
  box-shadow: .22rem .3rem 0 var(--ink);
}
.guide-sheet .guide-emblem span::before { top: 23%; right: 18%; left: 18%; height: 14%; border-width: 2px; }
.guide-detail h1 { font-size: clamp(2.35rem, 4.75vw, 4.8rem); margin: .6rem 0 1rem; overflow-wrap: anywhere; }
.guide-date { margin-block: 1.2rem; color: var(--muted); font-size: .93rem; }
.share-button { text-decoration: underline; text-underline-offset: 3px; }
.share-button:hover { background: #ece5ef; }
.share-notice {
  position: fixed;
  z-index: 2;
  right: 1rem;
  bottom: 1rem;
  width: max-content;
  max-width: calc(100% - 2rem);
  padding: .75rem 1rem;
  border-radius: .45rem;
  background: var(--dark);
  color: var(--paper);
  box-shadow: 0 0 0 1px #9484a9;
}
.share-notice:empty { opacity: 0; pointer-events: none; }
.share-dialog {
  width: min(29rem, 100% - 2rem);
  padding: 1.4rem;
  border: 1px solid var(--hairline);
  border-radius: .65rem;
  background: var(--paper);
  color: var(--ink);
}
.share-dialog::backdrop { background: #1b132cb0; }
.share-dialog input {
  width: 100%;
  margin: .6rem 0 1rem;
  padding: .7rem;
  border: 1px solid #827586;
  border-radius: .3rem;
  background: white;
}
.share-dialog label { display: block; font-weight: 700; }
.share-dialog form { display: flex; justify-content: end; }

@media (max-width: 65rem) {
  .wrap { width: min(100% - 2.5rem, 58rem); }
  .hero h1 { font-size: clamp(2.85rem, 6.15vw, 6.15rem); }
}

@media (max-width: 47rem) {
  .hero, .mission-intro, .library--single .library-inner { grid-template-columns: 1fr; }
  .hero { gap: 1.5rem; }
  .hero-art img { aspect-ratio: 5 / 4; object-fit: cover; }
  .hero h1 { font-size: clamp(2.5rem, 12.5vw, 5.6rem); margin-bottom: 1rem; }
  .hero .actions { margin-top: 1rem; }
  .mission-list { grid-template-columns: 1fr; }
  .mission-list li { padding: 1rem 0; }
  .mission-list li + li { border: 0; border-top: 1px solid var(--hairline); }
  .library-intro { margin-bottom: 1.4rem; }
  .library--single .guide-row { grid-template-columns: minmax(4.25rem, 6rem) minmax(0, 1fr); }
  .filters { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .result-count { grid-column: 1 / -1; text-align: left; }
  .guide-row { grid-template-columns: auto minmax(0, 1fr); gap: .55rem 1rem; align-items: start; }
  .guide-actions { grid-column: 2; }
  .guide-sheet { grid-template-columns: 1fr; }
  .guide-sheet .guide-emblem { width: 8rem; }
  .guide-sheet .guide-cover { width: 6.2rem; margin-inline: 0; }
  .site-footer { flex-wrap: wrap; }
  .site-footer .text-link { text-align: left; }
}

@media (max-width: 28rem) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { flex-wrap: wrap; gap: .2rem .75rem; }
  .brand img { width: 2.15rem; height: 2.15rem; }
  .navigation { gap: 0 .75rem; }
  .navigation .button { padding-inline: .7rem; min-height: 2.75rem; }
  .filters { grid-template-columns: 1fr; }
  .guide-emblem { width: 2.8rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-line > span { animation: headline-in .92s var(--ease-out) both; }
  .hero-line + .hero-line > span { animation-delay: .14s; }
  .hero-copy :is(.kicker, .intro, .actions) { animation: rise-in .75s var(--ease-out) both; }
  .hero-copy .intro { animation-delay: .29s; }
  .hero-copy .actions { animation-delay: .41s; }
  .hero-art { animation: art-in 1.18s .08s var(--ease-out) both; }
  .hero-visual { transition: transform .75s var(--ease-out); }
  .hero-visual img { animation: image-in 1.35s .08s var(--ease-out) both; }
  .hero-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background: radial-gradient(circle at var(--light-x, 50%) var(--light-y, 50%), #fff7ed36, transparent 58%);
    transition: opacity .4s var(--ease-out);
  }
  .hero-art.is-tilted .hero-visual { transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); }
  .hero-art.is-tilted .hero-visual::after { opacity: 1; }
  [data-reveal] { transition: opacity .64s var(--ease-out), transform .85s var(--ease-out); }
  [data-reveal].awaiting-reveal:not(:focus-within) { opacity: 0; transform: translateY(1.4rem); }
  .mission-list li:nth-child(2) { transition-delay: .085s; }
  .mission-list li:nth-child(3) { transition-delay: .17s; }
  .library--single .guide-cover { transform: rotate(-4deg); transition: transform .65s var(--ease-out); }
  .library--single .guide-row:is(:hover, :focus-within) .guide-cover { transform: translateY(-.12rem) rotate(0); }
  @keyframes headline-in {
    from { transform: translateY(108%); }
    to { transform: translateY(0); }
  }
  @keyframes rise-in {
    from { opacity: 0; transform: translateY(.9rem); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes art-in {
    from { clip-path: inset(15% 5% 35% 5% round .65rem); opacity: .45; }
    to { clip-path: inset(-4rem round .65rem); opacity: 1; }
  }
  @keyframes image-in {
    from { transform: scale(1.12); }
    to { transform: scale(1); }
  }
}

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