/* =========================================================
   PRIXDUBARIL.COM — Module Brent / WTI 
   =========================================================
   Conventions :
     .pdb-tv          → Module tabs TradingView
     .pdb-row         → Wrapper 2 modules côte à côte
     .pdb-module      → Module de cotation (Brent ou WTI)
       --brent / --wti  → Modifiers de variante
   ========================================================= */

:root{
  --pdb-bg-1:#f8fafc;
  --pdb-bg-2:#eef2f7;
  --pdb-text:#0f172a;
  --pdb-muted:#64748b;
  --pdb-muted-2:#94a3b8;
  --pdb-border:rgba(255,255,255,.8);
  --pdb-up:#059669;
  --pdb-down:#dc2626;
}

/* =========================================================
   1. MODULE TABS TRADINGVIEW
   ========================================================= */
.pdb-tv{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:0;
  overflow:hidden;
  box-shadow:0 4px 20px -8px rgba(15,23,42,.1);
  border-bottom:none;
  border-top:none;
  margin:0; /* full-width comme .pdb-mod / .pdb-carburants (pas de max-width) */
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  box-sizing:border-box !important;
}
.pdb-tv__header{
  display:flex;
  align-items:stretch;
  /*background:linear-gradient(180deg,#e2e8f0 0%,#eef2f7 60%,#f8fafc 100%);*/
  background: linear-gradient(rgb(1, 57, 113) 0%, rgb(1, 45, 90) 100%);
  /*border-bottom:1px solid #cbd5e1;*/
  border-bottom: 1px solid #012e5c;
}
.pdb-tv__title{
  flex:1;
  display:flex;
  align-items:center;
  padding:0 clamp(10px, 2.5vw, 14px);
  font-size:clamp(11px, 2.8vw, 13px);
  font-weight:600;
  /*color:#475569;*/
  color: #cddefc;
  gap:8px;
  min-width:0;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.pdb-tv__title svg{
  width:clamp(14px, 3.5vw, 16px);
  height:clamp(14px, 3.5vw, 16px);
  /*color:#94a3b8;*/
  color: #f23645;
  flex-shrink:0;
}
.pdb-tv__title-short{display:none}
.pdb-tv__tabs{display:flex;flex-shrink:0}
.pdb-tv__tab{
  position:relative;
  display:flex;
  align-items:center;
  gap:6px;
  margin:0;
  padding:clamp(10px, 2.5vw, 14px) clamp(14px, 3.5vw, 22px);
  font-size:clamp(11px, 2.8vw, 13px);
  font-weight:700;
  color:#94a3b8;
  background:transparent;
  border:none;
  cursor:pointer;
  transition:color .2s,background .2s;
  letter-spacing:.04em;
  white-space:nowrap;
  border-radius:0;
  text-transform:uppercase;
  font-family:inherit;
  -webkit-tap-highlight-color:transparent;
}
.pdb-tv__tab:hover{color:#475569;background:rgba(0,0,0,.02)}
.pdb-tv__flag{font-size:1.1em;line-height:1}
.pdb-tv__tab.is-active{color:#0f172a;background:#fff}
.pdb-tv__tab::after{
  content:"";
  position:absolute;
  left:0;right:0;bottom:-1px;
  height:3px;
  background:transparent;
  transition:background .2s;
}
.pdb-tv__tab[data-pdb-v="brent"].is-active{color:#1e40af}
.pdb-tv__tab[data-pdb-v="brent"].is-active::after{background:linear-gradient(90deg,#1e40af,#1e3a8a)}
.pdb-tv__tab[data-pdb-v="wti"].is-active{color:#013971}
.pdb-tv__tab[data-pdb-v="wti"].is-active::after{background:linear-gradient(90deg,#013971,#001f3d)}

.pdb-tv__tab.is-syncing::before{
  content:"";
  position:absolute;
  inset:0;
  border:2px solid currentColor;
  opacity:.3;
  animation:pdb-tv-syncpulse .6s ease-out;
  pointer-events:none;
}
@keyframes pdb-tv-syncpulse{
  0%{opacity:.5}
  100%{opacity:0}
}

.pdb-tv__bodies{
  position:relative;
  background:#fff;
  min-height:clamp(280px, 50vw, 380px);
}
.pdb-tv__body{
  position:absolute;
  inset:0;
  opacity:0;
  visibility:hidden;
  transition:opacity .3s ease;
  display:flex;
  flex-direction:column;
}
.pdb-tv__body.is-active{opacity:1;visibility:visible}
.pdb-tv__body[data-pdb-v="brent"]{background:linear-gradient(180deg,rgba(30,64,175,.02),#fff)}
.pdb-tv__body[data-pdb-v="wti"]{background:linear-gradient(180deg,rgba(1,57,113,.02),#fff)}
.pdb-tv__body > div{flex:1;min-height:0;width:100%}

@media(max-width:540px){
  .pdb-tv__title{font-size:11px;letter-spacing:.02em}
  .pdb-tv__title-long{display:none}
  .pdb-tv__title-short{display:inline}
  .pdb-tv__tab{padding:10px 14px;font-size:11px}
  .pdb-tv__bodies{min-height:280px}
}

.pdb-header__live{
  display:flex;
  align-items:center;
  gap:5px;
  font-size:clamp(8.5px, 2.4vw, 10px);
  font-weight:700;
  color:#fff;
  background:rgba(255,255,255,.15);
  padding:3px 7px;
  border-radius:999px;
  letter-spacing:.05em;
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
  flex-shrink:0;
}
.pdb-header__dot{
  width:5px;height:5px;
  background:#fca5a5;
  border-radius:50%;
  animation:pdb-dot-pulse 1.6s ease-in-out infinite;
  box-shadow:0 0 6px rgba(252,165,165,.8);
}
@keyframes pdb-dot-pulse{
  0%,100%{opacity:1;transform:scale(1)}
  50%{opacity:.5;transform:scale(1.3)}
}


/* ===== Utilitaire accessibilité ===== */
.pdb-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* Stat EUR mobile — masquée sur desktop, affichée dans le gros module en mobile uniquement */
.pdb-stat--eur-mobile{display:none}

/* ===== Barre range + cursor (RÉUTILISÉS PAR LE HERO pour la fourchette journalière)
   Ne pas supprimer même si le module bas ne les utilise plus. ===== */
.pdb-range__bar{
  position:relative;
  height:4px;
  background:linear-gradient(90deg,
    rgba(220,38,38,.18),
    rgba(148,163,184,.2) 50%,
    rgba(5,150,105,.18));
  border-radius:999px;
  margin:clamp(4px,1.2vw,7px) 0 3px;
}
.pdb-range__cursor{
  position:absolute;
  top:-2.5px;
  width:9px;height:9px;
  background:var(--pdb-text);
  border:1.5px solid #fff;
  border-radius:50%;
  box-shadow:0 1px 3px rgba(0,0,0,.2);
  transform:translateX(-50%);
  transition:left .4s ease;
  animation:pdb-cursor-pulse 4s ease-in-out infinite;
}
@keyframes pdb-cursor-pulse{
  0%,100%{box-shadow:0 0 0 0px rgba(var(--pdb-accent-rgb),.45),0 1px 3px rgba(0,0,0,.22)}
  50%{box-shadow:0 0 0 5px rgba(var(--pdb-accent-rgb),.08),0 1px 3px rgba(0,0,0,.18)}
}
/* Marquee */
.pdb-marquee{
  margin-top:clamp(5px, 1.6vw, 13px);
  padding:6px 0;
  border-top:1px dashed rgba(100,116,139,.25);
  overflow:hidden;
  width:100%;
  min-width:0;
  display:flex;
  text-align:left;
  mask-image:linear-gradient(90deg,transparent 0,#000 6%,#000 94%,transparent 100%);
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 6%,#000 94%,transparent 100%);
}
.pdb-marquee__track{
  display:flex;
  flex-shrink:0;
  white-space:nowrap;
  animation:pdb-slide 18s linear infinite;
}
.pdb-marquee__track > a{
  font-size:clamp(9.5px, 2.6vw, 11px);
  font-weight:500;
  color:#475569;
  text-decoration:none;
  white-space:nowrap;
  padding-right:48px;
  display:inline-block;
}
.pdb-marquee__track > a:hover{color:var(--pdb-text)}
@keyframes pdb-slide{
  0%{transform:translateX(0)}
  100%{transform:translateX(-50%)}
}
.pdb-marquee:hover .pdb-marquee__track{animation-play-state:paused}

/* ===== Barre Actu (pdb-news) ===== */
.pdb-news{
  /* Accu est lié au Brent — variables d'accent fixées ici car hors .pdb-module */
  --pdb-accent:#1e40af;
  --pdb-accent-rgb:30,64,175;
  --pdb-accent-d:#1e3a8a;
  display:flex;align-items:stretch;
  margin-top:6px;
  background:#fff;
  border:1px solid rgba(100,116,139,.18);
  border-radius:8px;
  overflow:hidden;
}
.pdb-news__badge{
  flex-shrink:0;
  display:inline-flex;align-items:center;gap:8px;
  padding:0 clamp(10px,2.5vw,14px);
  background:linear-gradient(#e2e8f0 0%,#cbd5e1 100%);
  color:#013060;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  font-size:clamp(11px,2.8vw,13px);font-weight:600;letter-spacing:.04em;text-transform:uppercase;
  white-space:nowrap;
}
.pdb-news__badge svg{
  width:clamp(14px,3.5vw,16px);height:clamp(14px,3.5vw,16px);
  color:#2962ff;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;
  flex-shrink:0;
  transform:translateY(-1px);
}
/* Marquee à l'intérieur du pdb-news : fade gauche (rentre dans le badge) + fade droite */
.pdb-news .pdb-marquee{
  flex:1;min-width:0;margin:0;padding:5px 0;
  border-top:none;
  mask-image:linear-gradient(90deg,transparent 0%,#000 8%,#000 92%,transparent 100%);
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 8%,#000 92%,transparent 100%);
}

.pdb-marquee__cta{color:#3b82f6;font-weight:600}
.pdb-marquee__cta--une{color:#ff6b35}
/* ===== Mobile : optimisation compacte (700px et moins) ===== */
@media(max-width:700px){
  .pdb-marquee{margin-top:5px;padding:5px 0}
  .pdb-marquee__track > a{font-size:10px;padding-right:36px}
}
/* =========================================================
   5. HERO PAGETOP PRICES — "Cours du pétrole"
   Scoping : les classes partagées avec §3 (pdb-header__live,
   pdb-header__dot, pdb-range__*) sont qualifiées .pdb-hero
   pour éviter tout conflit avec les modules Brent/WTI.
   ========================================================= */

/* === Wrapper === */
.pdb-hero{
  margin:0; /* full-width comme .pdb-mod / .pdb-carburants (pas de max-width) */
  border-radius:14px 14px 0 0;
  overflow:visible;   /* tooltips peuvent déborder (fusion de l'ancien 2e bloc .pdb-hero) */
  position:relative;
  z-index:10;
  background:#fff;
  border:1px solid #e2e8f0;
  border-bottom:1px solid #cbd5e1;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  color:#0f172a;
}

/* === Header === */
.pdb-hero-head{
  margin: 0 !important;
  padding: 5px 10px !important;
  /*background:linear-gradient(180deg,#f8fafc 0%,#eef2f7 100%);*/
  background: linear-gradient(rgb(1, 57, 113) 0%, rgb(1, 45, 90) 100%) !important;
  border-bottom:1px solid #cbd5e1;
  border-radius:14px 14px 0 0;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  gap:0px !important;
}
.pdb-hero-head-title-wrap{
  display:flex;
  align-items:center;
  gap:7px;
  justify-self:start;
  min-width:0;
}
.pdb-hero-head-icon{
  width:16px;height:16px;
  display:inline-flex;align-items:center;justify-content:center;
  color:#f55f28;
  flex-shrink:0;
}
.pdb-hero-head-icon svg{width:100%;height:100%;display:block}
.pdb-hero-head-title{
  margin:0 !important;
  padding:0 !important;
  background:none !important;
  border:none !important;
  box-shadow:none !important;
  font-size:13px;
  font-weight:700;
  /*color:#0f172a;*/
  color: #cddefc;
  text-transform:uppercase;
  letter-spacing:.05em;
  line-height:1;
}
.pdb-hero-head-date{
  justify-self:center;
  font-size:11px;
  /*color:#64748b;*/
  color: #e6ecff;
  font-style:normal;
  white-space:nowrap;
}

/* Badge EN DIRECT — surcharge scoped du §3 (blanc sur bleu → rouge sur fond clair) */
.pdb-hero .pdb-header__live{
  justify-self:end;
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-size:10px;
  font-weight:700;
  /*color:#79a0c6;*/
  text-transform:uppercase;
  letter-spacing:.06em;
  padding:4px 9px;
  /*background:rgb(255 255 255 / 72%);*/
  color: #d0f2fd;
  background: #002c58;

  border:1px solid rgb(38 154 220 / 18%);
  border-radius:999px;
  line-height:1;
}
.pdb-hero .pdb-header__dot{
  width:6px;height:6px;
  border-radius:50%;
  background:#dc2626;
  animation:pdb-pulse 1.6s ease-in-out infinite;
  display:inline-block;
}
@keyframes pdb-pulse{
  0%,100%{opacity:1;transform:scale(1)}
  50%{opacity:.4;transform:scale(.7)}
}

/* === Liste des cours === */
.pdb-hero-list{
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
}
.pdb-hero-item{border-top:1px solid #e2e8f0}
.pdb-hero-item:first-child{border-top:none}
.pdb-hero-item--brent{background:#fff}
.pdb-hero-item--wti{background:#f8fafc}

/* Layout 3 colonnes × 2 rows :
   - Row 1 : nom | prix | range (range étendu sur 2 rows)
   - Row 2 : nom (étendu) | variation | range (étendu)
   Prix pile au centre du hero, variation alignée à gauche du prix. */
.pdb-hero-item-link{
  display:grid;
  /* minmax(0,1fr) (et non 1fr=minmax(auto,1fr)) : les colonnes latérales peuvent
     passer sous leur min-content et se partagent l'espace à parts égales → la colonne
     auto du prix reste pile au centre, quelle que soit la largeur du bloc variation. */
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  column-gap:6px;
  row-gap:1px;
  padding:10px 14px;
  text-decoration:none !important;
  color:inherit !important;
  transition:background .2s;
  position:relative;
}
.pdb-hero-item-link::before{
  content:"";
  position:absolute;
  left:0;top:0;bottom:0;
  width:3px;
  background:transparent;
  transition:background .2s,width .2s;
}
.pdb-hero-item--brent .pdb-hero-item-link::before{background:#1e40af}
.pdb-hero-item--wti   .pdb-hero-item-link::before{background:#001f3d}
/* Couleur d'accent pour l'animation pulse du curseur range
   (héritée par .pdb-hero .pdb-range__cursor via la cascade) */
.pdb-hero-item--brent{--pdb-accent-rgb:30,64,175}
.pdb-hero-item--wti  {--pdb-accent-rgb:1,57,113}
.pdb-hero-item-link:hover::before,
.pdb-hero-item-link:focus-visible::before{width:5px}
.pdb-hero-item--brent .pdb-hero-item-link:hover,
.pdb-hero-item--brent .pdb-hero-item-link:focus-visible{background:rgba(30,64,175,.04);outline:none}
.pdb-hero-item--wti   .pdb-hero-item-link:hover,
.pdb-hero-item--wti   .pdb-hero-item-link:focus-visible{background:rgba(0,31,61,.04);outline:none}

/* Col 1 — nom + description (étendu sur les 2 rows) */
.pdb-hero-item-term{
  grid-column:1;
  grid-row:1 / span 2;
  align-self:center;
  justify-self:start;
  display:flex;
  flex-direction:column;
  margin:0;
  font-weight:normal;
  min-width:0;
}
.pdb-hero-item-name{
  font-size:18px;
  font-weight:700;
  color:#0f172a;
  line-height:1.1;
  letter-spacing:-.2px;
}
.pdb-hero-item-desc{
  font-size:10px;
  font-weight:600;
  color:#64748b;
  text-transform:uppercase;
  letter-spacing:.04em;
  margin-top:4px;
}

/* Col 2 row 1 — prix $ pile au centre du hero
   position:relative pour ancrer le €  */
.pdb-hero-item-prices{
  grid-column:2;
  grid-row:1;
  align-self:center;
  justify-self:center;
  text-align:center;
  display:block;
  position:relative;
  white-space:nowrap;
}
.pdb-hero-item-price{
  font-size:28px;
  font-weight:700;
  color:#0f172a;
  line-height:1;
  font-variant-numeric:tabular-nums;
  letter-spacing:-.6px;
}
.pdb-hero-item-price-currency{
  font-size:14px;
  color:#94a3b8;
  font-weight:500;
  margin-left:2px;
}
/* € sur la row 2, centré sous le prix $ (depuis le retrait du cluster range — cf. PDB_HERO_RANGE_ENABLED) */
/* Pilule € : baril (clair) + litre (navy) — placée en cellule grille col 2 / row 2 sous le prix.
   Masquée ≤680px (cf. media query). margin-top:9px = espacement sous le prix. */
.pdb-hero-item-price-eur{
  grid-column:2;
  grid-row:2;
  justify-self:center;
  align-self:start;
  margin-top:0px;
  display:inline-flex;
  align-items:center;
  /* PAS d'overflow:hidden ici : il couperait les tooltips (::after au-dessus).
     Les coins arrondis du pill sont portés par les segments d'extrémité. */
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.pdb-hero-eur__seg{padding:0px 10px;font-size:12px}
.pdb-hero-eur__seg b{font-weight:700}
.pdb-hero-eur__unit{font-size:12px}
.pdb-hero-eur__seg--baril{background:#e9edf2;border-radius:999px 0 0 999px}
.pdb-hero-eur__seg--baril b{color:#16253f}
.pdb-hero-eur__seg--baril .pdb-hero-eur__unit{color:#9aa3b2}
.pdb-hero-eur__seg--litre{background:#15335f;border-radius:0 999px 999px 0}
.pdb-hero-eur__seg--litre b{color:#fff}
.pdb-hero-eur__seg--litre .pdb-hero-eur__unit{color:#9fb4d8}
/* Wrapper transparent : libère .pdb-hero-item-trend et .pdb-range
   pour qu'ils deviennent des cellules directes du grid parent */
.pdb-hero-item-data{
  display:contents;
}
/* Variation $ + % : col 3, MÊME ligne que le prix $ (row 1) → alignée sur le prix.
   Le prix reste pile au centre du hero (col 2 auto entre deux 1fr). */
.pdb-hero-item-trend{
  grid-column:3;
  grid-row:1;
  justify-self:stretch;
  align-self:center;
  width:auto;
  overflow:visible;
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}
/* Sparkline intraday — poussée au bord droit de la ligne (comble le vide laissé par la range) */
.pdb-hero-spark{
  margin-left:auto;
  display:flex;
  align-items:center;
  flex-shrink:0;
}
.pdb-hero-spark-svg{
  height:30px;
  width:auto;
  display:block;
  overflow:visible;
}

/* Pilules variation */
.pdb-hero-pill{
  display:inline-flex;
  align-items:center;
  gap:3px;
  padding:3px 9px;
  border-radius:12px;
  font-size:15px;
  font-weight:700;
  line-height:1;
  font-variant-numeric:tabular-nums;
  border:1px solid transparent;
}
.pdb-hero-pill--down{background:rgba(220,38,38,.1);color:#dc2626;border-color:rgba(220,38,38,.2)}
.pdb-hero-pill--up{background:rgba(34,197,94,.1);color:#22c55e;border-color:rgba(34,197,94,.2)}
.pdb-hero-pill--stable{background:rgba(100,116,139,.1);color:#64748b;border-color:rgba(100,116,139,.2)}
.pdb-hero-pill-arrow{font-size:9px;line-height:1}
.pdb-hero-pill-cur{font-weight:500}
.pdb-hero-pct{font-size:13px;font-weight:500;font-variant-numeric:tabular-nums;line-height:1}
.pdb-hero-pct--down{color:#dc2626}
.pdb-hero-pct--up{color:#22c55e}
.pdb-hero-pct--stable{color:#64748b}

/* Barre de range — col 3, étendue sur les 2 rows, calée à droite.
   Largeur fluide (140-200px) pour s'adapter au container parent. */
.pdb-hero .pdb-range{
  grid-column:3;
  grid-row:1 / span 2;
  align-self:center;
  justify-self:end;
  width:100%;
  min-width:140px;
  max-width:200px;
  display:flex;
  flex-direction:column;
  gap:4px;
  border-top:none;
  margin-top:0;
  padding-top:0;
  text-align:inherit;
}

/* Hero — span "Ouverture · X $" au-dessus de la barre range journalière.
   La version générique .pdb-range__open n'existe plus depuis la refonte du module bas. */
.pdb-hero .pdb-range__open{display:block;font-size:9px;color:#94a3b8;font-weight:500;margin-bottom:0;white-space:nowrap;font-variant-numeric:tabular-nums}
.pdb-hero .pdb-range__open b{color:#0f172a;font-weight:700;font-variant-numeric:tabular-nums}
.pdb-range__meter{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
.pdb-hero .pdb-range__bar{
  width:100%;
  height:7px;
  background:linear-gradient(90deg,#fecaca 0%,#fde68a 50%,#bbf7d0 100%);
  border-radius:999px;
  position:relative;
}
.pdb-hero .pdb-range__cursor{
  position:absolute;
  top:50%;
  width:10px;height:10px;
  background:var(--pdb-text);
  border:2px solid #fff;
  border-radius:50%;
  transform:translate(-50%,-50%);
  box-shadow:0 1px 3px rgba(0,0,0,.18);
  transition:left .4s ease;
  animation:pdb-cursor-pulse 4s ease-in-out infinite;
}
/* pdb-range__values, pdb-range__low, pdb-range__ecart, pdb-range__high
   sont utilisés uniquement par le hero — pas de version générique. */
.pdb-range__values{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  font-size:10px;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  gap:6px;
}
.pdb-hero .pdb-range__low{color:#dc2626;text-align:left;white-space:nowrap}
.pdb-hero .pdb-range__ecart{color:#94a3b8;font-size:9px;font-weight:600;text-align:center;white-space:nowrap;font-variant-numeric:tabular-nums}
.pdb-hero .pdb-range__high{color:#22c55e;text-align:right;white-space:nowrap}

.pdb-hero data{font-style:normal}

/* === Mobile ≤ 680px === */
@media(max-width:680px){
  /* Header hero harmonisé plus bas (@620) ; ici uniquement le CORPS du hero. */

  /* On GARDE la mise en page desktop (grille 1fr auto 1fr → terme gauche | prix centré +€ dessous |
     variation+sparkline droite). On réduit juste les tailles pour mobile/tablette.
     La sparkline rétrécit avec la colonne droite (flex:1+min-width:0+overflow) puis disparaît ≤440px. */
  .pdb-hero-item-link{padding:10px 14px;column-gap:10px}
  .pdb-hero-item-name{font-size:16px}
  .pdb-hero-item-desc{font-size:8px;letter-spacing:.01em;margin-top:0} /* compactée pour tenir sur 1 ligne */
  .pdb-hero-item-price{font-size:28px}
  .pdb-hero-item-price-currency{font-size:12px}
  .pdb-hero-item-price-eur{display:none} /* € masqué <680px (demande user) — reste affiché en desktop */
  .pdb-hero-pill{padding:4px 9px;border-radius:11px;font-size:12px}
  .pdb-hero-pill-arrow{font-size:9px}
  .pdb-hero-pct{font-size:12px}
  .pdb-hero-item-trend{min-width:0;gap:6px}
  .pdb-hero-spark{flex:1 1 0;min-width:0;overflow:hidden;margin-left:6px}
  .pdb-hero-spark-svg{width:100%;height:auto;max-height:34px}
  .pdb-hero .pdb-range__open{display:none}
  .pdb-hero .pdb-range{
    grid-column:2;
    grid-row:2 / span 2; /* couvre les rows prix + variation */
    align-self:center;
    justify-self:stretch;
    width:100%;
    gap:3px;
  }
  /* Gros module : afficher la stat EUR en mobile */
  .pdb-stat--eur-mobile{display:flex !important}
  .pdb-hero .pdb-range__cursor{width:9px;height:9px}
  .pdb-range__values{font-size:9px;gap:4px}
  .pdb-hero .pdb-range__ecart{font-size:8.5px}
}

/* Mobile étroit (≤440px) : plus de sparkline. On reste sur UNE ligne mais on ré-aligne les chiffres :
   colonnes 1fr auto auto → terme à gauche (récupère l'espace, desc sur 1 ligne) + prix & variation
   groupés à droite (fini le "vide flottant", style ticker label-gauche / cotation-droite). */
@media(max-width:440px){
  .pdb-hero-spark{display:none}
  /* Prix centré dans la carte, variation juste à sa droite.
     minmax(0,1fr) sur les colonnes latérales → elles passent sous leur min-content
     et se partagent l'espace à parts égales, donc la colonne auto du prix reste
     pile au centre. La variation (col 3) est calée au début de sa colonne → adossée
     au prix au lieu d'être plaquée au bord droit. */
  .pdb-hero-item-link{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
  .pdb-hero-item-trend{justify-self:start;gap:5px}
}

/* ≤400px : descriptions raccourcies pour gagner de la place sur la colonne gauche.
   Le texte d'origine est masqué (font-size:0) et remplacé par ::after content,
   scopé Brent/WTI. Le pseudo-élément hérite couleur/graisse/uppercase de la desc. */
@media(max-width:400px){
  .pdb-hero-item-desc{font-size:0}
  .pdb-hero-item-desc::after{font-size:8px;letter-spacing:.01em}
  .pdb-hero-item--brent .pdb-hero-item-desc::after{content:"Prix du pétrole Brent"}
  .pdb-hero-item--wti   .pdb-hero-item-desc::after{content:"Prix du baril de WTI"}
}

/* ============================================================================
   TOOLTIPS CUSTOM — Style sombre élégant
   Tooltip natif minimaliste sur les éléments porteurs de data-tooltip.
   Pas de JS, 100% CSS. Apparaît au survol et au focus clavier (a11y).
   ============================================================================ */

.pdb-hero:has([data-tooltip]:hover),
.pdb-hero:has([data-tooltip]:focus-visible){
  z-index:9999;
}
.pdb-hero-head,
.pdb-hero-list,
.pdb-hero-item,
.pdb-hero-item-link,
.pdb-hero-item-data,
.pdb-hero-item-trend,
.pdb-hero .pdb-range{
  overflow:visible;
}

/* Gros module — overflow:visible sur la chaîne stats pour que les tooltips ne soient pas clippés.
   .pdb-module lui-même est déjà overflow:visible (base rule) ; les coins sont gérés
   via border-radius sur .pdb-header. */
.pdb-module .pdb-stats,
.pdb-module .pdb-stat,
.pdb-module .pdb-stat--52w,
.pdb-module .pdb-stat__range{
  overflow:visible;
}

.pdb-hero [data-tooltip],
.pdb-module [data-tooltip],
.pdb-baro [data-tooltip],
.pdb-mod__pills [data-tooltip],
.pdb-carburants [data-tooltip]{
  position:relative;
  cursor:help;
}

.pdb-hero [data-tooltip]:hover::after,
.pdb-hero [data-tooltip]:focus-visible::after,
.pdb-module [data-tooltip]:hover::after,
.pdb-module [data-tooltip]:focus-visible::after,
.pdb-baro [data-tooltip]:hover::after,
.pdb-baro [data-tooltip]:focus-visible::after,
.pdb-mod__pills [data-tooltip]:hover::after,
.pdb-mod__pills [data-tooltip]:focus-visible::after,
.pdb-carburants [data-tooltip]:hover::after,
.pdb-carburants [data-tooltip]:focus-visible::after{
  content:attr(data-tooltip);
  position:absolute;
  bottom:calc(100% + 8px);
  left:50%;
  transform:translateX(-50%);
  background:#0f172a;
  color:#fff;
  padding:6px 10px;
  border-radius:6px;
  font-size:11px;
  font-weight:500;
  letter-spacing:0;
  text-transform:none;
  white-space:nowrap;
  z-index:99999 !important;
  pointer-events:none;
  box-shadow:0 4px 12px -2px rgba(0,0,0,.3);
  animation:pdb-tooltip-fade .18s ease-out;
}

.pdb-hero [data-tooltip]:hover::before,
.pdb-hero [data-tooltip]:focus-visible::before,
.pdb-module [data-tooltip]:hover::before,
.pdb-module [data-tooltip]:focus-visible::before,
.pdb-baro [data-tooltip]:hover::before,
.pdb-baro [data-tooltip]:focus-visible::before,
.pdb-mod__pills [data-tooltip]:hover::before,
.pdb-mod__pills [data-tooltip]:focus-visible::before,
.pdb-carburants [data-tooltip]:hover::before,
.pdb-carburants [data-tooltip]:focus-visible::before{
  content:"";
  position:absolute;
  bottom:calc(100% + 2px);
  left:50%;
  transform:translateX(-50%);
  border:6px solid transparent;
  border-top-color:#0f172a;
  z-index:99999 !important;
  pointer-events:none;
  animation:pdb-tooltip-fade .18s ease-out;
}

@keyframes pdb-tooltip-fade{
  from{opacity:0;transform:translateX(-50%) translateY(4px)}
  to  {opacity:1;transform:translateX(-50%) translateY(0)}
}

/* Tooltips du gros module + baromètre + pills tendance + carburants — apparaissent EN DESSOUS.
   Pour les pills, c'est ce qui garde l'infobulle à l'intérieur de la carte : le header est
   son premier enfant, un tooltip au-dessus déborderait sur le contenu qui précède. */
.pdb-module [data-tooltip]:hover::after,
.pdb-module [data-tooltip]:focus-visible::after,
.pdb-baro [data-tooltip]:hover::after,
.pdb-baro [data-tooltip]:focus-visible::after,
.pdb-mod__pills [data-tooltip]:hover::after,
.pdb-mod__pills [data-tooltip]:focus-visible::after,
.pdb-carburants [data-tooltip]:hover::after,
.pdb-carburants [data-tooltip]:focus-visible::after{
  bottom:auto;
  top:calc(100% + 8px);
}
.pdb-module [data-tooltip]:hover::before,
.pdb-module [data-tooltip]:focus-visible::before,
.pdb-baro [data-tooltip]:hover::before,
.pdb-baro [data-tooltip]:focus-visible::before,
.pdb-mod__pills [data-tooltip]:hover::before,
.pdb-mod__pills [data-tooltip]:focus-visible::before,
.pdb-carburants [data-tooltip]:hover::before,
.pdb-carburants [data-tooltip]:focus-visible::before{
  bottom:auto;
  top:calc(100% + 2px);
  border-top-color:transparent;
  border-bottom-color:#0f172a;
}


@media (max-width:680px){
  .pdb-hero [data-tooltip]:hover::after,
  .pdb-hero [data-tooltip]:focus-visible::after,
  .pdb-module [data-tooltip]:hover::after,
  .pdb-module [data-tooltip]:focus-visible::after,
  .pdb-baro [data-tooltip]:hover::after,
  .pdb-baro [data-tooltip]:focus-visible::after,
  .pdb-mod__pills [data-tooltip]:hover::after,
  .pdb-mod__pills [data-tooltip]:focus-visible::after,
  .pdb-carburants [data-tooltip]:hover::after,
  .pdb-carburants [data-tooltip]:focus-visible::after{
    max-width:200px;
    white-space:normal;
    text-align:center;
  }
}

/* ============================================================
   PALETTE DE MARQUE PARTAGÉE — Baromètre + Tendance
   Source unique des couleurs communes. Modifier ici = impacte
   les deux modules. Chaque module n'ajoute en dessous que ses
   tokens spécifiques (lignes, fonds, dérivés).
   ============================================================ */
/* ===================== MODULE 2-en-1 « TENDANCE + BAROMÈTRE » =====================
   Une seule carte .pdb-mod (Tendance en haut, Baromètre en bas).
   Hooks dynamiques (JS prod inchangé) :
     - data-pdb-tend + .pending + --i  → cascade d'apparition des cases
     - .pdb-baro.is-visible .pdb-baro__seg{width:var(--w)} → barres animées
     - .pdb-count                      → compteur % (count-up.js)
   ============================================================ */
.pdb-mod{
  --c-navy:#013971; --c-navy-2:#0A4F90; --c-orange:#F15A2B;
  --c-ink:#1e293b; --c-muted:#64748b; --c-down:#E23B3B; --c-up:#1F9D57; --c-line:#dbe2ec;
  margin:0 0 18px;background:#fff;border:1px solid var(--c-line);border-radius:16px; /* full-width comme .pdb-carburants (pas de max-width) */
  overflow:visible;   /* visible : tooltips delta/segments ; header & baro clippent leurs propres coins */
  box-shadow:0 1px 2px rgba(16,32,64,.05),0 12px 30px rgba(16,32,64,.10);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:var(--c-ink);
}
.pdb-mod *,.pdb-mod *::before,.pdb-mod *::after{box-sizing:border-box}

/* --- Header Tendance --- */
.pdb-mod__head{
  background:linear-gradient(180deg,var(--c-navy-2),var(--c-navy));border-bottom:2px solid var(--c-orange);
  border-radius:16px 16px 0 0;
  overflow:visible;   /* visible : tooltips des pills tendance (le border-radius clippe déjà le fond) */
  margin:0;padding:7px 14px;display:flex;align-items:center;justify-content:space-between;gap:8px 12px;flex-wrap:wrap;
}
.pdb-mod__title{display:flex;align-items:center;gap:9px;min-width:0}
.pdb-mod__title svg{flex:none}
.pdb-mod__title span{color:#cddefc;font-size:13px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;white-space:nowrap}
.pdb-mod__pills{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}

/* Pills tendance (dynamiques ; couleur atténuée .75 = rendu prod actuel) */
.pdb-tend__pill{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;color:#fff;line-height:1;
  font-size:11px;font-weight:800;letter-spacing:.01em;padding:4px 11px;border-radius:999px}
.pdb-tend__pill .pl{font-weight:600;opacity:.85}
.pdb-tend__pill svg{flex:none}
.pdb-tend__pill.up  {background:rgb(31 157 87/.75);box-shadow:0 1px 2px rgba(15,128,61,.4)}
.pdb-tend__pill.down{background:rgb(226 59 59/.75);box-shadow:0 1px 2px rgba(190,40,40,.4)}
.pdb-tend__pill.flat{background:rgb(100 116 139/.75);box-shadow:0 1px 2px rgba(51,65,85,.4)}

/* --- Grille échéances (hook cascade : --i + .pending) --- */
.pdb-tend__grid{margin:0;display:grid;grid-template-columns:repeat(6,1fr);gap:1px;background:var(--c-line);border-bottom:1px solid var(--c-line)}
.pdb-tend__cell{margin:0;background:#f7f9fc;padding:13px 6px;display:flex;flex-direction:column;align-items:center;gap:4px;
  transition:background .14s,opacity .5s ease,transform .5s cubic-bezier(.34,1.1,.5,1);
  transition-delay:0s,calc(var(--i,0)*100ms + 350ms),calc(var(--i,0)*100ms + 350ms)}
.pdb-tend__cell:hover{background:#eef3fb}
.pdb-tend__lbl{font-size:11px;font-weight:700;color:var(--c-muted);letter-spacing:.02em;white-space:nowrap}
.pdb-tend__val{font-size:15px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.pdb-tend__val.down{color:var(--c-down)}.pdb-tend__val.up{color:#15793F}
.pdb-mod.pending .pdb-tend__cell{opacity:0;transform:translateY(-12px)}

/* --- Baromètre --- */
.pdb-baro{margin:0;padding:16px 20px 18px;background:linear-gradient(0deg,#e3effd,#fff);border-radius:0 0 16px 16px;
  display:grid;grid-template-columns:1fr auto;column-gap:18px;row-gap:14px;align-items:center}
/* votants : fondu dans le sous-titre (plus de ligne head2 dédiée) */
.pdb-baro__sub-sep{color:#b9c6d8;font-weight:700;margin:0 1px}
.pdb-baro__sub-n{color:var(--c-navy);font-weight:800}

.pdb-baro__consensus{display:flex;align-items:center;gap:15px;min-width:0}
.pdb-baro__pct{font-size:46px;font-weight:800;line-height:.85;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.pdb-baro__pct--down{color:var(--c-down)}.pdb-baro__pct--up{color:var(--c-up)}.pdb-baro__pct--stable{color:#7A8699}
.pdb-baro__verdict{font-size:15px;font-weight:700;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.pdb-baro__verdict--down{color:var(--c-down)}.pdb-baro__verdict--up{color:var(--c-up)}.pdb-baro__verdict--stable{color:#7A8699}
.pdb-baro__delta{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:600;padding:2px 9px;border-radius:20px;background:rgba(136,147,163,.13)}
.pdb-baro__delta-val{font-weight:800}.pdb-baro__delta-lbl{color:var(--c-muted);font-weight:500}
.pdb-baro__sub{font-size:12px;color:var(--c-muted);margin-top:2px}
.pdb-baro__cta-wrap{justify-self:end}

/* Barre (hook anim : .is-visible .pdb-baro__seg{width:var(--w)}) */
.pdb-baro__spectrum{display:flex;height:16px;gap:2px;grid-column:1/-1;overflow:visible}
.pdb-baro__seg{height:100%;width:0;display:flex;align-items:center;justify-content:center;overflow:visible;
  transition:width .9s cubic-bezier(.22,.61,.36,1)}
.pdb-baro.is-visible .pdb-baro__seg{width:var(--w)}
.pdb-baro__seg--val{min-width:34px}
.pdb-baro__seg-pct{font-size:10px;font-weight:800;color:#fff;font-variant-numeric:tabular-nums;padding:0 4px;text-shadow:0 1px 1px rgba(0,0,0,.18)}
.pdb-baro__seg--down{background:var(--c-down)}.pdb-baro__seg--stable{background:#7A8699}.pdb-baro__seg--up{background:var(--c-up)}
.pdb-baro__seg:first-child{border-radius:999px 0 0 999px}
.pdb-baro__seg:last-child{border-radius:0 999px 999px 0}
.pdb-baro__seg:only-child{border-radius:999px}

/* ===== Responsive ===== */
@media(max-width:760px){
  .pdb-tend__grid{display:flex;overflow-x:auto;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;
    scrollbar-width:thin;scrollbar-color:#c2cfe0 transparent}
  .pdb-tend__grid::-webkit-scrollbar{height:5px}
  .pdb-tend__grid::-webkit-scrollbar-thumb{background:#c2cfe0;border-radius:3px}
  .pdb-tend__cell{flex:1 0 84px;scroll-snap-align:start;padding:10px}
  .pdb-tend__val{font-size:14px}
}
@media(max-width:620px){
  .pdb-mod__head{flex-direction:column;text-align:center;gap:9px}
  .pdb-mod__title{justify-content:center}
  .pdb-mod__title span{font-size:12px}
  .pdb-mod__pills{width:100%;justify-content:center}
  .pdb-tend__pill{font-size:11px;padding:4px 10px}
  .pdb-baro{display:flex;flex-direction:column;align-items:stretch;gap:13px;padding:14px 16px 16px}
  .pdb-baro__consensus{order:1}.pdb-baro__spectrum{order:2}.pdb-baro__cta-wrap{order:3;justify-self:auto}
  .pdb-cta{width:100%;min-height:44px}
}
@media(max-width:480px){
  .pdb-baro__pct{font-size:38px}
  .pdb-baro__consensus{gap:12px}
}
@media(max-width:390px){.pdb-day{display:none}}
@media(prefers-reduced-motion:reduce){
  .pdb-tend__cell,.pdb-baro__seg{transition:none}
  .pdb-mod.pending .pdb-tend__cell{opacity:1;transform:none}
  .pdb-baro__seg{width:var(--w)}
}

/* ============================================================
   Harmonisation headers mobile — hero / carte (graphique) / actu
   Titre 12px @620 puis 11px @540 (même échelle que baro/tend/carbu).
   ============================================================ */
@media(max-width:620px){
  /* Hero header */
  .pdb-hero-head{gap:0px !important}
  .pdb-hero-head-icon{width:14px;height:14px}
  .pdb-hero-head-title{font-size:12px}
  .pdb-hero-head-date{font-size:10px}
  .pdb-hero .pdb-header__live{font-size:9px;padding:3px 7px;gap:4px}
  .pdb-hero .pdb-header__dot{width:5px;height:5px}
  /* Carte (graphique) + Actu */
  .pdb-tv__title{font-size:12px}
  .pdb-news__badge{font-size:12px}
}
@media(max-width:540px){
  .pdb-hero-head-title{font-size:11px}
  .pdb-tv__title{font-size:11px}
  .pdb-news__badge{font-size:11px}
}
@media(max-width:480px){
  /* Date hero : jour+mois masqués (reste « Mardi 2026 · 01:34 ») */
  .pdb-hero-head-date-dm{display:none}
}
@media(max-width:400px){
  /* Titre header hero raccourci : « Cours du pétrole » → « Cours »
     (même idiome font-size:0 + ::after que les descriptions ≤400px) */
  .pdb-hero-head-title{font-size:0}
  .pdb-hero-head-title::after{content:"Cours";font-size:11px;letter-spacing:.02em}
}
@media(max-width:370px){
  /* Titre graphique raccourci : « Graphique des cours » → « Graphiques » */
  .pdb-tv__title-short{font-size:0}
  .pdb-tv__title-short::after{content:"Graphiques";font-size:11px;letter-spacing:.02em}
}
