/* Silent Insta Feed — styles publics */
.fif-feed {
	--fif-cols: 4; --fif-cols-t: 3; --fif-cols-m: 2;
	--fif-gap: 8px; --fif-radius: 0px; --fif-ratio: 1 / 1;
	--fif-overlay: rgba(0,0,0,.55);
	--fif-btn: #262626; --fif-btn-txt: #fff;
	--fif-flw: #e1306c; --fif-flw-txt: #fff;
	--fif-hdr-bg: #111; --fif-pad: 0px;
	--fif-c: var(--fif-cols);
	box-sizing: border-box;
	width: 100%;
	margin: 0 auto 1.5em;
	padding: var(--fif-pad);
	background: var(--fif-bg, transparent);
	color: var(--fif-text, inherit);
	font-size: 15px;
	line-height: 1.45;
}
.fif-feed *, .fif-feed *::before, .fif-feed *::after { box-sizing: border-box; }
/* Colonnes selon la LARGEUR DU FLUX (pas de l'écran) : même rendu sur le site,
   dans une colonne étroite, dans Elementor et dans l'aperçu de l'extension. */
.fif-feed { container-type: inline-size; container-name: fif; }
.fif-feed > * { --fif-c: var(--fif-cols); }
@container fif (max-width: 820px) { .fif-feed > * { --fif-c: var(--fif-cols-t); } }
@container fif (max-width: 560px) { .fif-feed > * { --fif-c: var(--fif-cols-m); } }
@supports not (container-type: inline-size) {
	@media (max-width: 1024px) { .fif-feed > * { --fif-c: var(--fif-cols-t); } }
	@media (max-width: 600px)  { .fif-feed > * { --fif-c: var(--fif-cols-m); } }
}

.fif-icon { display: inline-block; vertical-align: middle; flex: none; }

/* ---------- En-tête ---------- */
.fif-header { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.fif-avatar { flex: none; display: block; width: 76px; height: 76px; border-radius: 50%; overflow: hidden; padding: 3px; background: linear-gradient(45deg,#f9ce34,#ee2a7b,#6228d7); }
.fif-avatar img, .fif-avatar-ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid #fff; background: #eee; color: #999; }
.fif-header-small .fif-avatar { width: 54px; height: 54px; }
.fif-header-large .fif-avatar { width: 110px; height: 110px; }
.fif-header-text { min-width: 0; flex: 1; }
.fif-header-names { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.fif-username { font-weight: 700; font-size: 1.15em; color: inherit !important; text-decoration: none !important; }
.fif-header-large .fif-username { font-size: 1.45em; }
.fif-name { opacity: .75; }
.fif-counts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; font-size: .92em; }
.fif-bio { margin-top: 6px; font-size: .92em; opacity: .9; white-space: normal; }
.fif-bio a, .fif-caption-text a { color: inherit; font-weight: 600; text-decoration: none; }
.fif-header-follow { flex: none; }
.fif-header-centered { flex-direction: column; text-align: center; }
.fif-header-centered .fif-header-names, .fif-header-centered .fif-counts { justify-content: center; }
.fif-header-boxed { background: var(--fif-hdr-bg); color: #fff; padding: 20px; border-radius: var(--fif-radius); }
.fif-header-boxed .fif-avatar img { border-color: var(--fif-hdr-bg); }
@container fif (max-width: 560px) {
	.fif-header { flex-wrap: wrap; gap: 12px; font-size: 13px; }
	.fif-avatar { width: 58px; height: 58px; }
	.fif-header-large .fif-avatar { width: 76px; height: 76px; }
	.fif-username { font-size: 1.05em; }
	.fif-header-follow { width: 100%; }
	.fif-header-follow .fif-btn { width: 100%; justify-content: center; }
}

/* ---------- Grille ---------- */
.fif-items { display: grid; grid-template-columns: repeat(var(--fif-c), minmax(0, 1fr)); gap: var(--fif-gap); }
.fif-item { position: relative; min-width: 0; display: flex; flex-direction: column; }
.fif-link { position: relative; display: block; overflow: hidden; border-radius: var(--fif-radius); color: #fff !important; text-decoration: none !important; cursor: pointer; background: #f2f2f2; }
.fif-media { display: block; aspect-ratio: var(--fif-ratio); overflow: hidden; }
.fif-media img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0 !important; max-width: none; border-radius: 0 !important; transition: transform .45s ease, opacity .3s; }
.fif-ratio-original .fif-media { aspect-ratio: auto; }
.fif-ratio-original .fif-media img { height: auto; }
.fif-ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 120px; color: #bbb; }
.fif-ph .fif-icon { width: 34px; height: 34px; }
.fif-item.fif-broken .fif-media img { opacity: 0; }

/* Badges vidéo / album */
.fif-badge { position: absolute; top: 8px; right: 8px; z-index: 2; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); pointer-events: none; }
.fif-badge .fif-icon { width: 20px; height: 20px; }

/* Survol */
.fif-overlay { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px; background: var(--fif-overlay); opacity: 0; transition: opacity .25s ease; text-align: center; }
.fif-link:hover .fif-overlay, .fif-link:focus-visible .fif-overlay { opacity: 1; }
.fif-stats { display: flex; gap: 16px; font-weight: 700; font-size: 1em; }
.fif-stats span { display: inline-flex; align-items: center; gap: 5px; }
.fif-ov-caption { font-size: .85em; line-height: 1.35; max-height: 60%; overflow: hidden; }
.fif-hover-zoom .fif-link:hover img, .fif-hover-both .fif-link:hover img { transform: scale(1.07); }
@media (hover: none) { .fif-overlay { display: none; } }

/* Légende sous la vignette / cartes */
.fif-caption { padding: 8px 2px 4px; font-size: .9em; }
.fif-caption-text { word-wrap: break-word; }
.fif-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; font-size: .88em; opacity: .75; }
.fif-meta span { display: inline-flex; align-items: center; gap: 4px; }
.fif-meta .fif-icon { width: 14px; height: 14px; }
.fif-layout-cards .fif-item { background: #fff; color: #222; border-radius: var(--fif-radius); box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 14px rgba(0,0,0,.06); overflow: hidden; }
.fif-layout-cards .fif-link { border-radius: 0; }
.fif-layout-cards .fif-caption { padding: 12px 14px 14px; }

/* Mosaïque */
.fif-layout-masonry .fif-items { display: block; column-count: var(--fif-c); column-gap: var(--fif-gap); }
.fif-layout-masonry .fif-item { break-inside: avoid; margin-bottom: var(--fif-gap); }

/* Mise en avant */
.fif-layout-highlight .fif-items { grid-auto-flow: dense; }
.fif-layout-highlight .fif-big { grid-column: span 2; grid-row: span 2; }
.fif-layout-highlight .fif-big .fif-link, .fif-layout-highlight .fif-big .fif-media { height: 100%; }
@container fif (max-width: 560px) { .fif-layout-highlight > * { --fif-c: max(2, var(--fif-cols-m)); } }

/* Carrousel */
.fif-layout-carousel .fif-carousel { position: relative; }
.fif-layout-carousel .fif-items { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.fif-layout-carousel .fif-items::-webkit-scrollbar { display: none; }
.fif-layout-carousel .fif-item { flex: 0 0 calc((100% - (var(--fif-c) - 1) * var(--fif-gap)) / var(--fif-c)); scroll-snap-align: start; }
.fif-arrow { position: absolute; top: 50%; z-index: 5; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: #222; box-shadow: 0 2px 10px rgba(0,0,0,.2); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 20px; line-height: 1; padding: 0; transition: opacity .2s; }
.fif-arrow:hover { background: #fff; }
.fif-arrow[disabled] { opacity: 0; pointer-events: none; }
.fif-prev { left: 8px; } .fif-next { right: 8px; }
.fif-dots { display: flex; justify-content: center; gap: 7px; margin-top: 12px; }
.fif-dots button { color: inherit; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: currentColor; opacity: .25; cursor: pointer; transition: opacity .2s, transform .2s; }
.fif-dots button.is-active { opacity: .85; transform: scale(1.25); }

/* Défilement continu (bandeau) */
.fif-layout-marquee .fif-marquee { position: relative; overflow: hidden; width: 100%; }
.fif-layout-marquee .fif-items { display: flex; gap: 0; width: max-content; will-change: transform; animation: fif-marquee var(--fif-mq-dur, 60s) linear infinite; }
.fif-layout-marquee .fif-item { flex: 0 0 var(--fif-mq-w, 220px); width: var(--fif-mq-w, 220px); margin-right: var(--fif-gap); }
.fif-layout-marquee.fif-mq-right .fif-items { animation-direction: reverse; }
.fif-layout-marquee.fif-mq-pause .fif-marquee:hover .fif-items,
.fif-layout-marquee .fif-marquee:focus-within .fif-items { animation-play-state: paused; }
.fif-layout-marquee:not(.fif-mq-ready) .fif-items { animation: none; }
@keyframes fif-marquee { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }
@media (prefers-reduced-motion: reduce) {
	.fif-layout-marquee .fif-marquee { overflow-x: auto; }
	.fif-layout-marquee .fif-items { animation: none !important; }
	.fif-layout-marquee .fif-clone { display: none; }
}

/* Boutons */
.fif-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.fif-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 22px; border: 0; border-radius: 999px; font: inherit; font-weight: 600; font-size: .95em; line-height: 1.2; cursor: pointer; text-decoration: none !important; transition: filter .2s, transform .1s; }
.fif-btn:hover { filter: brightness(1.12); }
.fif-btn:active { transform: scale(.98); }
.fif-load-more { background: var(--fif-btn); color: var(--fif-btn-txt) !important; }
.fif-load-more.is-loading { opacity: .6; pointer-events: none; }
.fif-follow { background: var(--fif-flw); color: var(--fif-flw-txt) !important; }
.fif-follow.fif-gradient { background: linear-gradient(45deg,#f09433,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888); }
.fif-notice { padding: 12px 16px; border-left: 4px solid #d63638; background: #fff5f5; color: #50575e; font-size: 14px; }
.fif-empty { text-align: center; opacity: .7; }

/* ---------- Lightbox ---------- */
.fif-lb { position: fixed; inset: 0; z-index: 999999; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.88); padding: 30px 70px; font-size: 15px; line-height: 1.45; }
.fif-lb.is-open { display: flex; animation: fif-fade .2s ease; }
@keyframes fif-fade { from { opacity: 0; } to { opacity: 1; } }
.fif-lb-box { display: flex; width: 100%; max-width: 1100px; max-height: 100%; background: #fff; color: #222; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.fif-lb-stage { position: relative; flex: 1 1 auto; min-width: 0; background: #000; display: flex; align-items: center; justify-content: center; min-height: 300px; }
.fif-lb-stage img, .fif-lb-stage video { display: block; max-width: 100%; max-height: calc(100vh - 60px); width: auto; height: auto; margin: 0 auto; }
.fif-lb-side { flex: 0 0 340px; display: flex; flex-direction: column; max-height: calc(100vh - 60px); }
.fif-lb-user { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #eee; font-weight: 700; }
.fif-lb-user a { color: inherit; text-decoration: none; }
.fif-lb-cap { flex: 1; overflow-y: auto; padding: 14px 16px; white-space: normal; word-wrap: break-word; font-size: .95em; }
.fif-lb-cap a { color: #00376b; text-decoration: none; }
.fif-lb-foot { padding: 12px 16px; border-top: 1px solid #eee; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: .9em; }
.fif-lb-foot span { display: inline-flex; align-items: center; gap: 4px; }
.fif-lb-foot time { opacity: .6; }
.fif-lb-foot a { margin-left: auto; color: #0095f6; font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.fif-lb-btn { position: absolute; z-index: 3; border: 0; background: rgba(255,255,255,.15); color: #fff; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 24px; line-height: 1; padding: 0; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.fif-lb-btn:hover { background: rgba(255,255,255,.3); }
.fif-lb-close { top: 14px; right: 14px; }
.fif-lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.fif-lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.fif-lb-sub { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255,255,255,.85); color: #222; cursor: pointer; font-size: 18px; padding: 0; z-index: 2; }
.fif-lb-sub.prev { left: 10px; } .fif-lb-sub.next { right: 10px; }
.fif-lb-subdots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.fif-lb-subdots i { width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .45; }
.fif-lb-subdots i.is-active { opacity: 1; }
body.fif-lb-open { overflow: hidden; }
@media (max-width: 800px) {
	.fif-lb { padding: 0; }
	.fif-lb-box { flex-direction: column; border-radius: 0; height: 100%; max-height: none; overflow-y: auto; }
	.fif-lb-stage { flex: none; min-height: 0; }
	.fif-lb-stage img, .fif-lb-stage video { max-height: 70vh; }
	.fif-lb-side { flex: 1 0 auto; max-height: none; }
	.fif-lb-prev, .fif-lb-next { top: auto; bottom: 14px; transform: none; background: rgba(0,0,0,.5); }
	.fif-lb-close { background: rgba(0,0,0,.5); }
}
@media (prefers-reduced-motion: reduce) {
	.fif-media img, .fif-overlay, .fif-lb.is-open { transition: none; animation: none; }
	.fif-layout-carousel .fif-items { scroll-behavior: auto; }
}
