/* Pas de home.css ici : ses règles globales (h1, sections, animations du hero) visent la
   landing et casseraient cette page. Les jetons sont repris pour qu'elle reste du même site. */

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/outfit-latin.woff2') format('woff2');
  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: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/outfit-latin-ext.woff2') format('woff2');
  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;
}

:root {
  color-scheme: light;
  --paper: #f9f8f6;
  --paper-2: #efe9e3;
  --paper-3: #d9cfc7;
  --ribbon: #a8483a;
  --ink: #1a1a1a;
  --ink-soft: #4a4744;
  --muted: #75706a;
  --card-radius: 16px;
  --maxw: 1080px;
  --gutter: 20px;
  --shadow: 0 1px 2px rgba(26, 26, 26, 0.06), 0 8px 24px rgba(26, 26, 26, 0.06);
  --shadow-lift: 0 2px 4px rgba(26, 26, 26, 0.08), 0 16px 40px rgba(26, 26, 26, 0.12);
}

* { box-sizing: border-box; }

html { overflow-x: clip; scroll-behavior: smooth; }
[id] { scroll-margin-top: 120px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.4;
}

a { color: inherit; text-decoration: none; }
img { display: block; }
svg { flex: none; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Barre du haut */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(249, 248, 246, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.wordmark { color: var(--ribbon); display: inline-flex; }
.wordmark .logo { width: 80px; height: 22px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 22px;
  border-radius: 14px;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn-small { font-size: 14px; padding: 9px 16px; border-radius: 999px; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-paper { background: #fff; color: var(--ink); }
@media (hover: hover) {
  .btn-ink:hover { background: #333; }
  .btn-paper:hover { background: var(--paper-2); }
}

/* Hero */
.hero { padding: 28px 0 8px; }
.hero-inner {
  display: grid;
  gap: 28px;
  align-items: center;
}
.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ribbon);
}
h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  max-width: 13ch;
  text-wrap: balance;
}
h1 .accent { color: var(--ribbon); }
.lede {
  margin: 0 0 20px;
  max-width: 46ch;
  font-size: clamp(17px, 1.8vw, 19px);
  line-height: 1.5;
  color: var(--ink-soft);
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.stats span {
  font-size: 14px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--paper-2);
}

/* Trois couvertures posées comme des tirages sur une table. */
.collage {
  position: relative;
  aspect-ratio: 1.35;
  margin: 0 auto;
  width: min(100%, 270px);
}
.polaroid {
  position: absolute;
  width: 52%;
  aspect-ratio: 4 / 5;
  padding: 6px 6px 22px;
  background: #fff;
  border-radius: 6px;
  box-shadow: var(--shadow-lift);
}
.polaroid img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.polaroid:nth-child(1) { left: 0; top: 18px; transform: rotate(-7deg); }
.polaroid:nth-child(2) { left: 24%; top: 0; transform: rotate(2deg); z-index: 1; }
.polaroid:nth-child(3) { right: 0; top: 26px; transform: rotate(8deg); }

@media (min-width: 820px) {
  .hero { padding: 56px 0 24px; }
  .hero-inner { grid-template-columns: 1.15fr 1fr; gap: 48px; }
  .collage { width: 100%; max-width: 440px; }
}

/* Navigation par catégorie : défile seule sur mobile, collée sous la barre du haut. */
.chips {
  position: sticky;
  top: 60px;
  z-index: 9;
  background: rgba(249, 248, 246, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--paper-2);
  margin-top: 24px;
}
.chips-inner {
  display: flex;
  gap: 8px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
}
.chips-inner::-webkit-scrollbar { display: none; }
.chips a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  font-size: 15px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--paper-2);
}
.chips a span { font-weight: 500; color: var(--muted); font-size: 13px; }
@media (hover: hover) {
  .chips a:hover { box-shadow: inset 0 0 0 1px var(--paper-3); }
}

/* À la une : une grande couverture et deux plus petites, le titre posé sur la photo. */
.featured { margin-top: 32px; }
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.feature {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--card-radius);
  aspect-ratio: 1;
  background: var(--avatar, var(--paper-3));
  isolation: isolate;
  box-shadow: var(--shadow);
}
.feature-lead { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.feature > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.feature > .initial {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  font-weight: 700;
  color: var(--avatar-fg, #fff);
}
/* Le voile garantit le contraste du titre blanc quelle que soit la photo. */
.feature::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.72) 100%);
  z-index: 1;
}
.feature-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px;
  color: #fff;
}
.feature-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.feature-lead .feature-title { font-size: clamp(22px, 3vw, 32px); letter-spacing: -0.02em; }
.feature-meta { font-size: 13px; opacity: 0.85; }
.feature:not(.feature-lead) .feature-title { font-size: 15px; }
.feature:not(.feature-lead) .feature-text { padding: 10px; }
.feature .place { position: static; margin-bottom: 4px; }

@media (min-width: 820px) {
  .feature-grid { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 16px; }
  .feature-lead { grid-column: 1; grid-row: 1 / span 2; aspect-ratio: auto; min-height: 420px; }
  .feature:not(.feature-lead) { aspect-ratio: auto; }
  .feature-lead .feature-text { padding: 24px; }
  .feature:not(.feature-lead) .feature-title { font-size: 17px; }
  .feature:not(.feature-lead) .feature-text { padding: 14px; }
}

/* Rayons par catégorie */
.shelves { padding-top: 8px; padding-bottom: 56px; }
.shelf { margin-top: 40px; }
.shelf-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}
.shelf-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -0.025em;
}
.shelf-count { font-size: 15px; font-weight: 600; color: var(--muted); }
.shelf-more {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ribbon);
}
.shelf-more svg, .back svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Sur mobile, un rayon défile à l'horizontale comme les carrousels de l'app ; la carte
   suivante dépasse pour dire qu'il y en a d'autres. */
.rail,
.grid {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 68%;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  margin: 0 calc(-1 * var(--gutter));
  padding: 4px var(--gutter) 16px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > li { scroll-snap-align: start; }
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 640px) {
  .rail {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    margin: 0;
    padding: 0;
    gap: 16px;
  }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}
@media (min-width: 960px) {
  .rail, .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--card-radius);
  background: var(--tint, #fff);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--avatar, var(--paper-3));
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  transition: transform 0.5s ease;
}
.card-media .initial {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  font-weight: 700;
  color: var(--avatar-fg, #fff);
}
.card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px 14px;
  flex: 1;
}
.card-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta { margin-top: auto; font-size: 13px; color: var(--muted); }

.place {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: calc(100% - 20px);
  padding: 5px 10px 5px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.place svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--ribbon);
  stroke-width: 2.2;
}

@media (hover: hover) {
  .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
  .card:hover .card-media img,
  .feature:hover > img { transform: scale(1.04); }
}
.card:focus-visible,
.feature:focus-visible,
.chips a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--ribbon);
  outline-offset: 3px;
}

/* Page d'une catégorie */
.hero-compact { padding: 20px 0 24px; }
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
}

/* Appel final : bloc encre, le seul aplat sombre de la page. */
.get {
  max-width: var(--maxw);
  margin: 0 auto 48px;
  padding: 0 var(--gutter);
}
.get-inner {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: var(--ink);
  color: #fff;
  padding: 40px 24px;
  text-align: center;
}
.get-inner::before {
  content: '';
  position: absolute;
  inset: auto -20% -60% -20%;
  height: 120%;
  background: radial-gradient(closest-side, rgba(168, 72, 58, 0.45), rgba(168, 72, 58, 0));
  pointer-events: none;
}
.get h2 {
  position: relative;
  margin: 0 auto 12px;
  max-width: 18ch;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
  text-wrap: balance;
}
.get p {
  position: relative;
  margin: 0 auto 24px;
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75);
}
.get-stores {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
@media (min-width: 820px) {
  .get-inner { padding: 64px 48px; }
}

.foot { border-top: 1px solid var(--paper-2); }
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding-top: 24px;
  padding-bottom: 32px;
  font-size: 14px;
  color: var(--muted);
}
.foot .wordmark .logo { width: 64px; height: 18px; }
.foot nav { display: flex; gap: 20px; }
.foot nav a:hover { color: var(--ink); }
.foot-inner > span { margin-left: auto; }

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