/* Tarifo, comparaison des prix sur Jumia Côte d'Ivoire.
   Mise en page d'outil : barre du haut compacte, listes nettes, une seule marque forte (l'étiquette de prix jaune). */
:root {
  --nuit: #0F2233;
  --etiquette: #FFD23F;
  --etiquette-fonce: #E9BC16;
  --fond: #F2F4F6;
  --surface: #FFFFFF;
  --trait: #DCE2E8;
  --gris: #5A6B7C;
  --vert: #0A7350;
  --wa: #1FAF5A;
  --police: "Figtree", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--nuit); font: 400 1rem/1.5 var(--police); }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--etiquette); outline-offset: 2px; }
[hidden] { display: none !important; }
.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evitement { position: absolute; left: -999px; top: 8px; background: var(--etiquette); padding: 8px 12px; z-index: 40; }
.evitement:focus { left: 8px; }
.cadre { max-width: 1080px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }

/* ---------- Barre du haut ---------- */
.haut { position: sticky; top: 0; z-index: 20; background: var(--nuit); color: #fff; }
.haut-ligne { display: flex; align-items: center; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.marque { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; font-size: 1.3rem; flex: 0 0 auto; }
.recherche { flex: 1; display: flex; max-width: 680px; background: #fff; border-radius: 6px; overflow: hidden; }
.recherche input { flex: 1; min-width: 0; border: 0; padding: 10px 12px; font-size: 1rem; color: var(--nuit); outline: none; }
.recherche button { border: 0; background: var(--etiquette); color: var(--nuit); font-weight: 800; padding: 0 18px; cursor: pointer; }
.recherche button:hover { background: var(--etiquette-fonce); }
.recherche:focus-within { box-shadow: 0 0 0 2px var(--etiquette); }

/* Onglets de rubriques, sur une ligne qui défile. */
.rubriques {
  display: flex; gap: 2px; overflow-x: auto; background: var(--surface); color: var(--nuit);
  border-bottom: 1px solid var(--trait); padding: 0 max(16px, calc((100% - 1080px) / 2 + 16px)); scrollbar-width: none;
}
.rubriques::-webkit-scrollbar { display: none; }
.rubriques button {
  flex: 0 0 auto; background: none; border: 0; border-bottom: 3px solid transparent; padding: 11px 10px 9px;
  font-size: .94rem; font-weight: 600; color: var(--gris); cursor: pointer; white-space: nowrap;
}
.rubriques button:hover { color: var(--nuit); }
.rubriques button[aria-pressed="true"] { color: var(--nuit); border-bottom-color: var(--etiquette-fonce); }

/* ---------- Présentation (avant toute recherche) ---------- */
.intro { padding: 22px 0 6px; }
.intro h1 { font-size: clamp(1.4rem, 3.4vw, 1.9rem); line-height: 1.2; font-weight: 800; letter-spacing: -.015em; margin: 0 0 8px; }
.intro p { margin: 0 0 10px; color: var(--gris); max-width: 40em; }
.populaires { font-size: .95rem; }
.populaires button {
  background: none; border: 0; padding: 0; margin: 0 2px; color: var(--nuit); font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--etiquette-fonce); text-underline-offset: 3px; cursor: pointer;
}

/* ---------- Étiquette de prix ---------- */
.prix-etiquette {
  position: relative; display: inline-block; background: var(--etiquette);
  font-weight: 800; font-size: 1.1rem; line-height: 1; white-space: nowrap;
  padding: 6px 10px 6px 20px;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
}
.prix-etiquette::before {
  content: ""; position: absolute; left: 8px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px;
  border-radius: 50%; background: var(--surface);
}
.ancien { color: var(--gris); text-decoration: line-through; font-size: .9rem; }
.remise { color: var(--vert); font-weight: 700; font-size: .9rem; }

/* ---------- Résultats ---------- */
.barre { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; justify-content: space-between; padding: 16px 0 10px; }
#etat { margin: 0; color: var(--gris); max-width: 46em; }
.tri { font-weight: 600; font-size: .92rem; white-space: nowrap; }
.tri select { margin-left: 6px; padding: 5px 6px; border: 1px solid var(--trait); border-radius: 4px; background: var(--surface); }
.resultats { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--trait); border-radius: 6px; }
.resultats:empty { display: none; }
.fiche { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--trait); }
.fiche:last-child { border-bottom: 0; }
.photo { width: 112px; height: 112px; background: #fff; object-fit: contain; }
.photo.vide { background: var(--fond); }
.fiche h2 { font-size: 1rem; font-weight: 600; line-height: 1.35; margin: 0 0 8px; overflow-wrap: anywhere; }
.ligne-prix { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ecart { margin: 8px 0 0; font-size: .93rem; }
.ecart strong { color: var(--vert); }
.note { color: var(--gris); font-size: .87rem; margin: 4px 0 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; }
.bouton {
  display: inline-flex; align-items: center; justify-content: center; min-height: 38px;
  border-radius: 4px; padding: 7px 14px; font-weight: 600; text-decoration: none; cursor: pointer;
  background: var(--nuit); color: #fff; border: 1px solid var(--nuit);
}
.bouton:hover { background: #22405A; }
.bouton.clair { background: var(--surface); color: var(--nuit); border-color: var(--trait); }
.bouton.clair:hover { border-color: var(--nuit); background: var(--surface); }
.question { color: var(--gris); font-size: .87rem; }
.question:hover { color: var(--nuit); }
.offres { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--trait); }
.offre { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--trait); }
.offre:last-child { border-bottom: 0; }
.offre .p { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.offre .p strong { font-weight: 800; }
.offre .d { color: var(--gris); font-size: .85rem; overflow-wrap: anywhere; }
.offre .a { display: flex; gap: 6px; }
.offre .bouton { min-height: 34px; padding: 5px 11px; font-size: .9rem; }
.plus { margin: 14px 0 0; }
.fantome { height: 140px; border-bottom: 1px solid var(--trait); background: linear-gradient(var(--fond), var(--fond)) 16px 14px / 112px 112px no-repeat; }

/* ---------- Bonnes affaires du jour ---------- */
.vitrine { margin: 24px 0 0; }
.vitrine-tete { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; }
.vitrine h2 { font-size: 1.25rem; font-weight: 800; margin: 0; }
.vitrine-tete p { margin: 0; color: var(--gris); font-size: .9rem; }
.onglets { display: flex; gap: 4px 14px; overflow-x: auto; margin: 8px 0; scrollbar-width: none; }
.onglets::-webkit-scrollbar { display: none; }
.onglets button {
  flex: 0 0 auto; border: 0; background: none; padding: 4px 0; border-bottom: 2px solid transparent;
  font-size: .92rem; font-weight: 600; color: var(--gris); cursor: pointer; white-space: nowrap;
}
.onglets button[aria-pressed="true"] { color: var(--nuit); border-bottom-color: var(--etiquette-fonce); }
.bande {
  list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--trait); border-radius: 6px; overflow: hidden;
}
.affaire { border-right: 1px solid var(--trait); border-bottom: 1px solid var(--trait); margin: 0 -1px -1px 0; }
.affaire a { display: flex; flex-direction: column; height: 100%; padding: 12px; text-decoration: none; }
.affaire a:hover .titre { text-decoration: underline; }
.affaire .photo { width: 100%; height: auto; aspect-ratio: 1; }
.affaire .titre { font-size: .88rem; line-height: 1.3; margin: 8px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.affaire .bas { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.affaire .prix-etiquette { font-size: .98rem; }

/* ---------- Bas de page ---------- */
.pied { margin-top: 36px; border-top: 1px solid var(--trait); background: var(--surface); color: var(--gris); font-size: .9rem; }
.pied .cadre { padding-top: 18px; padding-bottom: 90px; }
.pied p { margin: 0 0 8px; max-width: 52em; }
.pied a { color: var(--nuit); font-weight: 600; }
.wa-flottant {
  position: fixed; right: 16px; bottom: 16px; z-index: 30; display: grid; place-items: center;
  width: 54px; height: 54px; border-radius: 50%; background: var(--wa); color: #fff;
  box-shadow: 0 4px 12px rgba(15, 34, 51, .25);
}
.wa-flottant:hover { background: #17924A; }

@media (max-width: 640px) {
  .haut-ligne { gap: 10px; }
  .marque span { display: none; }
  .recherche button { padding: 0 12px; }
  .fiche { grid-template-columns: 80px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .photo { width: 80px; height: 80px; }
  .offre { grid-template-columns: 1fr; }
  .bande { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fantome { background-size: 80px 80px; background-position: 12px 12px; height: 108px; }
}

/* ---------- Centrage (19/11/2026) ---------- */
.haut-ligne { justify-content: center; }
.recherche { margin: 0 auto; }
.rubriques { justify-content: safe center; }
.intro { text-align: center; padding-top: 28px; }
.intro p { margin-left: auto; margin-right: auto; }
.vitrine-tete { flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.onglets { justify-content: safe center; }
.barre { max-width: 100%; }
.pied .cadre { text-align: center; }
.pied p { margin-left: auto; margin-right: auto; }

/* ---------- Pages fixes de référencement (rubriques, « Prix de... ») ---------- */
.rubriques a {
  flex: 0 0 auto; border-bottom: 3px solid transparent; padding: 11px 10px 9px; font-size: .94rem; font-weight: 600;
  color: var(--gris); text-decoration: none; white-space: nowrap;
}
.rubriques a:hover { color: var(--nuit); }
.rubriques a[aria-current="page"] { color: var(--nuit); border-bottom-color: var(--etiquette-fonce); }
.fil { font-size: .88rem; color: var(--gris); padding-top: 14px; text-align: center; }
.fil a { color: var(--gris); }
.page-fixe .intro { padding-top: 12px; }
.page-fixe .intro p { max-width: 44em; }
.populaires a { font-weight: 600; text-decoration-color: var(--etiquette-fonce); text-underline-offset: 3px; }
h2.section { font-size: 1.2rem; font-weight: 800; margin: 24px 0 10px; text-align: center; }
.voir-plus { text-align: center; margin: 16px 0 0; }
.liens { margin: 30px 0 0; text-align: center; }
.liens h2 { font-size: 1.1rem; font-weight: 800; margin: 18px 0 10px; }
.liens ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.liens li a {
  display: inline-block; padding: 6px 12px; background: var(--surface); border: 1px solid var(--trait); border-radius: 4px;
  text-decoration: none; font-size: .92rem; font-weight: 600;
}
.liens li a:hover { border-color: var(--nuit); }
.plan { padding-top: 10px; border-top: 1px solid var(--trait); margin-top: 36px; }
