/* Style Tebex - Pages scripts Spectre */

/* ═══════════════════════════════════════════════════════════════
   Grille produits (scripts/index.html)
   ═══════════════════════════════════════════════════════════════ */
.script-page {
    position: relative;
    z-index: 1;
    padding: 6rem 0 4rem;
    min-height: 100vh;
}

.script-page .container {
    max-width: 1280px;
}

.script-page-header {
    margin-bottom: 2.5rem;
}

.script-page-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.script-page-header p {
    color: var(--text-muted);
}

/* Grille produits style Tebex */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(201, 162, 39, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.product-card-image {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.15) 0%, rgba(201, 162, 39, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    position: relative;
    overflow: hidden;
}

.product-card-image .product-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.product-card-image.has-image .product-card-img {
    display: block;
}

.product-card-image.has-image .product-card-icon-fallback {
    display: none;
}

.product-card-icon-fallback {
    position: relative;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.product-card-body {
    padding: 1.25rem;
}

.product-card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
    line-height: 1.3;
}

.product-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.product-card-rating {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--accent);
    font-size: 0.9rem;
}

.product-card-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
}

.product-card-price.free {
    color: var(--success);
}

.product-card-actions {
    margin-top: 1rem;
}

.product-card-actions .btn {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    text-align: center;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   Page produit détaillée (style Tebex)
   ═══════════════════════════════════════════════════════════════ */
.product-detail {
    position: relative;
    z-index: 1;
    padding: 6rem 0 4rem;
    min-height: 100vh;
}

.product-detail .container {
    max-width: 1200px;
}

.product-detail-breadcrumb {
    margin-bottom: 1.5rem;
}

.product-detail-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.product-detail-breadcrumb a:hover {
    color: var(--accent);
}

.product-detail-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
    }
}

/* Colonne gauche - Image + Prix */
.product-detail-sidebar {
    position: sticky;
    top: 100px;
}

.product-detail-image {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.2) 0%, rgba(201, 162, 39, 0.05) 100%);
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.product-detail-image .product-detail-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.product-detail-image.has-image .product-detail-img {
    display: block;
}

.product-detail-image.has-image .product-detail-icon-fallback {
    display: none;
}

.product-detail-icon-fallback {
    position: relative;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-detail-price-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.product-detail-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.product-detail-price.free {
    color: var(--success);
}

.product-detail-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.product-detail-cta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-detail-cta .btn {
    width: 100%;
    justify-content: center;
}

.product-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.product-detail-tag {
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Colonne droite - Contenu */
.product-detail-main {
    min-width: 0;
}

.product-detail-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.product-detail-path {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.product-detail-path code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* Tabs style Tebex */
.product-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.product-tab {
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.product-tab:hover {
    color: var(--accent);
}

.product-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.product-tab-content {
    display: none;
}

.product-tab-content.active {
    display: block;
}

.product-tab-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
}

.product-tab-content h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin: 0 0 1rem;
    color: var(--accent);
}

.product-tab-content h3 {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--text);
}

.product-tab-content p, .product-tab-content li {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.product-tab-content ul {
    padding-left: 1.5rem;
}

.product-tab-content pre {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.product-tab-content code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

/* Related products */
.product-related {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.product-related h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.product-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.product-related-card {
    display: block;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.product-related-card:hover {
    border-color: var(--accent);
}

.product-related-card .product-related-thumb {
    aspect-ratio: 16/10;
    border-radius: 8px;
    margin-bottom: 0.65rem;
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-related-card .product-related-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.product-related-card .product-related-thumb.has-image .product-related-thumb-img {
    display: block;
}

.product-related-card .product-related-thumb .product-related-icon-fallback {
    font-size: 1.5rem;
    line-height: 1;
}

.product-related-card .product-related-thumb.has-image .product-related-icon-fallback {
    display: none;
}


.product-related-card strong {
    font-size: 0.95rem;
    display: block;
}

.product-related-card small {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   Galerie images & vidéos
   ═══════════════════════════════════════════════════════════════ */
.product-gallery {
    margin-top: 2rem;
}

.product-gallery h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0.75rem 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.gallery-empty code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    color: var(--accent-dim);
}

.gallery-item {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.05);
}

.gallery-item.video::after {
    content: '▶';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0.9;
    transition: opacity 0.3s;
}

.gallery-item.video:hover::after {
    opacity: 1;
    background: rgba(201, 162, 39, 0.3);
}

.gallery-item iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Lightbox */
.gallery-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.gallery-lightbox.active {
    display: flex;
}

.gallery-lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.gallery-lightbox-content img,
.gallery-lightbox-content video {
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}

.gallery-lightbox-content iframe {
    width: 90vw;
    height: 50.625vw;
    max-height: 85vh;
    border: none;
    border-radius: 8px;
}

.gallery-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: var(--accent);
    color: var(--bg-dark);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.gallery-lightbox-close:hover {
    background: var(--accent-dim);
}

.gallery-lightbox-nav {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: rgba(201, 162, 39, 0.9);
    color: var(--bg-dark);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.gallery-lightbox-nav:hover {
    background: var(--accent);
    transform: scale(1.1);
}
