
.m2gal{display:grid;gap:3px;border-radius:12px;overflow:hidden;margin:12px 0 4px;background:#e4e6eb;width:100%}
.m2gal>a{position:relative;display:block;overflow:hidden;background:#e4e6eb;cursor:zoom-in;min-height:0;min-width:0}
.m2gal>a>img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .25s ease}
.m2gal>a:hover>img{transform:scale(1.02)}
.m2gal .m2g-more{position:absolute;inset:0;background:rgba(15,23,42,.55);color:#fff;display:flex;align-items:center;justify-content:center;font-size:30px;font-weight:700}
/* 1 photo : image entiere, jamais coupee */
/* 1 photo : pleine largeur, comme Facebook / TikTok (portrait jusqu'a 4:5, paysage jusqu'a 1.91:1) */
.m2gal.m2g-1{display:block;background:#000}
.m2gal.m2g-1>a{aspect-ratio:var(--m2r,1);max-height:min(760px,85vh);width:100%}
.m2gal.m2g-1>a>img{width:100%;height:100%;object-fit:cover}
.m2gal.m2g-1>a:hover>img{transform:none}
img[data-m2single]{display:block!important;width:100%!important;max-width:100%!important;aspect-ratio:var(--m2r,1);height:auto!important;max-height:min(760px,85vh)!important;object-fit:cover!important;margin:0!important}
/* 2 photos cote a cote */
.m2gal.m2g-2{grid-template-columns:1fr 1fr;height:340px}
/* 3 photos : une grande a gauche, deux a droite */
.m2gal.m2g-3{grid-template-columns:2fr 1fr;grid-template-rows:1fr 1fr;height:420px}
.m2gal.m2g-3>a:first-child{grid-row:1/3}
/* 4 photos : une grande en haut, trois dessous */
.m2gal.m2g-4{grid-template-columns:repeat(3,1fr);grid-template-rows:2fr 1fr;height:460px}
.m2gal.m2g-4>a:first-child{grid-column:1/4}
/* 5 photos et plus : deux en haut, trois en bas (+N sur la derniere) */
.m2gal.m2g-5{grid-template-columns:repeat(6,1fr);grid-template-rows:3fr 2fr;height:460px}
.m2gal.m2g-5>a:nth-child(1),.m2gal.m2g-5>a:nth-child(2){grid-column:span 3}
.m2gal.m2g-5>a:nth-child(n+3){grid-column:span 2}
@media(max-width:575px){.m2gal.m2g-2{height:220px}.m2gal.m2g-3,.m2gal.m2g-4,.m2gal.m2g-5{height:300px}}
/* visionneuse */
.m2lb{position:fixed;inset:0;z-index:2147483400;background:rgba(0,0,0,.94);display:flex;align-items:center;justify-content:center;touch-action:pan-y}
.m2lb[hidden]{display:none!important}
.m2lb img{max-width:96vw;max-height:88vh;object-fit:contain;user-select:none;-webkit-user-drag:none}
.m2lb button{position:absolute;border:0;background:rgba(255,255,255,.14);color:#fff;width:46px;height:46px;border-radius:50%;font-size:22px;display:grid;place-items:center;cursor:pointer}
.m2lb button:hover{background:rgba(255,255,255,.26)}
.m2lb .x{top:14px;right:14px}.m2lb .p{left:14px;top:50%;margin-top:-23px}.m2lb .n{right:14px;top:50%;margin-top:-23px}
.m2lb .c{position:absolute;top:22px;left:50%;transform:translateX(-50%);color:#fff;font:600 14px system-ui,sans-serif;background:rgba(255,255,255,.12);padding:4px 12px;border-radius:999px}
@media(max-width:575px){.m2lb .p,.m2lb .n{display:none}}
/* statut : plusieurs photos */
.m2st-strip{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.m2st-strip img{width:52px;height:52px;object-fit:cover;border-radius:8px;border:1px solid #e5e7eb}
.m2st-note{display:block;margin-top:6px;font-size:12.5px;color:#0a66c2;font-weight:600}
/* bande discrete : publicites + concours, defilement tres lent */
.m2tk{position:relative;overflow:hidden;background:#fff;border:1px solid #e5e7eb;border-radius:12px;margin:0 0 14px;padding:8px 0}
.m2tk-track{display:flex;gap:12px;width:max-content;animation:m2tkMove var(--m2tk-dur,140s) linear infinite}
.m2tk:hover .m2tk-track{animation-play-state:paused}
@keyframes m2tkMove{from{transform:translateX(0)}to{transform:translateX(-50%)}}
.m2tk a{display:flex;align-items:center;gap:10px;min-width:250px;max-width:300px;padding:4px 10px;border-radius:10px;text-decoration:none;color:#0f172a;background:#f8fafc}
.m2tk a:hover{background:#eef4ff}
.m2tk img{width:46px;height:46px;border-radius:8px;object-fit:cover;flex:0 0 auto;background:#e5e7eb}
.m2tk b{display:block;font-size:13px;line-height:1.25;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.m2tk small{display:block;font-size:11px;font-weight:700;color:#0a66c2;text-transform:uppercase;letter-spacing:.03em}
.m2tk small.c{color:#b45309}
.m2tk-ico{width:46px;height:46px;border-radius:8px;flex:0 0 auto;background:#eef4ff;display:grid;place-items:center;font-style:normal;font-size:22px}
@media (prefers-reduced-motion:reduce){.m2tk-track{animation-duration:400s}}
