/*
 * Boutique en ligne du materiel (page publique). Se charge apres auth.css.
 * Meme identite que la page d'accueil : fond clair, accents orange et vert, vert nuit pour les blocs forts.
 */
body.mgb { background: #fff; font-size: 16px; --nuit: #10231A; }
.mgb main { max-width: 1180px; margin: 0 auto; padding: 0 24px 72px; }
.mgb h1, .mgb h2, .mgb h3, .mgb p { margin: 0; }
.mgb [hidden] { display: none !important; }

.mgb-panier-btn { display: inline-flex; align-items: center; gap: 8px; }
.mgb-panier-btn svg { width: 18px; height: 18px; }
.mgb-panier-btn b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--mg-orange); color: #fff; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Accroche ---------- */
.mgb-hero { padding: 56px 0 28px; text-align: center; }
.mgb-kicker { display: block; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mg-orange-dark); margin-bottom: 12px; }
.mgb-hero h1 { font-size: 42px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; color: var(--mg-ink); }
.mgb-hero p { margin: 16px auto 0; font-size: 18px; line-height: 1.55; color: #4A5060; max-width: 640px; }
.mgb-atouts { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 12px; }
.mgb-atouts li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--mg-line); border-radius: 999px; font-size: 14px; font-weight: 500; color: #3F4354; background: #fff; }
.mgb-atouts li::before { content: "✓"; width: 18px; height: 18px; border-radius: 50%; background: var(--mg-green-soft); color: var(--mg-green-dark); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.mgb-alerte { margin: 0 0 18px; padding: 14px 16px; border-radius: 12px; background: #FDECEC; color: #B02A2A; font-size: 15px; font-weight: 500; }
.mgb-vide { text-align: center; padding: 64px 0; color: var(--mg-muted); }
.mgb-vide h2 { font-size: 24px; color: var(--mg-ink); margin-bottom: 8px; }

/* ---------- Rayons ---------- */
.mgb-cats { position: sticky; top: 60px; z-index: 5; display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; margin-bottom: 8px; background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); scrollbar-width: none; }
.mgb-cats::-webkit-scrollbar { display: none; }
.mgb-cats a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--mg-line); border-radius: 999px; font-size: 14.5px; font-weight: 500; color: var(--mg-ink); text-decoration: none; background: #fff; }
.mgb-cats a:hover { border-color: var(--mg-orange); color: var(--mg-orange-dark); }
.mgb-cats small { font-size: 12px; color: var(--mg-muted); }
.mgb-rayon { padding-top: 26px; scroll-margin-top: 120px; }
.mgb-rayon > h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.015em; color: var(--mg-ink); margin-bottom: 16px; }
.mgb-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.mgb-produit { display: flex; flex-direction: column; border: 1px solid var(--mg-line); border-radius: 20px; background: #fff; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.mgb-produit:hover { transform: translateY(-4px); border-color: #D9DDE4; box-shadow: 0 18px 40px rgba(16, 35, 26, .10); }
.mgb-photo { position: relative; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.mgb-photo img { width: 100%; height: 100%; object-fit: cover; }
.mgb-photo svg { width: 38%; height: 38%; }
.mgb-c-imprimante { background: linear-gradient(140deg, #FFF3E6, #FFE1C4); color: #C45A12; }
.mgb-c-scanner { background: linear-gradient(140deg, #EEF4FE, #D8E6FD); color: #2B5FC2; }
.mgb-c-caisse { background: linear-gradient(140deg, #E9F8EF, #CFEFDD); color: #1E7F47; }
.mgb-c-consommable { background: linear-gradient(140deg, #FDF6DD, #FBEBB5); color: #96690A; }
.mgb-c-accessoire { background: linear-gradient(140deg, #F2EAFC, #E4D4F8); color: #7A3FC0; }
.mgb-badge { position: absolute; top: 12px; left: 12px; padding: 5px 10px; border-radius: 999px; background: #1B1D28; color: #fff; font-size: 12px; font-weight: 600; }
.mgb-badge-o { background: var(--mg-orange); }
.mgb-infos { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.mgb-infos h3 { font-size: 16.5px; font-weight: 600; line-height: 1.3; color: var(--mg-ink); }
.mgb-infos p { font-size: 14px; line-height: 1.5; color: #5F6675; }
.mgb-bas { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mgb-bas b { font-size: 19px; font-weight: 700; color: var(--mg-ink); font-variant-numeric: tabular-nums; }
.mgb-epuise .mgb-photo { filter: grayscale(.7); opacity: .75; }

.mgb-logiciel { margin-top: 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding: 36px 40px; border-radius: 28px; background: var(--nuit); color: #fff; }
.mgb-logiciel h2 { font-size: 26px; font-weight: 600; letter-spacing: -0.015em; color: #fff; }
.mgb-logiciel p { margin-top: 8px; font-size: 16px; color: #C3D2C9; max-width: 560px; }
.mgb .mgb-btn-clair { background: #fff; color: var(--mg-orange-dark) !important; border: 0; padding: 14px 24px; font-size: 16px; font-weight: 600; border-radius: 14px; }

/* ---------- Panier ---------- */
body.mgb-ouvert { overflow: hidden; }
.mgb-voile { position: fixed; inset: 0; z-index: 40; background: rgba(16, 35, 26, .45); }
.mgb-panier { position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(440px, 100vw); display: flex; flex-direction: column; background: #fff; box-shadow: -20px 0 60px rgba(16, 35, 26, .18); animation: mgb-entre .2s ease-out; }
@keyframes mgb-entre { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.mgb-panier > header { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--mg-line); }
.mgb-panier > header h2 { font-size: 19px; font-weight: 600; color: var(--mg-ink); }
.mgb-x { width: 42px; height: 42px; border: 1px solid var(--mg-line); border-radius: 12px; background: #fff; font-size: 24px; line-height: 1; color: var(--mg-ink); cursor: pointer; }
.mgb-panier-corps { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px 24px; }
.mgb-panier-vide { padding: 32px 0; text-align: center; color: var(--mg-muted); }
.mgb-lignes { list-style: none; margin: 0 0 12px; padding: 0; }
.mgb-lignes li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--mg-line); }
.mgb-l-nom { font-size: 14.5px; font-weight: 500; color: var(--mg-ink); line-height: 1.3; }
.mgb-l-nom small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 400; color: var(--mg-muted); }
.mgb-qte { display: inline-flex; align-items: center; border: 1px solid #E1E4EA; border-radius: 10px; overflow: hidden; }
.mgb-qte button { width: 36px; height: 36px; border: 0; background: #F7F8FA; font-size: 18px; color: var(--mg-ink); cursor: pointer; }
.mgb-qte b { min-width: 30px; text-align: center; font-size: 14.5px; font-weight: 600; }
.mgb-l-total { font-size: 14.5px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mgb-total { display: flex; justify-content: space-between; padding: 6px 0; font-size: 15px; color: #3F4354; }
.mgb-total b { color: var(--mg-ink); font-variant-numeric: tabular-nums; }
.mgb-liv b, .mgb-recap .mgb-liv b { color: var(--mg-green-dark); }
.mgb-grand { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--mg-line); font-size: 17px; font-weight: 600; }
.mgb-grand b { font-size: 20px; }
.mgb-form h3 { margin: 22px 0 4px; font-size: 16px; font-weight: 600; color: var(--mg-ink); }
.mgb-form label { display: block; margin: 12px 0 6px; font-size: 13.5px; font-weight: 500; color: var(--mg-ink); }
.mgb-form input, .mgb-form textarea { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid #E1E4EA; border-radius: 12px; background: #fff; font: inherit; font-size: 16px; color: var(--mg-ink); }
.mgb-form textarea { resize: vertical; }
.mgb-form input:focus, .mgb-form textarea:focus { outline: none; border-color: var(--mg-orange); box-shadow: 0 0 0 3px var(--mg-orange-soft); }
.mgb .mgb-payer { width: 100%; justify-content: center; margin-top: 18px; padding: 15px 20px; font-size: 16.5px; font-weight: 600; border-radius: 14px; }
.mgb-note { margin-top: 10px !important; font-size: 13px; line-height: 1.45; color: var(--mg-muted); text-align: center; }

/* ---------- Suivi de commande ---------- */
.mgb-suivi { max-width: 680px; margin: 0 auto; padding-top: 44px; }
.mgb-etat { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border-radius: 20px; }
.mgb-etat h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; color: var(--mg-ink); }
.mgb-etat p { margin-top: 6px; font-size: 15.5px; line-height: 1.5; color: #3F4354; }
.mgb-etat-ico { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: #fff; }
.mgb-etat-ok { background: var(--mg-green-soft); } .mgb-etat-ok .mgb-etat-ico { background: var(--mg-green); }
.mgb-etat-attente { background: var(--mg-orange-soft); } .mgb-etat-attente .mgb-etat-ico { background: var(--mg-orange); }
.mgb-etat-gris { background: #F1F2F5; } .mgb-etat-gris .mgb-etat-ico { background: #8A909C; }
.mgb-repayer { margin-top: 14px; }
.mgb-etapes { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mgb-etapes li { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 14px; color: var(--mg-muted); }
.mgb-etapes b { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #EEF0F3; color: #6B7280; font-size: 15px; }
.mgb-etapes li.encours { color: var(--mg-ink); font-weight: 600; } .mgb-etapes li.encours b { background: var(--mg-orange); color: #fff; }
.mgb-etapes li.fait { color: var(--mg-green-dark); } .mgb-etapes li.fait b { background: var(--mg-green); color: #fff; }
.mgb-recap { margin-top: 26px; padding: 22px; border: 1px solid var(--mg-line); border-radius: 20px; }
.mgb-recap h2 { font-size: 16px; font-weight: 600; color: var(--mg-ink); margin: 0 0 8px; }
.mgb-recap ul + h2 { margin-top: 20px; }
.mgb-recap ul { list-style: none; margin: 0; padding: 0; }
.mgb-recap li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--mg-line); font-size: 15px; color: #3F4354; }
.mgb-recap li:last-child { border-bottom: 0; }
.mgb-recap li b { color: var(--mg-ink); white-space: nowrap; }
.mgb-recap p { font-size: 15px; line-height: 1.55; color: #3F4354; }
.mgb-recap .mgb-note { text-align: left; }

.mgb a:focus-visible, .mgb button:focus-visible { outline: 2px solid var(--mg-orange); outline-offset: 2px; }
@media (max-width: 760px) {
    .mgb main { padding: 0 14px 56px; }
    .mgb-hero { padding: 32px 0 18px; }
    .mgb-hero h1 { font-size: 29px; }
    .mgb-hero p { font-size: 16.5px; }
    .mgb-cats { top: 56px; }
    .mgb-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .mgb-infos { padding: 12px; }
    .mgb-infos h3 { font-size: 14.5px; }
    .mgb-infos p { display: none; }
    .mgb-bas { flex-direction: column; align-items: stretch; }
    .mgb-bas b { font-size: 16.5px; }
    .mgb-bas .mg-btn { justify-content: center; min-height: 42px; }
    .mgb-rayon > h2 { font-size: 20px; }
    .mgb-logiciel { padding: 26px 20px; border-radius: 22px; }
    .mgb-logiciel h2 { font-size: 21px; }
    .mgb-panier-btn { font-size: 0 !important; gap: 4px; }
    .mgb-panier-btn b { font-size: 12px; }
    .mgb-etat { padding: 18px; }
    .mgb-etat h1 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { .mgb-produit { transition: none; } .mgb-panier { animation: none; } }

.mgb-rayon > h2, .mgb-recap h2, .mgb-logiciel h2, .mgb-form h3 { text-align: left; }

/* ---------- Page Contact ---------- */
.mgc-etoiles { display: block; margin-bottom: 12px; font-size: 22px; letter-spacing: 4px; color: #F5B63A; }
.mgc-cartes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.mgc-carte { display: flex; flex-direction: column; gap: 6px; padding: 24px 22px; border: 1px solid var(--mg-line); border-radius: 22px; background: #fff; }
.mgc-ico { width: 48px; height: 48px; margin-bottom: 8px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.mgc-ico svg { width: 24px; height: 24px; }
.mgc-o { background: #FFE9D6; color: #C45A12; } .mgc-g { background: #DDF4E7; color: #1E7F47; } .mgc-b { background: #E1EBFD; color: #2B5FC2; } .mgc-p { background: #EEE3FB; color: #7A3FC0; }
.mgc-carte h2 { font-size: 15px; font-weight: 500; color: var(--mg-muted); text-align: left; }
.mgc-valeur { font-size: 18px; font-weight: 600; line-height: 1.35; color: var(--mg-ink) !important; text-decoration: none; overflow-wrap: anywhere; }
a.mgc-valeur:hover { color: var(--mg-orange-dark) !important; }
.mgc-adresse { font-size: 16px; }
.mgc-carte p { margin-top: 4px !important; font-size: 14px; line-height: 1.5; color: #5F6675; }
.mgc-lien { margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--mg-orange-dark); text-underline-offset: 4px; }
@media (max-width: 1000px) { .mgc-cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .mgc-cartes { grid-template-columns: 1fr; gap: 10px; } .mgc-carte { padding: 18px; } }