/* FMAC — Fil Instagram intégré : bandeau fin, vignettes au format réel des publications.
   Utilisé sur la page d’accueil et partout via le code court [fmac-instagram]. */
.fmac-ig { width: 100%; }
/* Valeurs par défaut hors des pages modernes (sur l’accueil, les réglages « Apparence » s’appliquent). */
.fmac-ig:not(.fmac .fmac-ig) { --fm-r: 1; --fm-deep: #17213f; --fm-navy: #253152; --fm-insta-bg: #d7deef; --fm-insta-ring: #c4cdee; --fm-border: #e0e5f0; }
.fmac-ig *, .fmac-ig *::before, .fmac-ig *::after { box-sizing: border-box; }

/* Bandeau : même hauteur pour toutes les vignettes, largeur selon le format de chaque publication
   (4:5, 3:4, carré…) : l’image s’affiche toujours en entier. */
.fmac-ig .fmac-ig__band { display: flex; gap: 8px; margin: 0; padding: 0 8px; list-style: none; }
.fmac-ig .fm-ig-item { position: relative; flex: var(--r, .8) 1 0px; min-width: 0; aspect-ratio: var(--r, .8); margin: 0; padding: 0; list-style: none; overflow: hidden; border-radius: calc(6px * var(--fm-r)); background: var(--fm-insta-bg); }
.fmac-ig .fm-ig-item::before { content: none; }
.fmac-ig .fm-ig-item a { display: block; width: 100%; height: 100%; }
.fmac-ig .fm-ig-item img { display: block; width: 100%; height: 100%; max-width: none; margin: 0; object-fit: cover; border-radius: 0; transition: transform .5s cubic-bezier(.2, .7, .2, 1), filter .3s; }
.fmac-ig .fm-ig-item a:hover img, .fmac-ig .fm-ig-item a:focus-visible img { transform: scale(1.04); filter: brightness(.92); }
.fmac-ig .fm-ig-item a:focus-visible { outline: 3px solid #b4509c; outline-offset: -3px; }
.fmac-ig .fm-ig-badge { position: absolute; top: 7px; right: 7px; width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--fm-deep) 50%, transparent); pointer-events: none; }
.fmac-ig .fm-ig-badge::after { content: ""; position: absolute; inset: 5px; background: #fff; -webkit-mask: var(--fm-ig-icon) center / contain no-repeat; mask: var(--fm-ig-icon) center / contain no-repeat; }
.fmac-ig .fm-ig-item--video { --fm-ig-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.5v13l11-6.5z'/%3E%3C/svg%3E"); }
.fmac-ig .fm-ig-item--carousel_album { --fm-ig-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2'%3E%3Crect x='7' y='3' width='14' height='14' rx='2'/%3E%3Cpath d='M17 21H5a2 2 0 0 1-2-2V7'/%3E%3C/svg%3E"); }

/* Profil et bouton, centrés sous le bandeau */
.fmac-ig .fmac-ig__foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 22px; margin-top: 24px; padding: 0 18px; }
.fmac-ig .fmac-ig__profile { display: inline-flex; align-items: center; gap: 10px; color: var(--fm-navy); font-size: 13px; font-weight: 700; text-decoration: none; }
.fmac-ig .fmac-ig__profile:hover span { text-decoration: underline; text-underline-offset: 3px; }
.fmac-ig .fmac-ig__avatar { display: block; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--fm-insta-ring); }
.fmac-ig .fmac-ig__follow { display: inline-flex; align-items: center; gap: 10px; min-height: 42px; padding: 10px 18px; border: 1px solid var(--fm-border); border-radius: calc(9px * var(--fm-r)); background: #fff; color: var(--fm-navy); font-size: 12px; font-weight: 700; line-height: 1.3; text-decoration: none; transition: transform .25s, box-shadow .25s, border-color .25s; }
.fmac-ig .fmac-ig__follow::before { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.5' cy='6.5' r='1' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.5' cy='6.5' r='1' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat; }
.fmac-ig .fmac-ig__follow:hover { transform: translateY(-2px); border-color: var(--fm-navy); box-shadow: 0 8px 20px #20305018; }
.fmac-ig .fmac-ig__follow:focus-visible, .fmac-ig .fmac-ig__profile:focus-visible { outline: 3px solid #b4509c; outline-offset: 3px; }

/* Tablette et mobile : bandeau défilant horizontalement, hauteur fixe */
@media (max-width: 860px) {
	.fmac-ig .fmac-ig__band { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 18px; padding: 0 18px; scrollbar-width: none; }
	.fmac-ig .fmac-ig__band::-webkit-scrollbar { display: none; }
	.fmac-ig .fm-ig-item { flex: 0 0 auto; height: clamp(160px, 44vw, 230px); width: auto; scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) { .fmac-ig * { transition: none !important; } }
