:root {
  --ink: #e8f3ee;
  --muted: #a7bdb4;
  --dim: #7d968d;
  --coral: #ff6844;
  --tide: #49d3b4;
  --line: rgba(214, 236, 226, 0.16);
  --panel: rgba(6, 16, 26, 0.66);
  --panel-solid: rgba(8, 20, 32, 0.88);
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Sora", "Segoe UI", sans-serif;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.65;
  background-color: #07131c;
  background-image:
    radial-gradient(1100px 640px at 0% -8%, rgba(255, 104, 68, 0.32), transparent 56%),
    radial-gradient(880px 560px at 108% 4%, rgba(73, 211, 180, 0.24), transparent 52%),
    radial-gradient(760px 520px at 78% 112%, rgba(98, 112, 214, 0.3), transparent 54%),
    linear-gradient(168deg, #07131c 0%, #123044 36%, #0d3830 70%, #17142c 100%);
  background-attachment: fixed;
}

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

p, li, dd, dt, th, td, a, h1, h2, h3, caption {
  overflow-wrap: break-word;
}

a { color: var(--coral); text-underline-offset: 3px; }

a:hover { color: #ffd0c4; }

button, select, input { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.5rem;
}

p { margin: 0 0 0.85rem; }

.wrap {
  width: min(var(--max), calc(100% - 1.5rem));
  margin: 0 auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--coral);
  color: #1a0c08;
  padding: 0.4rem 0.7rem;
  z-index: 20;
}

.skip:focus { top: 0.6rem; }

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: rgba(7, 16, 24, 0.72);
  border-bottom: 1px solid var(--line);
}

.top-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 4.4rem;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
  min-width: 0;
}

.brand > span { min-width: 0; }

.brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.brand small {
  display: block;
  color: var(--dim);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mark {
  width: 2.3rem;
  height: 2.3rem;
  display: grid;
  place-items: center;
  border-radius: 0.55rem 1rem 0.55rem 0.4rem;
  background: linear-gradient(145deg, var(--coral), #c83d55 70%);
  color: #1a0c08;
  font-family: var(--serif);
  font-weight: 650;
}

.top nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.15rem;
}

.top nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
}

.top nav a:hover,
.top nav a[aria-current="page"] {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
}

main { padding: 1.8rem 0 4rem; }

.kicker {
  color: var(--tide);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.une {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.4rem;
  align-items: stretch;
  margin-bottom: 2.4rem;
}

.une-copy,
.panel,
.card,
.fiche,
.prose-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.une-copy { padding: 1.5rem 1.5rem 1.2rem; }

.une h1 {
  font-size: clamp(2.3rem, 4.6vw, 4rem);
  margin-bottom: 0.7rem;
}

.une-visual {
  position: relative;
  min-height: 320px;
  border-radius: 1.3rem;
  overflow: hidden;
  border: 1px solid var(--line);
}

.une-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 320px;
}

.une-visual figcaption {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  background: rgba(6, 14, 20, 0.72);
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  color: var(--muted);
}

.note-table,
.compare,
.score-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 0.8rem 0 1rem;
  table-layout: fixed;
}

.note-table th,
.note-table td,
.compare th,
.compare td,
.score-table th,
.score-table td {
  text-align: left;
  padding: 0.45rem 0.35rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.note-table td:last-child,
.score-table td:last-child,
td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  width: 4.2rem;
}

.note-table caption,
.score-table caption,
.compare caption {
  text-align: left;
  color: var(--dim);
  font-size: 0.75rem;
  padding-bottom: 0.35rem;
}

.overall {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-top: 0.2rem;
}

.overall b {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--tide);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  white-space: normal;
  text-align: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--coral);
  color: #1c0d09;
  font-weight: 600;
  font-size: 0.88rem;
}

.btn:hover { color: #1c0d09; background: #ff8768; }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn.ghost:hover { color: white; border-color: var(--muted); }

.row-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }

.sommaire {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 1.2rem;
  margin-bottom: 2.2rem;
  align-items: start;
}

.sommaire ul, .plain-list, .fiche ul, .prose-card ul {
  margin: 0.3rem 0 1rem;
  padding-left: 1.1rem;
}

.sommaire li, .fiche li, .prose-card li { margin: 0.28rem 0; }

.sommaire a { font-weight: 600; }

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1rem;
}

.tools input,
.tools select {
  background: rgba(5, 14, 22, 0.55);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
}

.tools input { min-width: 0; width: min(100%, 240px); }

.tools label { display: inline-flex; align-items: center; gap: 0.4rem; }

.tools input:focus,
.tools select:focus,
.nav-toggle:focus,
.btn:focus {
  outline: 2px solid var(--tide);
  outline-offset: 2px;
}

.cats { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.cats button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  cursor: pointer;
  color: var(--muted);
}

.cats button[aria-pressed="true"] {
  background: var(--ink);
  color: #102028;
  border-color: var(--ink);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin: 0.4rem 0 0.9rem;
}

.section-head p { color: var(--muted); margin: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.grid[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid[data-cols="1"] { grid-template-columns: minmax(0, 1fr); }

.card .excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.65em * 3);
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 100%;
}

.card-visual { display: block; aspect-ratio: 16/10; overflow: hidden; }

.card-visual img { width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 0.95rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }

.meta { color: var(--dim); font-size: 0.75rem; margin: 0; }

.card h3 { font-size: 1.45rem; }

.card h3 a { color: var(--ink); text-decoration: none; }

.card h3 a:hover { color: var(--coral-soft, #ffd0c4); }

.lead { color: var(--muted); font-size: 0.92rem; }

.card-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 0.45rem;
}

.pill {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--tide);
}

.card-foot a { margin-left: auto; font-size: 0.85rem; }

.fav {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  font-size: 0.8rem;
}

.fav[aria-pressed="true"] { color: var(--coral); }

.empty {
  grid-column: 1 / -1;
  padding: 1.4rem;
}

.fiche { padding: 1.2rem 1.2rem 1.5rem; }

.fiche-hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 1.2rem; margin-bottom: 1rem; }

.fiche-hero img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 1rem;
}

.fiche h1 { font-size: clamp(2rem, 4vw, 3.4rem); }

.fiche h2 { margin-top: 1.4rem; font-size: 1.7rem; }

.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.box {
  background: rgba(5, 14, 22, 0.35);
  border-radius: 0.9rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
}

.box h3 { font-size: 1.25rem; }

dl.facts { display: grid; grid-template-columns: 8rem 1fr; gap: 0.35rem 0.6rem; margin: 0; }

dl.facts dt { color: var(--dim); }

dl.facts dd { margin: 0; }

.also { display: flex; flex-wrap: wrap; gap: 0.7rem 1rem; padding: 0; list-style: none; }

.also a { color: var(--ink); }

.prose-card { padding: 1.3rem 1.35rem 1.4rem; margin-bottom: 1rem; }

.prose-card h1 { font-size: clamp(2rem, 4vw, 3.2rem); }

.prose-card h2 { font-size: 1.65rem; margin-top: 1.3rem; }

.narrow { max-width: 72ch; }

.mail {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 4.2vw, 2.2rem);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.foot {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.4rem;
  align-items: baseline;
  justify-content: space-between;
}

.foot a { color: var(--muted); }

.foot a:hover { color: var(--ink); }

.foot p { margin: 0.35rem 0; }

@media (max-width: 900px) {
  body { background-attachment: scroll; }
  .une, .sommaire, .fiche-hero, .cols-2,
  .grid, .grid[data-cols="1"], .grid[data-cols="2"], .grid[data-cols="3"] { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; flex-shrink: 0; }
  .top nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 0.4rem 0.75rem 0.8rem;
    background: rgba(7, 16, 24, 0.96);
    border-bottom: 1px solid var(--line);
  }
  .top nav a { padding: 0.55rem 0.35rem; }
  body.nav-open .top nav { display: flex; }
  .une-visual, .une-visual img { min-height: 200px; }
  .fiche-hero img { height: auto; max-height: 240px; }
  .compare { position: relative; }
  .une h1, .fiche h1, .prose-card h1 { font-size: clamp(1.7rem, 8vw, 2.5rem); }
  .fiche, .prose-card, .une-copy { padding: 1rem; }
  .section-head, .foot-row { flex-direction: column; align-items: flex-start; }
  .tools input, .tools label, .tools select { width: 100%; }
  dl.facts { grid-template-columns: 1fr; gap: 0.15rem; }
  dl.facts dd { margin: 0 0 0.55rem; }
  .card h3 { font-size: 1.3rem; }
  .compare, .compare caption, .compare tbody, .compare tr, .compare td {
    display: block;
    width: auto;
  }
  .compare thead { display: none; }
  .compare { table-layout: auto; }
  .compare tr {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
  }
  .compare td {
    border: 0;
    padding: 0.12rem 0;
    text-align: left;
    white-space: normal;
  }
  .compare td:first-child { font-weight: 600; }
  .compare td.num { width: auto; text-align: left; }
  .compare td.num::before {
    content: "Note ";
    color: var(--dim);
    font-weight: 400;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
