/* Ideal Body : messages flash (bandeau + carte). Charte : noir, rouge Ideal Body, chrome. */
.ibf-barre, .ibf-carte { --ibf-rouge: var(--ib-red-500, #E11414); --ibf-noir: var(--ib-black, #0b0b0c);
  font-family: var(--font-body, 'Barlow', system-ui, sans-serif); box-sizing: border-box; }
.ibf-barre *, .ibf-carte * { box-sizing: border-box; }

/* ===== Bandeau ===== */
.ibf-barre { position: sticky; top: 0; z-index: 52; background: var(--ibf-noir); color: #fff; overflow: hidden;
  max-height: 0; transition: max-height .4s cubic-bezier(.2,.7,.2,1); }
.ibf-barre.is-in { max-height: 60px; }
.ibf-barre.is-out { max-height: 0; }
.ibf-barre::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 0 35%, rgba(255,255,255,.06) 45%, transparent 55% 100%); background-size: 250% 100%;
  animation: ibf-reflet 9s ease-in-out infinite; }
@keyframes ibf-reflet { 0%, 60% { background-position: 120% 0; } 100% { background-position: -30% 0; } }
.ibf-barre-in { position: relative; display: flex; align-items: center; gap: 12px; max-width: 1280px; margin: 0 auto; padding: 0 12px 0 20px; height: 42px; }
.ibf-piste { position: relative; flex: 1; min-width: 0; height: 100%; }
.ibf-item { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px;
  opacity: 0; transform: translateY(70%); transition: opacity .45s ease, transform .55s cubic-bezier(.2,.7,.2,1); pointer-events: none; }
.ibf-item.is-on { opacity: 1; transform: none; pointer-events: auto; }
.ibf-item.is-sortie { transform: translateY(-70%); }
.ibf-mini { display: none; }
.ibf-ic { flex: none; color: var(--ibf-rouge); }
.ibf-barre .ibf-ic { width: 17px; height: 17px; }
.ibf-txt { margin: 0; min-width: 0; font-size: 14.5px; line-height: 1.2; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #e9e9ec; }
.ibf-txt strong { font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .07em; font-size: 12.5px; }
.ibf-sep { display: inline-block; width: 5px; height: 5px; margin: 0 10px 2px; border-radius: 50%; background: var(--ibf-rouge); vertical-align: middle; }
.ibf-cta { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .02em; text-decoration: none; white-space: nowrap;
  transition: background .2s ease, border-color .2s ease; }
.ibf-cta:hover, .ibf-cta:focus-visible { background: var(--ibf-rouge); border-color: var(--ibf-rouge); color: #fff; }
.ibf-barre-outils { flex: none; display: flex; gap: 2px; }
.ibf-barre-outils button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #a9abb1; cursor: pointer; }
.ibf-barre-outils button:hover { color: #fff; background: rgba(255,255,255,.08); }
.ibf-pause span { position: relative; width: 10px; height: 11px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.ibf-pause.is-pause span { width: 0; height: 0; border: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }
.ibf-barre :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ibf-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.08); }
.ibf-prog i { display: block; height: 100%; background: var(--ibf-rouge); transform-origin: left; transform: scaleX(0); }


/* Bandeau figé avec l'en-tête : l'en-tête se colle juste sous le bandeau tant qu'il est affiché */
html.ibf-avec-barre { --ibf-h: 42px; scroll-padding-top: calc(96px + var(--ibf-h)); }
html.ibf-avec-barre .v3-header, html.ibf-avec-barre .ibp-tete { top: var(--ibf-h); }
html.ibf-avec-barre .v3-cfg-resume { top: calc(96px + var(--ibf-h)); }
html.ibf-avec-barre .ibp-cote { top: calc(88px + var(--ibf-h)); }

/* ===== Carte ===== */
.ibf-carte { position: fixed; left: 20px; bottom: 20px; z-index: 58; width: min(372px, calc(100vw - 24px));
  background: #fff; color: #141416; border-radius: 14px; overflow: hidden; border-top: 3px solid var(--ibf-rouge);
  box-shadow: 0 24px 60px rgba(11,11,12,.22), 0 2px 8px rgba(11,11,12,.08);
  opacity: 0; transform: translateY(22px) scale(.98); transition: opacity .4s ease, transform .5s cubic-bezier(.2,.8,.2,1); }
.ibf-carte.is-in { opacity: 1; transform: none; }
.ibf-carte.is-out { opacity: 0; transform: translateY(14px); transition-duration: .3s; }
.ibf-carte:focus { outline: none; }
.ibf-sig { padding: 18px 26px 6px; background: linear-gradient(180deg, #f3f3f5, #fff); }
.ibf-sig img { display: block; width: 100%; height: auto; }
.ibf-carte-corps { padding: 18px 20px 16px; }
.ibf-carte.has-visuel .ibf-carte-corps { padding-top: 10px; }
.ibf-kicker { display: flex; align-items: center; gap: 8px; margin: 0 40px 8px 0; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ibf-rouge); }
.ibf-titre { margin: 0 0 6px; font-family: var(--font-display, 'Anton', Impact, sans-serif); font-weight: 400; font-size: 23px; line-height: 1.12; letter-spacing: .005em; color: var(--ibf-noir); text-wrap: balance; }
.ibf-texte { margin: 0 0 14px; font-size: 15px; line-height: 1.45; color: #4a4c52; }
.ibf-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ibf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 8px;
  font-size: 14.5px; font-weight: 700; text-decoration: none; transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease; }
.ibf-btn.is-prim { background: var(--ibf-rouge); color: #fff; }
.ibf-btn.is-prim:hover { background: #b80f0f; }
.ibf-btn.is-prim:hover .ibf-fl { transform: translateX(3px); }
.ibf-fl { display: inline-block; transition: transform .2s ease; }
.ibf-btn.is-sec { color: var(--ibf-noir); border: 1px solid #d5d6da; background: #fff; }
.ibf-btn.is-sec:hover { border-color: var(--ibf-noir); }
.ibf-btn:active { transform: scale(.98); }
.ibf-btn:focus-visible, .ibf-carte-x:focus-visible { outline: 3px solid rgba(225,20,20,.35); outline-offset: 2px; }
.ibf-confiance { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 12.5px; color: #7a7c82; }
.ibf-confiance::before { content: ""; width: 8px; height: 8px; flex: none; background: var(--ibf-rouge); transform: rotate(45deg); border-radius: 1px; }
.ibf-carte-x { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.85); color: #6b6d73; cursor: pointer; }
.ibf-carte-x:hover { background: #f0f0f2; color: #141416; }
.ibf-carte-temps { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #f0f0f2; }
.ibf-carte-temps i { display: block; height: 100%; background: linear-gradient(90deg, #c8cacf, #9a9ca2); transform-origin: left; transition: transform .2s linear; }

/* ===== Mobile ===== */
@media (max-width: 759px) {
  html.ibf-avec-barre { --ibf-h: 40px; scroll-padding-top: calc(76px + var(--ibf-h)); }
  .ibf-barre-in { height: 40px; padding: 0 4px 0 12px; gap: 6px; }
  .ibf-item { justify-content: flex-start; gap: 8px; }
  .ibf-txt { font-size: 13.5px; }
  .ibf-txt strong, .ibf-sep, .ibf-long { display: none; }
  .ibf-mini { display: inline; }
  .ibf-cta { padding: 4px 10px; font-size: 12.5px; }
  .ibf-pause { display: none !important; }
  .ibf-carte { left: 12px; right: 12px; width: auto; bottom: 12px; border-radius: 14px; }
  .ibf-sig { padding: 14px 40px 4px; }
  .ibf-titre { font-size: 21px; }
  .ibf-texte { font-size: 14.5px; margin-bottom: 12px; }
  .ibf-btn { flex: 1 1 auto; }
  html.ibf-carte-on .ibc-lanceur, html.ibf-carte-on .ibx-top { opacity: 0; pointer-events: none; }
}
@media (max-width: 340px) { .ibf-cta { display: none; } }

/* ===== Mouvement réduit ===== */
@media (prefers-reduced-motion: reduce) {
  .ibf-barre, .ibf-item, .ibf-carte, .ibf-btn, .ibf-fl { transition: none !important; }
  .ibf-barre::before { animation: none; }
  .ibf-item, .ibf-item.is-sortie { transform: none; }
  .ibf-prog { display: none; }
}
@media print { .ibf-barre, .ibf-carte { display: none !important; } }
