/* scripts/lerival/assets/lerival.css — LE RIVAL (lot 222). Identité : Nuit #0D1526, Argent #C9CED8 (côté référence), Vert Rival #00B37E
   (côté rival, économies), Ambre Verdict #FFB020 (verdicts, toujours icône + texte), Blanc froid #F7F8FA. Bricolage Grotesque (titres),
   Instrument Sans (texte), servies par le site. Mobile d'abord ; thème sombre par prefers-color-scheme. Aucun badge ne couvre une photo. */
@font-face { font-family: "Bricolage Grotesque"; src: url("/assets/fonts/bricolage-grotesque-wght.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/instrument-sans-wght.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --nuit: #0D1526; --argent: #C9CED8; --vert: #00B37E; --ambre: #FFB020; --blanc: #F7F8FA;
  --fond: var(--blanc); --surface: #FFFFFF; --texte: #0D1526; --doux: #4A5468; --trait: #DDE1E8; --trait-fort: #C9CED8;
  --vert-texte: #007A55; --vert-fond: #E3F6EE; --argent-fond: #E9ECF1; --tuile: #FFFFFF; --ombre: 0 1px 2px rgb(13 21 38 / .06), 0 8px 24px rgb(13 21 38 / .07);
  --r: 18px; --titre: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif; --corps: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --fond: #0D1526; --surface: #141E33; --texte: #F7F8FA; --doux: #A9B2C3; --trait: #243049; --trait-fort: #34405C;
    --vert-texte: #2FD49C; --vert-fond: rgb(0 179 126 / .16); --argent-fond: #1C2740; --tuile: #FFFFFF; --ombre: 0 1px 2px rgb(0 0 0 / .3), 0 10px 30px rgb(0 0 0 / .35); }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 400 1rem/1.55 var(--corps); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--titre); line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5rem; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.9rem, 6.2vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.3rem, 3.6vw, 1.75rem); font-weight: 750; }
h3 { font-size: 1.08rem; font-weight: 700; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evitement { position: absolute; inset-inline-start: -999px; }
.evitement:focus { inset-inline-start: 1rem; top: 1rem; z-index: 9; background: var(--ambre); color: var(--nuit); padding: .5rem 1rem; border-radius: 8px; }
.page { width: min(100% - 2rem, 1200px); margin-inline: auto; }
.etroite { max-width: 760px; }
:focus-visible { outline: 3px solid var(--ambre); outline-offset: 2px; }

/* ——— en-tête ——— */
.tete { background: var(--nuit); color: var(--blanc); position: sticky; top: 0; z-index: 5; border-bottom: 1px solid rgb(255 255 255 / .06); }
.tete-l { display: flex; align-items: center; gap: 1rem; min-height: 60px; }
.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font: 800 1.35rem/1 var(--titre); letter-spacing: -.02em; }
.logo img { border-radius: 9px; }
.nav { display: none; margin-inline-start: auto; gap: .2rem; }
.nav a { text-decoration: none; padding: .45rem .7rem; border-radius: 999px; font-weight: 550; font-size: .95rem; color: #D7DCE5; white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { background: rgb(255 255 255 / .09); color: #fff; }
.bouton-icone { margin-inline-start: auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--blanc); }
.bouton-icone svg { width: 22px; height: 22px; }
.bouton-icone:hover { background: rgb(255 255 255 / .09); }
@media (min-width: 980px) { .nav { display: flex; } .bouton-icone { margin-inline-start: .25rem; } }

/* ——— accueil : héros ——— */
.heros { position: relative; background: var(--nuit); color: var(--blanc); overflow: hidden; isolation: isolate; }
.heros-photo, .heros-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.heros::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(13 21 38 / .55) 0%, rgb(13 21 38 / .35) 35%, rgb(13 21 38 / .92) 78%, var(--nuit) 100%); }
.heros-l { display: grid; gap: 1.6rem; padding-block: 3.2rem 2rem; }
.surtitre { margin: 0 0 .6rem; font: 700 .8rem/1 var(--corps); letter-spacing: .14em; text-transform: uppercase; color: var(--vert); }
.heros h1 { max-width: 14ch; text-wrap: balance; }
.chapeau { font-size: 1.08rem; color: #DCE1EA; max-width: 46ch; margin: .2rem 0 1.3rem; }
.recherche { display: flex; align-items: center; gap: .5rem; background: #fff; color: var(--nuit); border-radius: 16px; padding: .35rem .35rem .35rem .9rem; box-shadow: var(--ombre); max-width: 560px; border: 1px solid var(--trait); }
.recherche svg { width: 20px; height: 20px; flex: none; color: #5B657A; }
.recherche input { flex: 1; min-width: 0; border: 0; outline: 0; font: 500 1rem var(--corps); padding: .7rem .2rem; background: transparent; color: var(--nuit); }
.recherche button { flex: none; border: 0; border-radius: 12px; background: var(--vert); color: var(--nuit); font: 700 .95rem var(--corps); padding: .8rem 1rem; cursor: pointer; white-space: nowrap; }
.recherche button:hover { filter: brightness(1.06); }
@media (max-width: 420px) { .recherche button { padding: .8rem .75rem; } }
@media (min-width: 980px) { .heros-l { grid-template-columns: 1.1fr .9fr; align-items: end; padding-block: 5rem 3rem; } .heros::after { background: linear-gradient(90deg, rgb(13 21 38 / .9) 0%, rgb(13 21 38 / .55) 55%, rgb(13 21 38 / .25) 100%), linear-gradient(0deg, var(--nuit) 0, transparent 30%); } }

/* ——— la coupe à 20° : argent (référence) | vert (rival) ——— */
.duel-photos, .vedette-l, .face { background: linear-gradient(110deg, var(--argent) 0 50%, var(--vert) 50% 100%); }

/* le duel du jour (accueil) */
.vedette { color: var(--nuit); }
.vedette-l { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; padding: 1rem; border-radius: 22px; text-decoration: none; box-shadow: 0 20px 50px rgb(0 0 0 / .35); }
.v-cote { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.v-cote img { background: var(--tuile); border-radius: 14px; aspect-ratio: 1; object-fit: contain; padding: .4rem; width: 100%; }
.v-cote b { font: 750 1rem/1.2 var(--titre); overflow-wrap: anywhere; }
.v-prix { font: 800 1.25rem/1 var(--titre); }
.v-riv .v-prix { color: var(--nuit); }
.etiquette { align-self: flex-start; font: 700 .7rem/1 var(--corps); letter-spacing: .12em; text-transform: uppercase; padding: .38rem .6rem; border-radius: 999px; background: rgb(13 21 38 / .78); color: var(--blanc); white-space: nowrap; }
.v-ref .etiquette, .face-ref .etiquette { background: #8A93A6; color: var(--nuit); }
.vs { position: absolute; top: 42%; left: 50%; translate: -50% -50%; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--ambre); color: var(--nuit); font: 800 1rem/1 var(--titre); border: 3px solid var(--nuit); z-index: 1; }
.vedette-eco { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .9rem 0 0; color: #DCE1EA; font-size: .95rem; }

/* puces et blocs */
.puces { display: flex; gap: .5rem; overflow-x: auto; padding-block: 1.2rem .4rem; scrollbar-width: none; }
.puces::-webkit-scrollbar { display: none; }
.puces a { flex: none; text-decoration: none; padding: .55rem 1rem; border-radius: 999px; border: 1px solid var(--trait-fort); background: var(--surface); font-weight: 600; white-space: nowrap; }
.puces a:hover { border-color: var(--vert); }
.bloc { margin-block: 2.2rem; }
.note-prix { color: var(--doux); font-size: .9rem; margin: 0 0 1rem; }

/* ——— grille des duels ——— */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1rem; }
.duel-carte { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r); overflow: hidden; box-shadow: var(--ombre); transition: transform .15s ease, box-shadow .15s ease; }
.duel-carte:hover { transform: translateY(-2px); }
.duel-carte[hidden] { display: none; }
.duel-photos { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; padding: .8rem; }
.cote img { background: var(--tuile); border-radius: 12px; aspect-ratio: 1; object-fit: contain; padding: .35rem; width: 100%; }
.duel-photos .vs { top: 50%; width: 38px; height: 38px; font-size: .85rem; }
.duel-texte { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .55rem; }
.duel-titre { margin: 0; font-size: 1rem; }
.duel-titre a { text-decoration: none; display: grid; gap: .15rem; }
.nom-ref { color: var(--doux); font: 600 .92rem/1.25 var(--corps); }
.contre { font: 700 .68rem/1 var(--corps); letter-spacing: .12em; text-transform: uppercase; color: var(--vert-texte); margin-top: .2rem; }
.nom-riv { font: 750 1.08rem/1.22 var(--titre); }
.duel-titre a:hover .nom-riv { text-decoration: underline; text-underline-offset: 3px; }
.duel-prix { display: flex; align-items: center; gap: .5rem; margin: 0; flex-wrap: wrap; }
.duel-prix svg { width: 18px; height: 18px; color: var(--doux); }
.p-ref { color: var(--doux); font-weight: 600; }
.p-riv { font: 800 1.3rem/1 var(--titre); color: var(--vert-texte); }
.duel-plus { margin: 0; font-size: .88rem; color: var(--doux); }

/* chips : économie (vert) et verdict (ambre) — toujours une icône et un texte */
.eco, .verdict { display: inline-flex; align-items: center; gap: .35rem; align-self: flex-start; border-radius: 999px; padding: .35rem .7rem .35rem .55rem; font: 700 .9rem/1.1 var(--corps); white-space: nowrap; }
.eco { background: var(--vert-fond); color: var(--vert-texte); }
.eco small { font-weight: 600; opacity: .85; }
.verdict { background: var(--ambre); color: var(--nuit); }
.eco svg, .verdict svg { width: 16px; height: 16px; flex: none; }
.heros .eco { background: var(--vert); color: var(--nuit); }

/* ——— page pivot : le face-à-face ——— */
.ariane { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .88rem; color: var(--doux); padding-block: 1rem .4rem; }
.ariane a { text-decoration: none; } .ariane a:hover { text-decoration: underline; }
.titre-page { margin-block: .6rem 1.2rem; }
.titre-page h1 { font-size: clamp(1.6rem, 5vw, 2.6rem); text-wrap: balance; }
.face { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1rem; border-radius: 26px; color: var(--nuit); box-shadow: var(--ombre); }
.face-cote { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.face-photo img { background: var(--tuile); border-radius: 16px; aspect-ratio: 1; object-fit: contain; padding: .5rem; width: 100%; }
.face-nom { font-size: clamp(1rem, 3.6vw, 1.5rem); margin: .3rem 0 0; }
.face-nom a { text-decoration: none; } .face-nom a:hover { text-decoration: underline; }
.face-prix { margin: 0; font: 800 clamp(1.35rem, 4.6vw, 2.2rem)/1 var(--titre); }
.face-prix span { font: 600 .85rem var(--corps); }
.face-chez { margin: 0; font-size: .9rem; font-weight: 600; }
.face .vs { top: 38%; width: 52px; height: 52px; font-size: 1.05rem; }
.face-eco { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 1rem 0 0; font-weight: 600; }
.face-eco .eco { font-size: 1.05rem; padding: .5rem .9rem .5rem .7rem; }
@media (min-width: 760px) { .face { gap: 4rem; padding: 1.6rem 2rem; } .face .vs { top: 50%; } .face-photo img { max-height: 360px; } }

/* les rivaux */
.rivaux { display: grid; gap: 1rem; }
.rival { display: grid; grid-template-columns: 112px 1fr; gap: 1rem; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r); padding: 1rem; box-shadow: var(--ombre); border-inline-start: 5px solid var(--vert); }
.rival-photo img { background: var(--tuile); border-radius: 12px; aspect-ratio: 1; object-fit: contain; padding: .3rem; width: 100%; border: 1px solid var(--trait); }
.rival-offres { grid-column: 1 / -1; min-width: 0; }
.rival-corps { min-width: 0; display: flex; flex-direction: column; gap: .5rem; }
.rival-marque { margin: 0; font: 700 .72rem/1 var(--corps); letter-spacing: .12em; text-transform: uppercase; color: var(--doux); }
.rival-nom { margin: 0; font-size: 1.15rem; }
.rival-nom a { text-decoration: none; } .rival-nom a:hover { text-decoration: underline; }
.rival-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
@media (min-width: 760px) { .rival { grid-template-columns: 180px 1fr; } .rival-offres { grid-column: 2; } .rival-photo { grid-row: span 2; } .rival { align-content: start; } .rivaux { grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); } }
.gardes { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.gardes li { display: flex; gap: .4rem; align-items: flex-start; font-size: .92rem; }
.gardes svg { width: 18px; height: 18px; flex: none; margin-top: .1rem; }
.gardes .garde svg { color: var(--vert-texte); } .gardes .perd svg { color: #B4405A; }

/* les offres */
.offres { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.offres a { display: grid; grid-template-columns: 1fr auto 18px; align-items: center; gap: .6rem; text-decoration: none; padding: .62rem .8rem; border-radius: 12px; background: var(--argent-fond); border: 1px solid transparent; }
.offres a:hover { border-color: var(--vert); }
.offres .tete-offre a { background: var(--vert-fond); }
.offres .enseigne { font-weight: 600; overflow-wrap: anywhere; }
.offres .prix { font: 800 1.05rem/1 var(--titre); white-space: nowrap; }
.offres svg { width: 18px; height: 18px; color: var(--doux); }
.offres-plus { margin: .4rem 0 0; font-size: .92rem; font-weight: 600; }
.mention-affil, .ref-exacte { color: var(--doux); font-size: .85rem; margin: .8rem 0 0; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--trait); }
.faq summary { cursor: pointer; padding: 1rem 0; font: 700 1.02rem/1.35 var(--titre); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--vert-texte); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 1rem; color: var(--doux); }

/* fiche d'un rival */
.fiche { display: grid; gap: 1.2rem; margin-block: .6rem 1rem; }
.fiche-photo img { background: var(--tuile); border-radius: 22px; aspect-ratio: 1; object-fit: contain; padding: 1rem; width: 100%; max-width: 520px; border: 1px solid var(--trait); }
.fiche-corps h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
.fiche-prix { font: 800 2rem/1 var(--titre); margin: .4rem 0 1rem; color: var(--vert-texte); }
.fiche-prix span, .fiche-prix small { font: 600 .95rem var(--corps); color: var(--doux); }
.fiche-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.bouton { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; background: var(--vert); color: var(--nuit); font: 700 1rem var(--corps); padding: .85rem 1.3rem; border-radius: 14px; border: 2px solid var(--vert); }
.bouton.contour { background: transparent; color: var(--texte); }
.bouton:hover { filter: brightness(1.05); }
.vendeur-amazon { display: block; width: 100%; font-size: .82rem; color: var(--doux); }
.contre { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .5rem; }
.contre a { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; text-decoration: none; padding: .7rem .9rem; border-radius: 14px; background: var(--argent-fond); }
@media (min-width: 860px) { .fiche { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 2.4rem; align-items: start; } }

/* ——— familles : bandeau et filtres ——— */
.bandeau { position: relative; isolation: isolate; color: var(--blanc); background: var(--nuit); overflow: hidden; }
.bandeau::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgb(13 21 38 / .95) 10%, rgb(13 21 38 / .45) 100%); }
.bandeau.sans-photo { background: linear-gradient(110deg, #1C2740 0 50%, #063F31 50% 100%); }
.bandeau.sans-photo::after { background: none; }
.bandeau .page { min-height: 240px; display: flex; align-items: flex-end; padding-block: 1rem 1.6rem; }
.bandeau .ariane, .bandeau .ariane a { color: #C7CEDA; }
.bandeau p { color: #DCE1EA; max-width: 60ch; margin: 0; }
@media (min-width: 760px) { .bandeau .page { min-height: 340px; } }
.filtres { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-block: 1.2rem .8rem; }
.filtres[hidden] { display: none; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; padding: .62rem 1rem; border-radius: 999px; border: 1px solid var(--trait-fort); background: var(--surface); font-weight: 650; white-space: nowrap; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; width: 8px; height: 8px; border-inline-end: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: 45deg; translate: 0 -2px; }
.menu summary[data-n]:not([data-n=""])::before { content: attr(data-n); order: 2; min-width: 1.35rem; height: 1.35rem; border-radius: 999px; background: var(--vert); color: var(--nuit); font-size: .78rem; display: grid; place-items: center; }
.menu.actif summary { border-color: var(--vert); }
.menu fieldset { position: absolute; z-index: 4; inset-inline-start: 0; top: calc(100% + .4rem); margin: 0; min-width: 220px; max-height: 60vh; overflow: auto; background: var(--surface); border: 1px solid var(--trait); border-radius: 16px; padding: .4rem; box-shadow: var(--ombre); display: grid; }
.menu label { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.menu label:hover { background: var(--argent-fond); }
.menu input { width: 18px; height: 18px; accent-color: var(--vert); }
.effacer, .vide button { border: 0; background: none; color: var(--vert-texte); font: 700 .95rem var(--corps); cursor: pointer; text-decoration: underline; padding: .5rem; }

/* recherche */
.index { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: .5rem; }
.index li[hidden] { display: none; }
.index a { display: grid; grid-template-columns: 1fr auto; gap: .15rem .8rem; text-decoration: none; padding: .8rem 1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--trait); }
.index b { font-family: var(--titre); } .index span { color: var(--doux); font-size: .9rem; grid-column: 1; } .index .i-eco { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--vert-texte); font-weight: 800; font-size: 1rem; white-space: nowrap; }

/* confiance, textes */
.confiance { display: flex; gap: 1rem; align-items: flex-start; padding: 1.3rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--trait); }
.confiance > svg { width: 34px; height: 34px; flex: none; color: var(--vert-texte); }
.confiance p { margin: 0; color: var(--doux); }
.texte { padding-bottom: 2rem; } .texte h2 { margin-top: 1.8rem; } .texte p, .texte li { color: var(--doux); }
.texte h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin-top: .5rem; }
.mentions div { display: grid; grid-template-columns: minmax(0, 11rem) 1fr; gap: .8rem; padding: .5rem 0; border-bottom: 1px solid var(--trait); }
.mentions dt { font-weight: 700; } .mentions dd { margin: 0; color: var(--doux); }

/* pied */
.pied { margin-top: 3rem; background: var(--nuit); color: #C9CED8; padding-block: 2.4rem 2rem; }
.pied .page { display: grid; gap: 1.6rem; }
.pied h2 { font: 700 .78rem/1 var(--corps); letter-spacing: .14em; text-transform: uppercase; color: #8A93A6; margin-bottom: .8rem; }
.pied ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.pied a { text-decoration: none; } .pied a:hover { color: #fff; text-decoration: underline; }
.pied .logo { color: #fff; }
.pied-marque p { max-width: 38ch; }
.pied-note { font-size: .85rem; color: #8A93A6; border-top: 1px solid rgb(255 255 255 / .08); padding-top: 1.2rem; margin: 0; }
@media (min-width: 860px) { .pied .page { grid-template-columns: 1.4fr 1fr 1fr 1.3fr; } .pied-note { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
