/*
Theme Name: Fonk
Theme URI: https://fonk.fr
Author: Fonk
Author URI: https://fonk.fr
Description: Thème WordPress minimaliste pour artiste peintre — galerie et boutique.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.5
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: fonk
Tags: e-commerce, gallery, minimal, art, woocommerce
*/

/* ============================================================
   RESET & BASE
   ============================================================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --dark: #111;
    --light: #f2ede8;

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Instrument Serif', Georgia, serif;

    --max-width: 1400px;
    --spacing: 2.5rem;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    color: var(--dark);
    background-color: var(--light);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

::selection {
    background: var(--dark);
    color: var(--light);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

h3, h4 {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.2;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.1rem; }

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

.section {
    padding: 6rem 0;
}

.section-head {
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-head h2 {
    font-size: clamp(2.4rem, 5vw, 4rem);
    letter-spacing: -0.03em;
}

.section-head a {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--dark);
    padding-bottom: 3px;
    transition: opacity 0.3s;
}

.section-head a:hover {
    opacity: 0.4;
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.5rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
}

.site-logo {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 400;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.site-nav a {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: opacity 0.3s;
}

.site-nav a:hover {
    opacity: 0.5;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: currentColor;
    margin: 6px 0;
    transition: 0.3s var(--ease);
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
    min-height: 100vh;
    background: var(--dark);
    color: var(--light);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3rem var(--spacing);
    position: relative;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 40%);
    z-index: 1;
    pointer-events: none;
}

.hero__title {
    font-family: var(--font-display);
    font-size: clamp(5rem, 18vw, 14rem);
    font-weight: 400;
    line-height: 0.85;
    letter-spacing: -0.06em;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.hero__row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.hero__sub {
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    opacity: 0.5;
    max-width: 30ch;
    line-height: 1.8;
}

.hero__scroll {
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0.4;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hero__scroll::before {
    content: '';
    width: 50px;
    height: 1px;
    background: currentColor;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: all 0.3s var(--ease);
}

.btn:hover {
    background: var(--dark);
    color: var(--light);
}

/* ============================================================
   CATEGORY PILLS
   ============================================================ */

.pills {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.pill {
    padding: 0.6rem 1.6rem;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0;
    transition: all 0.3s var(--ease);
    cursor: pointer;
    background: transparent;
    color: var(--dark);
}

.pill:hover,
.pill.active {
    background: var(--dark);
    color: var(--light);
    border-color: var(--dark);
}

/* ============================================================
   BENTO GRID (gallery)
   ============================================================ */

.bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(200px, auto);
    gap: 0.8rem;
}

.bento__item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.bento__item--a { grid-column: span 7; grid-row: span 2; }
.bento__item--b { grid-column: span 5; grid-row: span 1; }
.bento__item--c { grid-column: span 5; grid-row: span 1; }
.bento__item--d { grid-column: span 4; grid-row: span 2; }
.bento__item--e { grid-column: span 8; grid-row: span 1; }
.bento__item--f { grid-column: span 12; grid-row: span 1; }

.bento__item img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.7s var(--ease);
}

.bento__item:hover img {
    transform: scale(1.04);
}

.bento__overlay {
    position: absolute;
    inset: 0;
    background: var(--dark);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
}

.bento__item:hover .bento__overlay {
    opacity: 0.35;
}

.bento__info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    color: var(--light);
    transform: translateY(100%);
    transition: transform 0.4s var(--ease);
}

.bento__item:hover .bento__info {
    transform: translateY(0);
}

.bento__name {
    font-size: 0.9rem;
    font-weight: 500;
}

.bento__price {
    font-size: 0.8rem;
    opacity: 0.7;
}

.bento__badge {
    position: absolute;
    top: 1.2rem;
    left: 1.2rem;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: var(--dark);
    color: var(--light);
    padding: 0.4rem 1rem;
}

/* ============================================================
   CTA BAND
   ============================================================ */

.cta-band {
    background: var(--dark);
    color: var(--light);
    padding: 4rem 0;
    text-align: center;
}

.cta-band h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.cta-band .btn:hover {
    background: var(--light);
    color: var(--dark);
}

/* ============================================================
   ABOUT
   ============================================================ */

.about {
    padding: 8rem 0;
}

.about__grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 6rem;
    align-items: center;
}

.about__img {
    position: relative;
    overflow: hidden;
}

.about__img img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.about__img::after {
    content: '';
    position: absolute;
    top: -2rem;
    right: -2rem;
    width: 40%;
    height: 40%;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.about__label {
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0.4;
    margin-bottom: 1.5rem;
}

.about__grid h2 {
    margin-bottom: 2rem;
}

.about__grid p {
    opacity: 0.5;
    margin-bottom: 1rem;
    max-width: 40ch;
    font-size: 0.95rem;
    line-height: 1.8;
}

/* ============================================================
   SINGLE PRODUCT
   ============================================================ */

.product-single {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    padding: 8rem 0 5rem;
    align-items: start;
}

.product-single__gallery img {
    width: 100%;
}

.product-single__details h1 {
    margin-bottom: 0.8rem;
}

.product-single__price {
    font-size: 1.3rem;
    opacity: 0.5;
    margin-bottom: 1.5rem;
}

.product-single__meta {
    font-size: 0.85rem;
    opacity: 0.5;
    margin-bottom: 2rem;
    line-height: 2;
}

.product-single__description {
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.product-single .btn {
    width: 100%;
    text-align: center;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 3rem var(--spacing);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.site-footer__copy {
    font-size: 0.7rem;
    opacity: 0.3;
}

.site-footer__links {
    display: flex;
    gap: 2rem;
}

.site-footer__links a {
    font-size: 0.7rem;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.site-footer__links a:hover {
    opacity: 1;
}

/* ============================================================
   WOOCOMMERCE OVERRIDES
   ============================================================ */

.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 3rem 2rem;
}

.woocommerce ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    padding: 0;
    float: none !important;
    text-align: center;
}

.woocommerce ul.products li.product a img {
    width: 100%;
    height: auto;
    display: block;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.woocommerce ul.products li.product .price {
    opacity: 0.7;
    font-size: 0.8rem;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: 1px solid var(--dark);
    background: transparent;
    color: var(--dark);
    border-radius: 0;
    font-weight: 400;
    transition: all 0.3s var(--ease);
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
    background: var(--dark);
    color: var(--light);
}

.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
    background: var(--dark);
    color: var(--light);
    border-color: var(--dark);
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
    background: transparent;
    color: var(--dark);
}

/* Cart */
.woocommerce-cart table.cart {
    border-collapse: collapse;
}

.woocommerce-cart table.cart td,
.woocommerce-cart table.cart th {
    border-color: rgba(0, 0, 0, 0.08);
    padding: 1rem;
}

/* Checkout */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    border: 1px solid rgba(0, 0, 0, 0.15);
    padding: 0.8rem 1rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    border-radius: 0;
    background: transparent;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus {
    border-color: var(--dark);
    box-shadow: none;
    outline: none;
}

.woocommerce-message,
.woocommerce-info {
    border-top-color: var(--dark);
}

.woocommerce-message::before,
.woocommerce-info::before {
    color: var(--dark);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
    .product-single {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-top: 6rem;
    }

    .about__grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about__img::after {
        display: none;
    }

    .bento__item--a,
    .bento__item--b,
    .bento__item--c,
    .bento__item--d,
    .bento__item--e {
        grid-column: span 6;
        grid-row: span 1;
    }

    .bento__item--f {
        grid-column: span 12;
    }
}

@media (max-width: 600px) {
    :root {
        --spacing: 1.2rem;
    }

    .site-header {
        padding: 1.2rem;
    }

    .site-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--dark);
        color: var(--light);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: right 0.3s var(--ease);
        z-index: 99;
        mix-blend-mode: normal;
    }

    .site-nav.open {
        right: 0;
    }

    .site-nav a {
        font-size: 1rem;
    }

    .nav-toggle {
        display: block;
        z-index: 101;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero__title {
        font-size: clamp(3.5rem, 20vw, 6rem);
    }

    .hero__row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .bento__item--a,
    .bento__item--b,
    .bento__item--c,
    .bento__item--d,
    .bento__item--e,
    .bento__item--f {
        grid-column: span 12;
    }

    .woocommerce ul.products {
        grid-template-columns: 1fr !important;
    }
}
