:root {
    --color-bg: #F7F1E8;
    --color-text: #3A2E22;
    --color-accent: #C1653D;
    --color-accent-dark: #9c4e30;
    --color-border: #E3D6C4;
    --font-heading: "Cormorant Garamond", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

h1, h2, h3, .site-header__logo {
    font-family: var(--font-heading);
    font-weight: 600;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    padding: 1rem 2rem;
    border-bottom: none;
    background: #fff;
    position: relative;
}

.site-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background-image: repeating-linear-gradient(90deg, var(--color-accent) 0 6px, transparent 6px 11px);
}

.site-header__logo {
    font-size: 1.5rem;
    color: var(--color-text);
    text-decoration: none;
}

.site-header__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
}

.site-header__nav a {
    color: var(--color-text);
    text-decoration: none;
}

.site-header__nav a:hover { color: var(--color-accent); }

.site-header__icon-link { position: relative; display: inline-flex; align-items: center; }
.site-header__icon-link:hover { color: var(--color-accent); }
.site-header__badge {
    position: absolute; top: -6px; right: -10px;
    background: var(--color-accent); color: #fff;
    font-size: 0.65rem; line-height: 1; font-weight: 600;
    min-width: 16px; height: 16px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
}

.site-banner {
    margin: 0;
    padding: 0.55rem 1rem;
    text-align: center;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.site-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 60vh;
}

@media (max-width: 480px) {
    .site-header { padding: 1rem; }
    .site-main { padding: 1.25rem; }
}

.home-hero {
    position: relative;
    width: 100vw;
    margin: -2rem calc(50% - 50vw) 3rem;
    min-height: 72vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
    color: #F7F1E8;
    background-color: var(--color-text);
    background-image:
        linear-gradient(rgba(58, 46, 34, 0.6), rgba(58, 46, 34, 0.72)),
        repeating-linear-gradient(45deg, rgba(193, 101, 61, 0.55) 0 2px, transparent 2px 34px);
    background-attachment: fixed, fixed;
    background-size: cover, auto;
}

.home-hero__inner { max-width: 620px; }

.home-hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.8rem;
    color: #E3C9B4;
    margin: 0 0 0.75rem;
}

.home-hero h1 { font-size: 2.5rem; color: #fff; margin: 0 0 1rem; }

.home-hero__text { font-size: 1.05rem; color: #EFE6D8; margin: 0 0 1.75rem; line-height: 1.7; }

.home-hero__scroll {
    position: absolute;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    color: #F7F1E8;
    animation: home-hero-bounce 2s ease-in-out infinite;
}

@keyframes home-hero-bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 8px); }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero { background-attachment: scroll, scroll; }
    .home-hero__scroll { animation: none; }
}

@media (max-width: 480px) {
    .home-hero { margin-top: -1.25rem; min-height: 60vh; }
    .home-hero h1 { font-size: 1.9rem; }
}

.status-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.site-footer {
    text-align: center;
    padding: 1.5rem;
    color: #7a7166;
    font-size: 0.9rem;
    border-top: 1px solid var(--color-border);
}

.site-footer a { color: #7a7166; }

.catalog__categories { display: flex; gap: 1rem; margin: 1rem 0 2rem; flex-wrap: wrap; }
.catalog__categories a { color: var(--color-text); text-decoration: none; padding: 0.3rem 0.8rem; border: 1px solid var(--color-border); border-radius: 20px; }
.catalog__categories a.is-active { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.catalog__empty { color: #7a7166; }

.catalog__rubrics { margin-top: 1rem; }
.catalog__group-title { margin: 2.5rem 0 1rem; scroll-margin-top: 1rem; }
.catalog__group-title:first-of-type { margin-top: 1.5rem; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; }
.product-card { background: #fff; border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden; text-decoration: none; color: var(--color-text); display: block; }
.product-card__image { position: relative; aspect-ratio: 1 / 1; background: #f0ebe3; display: flex; align-items: center; justify-content: center; }
.product-card__image img { width: 100%; height: 100%; object-fit: cover; }
.product-card__placeholder { color: #a89e8f; font-size: 0.85rem; }
.product-card__badge {
    position: absolute; top: 0.6rem; left: 0.6rem; z-index: 1;
    background: #f0e4c8; color: #7a5c1e;
    padding: 0.25rem 0.6rem; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600;
}
.product-card__body { padding: 0.9rem; }
.product-card__body h2 { font-size: 1rem; margin: 0 0 0.4rem; }
.product-card__price { color: var(--color-accent); font-weight: 600; margin: 0; }

.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.product-detail__main-image { width: 100%; border-radius: 8px; }
.product-detail__placeholder { aspect-ratio: 1/1; background: #f0ebe3; display: flex; align-items: center; justify-content: center; color: #a89e8f; border-radius: 8px; }
.product-detail__category { color: var(--color-accent); text-decoration: none; font-size: 0.85rem; }
.product-detail__price { font-size: 1.4rem; color: var(--color-accent); font-weight: 600; }
.product-detail__form { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; margin: 1rem 0; }
.product-detail__form input[type="number"] { width: 4.5rem; padding: 0.5rem; border: 1px solid var(--color-border); border-radius: 4px; }

/* ---- Configurateur de stickers ---- */

.sticker-preview-frame { display: flex; flex-direction: column; align-items: center; gap: 0.85rem; }
.sticker-preview {
    position: relative; width: 300px; height: 300px; max-width: 100%; border-radius: 18px;
    background: #fff; border: 2px dashed #d8c9b4; box-sizing: border-box;
    display: flex; align-items: center; justify-content: center;
    padding: 2.5rem; text-align: center; overflow: hidden;
    box-shadow: 0 16px 32px -12px rgba(58, 46, 34, 0.18);
}
.sticker-preview::before {
    content: ""; position: absolute; inset: 12px; border-radius: 11px;
    border: 1px solid rgba(58, 46, 34, 0.07); pointer-events: none;
}
.sticker-preview span {
    position: relative; display: inline-block; line-height: 1.15; white-space: pre;
    transition: color 0.15s ease, font-family 0.15s ease;
}
.sticker-preview__caption { font-size: 0.78rem; color: #a89e8f; margin: 0; }

.sticker-configurator { flex-basis: 100%; display: flex; flex-direction: column; gap: 1.85rem; }

.sticker-step { display: flex; flex-direction: column; gap: 0.55rem; }
.sticker-step__label {
    display: flex; align-items: center; gap: 0.6rem;
    font-weight: 600; font-size: 1rem; color: var(--color-text); margin: 0;
}
.sticker-step__num {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--color-accent); color: #fff; font-size: 0.72rem; font-weight: 700;
}
.sticker-step__meta { font-size: 0.8rem; color: #a89e8f; margin: 0; }

.sticker-configurator input[type="text"], .sticker-configurator textarea {
    width: 100%; padding: 0.7rem 0.9rem; border: 1px solid var(--color-border); border-radius: 8px;
    font-size: 1.05rem; background: #fff; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sticker-configurator textarea {
    resize: none; line-height: 1.35; font-family: inherit; box-sizing: border-box;
}
.sticker-configurator input[type="text"]:focus, .sticker-configurator textarea:focus {
    outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(193, 101, 61, 0.14);
}

.sticker-fonts { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.sticker-font-card { display: inline-block; width: 78px; vertical-align: top; cursor: pointer; }
.sticker-font-card input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.sticker-font-card__glyph {
    box-sizing: border-box; display: flex; align-items: center; justify-content: center;
    width: 100%; height: 54px; font-size: 1.65rem;
    border: 2px solid var(--color-border); border-bottom: none; border-radius: 10px 10px 0 0;
    background: #fff; color: var(--color-text);
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.sticker-font-card__label {
    box-sizing: border-box; display: block; width: 100%; font-size: 0.7rem; text-align: center; padding: 0.32rem 0.2rem;
    border: 2px solid var(--color-border); border-top: none; border-radius: 0 0 10px 10px;
    background: #fdfaf5; color: #7a7166;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.sticker-font-card input:checked + .sticker-font-card__glyph { border-color: var(--color-accent); background: rgba(193, 101, 61, 0.07); color: var(--color-accent); }
.sticker-font-card input:checked ~ .sticker-font-card__label { border-color: var(--color-accent); color: var(--color-accent-dark); font-weight: 600; }
.sticker-font-card input:focus-visible + .sticker-font-card__glyph { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.sticker-colors { display: flex; flex-wrap: wrap; gap: 1rem; }
.sticker-color-option { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; cursor: pointer; }
.sticker-color-option input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.sticker-color-swatch {
    display: flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(58, 46, 34, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sticker-color-swatch svg { opacity: 0; transition: opacity 0.15s ease; }
.sticker-color-option input:checked + .sticker-color-swatch { transform: scale(1.1); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--color-accent); }
.sticker-color-option input:checked + .sticker-color-swatch svg { opacity: 1; }
.sticker-color-option input:focus-visible + .sticker-color-swatch { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.sticker-color-option__label { font-size: 0.7rem; color: #7a7166; }

.sticker-dimensions { display: flex; align-items: flex-end; gap: 0.85rem; }
.sticker-dim-field { display: flex; flex-direction: column; gap: 0.3rem; }
.sticker-dim-field label { font-size: 0.78rem; color: #7a7166; font-weight: 600; }
.sticker-dim-input {
    display: flex; align-items: center; gap: 0.3rem;
    border: 1px solid var(--color-border); border-radius: 8px; padding: 0.5rem 0.75rem; background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sticker-dim-input:focus-within { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(193, 101, 61, 0.14); }
.sticker-dim-input input { border: none; width: 3.4rem; padding: 0; font-size: 1rem; background: transparent; }
.sticker-dim-input input:focus { outline: none; }
.sticker-dim-input span { color: #a89e8f; font-size: 0.85rem; }
.sticker-dim-x { padding-bottom: 0.65rem; color: #a89e8f; font-size: 1.1rem; }

.sticker-order-bar {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    padding-top: 1.4rem; border-top: 1px solid var(--color-border);
}
.sticker-order-bar .qty-stepper { flex-shrink: 0; }
.sticker-submit {
    flex: 1; min-width: 230px;
    background: var(--color-accent); color: #fff; border: none;
    padding: 0.9rem 1.5rem; border-radius: 8px; font-size: 1.02rem; font-weight: 600;
    cursor: pointer; box-shadow: 0 4px 14px rgba(193, 101, 61, 0.32);
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.sticker-submit:hover { background: var(--color-accent-dark); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(193, 101, 61, 0.42); }
.sticker-submit:active { transform: translateY(0); }

@media (max-width: 640px) {
    .sticker-configurator { gap: 1.4rem; padding-bottom: 5.5rem; }
    .sticker-preview { padding: 1.75rem; }
    .sticker-font-card { width: 68px; }
    .sticker-font-card__glyph { height: 48px; font-size: 1.4rem; }
}

@media (max-width: 480px) {
    .sticker-order-bar {
        flex-direction: column; align-items: stretch; gap: 0.6rem;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
        margin: 0; border-top: 1px solid var(--color-border);
        background: var(--color-bg);
        padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom));
        box-shadow: 0 -10px 24px -10px rgba(58, 46, 34, 0.18);
    }
    .sticker-order-bar .qty-stepper { align-self: center; }
}
.product-detail__form button, .button, .checkout__form button[type="submit"] {
    background: var(--color-accent); color: #fff; border: none; padding: 0.75rem 1.6rem;
    border-radius: 6px; cursor: pointer; font-size: 1rem; font-weight: 600; letter-spacing: 0.01em;
    text-decoration: none; display: inline-block;
    box-shadow: 0 2px 6px rgba(193, 101, 61, 0.3);
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.product-detail__form button:hover, .button:hover, .checkout__form button[type="submit"]:hover {
    background: var(--color-accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(193, 101, 61, 0.4);
}
.product-detail__form button:active, .button:active, .checkout__form button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(193, 101, 61, 0.3);
}
.product-detail__out-of-stock { color: #a23a3a; font-weight: 600; }
.fabric-swatches__caption { font-weight: 600; display: block; margin-top: 1rem; }
.fabric-swatches { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 0.5rem 0 0; }
.fabric-swatch { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; cursor: pointer; }
.fabric-swatch input[type="radio"] {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.fabric-swatch__thumb {
    width: 52px; height: 52px; border-radius: 6px; overflow: hidden;
    background: #f0ebe3; border: 2px solid var(--color-border);
    display: block; transition: border-color 0.15s ease;
}
.fabric-swatch__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fabric-swatch input:checked + .fabric-swatch__thumb {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(193, 101, 61, 0.25);
}
.fabric-swatch input:focus-visible + .fabric-swatch__thumb { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.fabric-swatch__label { font-size: 0.75rem; color: var(--color-text); text-align: center; max-width: 68px; }

.product-detail__made-to-order {
    display: inline-block;
    background: #f0e4c8; color: #7a5c1e;
    padding: 0.3rem 0.7rem; border-radius: 20px;
    font-size: 0.85rem; font-weight: 600;
    margin: 0.25rem 0 1rem;
}
.product-detail__description { margin: 0.5rem 0 1.5rem; line-height: 1.7; color: #6b5d4f; }

@media (max-width: 640px) { .product-detail { grid-template-columns: 1fr; } }

.cart-table { width: 100%; border-collapse: collapse; background: #fff; }
.cart-table th, .cart-table td { text-align: left; padding: 0.75rem; border-bottom: 1px solid var(--color-border); }
.cart-table__product { display: flex; align-items: center; gap: 0.75rem; }
.cart-table__thumb {
    width: 52px; height: 52px; flex-shrink: 0; border-radius: 6px;
    background: #f0ebe3; overflow: hidden;
}
.cart-table__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--color-border); border-radius: 6px; overflow: hidden; }
.qty-stepper__btn {
    background: #fff; color: var(--color-accent); border: none; padding: 0; margin: 0;
    width: 2rem; height: 2rem; font-size: 1rem; font-weight: 600; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background-color 0.15s ease;
}
.qty-stepper__btn:hover { background: #f0e4d6; }
.qty-stepper__input {
    width: 2.75rem; height: 2rem; border: none; border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border); text-align: center; font-size: 0.95rem;
    -moz-appearance: textfield;
}
.qty-stepper__input::-webkit-outer-spin-button, .qty-stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-table__row--busy { opacity: 0.5; pointer-events: none; transition: opacity 0.15s ease; }
.cart-table__variant { color: #7a7166; font-size: 0.85rem; }
.cart-summary { margin-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.cart-summary__total { font-size: 1.2rem; }
.cart-summary__actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.button--secondary {
    background: transparent; color: var(--color-accent); border: 1px solid var(--color-accent);
    box-shadow: none;
}
.button--secondary:hover { background: rgba(193, 101, 61, 0.08); color: var(--color-accent-dark); border-color: var(--color-accent-dark); }
.cart-summary__hint { display: block; margin-top: 0.15rem; color: var(--color-accent-dark); font-weight: 600; font-size: 0.8rem; }
.link-button { background: none; border: none; color: #a23a3a; text-decoration: underline; cursor: pointer; padding: 0; font-size: 0.9rem; }

.checkout__layout { display: grid; grid-template-columns: 2fr 1fr; gap: 2.5rem; align-items: start; }
.checkout__form { display: flex; flex-direction: column; gap: 0.3rem; background: #fff; padding: 1.5rem; border-radius: 8px; border: 1px solid var(--color-border); }
.checkout__form label { display: block; font-weight: 600; margin-top: 0.75rem; font-size: 0.9rem; }
.checkout__form input[type="text"], .checkout__form input[type="email"], .checkout__form input[type="tel"], .checkout__form input[type="password"] {
    display: block; width: 100%; box-sizing: border-box;
    padding: 0.5rem; border: 1px solid var(--color-border); border-radius: 4px; font-size: 1rem;
}
.checkout__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.checkout__payment-option { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; margin-top: 0.5rem; }
.checkout__form button[type="submit"] { margin-top: 1.5rem; align-self: flex-start; }
.checkout__summary { background: #fff; padding: 1.5rem; border-radius: 8px; border: 1px solid var(--color-border); }
.checkout__summary ul { list-style: none; padding: 0; }
.checkout__summary li { padding: 0.4rem 0; border-bottom: 1px solid var(--color-border); }
.checkout__summary-note { color: #7a7166; font-size: 0.85rem; }
.field-error { color: #a23a3a; font-size: 0.85rem; margin: 0.2rem 0 0; }

@media (max-width: 720px) { .checkout__layout { grid-template-columns: 1fr; } }

.contact-page__success { background: #d9ecd9; color: #2d6a2d; padding: 1rem; border-radius: 6px; }
.cgv-page h2 { margin-top: 1.75rem; font-size: 1.15rem; }
.cgv-page__notice { background: #f0e4c8; color: #7a5c1e; padding: 1rem; border-radius: 6px; font-size: 0.9rem; }
.cgv-page__updated { color: #7a7166; font-size: 0.85rem; margin-top: 2rem; }

.account-page { max-width: 480px; }
.account-page__note { color: #7a7166; font-size: 0.9rem; }
.account-page__switch { margin-top: 1.5rem; }
.account-page__header { display: flex; justify-content: space-between; align-items: center; max-width: 700px; }

.status-badge { padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.8rem; }
.status-badge--pending_payment { background: #f0e4c8; color: #7a5c1e; }
.status-badge--paid { background: #d9ecd9; color: #2d6a2d; }
.status-badge--processing, .status-badge--shipped { background: #d6e6f5; color: #2b5a86; }
.status-badge--cancelled, .status-badge--refunded { background: #f2d9d9; color: #8a2f2f; }
