/* Extensions Lab — clone fidèle du Chrome Web Store (design 2024+). */
:root {
  --text: #202124;
  --secondary: #5f6368;
  --border: #dadce0;
  --border-soft: #e8eaed;
  --hover: #f1f3f4;
  --blue: #1a73e8;
  --blue-dk: #1b66c9;
  --blue-soft: #e8f0fe;
  --star: #1a73e8;
  --sidebar-w: 256px;
  --font: "Roboto", "Google Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }
body { margin: 0; background: #fff; color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .86em; background: var(--hover); padding: 1px 6px; border-radius: 4px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 99; }

/* ── header ── */
.cws-header { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--border-soft); height: 64px; display: flex; align-items: center; gap: 16px; padding: 0 22px; }
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.chrome-logo { width: 30px; height: 30px; border-radius: 50%; position: relative; background:
  conic-gradient(from -90deg, #ea4335 0 120deg, #4285f4 120deg 240deg, #34a853 240deg 360deg); }
.chrome-logo::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 30deg, #fbbc05 0 60deg, transparent 60deg 360deg); }
.chrome-logo::after { content: ""; position: absolute; inset: 9px; background: #fff; border-radius: 50%; box-shadow: inset 0 0 0 4px #4285f4; }
.wordmark { font-size: 22px; color: #3c4043; font-weight: 400; letter-spacing: -.01em; white-space: nowrap; }
.wordmark b { font-weight: 500; color: var(--blue); }
.searchbar { flex: 1; min-width: 0; max-width: 560px; margin: 0 auto; position: relative; }
.searchbar input { width: 100%; height: 44px; border: 1px solid var(--border); border-radius: 24px; padding: 0 16px 0 48px; font: inherit; font-size: 15px; background: #fff; outline: none; }
.searchbar input:hover { box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.searchbar input:focus { border-color: var(--blue); }
.searchbar svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; fill: var(--secondary); }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: none; background: transparent; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: var(--hover); }
.icon-btn svg { width: 22px; height: 22px; fill: var(--secondary); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #1a73e8, #34a853); color: #fff; display: grid; place-items: center; font-weight: 500; font-size: 14px; }

/* ── shell ── */
.shell { display: flex; align-items: flex-start; }
.sidebar { width: var(--sidebar-w); flex-shrink: 0; position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; padding: 16px 12px; border-right: 1px solid var(--border-soft); }
.nav-item { display: flex; align-items: center; gap: 18px; padding: 0 16px 0 22px; height: 44px; border-radius: 0 22px 22px 0; color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; }
.nav-item svg { width: 20px; height: 20px; fill: var(--secondary); }
.nav-item:hover { background: var(--hover); }
.nav-item.active { background: var(--blue-soft); color: var(--blue-dk); }
.nav-item.active svg { fill: var(--blue-dk); }
.nav-sep { height: 1px; background: var(--border-soft); margin: 14px 16px; }
.nav-title { padding: 8px 22px; font-size: 13px; color: var(--secondary); font-weight: 500; }
.cat-item { display: block; padding: 9px 22px; font-size: 14px; color: var(--text); border-radius: 0 22px 22px 0; cursor: pointer; }
.cat-item:hover { background: var(--hover); }
.cat-item.active { background: var(--blue-soft); color: var(--blue-dk); font-weight: 500; }

.content { flex: 1; min-width: 0; padding: 24px 40px 64px; max-width: 1180px; }

/* ── featured banner ── */
.featured-banner { background: linear-gradient(120deg, #e8f0fe 0%, #f3e8fd 100%); border-radius: 16px; padding: 40px 44px; margin-bottom: 36px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.featured-banner h1 { font-size: 30px; font-weight: 400; margin: 0 0 10px; color: #202124; }
.featured-banner p { margin: 0; color: #3c4043; font-size: 15px; max-width: 52ch; }
.featured-banner .pill { display: inline-block; font-size: 12px; font-weight: 500; color: var(--blue-dk); background: #fff; padding: 5px 12px; border-radius: 20px; margin-bottom: 14px; }

/* ── section + grid ── */
.section { margin-bottom: 40px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-head h2 { font-size: 20px; font-weight: 400; margin: 0; }
.section-head .more { color: var(--blue); font-size: 14px; font-weight: 500; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

.tile { display: flex; flex-direction: column; border: 1px solid var(--border-soft); border-radius: 12px; padding: 20px; background: #fff; cursor: pointer; transition: box-shadow .18s; height: 100%; }
.tile:hover { box-shadow: 0 1px 6px rgba(32,33,36,.18); }
.tile-top { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.tile-icon { width: 48px; height: 48px; border-radius: 11px; flex-shrink: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--c, #1a73e8) 12%, #fff); overflow: hidden; }
.tile-icon img { width: 40px; height: 40px; object-fit: contain; }
.tile-icon .fallback { font-size: 18px; font-weight: 600; color: var(--c, #1a73e8); }
.tile-title { font-size: 16px; font-weight: 500; margin: 0 0 3px; line-height: 1.3; }
.tile-author { font-size: 12px; color: var(--secondary); }
.tile-desc { font-size: 13px; color: #3c4043; margin: 0 0 16px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 8px; font-size: 12px; color: var(--secondary); }
.featured-chip { display: inline-flex; align-items: center; gap: 4px; color: var(--blue-dk); font-weight: 500; }
.featured-chip svg { width: 14px; height: 14px; fill: currentColor; }
.rating { display: inline-flex; align-items: center; gap: 4px; }
.stars { display: inline-flex; }
.stars svg { width: 13px; height: 13px; fill: #dadce0; }
.stars svg.on { fill: var(--star); }
.sep-dot { width: 2px; height: 2px; border-radius: 50%; background: var(--secondary); display: inline-block; }

.empty { grid-column: 1/-1; text-align: center; color: var(--secondary); padding: 50px 0; }

/* ── detail page ── */
/* Aligner le logo de l'en-tête sur la marge gauche du contenu (40px). */
body.detail .cws-header { padding-left: 40px; padding-right: 40px; }
.detail-content { max-width: 1180px; margin: 0; }
.breadcrumb { font-size: 13px; color: var(--secondary); margin-bottom: 22px; }
.breadcrumb a { color: var(--blue); }
.detail-head { display: flex; gap: 24px; align-items: flex-start; padding-bottom: 28px; border-bottom: 1px solid var(--border-soft); margin-bottom: 28px; }
.detail-icon { width: 96px; height: 96px; border-radius: 20px; flex-shrink: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--c, #1a73e8) 12%, #fff); overflow: hidden; }
.detail-icon img { width: 76px; height: 76px; object-fit: contain; }
.detail-icon .fallback { font-size: 36px; font-weight: 600; color: var(--c, #1a73e8); }
.detail-main { flex: 1; min-width: 0; }
.detail-main h1 { font-size: 28px; font-weight: 400; margin: 0 0 6px; }
.detail-by { font-size: 14px; color: var(--secondary); margin-bottom: 12px; }
.detail-by .verified { color: var(--blue); }
.detail-stats { display: flex; align-items: stretch; gap: 18px; font-size: 13px; color: var(--secondary); margin-bottom: 22px; flex-wrap: wrap; }
.detail-stats .divider { width: 1px; align-self: stretch; background: var(--border); }
.detail-stats .stat { display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.detail-stats .stat b { color: var(--text); font-weight: 500; font-size: 15px; }
.detail-stats .stat .stars { line-height: 1; }
.btn-add { background: var(--blue); color: #fff; border: none; border-radius: 22px; height: 44px; padding: 0 26px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.btn-add:hover { background: var(--blue-dk); box-shadow: 0 1px 4px rgba(26,115,232,.4); }
.btn-secondary { background: #fff; color: var(--blue); border: 1px solid var(--border); border-radius: 22px; height: 44px; padding: 0 22px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn-secondary:hover { background: var(--hover); }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--border-soft); margin-bottom: 26px; }
.tab { background: none; border: none; font: inherit; padding: 12px 2px; font-size: 14px; font-weight: 500; color: var(--secondary); border-bottom: 3px solid transparent; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.reviews-empty { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 20px 0; }
.reviews-empty .stars svg { width: 22px; height: 22px; }

.detail-section { margin-bottom: 34px; }
.detail-section h2 { font-size: 17px; font-weight: 500; margin: 0 0 14px; }
.detail-desc { font-size: 14px; color: #3c4043; max-width: 70ch; }
.screens { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 30px; }
.screen-ph { flex-shrink: 0; width: 460px; height: 280px; border-radius: 12px; background: linear-gradient(120deg, var(--blue-soft), #f3e8fd); display: grid; place-items: center; color: var(--secondary); font-size: 13px; border: 1px solid var(--border-soft); }
.shot-frame { width: 100%; max-width: 860px; height: 460px; border-radius: 14px; border: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: linear-gradient(125deg, color-mix(in srgb, var(--c, #1a73e8) 24%, #fff), color-mix(in srgb, var(--c, #1a73e8) 7%, #fff)); }
.shot-frame img { height: 90%; width: auto; max-width: 92%; border-radius: 10px; background: #fff; box-shadow: 0 20px 55px rgba(0,0,0,.25); border: 1px solid rgba(0,0,0,.06); object-fit: contain; }
.info-table { width: 100%; border-collapse: collapse; max-width: 620px; }
.info-table tr { border-bottom: 1px solid var(--border-soft); }
.info-table td { padding: 13px 0; font-size: 14px; vertical-align: top; }
.info-table td:first-child { color: var(--secondary); width: 200px; }
.install-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 860px; }
.install-card { border: 1px solid var(--border-soft); border-radius: 12px; padding: 20px; }
.install-card h3 { font-size: 15px; font-weight: 500; margin: 0 0 12px; display: flex; align-items: center; gap: 9px; }
.install-card .tag { font-size: 11px; font-weight: 600; letter-spacing: .03em; background: var(--blue-soft); color: var(--blue-dk); padding: 3px 9px; border-radius: 6px; }
.install-card ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: #3c4043; }
.install-card ol::marker { color: var(--blue); font-weight: 600; }
.install-card .note { margin: 13px 0 0; font-size: 12.5px; color: var(--secondary); background: var(--hover); border-radius: 8px; padding: 9px 11px; }
.install-card .dl { margin-top: 14px; }
.perm-list { list-style: none; margin: 0; padding: 0; max-width: 640px; }
.perm-list li { padding: 11px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; display: flex; gap: 12px; align-items: flex-start; }
.perm-list li code { word-break: break-all; }

/* recommandations bas de fiche */
.reco { border-top: 1px solid var(--border-soft); padding-top: 28px; }
.reco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.reco-card { display: flex; align-items: center; gap: 13px; padding: 13px; border: 1px solid var(--border-soft); border-radius: 12px; transition: box-shadow .15s; }
.reco-card:hover { box-shadow: 0 1px 6px rgba(32,33,36,.16); text-decoration: none; }
.reco-icon { width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; overflow: hidden; background: color-mix(in srgb, var(--c, #1a73e8) 14%, #fff); }
.reco-icon img { width: 32px; height: 32px; object-fit: contain; }
.reco-name { font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.25; }
.reco-cat { font-size: 12px; color: var(--secondary); }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .content { padding: 20px; }
  .wordmark { display: none; }
  .featured-banner { flex-direction: column; align-items: flex-start; padding: 28px; }
  .detail-head { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *, html { scroll-behavior: auto; transition: none !important; } }
