/* Portail MB Studio — feuille de style unique.
   Identité MB Studio v1.0 (dossier mb-studio-brand) : palette officielle, Space Grotesk / Inter / JetBrains Mono,
   coins coupés à 45° repris de l'emblème, grilles fines. Mobile d'abord. Thème sombre unique. */

/* ============ 1. Variables ============ */
:root {
  color-scheme: dark;
  /* Palette officielle */
  --ink: #0A0A0A;        /* Noir profond */
  --pink: #E83E8C;       /* Rose électrique */
  --paper: #F5F3F1;      /* Blanc cassé */
  --graphite: #7A7280;   /* Gris graphite : traits, filets, décor (jamais du texte courant) */
  --charcoal: #23232A;   /* Charbon */
  /* Dérivés d'usage — contrastes AA vérifiés sur --bg, --surface et --surface-2 */
  --bg: var(--ink);
  --surface: #141418;
  --surface-2: var(--charcoal);
  --line: #2A2A31;
  --line-strong: #3A3A43;
  --fg: var(--paper);
  --muted: #A39DA8;      /* graphite éclairci : 5,9 à 7,5:1 */
  --pink-soft: #F27AB0;  /* liens et survols : 6,1 à 7,7:1 */
  --on-pink: var(--ink);
  --focus: var(--paper);

  --display: "Space Grotesk", "Inter", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Échelle typographique */
  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-md: 1rem;
  --t-lg: 1.125rem;
  --t-xl: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --t-2xl: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
  --t-3xl: clamp(2.1rem, 1.5rem + 3vw, 3.6rem);
  --t-hero: clamp(2.5rem, 1.4rem + 5.4vw, 5.75rem);

  /* Espacements */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --section: clamp(56px, 9vw, 120px);

  /* Formes */
  --r-1: 3px;
  --r-2: 6px;
  --cut: 10px;
  --shape: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));

  --gutter: clamp(16px, 4.5vw, 48px);
  --max: 1200px;
}

/* ============ 2. Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 var(--t-md)/1.6 var(--body);
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--pink-soft); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--fg); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--r-1); }
::selection { background: var(--pink); color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
p { margin: 0; }
.wrap { max-width: var(--max); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 10;
  background: var(--pink); color: var(--on-pink); padding: 10px 16px; font-weight: 700; text-decoration: none;
}
.skip:focus { left: 16px; }

/* ============ 3. En-tête ============ */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--s-2) var(--s-5);
  padding-top: max(14px, env(safe-area-inset-top)); padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { height: 34px; width: auto; }
.nav { display: flex; gap: 0 var(--s-1); margin-inline: -10px; width: 100%; justify-content: space-between; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: 10px;
  color: var(--muted); text-decoration: none; font: 500 var(--t-sm)/1 var(--display); letter-spacing: 0.02em;
}
.nav a:hover { color: var(--fg); }
.nav a[aria-current="page"] { color: var(--fg); box-shadow: inset 0 -2px 0 var(--pink); }

/* ============ 4. Typographie et repères ============ */
.kicker {
  display: flex; align-items: center; gap: var(--s-3);
  font: 500 var(--t-xs)/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.kicker b { color: var(--pink); font-weight: 500; }
.kicker::after { content: ""; flex: 1; height: 1px; background: var(--line); max-width: 120px; }
.lead { font-size: var(--t-lg); color: var(--muted); max-width: 52ch; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.prose { max-width: 66ch; display: grid; gap: var(--s-4); }
.prose h2 { font-size: var(--t-xl); margin-top: var(--s-5); }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: var(--s-2); }

.section { padding-block: var(--section); border-top: 1px solid var(--line); }
.section-head { display: grid; gap: var(--s-4); margin-bottom: clamp(28px, 4vw, 48px); max-width: 760px; }
.section-head h2 { font-size: var(--t-3xl); }
.section-foot { margin-top: var(--s-6); }

/* ============ 5. Boutons et liens ============ */
.btns { display: flex; flex-wrap: wrap; gap: var(--s-3); }
/* Coins coupés (haut gauche, bas droit). Le contour du bouton secondaire est un fond rose
   recouvert d'un aplat intérieur décalé de 2 px. */
.btn {
  --fill: var(--bg);
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 12px 22px; border: 0; clip-path: var(--shape);
  font: 700 var(--t-md)/1 var(--display); letter-spacing: 0.01em; text-decoration: none; cursor: pointer;
  color: var(--fg); background: var(--pink);
}
.btn::before {
  content: ""; position: absolute; inset: 2px; z-index: -1; background: var(--fill);
  clip-path: polygon(calc(var(--cut) - 1.17px) 0, 100% 0, 100% calc(100% - var(--cut) + 1.17px), calc(100% - var(--cut) + 1.17px) 100%, 0 100%, 0 calc(var(--cut) - 1.17px));
}
.btn:hover { color: var(--fg); }
.btn:hover::before { background: var(--surface-2); }
.btn:focus-visible { outline: 2px solid var(--fg); outline-offset: -6px; border-radius: 0; }
.btn-primary { color: var(--on-pink); }
.btn-primary::before { display: none; }
.btn-primary:hover { background: var(--pink-soft); color: var(--on-pink); }
.btn-primary:focus-visible { outline-color: var(--on-pink); }
.on-surface .btn { --fill: var(--surface); }
.btn .ext { font-size: 0.85em; }

.link-arrow {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px;
  font: 600 var(--t-md)/1 var(--display); color: var(--fg); text-decoration: none;
}
.link-arrow::after { content: "→"; color: var(--pink); transition: transform .15s; }
.link-arrow:hover { color: var(--pink-soft); }

/* ============ 6. Badges ============ */
.badges { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.badge {
  display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 3px 9px;
  font: 500 var(--t-xs)/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line-strong); border-radius: var(--r-1);
}
.badge--live { color: var(--fg); border-color: var(--pink); }
.badge--live::before { content: ""; width: 7px; height: 7px; background: var(--pink); border-radius: 50%; }
.badge--soon { border-style: dashed; }

/* ============ 7. Accueil : hero ============ */
.hero {
  display: grid; gap: var(--s-6); align-items: center;
  padding-block: clamp(36px, 8vw, 104px) clamp(48px, 8vw, 104px);
}
.hero-text { display: grid; gap: var(--s-5); min-width: 0; }
.hero h1 { font-size: var(--t-hero); letter-spacing: -0.035em; }
.hero h1 .accent { color: var(--pink); }
.hero .lead { font-size: var(--t-xl); line-height: 1.45; }
.hero-figure { position: relative; max-width: 300px; justify-self: center; width: 100%; }
.hero-figure svg { width: 100%; }
.hero-figure .guides line { stroke: var(--line-strong); stroke-width: 0.25; stroke-dasharray: 1 1.2; }
.hero-figure .note { font: 500 3.2px/1 var(--mono); fill: var(--muted); letter-spacing: 0.04em; }
.hero-figure .tick { stroke: var(--muted); stroke-width: 0.3; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: 0; padding: var(--s-4) 0 0; list-style: none;
  border-top: 1px solid var(--line); font: 500 var(--t-xs)/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.hero-meta li::before { content: "/ "; color: var(--pink); }

/* ============ 8. Boss Empire à l'affiche ============ */
.spotlight {
  display: grid; gap: var(--s-6); align-items: center;
  border: 1px solid var(--line); background: var(--surface); padding: clamp(20px, 4vw, 56px);
  position: relative;
}
.spotlight::before {   /* coin coupé décoratif, rappel de l'emblème */
  content: ""; position: absolute; top: -1px; left: -1px; width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--bg) 50%, var(--pink) 50%, var(--pink) calc(50% + 1px), transparent calc(50% + 1px));
}
.spotlight-text { display: grid; gap: var(--s-5); min-width: 0; }
.spotlight-id { display: flex; align-items: center; gap: var(--s-4); }
.spotlight-id img { width: 72px; height: 72px; border-radius: 22%; flex: none; }
.spotlight h2, .spotlight h3 { font-size: var(--t-3xl); }
.spotlight p { color: var(--muted); max-width: 54ch; }
.facts { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.facts li { display: grid; grid-template-columns: 7.5em 1fr; gap: var(--s-3); padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.facts li span:first-child { font: 500 var(--t-xs)/1.6 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

/* Captures du jeu dans un cadre de téléphone */
.shots {
  display: flex; gap: var(--s-4); overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: var(--s-3);
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.spotlight .shots { margin-inline: calc(-1 * clamp(20px, 4vw, 56px)); padding-inline: clamp(20px, 4vw, 56px); }
.shot { flex: none; width: min(56vw, 220px); scroll-snap-align: center; margin: 0; }
.shot img {
  width: 100%; aspect-ratio: 585 / 1266; object-fit: cover; object-position: top;
  border: 1px solid var(--line-strong); border-radius: 22px; background: var(--ink);
}
.shot figcaption { margin-top: var(--s-2); font: 500 var(--t-xs)/1.3 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ============ 9. Liste de produits ============ */
.products { display: grid; border-top: 1px solid var(--line); }
.product {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--s-2) var(--s-4); align-items: start;
  padding-block: var(--s-5); border-bottom: 1px solid var(--line);
}
.product-visual { width: 64px; height: 64px; border-radius: 22%; object-fit: cover; }
.wordmark-tile {
  width: 64px; height: 64px; display: grid; place-items: center; border: 1px dashed var(--line-strong);
  font: 700 0.72rem/1 var(--display); letter-spacing: 0.08em; color: var(--muted); background: var(--surface);
}
.product-body { display: grid; gap: var(--s-3); min-width: 0; }
.product-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-3); }
.product h3 { font-size: var(--t-xl); }
.product .cat { font: 500 var(--t-xs)/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.product p { color: var(--muted); max-width: 60ch; }
.product > .btns, .product > .wait { grid-column: 2; }
.product .btns { margin-top: var(--s-1); }
.product .wait { font-size: var(--t-sm); color: var(--muted); }
.notice { border: 1px solid var(--line); border-left: 3px solid var(--pink); padding: var(--s-4); background: var(--surface); }

/* ============ 10. Philosophie / méthode ============ */
.pillars { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); counter-reset: p; }
.pillars li { padding: var(--s-5) 0; border-bottom: 1px solid var(--line); display: grid; gap: var(--s-3); }
.pillars .num { font: 500 var(--t-xs)/1 var(--mono); color: var(--pink); letter-spacing: 0.08em; }
.pillars h3 { font-size: var(--t-2xl); letter-spacing: -0.01em; }
.pillars p { color: var(--muted); max-width: 46ch; }

/* ============ 11. Contact ============ */
.contact-band { display: grid; gap: var(--s-5); }
.contact-band h2 { font-size: var(--t-3xl); }
.mail-big {
  display: inline-block; padding-block: 10px; font: 600 clamp(1.05rem, 0.8rem + 1.6vw, 2rem)/1.2 var(--display);
  color: var(--fg); text-decoration-color: var(--pink); text-decoration-thickness: 2px; overflow-wrap: anywhere;
}
.mail-big:hover { color: var(--pink-soft); }
.mail { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.copy {
  font: 600 var(--t-sm)/1 var(--body); color: var(--fg); background: var(--surface-2);
  border: 1px solid var(--line-strong); border-radius: var(--r-2); padding: 10px 14px; cursor: pointer; min-height: 44px;
}
.copy:hover { border-color: var(--pink); }
.panel { background: var(--surface); border: 1px solid var(--line); padding: var(--s-5); display: grid; gap: var(--s-4); min-width: 0; }
.cards-2 { display: grid; gap: var(--s-4); }

/* ============ 12. FAQ ============ */
.faq { display: grid; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 0; min-height: 44px; font: 600 var(--t-lg)/1.3 var(--display);
  display: flex; justify-content: space-between; gap: var(--s-4); align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.5rem/1 var(--mono); color: var(--pink); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 0 20px; color: var(--muted); max-width: 66ch; display: grid; gap: var(--s-3); }

/* ============ 13. Fiche produit ============ */
.page-head { padding-block: clamp(36px, 7vw, 88px) clamp(28px, 4vw, 48px); display: grid; gap: var(--s-4); }
.page-head h1 { font-size: var(--t-3xl); }
.crumbs { font: 500 var(--t-xs)/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.crumbs a { color: var(--muted); }
.product-hero { display: grid; gap: var(--s-6); align-items: center; padding-block: clamp(32px, 6vw, 80px); }
.product-hero .id { display: flex; align-items: center; gap: var(--s-4); }
.product-hero .id img { width: 88px; height: 88px; border-radius: 22%; }
.product-hero h1 { font-size: var(--t-hero); letter-spacing: -0.035em; }
.product-hero .text { display: grid; gap: var(--s-5); min-width: 0; }
.features { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.features li { display: grid; gap: var(--s-2); padding: var(--s-5) 0; border-bottom: 1px solid var(--line); }
.features h3 { font-size: var(--t-xl); }
.features p { color: var(--muted); }
.features .num { font: 500 var(--t-xs)/1 var(--mono); color: var(--pink); }
.specs { display: grid; margin: 0; border-top: 1px solid var(--line); }
.specs > div { display: grid; gap: var(--s-1); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.specs dt { font: 500 var(--t-xs)/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.specs dd { margin: 0; }

/* ============ 14. Pied de page ============ */
.site-footer {
  border-top: 1px solid var(--line); margin-top: var(--s-7);
  padding-top: var(--s-7); padding-bottom: max(40px, env(safe-area-inset-bottom));
  display: grid; gap: var(--s-6);
}
.foot-brand { display: grid; gap: var(--s-3); }
.foot-brand img { width: min(300px, 100%); }
.foot-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.foot-col h2 { font: 500 var(--t-xs)/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: var(--s-2); }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col a { display: inline-flex; align-items: center; min-height: 40px; color: var(--fg); text-decoration: none; font-size: var(--t-sm); overflow-wrap: anywhere; }
.foot-col a:hover { color: var(--pink-soft); }
.foot-meta { font: 500 var(--t-xs)/1.5 var(--mono); color: var(--muted); letter-spacing: 0.04em; border-top: 1px solid var(--line); padding-top: var(--s-4); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2); }

/* ============ 15. Mouvement (léger, désactivé si demandé) ============ */
@media (prefers-reduced-motion: no-preference) {
  .btn, .link-arrow::after, .faq summary::after { transition: background-color .15s, color .15s, transform .15s; }
  .link-arrow:hover::after { transform: translateX(3px); }
  .hero-figure .emblem { animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
  .hero-figure .guides { animation: fade 1.2s ease-out both; }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
}

/* ============ 16. Grands écrans ============ */
@media (min-width: 720px) {
  .brand img { height: 40px; }
  .nav { width: auto; margin: 0; gap: var(--s-1); }
  .site-header { padding-block: max(18px, env(safe-area-inset-top)) 18px; }
  .product { grid-template-columns: 96px minmax(0, 1fr) auto; gap: var(--s-5); align-items: center; }
  .product-visual, .wordmark-tile { width: 96px; height: 96px; }
  .wordmark-tile { font-size: 0.95rem; }
  .product > .btns, .product > .wait { grid-column: 3; margin: 0; justify-self: end; max-width: 22ch; text-align: right; }
  .product > .btns { max-width: none; }
  .pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 0; gap: var(--s-6); }
  .pillars li { border-top: 1px solid var(--line-strong); border-bottom: 0; padding-top: var(--s-5); }
  .foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-6); }
  .shot { width: 220px; }
}
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-8); }
  .hero-figure { max-width: 460px; justify-self: end; }
  .spotlight { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--s-7); }
  .shots { margin: 0; padding-inline: 0; overflow: visible; justify-content: flex-end; }
  .shot:nth-child(2) { transform: translateY(32px); }
  .shot { width: min(46%, 230px); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-7); }
  .product-hero { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .contact-band { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .site-footer { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .foot-meta { grid-column: 1 / -1; }
  .section-split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s-7); }
  .section-split .section-head { margin: 0; position: sticky; top: 24px; align-self: start; }
}

/* Grille fine de fond sur grand écran : 4 colonnes alignées sur le contenu */
@media (min-width: 1100px) {
  body::before {
    content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
    background:
      linear-gradient(to right, transparent calc(50% - var(--max) / 2), rgba(245, 243, 241, 0.035) calc(50% - var(--max) / 2), rgba(245, 243, 241, 0.035) calc(50% - var(--max) / 2 + 1px), transparent calc(50% - var(--max) / 2 + 1px)),
      linear-gradient(to right, transparent 50%, rgba(245, 243, 241, 0.035) 50%, rgba(245, 243, 241, 0.035) calc(50% + 1px), transparent calc(50% + 1px)),
      linear-gradient(to right, transparent calc(50% + var(--max) / 2 - 1px), rgba(245, 243, 241, 0.035) calc(50% + var(--max) / 2 - 1px), rgba(245, 243, 241, 0.035) calc(50% + var(--max) / 2), transparent calc(50% + var(--max) / 2));
  }
}

/* Galerie complète (fiche produit) : toutes les captures alignées */
@media (min-width: 960px) {
  .shots--all { justify-content: flex-start; }
  .shots--all .shot { width: min(23%, 240px); transform: none; }
}
