html {
    background: var(--nm-site-background);
    background-attachment: fixed;
}

body{
    background: var(--nm-site-background);
    background-attachment: fixed;
    font-family: var(--font-main) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    letter-spacing: -0.01em; /* Geist adore être un peu resserrée */
}

.site,
.site-content {
    background: transparent;
}

h1, h2, h3, h4, h5{
    font-family: var(--font-main) !important;
}

#content {
    padding-top: 100px;
}

/* Global scrollbar styling */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-dark);
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

*::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--primary-color) 82%, var(--accent-color) 18%);
    border-radius: 999px;
    border: 1px solid var(--bg-dark);
}

*::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--accent-color) 65%, var(--primary-color) 35%);
}

.nm-error-page,
.nm-search-page {
    width: min(1240px, 92vw);
    margin: 0 auto;
    padding: clamp(48px, 8vh, 96px) 0 80px;
}

body.error404 .storefront-breadcrumb,
body.error404 .woocommerce-breadcrumb,
body.error404 .entry-header {
    display: none !important;
}

.nm-error-hero,
.nm-error-search,
.nm-search-head,
.nm-search-card,
.nm-empty-state {
    border: 1px solid var(--secondary-border-color);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.03);
}

.nm-error-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: clamp(22px, 4vw, 46px);
    align-items: center;
    min-height: 390px;
    padding: clamp(24px, 4vw, 52px);
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(820px 360px at 18% 0%, color-mix(in srgb, var(--primary-color) 18%, transparent), transparent 72%),
        radial-gradient(620px 280px at 100% 20%, color-mix(in srgb, var(--accent-color) 14%, transparent), transparent 76%),
        rgba(255, 255, 255, 0.03);
}

.nm-error-hero > * {
    position: relative;
    z-index: 1;
}

.nm-error-hero--compact {
    min-height: 300px;
}

.nm-error-orbit {
    display: inline-grid;
    place-items: center;
    width: clamp(86px, 12vw, 132px);
    aspect-ratio: 1;
    border: 1px solid color-mix(in srgb, var(--primary-color) 50%, var(--secondary-border-color));
    border-radius: 999px;
    background: rgba(145, 94, 255, 0.12);
    color: var(--text-main);
    box-shadow: 0 0 42px color-mix(in srgb, var(--primary-color) 22%, transparent);
}

.nm-error-orbit span {
    font-size: clamp(1.55rem, 3.6vw, 3.1rem);
    font-weight: 800;
}

.nm-error-orbit svg {
    width: 34px;
    height: 34px;
    color: var(--accent-color);
}

.nm-error-eyebrow {
    display: block;
    margin-bottom: 10px;
    color: var(--accent-color);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.nm-error-copy h1,
.nm-search-head h1 {
    margin: 0;
    color: var(--text-main);
    font-size: clamp(2.1rem, 5vw, 4.2rem);
    line-height: 1.02;
    letter-spacing: 0;
}

.nm-error-copy {
    max-width: 660px;
}

.nm-error-copy p,
.nm-error-search p,
.nm-search-card p,
.nm-empty-state p {
    margin: 12px 0 0;
    color: var(--text-dim);
    line-height: 1.6;
}

.nm-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    margin-top: 24px;
}

.nm-error-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--secondary-border-color);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.nm-error-button:hover {
    border-color: color-mix(in srgb, var(--primary-color) 60%, var(--secondary-border-color));
    background: rgba(145, 94, 255, 0.12);
    color: var(--text-main);
}

.nm-error-button--primary {
    border-color: color-mix(in srgb, var(--primary-color) 68%, var(--secondary-border-color));
    background: var(--primary-color);
}

.nm-error-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 18px;
    align-items: center;
    margin-top: 18px;
    padding: 20px;
}

body.error404 .nm-error-search {
    width: min(980px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.nm-error-search h2,
.nm-empty-state h2 {
    margin: 0;
    color: var(--text-main);
    font-size: 1.25rem;
}

.nm-error-search .search-form {
    display: flex;
    gap: 10px;
}

.nm-error-search .search-field {
    min-height: 42px;
}

.nm-error-search .search-submit {
    min-height: 42px;
    border: 1px solid color-mix(in srgb, var(--primary-color) 68%, var(--secondary-border-color));
    border-radius: 10px;
    background: var(--primary-color);
    color: var(--text-main);
    font-weight: 700;
}

.nm-search-head {
    padding: 24px;
}

.nm-search-results {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.nm-search-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
}

.nm-search-card span {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.nm-search-card h2 {
    margin: 0;
    font-size: 1.2rem;
}

.nm-search-card h2 a {
    color: var(--text-main);
    text-decoration: none;
}

.nm-empty-state {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 28px;
    text-align: center;
}

.nm-empty-state > i,
.nm-empty-state > svg {
    width: 34px;
    height: 34px;
    color: var(--accent-color);
}

.nm-empty-state--products {
    margin-top: 18px;
}

@media (max-width: 820px) {
    .nm-error-hero,
    .nm-error-search,
    .nm-search-card {
        grid-template-columns: 1fr;
    }

    .nm-error-actions,
    .nm-search-card {
        justify-content: flex-start;
    }

    .nm-error-hero {
        min-height: auto;
        text-align: left;
    }

    .nm-error-search .search-form {
        flex-direction: column;
    }
}
