/*
 * Tempus Belli Magazine Blocks — styles front + éditeur.
 * Tout est piloté par des variables CSS posées sur le conteneur de chaque bloc (voir includes/style.php).
 */

/* ---------- Variables par défaut (les réglages globaux et ceux du bloc les remplacent) ---------- */
.tbb {
	--tbb-accent: #9f1d20;
	--tbb-accent-ink: #fff;
	--tbb-ink: #16181d;
	--tbb-muted: #6a6f78;
	--tbb-surface: #fff;
	--tbb-line: #e6e1d8;
	--tbb-radius: 14px;
	--tbb-font-heading: inherit;
	--tbb-gap: clamp(16px, 2.2vw, 28px);
	--tbb-pad: 20px;
	--tbb-shadow: 0 1px 2px rgba(16, 18, 24, .06), 0 10px 28px -14px rgba(16, 18, 24, .28);
	--tbb-shadow-hover: 0 2px 4px rgba(16, 18, 24, .08), 0 20px 36px -16px rgba(16, 18, 24, .38);
	--tbb-cols: var(--tbb-c-lg, 3);

	box-sizing: border-box;
	margin-block: clamp(28px, 4.5vw, 56px);
	color: inherit;
	line-height: 1.5;
}
.tbb *, .tbb *::before, .tbb *::after { box-sizing: border-box; }
.tbb img { display: block; max-width: 100%; }
.tbb a { color: inherit; text-decoration: none; }
.tbb ul, .tbb ol { margin: 0; padding: 0; list-style: none; }
.tbb li { margin: 0; }
.tbb a:focus-visible, .tbb button:focus-visible { outline: 2px solid var(--tbb-accent); outline-offset: 3px; border-radius: 4px; }
.tbb-empty { padding: 24px; text-align: center; color: #6a6f78; border: 1px dashed #c9c5bc; border-radius: 12px; }

.tbb.tbb--shadow-none { --tbb-shadow: none; --tbb-shadow-hover: none; }
.tbb.tbb--shadow-soft { --tbb-shadow: 0 1px 2px rgba(16, 18, 24, .05), 0 6px 16px -10px rgba(16, 18, 24, .22); }
.tbb.tbb--shadow-strong { --tbb-shadow: 0 2px 4px rgba(16, 18, 24, .1), 0 22px 44px -16px rgba(16, 18, 24, .5); }

@media (max-width: 1024px) { .tbb { --tbb-cols: var(--tbb-c-md, 2); } }
@media (max-width: 640px)  { .tbb { --tbb-cols: var(--tbb-c-sm, 1); } }

/* ---------- Titre de section ---------- */
.tbb-head {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 22px;
}
.tbb .tbb-head__title {
	margin: 0;
	font-family: var(--tbb-font-heading);
	font-size: var(--tbb-head-size, clamp(1.1rem, 1vw + .9rem, 1.55rem));
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--tbb-head-c, inherit);
}
.tbb-head__side { display: flex; align-items: center; gap: 14px; }
.tbb .tbb-head__link { font-size: .85rem; font-weight: 700; white-space: nowrap; color: var(--tbb-accent); }
.tbb .tbb-head__link:hover { text-decoration: underline; }

.tbb--head-bar .tbb-head { padding-bottom: 12px; border-bottom: 1px solid var(--tbb-line); }
.tbb--head-bar .tbb-head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 72px; height: 3px; background: var(--tbb-accent); }
.tbb--head-box .tbb-head { border-bottom: 2px solid var(--tbb-accent); }
.tbb--head-box .tbb-head__title { padding: .42em .9em; color: var(--tbb-head-c, var(--tbb-accent-ink)); background: var(--tbb-accent); }
.tbb--head-line .tbb-head__title { flex: 1; display: flex; align-items: center; gap: 18px; }
.tbb--head-line .tbb-head__title::after { content: ""; flex: 1; height: 2px; background: var(--tbb-line); }
.tbb--head-center .tbb-head { justify-content: center; }
.tbb--head-center .tbb-head__title { flex: 1; display: flex; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.tbb--head-center .tbb-head__title::before, .tbb--head-center .tbb-head__title::after { content: ""; flex: 1; height: 1px; background: var(--tbb-line); }
.tbb--head-center .tbb-head__side { position: absolute; right: 0; bottom: 0; }
.tbb--head-plain .tbb-head { margin-bottom: 16px; }

/* ---------- Grille ---------- */
.tbb-grid { display: grid; gap: var(--tbb-gap); grid-template-columns: repeat(var(--tbb-cols), minmax(0, 1fr)); }
.tbb-grid > * { min-width: 0; }
.tbb-grid--minimal { column-gap: calc(var(--tbb-gap) * 1.6); row-gap: 0; }
.tbb-grid--masonry { display: block; column-count: var(--tbb-cols); column-gap: var(--tbb-gap); }
.tbb-grid--masonry > .tbb-card { break-inside: avoid; margin-bottom: var(--tbb-gap); }

/* ---------- Carte ---------- */
.tbb-card {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	background: var(--tbb-surface);
	color: var(--tbb-ink);
	border-radius: var(--tbb-radius);
	box-shadow: var(--tbb-shadow);
	transition: transform .35s ease, box-shadow .35s ease;
}
.tbb-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: var(--tbb-ratio, 16/9);
	background: #1c1f25;
}
.tbb .tbb-img { display: block; width: 100%; height: 100%; object-fit: cover; filter: var(--tbb-img-filter, none); transition: transform .7s cubic-bezier(.2, .7, .2, 1), filter .5s ease; }
.tbb--ratio-auto .tbb-card__media { aspect-ratio: auto; min-height: 120px; }
.tbb--ratio-auto .tbb-card--cards .tbb-img { height: auto; }
.tbb-media__fallback {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font: 800 clamp(1.6rem, 3vw, 2.6rem)/1 Georgia, serif;
	letter-spacing: .08em;
	color: rgba(255, 255, 255, .28);
	background: radial-gradient(120% 120% at 20% 10%, #3a3f49 0%, #15171b 70%);
}

/* Teinte colorée sur les images */
.tbb-card__media::before, .tbb-tile__media::before, .tbb-ranked__thumb::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: var(--tbb-tint, transparent);
	mix-blend-mode: var(--tbb-tint-blend, multiply);
	opacity: var(--tbb-tint-a, 0);
	transition: opacity .4s ease;
}
:is(.tbb-card, .tbb-tile, .tbb-ranked__item):hover :is(.tbb-card__media, .tbb-tile__media, .tbb-ranked__thumb)::before { opacity: var(--tbb-tint-a-h, var(--tbb-tint-a, 0)); }
:is(.tbb-card, .tbb-tile, .tbb-ranked__item):hover .tbb-img { filter: var(--tbb-img-filter-h, var(--tbb-img-filter, none)); }

.tbb-card__body { display: flex; flex-direction: column; gap: 10px; padding: var(--tbb-pad) calc(var(--tbb-pad) + 2px); }
.tbb .tbb-card__title {
	margin: 0;
	font-family: var(--tbb-font-title, var(--tbb-font-heading, inherit));
	font-size: var(--tbb-title-size, clamp(1.02rem, .4vw + .95rem, 1.28rem));
	font-weight: var(--tbb-title-w, 700);
	line-height: 1.28;
	text-transform: var(--tbb-title-tt, none);
	letter-spacing: 0;
	color: var(--tbb-title-c, inherit);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--tbb-lines, 3);
	line-clamp: var(--tbb-lines, 3);
	overflow: hidden;
}
.tbb-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.tbb .tbb-card__title a:hover { color: var(--tbb-title-h, var(--tbb-accent)); }
.tbb .tbb-card__excerpt {
	margin: 0;
	font-size: var(--tbb-ex-size, .93rem);
	color: var(--tbb-text, var(--tbb-muted));
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}
.tbb-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; font-size: var(--tbb-meta-size, .78rem); color: var(--tbb-muted); }
.tbb-card__meta > * + *::before { content: "•"; margin: 0 .55em; opacity: .55; }
.tbb-meta__author { display: inline-flex; align-items: center; gap: 7px; }
.tbb-avatar { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font: 700 .62rem/1 system-ui, sans-serif; color: var(--tbb-accent-ink); background: var(--tbb-accent); }
.tbb-card__tags { display: flex; flex-wrap: wrap; gap: 6px; position: relative; z-index: 4; }
/* Étiquettes : pastille pleine, contour ou texte (#). Les couleurs du bloc passent avant celles du thème. */
.tbb .tbb-tag {
	--_fg: var(--tbb-tag-c, var(--tbb-muted));
	--_bg: transparent;
	--_bd: var(--tbb-tag-bg, var(--tbb-line));
	padding: 2px 10px;
	font-size: .72rem;
	font-weight: 600;
	line-height: 1.5;
	border-radius: 999px;
	color: var(--_fg) !important;
	background: var(--_bg) !important;
	box-shadow: inset 0 0 0 1px var(--_bd) !important;
	transition: color .2s, background-color .2s, box-shadow .2s;
}
.tbb .tbb-tag:hover { --_fg: var(--tbb-tag-hc, var(--tbb-accent)); --_bd: var(--tbb-tag-hbg, var(--tbb-accent)); }
.tbb--tag-pill .tbb-tag { --_fg: var(--tbb-tag-c, var(--tbb-accent-ink)); --_bg: var(--tbb-tag-bg, var(--tbb-accent)); --_bd: transparent; }
.tbb--tag-pill .tbb-tag:hover { --_fg: var(--tbb-tag-hc, var(--tbb-tag-c, var(--tbb-accent-ink))); --_bg: var(--tbb-tag-hbg, color-mix(in srgb, var(--tbb-tag-bg, var(--tbb-accent)) 82%, #000)); --_bd: transparent; }
.tbb--tag-text .tbb-tag { --_fg: var(--tbb-tag-c, var(--tbb-muted)); --_bd: transparent; padding: 0; }
.tbb--tag-text .tbb-tag::before { content: "#"; opacity: .6; }
.tbb--tag-text .tbb-tag:hover { --_fg: var(--tbb-tag-hc, var(--tbb-accent)); --_bd: transparent; }
/* Sur une image : contour et texte clairs par défaut */
.tbb--tag-outline .tbb-card--overlay .tbb-tag { --_fg: var(--tbb-tag-c, #fff); --_bd: var(--tbb-tag-bg, rgba(255, 255, 255, .5)); }
.tbb--tag-outline .tbb-card--overlay .tbb-tag:hover { --_fg: var(--tbb-tag-hc, #fff); --_bd: var(--tbb-tag-hbg, #fff); }
.tbb--tag-text .tbb-card--overlay .tbb-tag { --_fg: var(--tbb-tag-c, rgba(255, 255, 255, .88)); }
.tbb--tag-text .tbb-card--overlay .tbb-tag:hover { --_fg: var(--tbb-tag-hc, #fff); }
.tbb-card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: .85rem; font-weight: 700; color: var(--tbb-accent); }
.tbb-card__more i { font-style: normal; transition: transform .25s ease; }
.tbb-card:hover .tbb-card__more i { transform: translateX(4px); }

/* Catégorie : texte, pastille pleine ou contour. Les couleurs du bloc passent avant celles du thème. */
.tbb .tbb-cat {
	--_cfg: var(--tbb-cat-c, var(--tbb-accent));
	--_cbg: transparent;
	--_cbd: transparent;
	position: relative;
	z-index: 4;
	display: inline-block;
	align-self: flex-start;
	padding: 0;
	font-size: .7rem;
	font-weight: 800;
	line-height: 1.4;
	letter-spacing: .09em;
	text-transform: uppercase;
	border-radius: 999px;
	color: var(--_cfg) !important;
	background: var(--_cbg) !important;
	box-shadow: inset 0 0 0 1.5px var(--_cbd) !important;
	transition: filter .2s, background-color .2s;
}
.tbb .tbb-cat:hover { text-decoration: underline; }
.tbb--cat-pill .tbb-cat,
.tbb--cat-auto .tbb-card--overlay .tbb-cat { --_cfg: var(--tbb-cat-c, var(--tbb-accent-ink)); --_cbg: var(--tbb-cat-bg, var(--tbb-accent)); padding: 4px 11px; }
.tbb--cat-pill .tbb-cat:hover, .tbb--cat-auto .tbb-card--overlay .tbb-cat:hover { text-decoration: none; filter: brightness(1.12); }
.tbb--cat-outline .tbb-cat { --_cfg: var(--tbb-cat-c, var(--tbb-cat-bg, var(--tbb-accent))); --_cbd: var(--tbb-cat-bg, var(--tbb-accent)); padding: 4px 11px; }
.tbb--cat-outline .tbb-card--overlay .tbb-cat { --_cfg: var(--tbb-cat-c, #fff); --_cbd: var(--tbb-cat-bg, rgba(255, 255, 255, .8)); }
.tbb--cat-outline .tbb-cat:hover { text-decoration: none; --_cbg: color-mix(in srgb, var(--_cbd) 16%, transparent); }
.tbb--cat-text .tbb-card--overlay .tbb-cat { --_cfg: var(--tbb-cat-c, #fff); }

/* Alignement du texte */
.tbb--align-center .tbb-card__body { align-items: center; text-align: center; }
.tbb--align-center .tbb-card__meta { justify-content: center; }
.tbb--align-center .tbb-cat { align-self: center; }
.tbb--align-center .tbb-card__tags { justify-content: center; }
.tbb--align-right .tbb-card__body { align-items: flex-end; text-align: right; }
.tbb--align-right .tbb-card__meta { justify-content: flex-end; }
.tbb--align-right .tbb-cat { align-self: flex-end; }
.tbb--align-right .tbb-card__tags { justify-content: flex-end; }

/* Style de carte */
.tbb--cs-flat .tbb-card { background: transparent; box-shadow: none; border-radius: 0; overflow: visible; }
.tbb--cs-flat .tbb-card:not(.tbb-card--overlay) .tbb-card__media { border-radius: var(--tbb-radius); }
.tbb--cs-flat .tbb-card:not(.tbb-card--overlay):not(.tbb-card--list):not(.tbb-card--large) .tbb-card__body { padding-inline: 0; }
.tbb--cs-flat .tbb-card--overlay { border-radius: var(--tbb-radius); overflow: hidden; }
.tbb--cs-bordered .tbb-card { box-shadow: none; border: 1px solid var(--tbb-line); }

/* ---------- Carte superposée (titre sur l'image) ---------- */
.tbb-card--overlay { min-height: 260px; justify-content: flex-end; color: #fff; background: #15171b; }
.tbb-card--overlay .tbb-card__media { position: absolute; inset: 0; z-index: -1; aspect-ratio: auto; }
.tbb-card--overlay .tbb-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	background: linear-gradient(to top, rgba(var(--tbb-ov-rgb, 8, 9, 12), var(--tbb-ov-a, .88)) 0%, rgba(var(--tbb-ov-rgb, 8, 9, 12), calc(var(--tbb-ov-a, .88) * .5)) 42%, rgba(var(--tbb-ov-rgb, 8, 9, 12), 0) 78%);
}
.tbb-card--overlay .tbb-card__body { padding: clamp(16px, 2vw, 26px); gap: 9px; }
.tbb .tbb-card--overlay .tbb-card__title { color: var(--tbb-title-c, #fff); text-shadow: 0 1px 12px rgba(0, 0, 0, .4); }
.tbb .tbb-card--overlay .tbb-card__title a:hover { color: var(--tbb-title-h, #fff); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.tbb .tbb-card--overlay .tbb-card__excerpt { color: var(--tbb-text-ov, rgba(255, 255, 255, .86)); }
.tbb-card--overlay .tbb-card__meta { color: var(--tbb-meta-ov, rgba(255, 255, 255, .82)); }
.tbb .tbb-card--overlay .tbb-card__more { color: #fff; }
.tbb-grid--overlay .tbb-card--overlay { aspect-ratio: var(--tbb-ratio, 4/3); min-height: 240px; }
.tbb--ratio-auto .tbb-grid--overlay .tbb-card--overlay { aspect-ratio: auto; min-height: 300px; }

.tbb-card--big .tbb-card__title { font-size: calc(var(--tbb-title-size, clamp(1rem, .4vw + .95rem, 1.2rem)) * 1.75); line-height: 1.14; --tbb-lines: 4; }
.tbb-card--compact .tbb-card__title { font-size: calc(var(--tbb-title-size, clamp(1rem, .4vw + .95rem, 1.2rem)) * .9); }
.tbb-card--compact .tbb-card__body { padding: 14px 16px; gap: 6px; }
.tbb-card--big .tbb-card__body { max-width: 54rem; }

/* ---------- Carte horizontale (liste) ---------- */
.tbb-card--list { flex-direction: row; align-items: stretch; }
.tbb-card--list .tbb-card__media { flex: 0 0 var(--tbb-img-w, clamp(120px, 38%, 250px)); aspect-ratio: auto; min-height: 140px; }
.tbb-card--list .tbb-img { position: absolute; inset: 0; height: 100%; }
.tbb-card--list .tbb-card__body { flex: 1; min-width: 0; justify-content: center; padding: 16px 20px; gap: 8px; }
.tbb .tbb-card--list .tbb-card__title { font-size: var(--tbb-title-size, clamp(1rem, .3vw + .95rem, 1.18rem)); }

/* ---------- Grande carte ---------- */
.tbb-card--large { flex-direction: row; align-items: stretch; }
.tbb-card--large .tbb-card__media { flex: 0 0 var(--tbb-img-w, 48%); aspect-ratio: auto; min-height: 280px; }
.tbb-card--large .tbb-img { position: absolute; inset: 0; height: 100%; }
.tbb-card--large .tbb-card__body { flex: 1; min-width: 0; justify-content: center; padding: clamp(20px, 3vw, 40px); gap: 12px; }
.tbb .tbb-card--large .tbb-card__title { font-size: calc(var(--tbb-title-size, clamp(1.1rem, .8vw + 1rem, 1.5rem)) * 1.2); --tbb-lines: 4; }
.tbb-card--large .tbb-card__excerpt { -webkit-line-clamp: 4; line-clamp: 4; }
.tbb-grid--large { grid-template-columns: repeat(var(--tbb-cols), minmax(0, 1fr)); }
.tbb-hero__grid .tbb-card--large { flex-direction: row; }

/* ---------- Carte minimale ---------- */
.tbb-card--minimal {
	flex-direction: row;
	align-items: center;
	gap: 16px;
	padding: 14px 0;
	overflow: visible;
	background: none;
	border-radius: 0;
	box-shadow: none;
	border-bottom: 1px solid var(--tbb-line);
	color: inherit;
}
.tbb-card--minimal .tbb-card__media { flex: 0 0 var(--tbb-img-w, 92px); aspect-ratio: 1; border-radius: calc(var(--tbb-radius) * .6); }
.tbb-card--minimal .tbb-card__body { padding: 0; gap: 6px; flex: 1; min-width: 0; }
.tbb .tbb-card--minimal .tbb-card__title { font-size: var(--tbb-title-size, 1.02rem); --tbb-lines: 2; }
.tbb-card--minimal .tbb-card__meta { opacity: .85; }
.tbb--cs-bordered .tbb-card--minimal { border: 0; border-bottom: 1px solid var(--tbb-line); }

/* ---------- Hauteur et largeur réglables ---------- */
.tbb--h .tbb-card--cards .tbb-card__media { aspect-ratio: auto; height: var(--tbb-card-h); }
.tbb--h .tbb-card--list, .tbb--h .tbb-card--large { height: var(--tbb-card-h); }
.tbb--h .tbb-card--list .tbb-card__media, .tbb--h .tbb-card--large .tbb-card__media { min-height: 0; }
.tbb--h .tbb-grid--overlay .tbb-card--overlay,
.tbb--h .tbb-grid--tile-masonry .tbb-card--overlay { height: var(--tbb-card-h); min-height: 0; aspect-ratio: auto; }
.tbb--h .tbb-carousel__track .tbb-card { height: auto; }

/* ---------- Effets au survol ---------- */
:is(.tbb--hover-zoom, .tbb--hover-zoom-lift) :is(.tbb-card, .tbb-tile, .tbb-ranked__item):hover .tbb-img { transform: scale(1.07); }
:is(.tbb--hover-lift, .tbb--hover-zoom-lift) .tbb-card:not(.tbb-slide):not(.tbb-card--minimal):hover { transform: translateY(-5px); box-shadow: var(--tbb-shadow-hover); }
:is(.tbb--hover-lift, .tbb--hover-zoom-lift) .tbb-tile:hover { transform: translateY(-4px); }
.tbb--hover-rotate :is(.tbb-card, .tbb-tile):hover .tbb-img { transform: scale(1.1) rotate(1.6deg); }
.tbb--hover-shine .tbb-card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .34) 50%, transparent 62%);
	transform: translateX(-120%);
	transition: transform .9s ease;
}
.tbb--hover-shine .tbb-card:hover::before { transform: translateX(120%); }
.tbb--hover-shine .tbb-card--minimal::before { display: none; }

.tbb--reveal .tbb-card--overlay .tbb-card__excerpt { max-height: 0; opacity: 0; margin-top: -6px; transition: max-height .4s ease, opacity .3s ease, margin .3s ease; }
.tbb--reveal .tbb-card--overlay:hover .tbb-card__excerpt,
.tbb--reveal .tbb-card--overlay:focus-within .tbb-card__excerpt { max-height: 7em; opacity: 1; margin-top: 0; }
@media (hover: none) { .tbb--reveal .tbb-card--overlay .tbb-card__excerpt { max-height: 7em; opacity: 1; margin-top: 0; } }

.tbb--hu .tbb-card__title a, .tbb--hu .tbb-titles__title a, .tbb--hu .tbb-ranked__title a {
	background-image: linear-gradient(currentColor, currentColor);
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0 2px;
	padding-bottom: 2px;
	transition: background-size .35s ease;
}
.tbb--hu :is(.tbb-card, .tbb-titles__item, .tbb-ranked__item):hover :is(.tbb-card__title, .tbb-titles__title, .tbb-ranked__title) a { background-size: 100% 2px; }
.tbb--hu .tbb-card--overlay .tbb-card__title a:hover { text-decoration: none; }

/* ---------- Inversion et alternance ---------- */
.tbb--reverse :is(.tbb-hero__grid, .tbb-cg, .tbb-express, .tbb-grid--express-grid, .tbb-grid--tile-masonry) { direction: rtl; }
.tbb--reverse :is(.tbb-hero__grid, .tbb-cg, .tbb-express, .tbb-grid--express-grid, .tbb-grid--tile-masonry) > * { direction: ltr; }
.tbb--reverse :is(.tbb-card--list, .tbb-card--large, .tbb-card--minimal, .tbb-ranked__item, .tbb-titles__item) { flex-direction: row-reverse; }
.tbb--reverse .tbb-card--minimal .tbb-card__body, .tbb--reverse .tbb-ranked__body { text-align: right; align-items: flex-end; }
.tbb--reverse .tbb-ticker { flex-direction: row-reverse; }
.tbb--alt :is(.tbb-card--list, .tbb-card--large, .tbb-card--minimal):nth-child(even) { flex-direction: row-reverse; }
.tbb--meta-above .tbb-card__body > .tbb-card__meta { margin-bottom: -2px; }

/* ---------- Bannières « à la une » (Hero Banner 1 à 12) ---------- */
.tbb-hero__grid { display: grid; gap: var(--tbb-gap); }
.tbb-hero__grid > * { min-width: 0; min-height: 0; }
.tbb-hero__grid > .tbb-card { height: 100%; }
.tbb-hero__grid .tbb-card--overlay { aspect-ratio: auto; min-height: 220px; }
.tbb-hero__list, .tbb-hero__titles {
	display: flex;
	flex-direction: column;
	padding: 6px 20px;
	overflow: auto;
	background: var(--tbb-surface);
	color: var(--tbb-ink);
	border-radius: var(--tbb-radius);
	box-shadow: var(--tbb-shadow);
}
.tbb-hero__grid .tbb-card--list { --tbb-lines: 2; }
.tbb-hero__grid .tbb-card--list .tbb-card__body { padding: 12px 16px; gap: 5px; }
.tbb-hero__grid .tbb-card--list .tbb-card__media { min-height: 0; }
.tbb-hero__list .tbb-card--minimal { flex: 1; }
.tbb-hero__list .tbb-card--minimal:last-child, .tbb-titles__item:last-child { border-bottom: 0; }
.tbb-titles { counter-reset: tbbt; display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.tbb-titles__item { counter-increment: tbbt; display: flex; align-items: center; gap: 14px; flex: 1; padding: 12px 0; border-bottom: 1px solid var(--tbb-line); }
.tbb-titles__n::before { content: counter(tbbt, decimal-leading-zero); font: 800 1.5rem/1 var(--tbb-font-heading, inherit); color: var(--tbb-accent); font-variant-numeric: tabular-nums; }
.tbb-titles__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tbb .tbb-titles__title { margin: 0; font-family: var(--tbb-font-title, var(--tbb-font-heading, inherit)); font-size: var(--tbb-title-size, 1rem); font-weight: var(--tbb-title-w, 700); line-height: 1.3; text-transform: var(--tbb-title-tt, none); color: var(--tbb-title-c, inherit); }
.tbb .tbb-titles__title a:hover { color: var(--tbb-title-h, var(--tbb-accent)); }

@media (min-width: 961px) {
	.tbb-hero__grid { height: var(--tbb-hero-h, 520px); }
	.tbb-hero--h1 .tbb-hero__grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); }
	.tbb-hero--h1 .tbb-a { grid-row: 1 / 3; }

	.tbb-hero--h2 .tbb-hero__grid { grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
	.tbb-hero--h2 .tbb-a { grid-row: 1 / 3; }

	.tbb-hero--h3 .tbb-hero__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

	.tbb-hero--h4 .tbb-hero__grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); grid-template-rows: repeat(3, minmax(0, 1fr)); }
	.tbb-hero--h4 .tbb-a { grid-row: 1 / 4; }
	.tbb-hero--h4 .tbb-card--list { grid-column: 2; }

	.tbb-hero--h5 .tbb-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); }
	.tbb-hero--h5 .tbb-a { grid-column: 2; grid-row: 1 / 3; }
	.tbb-hero--h5 .tbb-b { grid-column: 1; grid-row: 1; }
	.tbb-hero--h5 .tbb-c { grid-column: 1; grid-row: 2; }
	.tbb-hero--h5 .tbb-d { grid-column: 3; grid-row: 1; }
	.tbb-hero--h5 .tbb-e { grid-column: 3; grid-row: 2; }

	.tbb-hero--h6 .tbb-hero__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: minmax(0, 1.5fr) minmax(0, 1fr); }
	.tbb-hero--h6 .tbb-a { grid-column: 1 / -1; }

	.tbb-hero--h7 .tbb-hero__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: minmax(0, 1.25fr) minmax(0, 1fr); }
	.tbb-hero--h7 .tbb-a, .tbb-hero--h7 .tbb-b { grid-column: span 3; }
	.tbb-hero--h7 .tbb-c, .tbb-hero--h7 .tbb-d, .tbb-hero--h7 .tbb-e { grid-column: span 2; }

	.tbb-hero--h8 .tbb-hero__grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }

	.tbb-hero--h9 .tbb-hero__grid { grid-template-columns: minmax(0, 1fr); }

	.tbb-hero--h10 .tbb-hero__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); }
	.tbb-hero--h10 .tbb-a { grid-row: 1 / 3; }

	.tbb-hero--h11 .tbb-hero__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

	.tbb-hero--h12 .tbb-hero__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: minmax(0, 1.2fr) minmax(0, 1fr); }
	.tbb-hero--h12 .tbb-a { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
	.tbb-hero__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tbb-hero__grid > .tbb-card { height: auto; }
	.tbb-hero__grid .tbb-card--overlay { min-height: 250px; }
	.tbb-hero__grid > .tbb-a, .tbb-hero__grid > .tbb-card--list, .tbb-hero__list, .tbb-hero__titles, .tbb-hero--h12 .tbb-a { grid-column: 1 / -1; }
	.tbb-hero__grid > .tbb-a.tbb-card { min-height: 380px; }
	.tbb-hero--h3 .tbb-a, .tbb-hero--h3 .tbb-b, .tbb-hero--h3 .tbb-c { grid-column: auto; }
	.tbb-hero--h3 .tbb-a { grid-column: 1 / -1; }
	.tbb-hero__list, .tbb-hero__titles { padding: 6px 16px; }
	.tbb-hero__grid .tbb-card--large { flex-direction: column; }
	.tbb-hero__grid .tbb-card--large .tbb-card__media { flex-basis: auto; min-height: 220px; }
	.tbb-hero__grid .tbb-card--large .tbb-img { position: static; height: 100%; }
}
@media (max-width: 560px) {
	.tbb-hero__grid { grid-template-columns: minmax(0, 1fr); }
	.tbb-hero__grid > .tbb-a.tbb-card { min-height: 340px; }
}

/* ---------- Slider ---------- */
.tbb-slider { --tbb-spv: 1; --tbb-sgap: 0px; position: relative; height: 100%; }
.tbb-slider__track {
	display: flex;
	gap: var(--tbb-sgap);
	height: 100%;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	border-radius: var(--tbb-radius);
	box-shadow: var(--tbb-shadow);
}
.tbb-slider--multi .tbb-slider__track { border-radius: 0; box-shadow: none; padding-bottom: 4px; }
.tbb-slider__track::-webkit-scrollbar { display: none; }
.tbb-slide {
	flex: 0 0 calc((100% - var(--tbb-sgap) * (var(--tbb-spv) - 1)) / var(--tbb-spv));
	scroll-snap-align: start;
	height: 100%;
	min-height: min(var(--tbb-hero-h, 520px), 440px);
	border-radius: 0;
	box-shadow: none;
}
.tbb-slider--multi .tbb-slide { border-radius: var(--tbb-radius); box-shadow: var(--tbb-shadow); min-height: 320px; }
.tbb-slide .tbb-card__body { padding-bottom: clamp(44px, 5vw, 60px); }
.tbb-slider-block .tbb-slider { height: var(--tbb-hero-h, 520px); }
.tbb-slider-block .tbb-slide { min-height: 0; }
.tbb-hero__grid .tbb-a { min-height: 0; }
@media (max-width: 960px) {
	.tbb-hero__grid .tbb-a .tbb-slider { height: min(var(--tbb-hero-h, 520px), 440px); }
	.tbb-slider-block .tbb-slider { height: min(var(--tbb-hero-h, 520px), 460px); }
}

.tbb .tbb-nav {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	font-size: 1.7rem;
	line-height: 1;
	cursor: pointer;
	color: #fff;
	background: rgba(12, 13, 16, .55);
	backdrop-filter: blur(6px);
	transition: background .2s, opacity .2s, color .2s;
}
.tbb .tbb-nav:hover:not(:disabled) { background: var(--tbb-accent); color: var(--tbb-accent-ink); }
.tbb .tbb-nav:disabled { opacity: .35; cursor: default; }
.tbb-nav > span { transform: translateY(-2px); }
.tbb-slider .tbb-nav { position: absolute; top: 50%; z-index: 5; margin-top: -22px; }
.tbb-nav--prev { left: 14px; }
.tbb-nav--next { right: 14px; }
@media (max-width: 640px) {
	.tbb-slider .tbb-nav { top: 14px; margin-top: 0; width: 38px; height: 38px; }
	.tbb-nav--prev { left: auto; right: 62px; }
}
.tbb-slider__dots { position: absolute; left: 0; right: 0; bottom: 16px; z-index: 5; display: flex; justify-content: center; gap: 8px; pointer-events: none; }
.tbb-slider__dots button { pointer-events: auto; width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; cursor: pointer; background: rgba(255, 255, 255, .5); transition: width .25s, background .25s; }
.tbb-slider__dots button[aria-current="true"] { width: 28px; background: #fff; }

/* ---------- Carrousel de cartes ---------- */
.tbb-carousel__nav { display: inline-flex; gap: 8px; }
.tbb .tbb-nav--inline { width: 38px; height: 38px; color: var(--tbb-ink); background: var(--tbb-surface); box-shadow: inset 0 0 0 1px var(--tbb-line); backdrop-filter: none; }
.tbb-carousel__track {
	display: flex;
	gap: var(--tbb-gap);
	padding: 4px 2px 26px;
	margin: -4px -2px -22px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 2px;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.tbb-carousel__track::-webkit-scrollbar { display: none; }
.tbb-carousel__track > .tbb-card { flex: 0 0 calc((100% - var(--tbb-gap) * (var(--tbb-cols) - 1)) / var(--tbb-cols)); scroll-snap-align: start; }
@media (max-width: 640px) { .tbb-carousel__track > .tbb-card { flex-basis: min(82%, 320px); } }

/* ---------- Carrousel + grille ---------- */
.tbb-cg { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--tbb-gap); height: var(--tbb-hero-h, 520px); }
.tbb-cg > * { min-width: 0; min-height: 0; }
.tbb-cg__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: var(--tbb-gap); }
.tbb-cg__grid .tbb-card { height: 100%; min-height: 0; aspect-ratio: auto; }
@media (max-width: 960px) {
	.tbb-cg { grid-template-columns: minmax(0, 1fr); height: auto; }
	.tbb-cg__slider { height: min(var(--tbb-hero-h, 520px), 420px); }
	.tbb-cg__grid { grid-auto-rows: 220px; }
}
@media (max-width: 560px) { .tbb-cg__grid { grid-template-columns: minmax(0, 1fr); } }
/* Selon la largeur réelle de la zone (colonne étroite, thème à contenu limité), pas seulement celle de l'écran. */
.tbb-cg-wrap { container-type: inline-size; min-width: 0; }
@container (max-width: 760px) {
	.tbb-cg { grid-template-columns: minmax(0, 1fr); height: auto; }
	.tbb-cg__slider { height: min(var(--tbb-hero-h, 520px), 420px); }
	.tbb-cg__grid { grid-auto-rows: 220px; }
	/* Flèches en haut à droite : elles ne passent plus sur le titre ni sur la catégorie. */
	.tbb-cg__slider .tbb-slider .tbb-nav { top: 14px; margin-top: 0; width: 38px; height: 38px; }
	.tbb-cg__slider .tbb-nav--prev { left: auto; right: 62px; }
	.tbb-cg__slider .tbb-nav--next { right: 14px; }
}
@container (max-width: 480px) {
	.tbb-cg__grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Express ---------- */
.tbb-grid--express-grid > :first-child { grid-column: span 2; grid-row: span 2; min-height: 340px; height: 100%; }
.tbb-grid--express-grid > .tbb-card--cards { align-self: stretch; }
.tbb-express { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--tbb-gap); align-items: stretch; }
.tbb-express > * { min-width: 0; }
.tbb-express__lead .tbb-card { height: 100%; min-height: 420px; }
.tbb-express__list { display: flex; flex-direction: column; justify-content: space-between; }
.tbb-express__list .tbb-card--minimal:last-child { border-bottom: 0; }
@media (max-width: 1024px) {
	.tbb-grid--express-grid > :first-child { grid-row: auto; }
}
@media (max-width: 860px) {
	.tbb-express { grid-template-columns: minmax(0, 1fr); }
	.tbb-express__lead .tbb-card { min-height: 340px; }
}

/* ---------- Tuiles mosaïque ---------- */
.tbb-grid--tile-masonry { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(150px, 15vw, 210px); }
.tbb-grid--tile-masonry .tbb-card--overlay { height: 100%; min-height: 0; aspect-ratio: auto; }
.tbb-grid--tile-masonry > :nth-child(1) { grid-column: span 2; grid-row: span 2; }
.tbb-grid--tile-masonry > :nth-child(3) { grid-row: span 2; }
.tbb-grid--tile-masonry > :nth-child(5) { grid-column: span 2; }
@media (max-width: 1024px) {
	.tbb-grid--tile-masonry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tbb-grid--tile-masonry > :nth-child(n) { grid-column: auto; grid-row: auto; }
	.tbb-grid--tile-masonry > :nth-child(1) { grid-column: span 2; grid-row: span 2; }
}
@media (max-width: 560px) {
	.tbb-grid--tile-masonry > :nth-child(n) { grid-column: 1 / -1; grid-row: auto; }
}

/* ---------- Tags / catégories populaires ---------- */
.tbb-tile {
	position: relative;
	isolation: isolate;
	display: flex;
	align-items: flex-end;
	min-height: clamp(150px, 16vw, 210px);
	overflow: hidden;
	color: #fff;
	background: #15171b;
	border-radius: var(--tbb-radius);
	box-shadow: var(--tbb-shadow);
	transition: transform .3s ease;
}
.tbb--h .tbb-tile { height: var(--tbb-card-h); min-height: 0; }
.tbb-tile__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.tbb-tile__media::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(to top, rgba(var(--tbb-ov-rgb, 8, 9, 12), var(--tbb-ov-a, .88)) 0%, rgba(var(--tbb-ov-rgb, 8, 9, 12), .3) 62%, rgba(var(--tbb-ov-rgb, 8, 9, 12), .12) 100%); }
.tbb-tile__body { display: flex; flex-direction: column; gap: 2px; width: calc(100% - 36px); margin: 0 0 18px 18px; padding: 4px 0 4px 14px; border-left: 3px solid var(--tbb-accent); }
.tbb .tbb-tile__name { font-family: var(--tbb-font-title, var(--tbb-font-heading, inherit)); font-size: var(--tbb-title-size, clamp(1rem, .5vw + .9rem, 1.25rem)); font-weight: var(--tbb-title-w, 800); line-height: 1.2; letter-spacing: .02em; text-transform: var(--tbb-title-tt, uppercase); color: var(--tbb-title-c, #fff); }
.tbb .tbb-tile:hover .tbb-tile__name { color: var(--tbb-title-h, #fff); }
.tbb-tile__count { font-size: var(--tbb-meta-size, .78rem); color: var(--tbb-meta-ov, rgba(255, 255, 255, .82)); }

.tbb-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.tbb .tbb-pill {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 9px 16px;
	font-size: var(--tbb-title-size, .92rem);
	font-weight: var(--tbb-title-w, 600);
	text-transform: var(--tbb-title-tt, none);
	color: var(--tbb-title-c, var(--tbb-ink));
	background: var(--tbb-surface);
	border-radius: 999px;
	box-shadow: inset 0 0 0 1px var(--tbb-line);
	transition: background .2s, color .2s, box-shadow .2s, transform .2s;
}
.tbb .tbb-pill:hover { color: var(--tbb-title-h, var(--tbb-accent-ink)); background: var(--tbb-cat-bg, var(--tbb-accent)); box-shadow: none; }
.tbb-pill em { font-style: normal; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--tbb-line); color: var(--tbb-ink); }
:is(.tbb--hover-lift, .tbb--hover-zoom-lift) .tbb-pill:hover { transform: translateY(-2px); }

.tbb-termlist { background: var(--tbb-surface); border-radius: var(--tbb-radius); box-shadow: var(--tbb-shadow); padding: 4px 20px !important; }
.tbb .tbb-termlist a { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--tbb-line); font-size: var(--tbb-title-size, 1rem); font-weight: var(--tbb-title-w, 600); text-transform: var(--tbb-title-tt, none); color: var(--tbb-title-c, var(--tbb-ink)); }
.tbb-termlist li:last-child a { border-bottom: 0; }
.tbb .tbb-termlist a:hover { color: var(--tbb-title-h, var(--tbb-accent)); }
.tbb-termlist__count { min-width: 2.2em; padding: 2px 9px; font-size: .74rem; font-weight: 700; text-align: center; border-radius: 999px; color: var(--tbb-accent-ink); background: var(--tbb-accent); }

/* ---------- Classement numérique ---------- */
.tbb-ranked { counter-reset: tbbr; padding: 4px clamp(16px, 2vw, 26px) !important; color: var(--tbb-ink); background: var(--tbb-surface); border-radius: var(--tbb-radius); box-shadow: var(--tbb-shadow); }
.tbb-ranked__item { counter-increment: tbbr; position: relative; display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--tbb-line); }
.tbb-ranked__item:last-child { border-bottom: 0; }
.tbb-ranked__num { flex: none; min-width: 2.1ch; font: 800 clamp(1.7rem, 2vw, 2.2rem)/1 var(--tbb-font-heading, inherit); color: var(--tbb-accent); font-variant-numeric: tabular-nums; }
.tbb-ranked__num::before { content: counter(tbbr, decimal-leading-zero); }
.tbb-ranked__thumb { position: relative; flex: none; width: var(--tbb-img-w, 76px); aspect-ratio: 1; overflow: hidden; border-radius: calc(var(--tbb-radius) * .6); background: #1c1f25; }
.tbb-ranked__body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tbb .tbb-ranked__title { margin: 0; font-family: var(--tbb-font-title, var(--tbb-font-heading, inherit)); font-size: var(--tbb-title-size, 1.02rem); font-weight: var(--tbb-title-w, 700); line-height: 1.3; text-transform: var(--tbb-title-tt, none); color: var(--tbb-title-c, inherit); }
.tbb .tbb-ranked__title a:hover { color: var(--tbb-title-h, var(--tbb-accent)); }

/* ---------- Flash : bandeau d'actualités ---------- */
.tbb-ticker {
	display: flex;
	align-items: stretch;
	overflow: hidden;
	margin-block: clamp(14px, 2vw, 24px);
	font-size: var(--tbb-title-size, .92rem);
	color: var(--tbb-tk-c, #f2efe9);
	background: var(--tbb-tk-bg, #14171c);
	border-radius: calc(var(--tbb-radius) * .7);
}
.tbb-ticker__label { flex: none; display: flex; align-items: center; gap: 9px; padding: 0 18px; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--tbb-accent-ink); background: var(--tbb-accent); }
.tbb-ticker__label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: tbb-pulse 1.8s ease-in-out infinite; }
.tbb-ticker__viewport {
	position: relative;
	flex: 1;
	min-width: 0;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
}
.tbb-ticker__track { display: flex; width: max-content; animation: tbb-marquee var(--tbb-ticker-dur, 60s) linear infinite; }
.tbb-ticker:hover .tbb-ticker__track, .tbb-ticker:focus-within .tbb-ticker__track { animation-play-state: paused; }
.tbb-ticker__list { display: flex; flex: none; }
.tbb-ticker__item { display: flex; align-items: center; gap: 12px; padding: 14px 0 14px 34px; white-space: nowrap; }
.tbb-ticker__item::after { content: ""; width: 5px; height: 5px; margin-left: 34px; border-radius: 50%; background: var(--tbb-accent); }
.tbb-ticker__date { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .6; }
.tbb .tbb-ticker__item a { color: inherit; font-weight: 500; }
.tbb .tbb-ticker__item a:hover { text-decoration: underline; }

.tbb-rotor { min-height: 3em; mask-image: none; -webkit-mask-image: none; }
.tbb-rotor__item { position: absolute; inset: 0; display: flex; align-items: center; gap: 12px; padding: 0 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(70%); transition: opacity .45s ease, transform .45s ease; pointer-events: none; }
.tbb-rotor__item > span { overflow: hidden; text-overflow: ellipsis; }
.tbb-rotor__item.is-active { opacity: 1; transform: none; pointer-events: auto; }
.tbb-rotor__item.is-leaving { opacity: 0; transform: translateY(-70%); }
.tbb .tbb-rotor__item:hover > span { text-decoration: underline; }
.tbb-rotor__nav { flex: none; display: flex; align-items: center; gap: 6px; padding: 0 10px; }
.tbb .tbb-nav--flash { width: 28px; height: 28px; font-size: 1.2rem; background: rgba(255, 255, 255, .12); }
@keyframes tbb-marquee { to { transform: translateX(-50%); } }
@keyframes tbb-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.7); } }
@media (max-width: 560px) { .tbb-ticker__label { padding: 0 12px; font-size: .66rem; } }

/* ---------- Animation d'apparition (activée seulement quand le script est chargé) ---------- */
.tbb-js .tbb--anim :is(.tbb-card, .tbb-tile, .tbb-ranked__item, .tbb-pill):not(.is-in) { opacity: 0; }
.tbb-js .tbb--anim[data-tbb-anim="rise"] :is(.tbb-card, .tbb-tile, .tbb-ranked__item, .tbb-pill):not(.is-in) { transform: translateY(26px); }
.tbb-js .tbb--anim[data-tbb-anim="zoom"] :is(.tbb-card, .tbb-tile, .tbb-ranked__item, .tbb-pill):not(.is-in) { transform: scale(.94); }
.tbb--anim :is(.tbb-card, .tbb-tile, .tbb-ranked__item, .tbb-pill).is-in { animation: tbb-in .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--tbb-i, 0) * 70ms); }
@keyframes tbb-in { from { opacity: 0; transform: translateY(var(--tbb-from-y, 0)) scale(var(--tbb-from-s, 1)); } to { opacity: 1; transform: none; } }
.tbb--anim[data-tbb-anim="rise"] { --tbb-from-y: 26px; }
.tbb--anim[data-tbb-anim="zoom"] { --tbb-from-s: .94; }

/* ---------- Préférences de mouvement ---------- */
@media (prefers-reduced-motion: reduce) {
	.tbb *, .tbb *::before, .tbb *::after { transition: none !important; animation: none !important; }
	.tbb-js .tbb--anim :is(.tbb-card, .tbb-tile, .tbb-ranked__item, .tbb-pill):not(.is-in) { opacity: 1; transform: none; }
	.tbb-ticker__viewport:not(.tbb-rotor) { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
	.tbb-ticker__list[aria-hidden="true"] { display: none; }
}

/* ---------- Robustesse face aux thèmes ---------- */
/* Les liens de titre gardent la couleur choisie dans le bloc, même si le thème impose la sienne aux liens. */
.tbb .tbb-card__title a,
.tbb .tbb-titles__title a,
.tbb .tbb-ranked__title a { color: inherit !important; }
.tbb .tbb-card__title a:hover,
.tbb .tbb-titles__title a:hover,
.tbb .tbb-ranked__title a:hover { color: var(--tbb-title-h, var(--tbb-accent)) !important; }
.tbb .tbb-card--overlay .tbb-card__title a:hover { color: var(--tbb-title-h, #fff) !important; }
/* Dans une grille ou un flex du thème, le bloc occupe toute la largeur disponible. */
.tbb { align-self: stretch; justify-self: stretch; min-width: 0; max-width: 100%; }

/* ---------- Couleurs des bannières et cartes superposées (1.1.3) ---------- */
.tbb .tbb-card--overlay .tbb-card__excerpt { color: var(--tbb-text-ov, rgba(255, 255, 255, .86)) !important; }
.tbb .tbb-card--overlay .tbb-card__meta, .tbb .tbb-card--overlay .tbb-card__meta * { color: var(--tbb-meta-ov, rgba(255, 255, 255, .82)) !important; }
.tbb--has-accent .tbb-card--overlay .tbb-card__body::before { content: ""; flex: none; width: 38px; height: 4px; border-radius: 2px; background: var(--tbb-accent); }
.tbb--has-accent .tbb-card--overlay .tbb-card__more { color: var(--tbb-accent) !important; }
.tbb--has-accent .tbb-nav:not(.tbb-nav--inline) { background: var(--tbb-accent); color: var(--tbb-accent-ink); }
.tbb--has-accent .tbb-slider__dots button[aria-current="true"] { background: var(--tbb-accent); }
.tbb--has-border .tbb-card--overlay { outline: 2px solid var(--tbb-line); outline-offset: -2px; }
.tbb--has-border .tbb-slider__track { outline: 2px solid var(--tbb-line); outline-offset: -2px; }
.tbb--has-border .tbb-hero__list, .tbb--has-border .tbb-hero__titles { box-shadow: inset 0 0 0 1px var(--tbb-line); }

/* ---------- Flèches de navigation : couleurs réglables (1.1.6) ---------- */
.tbb .tbb-nav { background: var(--tbb-nav-bg, rgba(12, 13, 16, .55)); color: var(--tbb-nav-c, #fff); }
.tbb .tbb-nav--inline { background: var(--tbb-nav-bg, var(--tbb-surface)); color: var(--tbb-nav-c, var(--tbb-ink)); }
.tbb .tbb-nav--flash { background: var(--tbb-nav-bg, rgba(255, 255, 255, .12)); color: var(--tbb-nav-c, inherit); }
.tbb--has-accent .tbb-nav:not(.tbb-nav--inline) { background: var(--tbb-nav-bg, var(--tbb-accent)); color: var(--tbb-nav-c, var(--tbb-accent-ink)); }
.tbb .tbb-nav:hover:not(:disabled) { background: var(--tbb-nav-hbg, var(--tbb-accent)); color: var(--tbb-nav-hc, var(--tbb-accent-ink)); }

/* ---------- Carrousel à défilement continu (1.2.0) ---------- */
.tbb-carousel--marquee { container-type: normal; }
.tbb-marq { position: relative; overflow: hidden; container-type: inline-size; padding: 6px 0 24px; margin: -6px 0 -18px; direction: ltr;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--tbb-fade, 4%), #000 calc(100% - var(--tbb-fade, 4%)), transparent); mask-image: linear-gradient(90deg, transparent, #000 var(--tbb-fade, 4%), #000 calc(100% - var(--tbb-fade, 4%)), transparent); }
.tbb-marq__track { display: flex; width: max-content; animation: tbbMarq var(--tbb-marq-dur, 40s) linear infinite; will-change: transform; }
.tbb-marq[data-dir="ltr"] .tbb-marq__track { animation-direction: reverse; }
.tbb-marq__set { display: flex; gap: var(--tbb-gap); padding-right: var(--tbb-gap); flex: none; }
.tbb-marq__copy { display: contents; }
.tbb-marq-wrap[data-pause="1"]:hover .tbb-marq__track, .tbb-marq-wrap[data-pause="1"]:focus-within .tbb-marq__track { animation-play-state: paused; }
.tbb-marq .tbb-card { flex: 0 0 calc((100cqw - var(--tbb-gap) * (var(--tbb-cols) - 1)) / var(--tbb-cols)); min-width: 0; }
.tbb-marq .tbb-card--overlay { aspect-ratio: var(--tbb-ratio, 4/3); min-height: 240px; }
.tbb--h .tbb-marq .tbb-card--overlay { height: var(--tbb-card-h); min-height: 0; aspect-ratio: auto; }
@media (max-width: 640px) { .tbb-marq .tbb-card { flex-basis: min(82cqw, 320px); } }
@keyframes tbbMarq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
	.tbb-marq { overflow-x: auto; -webkit-mask-image: none; mask-image: none; scroll-snap-type: x mandatory; }
	.tbb-marq__track { animation: none !important; }
	.tbb-marq .tbb-card { scroll-snap-align: start; }
	.tbb-marq__dup, .tbb-marq__copy { display: none; }
}
.tbb-marq-wrap { position: relative; }
.tbb--no-fade .tbb-marq { -webkit-mask-image: none; mask-image: none; }
.tbb .tbb-nav--side { position: absolute; top: 50%; margin-top: -28px; z-index: 6; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.tbb .tbb-nav--side.tbb-nav--prev { left: 8px; right: auto; }
.tbb .tbb-nav--side.tbb-nav--next { right: 8px; left: auto; }
@media (max-width: 640px) { .tbb .tbb-nav--side { width: 38px; height: 38px; margin-top: -25px; } .tbb .tbb-nav--side.tbb-nav--prev { left: 6px; right: auto; } }
