/* quelrangement.com : les composants du site (tirés de la démo du design system du 05/12) */
  /* category tiles: a photograph, the name and the monthly searches under it */
  /* categories: one big tile beside three rows with a small photograph */
  #categories .cat-big .panel { --p-h: 480px; height: 480px; }
  #categories .cat-big .panel img { width: 100%; height: 100%; object-fit: cover; }
  @media (max-width: 1023px) { #categories .cat-big { margin-top: var(--s-6); } }
  .cat-list { display: grid; gap: var(--s-4); }
  .cat-row { display: grid; grid-template-columns: minmax(0, 1fr) 176px; gap: var(--s-5); align-items: center; padding-bottom: var(--s-4); border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
  .cat-row:last-child { border-bottom: 0; padding-bottom: 0; }
  .cat-row img { width: 160px; height: 112px; object-fit: cover; border-radius: var(--r-md); }
  .cat-row > span { display: grid; gap: var(--s-1); }
  .cat-row__line { color: var(--ink); }
  @media (max-width: 639px) { .cat-row { grid-template-columns: minmax(0, 1fr) 112px; gap: var(--s-4); } .cat-row img { width: 112px; height: 84px; } #categories .cat-big .panel { --p-h: 240px; } }
  /* a phone: the main action leaves the bar for the action bar at the foot */
  @media (max-width: 639px) { .nav .nav__actions { display: none; } }
  /* the close's name: two words, kept inside the wrap */
  .closing .close__word { font-size: clamp(34px, 11.2vw, 162px); white-space: nowrap; }
  .compare__item { display: flex; align-items: center; gap: var(--s-4); }
  .compare__item img { width: 88px; height: 88px; flex: none; object-fit: cover; border-radius: var(--r-md); }
  /* the filter row: pills that toggle, the sort on the right */
  .filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-bottom: var(--s-6); }
  .filters .pill { cursor: pointer; font: 500 var(--t-small)/1 var(--font-text); }
  .filters .pill[aria-pressed="true"] { background: var(--action); color: var(--action-ink); border-color: var(--action); }
  .filters__sort { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-small); color: var(--muted); }
  .filters__sort select { height: 36px; padding: 0 var(--s-3); border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg); color: var(--ink); font: 400 var(--t-small)/1 var(--font-text); }
  /* the offer card: picture, seller, name, price, one button */
  .offer .panel { --p-h: 280px; height: 280px; aspect-ratio: auto; }
  .offer .panel img { width: 100%; height: 100%; object-fit: cover; }
  @media (max-width: 639px) { .offer .panel { --p-h: 240px; height: 240px; } }
  .offer__seller { margin-top: var(--s-1); font-size: var(--t-small); color: var(--muted); }
  .offer h3 { margin-top: var(--s-4); }
  #selection .offers { row-gap: var(--s-8); }
  @media (min-width: 640px) and (max-width: 1023px) { #selection .offers > .offer { grid-column: auto / span 6; } }
  .offer__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-3); }
  .offer__price { font: 500 24px/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
  .offer[hidden] { display: none; }
  /* secondary buttons on the white ground: an ink outline, so they read as buttons */
  main .section .btn--secondary { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-strong); }
  /* the comparison table */
  .compare { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
  .compare th { text-align: left; font: 500 var(--t-label)/1.2 var(--font-text); color: var(--muted); padding: 0 var(--s-4) var(--s-3) 0; border-bottom: 1px solid var(--line-strong); }
  .compare td { padding: var(--s-4) var(--s-4) var(--s-4) 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
  .compare td:first-child { font-weight: 500; width: 44%; }
  .compare .num { text-align: right; white-space: nowrap; }
  .compare th.num { text-align: right; }
  .compare td:last-child, .compare th:last-child { text-align: right; padding-right: 0; }
  .compare .badge { margin-left: var(--s-2); }
  @media (max-width: 767px) {
    .compare thead { display: none; }
    .compare tr { display: grid; grid-template-columns: 1fr auto; gap: var(--s-1) var(--s-3); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
    .compare td { padding: 0; border: 0; }
    .compare td:first-child { grid-column: 1 / -1; width: auto; }
    .compare__item img { width: 64px; height: 64px; }
    .compare .badge { margin: var(--s-1) 0 0; display: inline-flex; }
    .compare td.cell-mat, .compare td.cell-seller { color: var(--muted); font-size: var(--t-small); }
    .compare td:last-child { grid-column: 1 / -1; text-align: left; }
  }
  /* the guide photograph */
  .guide__photo { position: relative; overflow: hidden; border-radius: var(--r-lg); height: min(620px, var(--ly-fit, 620px)); }
  .guide__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  @media (max-width: 1023px) { .guide__photo { height: auto; aspect-ratio: 4 / 3; margin-top: var(--s-6); } }
  #france .rows__name small { display: block; margin-top: 2px; font-weight: 400; font-size: var(--t-small); opacity: .85; }
  /* the brand band's photograph */
  #france .develop img { width: 100%; height: min(640px, 72vh); object-fit: cover; border-radius: var(--r-lg); display: block; }
  @media (max-width: 1023px) { #france .develop { margin-top: var(--s-6); } #france .develop img { height: auto; aspect-ratio: 4 / 3; } }

  /* links inside cards and tables keep the ink */
  .offer__name, .compare__item a { color: inherit; text-decoration: none; }
  .offer__name:hover, .compare__item a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .offer > .panel { display: block; }
  /* a page head (category, guide, product): the h1 and one line, under the bar */
  .page-head { display: grid; gap: var(--s-4); max-width: 60ch; margin-bottom: var(--s-7); }
  .page-head h1 { font: var(--display-weight) clamp(40px, 5vw, 72px)/1.02 var(--font-display); letter-spacing: var(--display-tracking); font-stretch: var(--display-stretch); }
  .crumbs { font-size: var(--t-small); color: var(--muted); }
  .crumbs a { color: inherit; }
  /* the product page */
  .product__photo { position: relative; overflow: hidden; border-radius: var(--r-lg); aspect-ratio: 4 / 3; }
  .product__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .buybox { display: grid; gap: var(--s-4); padding: var(--s-6); border: 1px solid var(--line); border-radius: var(--r-lg); }
  .buybox__price { font: 500 44px/1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
  .buybox .btn { justify-self: start; }
  .prose { max-width: 66ch; display: grid; gap: var(--s-4); }
  .prose h2 { font: var(--display-weight) clamp(28px, 3vw, 40px)/1.1 var(--font-display); letter-spacing: var(--display-tracking); margin-top: var(--s-6); }
  .prose p, .prose li { font-size: var(--t-body); line-height: 1.6; }
  .prose ul { padding-left: 1.2em; list-style: disc; display: grid; gap: var(--s-2); }
  .cat-list--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-7); }
  .cat-list--cols .cat-row:nth-last-child(-n+2) { border-bottom: 0; }
  @media (max-width: 767px) { .cat-list--cols { grid-template-columns: minmax(0, 1fr); } }

  /* a catalogue section grows with its list: at least one screen, never cut (a category of 40 offers, a long guide) */
  main > .section.section--grow { height: auto; min-height: calc(var(--h, 1) * 100svh); }
  /* a phone: the filters scroll sideways in one line, the product's photo comes before its price */
  @media (max-width: 639px) {
    .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gut, 24px)); padding-inline: var(--gut, 24px); scrollbar-width: none; }
    .filters .pill { flex: none; }
    #produit .wrap.grid > .start-7 { order: -1; margin-bottom: var(--s-6); }
    main > .section.section--grow#produit { min-height: 0; }
  }
  /* the sort list: our own chevron, 16px from the pill's edge, in the muted ink (the browser's arrow sat on the border) */
  .filters__sort select { appearance: none; -webkit-appearance: none; padding: 0 40px 0 var(--s-4); cursor: pointer;
    background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%236e655b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center / 12px 12px; }

/* Page de sortie en attendant le lien affilié */
.go { display: grid; grid-template-columns: 320px 1fr; gap: var(--s-8, 48px); align-items: center; max-width: 960px; margin: 0 auto; padding-block: var(--s-8, 48px); }
.go__photo { width: 320px; height: 320px; object-fit: cover; border-radius: var(--r-card, 12px); }
.go__eyebrow { color: var(--muted); margin: 0 0 var(--s-2, 8px); }
.go__title { margin: 0; font-size: clamp(2rem, 3.2vw, 3rem); line-height: 1.05; }
.go .btn-row { margin-top: var(--s-5, 24px); }
.go__price { font-size: 2rem; margin: var(--s-3, 12px) 0; }
@media (max-width: 640px) { .go { grid-template-columns: 1fr; } .go__photo { width: 100%; height: auto; aspect-ratio: 1; } }

.footer__legal-links a { color: inherit; }
.footer__legal-links a:hover { color: var(--ink); }

/* Gabarit des guides (src/layouts/Guide.astro, S49) : n'agit pas sur le guide « Comment choisir » */
/* en-tête, photo, texte : sur téléphone la photo vient sous l'en-tête ; sur ordinateur elle tient la colonne de droite et suit la lecture */
.guide__grid { row-gap: 0; }
@media (min-width: 1024px) {
  .guide__grid > .guide__head, .guide__grid > .guide__prose { grid-column: 1 / span 6; }
  .guide__grid > .guide__head { grid-row: 1; }
  .guide__grid > .guide__prose { grid-row: 2; }
  .guide__grid > .guide__aside { grid-column: 7 / span 6; grid-row: 1 / span 2; align-self: stretch; }
  .guide__photo--sticky { position: sticky; top: 104px; }
}
@media (max-width: 1023px) { .guide__photo--sticky { margin: 0 0 var(--s-7); } }
.prose a:not(.btn) { color: inherit; text-decoration: underline; text-decoration-color: var(--p-accent); text-underline-offset: 3px; }
.prose a:not(.btn):hover { color: var(--p-accent); }
.guide__fin { margin-top: var(--s-8); }
.guide__offres--peu { row-gap: var(--s-6); }
@media (max-width: 1023px) { .guide__offres--peu > .offer { grid-column: 1 / -1; } }
/* un tableau dans le texte d'un guide : des filets, empilé sur téléphone */
.prose table { width: 100%; border-collapse: collapse; font-size: var(--t-body); }
.prose th { text-align: left; font: 500 var(--t-label)/1.2 var(--font-text); color: var(--muted); padding: 0 var(--s-4) var(--s-3) 0; border-bottom: 1px solid var(--line-strong); }
.prose td { padding: var(--s-3) var(--s-4) var(--s-3) 0; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.5; }
.prose td:first-child { font-weight: 500; }
@media (max-width: 639px) {
  .prose thead { display: none; }
  .prose tr { display: grid; gap: var(--s-1); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
  .prose td { padding: 0; border: 0; }
  .prose td[data-label]::before { content: attr(data-label); display: block; font-size: var(--t-small); color: var(--muted); }
}

/* Page des guides et bloc « D'autres guides » (06/12/2026) */
.guides-list { row-gap: var(--s-8); margin-top: var(--s-8); }
.guide-card { align-content: start; }
.guide-card .panel { --p-h: 240px; height: 240px; overflow: hidden; }
.guide-card .panel img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 640px) and (max-width: 1023px) { .guides-list > .guide-card { grid-column: auto / span 6; } }
@media (max-width: 639px) { .guides-list > .guide-card { grid-column: 1 / -1; } .guide-card .panel { --p-h: 200px; height: 200px; } }
