/* ==========================================================================
   ETM VITRINE — habillage des blocs catalogue
   --------------------------------------------------------------------------
   Reprend les variables d'etm-habillage.css quand elles existent, et fournit
   ses propres valeurs de repli pour rester autonome.
   Pour changer les couleurs : redéfinissez --etmv-navy et --etmv-orange
   dans le style.css de votre thème enfant, après ce fichier.
   ========================================================================== */

.etmv,
.etmv-bloc {
  --etmv-navy: var(--etm-navy, #222752);
  --etmv-navy-clair: var(--etm-navy-clair, #2e3568);
  --etmv-orange: var(--etm-orange, #e84622);
  --etmv-orange-fonce: #c93816;
  --etmv-encre: #1c1f2e;
  --etmv-gris: #6a7084;
  --etmv-trait: #e2e5ee;
  --etmv-fond: #ffffff;
  --etmv-fond-doux: #f6f7fb;
  --etmv-rayon: 10px;
  --etmv-ombre: 0 1px 2px rgba(34, 39, 82, .06), 0 8px 24px rgba(34, 39, 82, .07);
  --etmv-ombre-forte: 0 4px 10px rgba(34, 39, 82, .1), 0 16px 40px rgba(34, 39, 82, .12);
  --etmv-colonnes: 4;
}

.etmv-bloc {
  margin: 0 0 48px;
  color: var(--etmv-encre);
  font-size: 15px;
  line-height: 1.55;
}

.etmv-bloc *,
.etmv-bloc *::before,
.etmv-bloc *::after { box-sizing: border-box; }

/* ------------------------------------------------------------------ entête */

.etmv-entete { margin: 0 0 24px; }

.etmv-entete__titre {
  margin: 0;
  color: var(--etmv-navy);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
}

.etmv-entete__titre::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 12px;
  border-radius: 2px;
  background: var(--etmv-orange);
}

.etmv-entete__sous-titre {
  margin: 12px 0 0;
  max-width: 62ch;
  color: var(--etmv-gris);
}

/* ------------------------------------------------------------------ grille */

.etmv-grille {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(var(--etmv-colonnes), minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .etmv-grille { grid-template-columns: repeat(min(var(--etmv-colonnes), 3), minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .etmv-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 480px) {
  .etmv-grille { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------- carte */

.etmv-carte {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--etmv-fond);
  border: 1px solid var(--etmv-trait);
  border-radius: var(--etmv-rayon);
  box-shadow: var(--etmv-ombre);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.etmv-carte:hover,
.etmv-carte:focus-within {
  transform: translateY(-3px);
  border-color: rgba(34, 39, 82, .18);
  box-shadow: var(--etmv-ombre-forte);
}

.etmv-carte__lien { display: block; text-decoration: none; }

.etmv-carte__visuel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  background: var(--etmv-fond-doux);
  overflow: hidden;
}

.etmv-carte__visuel .etmv-carte__img,
.etmv-carte__visuel img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
  mix-blend-mode: multiply;
}

/* Sans photo, on affiche la référence : c'est ce que cherche l'acheteur. */
.etmv-carte__visuel--ref {
  flex-direction: column;
  gap: 4px;
  background:
    linear-gradient(135deg, rgba(34, 39, 82, .05), rgba(34, 39, 82, 0) 60%),
    repeating-linear-gradient(45deg, #f2f4f9 0 10px, #eef0f7 10px 20px);
}

.etmv-carte__ref-mot {
  color: var(--etmv-gris);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.etmv-carte__ref-val {
  max-width: 92%;
  color: var(--etmv-navy);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 700;
  letter-spacing: .02em;
  text-align: center;
  overflow-wrap: anywhere;
}

.etmv-carte__corps {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.etmv-carte__meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 0;
  overflow: hidden;
  font-size: 12.5px;
  white-space: nowrap;
}

.etmv-carte__categorie {
  min-width: 0;
  overflow: hidden;
  color: var(--etmv-gris);
  text-overflow: ellipsis;
}

.etmv-carte__marque {
  flex: 0 0 auto;
  color: var(--etmv-orange-fonce);
  font-weight: 650;
}

.etmv-carte__titre {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
}

.etmv-carte__titre a {
  color: var(--etmv-navy);
  text-decoration: none;
}

.etmv-carte__titre a:hover,
.etmv-carte__titre a:focus { color: var(--etmv-orange); }

.etmv-carte__sku,
.etmv-carte__compat {
  margin: 0;
  color: var(--etmv-gris);
  font-size: 13px;
}

.etmv-carte__sku code {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--etmv-fond-doux);
  color: var(--etmv-encre);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.etmv-carte__compat {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.etmv-carte__pied {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--etmv-trait);
}

/* ---------------------------------------------------------------- pastille */

.etmv-pastille {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.etmv-pastille::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.etmv-pastille--stock { color: #1a7f4b; }
.etmv-pastille--commande { color: var(--etmv-gris); }

/* ----------------------------------------------------------------- boutons */

.etmv-bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--etmv-orange);
  color: #fff !important;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none !important;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.etmv-bouton:hover,
.etmv-bouton:focus-visible { background: var(--etmv-orange-fonce) !important; color: #fff !important; }

.etmv-bouton:focus-visible { outline: 2px solid var(--etmv-navy); outline-offset: 2px; }

.etmv-bouton--secondaire {
  background: transparent !important;
  border-color: var(--etmv-navy);
  color: var(--etmv-navy) !important;
}

.etmv-bouton--secondaire:hover,
.etmv-bouton--secondaire:focus-visible {
  background: var(--etmv-navy) !important;
  color: #fff !important;
}

.etmv-bouton--principal { background: var(--etmv-navy) !important; }
.etmv-bouton--principal:hover { background: var(--etmv-navy-clair) !important; }

.etmv-bouton--compact { padding: 7px 12px; font-size: 13px; }

.etmv-bouton--devis.est-charge { opacity: .7; pointer-events: none; }
.etmv-bouton--devis.est-ok { background: #1a7f4b !important; }
.etmv-bouton--devis.est-erreur { background: #b32d2e !important; }

.etmv-tout { margin: 24px 0 0; text-align: center; }

/* ---------------------------------------------------------------- onglets */

.etmv-onglets__barre {
  display: flex;
  gap: 6px;
  margin: 0 0 20px;
  padding-bottom: 2px;
  border-bottom: 2px solid var(--etmv-trait);
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.etmv-onglets__bouton {
  position: relative;
  flex: 0 0 auto;
  padding: 11px 16px;
  border: 0;
  border-radius: 8px 8px 0 0;
  margin-bottom: -2px;
  background: transparent;
  color: var(--etmv-gris);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .15s ease, background-color .15s ease;
}

.etmv-onglets__bouton::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: -2px;
  left: 12px;
  height: 3px;
  border-radius: 2px;
  background: transparent;
  transition: background-color .15s ease;
}

.etmv-onglets__bouton:hover { color: var(--etmv-navy); background: var(--etmv-fond-doux); }
.etmv-onglets__bouton.est-actif { color: var(--etmv-navy); }
.etmv-onglets__bouton.est-actif::after { background: var(--etmv-orange); }
.etmv-onglets__bouton:focus-visible { outline: 2px solid var(--etmv-navy); outline-offset: -2px; }

.etmv-onglets__compte {
  display: inline-block;
  min-width: 20px;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(34, 39, 82, .08);
  font-size: 11px;
  font-weight: 700;
}

.etmv-onglets__panneau[hidden] { display: none; }

/* -------------------------------------------------------------- carrousel */

.etmv-carrousel { position: relative; }

.etmv-carrousel__piste {
  display: grid;
  grid-auto-columns: calc((100% - (var(--etmv-colonnes) - 1) * 20px) / var(--etmv-colonnes));
  grid-auto-flow: column;
  gap: 20px;
  padding: 4px 2px 6px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.etmv-carrousel__piste::-webkit-scrollbar { width: 0; height: 0; display: none; }

.etmv-carrousel__piste:focus-visible { outline: 2px solid var(--etmv-navy); outline-offset: 4px; }

.etmv-carrousel__item { scroll-snap-align: start; min-width: 0; }
.etmv-carrousel__item > .etmv-carte { height: 100%; }

.etmv-carrousel.est-attrape .etmv-carrousel__piste {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
  user-select: none;
}

.etmv-carrousel__tete {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.etmv-carrousel__tete .etmv-entete { margin-bottom: 0; }
.etmv-carrousel__tete--nue { justify-content: flex-end; margin-bottom: 14px; }

.etmv-carrousel__fleches { display: flex; flex: 0 0 auto; gap: 8px; }

.etmv-carrousel__fleche {
  display: flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--etmv-trait);
  border-radius: 50%;
  background: #fff;
  color: var(--etmv-navy);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.etmv-carrousel__fleche:hover { border-color: var(--etmv-navy); background: var(--etmv-navy); color: #fff; }
.etmv-carrousel__fleche[disabled] { opacity: .35; cursor: default; pointer-events: none; }

@media (max-width: 1100px) {
  .etmv-carrousel__piste { grid-auto-columns: calc((100% - 2 * 20px) / 2.4); }
}

@media (max-width: 640px) {
  .etmv-carrousel__piste { grid-auto-columns: 78%; gap: 14px; }
  .etmv-carrousel__tete { align-items: center; }
  .etmv-carrousel__fleches { display: none; }
}

/* ---------------------------------------------------------------- tableau */

.etmv-tableau__cadre {
  border: 1px solid var(--etmv-trait);
  border-radius: var(--etmv-rayon);
  background: #fff;
  box-shadow: var(--etmv-ombre);
  overflow-x: auto;
}

.etmv-tableau {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  font-size: 14px;
}

.etmv-tableau thead th {
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--etmv-trait);
  background: var(--etmv-navy);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.etmv-tableau__ligne:nth-child(even) { background: var(--etmv-fond-doux); }
.etmv-tableau__ligne:hover { background: rgba(232, 70, 34, .05); }

.etmv-tableau__cel {
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--etmv-trait);
  vertical-align: middle;
}

.etmv-tableau__ligne:last-child .etmv-tableau__cel { border-bottom: 0; }

.etmv-tableau__cel--ref code {
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(34, 39, 82, .07);
  color: var(--etmv-navy);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.etmv-tableau__cel--nom a {
  color: var(--etmv-navy);
  font-weight: 600;
  text-decoration: none;
}

.etmv-tableau__cel--nom a:hover { color: var(--etmv-orange); }

.etmv-tableau__cel--compat { max-width: 280px; color: var(--etmv-gris); }
.etmv-tableau__cel--action { text-align: right; white-space: nowrap; }

@media (max-width: 820px) {
  .etmv-tableau,
  .etmv-tableau tbody,
  .etmv-tableau__ligne,
  .etmv-tableau__cel { display: block; width: 100%; }

  .etmv-tableau thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

  .etmv-tableau__ligne {
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid var(--etmv-trait);
    border-radius: 8px;
    background: #fff;
  }

  .etmv-tableau__cel {
    display: flex;
    gap: 12px;
    align-items: baseline;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed var(--etmv-trait);
    text-align: right;
  }

  .etmv-tableau__cel::before {
    content: attr(data-etmv-libelle);
    flex: 0 0 auto;
    color: var(--etmv-gris);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  .etmv-tableau__cel--action { border-bottom: 0; padding-top: 10px; }
  .etmv-tableau__cel--action .etmv-bouton { width: 100%; }
  .etmv-tableau__cel--compat { max-width: none; }
}

/* -------------------------------------------------------------- recherche */

.etmv-bloc--recherche .etmv-recherche {
  padding: 22px;
  border: 1px solid var(--etmv-trait);
  border-radius: var(--etmv-rayon);
  background: linear-gradient(180deg, var(--etmv-fond-doux), #fff);
  box-shadow: var(--etmv-ombre);
}

.etmv-recherche__champs {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  align-items: end;
}

.etmv-recherche__champ { margin: 0; }

.etmv-recherche__champ label {
  display: block;
  margin-bottom: 6px;
  color: var(--etmv-navy);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.etmv-recherche__champ select {
  width: 100%;
  height: 44px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--etmv-trait);
  border-radius: 8px;
  background-color: #fff;
  background-image: linear-gradient(45deg, transparent 50%, var(--etmv-navy) 50%), linear-gradient(135deg, var(--etmv-navy) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  color: var(--etmv-encre);
  font: inherit;
  font-size: 14px;
  -webkit-appearance: none;
  appearance: none;
}

.etmv-recherche__champ select:disabled { background-color: var(--etmv-fond-doux); color: var(--etmv-gris); }
.etmv-recherche__champ select:focus-visible { outline: 2px solid var(--etmv-orange); outline-offset: 1px; }

.etmv-recherche__champ--action .etmv-bouton { width: 100%; height: 44px; }

.etmv-recherche__aide { margin: 14px 0 0; color: var(--etmv-gris); font-size: 13px; }

.etmv-recherche__resultats { margin-top: 24px; }
.etmv-recherche__resultats.est-charge { opacity: .5; transition: opacity .15s ease; }

.etmv-recherche__compte {
  margin: 0 0 14px;
  color: var(--etmv-navy);
  font-size: 15px;
  font-weight: 600;
}

.etmv-recherche__rien {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--etmv-trait);
  border-radius: 8px;
  background: var(--etmv-fond-doux);
  color: var(--etmv-gris);
}

/* ---------------------------------------------------------------- marques */

.etmv-marques {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.etmv-marques__item { margin: 0; }

.etmv-marques__lien {
  display: flex;
  height: 100%;
  min-height: 92px;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  border: 1px solid var(--etmv-trait);
  border-radius: var(--etmv-rayon);
  background: #fff;
  color: var(--etmv-navy);
  text-align: center;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.etmv-marques__lien:hover {
  transform: translateY(-2px);
  border-color: var(--etmv-orange);
  box-shadow: var(--etmv-ombre);
}

.etmv-marques__logo { max-width: 120px; height: auto; max-height: 44px; object-fit: contain; }

.etmv-marques__texte {
  color: var(--etmv-navy);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.etmv-marques__compte { color: var(--etmv-gris); font-size: 12px; }

/* ------------------------------------------------------------- utilitaires */

.etmv-vide {
  padding: 14px 16px;
  border: 1px dashed #d63638;
  border-radius: 8px;
  background: #fef7f7;
  color: #b32d2e;
  font-size: 14px;
}

.etmv-annonce {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  max-width: 320px;
  padding: 13px 18px;
  border-radius: 10px;
  background: var(--etm-navy, #222752);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .22);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease;
}

.etmv-annonce.est-visible { opacity: 1; transform: translateY(0); }
.etmv-annonce--erreur { background: #b32d2e; }

@media (prefers-reduced-motion: reduce) {
  .etmv-carte,
  .etmv-marques__lien,
  .etmv-annonce { transition: none; }
  .etmv-carte:hover { transform: none; }
  .etmv-carrousel__piste { scroll-behavior: auto; }
}

/* ==========================================================================
   RECHERCHE DE HEADER
   Barre visible sur grand écran, loupe qui ouvre un panneau sur mobile.
   ========================================================================== */

.etmv-rh {
  --etmv-navy: var(--etm-navy, #222752);
  --etmv-orange: var(--etm-orange, #e84622);
  --etmv-encre: #1c1f2e;
  --etmv-gris: #6a7084;
  --etmv-trait: #e2e5ee;
  --etmv-fond-doux: #f6f7fb;

  position: relative;
  width: 100%;
  max-width: 560px;
  color: var(--etmv-encre);
  font-size: 15px;
}

.etmv-rh *,
.etmv-rh *::before,
.etmv-rh *::after { box-sizing: border-box; }

.etmv-rh__loupe,
.etmv-rh__fermer { display: none; }

/* --------------------------------------------------------------- la barre */

.etmv-rh__form { position: relative; margin: 0; }

.etmv-rh__barre {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 46px;
  padding: 0 6px 0 12px;
  border: 1px solid var(--etmv-trait);
  border-radius: 999px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.etmv-rh__form:focus-within .etmv-rh__barre {
  border-color: var(--etmv-navy);
  box-shadow: 0 0 0 3px rgba(34, 39, 82, .1);
}

.etmv-rh__icone {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--etmv-gris);
  stroke-linecap: round;
  stroke-width: 2;
}

.etmv-rh__champ {
  min-width: 0;
  flex: 1 1 auto;
  height: 100%;
  padding: 0 4px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--etmv-encre);
  font: inherit;
  font-size: 15px;
  outline: none;
}

.etmv-rh__champ::placeholder { color: var(--etmv-gris); opacity: 1; }
.etmv-rh__champ::-webkit-search-cancel-button { display: none; }

.etmv-rh__vider {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--etmv-fond-doux);
  color: var(--etmv-gris);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.etmv-rh__vider:hover { background: #e8eaf2; color: var(--etmv-encre); }

.etmv-rh__filtres {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--etmv-trait);
  border-radius: 999px;
  background: #fff;
  color: var(--etmv-navy);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.etmv-rh__filtres:hover,
.etmv-rh__filtres[aria-expanded="true"] { border-color: var(--etmv-navy); background: var(--etmv-fond-doux); }

.etmv-rh__badge {
  display: none;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--etmv-orange);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.etmv-rh__badge.est-actif { display: inline-block; }

.etmv-rh__envoi {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--etmv-orange);
  color: #fff !important;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.etmv-rh__envoi:hover { background: #c93816; }

.etmv-rh--compact .etmv-rh__barre { height: 40px; }
.etmv-rh--compact .etmv-rh__filtres-texte { display: none; }
.etmv-rh--compact .etmv-rh__envoi { padding: 0 12px; }

/* ------------------------------------------------------ panneau de filtres */

.etmv-rh__panneau {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 60;
  padding: 18px;
  border: 1px solid var(--etmv-trait);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(34, 39, 82, .16);
}

.etmv-rh__panneau[hidden] { display: none; }

.etmv-rh__champs {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}

.etmv-rh__groupe-champ { margin: 0; }

.etmv-rh__groupe-champ label {
  display: block;
  margin-bottom: 5px;
  color: var(--etmv-navy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.etmv-rh__groupe-champ select {
  width: 100%;
  height: 40px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--etmv-trait);
  border-radius: 8px;
  background-color: #fff;
  background-image: linear-gradient(45deg, transparent 50%, var(--etmv-navy) 50%), linear-gradient(135deg, var(--etmv-navy) 50%, transparent 50%);
  background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  font: inherit;
  font-size: 14px;
  -webkit-appearance: none;
  appearance: none;
}

.etmv-rh__groupe-champ select:disabled { background-color: var(--etmv-fond-doux); color: var(--etmv-gris); }

.etmv-rh__pied {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--etmv-trait);
}

.etmv-rh__case {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  color: var(--etmv-encre);
  cursor: pointer;
  font-size: 14px;
}

.etmv-rh__case input { width: 16px; height: 16px; margin: 0; accent-color: var(--etmv-orange); }

.etmv-rh__actions { display: inline-flex; gap: 10px; align-items: center; }

.etmv-rh__raz {
  border: 0;
  background: none;
  color: var(--etmv-gris);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
}

.etmv-rh__raz:hover { color: var(--etmv-orange); }

/* ------------------------------------------------------------ suggestions */

.etmv-rh__suggestions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 55;
  max-height: min(70vh, 460px);
  border: 1px solid var(--etmv-trait);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(34, 39, 82, .16);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.etmv-rh__suggestions[hidden] { display: none; }

.etmv-rh__liste { margin: 0; padding: 6px; list-style: none; }

.etmv-rh__groupe {
  padding: 10px 10px 4px;
  color: var(--etmv-gris);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.etmv-rh__item { margin: 0; }

.etmv-rh__lien {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

.etmv-rh__item.est-survol .etmv-rh__lien,
.etmv-rh__lien:hover,
.etmv-rh__lien:focus { background: var(--etmv-fond-doux); }

.etmv-rh__ref {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(34, 39, 82, .08);
  color: var(--etmv-navy);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.etmv-rh__texte { min-width: 0; flex: 1 1 auto; }

.etmv-rh__nom {
  display: block;
  overflow: hidden;
  color: var(--etmv-encre);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.etmv-rh__compat {
  display: block;
  overflow: hidden;
  color: var(--etmv-gris);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.etmv-rh__dispo,
.etmv-rh__compte {
  flex: 0 0 auto;
  color: var(--etmv-gris);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.etmv-rh__dispo.est-stock { color: #1a7f4b; }

.etmv-rh mark { padding: 0; background: rgba(232, 70, 34, .18); color: inherit; font-weight: 700; }

.etmv-rh__rien { margin: 0; padding: 18px; color: var(--etmv-gris); font-size: 14px; }

.etmv-rh__voile { display: none; }

/* --------------------------------------------------------------- mobile */

@media (max-width: 900px) {
  .etmv-rh { width: auto; }

  .etmv-rh__loupe {
    display: flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--etmv-trait);
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
  }

  .etmv-rh__loupe svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--etmv-navy);
    stroke-linecap: round;
    stroke-width: 2;
  }

  .etmv-rh__form {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100000;
    padding: 12px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .16);
    transform: translateY(-110%);
    transition: transform .22s ease;
  }

  .etmv-rh.est-ouvert .etmv-rh__form { transform: translateY(0); }

  .etmv-rh__barre { height: 44px; border-radius: 10px; }
  .etmv-rh__filtres-texte { display: none; }
  .etmv-rh__envoi-texte { display: none; }

  .etmv-rh__envoi {
    width: 34px;
    padding: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.5' y1='16.5' x2='21' y2='21'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 17px;
  }

  .etmv-rh__fermer {
    display: block;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--etmv-gris);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
  }

  .etmv-rh__panneau,
  .etmv-rh__suggestions {
    position: static;
    margin-top: 10px;
    box-shadow: none;
  }

  .etmv-rh__suggestions { max-height: calc(100vh - 150px); }

  .etmv-rh.est-ouvert .etmv-rh__voile {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 99999;
    display: block;
    background: rgba(18, 20, 34, .5);
  }
}

@media (prefers-reduced-motion: reduce) {
  .etmv-rh__form { transition: none; }
}

/* ==========================================================================
   COMPATIBILITÉ THÈME
   Hello Elementor, ElementsKit et Element Pack déclarent des règles sur
   button, input et [hidden] qui écrasent celles du plugin. Ce bloc est
   volontairement placé en fin de fichier et utilise !important : c'est la
   seule façon fiable de reprendre la main sans connaître la spécificité
   exacte des règles du thème.
   ========================================================================== */

/* L'attribut hidden doit toujours l'emporter : sans cela, le bouton
   « effacer » et le panneau de filtres restent visibles au chargement. */
.etmv [hidden],
.etmv-rh [hidden],
.etmv-rh__panneau[hidden],
.etmv-rh__suggestions[hidden],
.etmv-onglets__panneau[hidden] { display: none !important; }

/* Loupe et croix de fermeture : mobile uniquement. */
.etmv-rh__loupe,
.etmv-rh__fermer { display: none !important; }

.etmv-rh__barre { display: flex !important; }

.etmv-rh__barre button,
.etmv-rh__barre input {
  flex: 0 0 auto;
  min-width: 0;
  margin: 0 !important;
  box-shadow: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: 1.2 !important;
}

.etmv-rh__champ {
  flex: 1 1 auto !important;
  width: auto !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 4px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--etmv-encre) !important;
  font-size: 15px !important;
}

.etmv-rh__vider {
  width: 26px !important;
  height: 26px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: var(--etmv-fond-doux) !important;
  color: var(--etmv-gris) !important;
  font-size: 18px !important;
}

.etmv-rh__filtres {
  height: 34px !important;
  padding: 0 12px !important;
  border: 1px solid var(--etmv-trait) !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: var(--etmv-navy) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

.etmv-rh__filtres:hover,
.etmv-rh__filtres[aria-expanded="true"] { background: var(--etmv-fond-doux) !important; }

.etmv-rh__envoi {
  height: 34px !important;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--etmv-orange) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

.etmv-rh__envoi:hover { background: #c93816 !important; }

.etmv-rh__badge {
  display: none !important;
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 5px !important;
  border-radius: 999px !important;
  background: var(--etmv-orange) !important;
  color: #fff !important;
  font-size: 11px !important;
  line-height: 18px !important;
}

.etmv-rh__badge.est-actif { display: inline-block !important; }

.etmv-rh__icone {
  width: 19px !important;
  height: 19px !important;
  fill: none !important;
  stroke: var(--etmv-gris) !important;
}

/* Boutons des cartes et des tableaux : même reprise en main. */
.etmv .etmv-bouton,
.etmv-bloc .etmv-bouton {
  border-radius: 8px !important;
  box-shadow: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

.etmv-bloc .etmv-bouton--secondaire { background: transparent !important; color: var(--etmv-navy) !important; }
.etmv-bloc .etmv-bouton--secondaire:hover { background: var(--etmv-navy) !important; color: #fff !important; }

/* Les sélecteurs des panneaux ne doivent pas hériter des styles de champ
   du thème, qui imposent souvent une hauteur et une flèche différentes. */
.etmv-rh__groupe-champ select,
.etmv-recherche__champ select {
  height: 40px !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.etmv-recherche__champ select { height: 44px !important; }

@media (max-width: 900px) {
  .etmv-rh__loupe { display: flex !important; }
  .etmv-rh__fermer { display: block !important; }
  .etmv-rh__filtres-texte,
  .etmv-rh__envoi-texte { display: none !important; }
}

/* --------------------------------------------------------------------------
   Boutons des cartes et des tableaux : le thème supprime le fond et il ne
   reste qu'un cadre vide avec du texte blanc. On reprend la main sur les
   trois propriétés concernées.
   -------------------------------------------------------------------------- */

.etmv .etmv-bouton,
.etmv-bloc .etmv-bouton,
.etmv-carte .etmv-bouton,
.etmv-tableau .etmv-bouton,
.etmv-recherche .etmv-bouton {
  border: 1px solid transparent !important;
  background: var(--etmv-orange) !important;
  background-image: none !important;
  color: #fff !important;
  opacity: 1 !important;
}

.etmv .etmv-bouton:hover,
.etmv-bloc .etmv-bouton:hover { background: var(--etmv-orange-fonce) !important; }

.etmv-bloc .etmv-bouton--secondaire,
.etmv-bloc .etmv-bouton--secondaire:hover { border-color: var(--etmv-navy) !important; }
.etmv-bloc .etmv-bouton--secondaire { background: transparent !important; color: var(--etmv-navy) !important; }
.etmv-bloc .etmv-bouton--secondaire:hover { background: var(--etmv-navy) !important; color: #fff !important; }

.etmv-bloc .etmv-bouton--principal { background: var(--etmv-navy) !important; }
.etmv-bloc .etmv-bouton--principal:hover { background: var(--etmv-navy-clair) !important; }

.etmv-bloc .etmv-bouton--devis.est-ok { background: #1a7f4b !important; }
.etmv-bloc .etmv-bouton--devis.est-erreur { background: #b32d2e !important; }

.etmv-bouton__texte {
  display: inline !important;
  color: inherit !important;
  font: inherit !important;
}

/* Flèches du carrousel : fond blanc, pas orange. */
.etmv-bloc .etmv-carrousel__fleche,
.etmv .etmv-carrousel__fleche {
  background: #fff !important;
  background-image: none !important;
  border: 1px solid var(--etmv-trait) !important;
  color: var(--etmv-navy) !important;
  box-shadow: none !important;
}

.etmv-bloc .etmv-carrousel__fleche:hover {
  background: var(--etmv-navy) !important;
  border-color: var(--etmv-navy) !important;
  color: #fff !important;
}

/* Boutons d'onglets : le thème leur ajoute parfois un fond plein. */
.etmv-bloc .etmv-onglets__bouton {
  background: transparent !important;
  border: 0 !important;
  color: var(--etmv-gris) !important;
  box-shadow: none !important;
}

.etmv-bloc .etmv-onglets__bouton.est-actif,
.etmv-bloc .etmv-onglets__bouton:hover { color: var(--etmv-navy) !important; }
.etmv-bloc .etmv-onglets__bouton:hover { background: var(--etmv-fond-doux) !important; }
