:root {
  --navy: #06164a;
  --navy-2: #0c2367;
  --glow: #0b84e0;
  --yellow: #ffd500;
  --yellow-2: #ffc400;
  --red: #e3241b;
  --orange: #ff5a1f;
  --blue: #1e5bd8;
  --green: #12a150;
  --purple: #7b3fe4;

  --bg: #f3f5fb;
  --card: #ffffff;
  --ink: #0d1433;
  --muted: #5b6380;
  --line: #e3e7f2;

  --radius: 22px;
  --shadow: 0 1px 2px rgba(13, 20, 51, .06), 0 8px 24px -8px rgba(13, 20, 51, .14);
  --shadow-hover: 0 2px 4px rgba(13, 20, 51, .08), 0 18px 40px -12px rgba(13, 20, 51, .28);
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* ═══════════ HERO ═══════════ */
.hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(60% 55% at 50% 92%, rgba(11, 132, 224, .85) 0%, rgba(11, 132, 224, .25) 45%, transparent 75%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  padding: 20px 16px 150px;
  overflow: hidden;
  isolation: isolate;
}
@media (min-width: 720px) { .hero { padding: 24px 32px 190px; } }

.nav {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.logo { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; }
.logo-word {
  font-weight: 900;
  font-size: 30px;
  letter-spacing: .02em;
  color: var(--orange);
  background: linear-gradient(180deg, #ff6a2a 0%, #e3241b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-flex;
  align-items: flex-end;
  line-height: 1;
}
.logo-i {
  display: inline-block;
  position: relative;
  width: .32em;
  height: .72em;
  margin: 0 .07em;
  background: linear-gradient(180deg, #ff6a2a, #e3241b);
  border-radius: 3px;
  -webkit-text-fill-color: initial;
}
.logo-i i {
  position: absolute;
  left: 50%;
  top: -.3em;
  width: .26em;
  height: .22em;
  transform: translateX(-50%);
  background: #ff6a2a;
  border-radius: 50% 50% 3px 3px;
}
.logo-sub { font-weight: 600; font-size: 15px; color: rgba(255, 255, 255, .7); }

.nav-links { display: flex; gap: 10px; flex-wrap: wrap; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease;
  white-space: nowrap;
}
.pill:hover { transform: translateY(-1px); }
.pill-outline { border: 2px solid #fff; color: #fff; }
.pill-outline:hover { background: rgba(255, 255, 255, .12); }
.pill-light { background: #dfe3ee; color: var(--ink); border: 2px solid #dfe3ee; }
.pill-light:hover { background: #fff; }
@media (max-width: 520px) {
  .nav { justify-content: center; }
  .pill { padding: 7px 14px; font-size: 14px; }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 56px auto 0;
  text-align: center;
}
.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 213, 0, .14);
  color: var(--yellow);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .02em;
}
.hero h1 { font-size: clamp(32px, 6vw, 56px); font-weight: 800; }
.hero h1 sup { font-size: .4em; vertical-align: super; }
.lead { font-size: clamp(16px, 2.2vw, 19px); color: rgba(255, 255, 255, .82); margin: 14px auto 30px; max-width: 560px; }

/* Recherche */
.search { position: relative; max-width: 560px; margin: 0 auto; }
.search input {
  width: 100%;
  height: 62px;
  padding: 0 56px 0 58px;
  border-radius: 999px;
  border: 3px solid transparent;
  background: #fff;
  color: var(--ink);
  font: 600 18px var(--font);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, .55), 0 0 0 6px rgba(255, 255, 255, .08);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.search input::-webkit-search-cancel-button { display: none; }
.search input::placeholder { color: #9aa1b8; font-weight: 500; }
.search input:focus { border-color: var(--yellow); box-shadow: 0 10px 40px -10px rgba(0, 0, 0, .55), 0 0 0 7px rgba(255, 213, 0, .25); }
.search-icon { position: absolute; left: 22px; top: 50%; width: 24px; height: 24px; transform: translateY(-50%); color: var(--blue); pointer-events: none; }
.search-clear {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: #eef1f8; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer;
}
.search-clear:hover { background: #e2e6f2; color: var(--ink); }

/* Verdict */
.verdict { max-width: 560px; margin: 18px auto 0; min-height: 1px; }
.verdict-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 20px;
  text-align: left;
  animation: pop .28s cubic-bezier(.2, .9, .3, 1.3);
}
.verdict-card .v-icon {
  flex: none;
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  font-size: 24px;
}
.verdict-card .v-img { flex: none; width: 64px; height: 52px; object-fit: contain; background: #fff; border-radius: 12px; padding: 4px; }
.verdict-card strong { display: block; font-size: 18px; font-weight: 800; }
.verdict-card span { display: block; font-size: 15px; opacity: .9; }
.verdict-card a { font-weight: 700; }
.v-owned { background: #fff; color: var(--ink); box-shadow: 0 0 0 3px var(--red) inset; }
.v-owned .v-icon { background: #ffe3e1; }
.v-owned strong { color: var(--red); }
.v-free { background: var(--yellow); color: var(--ink); }
.v-free .v-icon { background: rgba(255, 255, 255, .6); }
.v-info { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .18); }
.v-info .v-icon { background: rgba(255, 255, 255, .12); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }

/* Briques flottantes */
.bricks { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.fbrick {
  position: absolute;
  animation: float var(--dur, 9s) ease-in-out var(--delay, 0s) infinite alternate;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .35));
}
.fbrick.far { filter: blur(3px); opacity: .55; }
.fbrick svg { display: block; width: 100%; height: auto; }
@keyframes float {
  from { transform: translateY(0) rotate(var(--r, 0deg)); }
  to { transform: translateY(-16px) rotate(calc(var(--r, 0deg) + 6deg)); }
}
@media (prefers-reduced-motion: reduce) { .fbrick { animation: none; transform: rotate(var(--r, 0deg)); } }
@media (max-width: 720px) { .fbrick.hide-sm { display: none; } }

.hero-edge { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 90px; z-index: 1; }
@media (min-width: 720px) { .hero-edge { height: 120px; } }

/* ═══════════ STATS ═══════════ */
.stats-band { background: var(--yellow); padding: 6px 16px 34px; }
.stats {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px 28px;
  flex-wrap: wrap;
}
.stat { display: flex; align-items: baseline; gap: 8px; background: #fff; padding: 10px 22px; border-radius: 999px; box-shadow: 0 4px 0 var(--yellow-2), 0 6px 16px -6px rgba(0, 0, 0, .2); }
.stat strong { font-size: 30px; font-weight: 900; color: var(--navy); line-height: 1; }
.stat span { font-weight: 600; color: var(--muted); }
.stat-tip { margin: 0; font-weight: 500; color: #4a3d00; max-width: 420px; text-align: center; }

/* ═══════════ COLLECTION ═══════════ */
.collection { padding: 56px 0 72px; }
.collection-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.collection h2, .how h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; color: var(--navy); }
.sort { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--muted); font-size: 15px; }
.sort select {
  font: 600 15px var(--font);
  color: var(--ink);
  padding: 9px 38px 9px 16px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235b6380' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center / 12px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}
@media (min-width: 720px) { .chips { flex-wrap: wrap; overflow: visible; margin: 0; padding-left: 2px; padding-right: 2px; } }
.chip {
  flex: none;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: #fff;
  font: 600 15px var(--font);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.chip:hover { border-color: #c7cde0; transform: translateY(-1px); }
.chip .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--navy)); }
.chip .n {
  min-width: 26px; height: 26px; padding: 0 7px;
  display: inline-grid; place-items: center;
  border-radius: 999px; background: #eef1f8; font-size: 13px; font-weight: 700; color: var(--muted);
}
.chip[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip[aria-selected="true"] .n { background: var(--yellow); color: var(--ink); }
.chip[aria-selected="true"] .dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .6); }

.result-count { margin: 8px 0 18px; color: var(--muted); font-weight: 500; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 20px;
}
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

.theme-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 -4px;
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
}
.theme-title:first-child { margin-top: 0; }
.theme-title .bar { width: 22px; height: 12px; border-radius: 4px; background: var(--c); box-shadow: 6px -6px 0 -2px var(--c); }
.theme-title small { font-size: 14px; font-weight: 600; color: var(--muted); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  animation: cardIn .35s ease both;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .card { animation: none; } }

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(70% 70% at 50% 45%, #fff 0%, transparent 100%),
    color-mix(in srgb, var(--c) 16%, #eef1f8);
  text-decoration: none;
}
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; padding: inherit; object-fit: contain; mix-blend-mode: multiply; transition: transform .25s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.card-media .ph { width: 56%; opacity: .9; }

.badge-num {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .02em;
  box-shadow: 0 2px 0 var(--yellow-2);
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-theme {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--c);
  filter: brightness(.8);
}
.card-theme::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.card h3 { font-size: 17px; font-weight: 700; color: var(--ink); }
.card-links { margin-top: auto; padding-top: 4px; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; font-weight: 600; }
.card-links a { color: var(--blue); text-decoration: none; }
.card-links a:hover { text-decoration: underline; }
@media (max-width: 520px) {
  .card-media { padding: 12px; }
  .badge-num { top: 8px; left: 8px; font-size: 12px; padding: 3px 9px; }
  .card-body { padding: 10px 12px 12px; gap: 6px; }
  .card h3 { font-size: 15px; }
  .card-theme { font-size: 10px; }
  .card-links { font-size: 12px; }
}

.card.flash { animation: flash 1.6s ease; }
@keyframes flash {
  0%, 100% { box-shadow: var(--shadow); }
  20%, 60% { box-shadow: 0 0 0 4px var(--yellow), var(--shadow-hover); }
}

mark { background: rgba(255, 213, 0, .55); color: inherit; border-radius: 4px; padding: 0 2px; }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); font-size: 18px; }
.empty strong { color: var(--ink); }
.empty-brick {
  width: 84px; height: 46px; margin: 0 auto 22px; position: relative;
  background: var(--yellow); border-radius: 8px; box-shadow: inset 0 -6px 0 var(--yellow-2);
}
.empty-brick::before, .empty-brick::after {
  content: ""; position: absolute; top: -12px; width: 24px; height: 14px; border-radius: 6px 6px 2px 2px; background: var(--yellow);
}
.empty-brick::before { left: 12px; }
.empty-brick::after { right: 12px; }

/* ═══════════ COMMENT ÇA MARCHE ═══════════ */
.how { background: #fff; padding: 64px 0 72px; border-top: 1px solid var(--line); }
.steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.steps li { background: var(--bg); border-radius: var(--radius); padding: 24px; }
.step-n {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--c); color: #fff; font-weight: 900; font-size: 22px;
  margin-bottom: 14px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18);
}
.steps h3 { font-size: 20px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.steps p { margin: 0; color: var(--muted); }

/* ═══════════ FOOTER ═══════════ */
.footer { background: var(--navy); color: rgba(255, 255, 255, .8); padding: 32px 0 40px; text-align: center; font-size: 15px; }
.footer p { margin: 4px 0; }
.footer .legal { font-size: 12px; color: rgba(255, 255, 255, .5); }
