/* ==================================================================
   VIZIBOOM — direction artistique des animations commerciales
   ------------------------------------------------------------------
   Fonds colorés, halos, dégradés, cartes lumineuses, animations
   discrètes. Chargé APRÈS style.css, donc ses règles gagnent quand
   elles portent sur les mêmes éléments.

   Aucune règle ici ne s'applique si la classe n'est pas posée : les
   pages existantes ne changent donc pas d'apparence.
   ================================================================== */

/* Palette de la fête : turquoise, violet, rose, orange, jaune, bleu. */
:root {
  --mkt-turquoise: #12d6c0;
  --mkt-violet: #8b5cf6;
  --mkt-rose: #ff4d94;
  --mkt-orange: #ff7a2f;
  --mkt-jaune: #ffc531;
  --mkt-bleu: #2f5bff;
  --mkt-degrade: linear-gradient(110deg, #12d6c0 0%, #2f5bff 28%, #8b5cf6 55%, #ff4d94 78%, #ffc531 100%);
  --mkt-degrade-vif: linear-gradient(120deg, #8b5cf6 0%, #ff4d94 50%, #ff7a2f 100%);
  --mkt-halo: 0 10px 34px rgba(139, 92, 246, .28);
  --mkt-halo-rose: 0 10px 30px rgba(255, 77, 148, .26);
}

/* ------------------------------------------------------------------
   BANDEAU DÉFILANT
   ------------------------------------------------------------------ */
.mkt-ticker {
  position: relative;
  overflow: hidden;
  background: var(--mkt-degrade);
  background-size: 220% 100%;
  animation: mkt-degrade-defile 9s linear infinite;
  border-radius: 14px;
  margin: 0 0 14px;
  box-shadow: var(--mkt-halo);
}
@keyframes mkt-degrade-defile {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.mkt-ticker-track {
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  animation: mkt-defile 34s linear infinite;
}
.mkt-ticker:hover .mkt-ticker-track,
.mkt-ticker:focus-within .mkt-ticker-track { animation-play-state: paused; }
@keyframes mkt-defile {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.mkt-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}
a.mkt-ticker-item:hover { background: rgba(255, 255, 255, .16); }
.mkt-ticker-item .em { font-size: 15px; line-height: 1; }
/* Pas d'animation pour qui l'a désactivée dans son système. */
@media (prefers-reduced-motion: reduce) {
  .mkt-ticker, .mkt-ticker-track { animation: none; }
  .mkt-ticker-track { flex-wrap: wrap; width: auto; }
}

/* ------------------------------------------------------------------
   BLOCS COMMUNS
   ------------------------------------------------------------------ */
.mkt-sec { position: relative; padding: 26px 0 8px; }
.mkt-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 18px; }
.mkt-sec-title {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 18px; font-weight: 900; letter-spacing: -.02em;
  background: var(--mkt-degrade-vif);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.mkt-sec-sub { padding: 0 18px; margin: 6px 0 14px; font-size: 12.5px; color: var(--muted, #6b6b80); }
.mkt-more {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; font-weight: 800; color: var(--mkt-violet);
  text-decoration: none; white-space: nowrap;
}

/* Bouton festif : dégradé, halo, effet au survol */
.mkt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 20px; border: 0; border-radius: 10px;
  background: var(--mkt-degrade-vif); background-size: 160% 100%;
  color: #fff; font-size: 13.5px; font-weight: 800;
  text-decoration: none; cursor: pointer;
  box-shadow: var(--mkt-halo-rose);
  transition: transform .16s ease, box-shadow .16s ease, background-position .4s ease;
}
.mkt-btn:hover { transform: translateY(-1px); background-position: 100% 50%; box-shadow: 0 14px 32px rgba(139, 92, 246, .34); }
.mkt-btn:active { transform: translateY(0); }
.mkt-btn[disabled], .mkt-btn.off { opacity: .55; cursor: not-allowed; transform: none; }
.mkt-btn-big { padding: 13px 30px; font-size: 15px; border-radius: 12px; }

/* ------------------------------------------------------------------
   CARTE PROFESSIONNEL DE LA SEMAINE
   ------------------------------------------------------------------ */
.mkt-semaine {
  position: relative; margin: 8px 18px 0; border-radius: 20px; overflow: hidden;
  background: linear-gradient(160deg, #fff 0%, #f7f4ff 48%, #eefaff 100%);
  box-shadow: 0 14px 42px rgba(139, 92, 246, .2);
  border: 1px solid rgba(139, 92, 246, .18);
}
.mkt-semaine::before {
  content: ''; position: absolute; inset: -40% -20% auto auto; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(255, 197, 49, .5), rgba(255, 77, 148, .18) 55%, transparent 70%);
  filter: blur(6px); pointer-events: none;
}
.mkt-semaine-ph { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.mkt-semaine-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mkt-semaine-couronne {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: linear-gradient(100deg, #ffc531, #ff7a2f);
  color: #4a2a00; font-size: 11px; font-weight: 900; letter-spacing: .04em;
  box-shadow: 0 6px 18px rgba(255, 122, 47, .42);
  animation: mkt-pulse 2.6s ease-in-out infinite;
}
@keyframes mkt-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.045); }
}
.mkt-semaine-bd { position: relative; padding: 14px 16px 16px; }
.mkt-semaine-nm { font-size: 17px; font-weight: 900; margin: 0 0 3px; }
.mkt-semaine-meta { font-size: 12px; color: var(--muted, #6b6b80); display: flex; flex-wrap: wrap; gap: 8px; }
.mkt-semaine-p { margin: 9px 0 13px; font-size: 13px; line-height: 1.5; }
.mkt-semaine-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ------------------------------------------------------------------
   OFFRES FLASH
   ------------------------------------------------------------------ */
.mkt-offres { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 0 18px; }
@media (min-width: 700px) { .mkt-offres { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .mkt-offres { grid-template-columns: repeat(3, 1fr); } }

.mkt-offre {
  position: relative; display: flex; flex-direction: column;
  border-radius: 18px; overflow: hidden; background: #fff;
  border: 1px solid rgba(139, 92, 246, .16);
  box-shadow: 0 8px 26px rgba(47, 91, 255, .1);
  transition: transform .18s ease, box-shadow .18s ease;
}
.mkt-offre:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(139, 92, 246, .22); }
.mkt-offre-ph { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #f2f0ff; }
.mkt-offre-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mkt-offre-flash {
  position: absolute; top: 10px; left: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 999px;
  background: linear-gradient(100deg, #ff4d94, #ff7a2f);
  color: #fff; font-size: 10.5px; font-weight: 900; letter-spacing: .04em;
  box-shadow: 0 5px 16px rgba(255, 77, 148, .45);
}
.mkt-offre-bd { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.mkt-offre-t { font-size: 14.5px; font-weight: 900; margin: 0 0 4px; line-height: 1.3; }
.mkt-offre-pro { font-size: 11.5px; color: var(--muted, #6b6b80); margin: 0 0 8px; }
.mkt-offre-prix { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px; }
.mkt-offre-avant { font-size: 12.5px; color: #9a9aae; text-decoration: line-through; }
.mkt-offre-apres { font-size: 18px; font-weight: 900; color: var(--mkt-violet); }
.mkt-offre-reste {
  display: inline-flex; align-items: center; gap: 5px;
  margin: 0 0 10px; padding: 4px 9px; border-radius: 8px;
  background: rgba(255, 122, 47, .1); color: #c2530f;
  font-size: 11px; font-weight: 800; width: fit-content;
}
.mkt-offre-pied { margin-top: auto; }

/* ------------------------------------------------------------------
   ROUE DE LA CHANCE
   ------------------------------------------------------------------ */
.mkt-roue-zone {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 20px 18px 8px;
}
.mkt-roue-wrap { position: relative; width: min(320px, 82vw); aspect-ratio: 1; }
.mkt-roue {
  position: relative; width: 100%; height: 100%; border-radius: 50%;
  box-shadow: 0 0 0 8px #fff, 0 0 0 14px rgba(139, 92, 246, .16), 0 22px 50px rgba(139, 92, 246, .34);
  transition: transform 4.6s cubic-bezier(.15, .72, .12, 1);
  overflow: hidden;
}
.mkt-roue-seg {
  position: absolute; inset: 0;
  display: flex; align-items: flex-start; justify-content: center;
  /* Le texte est posé à mi-rayon, PAS au bord : près du bord, un segment de
     cercle est trop étroit et coupe le libellé au milieu d'un mot. À 22 %
     du haut, la largeur disponible est bien plus grande. */
  padding-top: 20%;
  font-size: 11px; font-weight: 900; color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
  text-align: center;
  line-height: 1.15;
  overflow: hidden;
}
.mkt-roue-hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 27%; aspect-ratio: 1; border-radius: 50%;
  background: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18); z-index: 3;
  font-size: 10px; font-weight: 900; color: var(--mkt-violet); text-align: center; line-height: 1.1;
}
.mkt-roue-pointeur {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; z-index: 4;
  border-left: 13px solid transparent; border-right: 13px solid transparent;
  border-top: 22px solid var(--mkt-rose);
  filter: drop-shadow(0 4px 8px rgba(255, 77, 148, .5));
}
.mkt-roue-empty {
  width: min(320px, 82vw); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; text-align: center; padding: 24px;
  background: repeating-conic-gradient(from 0deg, #f0edff 0 22deg, #f8f6ff 22deg 44deg);
  color: var(--muted, #6b6b80); font-size: 12.5px; font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(139, 92, 246, .12);
}
.mkt-gain {
  margin: 0 18px; padding: 16px; border-radius: 16px; text-align: center;
  background: linear-gradient(150deg, #fff9e8, #fff);
  border: 1px solid rgba(255, 197, 49, .5);
  box-shadow: 0 10px 28px rgba(255, 197, 49, .22);
}
.mkt-gain-t { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: #a06a00; }
.mkt-gain-v { font-size: 20px; font-weight: 900; margin: 6px 0 4px; }
.mkt-gain-d { font-size: 12.5px; color: var(--muted, #6b6b80); }

/* Légende de la roue : les libellés COMPLETS de chaque lot.
   Sans elle, un libellé raccourci dans un segment serait incompréhensible.
   Deux colonnes sur téléphone, davantage sur grand écran. */
.mkt-legende {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px 14px;
  width: 100%;
  max-width: 420px;
  padding: 0 4px;
}
@media (min-width: 460px) { .mkt-legende { grid-template-columns: 1fr 1fr; } }
.mkt-legende-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink-2, #3a3a52);
}
.mkt-legende-item i {
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 4px;
  display: inline-block;
}

/* Confettis : petits carrés colorés qui tombent */
.mkt-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.mkt-confetti i {
  position: absolute; top: -14px; width: 9px; height: 14px; border-radius: 2px;
  animation: mkt-tombe linear forwards;
}
@keyframes mkt-tombe {
  to { transform: translateY(104vh) rotate(680deg); opacity: .1; }
}

/* ------------------------------------------------------------------
   DÉFI / CLASSEMENT
   ------------------------------------------------------------------ */
.mkt-classement { display: flex; flex-direction: column; gap: 10px; padding: 0 18px; }
.mkt-rang {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px; border-radius: 14px; background: #fff;
  border: 1px solid rgba(47, 91, 255, .1);
  box-shadow: 0 4px 16px rgba(47, 91, 255, .07);
}
.mkt-rang.top1 { border-color: rgba(255, 197, 49, .6); box-shadow: 0 8px 24px rgba(255, 197, 49, .26); }
.mkt-rang.top2 { border-color: rgba(180, 190, 210, .6); }
.mkt-rang.top3 { border-color: rgba(205, 145, 90, .5); }
.mkt-rang-num {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 900;
  background: #f1efff; color: var(--mkt-violet);
}
.mkt-rang.top1 .mkt-rang-num { background: linear-gradient(120deg, #ffc531, #ff7a2f); color: #4a2a00; }
.mkt-rang.top2 .mkt-rang-num { background: #e8ecf5; color: #55607a; }
.mkt-rang.top3 .mkt-rang-num { background: #f7e7d8; color: #8a5326; }
.mkt-rang-ph { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.mkt-rang-bd { flex: 1; min-width: 0; }
.mkt-rang-nm { font-size: 13.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkt-rang-meta { font-size: 11.5px; color: var(--muted, #6b6b80); }
.mkt-rang-v { flex: 0 0 auto; font-size: 13px; font-weight: 900; color: var(--mkt-violet); }

/* ------------------------------------------------------------------
   DIVERS
   ------------------------------------------------------------------ */
.mkt-vide {
  margin: 0 18px; padding: 26px 20px; border-radius: 16px; text-align: center;
  background: linear-gradient(150deg, #f8f6ff, #eefaff);
  border: 1px dashed rgba(139, 92, 246, .3);
}
.mkt-vide-t { font-size: 15px; font-weight: 900; margin-bottom: 6px; }
.mkt-vide-p { font-size: 12.5px; color: var(--muted, #6b6b80); margin: 0; }

.mkt-note {
  margin: 14px 18px 0; padding: 10px 13px; border-radius: 12px;
  background: rgba(18, 214, 192, .08); border-left: 3px solid var(--mkt-turquoise);
  font-size: 11.5px; line-height: 1.5; color: #246b62;
}

/* Sur téléphone : rien ne dépasse, tout reste lisible et empilé */
@media (max-width: 380px) {
  .mkt-ticker-item { font-size: 11px; padding: 10px 16px; }
  .mkt-sec-title { font-size: 16px; }
  .mkt-semaine { margin: 8px 12px 0; }
  .mkt-offres, .mkt-classement, .mkt-gain, .mkt-vide { padding-left: 12px; padding-right: 12px; }
  .mkt-gain { margin: 0 12px; }
  .mkt-btn-big { padding: 11px 20px; font-size: 14px; }
}

/* ==================================================================
   BANDEAU DÉFILANT DES PROFESSIONNELS (accueil)
   ==================================================================
   Vitrine permanente : les fiches défilent en continu. Dégradé lumineux,
   vignettes arrondies, photo + nom + activité + ville + note.
   Au survol : le défilement s'arrête pour laisser lire et cliquer.
   Sur téléphone : même bandeau, vignettes plus compactes, rien de coupé.
   ================================================================== */
/* ------------------------------------------------------------------
   BANDEAU DÉFILANT DES PROFESSIONNELS — VERSION PREMIUM
   ------------------------------------------------------------------
   Vitrine commerciale permanente de l'accueil : vignettes larges avec
   photo mise en valeur, nom, activité, ville, téléphone cliquable et
   bouton « Voir la fiche ». Les COUP DE CŒUR portent un liseré doré et
   passent devant (tri fait côté serveur).

   TÉLÉPHONE D'ABORD : les vignettes gardent une taille confortable mais
   le bandeau ne déborde jamais. Aucun défilement horizontal de page.
   ------------------------------------------------------------------ */
.vzbpro {
  /* Grand bandeau : il sort du padding de .wrap (18px) pour occuper toute
     la largeur de l'écran. « overflow: hidden » empêche tout débordement
     horizontal de la page, même quand la piste est plus large que l'écran. */
  position: relative;
  margin: 0 -18px 22px;
  padding: 46px 0 26px;
  overflow: hidden;
  border-radius: 0;
  /* CIEL DE NUIT D'HIVER : bleu profond vers le prune, avec une lueur
     chaude au ras du sol (les lumières du quai). Les couleurs VIZIBOOM
     (bleu, violet, rose, or) restent présentes dans la lueur et les
     guirlandes, mais le fond est nocturne : c'est ce qui donne la
     profondeur et fait ressortir la locomotive éclairée. */
  background:
    radial-gradient(ellipse 120% 60% at 50% 118%, rgba(255, 176, 64, .38) 0%, rgba(255, 120, 60, .12) 45%, transparent 72%),
    radial-gradient(ellipse 90% 50% at 18% -10%, rgba(139, 92, 246, .5) 0%, transparent 62%),
    radial-gradient(ellipse 80% 50% at 82% -6%, rgba(47, 91, 255, .42) 0%, transparent 60%),
    linear-gradient(178deg, #070b26 0%, #0d1338 42%, #171a4a 74%, #241a3f 100%);
  box-shadow: 0 12px 32px rgba(7, 11, 38, .45);
}

/* LA NEIGE : deux couches de flocons de tailles differentes, qui tombent
   en continu. Deux vitesses donnent la profondeur. Purement decoratif. */
.vzbpro::before,
.vzbpro::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -100%;
  height: 200%;
  pointer-events: none;
  z-index: 1;
}
.vzbpro::before {
  background-image:
    radial-gradient(2.2px 2.2px at 20px 30px, #fff, transparent),
    radial-gradient(2.2px 2.2px at 130px 90px, rgba(255,255,255,.85), transparent),
    radial-gradient(2.2px 2.2px at 250px 20px, #fff, transparent),
    radial-gradient(2.2px 2.2px at 330px 120px, rgba(255,255,255,.8), transparent),
    radial-gradient(2.2px 2.2px at 420px 60px, #fff, transparent);
  background-size: 460px 170px;
  animation: vzbtrain-neige 14s linear infinite;
}
.vzbpro::after {
  background-image:
    radial-gradient(3.6px 3.6px at 70px 40px, rgba(255,255,255,.95), transparent),
    radial-gradient(3.6px 3.6px at 210px 130px, rgba(255,255,255,.8), transparent),
    radial-gradient(3.6px 3.6px at 360px 70px, rgba(255,255,255,.9), transparent);
  background-size: 520px 210px;
  animation: vzbtrain-neige 9s linear infinite;
}
@keyframes vzbtrain-neige {
  from { transform: translateY(0); }
  to   { transform: translateY(50%); }
}

/* LE RAIL : deux bandes d'acier et des traverses, posé au sol du bandeau.
   Il donne au train une assise : sans lui, la locomotive flotte. */
.vzbtrain-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  height: 14px;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(200, 210, 235, .55) 0 2px, transparent 2px),
    repeating-linear-gradient(90deg,
      rgba(120, 90, 60, .8) 0 9px,
      transparent 9px 30px);
  box-shadow: 0 -6px 18px rgba(255, 190, 90, .22);
}

/* L'INSCRIPTION LUMINEUSE — « Bonne année 2027 » et la marque, en lettres
   éclairées. Placée AU-DESSUS du convoi, jamais devant les photos. */
.vzbtrain-fete {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 0 0 10px;
  pointer-events: none;
  text-align: center;
}
.vzbtrain-fete-annee {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1.1;
  text-transform: uppercase;
  /* Dégradé lumineux sur le texte : chaque lettre prend une couleur
     différente de la palette, et l'ensemble brille. */
  background: linear-gradient(92deg, #ffd34d 0%, #ff8a4c 22%, #ff5c9e 44%, #c084fc 66%, #60a5fa 86%, #4ade80 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 200, 90, .75)) drop-shadow(0 0 22px rgba(255, 120, 180, .45));
  animation: vzbtrain-lueur 5s ease-in-out infinite;
}
.vzbtrain-fete-marque {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: #fff6d8;
  text-shadow: 0 0 8px rgba(255, 210, 110, .95), 0 0 20px rgba(255, 160, 60, .6);
}
@keyframes vzbtrain-lueur {
  0%, 100% { background-position: 0% 50%; filter: drop-shadow(0 0 8px rgba(255, 200, 90, .6)) drop-shadow(0 0 18px rgba(255, 120, 180, .35)); }
  50%      { background-position: 100% 50%; filter: drop-shadow(0 0 14px rgba(255, 220, 120, .95)) drop-shadow(0 0 30px rgba(255, 120, 180, .6)); }
}
.vzbpro-track {
  display: flex;
  align-items: stretch;
  /* PAS de gap ni de padding sur la piste : l'espacement est porté par la
     marge droite de chaque vignette. C'est ce qui rend la boucle invisible.
     Avec un gap, la largeur totale ne serait pas exactement le double d'une
     moitié (il reste la gouttière entre les deux moitiés), et -50 % ne
     retomberait pas pile au début de la seconde : on verrait un micro-saut
     à chaque tour. Avec la marge, une moitié vaut exactement n × (largeur +
     écart). */
  gap: 0;
  width: max-content;
  padding: 0;
  /* Durée calculée par le serveur selon le nombre de fiches, pour que
     l'allure reste la même avec 1 fiche ou avec 12. Le repli de 60 s ne
     sert que si la variable n'est pas transmise. L'animation ne s'arrête
     JAMAIS faute de fiches : elle tourne en permanence. */
  animation: vzbpro-defile var(--vzbpro-duree, 60s) linear infinite;
  will-change: transform;
}
.vzbpro:hover .vzbpro-track,
.vzbpro:focus-within .vzbpro-track { animation-play-state: paused; }
@keyframes vzbpro-defile {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* L'ÉCART QUI GARANTIT QU'ON NE VOIT JAMAIS DEUX FOIS LE MÊME PROFESSIONNEL
   ------------------------------------------------------------------
   La piste est dupliquée en deux moitiés identiques et glisse de -50 % : la
   boucle est invisible, sans saut ni coupure, quel que soit le nombre de
   fiches (une seule comprise).

   RÈGLE ABSOLUE : une même fiche ne doit jamais être visible deux fois en
   même temps. Les deux copies d'un professionnel sont séparées par une
   moitié entière de piste. On impose donc à chaque moitié de faire AU MOINS
   la largeur de l'écran : l'écart se dilate automatiquement quand il y a peu
   de fiches.

       écart = max(12px, 100vw / n − largeur d'une vignette)

   Avec 1 fiche sur un écran de 1 280 px : 1 280 − 300 = 980 px d'écart, donc
   les deux copies sont séparées de 1 280 px — un écran entier. Impossible de
   les voir ensemble. Avec 8 fiches, l'écart retombe à 12 px : le bandeau est
   dense, comme prévu.

   La variable --vzbpro-n est posée par le serveur (nombre de fiches d'une
   moitié), --vzbpro-w porte la largeur d'une vignette et change sur
   téléphone. */
.vzbpro {
  /* Valeurs de repli si le serveur n'a rien transmis (page gardée en cache
     d'une ancienne version). Le style posé en ligne par le serveur l'emporte
     toujours sur ces valeurs : c'est lui qui calcule l'écart réel. */
  --vzbpro-ecart: 12px;
  --vzbpro-duree: 60s;
  --vzbpro-ecart-m: 10px;
  --vzbpro-duree-m: 40s;
  --vzbpro-total: 312px;
  --vzbpro-total-m: 272px;
}

/* ------------------------------------------------------------------
   PEU DE FICHES : UNE SEULE COPIE, DÉRIVE DOUCE, JAMAIS DE DOUBLON
   ------------------------------------------------------------------
   Avec une à quatre fiches, deux solutions sont mauvaises :
     - répéter le contenu  → le même professionnel apparaît deux fois à
       l'écran, c'est le doublon que le client a vu ;
     - écarter énormément les copies pour les séparer → un grand vide
       s'affiche entre deux passages, et la vignette se retrouve coupée
       d'un côté (constaté sur la capture).

   On garde donc UNE SEULE copie de chaque fiche, centrée, qui ondule
   doucement de gauche à droite. Le bandeau est visiblement animé, la
   vignette reste toujours entière, et aucun professionnel n'apparaît
   deux fois. Le dégradé animé du fond continue de tourner : même immobile
   en apparence, le bandeau n'est jamais figé.
   Les deux copies réapparaissent dès qu'il y a assez de fiches pour
   remplir l'écran (classe data-doux absente). */
.vzbpro[data-doux] .vzbpro-track {
  animation-name: vzbpro-traverse;
  animation-direction: alternate;
  animation-timing-function: ease-in-out;
  /* Alignée à gauche : le trajet va de « collée à gauche » à « collée à
     droite ». La première vignette est donc visible dès le départ, et la
     dernière l'est à l'arrivée. Rien ne reste hors du cadre. */
  margin-left: 0;
  margin-right: 0;
}
/* TRAJET CALCULÉ SUR LA LARGEUR RÉELLE.
   Le serveur transmet la largeur exacte du contenu (--vzbpro-total). Le
   trajet vaut donc : largeur de l'écran MOINS cette largeur.
   - Une seule fiche de 312 px sur un écran de 1 280 px : 968 px de course,
     la vignette traverse vraiment l'écran.
   - Quatre fiches sur un téléphone de 375 px : le total dépasse l'écran, le
     trajet devient négatif et les vignettes défilent vers la gauche, sans
     fin, en aller-retour.
   Dans les deux cas la vignette reste ENTIÈRE : elle n'est jamais coupée. */
@keyframes vzbpro-traverse {
  from { margin-left: 0; }
  to   { margin-left: calc(100% - var(--vzbpro-total, 312px)); }
}

/* ------------------------------------------------------------------
   LA LOCOMOTIVE DE NOËL 3D
   ------------------------------------------------------------------
   Elle ouvre le convoi : une vraie locomotive de prestige rendue en 3D,
   image détourée placée dans la piste. Sa largeur est comptée par le
   serveur dans la durée et dans le trajet — sinon la boucle se décalerait
   d'une locomotive et le train apparaîtrait coupé au raccord.

   Autour d'elle, trois animations légères : la vapeur qui s'échappe de la
   cheminée, les guirlandes qui scintillent, et un halo doré qui la détache
   du fond. Elle est décorative : masquée aux lecteurs d'écran.
   ------------------------------------------------------------------ */
.vzbpro-loco {
  position: relative;
  flex: 0 0 auto;
  width: 210px;
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  margin: 0 var(--vzbpro-ecart, 12px) 0 0;
  padding-bottom: 6px;
}

/* L'image 3D : elle tangue très légèrement, comme une locomotive sur ses
   rails. Le mouvement est minimal pour ne pas donner mal à la tête. */
.vzbpro-loco-3d {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 14px 24px rgba(12, 6, 30, .5));
  animation: vzbtrain-tangage 3.4s ease-in-out infinite;
}
@keyframes vzbtrain-tangage {
  0%, 100% { transform: rotate(-.5deg) translateY(0); }
  50%      { transform: rotate(.5deg) translateY(-2px); }
}

/* Le halo chaud derrière la locomotive : la détache du ciel de nuit. */
.vzbpro-loco-halo {
  position: absolute;
  left: 50%;
  bottom: 12%;
  width: 150%;
  height: 90%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center,
    rgba(255, 214, 120, .42) 0%,
    rgba(255, 150, 60, .18) 42%,
    transparent 72%);
  filter: blur(12px);
  pointer-events: none;
  z-index: 1;
  animation: vzbtrain-halo 4.2s ease-in-out infinite;
}
@keyframes vzbtrain-halo {
  0%, 100% { opacity: .75; }
  50%      { opacity: 1; }
}

/* LA VAPEUR : quatre bouffées qui s'échappent de la cheminée, montent et
   se dispersent. Décalées dans le temps pour un panache continu. */
.vzbpro-vapeur {
  position: absolute;
  left: 16%;
  top: 6%;
  width: 90%;
  height: 120%;
  pointer-events: none;
  z-index: 3;
}
.vzbpro-vapeur i {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #fff 0%, rgba(255, 255, 255, .7) 45%, rgba(255, 255, 255, 0) 72%);
  opacity: 0;
  animation: vzbtrain-vapeur 5.2s linear infinite;
}
.vzbpro-vapeur i:nth-child(2) { animation-delay: 1.3s; }
.vzbpro-vapeur i:nth-child(3) { animation-delay: 2.6s; }
.vzbpro-vapeur i:nth-child(4) { animation-delay: 3.9s; }
@keyframes vzbtrain-vapeur {
  0%   { transform: translate(0, 0) scale(.5); opacity: 0; }
  12%  { opacity: .9; }
  55%  { opacity: .55; }
  100% { transform: translate(-46px, -78px) scale(2.1); opacity: 0; }
}

/* LES GUIRLANDES : huit points lumineux répartis le long de la chaudière,
   qui scintillent chacun à leur rythme. */
.vzbpro-guirlande {
  position: absolute;
  left: 6%;
  top: 24%;
  width: 88%;
  height: 46%;
  pointer-events: none;
  z-index: 4;
}
.vzbpro-guirlande i {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  animation: vzbtrain-scintille 1.9s ease-in-out infinite;
}
.vzbpro-guirlande i:nth-child(1) { left: 2%;  top: 18%; background: #ffd34d; box-shadow: 0 0 9px 3px rgba(255, 211, 77, .9); animation-delay: 0s; }
.vzbpro-guirlande i:nth-child(2) { left: 15%; top: 62%; background: #4ade80; box-shadow: 0 0 9px 3px rgba(74, 222, 128, .85); animation-delay: .24s; }
.vzbpro-guirlande i:nth-child(3) { left: 28%; top: 12%; background: #ff6b6b; box-shadow: 0 0 9px 3px rgba(255, 107, 107, .85); animation-delay: .48s; }
.vzbpro-guirlande i:nth-child(4) { left: 41%; top: 66%; background: #60a5fa; box-shadow: 0 0 9px 3px rgba(96, 165, 250, .85); animation-delay: .72s; }
.vzbpro-guirlande i:nth-child(5) { left: 54%; top: 14%; background: #ffd34d; box-shadow: 0 0 9px 3px rgba(255, 211, 77, .9); animation-delay: .96s; }
.vzbpro-guirlande i:nth-child(6) { left: 67%; top: 60%; background: #c084fc; box-shadow: 0 0 9px 3px rgba(192, 132, 252, .85); animation-delay: 1.2s; }
.vzbpro-guirlande i:nth-child(7) { left: 80%; top: 16%; background: #4ade80; box-shadow: 0 0 9px 3px rgba(74, 222, 128, .85); animation-delay: 1.44s; }
.vzbpro-guirlande i:nth-child(8) { left: 92%; top: 58%; background: #ff6b6b; box-shadow: 0 0 9px 3px rgba(255, 107, 107, .85); animation-delay: 1.68s; }
@keyframes vzbtrain-scintille {
  0%, 100% { opacity: .45; transform: scale(.8); }
  50%      { opacity: 1;   transform: scale(1.25); }
}

/* La plaque de la marque, sous la locomotive. */
.vzbpro-loco-marque {
  position: relative;
  z-index: 5;
  margin-top: 4px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .18em;
  color: #fff8d6;
  text-transform: uppercase;
  line-height: 1.1;
  text-shadow: 0 1px 8px rgba(255, 190, 60, .9), 0 0 2px rgba(60, 30, 0, .8);
}

/* ------------------------------------------------------------------
   LES WAGONS — accrochés les uns aux autres derrière la locomotive
   ------------------------------------------------------------------
   La vignette : GRAND FORMAT VERTICAL — la photo en haut sur toute la
   largeur, les informations en dessous. La piste aligne les vignettes les
   unes sur les autres (align-items: stretch), donc elles gardent toutes la
   même hauteur : celle de la plus remplie. Aucun texte n'est jamais coupé.

   Le wagon garde sa forme arrondie mais perd son arrondi à gauche quand il
   suit la locomotive : c'est ce qui donne l'impression d'un convoi attaché
   plutôt que de cartes posées côte à côte.
   ------------------------------------------------------------------ */
.vzbpro-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  flex: 0 0 auto;
  width: 300px;
  min-height: 275px;
  /* L'espacement vit ICI et pas sur la piste : c'est ce qui garantit que
     la moitié de piste mesure exactement n × (largeur + écart), et que la
     translation de -50 % retombe pile sur le début de la seconde moitié.
     La boucle est donc invisible, sans micro-saut.
     L'écart est CALCULÉ (voir --vzbpro-ecart plus haut) : il s'élargit quand
     il y a peu de fiches, pour que deux copies du même professionnel ne
     puissent jamais être visibles en même temps. */
  margin: 0 var(--vzbpro-ecart) 0 0;
  padding: 0;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(10, 12, 40, .16);
  transition: transform .18s ease, box-shadow .18s ease;
}
.vzbpro-item:hover,
.vzbpro-item:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(10, 12, 40, .24);
}

/* COUP DE CŒUR : liseré doré élégant, la carte ressort nettement. */
.vzbpro-item.is-coeur {
  background: linear-gradient(180deg, #fffdf5, #fff);
  box-shadow: 0 4px 16px rgba(180, 130, 10, .3), inset 0 0 0 2px #f0b429;
}
.vzbpro-item.is-coeur:hover,
.vzbpro-item.is-coeur:focus-within {
  box-shadow: 0 14px 30px rgba(180, 130, 10, .42), inset 0 0 0 2px #f0b429;
}

/* LE WAGON 3D : la carrosserie de Noël, et la vraie photo du professionnel
   posée DANS sa fenêtre. Le cadre ci-dessous reprend exactement les
   coordonnées de la fenêtre relevées dans l'image (13,4 % / 20,7 % /
   74,2 % / 53,7 %), pour que la photo tombe pile dans l'ouverture sans
   déborder sur la carrosserie. Rien n'est inventé : si la fiche n'a pas de
   photo, la fenêtre reste sombre et vide. */
.vzbpro-ph {
  width: 100%;
  height: auto;
  flex: 0 0 auto;
  display: block;
  padding: 2px 4px 0;
  background: none;
  overflow: visible;
  text-decoration: none;
}
.vzbpro-wagon {
  position: relative;
  display: block;
  width: 100%;
}
.vzbpro-wagon-3d {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 18px rgba(12, 6, 30, .38));
  transition: transform .3s ease;
}
.vzbpro-item:hover .vzbpro-wagon-3d { transform: scale(1.03); }
.vzbpro-wagon-fen {
  position: absolute;
  left: 13.4%;
  top: 20.7%;
  width: 74.2%;
  height: 53.7%;
  overflow: hidden;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #17102b;
  box-shadow: inset 0 0 14px rgba(0, 0, 0, .8);
}
.vzbpro-wagon-fen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.vzbpro-item:hover .vzbpro-wagon-fen img { transform: scale(1.07); }
.vzbpro-wagon-fen.is-vide { color: #6c7099; }
.vzbpro-vide { color: #8b95c9; display: flex; }

.vzbpro-txt {
  display: flex;
  flex-direction: column;
  gap: 5px;
  line-height: 1.3;
  min-width: 0;
  flex: 1;
  padding: 13px 14px 14px;
  justify-content: flex-start;
}
/* Le nom : plus grand, sur deux lignes autorisées. Un nom long n'est plus
   tronqué par des points de suspension, il passe simplement à la ligne. */
.vzbpro-nm {
  font-size: 16px;
  font-weight: 800;
  color: #15162b;
  text-decoration: none;
  line-height: 1.25;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.vzbpro-nm:hover { color: #2f5bff; }
.vzbpro-coeur {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: none;
  font-size: 8.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #7a5600;
  background: #fde68a;
  border-radius: 5px;
  padding: 2px 5px;
}
/* Activité et ville : deux lignes autorisées, texte plus grand. */
.vzbpro-meta {
  font-size: 13px;
  color: #5b6079;
  display: block;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.vzbpro-meta b { color: #15162b; }

/* Téléphone : appel direct au doigt, bien lisible. */
.vzbpro-tel {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 800;
  color: #2f5bff;
  text-decoration: none;
  margin-top: 2px;
  max-width: 100%;
}
.vzbpro-tel span { overflow: hidden; text-overflow: ellipsis; }
.vzbpro-tel:hover { text-decoration: underline; }

/* Bouton « Voir la fiche » : pleine largeur de la vignette, en bas,
   poussé par margin-top auto pour que tous les boutons s'alignent. */
.vzbpro-cta {
  display: block;
  margin-top: auto;
  align-self: stretch;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(100deg, #2f5bff, #8b5cf6);
  padding: 9px 14px;
  border-radius: 10px;
  line-height: 1.4;
  transition: filter .16s ease;
}
.vzbpro-cta:hover { filter: brightness(1.12); }
.vzbpro-item.is-coeur .vzbpro-cta {
  background: linear-gradient(100deg, #b8860b, #f0b429);
  color: #241a00;
}

/* Téléphone : vignettes de 262 px, photo plus basse, rien ne déborde.
   L'écart et la durée passent sur les valeurs MOBILES calculées par le
   serveur : sur un écran étroit, une moitié de 2 560 px mettrait trop
   longtemps à défiler. */
@media (max-width: 560px) {
  .vzbpro {
    margin: 0 -18px 16px;
    padding: 14px 0;
    border-radius: 0;
    /* L'écart et la largeur totale du contenu passent sur les valeurs
       MOBILES calculées par le serveur : une vignette de 262 px sur un
       écran de 375 px n'a pas la largeur d'une vignette d'ordinateur. */
    --vzbpro-ecart: var(--vzbpro-ecart-m, 10px);
    --vzbpro-total: var(--vzbpro-total-m, 272px);
  }
  .vzbpro-track {
    gap: 0;
    padding: 0;
    animation-duration: var(--vzbpro-duree-m, 40s);
  }
  .vzbpro-item { width: 240px; min-height: 0; margin: 0 var(--vzbpro-ecart) 0 0; }
  /* Sur téléphone le convoi doit tenir dans la largeur : locomotive 150 px
     + wagon 240 px = 390 px, juste la largeur d'un écran de 390. Le wagon
     n'est donc jamais coupé au bord. Ces valeurs sont comptées par le
     serveur dans --vzbpro-total-m : les changer ici sans changer là-bas
     ferait sortir le train du cadre. */
  .vzbpro-loco { width: 150px; padding-bottom: 4px; }
  .vzbpro-loco-marque { font-size: 9px; letter-spacing: .14em; }
  .vzbpro-vapeur i { width: 20px; height: 20px; }
  .vzbpro-guirlande i { width: 6px; height: 6px; }
  .vzbpro-txt { padding: 11px 12px 12px; gap: 4px; }
  .vzbpro-nm { font-size: 15px; }
  .vzbpro-meta { font-size: 12px; }
  .vzbpro-tel { font-size: 12.5px; }
  .vzbpro-cta { font-size: 12.5px; padding: 8px 12px; }
}
@media (max-width: 380px) {
  .vzbpro-track { gap: 0; }
  .vzbpro-item { width: 262px; margin: 0 var(--vzbpro-ecart) 0 0; }
  .vzbpro-loco { width: 165px; }
}
/* Le défilement ne s'arrête plus jamais faute de fiches : ces règles ne
   servaient qu'à figer le bandeau quand il y avait moins de quatre
   professionnels. Elles sont supprimées du rendu (aucune classe
   « is-statique » n'est plus posée), mais on garde une règle de secours
   pour les navigateurs qui auraient une page en cache de l'ancienne
   version : le bandeau y resterait glissable au doigt. */
.vzbpro[data-secours] { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Respect de la préférence système : plus de défilement automatique. */
@media (prefers-reduced-motion: reduce) {
  .vzbpro, .vzbpro-track { animation: none; }
  .vzbpro { overflow-x: auto; }
  .vzbpro-track { transform: none; }
}
