/* =====================================================================
   3SR Marketplace — compléments au thème de 3sr.fr
   Le thème (jetons :root, en-tête, pied de page, boutons, .note, .skip…) est
   shared/theme/css/site.css, copié sans modification depuis 3SR-website
   (cf. shared/theme/THEME-SOURCE.md). Ce fichier ne fait qu'habiller les
   composants propres à la marketplace AVEC CES JETONS — aucune couleur en dur,
   aucun style en ligne (CSP style-src 'self').
   ===================================================================== */

/* ---------- En-tête : libellé « Marketplace » et sélecteur de langue ---------- */
.brand__name { color: var(--navy); }
.lang-switcher { display: inline-flex; flex: none; }
.lang-select {
  min-height: 44px; padding: 0 36px 0 12px; border: 1.5px solid var(--line-strong); border-radius: var(--r-btn);
  background-color: var(--bg); color: var(--navy); font: inherit; font-size: .9375rem; font-weight: 600; cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.lang-select:hover { border-color: var(--navy); }
@media (max-width: 1279px) {
  .lang-switcher { width: 100%; }
  .lang-select { width: 100%; min-height: 48px; }
}

/* ---------- Seconde bande : navigation propre à l'application ---------- */
.app-nav { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.app-nav__bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-6); min-height: 60px; padding-block: var(--s-2); }
.app-nav__name { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--navy); text-decoration: none; }
.app-nav__name img { width: 28px; height: 28px; border-radius: 6px; }
.app-nav__name:hover { color: var(--blue); }
.app-nav__list { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); list-style: none; margin: 0; padding: 0; min-width: 0; }
.app-nav__list a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 600; font-size: .9375rem; text-decoration: none; border-bottom: 2px solid transparent; }
.app-nav__list a:hover { color: var(--blue); }
.app-nav__list a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--green); }

/* ---------- Héros des pages d'application ---------- */
.hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.hero-with-logo {
  width: 100%; max-width: var(--container); margin-inline: auto;
  padding: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) max(var(--gutter), env(safe-area-inset-right, 0px)) clamp(2.5rem, 1.5rem + 4vw, 4.5rem) max(var(--gutter), env(safe-area-inset-left, 0px));
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-6) var(--s-7);
}
.hero-with-logo .logo-mark { flex: none; width: 112px; height: 112px; padding: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-panel); }
.hero-with-logo .logo-mark img { width: 100%; height: 100%; }
.hero-with-logo .hero-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-4); }
.hero-with-logo h1 { font-size: var(--fs-h1); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.hero-with-logo .tagline { font-size: var(--fs-lead); line-height: 1.6; color: var(--text); max-width: 40em; }
.hero-with-logo .tagline strong { color: var(--navy); }
.cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 14px 24px; margin-top: var(--s-2);
  border-radius: var(--r-btn); background: var(--navy); color: var(--on-dark); font-weight: 700; text-decoration: none; transition: background-color .15s;
}
.cta:hover { background: var(--blue); color: var(--on-dark); }
@media (max-width: 640px) { .hero-with-logo .logo-mark { width: 88px; height: 88px; } }

/* ---------- Contenu ---------- */
main { display: block; }
.mp-content { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4rem) var(--section-y); color: var(--text); overflow-wrap: break-word; hyphens: auto; }
.mp-content > * { max-width: 52rem; }
.mp-content > .product-grid, .mp-content > .proof-points { max-width: none; }
.mp-content > * + * { margin-top: 1em; }
.mp-content h1 { font-size: var(--fs-h1); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.mp-content h2 { font-size: 1.5rem; line-height: 1.25; font-weight: 800; margin-top: 2em; }
.mp-content h3 { font-size: 1.1875rem; line-height: 1.35; font-weight: 700; margin-top: 1.6em; }
.mp-content > h1 + *, .mp-content > h2 + *, .mp-content > h3 + * { margin-top: .6em; }
.mp-content ul, .mp-content ol { padding-left: 1.3em; margin: 0; }
.mp-content li + li { margin-top: .35em; }
.mp-content strong { color: var(--ink); }
.mp-content a { overflow-wrap: anywhere; }
.mp-content code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .875em; padding: .1em .35em; background: var(--bg-pale); border-radius: var(--r-tile); color: var(--ink); overflow-wrap: anywhere; }
.mp-content pre { max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px 14px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-tile); font-size: .875rem; }
.mp-content pre code { padding: 0; background: none; }
.mp-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .9375rem; }
.mp-content th, .mp-content td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.mp-content th { color: var(--navy); background: var(--bg-soft); }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Encarts */
.alert { padding: 16px 20px; border-radius: var(--r-btn); border-left: 4px solid var(--blue); background: var(--bg-pale); color: var(--ink); }
.alert.success { border-left-color: var(--green); background: var(--success-bg); color: var(--success-ink); }
.alert.success strong { color: var(--success-ink); }

/* Points forts (pages d'application) */
.proof-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.proof-points .item { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--bg); }
.proof-points .item h3 { margin-top: 0; font-size: 1.0625rem; color: var(--navy); }
.proof-points .item p { margin-top: 8px; color: var(--text); font-size: .9375rem; }

/* Tuiles d'applications (accueil) — même langage que les cartes .app de 3sr.fr */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.product-tile { display: flex; flex-direction: column; gap: var(--s-3); padding: 26px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--bg); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.product-tile:hover { border-color: var(--blue); box-shadow: 0 8px 22px rgba(20, 38, 61, .08); color: var(--ink); }
.product-tile .tile-logo { width: 64px; height: 64px; border-radius: var(--r-btn); }
.product-tile h3 { margin: 0; font-size: 1.1875rem; color: var(--navy); }
.product-tile p { margin: 0; color: var(--text); font-size: .9375rem; }
.product-tile .arrow { margin-top: auto; font-weight: 700; color: var(--blue); }

/* Notes de version */
.release { padding-top: var(--s-5); border-top: 1px solid var(--line); }
.release h2 { margin-top: 0; }
.release-date { font-size: var(--fs-small); font-weight: 600; color: var(--muted); }
.release-tag { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: var(--fs-small); font-weight: 600; background: var(--bg-pale); color: var(--navy); }
.release-tag.tag-fix { background: var(--success-bg); color: var(--success-ink); }

/* Page 404 */
main.center .mp-content { text-align: left; }
