/* 22/10/2026 — décision de Sérilo : « jamais de texte sur photo sombre ; photo encadrée, texte sur blanc à côté ou dessous ».
   Chargée en DERNIER par components/layouts/site.blade.php (pages publiques). Aucune photo n'est plus un fond sous du texte :
   en grand écran elle est encadrée à droite, le texte reste sur blanc à gauche ; sur téléphone elle passe sous le texte. */
:root{--bd-photo:min(36vw,500px);--bd-droite:calc(max(0px,(100vw - 1440px) / 2) + 40px)}

/* ── Bandeaux de page (familles ms-, in-, cp-, mk-) ─────────────────────────────── */
.ms-hero,.in-hero,.cp-hero,.mk-hero{background:#fff!important;min-height:300px}
.in-hero::after{display:none!important}
.ms-hero-img,.in-hero-img,.cp-hero-img,.mk-hero-img{position:absolute!important;inset:24px var(--bd-droite) 24px auto!important;width:var(--bd-photo)!important;height:auto!important;opacity:1!important;-webkit-mask-image:none!important;mask-image:none!important;filter:none!important;object-fit:cover;background-size:cover;background-position:center;border:3px solid #111318;outline:1.5px solid #D9A845;outline-offset:-6px;border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.14);z-index:0}
.ms-hero .vx-wrap>*,.in-hero .vx-wrap>*,.cp-hero .vx-wrap>*,.mk-hero .vx-wrap>*{max-width:min(680px,calc(100% - var(--bd-photo) - 48px))!important}
.in-hero-in{flex-direction:column;justify-content:flex-start}
.in-hero-devise{align-self:flex-start}
.mk-pont{position:static!important;display:inline-flex!important;margin-top:16px}

/* ── Accueil : les trois portes (texte à gauche, photo encadrée à droite) ───────── */
.j7-porte{display:grid;grid-template-columns:minmax(0,1fr) 38%;column-gap:16px;align-items:start}
.j7-porte>*:not(img){grid-column:1}
.j7-porte>img{position:static!important;grid-column:2;grid-row:1 / span 6;width:100%!important;height:100%!important;min-height:150px;-webkit-mask-image:none!important;mask-image:none!important;filter:none!important;object-fit:cover;border:2px solid #111318;outline:1px solid #D9A845;outline-offset:-5px;border-radius:10px}
.j7-porte h3,.j7-porte p{text-shadow:none!important;max-width:none!important}
.j7-porte .j7-lien{background:none}

/* ── Licence : carte « Un secteur minier » (texte à gauche, photo encadrée à droite) ── */
.in-photo-txt{display:grid;grid-template-columns:minmax(0,1fr) 42%;gap:14px;padding:14px;background:#fff!important}
.in-photo-txt::after{display:none!important}
.in-photo-txt img{position:static!important;grid-column:2;grid-row:1;width:100%!important;height:100%;min-height:200px;opacity:1!important;object-fit:cover;border:3px solid #111318;outline:1.5px solid #D9A845;outline-offset:-6px;border-radius:12px}
.in-photo-txt .txt{grid-column:1;grid-row:1;max-width:none!important;padding:12px 8px!important}

/* ── Légendes posées sur une photo : elles passent dessous, sur blanc ────────────── */
.ms-photo{display:flex;flex-direction:column;background:#fff}
.ms-photo img{height:auto!important;flex:1 1 auto}
.ms-photo figcaption,.ms-avantages figcaption{position:static!important;background:#fff!important;padding:14px 18px 16px!important}
.ms-avantages figure{display:flex;flex-direction:column;min-height:0}
.ms-avantages figure img{position:static!important;height:200px!important;-webkit-mask-image:none!important;mask-image:none!important}

/* ── Cartes à photo de fond (mentions légales, CGU) : la photo devient un cadre à droite ── */
.ms-fiche.photo,.ms-question.photo{background:#fff!important;position:relative;padding-right:calc(30% + 40px)!important}
.ms-fiche.photo::after,.ms-question.photo::after{content:"";position:absolute;top:18px;right:18px;bottom:18px;width:30%;background:var(--ms-fond) center/cover no-repeat;border:3px solid #111318;outline:1.5px solid #D9A845;outline-offset:-6px;border-radius:10px}

/* ── FAQ « Une équipe experte » : la photo en bandeau encadré, la carte de texte dessous ── */
.ms-equipe-bloc{flex-direction:column;align-items:stretch!important;background:#fff!important;min-height:0!important;overflow:visible!important}
.ms-equipe-bloc::before{content:"";display:block;height:150px;background:var(--ms-fond) center/cover no-repeat;border:3px solid #111318;outline:1.5px solid #D9A845;outline-offset:-6px;border-radius:10px}
.ms-equipe-bloc>div{margin:12px 0 0!important}

/* ── Market / Direct : la devise passe sous le texte ; « Une disponibilité réelle » : photo encadrée à droite ── */
.mk-coin{position:static!important;text-align:left!important;margin-top:14px}
.mk-coin:after{margin:10px 0 0!important}
.mk-reel{padding-right:calc(34% + 40px)!important}
.mk-reel .fond{inset:18px 18px 18px auto!important;width:34%!important;opacity:1!important;-webkit-mask-image:none!important;mask-image:none!important;border:3px solid #111318;outline:1.5px solid #D9A845;outline-offset:-6px;border-radius:10px}

/* ── Téléphone : la photo passe SOUS le texte, encadrée, à pleine largeur ─────────── */
@media(max-width:900px){
  .ms-hero,.in-hero,.cp-hero,.mk-hero{display:flex;flex-direction:column;min-height:0!important}
  .ms-hero-img,.in-hero-img,.cp-hero-img,.mk-hero-img{position:static!important;order:5;inset:auto!important;display:block;width:auto!important;height:200px!important;margin:4px 16px 22px}
  .ms-hero .vx-wrap>*,.in-hero .vx-wrap>*,.cp-hero .vx-wrap>*,.mk-hero .vx-wrap>*{max-width:none!important}
  .ms-hero>.vx-wrap,.in-hero>.vx-wrap,.cp-hero>.vx-wrap,.mk-hero>.vx-wrap{min-width:0;width:100%}/* élément de flex : ne s'élargit pas au-delà de l'écran */
  .in-photo-txt{grid-template-columns:minmax(0,1fr)}
  .in-photo-txt img{grid-column:1;grid-row:2;height:180px;min-height:0}
  .ms-fiche.photo,.ms-question.photo{padding-right:20px!important}
  .ms-fiche.photo::after,.ms-question.photo::after{display:none}
  .mk-reel{display:flex;flex-direction:column;padding-right:22px!important}
  .mk-reel .fond{position:static!important;order:5;inset:auto!important;width:auto!important;height:170px;margin-top:16px}
}
@media(max-width:600px){
  .j7-porte{grid-template-columns:minmax(0,1fr)}
  .j7-porte>img{grid-column:1;grid-row:auto;height:160px!important;margin-top:12px}
}
