/*
Theme Name: NEONDISTRIKT
Theme URI: https://example.com/
Author: NEONDISTRIKT
Author URI: https://example.com/
Description: Cyberpunk affiliate shop theme for WooCommerce.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: neondistrikt
*/

:root {
    --nd-black: #000000;
    --nd-white: #ffffff;
    --nd-grey: #555555;
    --nd-cyan: #00a9ff;
    --nd-orange: #ff9500;
    --nd-green: #00ff88;
    --nd-pink: #ff174d;

    --nd-header-height: 240px;
    --nd-footer-height: 58px;
    --nd-page-padding: 24px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--nd-black);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--nd-black);
    color: var(--nd-white);
    font-family: "Courier New", Courier, monospace;
    font-size: 16px;
    line-height: 1.5;
}

/* Tous les textes utilisent Courier New par defaut. */
body,
button,
input,
select,
textarea,
a {
    font-family: "Courier New", Courier, monospace;
}

a {
    color: var(--nd-white);
    text-decoration: none;
}

button {
    color: var(--nd-white);
}

/* HEADER */

.site-header {
    position: relative;
    min-height: var(--nd-header-height);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 26px 16px 30px;
    background-color: var(--nd-black);
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
        var(--nd-header-image, none);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    text-align: center;
}

.site-branding {
    margin: 0;
}

.site-title {
    margin: 0;
    color: var(--nd-cyan);
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 400;
    letter-spacing: 2px;
    line-height: 1.15;
}

.site-title a {
    color: inherit;
    font-family: Arial, Helvetica, sans-serif;
}

.site-description {
    margin: 8px 0 0;
    color: var(--nd-white);
    font-size: 16px;
    font-style: italic;
}

/* NAVIGATION */

.main-navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.category-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid currentColor;
    border-radius: 0;
    background: var(--nd-black);
    color: var(--nd-white);
    font-size: 14px;
    line-height: 1.2;
    text-align: center;
    transition:
        background-color 160ms ease,
        color 160ms ease,
        box-shadow 160ms ease;
}

.category-button--light {
    color: var(--nd-orange);
}

.category-button--decorations {
    color: var(--nd-green);
}

.category-button--tech {
    color: var(--nd-pink);
}

.category-button--all {
    color: var(--nd-cyan);
}

.category-button:hover,
.category-button:focus-visible,
.category-button.is-active {
    background: currentColor;
    outline: none;
}

.category-button:hover span,
.category-button:focus-visible span,
.category-button.is-active span {
    color: var(--nd-black);
}

.category-button--light:hover,
.category-button--light:focus-visible,
.category-button--light.is-active {
    box-shadow: 0 0 10px rgba(255, 149, 0, 0.35);
}

.category-button--decorations:hover,
.category-button--decorations:focus-visible,
.category-button--decorations.is-active {
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.35);
}

.category-button--tech:hover,
.category-button--tech:focus-visible,
.category-button--tech.is-active {
    box-shadow: 0 0 10px rgba(255, 23, 77, 0.35);
}

.category-button--all:hover,
.category-button--all:focus-visible,
.category-button--all.is-active {
    box-shadow: 0 0 10px rgba(0, 169, 255, 0.35);
}

.category-button span {
    color: inherit;
}

/* Ligne grise sous le header */

.header-divider {
    width: 100%;
    height: 1px;
    border: 0;
    margin: 0;
    background: #555555;
}

/* CONTENU */

.site-main {
    width: 100%;
    min-height: calc(100vh - var(--nd-header-height) - var(--nd-footer-height));
    padding: 18px var(--nd-page-padding) calc(var(--nd-footer-height) + 24px);
    background: var(--nd-black);
}

.results-count {
    margin: 0 0 18px;
    color: var(--nd-white);
    font-style: italic;
}

.results-count strong {
    color: inherit;
    font-weight: 400;
}

/* GRILLE PRODUITS */

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    align-items: stretch;
}

.product-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #444444;
    background: var(--nd-black);
    color: var(--nd-white);
}

.product-card-title {
    margin: 0;
    padding: 12px;
    color: var(--nd-white);
    font-size: 16px;
    font-style: italic;
    font-weight: 400;
    overflow-wrap: anywhere;
}

.product-card-title a {
    color: var(--nd-white);
}

.product-card-title a:hover,
.product-card-title a:focus-visible {
    color: var(--nd-cyan);
}

/* Images cliquables */

.product-image-link {
    display: flex;
    width: 100%;
    aspect-ratio: 1 / 1;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 12px;
    background: var(--nd-black);
}

.product-image-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 180ms ease;
}

.product-image-link:hover img,
.product-image-link:focus-visible img {
    transform: scale(1.035);
}

.product-image-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #777777;
    font-size: 13px;
    text-align: center;
}

/* Prix et bouton marchand */

.product-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding: 12px;
}

.product-price {
    color: var(--nd-white);
    font-size: 14px;
}

.product-price del {
    color: #999999;
}

.product-price ins {
    color: var(--nd-white);
    text-decoration: none;
}

.shop-button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid #777777;
    background: #333333;
    color: var(--nd-white);
    font-size: 12px;
    text-align: center;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.shop-button:hover,
.shop-button:focus-visible {
    border-color: var(--nd-cyan);
    background: #161616;
    color: var(--nd-white);
}

/* Aucun produit */

.no-products {
    padding: 20px 0;
    color: var(--nd-white);
}

/* PAGINATION */

.woocommerce-pagination {
    margin: 28px 0;
}

.woocommerce-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    list-style: none;
}

.woocommerce-pagination a,
.woocommerce-pagination span {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #555555;
    color: var(--nd-white);
}

.woocommerce-pagination .current,
.woocommerce-pagination a:hover {
    border-color: var(--nd-cyan);
    color: var(--nd-cyan);
}

/* FOOTER FIXE */

.site-footer {
    position: fixed;
    z-index: 100;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    min-height: var(--nd-footer-height);
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 16px;
    border-top: 1px solid #333333;
    background: var(--nd-black);
}

.footer-button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid var(--nd-white);
    background: var(--nd-black);
    color: var(--nd-white);
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color 160ms ease, color 160ms ease;
}

.footer-button:hover,
.footer-button:focus-visible {
    background: var(--nd-white);
    color: var(--nd-black);
}

/* Accessibilite */

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--nd-cyan);
    outline-offset: 3px;
}

/* TABLETTE */

@media (max-width: 1000px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    :root {
        --nd-page-padding: 18px;
    }
}

/* TELEPHONE : une carte par ligne */

@media (max-width: 600px) {
    :root {
        --nd-header-height: 0px;
        --nd-footer-height: 58px;
        --nd-page-padding: 12px;
    }

    .site-header {
        min-height: 0;
        padding: 24px 12px;
        gap: 16px;
    }

    .site-title {
        font-size: 32px;
    }

    .site-description {
        font-size: 13px;
    }

    .main-navigation {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 8px;
    }

    .category-button {
        width: 100%;
        min-height: 40px;
        padding: 8px 6px;
        font-size: 12px;
    }

    .site-main {
        min-height: 0;
        padding-top: 16px;
        padding-bottom: calc(var(--nd-footer-height) + 24px);
    }

    .product-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .product-card-title {
        font-size: 15px;
    }

    .product-image-link {
        aspect-ratio: 1 / 1;
    }

    .product-card-actions {
        padding: 12px;
    }

    .site-footer {
        gap: 8px;
        padding: 8px;
    }

    .footer-button {
        min-height: 36px;
        padding: 8px 10px;
        font-size: 11px;
    }
}

/* Preference de reduction des animations */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
