/* ==========================================================================
   Maison Noire — thème e-commerce rock-chic (noir & blanc)
   CSS pur, sans étape de build. Variables en tête de fichier pour personnaliser.
   ========================================================================== */

:root {
    --c-ink: #0b0b0b;
    --c-paper: #ffffff;
    --c-soft: #f5f4f2;
    --c-line: #e3e1dd;
    --c-muted: #6f6c68;
    --c-accent: #b3002d;
    --c-ok: #1e7a46;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --radius: 0;
    --container: 1320px;
    --gap: 1.25rem;
    --ann-h: 34px;      /* hauteur de la barre d'annonces */
    --header-h: 130px;  /* hauteur du header (barre + capsule) */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0; font-family: var(--font-body); font-size: 15px; line-height: 1.55;
    color: var(--c-ink); background: var(--c-paper);
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 500; }
h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.6rem); }
ul { list-style: none; margin: 0; padding: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
button, input, select { font: inherit; color: inherit; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; }
.container--narrow { max-width: 760px; padding-block: 3rem; }
.center { text-align: center; }
.left { text-align: left; }
.muted { color: var(--c-muted); }
.small { font-size: .85rem; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--c-ink); color: #fff; padding: .6rem 1rem; z-index: 200; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

/* --- Barre d'annonces ---------------------------------------------------- */
.announcement { position: relative; z-index: 101; height: var(--ann-h); display: flex; align-items: center; background: var(--c-ink); color: #fff; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; overflow: hidden; }
.announcement__track { display: flex; justify-content: center; gap: 3rem; padding-inline: 1rem; white-space: nowrap; width: 100%; }
@media (max-width: 900px) {
    .announcement__track { justify-content: flex-start; width: max-content; animation: marquee 22s linear infinite; }
}
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .announcement__track { animation: none; } }

/* --- Header -------------------------------------------------------------- */
.header { position: sticky; top: 0; z-index: 100; height: var(--header-h); background: var(--c-paper); box-shadow: 0 1px 0 var(--c-line); transition: background .25s, color .25s, box-shadow .25s; }
.header__bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 64px; }
.logo { grid-column: 2; font-family: var(--font-display); font-size: 1.7rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; text-align: center; }
.header__actions { grid-column: 3; display: flex; align-items: center; justify-content: flex-end; gap: 1rem; }
.search input { border: 0; border-bottom: 1px solid currentColor; background: transparent; color: inherit; padding: .35rem .25rem; width: 150px; transition: width .2s; }
.search input::placeholder { color: currentColor; opacity: .65; }
.search input:focus { width: 220px; outline: none; }
.cart-link { position: relative; display: inline-flex; padding: .25rem; }
.cart-link__count { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--c-ink); color: #fff; font-size: .7rem; display: grid; place-items: center; padding-inline: 4px; }
.burger { display: none; background: none; border: 0; width: 40px; height: 40px; padding: 8px; cursor: pointer; color: inherit; }
.burger span { display: block; height: 2px; background: currentColor; margin: 6px 0; }

/* Header transparent superposé au hero (page d'accueil) */
.header--overlay:not(.is-scrolled) { background: transparent; box-shadow: none; color: #fff; }
.header--overlay:not(.is-scrolled) .cart-link__count { background: #fff; color: var(--c-ink); }

/* --- Menu en capsule ------------------------------------------------------ */
.nav { display: flex; align-items: center; justify-content: center; height: calc(var(--header-h) - 64px); padding-inline: 1.25rem; }
.nav__list { display: inline-flex; align-items: center; gap: .2rem; padding: .3rem; border-radius: 999px; background: #fff; border: 1px solid var(--c-line); box-shadow: 0 8px 24px -14px rgba(0, 0, 0, .35); transition: background .25s, border-color .25s, box-shadow .25s; }
.nav__item { position: static; }
.nav__link { display: block; padding: .6rem 1.25rem; border-radius: 999px; text-decoration: none; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; font-weight: 500; line-height: 1.2; transition: background .15s, color .15s; }
.nav__item:hover > .nav__link, .nav__link:focus-visible { background: var(--c-ink); color: #fff; }

/* Capsule « verre dépoli » sur l'image du hero */
@media (min-width: 901px) {
    .header--overlay:not(.is-scrolled) .nav__list { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .38); box-shadow: none; -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
    .header--overlay:not(.is-scrolled) .nav__link { color: #fff; }
    .header--overlay:not(.is-scrolled) .nav__item:hover > .nav__link,
    .header--overlay:not(.is-scrolled) .nav__link:focus-visible { background: #fff; color: var(--c-ink); }
}

/* Méga-menu : carte flottante arrondie sous la capsule */
.mega { display: none; position: absolute; left: 50%; top: calc(100% - 12px); transform: translateX(-50%); width: min(880px, calc(100vw - 2.5rem)); padding-top: 12px; color: var(--c-ink); }
.mega__panel { display: flex; gap: 4rem; background: var(--c-paper); border: 1px solid var(--c-line); border-radius: 28px; box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .45); padding: 1.75rem 2.25rem; }
.has-mega:hover > .mega, .has-mega:focus-within > .mega { display: block; }
.mega__col li { margin-bottom: .55rem; }
.mega__col a { text-decoration: none; }
.mega__col a:hover { text-decoration: underline; }
.mega__col--highlight { border-left: 1px solid var(--c-line); padding-left: 4rem; font-weight: 500; }

@media (max-width: 900px) {
    :root { --header-h: 64px; }
    .header__bar { grid-template-columns: 48px 1fr auto; }
    .burger { display: block; }
    .logo { grid-column: 2; font-size: 1.3rem; text-align: left; }
    .header__actions { grid-column: 3; }
    .search { display: none; }

    .nav { display: none; position: fixed; inset: 0; height: auto; padding: 6rem 1.25rem 2rem; background: var(--c-paper); color: var(--c-ink); overflow-y: auto; z-index: 90; align-items: flex-start; }
    .nav.is-open { display: block; }
    .nav__list { display: flex; flex-direction: column; gap: 0; width: 100%; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
    .nav__link { padding: 1rem 0; border-radius: 0; border-bottom: 1px solid var(--c-line); font-size: .95rem; }
    .nav__item:hover > .nav__link, .nav__link:focus-visible { background: none; color: var(--c-ink); }

    .mega { position: static; transform: none; width: auto; padding: 0; }
    .mega__panel { flex-direction: column; gap: 0; border: 0; border-radius: 0; box-shadow: none; padding: .5rem 0 1rem 1rem; }
    .has-mega:hover > .mega, .has-mega:focus-within > .mega { display: none; }
    .has-mega.is-expanded > .mega { display: block; }
    .mega__col--highlight { border: 0; padding-left: 0; margin-top: .5rem; }

    /* Menu ouvert : logo / burger repassent en noir sur fond blanc */
    .header--overlay.is-menu-open:not(.is-scrolled) { color: var(--c-ink); }
}

/* --- Boutons / formulaires ---------------------------------------------- */
.btn { display: inline-block; padding: .85rem 1.8rem; border: 1px solid var(--c-ink); border-radius: var(--radius); background: transparent; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; font-weight: 500; text-decoration: none; cursor: pointer; text-align: center; transition: background .15s, color .15s; }
.btn--dark { background: var(--c-ink); color: #fff; }
.btn--dark:hover:not(:disabled) { background: #2a2a2a; }
.btn--light { background: #fff; color: var(--c-ink); border-color: #fff; }
.btn--light:hover { background: transparent; color: #fff; }
.btn--outline:hover { background: var(--c-ink); color: #fff; }
.btn--block { display: block; width: 100%; padding-block: 1rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { background: none; border: 0; cursor: pointer; font-size: 1rem; padding: .5rem; color: var(--c-muted); }
.icon-btn:hover { color: var(--c-ink); }

input:not([type=radio]):not([type=checkbox]), select {
    width: 100%; padding: .75rem .85rem; border: 1px solid var(--c-line); border-radius: var(--radius); background: #fff;
}
input:not([type=radio]):not([type=checkbox]):focus, select:focus { border-color: var(--c-ink); outline: none; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .85rem; margin-bottom: .3rem; font-weight: 500; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

.flash { padding: .9rem 1.25rem; margin: 1rem auto; max-width: var(--container); border: 1px solid; }
.flash--ok { background: #eaf6ee; border-color: #b6dfc3; color: #14532d; text-align: center; }
.flash--error { background: #fdecef; border-color: #f2b8c4; color: #7a0020; }
.flash--error ul { margin-top: .4rem; padding-left: 1.1rem; list-style: disc; }
.notice { background: var(--c-soft); padding: .85rem 1rem; font-size: .9rem; }
.notice--ok { background: #eaf6ee; color: #14532d; }

/* --- Hero plein écran ---------------------------------------------------- */
.hero { position: relative; display: flex; align-items: flex-end; height: calc(100vh - var(--ann-h)); height: calc(100svh - var(--ann-h)); height: calc(100dvh - var(--ann-h)); min-height: 560px; max-height: 1200px; margin-top: calc(var(--header-h) * -1); overflow: hidden; background: #0d0c0b; color: #fff; }
.hero picture { position: absolute; inset: 0; display: block; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(0, 0, 0, .6), rgba(0, 0, 0, 0) 48%), linear-gradient(to bottom, rgba(0, 0, 0, .4), rgba(0, 0, 0, 0) 26%); }
.hero__text { position: relative; z-index: 1; max-width: 680px; padding: 0 clamp(1.25rem, 4vw, 4rem) clamp(2.5rem, 9vh, 5.5rem); }
.hero__eyebrow { margin: 0 0 .75rem; text-transform: uppercase; letter-spacing: .22em; font-size: .75rem; opacity: .85; }
.hero__text h1 { color: #fff; font-size: clamp(2.4rem, 5.5vw, 4.6rem); margin-bottom: .3em; }
.hero__text p { margin: 0 0 1.5rem; opacity: .9; font-size: 1.05rem; }

.shortcuts { display: flex; justify-content: center; flex-wrap: wrap; gap: 2rem; padding-block: 2.5rem; }
.shortcut { display: flex; flex-direction: column; align-items: center; gap: .6rem; text-decoration: none; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.shortcut__thumb { width: 84px; height: 84px; border-radius: 50%; background: var(--c-soft); display: grid; place-items: center; font-family: var(--font-display); font-size: 1.8rem; transition: background .2s, color .2s; }
.shortcut:hover .shortcut__thumb { background: var(--c-ink); color: #fff; }

.section { padding-block: 2.5rem; }
.section__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.5rem; }
.section__title { font-family: var(--font-display); font-size: 1.8rem; margin: 0; }
.link-arrow { text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; }

/* --- Grille produits ----------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem var(--gap); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid, .grid--4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .grid, .grid--4 { grid-template-columns: repeat(2, 1fr); gap: 1.5rem .75rem; } }

.card__media { position: relative; display: block; aspect-ratio: 3 / 4; background: var(--c-soft); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card__media img { transform: scale(1.04); }
.placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, var(--c-soft), #e9e6e1); font-family: var(--font-display); font-size: 4rem; color: #b9b5ae; }
.placeholder--lg { aspect-ratio: 3 / 4; height: auto; font-size: 8rem; }
.card__badges { position: absolute; top: .6rem; left: .6rem; display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; }
.badge { background: #fff; padding: .15rem .5rem; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.badge--sale { background: var(--c-accent); color: #fff; }
.badge--out { background: var(--c-ink); color: #fff; }
.card__body { padding-top: .7rem; display: flex; justify-content: space-between; gap: .75rem; }
.card__title { font-size: .9rem; font-weight: 500; margin: 0; }
.card__title a { text-decoration: none; }
.card__price { margin: 0; font-size: .9rem; white-space: nowrap; text-align: right; }
.card__price s { color: var(--c-muted); margin-right: .35rem; }

/* --- Catalogue ----------------------------------------------------------- */
.breadcrumb { padding-block: 1rem; font-size: .8rem; color: var(--c-muted); }
.breadcrumb a { text-decoration: none; }
.breadcrumb span { margin-inline: .25rem; }
.page-head { text-align: center; padding-block: .5rem 1.5rem; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-bottom: 1.5rem; }
.chip { display: inline-block; padding: .45rem 1rem; border: 1px solid var(--c-line); border-radius: 999px; font-size: .82rem; text-decoration: none; }
.chip:hover { border-color: var(--c-ink); }
.toolbar { display: flex; justify-content: flex-end; gap: .75rem; padding-block: 1rem; border-top: 1px solid var(--c-line); margin-bottom: 1.5rem; }
.toolbar select { width: auto; }
.empty { text-align: center; padding-block: 4rem; color: var(--c-muted); }
.pagination-wrap { margin-top: 3rem; display: flex; justify-content: center; }
.pagination-wrap nav > div:first-child { display: none; } /* masque le texte « Showing x to y » du paginateur par défaut */
.pagination-wrap svg { width: 1.1rem; height: 1.1rem; }
.pagination-wrap a, .pagination-wrap span[aria-current] > span, .pagination-wrap span[aria-disabled] > span { padding: .45rem .8rem; }

/* --- Fiche produit ------------------------------------------------------- */
.product { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 3rem; padding-bottom: 2rem; }
.product__gallery { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.product__gallery > :first-child { grid-column: 1 / -1; }
.product__info { position: sticky; top: 130px; align-self: start; }
.product__price { font-size: 1.3rem; margin: .5rem 0 1rem; }
.product__price s { color: var(--c-muted); font-size: 1rem; margin-right: .5rem; }
.sizes { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 1rem 1.25rem; }
.sizes legend { font-size: .85rem; font-weight: 500; margin-bottom: .5rem; }
.size input { position: absolute; opacity: 0; }
.size span { display: grid; place-items: center; min-width: 48px; height: 44px; padding-inline: .6rem; border: 1px solid var(--c-line); cursor: pointer; }
.size input:checked + span { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }
.size input:focus-visible + span { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.perks { margin-block: 1.25rem; font-size: .85rem; color: var(--c-muted); }
.perks li::before { content: '✓ '; color: var(--c-ink); }
details { border-top: 1px solid var(--c-line); padding-block: 1rem; }
details:last-of-type { border-bottom: 1px solid var(--c-line); }
summary { cursor: pointer; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
@media (max-width: 900px) { .product { grid-template-columns: 1fr; gap: 1.5rem; } .product__info { position: static; } }

/* --- Panier / checkout --------------------------------------------------- */
.cart, .checkout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 3rem; padding-bottom: 4rem; align-items: start; }
@media (max-width: 960px) { .cart, .checkout { grid-template-columns: 1fr; gap: 2rem; } }
.line { display: grid; grid-template-columns: 90px 1fr auto auto auto; gap: 1rem; align-items: center; padding-block: 1.25rem; border-bottom: 1px solid var(--c-line); }
.line__media { aspect-ratio: 3 / 4; background: var(--c-soft); display: block; overflow: hidden; }
.line__media img { width: 100%; height: 100%; object-fit: cover; }
.line__media .placeholder { font-size: 2rem; }
.line__info p { margin: .15rem 0 0; }
.line__qty select { width: 72px; }
.line__total { margin: 0; min-width: 80px; text-align: right; font-weight: 500; }
@media (max-width: 640px) { .line { grid-template-columns: 70px 1fr auto; } .line__qty, .line__total { grid-column: 2; } }

.summary { background: var(--c-soft); padding: 1.75rem; position: sticky; top: 130px; }
.summary h2 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .1em; }
.totals { margin: 1.25rem 0; }
.totals > div { display: flex; justify-content: space-between; padding-block: .35rem; }
.totals dt, .totals dd { margin: 0; }
.totals__grand { border-top: 1px solid var(--c-ink); margin-top: .5rem; padding-top: .75rem !important; font-weight: 600; font-size: 1.1rem; }
.mini-lines li { display: flex; justify-content: space-between; gap: 1rem; padding-block: .4rem; font-size: .9rem; }

.panel { border: 1px solid var(--c-line); padding: 1.5rem; margin-bottom: 1.5rem; background: #fff; }
.panel legend { font-weight: 600; padding-inline: .5rem; margin-left: -.5rem; }
.methods { display: grid; gap: .75rem; margin-bottom: 1rem; }
.method { display: flex; gap: .85rem; align-items: flex-start; padding: 1rem; border: 1px solid var(--c-line); cursor: pointer; }
.method:has(input:checked) { border-color: var(--c-ink); background: var(--c-soft); }
.method__body { display: flex; flex-direction: column; }
.method small { color: var(--c-muted); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; }

.status-icon { width: 72px; height: 72px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; background: var(--c-soft); }
.status-icon--ok { background: #eaf6ee; color: var(--c-ok); }
.status-icon--ko { background: #fdecef; color: var(--c-accent); }

/* --- Réassurance + footer ----------------------------------------------- */
.reassurance { background: var(--c-soft); margin-top: 3rem; }
.reassurance__grid { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; padding-block: 1.5rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.reassurance__grid p { margin: 0; }
@media (max-width: 720px) { .reassurance__grid { grid-template-columns: 1fr 1fr; gap: 1rem; } }

.footer { background: var(--c-ink); color: #d8d6d2; padding-top: 3rem; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer h2, .footer h3 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; }
.footer li { margin-bottom: .5rem; font-size: .9rem; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__newsletter { grid-column: 1 / -1; } }
.newsletter { display: flex; gap: .5rem; margin-top: 1rem; }
.newsletter input { background: transparent; border-color: #555; color: #fff; }
.newsletter__msg { font-size: .85rem; color: #9bd9b0; margin-top: .6rem; }
.newsletter__msg--error { color: #ff9eb0; }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; border-top: 1px solid #2c2c2c; padding-block: 1.25rem; font-size: .8rem; }
.footer__bottom p { margin: 0; }
.footer__payments { display: flex; gap: .75rem; }
.footer__payments li { margin: 0; padding: .15rem .55rem; border: 1px solid #444; font-size: .7rem; letter-spacing: .06em; }

/* --- Pagination ---------------------------------------------------------- */
.pagination { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; }
.pagination__item { display: grid; place-items: center; min-width: 40px; height: 40px; padding-inline: .6rem; border: 1px solid var(--c-line); text-decoration: none; font-size: .9rem; }
a.pagination__item:hover { border-color: var(--c-ink); }
.pagination__item.is-current { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }
.pagination__item.is-disabled { color: var(--c-muted); opacity: .5; }

/* --- Hero responsive ----------------------------------------------------- */
/* Tablette */
@media (max-width: 1024px) {
    .hero__text { max-width: 560px; }
}
/* Mobile : image portrait (via <picture>), texte pleine largeur, bouton plus grand */
@media (max-width: 760px) {
    .hero { min-height: 480px; max-height: none; }
    .hero::after { background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0) 55%), linear-gradient(to bottom, rgba(0, 0, 0, .45), rgba(0, 0, 0, 0) 22%); }
    .hero__text { max-width: none; width: 100%; padding: 0 1.25rem 2rem; }
    .hero__eyebrow { font-size: .7rem; letter-spacing: .18em; }
    .hero__text h1 { font-size: clamp(2rem, 9vw, 2.8rem); }
    .hero__text p { font-size: 1rem; margin-bottom: 1.25rem; }
    .hero__text .btn { display: block; width: 100%; padding-block: 1rem; }
}
/* Petits mobiles */
@media (max-width: 380px) {
    .hero__text h1 { font-size: 1.9rem; }
}
/* Téléphone en mode paysage : hauteur limitée, on laisse défiler */
@media (orientation: landscape) and (max-height: 520px) {
    .hero { height: auto; min-height: 100svh; }
    .hero__text { padding-bottom: 1.5rem; }
}
/* Très grands écrans : on borne la hauteur pour ne pas sur-agrandir l'image */
@media (min-width: 1800px) {
    .hero { max-height: 1000px; }
}
