:root {
    --ink: #14140f;
    --ink-soft: #3a3a34;
    --paper: #f6f4ee;
    --panel: #fff;
    --line: #e4e0d4;
    --wood: #8a6a45;
    --accent: #c9a15a;
    --dark: #111110;
    --radius: 2px;
    --maxw: 1240px;
    --header-h: 66px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 12px)
}

body {
    font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

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

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

button {
    font-family: inherit;
    cursor: pointer
}

[hidden] {
    display: none !important
}

.products-loader {
    min-height: 28px;
    padding: 18px 0 4px;
    text-align: center;
}

:focus-visible {
    outline: 3px solid rgb(201 161 90 / 60%);
    outline-offset: 2px
}

.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 28px
}

h1,
h2,
h3 {
    font-weight: 600;
    letter-spacing: -.01em
}

h2 {
    font-size: clamp(28px, 3.6vw, 38px)
}

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--ink);
    color: #fff;
    border: 1px solid var(--ink);
    padding: 14px 26px;
    font-size: 15px;
    letter-spacing: .02em;
    border-radius: var(--radius);
    transition: background .2s, color .2s;
}

.btn:hover {
    background: transparent;
    color: var(--ink)
}

.btn.light {
    background: #fff;
    color: var(--ink);
    border-color: #fff
}

.btn.light:hover {
    background: transparent;
    color: #fff
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    letter-spacing: .12em;
    color: var(--wood);
    margin-bottom: 10px;
}

.eyebrow::before {
    content: "";
    width: 26px;
    height: 1px;
    background: var(--wood)
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 10000;
    padding: 10px 16px;
    background: #fff;
    color: #111;
    border-radius: 4px;
    transition: top .15s;
}

.skip-link:focus {
    top: 12px
}

/* ---------- Header ---------- */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--dark);
    color: #fff;
    padding-top: env(safe-area-inset-top, 0);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    max-width: var(--maxw);
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px
}

.brand img {
    height: 38px;
    width: auto;
    border-radius: 4px
}

.brand span {
    font-size: 15px;
    letter-spacing: .14em;
    font-weight: 600
}

nav.links {
    display: flex;
    gap: 34px;
    align-items: center;
    font-size: 14.5px
}

nav.links a {
    opacity: .9;
    position: relative;
    padding: 6px 0
}

nav.links a:hover {
    opacity: 1
}

.dropdown {
    position: relative
}

.dropdown>a::after {
    content: "▾";
    font-size: 10px;
    margin-left: 5px
}

.dropdown .menu {
    position: absolute;
    top: calc(100% + 14px);
    left: -10px;
    background: #fff;
    color: var(--ink);
    min-width: 190px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: .18s;
    border-radius: var(--radius);
}

/* pont invisible : le menu ne se ferme plus quand la souris traverse l'espace */
.dropdown .menu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -16px;
    height: 16px
}

.dropdown:hover .menu,
.dropdown:focus-within .menu,
.dropdown.open .menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0)
}

.dropdown .menu a {
    display: block;
    padding: 11px 18px;
    font-size: 14px
}

.dropdown .menu a:hover {
    background: var(--paper)
}

.burger {
    display: none;
    background: none;
    border: 0;
    color: #fff;
    font-size: 24px;
    padding: 6px 10px
}

@media (max-width: 900px) {
    nav.links {
        position: fixed;
        inset: var(--header-h) 0 0 0;
        background: var(--dark);
        flex-direction: column;
        align-items: stretch;
        padding: 30px 28px;
        gap: 6px;
        overflow-y: auto;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform .25s, visibility .25s;
    }

    nav.links.open {
        transform: translateX(0);
        visibility: visible
    }

    nav.links a {
        width: 100%;
        padding: 14px 0;
        border-bottom: 1px solid #ffffff1a;
        font-size: 16px
    }

    .dropdown .menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        background: #ffffff10;
        margin-top: 4px;
    }

    .dropdown .menu::before {
        display: none
    }

    .dropdown:hover .menu {
        display: none
    }

    .dropdown.open .menu {
        display: block
    }

    .dropdown .menu a {
        color: #fff;
        border-bottom: 1px solid #ffffff12
    }

    .burger {
        display: block
    }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 86vh;
    min-height: 86dvh;
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
}

.hero>img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(100deg, rgba(10, 10, 8, .82) 15%, rgba(10, 10, 8, .45) 55%, rgba(10, 10, 8, .1) 85%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--maxw);
    width: 100%;
    margin: 0 auto;
    padding: 0 28px
}

.hero-content .eyebrow {
    color: #d9c69a
}

.hero-content h1 {
    font-size: clamp(34px, 6vw, 58px);
    max-width: 640px;
    line-height: 1.08;
    margin-bottom: 20px
}

.hero-content p {
    max-width: 460px;
    font-size: 16.5px;
    color: #e8e5dc;
    margin-bottom: 30px
}

/* ---------- Produits ---------- */
.section {
    padding: 86px 0
}

.section-head {
    margin-bottom: 44px
}

.cat-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 22px
}

.filter-btn {
    border: 1px solid #d9d9d9;
    background: #fff;
    color: #1d1d1d;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 600;
    transition: all .2s ease;
}

.filter-btn:hover {
    border-color: #111
}

.filter-btn.active {
    background: #111;
    color: #fff;
    border-color: #111
}

.loading-note {
    grid-column: 1 / -1;
    padding: 24px 0;
    color: var(--ink-soft)
}

.loading-note.error {
    color: #b3261e
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px
}

@media (max-width: 1100px) {
    .cat-grid {
        grid-template-columns: repeat(3, 1fr)
    }
}

@media (max-width: 760px) {
    .cat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px
    }
}

@media (max-width: 480px) {
    .cat-grid {
        grid-template-columns: 1fr
    }
}

.cat-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer
}

.cat-card .img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #eee
}

.cat-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity .35s ease, transform .5s ease;
}

.cat-card:hover img {
    transform: scale(1.06)
}

/* apparition en fondu (la classe "loaded" est ajoutée par main.js) */
.lazy-img {
    opacity: 0
}

.lazy-img.loaded {
    opacity: 1
}

.cat-body {
    padding: 18px 20px 22px
}

.cat-body h3 {
    font-size: 16.5px;
    margin-bottom: 6px
}

.cat-body p {
    font-size: 13.5px;
    color: var(--ink-soft);
    margin-bottom: 14px
}

.cat-body .arrow {
    font-size: 15px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    display: block
}

/* ---------- Engagements ---------- */
.features {
    background: var(--dark);
    color: #fff;
    padding: 52px 0
}

.features .wrap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center
}

.feature svg {
    width: 30px;
    height: 30px;
    margin: 0 auto 14px;
    stroke: #fff
}

.feature h4 {
    font-size: 15px;
    margin-bottom: 5px
}

.feature p {
    font-size: 12.5px;
    color: #b8b6ad
}

@media (max-width: 800px) {
    .features .wrap {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 36px
    }
}

/* ---------- Sur mesure ---------- */
.surmesure {
    background: var(--panel)
}

.sm-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 56px;
    align-items: center
}

.sm-img {
    overflow: hidden;
    aspect-ratio: 3 / 4
}

.sm-img img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.sm-text p.lead {
    font-size: 16px;
    color: var(--ink-soft);
    max-width: 480px;
    margin-bottom: 36px
}

.steps {
    display: flex;
    gap: 14px;
    flex-wrap: wrap
}

.step {
    flex: 1;
    min-width: 120px
}

.step .n {
    width: 38px;
    height: 38px;
    border: 1px solid var(--ink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-bottom: 12px;
}

.step h5 {
    font-size: 14.5px;
    margin-bottom: 4px
}

.step p {
    font-size: 12.5px;
    color: var(--ink-soft)
}

.sm-cta {
    margin-top: 30px
}

@media (max-width: 880px) {
    .sm-grid {
        grid-template-columns: 1fr
    }

    .sm-img {
        aspect-ratio: 16 / 9
    }
}

/* ---------- Catalogue ---------- */
.catalogue-link {
    display: block
}

.catalogue {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: var(--dark);
    border-radius: 8px
}

.catalogue img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    opacity: .9;
    transition: transform .6s ease
}

.catalogue-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(0, 0, 0, .48);
    color: #fff;
    opacity: 0;
    transition: opacity .35s ease;
}

.catalogue-overlay span {
    font-size: 30px
}

.catalogue-overlay strong {
    font-size: 20px;
    letter-spacing: .02em
}

.catalogue-overlay small {
    font-size: 13px;
    opacity: .8
}

.catalogue-link:hover .catalogue img {
    transform: scale(1.04)
}

.catalogue-link:hover .catalogue-overlay,
.catalogue-link:focus-visible .catalogue-overlay {
    opacity: 1
}

@media (hover: none) {
    .catalogue-overlay {
        opacity: 1;
        background: rgba(0, 0, 0, .38)
    }
}

/* ---------- Footer ---------- */
footer {
    background: var(--dark);
    color: #e9e7de;
    padding: 70px 0 0
}

.f-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1.2fr;
    gap: 50px
}

.f-brand img {
    height: 44px;
    margin-bottom: 16px;
    border-radius: 4px
}

.f-brand p {
    font-size: 14px;
    color: #b8b6ad;
    max-width: 300px;
    margin-bottom: 22px
}

.f-contact p {
    font-size: 14px;
    margin-bottom: 14px;
    color: #d8d6cc
}

.f-contact span {
    display: block;
    font-size: 12px;
    color: #8f8d84
}

.f-contact a:hover {
    text-decoration: underline
}

h3.f-title {
    font-size: 16px;
    margin-bottom: 18px
}

.whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: #08240f;
    padding: 13px 22px;
    font-size: 14.5px;
    font-weight: 600;
    border-radius: var(--radius);
    margin: 6px 0 18px;
}

.social {
    display: flex;
    gap: 12px;
    margin-top: 14px
}

.social a {
    width: 34px;
    height: 34px;
    border: 1px solid #ffffff30;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.social a:hover {
    border-color: #fff
}

.bottom-bar {
    border-top: 1px solid #2a2a26;
    margin-top: 56px;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12.5px;
    color: #8f8d84;
}

.bottom-bar a {
    margin-left: 18px
}

.bottom-bar a:hover {
    color: #fff
}

@media (max-width: 880px) {
    .f-grid {
        grid-template-columns: 1fr;
        gap: 40px
    }
}

.noscript-note {
    padding: 20px 28px;
    max-width: var(--maxw);
    margin: 0 auto
}

/* ---------- Bouton WhatsApp flottant ---------- */
.wa-float {
    position: fixed;
    right: 18px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 18px;
    border-radius: 999px;
    background: #25D366;
    color: #08240f;
    font-weight: 600;
    font-size: 14.5px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}

.wa-float:hover {
    background: #1ebe5b
}

@media (max-width: 480px) {
    .wa-float {
        padding: 14px
    }

    .wa-float span {
        display: none
    }
}

/* ============================================================
   MODALE PRODUIT + GALERIE
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .5);
}

.modal.open {
    display: flex
}

.modal-inner {
    position: relative;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 18px;
    width: min(95%, 920px);
    max-height: 90vh;
    max-height: 90dvh;
    padding: 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 10px;
    background: #fff;
}

.modal-close {
    position: absolute;
    top: 4px;
    right: 6px;
    z-index: 5;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: #333;
    font-size: 22px;
}

.modal-media {
    flex: 1 1 320px;
    min-width: 0
}

.gallery-stage {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    background: #f1efe9
}

.modal-img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 8px;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform .2s ease;
    user-select: none;
}

.gallery-stage.zoomed {
    cursor: zoom-out
}

.gallery-stage.zoomed .modal-img {
    cursor: zoom-out
}

/* boutons de galerie (étaient absents du CSS) */
.g-nav,
.g-zoom {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .88);
    color: #111;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
    transition: background .15s, opacity .15s;
}

.g-nav:hover,
.g-zoom:hover {
    background: #fff
}

.g-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    font-size: 26px;
    line-height: 1
}

.g-nav.prev {
    left: 8px
}

.g-nav.next {
    right: 8px
}

.g-zoom {
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    font-size: 16px
}

.g-counter {
    position: absolute;
    left: 8px;
    bottom: 8px;
    z-index: 2;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: 12px;
}

.g-counter:empty {
    display: none
}

.gallery-stage.zoomed .g-nav {
    opacity: 0;
    pointer-events: none
}

.modal-gallery {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0
}

.modal-gallery .thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border: 2px solid transparent;
    border-radius: 6px;
    object-fit: cover;
    cursor: pointer;
}

.modal-gallery .thumb.active {
    border-color: var(--accent)
}

.modal-content {
    flex: 1 1 300px;
    min-width: 0
}

.modal-name {
    margin: 0 36px 8px 0;
    font-size: 1.25rem
}

.modal-price {
    margin-bottom: 6px;
    color: #111;
    font-weight: 700
}

.modal-sku,
.modal-desc {
    margin-bottom: 10px;
    color: #444
}

.modal-availability {
    margin-bottom: 12px;
    color: #1a7f37
}

/* ---------- Quantité ---------- */
.quantity-control {
    display: flex;
    align-items: center;
    margin: 0 0 18px
}

.quantity-control label {
    margin: 0 auto 0 0;
    padding-right: 16px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600
}

.quantity-control .qty-btn {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-size: 21px;
    line-height: 1;
    transition: background .18s, color .18s, border-color .18s;
}

.quantity-control .qty-btn:active {
    transform: scale(.96)
}

.quantity-control .qty-btn:disabled {
    opacity: .45;
    cursor: not-allowed
}

#qtyMinus {
    border-radius: 8px 0 0 8px
}

#qtyMinus:hover:not(:disabled) {
    border-color: var(--accent);
    background: var(--paper)
}

#qtyPlus {
    border-color: var(--accent);
    border-radius: 0 8px 8px 0;
    background: var(--accent);
    color: #fff
}

#qtyPlus:hover {
    border-color: var(--wood);
    background: var(--wood)
}

.quantity-control .qty-btn:focus-visible,
.quantity-control .qty-input:focus-visible {
    position: relative;
    z-index: 1
}

.quantity-control .qty-input {
    width: 64px;
    height: 44px;
    padding: 0 6px;
    border: solid var(--line);
    border-width: 1px 0;
    border-radius: 0;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    text-align: center;
    appearance: textfield;
    -moz-appearance: textfield;
}

.quantity-control .qty-input::-webkit-inner-spin-button,
.quantity-control .qty-input::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none
}

@media (max-width: 480px) {
    .quantity-control label {
        padding-right: 12px
    }

    .quantity-control .qty-btn {
        width: 42px;
        height: 42px
    }

    .quantity-control .qty-input {
        width: 56px;
        height: 42px
    }
}

/* ---------- Actions ---------- */
.modal-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 12px;
    margin-top: 20px
}

.modal-actions a {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    transition: background-color .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s;
}

#whatsappBtn {
    flex: 1 1 230px;
    background: #168f4b;
    color: #fff;
    box-shadow: 0 3px 8px rgb(22 143 75 / 20%)
}

#whatsappBtn::after {
    content: "↗";
    font-size: 16px;
    transition: transform .2s
}

#whatsappBtn:hover {
    transform: translateY(-2px);
    background: #11783e;
    box-shadow: 0 6px 14px rgb(22 143 75 / 25%)
}

#whatsappBtn:hover::after {
    transform: translate(2px, -2px)
}

#contactFormBtn {
    flex: 0 1 auto;
    border-color: var(--line);
    background: #fff;
    color: var(--ink)
}

#contactFormBtn:hover {
    border-color: var(--accent);
    background: var(--paper)
}

@media (max-width: 700px) {
    .modal {
        padding: 10px
    }

    .modal-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px
    }

    .modal-actions a {
        width: 100%
    }
}

/* ---------- Réduction des animations ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto
    }

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important
    }
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 10000;
    padding: 10px 16px;
    background: #fff;
    color: #111;
    border-radius: 4px;
    transition: top .15s;
}

.skip-link:focus {
    top: 12px;
}

/* Menu produits accessible au clavier */
.dropdown:focus-within .menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Menu mobile fermé : non focusable */
@media (max-width: 900px) {
    nav.links {
        visibility: hidden;
        transition: transform .25s, visibility .25s;
    }

    nav.links.open {
        visibility: visible;
    }
}

/* Bouton WhatsApp flottant */
.wa-float {
    position: fixed;
    right: 18px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 18px;
    border-radius: 999px;
    background: #25D366;
    color: #08240f;
    font-weight: 600;
    font-size: 14.5px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}

.wa-float:hover {
    background: #1ebe5b;
}

@media (max-width: 480px) {
    .wa-float span {
        display: none;
    }

    .wa-float {
        padding: 14px;
    }
}

/* CTA sur mesure */
.sm-cta {
    margin-top: 30px;
}

/* Catalogue : étiquette visible sur écrans tactiles */
@media (hover: none) {
    .catalogue-overlay {
        opacity: 1;
        background: rgba(0, 0, 0, .38);
    }
}

/* Liens sociaux */
.social a svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.f-contact a:hover {
    text-decoration: underline;
}

.noscript-note {
    padding: 20px 28px;
    max-width: var(--maxw);
    margin: 0 auto;
}

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