
/* ---------- Gallery (IMAGES tab) ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}
.gallery-item {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--surface-2, #fafbfc);
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    cursor: zoom-in;
    padding: 0;
    display: flex; align-items: center; justify-content: center;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.gallery-item:hover {
    border-color: var(--accent, #4f46e5);
    box-shadow: 0 4px 14px rgba(15,23,42,.08);
    transform: translateY(-1px);
}
.gallery-item img {
    max-width: 100%; max-height: 100%;
    object-fit: contain;
    display: block;
}
.gallery-item--variant {
    background: #0f172a;
}
.gallery-item--variant img { max-height: 90%; }

/* Tab count badge next to IMAGES label */
.tab-count {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--surface-3, #f1f3f5);
    color: var(--muted, #64748b);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
}
.tab[aria-selected="true"] .tab-count {
    background: var(--accent, #4f46e5);
    color: #fff;
}

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed; inset: 0;
    background: rgba(15,23,42,.92);
    display: none;
    align-items: center; justify-content: center;
    z-index: 1000;
    padding: 24px;
}
.lightbox.is-open { display: flex; }
.lightbox-figure {
    margin: 0; max-width: 90vw; max-height: 90vh;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.lightbox-figure img {
    max-width: 90vw; max-height: 80vh;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
}
.lightbox-figure figcaption {
    color: #e5e7eb; font-size: 14px; text-align: center;
}
.lightbox-close, .lightbox-nav {
    position: absolute;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    color: #fff;
    width: 44px; height: 44px;
    border-radius: 50%;
    font-size: 24px; line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .12s ease;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,.18); }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev  { left: 16px;  top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 16px; top: 50%; transform: translateY(-50%); }


/* SkyRaccoon — Modern theme (3/3) : detail page */

.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 24px; }
@media (max-width: 980px) { .detail-grid { grid-template-columns: 1fr; } }

.detail-head { margin-bottom: 20px; }
.detail-title {
    margin: 0; font-size: 28px; font-weight: 800;
    color: var(--text); letter-spacing: -0.02em;
}
.detail-sub {
    margin: 4px 0 16px; color: var(--muted); font-size: 14px;
}

/* ---------- Tabs ---------- */
.tabs {
    display: flex; gap: 4px; margin: 16px 0 20px;
    border-bottom: 1px solid var(--border);
}
.tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 16px; background: transparent; color: var(--muted);
    font-weight: 600; font-size: 13px; border: 0; cursor: pointer;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: color .15s, border-color .15s;
    font-family: inherit;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.tab-icon { font-size: 16px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- Main content sections ---------- */
.detail-section h2 {
    font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
    margin: 24px 0 10px; color: var(--muted); font-weight: 700;
}
.detail-section h2:first-child { margin-top: 0; }
.detail-prose { font-size: 14.5px; line-height: 1.65; color: var(--text-2); }
.detail-prose p { margin: 0 0 10px; }

/* ---------- Aside card ---------- */
.detail-aside {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    position: sticky; top: 76px;
}
.aside-logo {
    background: var(--surface-2); padding: 14px; text-align: center;
    margin-bottom: 14px; border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 600; color: var(--text-2);
}
.aside-logo img { max-height: 56px; margin: 0 auto; }

.aside-main-img {
    width: 100%; aspect-ratio: 16 / 9; background: var(--surface-2);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; border: 1px solid var(--border);
    border-radius: var(--radius-sm); margin-bottom: 14px;
}
.aside-main-img img { object-fit: contain; width: 100%; height: 100%; }

/* ---------- Variant thumbnails ---------- */
.other-variants { margin-bottom: 16px; }
.variant-thumbs {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.variant-thumb {
    display: block; width: 100%; padding: 3px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color .15s, transform .1s, box-shadow .15s;
}
.variant-thumb:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
    transform: translateY(-1px);
}
.variant-thumb.is-active { border-color: var(--accent); border-width: 2px; padding: 2px; }

/* ---------- Skill gauges ---------- */
.skill-gauges { display: flex; gap: 16px; margin: 16px 0; }
.skill-gauge { flex: 1; }
.skill-gauge-title {
    font-size: 10.5px; font-weight: 700; text-transform: uppercase;
    color: var(--muted); letter-spacing: 0.8px; margin-bottom: 6px;
    text-align: center;
}
.skill-gauge-bar {
    position: relative; height: 8px; border-radius: 999px;
    background: linear-gradient(to right, #10b981 0%, #f59e0b 50%, #ef4444 100%);
}
.skill-gauge-marker {
    position: absolute; top: 50%; width: 14px; height: 14px;
    background: var(--surface); border: 2px solid var(--dark);
    border-radius: 50%; transform: translate(-50%, -50%);
    box-shadow: var(--shadow-sm);
}
.skill-gauge-value {
    text-align: center; margin-top: 6px;
    font-size: 12px; font-weight: 600; color: var(--text);
}

/* ---------- Aside specs ---------- */
.aside-specs { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }
.aside-specs h3 {
    margin: 0 0 10px; font-size: 11px; text-transform: uppercase;
    letter-spacing: 0.8px; color: var(--muted); font-weight: 700;
}
.aside-specs .detail-prose { font-size: 13px; line-height: 1.6; color: var(--text-2); }
.aside-specs .detail-prose p { margin: 0 0 6px; }
.aside-specs .detail-prose ul,
.aside-specs .detail-prose ol { margin: 0 0 6px 18px; padding: 0; }
.aside-specs .detail-prose table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.aside-specs .detail-prose td,
.aside-specs .detail-prose th {
    padding: 5px 8px; border-bottom: 1px solid var(--border); text-align: left;
}
.aside-specs .detail-prose th { color: var(--muted); font-weight: 500; }

.specs-list { list-style: none; margin: 10px 0; padding: 0; font-size: 13px; }
.specs-list li {
    display: flex; justify-content: space-between;
    padding: 8px 0; border-bottom: 1px solid var(--border);
}
.specs-list li:last-child { border-bottom: 0; }
.specs-list .lab { color: var(--muted); }
.specs-list .val { color: var(--text); font-weight: 600; }

/* ---------- Shops ---------- */
.shop-list {
    list-style: none; padding: 0; margin: 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px;
}
.shop-list li {
    background: var(--surface); border: 1px solid var(--border);
    padding: 12px; border-radius: var(--radius-sm);
    transition: border-color .15s, box-shadow .15s;
}
.shop-list li:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.shop-list a { color: var(--accent); font-weight: 600; }

/* ---------- Shops : grille de cartes-logo (onglet Shops d'une fiche modèle) ---------- */
.shop-grid {
    list-style: none; padding: 0; margin: 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px;
}
.shop-card-item { display: block; }
.shop-card {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px; text-decoration: none;
    color: var(--text-2); transition: border-color .15s, box-shadow .15s, transform .15s;
    height: 100%;
}
.shop-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.shop-card-logo {
    width: 100%; height: 72px; display: flex; align-items: center; justify-content: center;
    background: #fff; border-radius: var(--radius-sm); overflow: hidden;
}
.shop-card-logo img { max-width: 90%; max-height: 60px; object-fit: contain; }
.shop-card-noimg {
    font-size: 22px; font-weight: 700; letter-spacing: 1px;
    color: var(--muted); text-transform: uppercase;
}
.shop-card-body { text-align: center; }
.shop-card-name { font-weight: 600; color: var(--text-1, var(--text-2)); font-size: 14px; }
.shop-card-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- Shops : fiche détail (/shops/<slug>) ---------- */
.shop-detail-header {
    display: flex; gap: 20px; align-items: center;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 20px; margin-bottom: 16px;
}
.shop-detail-logo {
    flex: 0 0 140px; height: 100px;
    display: flex; align-items: center; justify-content: center;
    background: #fff; border-radius: var(--radius-sm); overflow: hidden;
}
.shop-detail-logo img { max-width: 90%; max-height: 86px; object-fit: contain; }
.shop-detail-noimg { font-size: 30px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.shop-detail-intro h1 { margin: 0 0 8px; }
.shop-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.shop-detail-tags .tag {
    background: var(--bg, #f1f3f5); color: var(--text-2);
    padding: 2px 8px; border-radius: 10px; font-size: 12px;
}
.shop-detail-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px;
}
.shop-detail-section {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 16px;
}
.shop-detail-section h2 {
    font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
    margin: 0 0 10px; color: var(--muted); font-weight: 700;
}
.shop-infos { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; }
.shop-infos dt { color: var(--muted); font-size: 12px; }
.shop-infos dd { margin: 0; font-size: 14px; word-break: break-word; }
.shop-brand-list, .shop-model-list { list-style: none; padding: 0; margin: 0; }
.shop-brand-list li, .shop-model-list li { padding: 4px 0; border-bottom: 1px dashed var(--border); }
.shop-brand-list li:last-child, .shop-model-list li:last-child { border-bottom: none; }
.shop-model-ext { margin-left: 6px; color: var(--muted); text-decoration: none; }
.shop-model-ext:hover { color: var(--accent); }

/* ---------- Variants table (legacy, still used elsewhere) ---------- */

/* ---------- PDF tab (datasheets) ---------- */
.pdf-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.2rem 0;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.pdf-list li {
    display: flex;
    align-items: center;
    gap: .6rem;
}
.pdf-list a {
    text-decoration: none;
    font-weight: 500;
}
.pdf-list a:hover {
    text-decoration: underline;
}
.pdf-tag {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    padding: 1px 6px;
    border: 1px solid #c7c7c7;
    border-radius: 2px;
    color: #555;
    background: #f4f4f4;
    text-transform: uppercase;
}
.pdf-viewer {
    width: 100%;
    aspect-ratio: 4 / 5;
    background: #222;
    border: 1px solid #ccc;
    border-radius: 2px;
    overflow: hidden;
}
.pdf-viewer iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #fff;
}

.variants-table {
    width: 100%; border-collapse: collapse; background: var(--surface); font-size: 13px;
    border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.variants-table th, .variants-table td {
    padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border);
}
.variants-table th {
    background: var(--surface-2); font-weight: 600; color: var(--muted);
    text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px;
}
.variants-table tr:last-child td { border-bottom: 0; }

.variant-thumb img {
    display: block; width: 100%; height: 54px; object-fit: contain;
    border-radius: 3px;
}
/* Silhouette icons (dark background) */
.variant-thumb--variant { background: var(--dark); border-color: var(--dark-2); }
.variant-thumb--variant img { height: 44px; }
