/* MCF Catalogue Plus — 3Vision Group (rév. 7) */

/* ===== Méga-menu : panneaux en tuiles ===== */
@media (min-width:961px){
 html body #mch-mega .mch-panel.mcp-grid.is-active{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important;align-content:start!important;align-items:stretch!important;flex-wrap:nowrap!important}
 html body #mch-mega .mch-panel.mcp-grid--expertise.is-active,html body #mch-mega .mch-panel.mcp-grid--career.is-active{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 html body #mch-mega .mch-panel.mcp-grid:not(.is-active){display:none!important}
}

/* Tuile commune (fournisseurs, expertises, niveaux) */
html body a.mcp-tile{position:relative;display:flex!important;align-items:center;gap:14px;min-height:68px;height:auto!important;width:auto!important;margin:0!important;padding:12px 16px!important;border-radius:16px!important;background:var(--rf-paper,#F4F6F5)!important;border:1px solid var(--rf-line,#E1E7E3)!important;color:#0B1324!important;font-weight:700!important;font-size:.97rem!important;line-height:1.25!important;text-decoration:none!important;white-space:normal!important;box-shadow:none!important;transition:background .25s,border-color .25s,transform .25s cubic-bezier(.2,.8,.2,1),box-shadow .25s!important}
html body a.mcp-tile:not(.mcp-empty):hover,html body a.mcp-tile:not(.mcp-empty):focus-visible{background:#fff!important;border-color:rgba(36,161,89,.5)!important;transform:translateY(-2px);box-shadow:0 14px 30px -18px rgba(11,19,36,.35)!important}
.mcp-tile__ic{flex:none;width:42px;height:42px;border-radius:12px;background:#fff;display:grid;place-items:center;color:#1B7F45;box-shadow:0 1px 2px rgba(11,19,36,.06),0 4px 12px rgba(11,19,36,.06);overflow:hidden}
.mcp-tile__ic svg{width:21px;height:21px}
html body .mcp-tile__ic img{display:block!important;max-width:80%!important;max-height:80%!important;width:auto!important;height:auto!important;object-fit:contain!important;margin:0!important}
.mcp-tile__t{min-width:0;color:inherit}

/* Fournisseurs avec logo : le logo seul, centré (il porte déjà le nom) */
html body a.mcp-prov--logo{justify-content:center!important;padding:10px 14px!important}
.mcp-logo{flex:none;width:100%;height:44px;display:flex;align-items:center;justify-content:center;overflow:hidden}
html body .mcp-logo img{display:block!important;max-width:150px!important;max-height:42px!important;width:auto!important;height:auto!important;object-fit:contain!important;margin:0 auto!important;mix-blend-mode:multiply;filter:grayscale(1) contrast(3);transition:filter .3s}
html body .mcp-logo img[src*="Logo-GECB"]{max-height:none!important;height:78px!important;max-width:none!important}
html body a.mcp-prov--logo:not(.mcp-empty):hover .mcp-logo img{filter:none}
/* Fournisseurs sans logo : icône + nom */
html body a.mcp-prov--ic .mcp-tile__t{font-size:1rem!important;letter-spacing:.01em}
.mcp-word{font-weight:800;font-size:1.05rem;letter-spacing:.1em;text-transform:uppercase;color:#0B1324}

/* Tuiles sans formation : affichées normalement, simplement non cliquables */
html body a.mcp-empty{cursor:default!important}

/* ===== Pays : tuiles illustrées ===== */
html body a.mcp-ptile{position:relative;display:flex!important;flex-direction:column;align-items:center;justify-content:flex-end;gap:10px;padding:16px 12px 14px!important;border-radius:18px!important;background:#F2F4F3!important;border:1px solid transparent!important;color:#0B1324!important;text-decoration:none!important;transition:background .25s,border-color .25s,transform .25s cubic-bezier(.2,.8,.2,1),box-shadow .25s}
html body a.mcp-ptile:not(.mcp-empty):hover,html body a.mcp-ptile:not(.mcp-empty):focus-visible{background:#fff!important;border-color:rgba(36,161,89,.5)!important;transform:translateY(-3px);box-shadow:0 16px 32px -20px rgba(11,19,36,.4)}
html body .mcp-ptile__art{width:100%;height:80px!important;display:flex!important;align-items:center;justify-content:center;overflow:hidden}
html body .mcp-ptile__art img{display:block!important;height:100%!important;width:auto!important;max-width:100%!important;max-height:none!important;object-fit:contain!important;margin:0!important;filter:brightness(.45)}
.mcp-ptile__n{font-size:.82rem;font-weight:800;letter-spacing:.14em;text-transform:uppercase;text-align:center;line-height:1.2;color:#0B1324}

/* ===== Page d'un pays ===== */
.mcp-ph{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,380px);gap:32px;align-items:center}
.mcp-ph__art{background:#F2F4F3;border-radius:26px;padding:22px 26px}
html body .mcp-ph__art img{display:block!important;width:100%!important;height:auto!important;filter:brightness(.45)}
.mcp-count{margin-bottom:18px!important;font-weight:600}
.mcp-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.mcp-grid .rf-card.mcfp-wait:not(.mlr-cc){min-height:420px;border-radius:24px;background:linear-gradient(180deg,var(--night,#07130E) 0 55%,var(--card,#fff) 55%);border:1px solid var(--line,#E1E7E3);padding:22px;display:flex;align-items:flex-end;font-weight:700}
.mcp-ptiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px}
.mcp-ptiles .mcp-ptile__art{height:92px!important}
.mcp-soon,.mcp-n{display:none!important}

/* ===== Tiroir mobile ===== */
html body .mch-off__btn{width:100%!important;display:flex!important;align-items:center!important;justify-content:space-between!important;border:1px solid rgba(27,132,73,.28)!important;box-shadow:none!important;padding:14px 16px!important;font-weight:700!important;outline:0}
html body .mch-off__btn:focus-visible{box-shadow:0 0 0 3px rgba(36,161,89,.3)!important}
html body .rf-off-app{margin-bottom:10px!important}
html body .rf-mo-chips.mcp-mo{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;padding:10px 0 4px!important;flex-wrap:nowrap!important}
html body .rf-mo-chips.mcp-mo--topic{grid-template-columns:minmax(0,1fr)!important}
html body .rf-mo-chips.mcp-mo--pays{grid-template-columns:repeat(3,minmax(0,1fr))!important}
html body .rf-mo-chips.mcp-mo a.mcp-tile{border-radius:12px!important;min-height:52px!important;padding:8px 12px!important;gap:10px!important;font-size:.9rem!important}
html body .rf-mo-chips.mcp-mo a.mcp-prov--logo{padding:8px!important}
html body .rf-mo-chips.mcp-mo .mcp-tile__ic{width:34px;height:34px;border-radius:9px}
html body .rf-mo-chips.mcp-mo .mcp-tile__ic svg{width:17px;height:17px}
html body .rf-mo-chips.mcp-mo .mcp-logo{height:34px}
html body .rf-mo-chips.mcp-mo .mcp-logo img{max-width:104px!important;max-height:30px!important}
html body .rf-mo-chips.mcp-mo .mcp-logo img[src*="Logo-GECB"]{height:58px!important;max-height:none!important}
html body .rf-mo-chips.mcp-mo .rf-mo-all{grid-column:1/-1;justify-self:start}
html body .rf-mo-chips.mcp-mo a.mcp-ptile{padding:10px 4px 8px!important;gap:6px!important;border-radius:12px!important;height:auto!important}
html body .rf-mo-chips.mcp-mo .mcp-ptile__art{height:46px!important}
html body .rf-mo-chips.mcp-mo .mcp-ptile__n{font-size:.62rem;letter-spacing:.06em}

/* ===== Mode sombre ===== */
html[data-theme="dark"] body a.mcp-tile{background:#101A16!important;border-color:#24332C!important;color:#F1F5F3!important}
html[data-theme="dark"] body a.mcp-tile:not(.mcp-empty):hover{background:#13211B!important;border-color:rgba(60,196,122,.5)!important}
html[data-theme="dark"] .mcp-tile__ic{background:#0B1411;box-shadow:inset 0 0 0 1px #24332C;color:#4ED48A}
html[data-theme="dark"] body .mcp-logo img,html[data-theme="dark"] body a.mcp-prov--logo:not(.mcp-empty):hover .mcp-logo img{mix-blend-mode:screen;filter:grayscale(1) contrast(3) invert(1)}
html[data-theme="dark"] .mcp-word,html[data-theme="dark"] .mcp-ptile__n{color:#F1F5F3}
html[data-theme="dark"] body a.mcp-ptile,html[data-theme="dark"] .mcp-ph__art{background:#101A16!important;color:#F1F5F3!important}
html[data-theme="dark"] body a.mcp-ptile:not(.mcp-empty):hover{background:#13211B!important}
html[data-theme="dark"] body .mcp-ptile__art img,html[data-theme="dark"] body .mcp-ph__art img{filter:invert(.92) hue-rotate(180deg)}
html[data-theme="dark"] body .mch-off__btn{background:#10241A!important;color:#6FE0A0!important;border-color:#24453A!important}

/* ===== Mobile / tablette : tuiles compactes en 2 colonnes ===== */
@media (max-width:960px){
 .mcp-ph{grid-template-columns:minmax(0,1fr)}.mcp-ph__art{max-width:380px}.mcp-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 html body #mch-mega .mch-panel.mcp-grid.is-active{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 html body a.mcp-tile{min-height:58px;padding:10px 12px!important;gap:10px;font-size:.9rem!important;border-radius:14px!important}
 .mcp-tile__ic{width:36px;height:36px;border-radius:10px}
 .mcp-tile__ic svg{width:18px;height:18px}
 .mcp-logo{height:36px}
 html body .mcp-logo img{max-width:120px!important;max-height:34px!important}
 html body .mcp-logo img[src*="Logo-GECB"]{height:64px!important}
 html body a.mcp-ptile{padding:12px 8px 10px!important}
 html body .mcp-ptile__art{height:60px!important}
 .mcp-ptile__n{font-size:.72rem;letter-spacing:.1em}
}
@media (max-width:640px){.mcp-grid{grid-template-columns:minmax(0,1fr)}.mcp-ptiles{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:380px){html body #mch-mega .mch-panel.mcp-grid--expertise.is-active,html body #mch-mega .mch-panel.mcp-grid--career.is-active{grid-template-columns:minmax(0,1fr)!important}html body .rf-mo-chips.mcp-mo--pays{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media (prefers-reduced-motion:reduce){html body a.mcp-tile,html body a.mcp-ptile{transition:none!important}}
