/* ============================================================
   MAISON SILENCE — style.css (enrichi v2 : jauge, genre, dual)
   ============================================================ */

:root {
    --bg: #F5F5F0;
    --ink: #1A1A1A;
    --sage: #4F5D53;
    --dust: #A9A9A1;
    --line: #D8D8D2;
    --card: #EEEEE8;

    --font-ui: 'Montserrat', sans-serif;
    --font-serif: 'Playfair Display', serif;

    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 15px;
    --space-xl: 24px;
    --space-xxl: 80px;
}

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

body {
    background-color: var(--bg);
    color: var(--ink);
    font-family: var(--font-ui);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.no-scroll { overflow: hidden; touch-action: none; }

a { text-decoration: none; color: inherit; }
button { cursor: pointer; background: none; border: none; font-family: inherit; color: inherit; border-radius: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 2px; }

/* ---------- Typographie ---------- */
.title-serif { font-family: var(--font-serif); font-weight: 300; font-style: italic; }
.text-ui { font-family: var(--font-ui); }
.label-ui { font-family: var(--font-ui); font-weight: 600; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.2em; }

.text-2xl { font-size: 2rem; }
.text-xl { font-size: 1.4rem; }
.text-lg { font-size: 1.2rem; }
.text-md { font-size: 1.1rem; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }

.fw-300 { font-weight: 300; }
.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }

.text-ink { color: var(--ink); }
.text-sage { color: var(--sage); }
.text-dust { color: var(--dust); }
.inline-block { display: inline-block; }

.tracking-wide { letter-spacing: 0.05em; }
.tracking-wider { letter-spacing: 0.1em; }
.lh-relaxed { line-height: 1.6; }

/* ---------- Layout ---------- */
.site-shell {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    background-color: var(--bg);
    min-height: 100vh;
    position: relative;
}

@media (min-width: 640px) { .site-shell { max-width: 640px; } }

@media (min-width: 1024px) {
    body { background-color: var(--card); }
    .site-shell {
        max-width: 1200px;
        border-left: 0.5px solid var(--line);
        border-right: 0.5px solid var(--line);
        box-shadow: 0 0 40px rgba(0,0,0,0.03);
    }
}

.page-section { padding: var(--space-xl) var(--space-lg); border-bottom: 0.5px solid var(--line); }

.d-flex { display: flex; }
.flex-col { flex-direction: column; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.align-baseline { align-items: baseline; }

.m-0 { margin: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-xl { margin-bottom: var(--space-xl); }
.ml-sm { margin-left: var(--space-sm); }
.mr-lg { margin-right: var(--space-lg); }

.p-0 { padding: 0; }
.py-lg { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.px-lg { padding-left: var(--space-lg); padding-right: var(--space-lg); }
.pb-xxl { padding-bottom: var(--space-xxl); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* ---------- Header ---------- */
.header-sticky {
    position: sticky; top: 0; z-index: 50;
    background: rgba(245, 245, 240, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 0.5px solid var(--line);
    padding: var(--space-lg);
}
.brand-link { font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.header-action { font-weight: 500; font-size: 0.85rem; text-decoration: underline; color: var(--dust); }

/* ---------- Boutons ---------- */
.btn-primary {
    background: var(--ink); color: #fff;
    padding: 18px;
    font-weight: 500; font-size: 0.9rem;
    text-transform: uppercase; letter-spacing: 0.1em;
    transition: background 0.3s ease;
    text-align: center; display: block;
    border-radius: 0;
}
.btn-primary:hover { background: var(--sage); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.sticky-cta-container {
    position: sticky; bottom: 0;
    background: var(--bg);
    border-top: 0.5px solid var(--line);
    padding: var(--space-lg);
    z-index: 40;
}

/* ---------- Galerie produit ---------- */
.gallery { aspect-ratio: 3/4; background: var(--card); position: relative; overflow: hidden; }
.gallery-img { width: 100%; height: 100%; object-fit: cover; }
.gallery-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.gallery-dots { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); }
.dot { width: 6px; height: 6px; background: var(--dust); transition: background 0.3s ease; border-radius: 50%; }

/* NOUVEAU : Badge GSM en overlay */
.gsm-badge {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    background: var(--ink);
    color: var(--bg);
    padding: 6px 12px;
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    z-index: 2;
}

/* NOUVEAU : Tag Genre (Homme/Femme/Mixte) */
.genre-tag {
    display: inline-block;
    padding: 4px 10px;
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border: 0.5px solid var(--line);
    color: var(--sage);
    margin-bottom: var(--space-sm);
}
.genre-tag.genre-homme { color: var(--ink); border-color: var(--ink); }
.genre-tag.genre-femme { color: var(--sage); border-color: var(--sage); }
.genre-tag.genre-mixte { color: var(--dust); border-color: var(--dust); }

/* NOUVEAU : Sous-titre éditorial */
.product-subtitle {
    font-size: 1rem;
    margin-top: 4px;
    margin-bottom: var(--space-sm);
}

.product-description {
    color: var(--ink);
    margin-top: var(--space-md);
}

/* NOUVEAU : Jauge "Le Poids du Silence" */
.gsm-gauge {
    padding: var(--space-md) 0;
}
.gauge-extreme {
    font-family: var(--font-ui);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--dust);
}
.gauge-left { float: left; }
.gauge-right { float: right; }
.gauge-track {
    clear: both;
    position: relative;
    height: 1px;
    background: var(--line);
    margin: var(--space-lg) 0 var(--space-md);
}
.gauge-cursor {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    background: var(--ink);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.gauge-label {
    text-align: center;
    margin-top: var(--space-md);
}

/* NOUVEAU : Sélecteur de version (dual-version) */
.version-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.version-btn {
    padding: var(--space-md);
    border: 0.5px solid var(--line);
    background: transparent;
    text-align: left;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.version-btn:first-child { border-right: none; }
.version-btn strong {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: 1rem;
    color: var(--ink);
}
.version-btn span {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    color: var(--sage);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.version-btn.is-active {
    background: var(--ink);
}
.version-btn.is-active strong,
.version-btn.is-active span {
    color: var(--bg);
}

/* ---------- Sélecteurs couleur / taille ---------- */
.color-swatch {
    width: 32px; height: 32px;
    border: 0.5px solid var(--line);
    transition: border-color 0.2s ease, transform 0.2s ease;
    border-radius: 50%;
}
.color-swatch:hover { transform: scale(1.08); }
.color-swatch[data-color="Craie"] { background: var(--bg); }
.color-swatch[data-color="Encre"] { background: var(--ink); }
.color-swatch[data-color="Sauge"] { background: var(--sage); }

.size-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.size-btn { padding: 12px 0; border: 0.5px solid var(--line); border-right: none; transition: all 0.2s ease; }
.size-btn:last-child { border-right: 0.5px solid var(--line); }
.size-btn:hover { background: var(--card); }

/* ---------- Accordéons ---------- */
.accordion-item { border-bottom: 0.5px solid var(--line); padding: 18px 0; }
.accordion-header { cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.accordion-header::-webkit-details-marker { display: none; }
.accordion-content { padding-top: 15px; }
.designer-quote {
    border-left: 2px solid var(--sage);
    padding-left: var(--space-md);
    font-style: italic;
}

/* ---------- Drawer panier ---------- */
.cart-overlay {
    position: fixed; inset: 0;
    background: rgba(26, 26, 26, 0.3);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 100;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-drawer {
    position: fixed; top: 0; right: 0;
    width: min(420px, 90%);
    height: 100vh; height: 100dvh;
    background: var(--bg);
    z-index: 101;
    border-left: 0.5px solid var(--line);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; flex-direction: column;
}

.cart-header { padding: var(--space-xl) var(--space-lg); border-bottom: 0.5px solid var(--line); }
.cart-body { flex: 1; overflow-y: auto; padding: 0 var(--space-lg); }
.cart-footer { padding: var(--space-xl) var(--space-lg); border-top: 0.5px solid var(--line); background: var(--bg); }
.cart-item { padding: var(--space-lg) 0; border-bottom: 0.5px solid var(--line); }
.cart-item-img { width: 70px; height: 90px; background: var(--card); flex-shrink: 0; object-fit: cover; }
.shipping-progress {
    height: 2px; background: var(--ink);
    transition: width 0.3s ease;
    margin-top: 8px;
    width: var(--progress-width, 0%);
}

/* ---------- États actifs ---------- */
.is-active { border-color: var(--ink); }
.color-swatch.is-active {
    border-width: 1.5px;
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--ink);
}
.size-btn.is-active { font-weight: 500; background: var(--ink); color: var(--bg); }
.dot.is-active { background: var(--ink); }
.cart-drawer.is-open { transform: translateX(0); }
.cart-overlay.is-open { opacity: 1; visibility: visible; }

/* ---------- Accessibilité motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
