/* =====================================================================
   Kelhi — Front-office
   Direction : "Botanical Editorial" — vert forêt profond, terracotta chaude,
   or mat, papier crème. Serif éditoriale pour les titres, sans-serif nette
   pour l'interface. Mobile-first, entièrement responsive.
   ===================================================================== */

:root {
    /* Neutres chauds */
    --ink:        #1A1815;
    --ink-soft:   #524C42;
    --muted:      #8A8272;
    --cream:      #FAF6EE;
    --paper:      #FFFFFF;
    --sand:       #F1EAD9;
    --line:       #E6DDC8;

    /* Marque */
    --forest:      #1C3B2E;
    --forest-deep: #0F241B;
    --forest-soft: #E7EEE7;
    --clay:        #C1512E;
    --clay-deep:   #9C3F22;
    --clay-soft:   #FBEAE1;
    --gold:        #AD8A46;
    --gold-soft:   #F3ECD9;

    --success: #2F6B4F;
    --success-soft: #E7F1EA;
    --danger:  #B23B2E;
    --danger-soft: #FBEAE6;

    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 24px;
    --r-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(26,24,21,.05), 0 1px 1px rgba(26,24,21,.04);
    --shadow-md: 0 8px 24px rgba(26,24,21,.08);
    --shadow-lg: 0 24px 56px rgba(26,24,21,.16);

    /* Alias de compatibilité (anciens noms de variables encore référencés par
       endroits en style inline) — à retirer au fur et à mesure de leur nettoyage. */
    --co-navy: var(--forest);
    --co-navy-light: var(--forest-deep);
    --co-gold: var(--clay);
    --co-teal: var(--forest);
    --co-bg: var(--cream);
    --co-card: var(--paper);
    --co-border: var(--line);
    --co-text: var(--ink);
    --co-muted: var(--muted);
    --co-danger: var(--danger);
    --radius: var(--r-lg);

    --font-display: 'Fraunces', 'Iowan Old Style', ui-serif, Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --container: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.55;
    letter-spacing: -0.01em;
}

body > main { flex: 1 0 auto; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

h1, h2, h3, .font-display {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.015em;
    line-height: 1.15;
}

::selection { background: var(--clay); color: #fff; }

:focus-visible {
    outline: 2px solid var(--clay);
    outline-offset: 2px;
}

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

/* Barre de progression discrète type "au-dessus de la marque" */
.brand-rule {
    height: 3px;
    background: linear-gradient(90deg, var(--clay), var(--gold), var(--forest));
}

/* ---------- Header ---------- */
.site-header {
    background: var(--paper);
    position: sticky;
    top: 0;
    /* Doit rester au-dessus du fond assombri (.search-backdrop, z-index 100) : la
       modale de recherche est nichée dans le header, donc le header entier doit
       dominer le backdrop pour que la modale reste cliquable par-dessus. */
    z-index: 110;
    border-bottom: 1px solid var(--line);
}

.site-header__top {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.1rem 1.5rem;
    max-width: var(--container);
    margin: 0 auto;
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.35rem;
    color: var(--forest);
    flex-shrink: 0;
    letter-spacing: -0.01em;
}
.site-header__brand img { width: 40px; height: 40px; border-radius: var(--r-sm); object-fit: cover; box-shadow: var(--shadow-sm); }

.site-search { flex: 1; display: flex; max-width: 480px; position: relative; }
.site-search__header { display: none; }
.site-search__title { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--ink); }
.site-search__close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--sand);
    color: var(--ink);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}
.site-search__close svg { width: 16px; height: 16px; }
.site-search__row { display: flex; flex: 1; }
.site-search input {
    flex: 1;
    border: 1.5px solid var(--line);
    background: var(--cream);
    border-radius: var(--r-pill);
    padding: 0.65rem 1.1rem;
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--ink);
    transition: border-color .15s ease, background .15s ease;
}
.site-search input:focus { outline: none; border-color: var(--clay); background: var(--paper); }
.site-search input::placeholder { color: var(--muted); }
.site-search__row button {
    border: none;
    background: var(--forest);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0 1.3rem;
    border-radius: var(--r-pill);
    cursor: pointer;
    margin-left: -3.2rem;
    transition: background .15s ease;
}
.site-search__row button:hover { background: var(--forest-deep); }

.site-header__actions { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; margin-left: auto; }

.site-header__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: var(--r-pill);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-soft);
    transition: background .15s ease, color .15s ease;
    white-space: nowrap;
}
.site-header__link:hover { background: var(--sand); color: var(--ink); }

/* Boutons icône (menu, recherche, compte) — visibles uniquement sur mobile, où les
   libellés texte laissent place à des icônes pour tenir sur une seule ligne compacte. */
.site-header__icon-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}
.site-header__icon-btn:hover { background: var(--sand); }
.site-header__icon-btn svg { width: 20px; height: 20px; }
.site-header__menu-toggle { margin-right: -0.3rem; }

.site-header__cart {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--forest);
    color: #fff;
    padding: 0.55rem 1.1rem;
    border-radius: var(--r-pill);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .15s ease, transform .15s ease;
}
.site-header__cart:hover { background: var(--forest-deep); }
.site-header__cart-icon { display: none; width: 19px; height: 19px; }
.site-header__cart-count {
    background: var(--clay);
    color: #fff;
    border-radius: var(--r-pill);
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0 0.3rem;
}

.site-nav { background: var(--forest); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav__inner { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; display: flex; gap: 2rem; }
.site-nav a {
    display: inline-block;
    padding: 0.7rem 0;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    border-bottom: 2px solid transparent;
    transition: color .15s ease, border-color .15s ease;
}
.site-nav a:hover { color: #fff; border-color: var(--gold); }
.site-nav__header { display: none; }
.site-nav__close { display: none; }

/* Fond assombri derrière la modale de recherche mobile */
.search-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 36, 27, 0.55);
    z-index: 100;
}
.search-backdrop.is-open { display: block; }

/* ---------- Flash ---------- */
.site-alert {
    padding: 0.85rem 1.25rem;
    border-radius: var(--r-md);
    margin: 1.25rem auto 0;
    max-width: var(--container);
    font-size: 0.9rem;
    font-weight: 500;
}
.site-alert--success { background: var(--success-soft); color: var(--success); }
.site-alert--warning { background: var(--gold-soft); color: var(--clay-deep); }
.site-alert--error { background: var(--danger-soft); color: var(--danger); }

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0; }
.section--tight { padding: 1.75rem 0 2.5rem; }
.section__header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.75rem; gap: 1rem; }
.section__header h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.section__header a { font-size: 0.85rem; color: var(--clay); font-weight: 600; white-space: nowrap; }
.section__header a:hover { text-decoration: underline; }

/* Rangée de catégories dense, style marketplace (Amazon/Alibaba) plutôt qu'un hero. */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 0.75rem; }
.cat-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 0.9rem 0.6rem;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: var(--font-display);
    color: var(--ink);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: transparent; }
.cat-card img {
    width: 48px; height: 48px; margin: 0 auto 0.6rem; border-radius: 50%;
    object-fit: cover; background: var(--sand); border: 1px solid var(--line);
}

/* ---------- Product grid / cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.5rem; }

.product-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: transparent; }
.product-card__img { aspect-ratio: 4 / 5; background: var(--sand); overflow: hidden; position: relative; }
.product-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product-card:hover .product-card__img img { transform: scale(1.06); }
.product-card__badge {
    position: absolute; top: 12px; left: 12px;
    background: var(--clay); color: #fff;
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
    padding: 0.3rem 0.65rem; border-radius: var(--r-pill);
}
.product-card__body { padding: 1.1rem; flex: 1; display: flex; flex-direction: column; gap: 0.45rem; }
.product-card__name { font-size: 0.92rem; font-weight: 500; line-height: 1.35; color: var(--ink); }
.product-card__body .star-rating { font-size: 0.72rem; }
.product-card__body .star-rating__count { font-size: 0.72rem; margin-left: 0.3rem; }
.product-card__price { font-weight: 700; font-size: 1.02rem; color: var(--forest); font-family: var(--font-display); }
.product-card__price .old { text-decoration: line-through; color: var(--muted); font-weight: 400; font-size: 0.82rem; margin-right: 0.4rem; font-family: var(--font-body); }
.product-card__actions { margin-top: auto; padding-top: 0.3rem; }
.product-card__view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    height: 38px;
    border-radius: var(--r-pill);
    border: 1.5px solid var(--forest);
    background: transparent;
    color: var(--forest);
    font-size: 0.82rem;
    font-weight: 600;
    transition: background .15s ease, color .15s ease;
}
.product-card__view-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.product-card__view-btn:hover { background: var(--forest); color: #fff; }

/* ---------- Buttons ---------- */
.co-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem 1.4rem;
    border-radius: var(--r-pill);
    border: 1.5px solid transparent;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--forest);
    color: #fff;
    width: 100%;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.co-btn:hover { background: var(--forest-deep); }
.co-btn:active { transform: scale(0.98); }
.co-btn--outline { background: transparent; color: var(--forest); border-color: var(--forest); }
.co-btn--outline:hover { background: var(--forest); color: #fff; }
.co-btn--gold { background: var(--clay); color: #fff; }
.co-btn--gold:hover { background: var(--clay-deep); }
.co-btn--sm { padding: 0.5rem 1rem; font-size: 0.8rem; width: auto; }
.co-btn--inline { width: auto; }
.co-btn--block { width: 100%; }
.co-btn--ghost { background: none; color: var(--danger); border: 1.5px solid var(--danger-soft); }
.co-btn--ghost:hover { background: var(--danger-soft); }
.co-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.co-btn:disabled:hover { background: var(--forest); }

/* ---------- Bouton en chargement (spinner) ---------- */
.co-btn.is-loading { position: relative; pointer-events: none; opacity: 0.85; }
.co-btn.is-loading .co-btn__label { visibility: hidden; }
.co-btn.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: co-btn-spin 0.6s linear infinite;
}
@keyframes co-btn-spin { to { transform: rotate(360deg); } }

/* ---------- Form controls (partagés par toutes les pages) ---------- */
.co-field, .co-form-group { margin-bottom: 1.1rem; }
.co-field label, .co-form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 0.4rem; }
.co-field .hint, .co-form-group .hint, .co-hint { display: block; font-size: 0.76rem; color: var(--muted); margin-top: 0.35rem; font-weight: 400; }

.co-input, .co-textarea, .co-select, select, input[type="text"], input[type="email"],
input[type="password"], input[type="tel"], input[type="number"], input[type="date"],
input[type="datetime-local"], textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--paper);
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.co-input:focus, .co-textarea:focus, .co-select:focus, select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: var(--clay);
    box-shadow: 0 0 0 3px var(--clay-soft);
}
textarea { resize: vertical; }

.co-checkbox-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; cursor: pointer; margin-bottom: 0.6rem; }
.co-checkbox-row input { width: auto; }

.co-pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }

/* ---------- Filters / layout ---------- */
.shop-layout { display: grid; grid-template-columns: 250px 1fr; gap: 2rem; align-items: start; }
.filters { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem; position: sticky; top: 6.5rem; }
.filters h3 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 1.25rem 0 0.6rem; font-family: var(--font-body); font-weight: 700; }
.filters h3:first-child { margin-top: 0; }
.filters label { display: block; font-size: 0.85rem; margin-bottom: 0.4rem; color: var(--ink-soft); }
.filters input[type="number"], .filters select {
    width: 100%; padding: 0.5rem 0.65rem; border: 1.5px solid var(--line); border-radius: var(--r-sm); font-size: 0.85rem; margin-top: 0.25rem;
}
.filters .co-btn { margin-top: 0.5rem; }
.sort-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.5rem; }
.sort-bar span { font-size: 0.88rem; color: var(--muted); }
.sort-bar select { padding: 0.5rem 0.8rem; border: 1.5px solid var(--line); border-radius: var(--r-pill); font-size: 0.85rem; }

.filters-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    background: var(--paper);
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}
.filters-toggle svg { width: 18px; height: 18px; flex-shrink: 0; }
.filters-toggle__badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 0.35rem; margin-left: auto;
    background: var(--clay); color: #fff; border-radius: var(--r-pill);
    font-size: 0.72rem; font-weight: 700;
}

@media (max-width: 900px) {
    .shop-layout { grid-template-columns: 1fr; }
    .filters { position: static; }

    /* Le panneau de filtres est replié par défaut sur mobile/tablette : sinon
       il occupe presque tout l'écran avant même d'afficher un seul produit. */
    .filters-toggle { display: flex; }
    .filters { display: none; }
    .filters.is-open { display: block; }
}

/* ---------- Product detail ---------- */
.breadcrumb { font-size: 0.82rem; color: var(--muted); margin-bottom: 1.5rem; }
.breadcrumb a:hover { color: var(--clay); }

.product-detail { display: grid; grid-template-columns: minmax(0, 480px) 1fr; gap: 3rem; }
.product-gallery__main { aspect-ratio: 4/5; background: var(--sand); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 0.85rem; box-shadow: var(--shadow-sm); }
.product-gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery__thumbs { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.product-gallery__thumbs img {
    width: 68px; height: 68px; object-fit: cover; border-radius: var(--r-sm);
    border: 2px solid var(--line); cursor: pointer; transition: border-color .15s ease;
}
.product-gallery__thumbs img.is-active, .product-gallery__thumbs img:hover { border-color: var(--clay); }

.product-info__brand { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.product-info h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0.3rem 0 0.6rem; }
.product-info__price { font-size: 1.9rem; font-weight: 700; margin: 0.75rem 0; font-family: var(--font-display); color: var(--forest); }
.product-info__price .old { text-decoration: line-through; color: var(--muted); font-size: 1.1rem; font-weight: 400; margin-right: 0.6rem; }
.product-info__stock { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; font-weight: 600; margin-bottom: 1.5rem; padding: 0.35rem 0.8rem; border-radius: var(--r-pill); }
.product-info__stock.ok { color: var(--success); background: var(--success-soft); }
.product-info__stock.low { color: var(--gold); background: var(--gold-soft); }
.product-info__stock.out { color: var(--danger); background: var(--danger-soft); }

.variant-group { margin-bottom: 1.25rem; }
.variant-group label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.45rem; color: var(--ink-soft); }
.variant-group select { width: 100%; max-width: 280px; padding: 0.65rem 0.8rem; border: 1.5px solid var(--line); border-radius: var(--r-sm); }
.qty-input { max-width: 110px; }

.product-info__description { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.product-info__description h3 { font-size: 1rem; font-family: var(--font-body); font-weight: 700; }
.product-info__description p { color: var(--ink-soft); white-space: pre-line; }

.product-share { display: flex; align-items: center; gap: 0.6rem; margin-top: 1.25rem; }
.product-share__label { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
.product-share__btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%;
    border: 1.5px solid var(--line); background: var(--paper); color: var(--ink-soft);
    cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.product-share__btn svg { width: 18px; height: 18px; }
.product-share__btn--whatsapp:hover { background: #25D366; border-color: #25D366; color: #fff; }
.product-share__btn--facebook:hover { background: #1877F2; border-color: #1877F2; color: #fff; }
.product-share__btn--copy:hover { background: var(--forest); border-color: var(--forest); color: #fff; }
.product-share__feedback { font-size: 0.8rem; color: var(--success); font-weight: 600; }

/* ---------- Étoiles de notation ---------- */
.star-rating { position: relative; display: inline-block; font-size: 0.95rem; line-height: 1; white-space: nowrap; }
.star-rating__bg { color: var(--line); letter-spacing: 2px; }
.star-rating__fg {
    position: absolute; top: 0; left: 0; overflow: hidden; white-space: nowrap;
    color: var(--gold); letter-spacing: 2px;
}
.star-rating__count { margin-left: 0.4rem; font-size: 0.82rem; color: var(--ink-soft); font-weight: 600; vertical-align: middle; }
.star-rating--sm { font-size: 0.85rem; }

.product-info__rating-link { display: inline-flex; align-items: center; margin-bottom: 0.6rem; }
.product-info__rating-link:hover .star-rating__count { text-decoration: underline; }

/* ---------- Avis clients ---------- */
.product-reviews { margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--line); max-width: 760px; }
.product-reviews__summary { margin-bottom: 1.5rem; }

.review-list { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 2rem; }
.review-item { padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.review-item__header { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.review-item__author { font-family: var(--font-display); font-size: 0.92rem; }
.review-item__date { font-size: 0.78rem; color: var(--muted); }
.review-item__comment { color: var(--ink-soft); margin: 0; white-space: pre-line; }

.review-form-block { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem; }
.review-form h3 { margin: 0 0 1rem; font-size: 1rem; }
.review-form__stars { display: inline-flex; flex-direction: row-reverse; gap: 0.15rem; margin-bottom: 1rem; }
.review-form__stars input { position: absolute; opacity: 0; width: 0; height: 0; }
.review-form__stars label { font-size: 1.6rem; color: var(--line); cursor: pointer; transition: color .15s ease; }
.review-form__stars input:checked ~ label,
.review-form__stars input:hover ~ label,
.review-form__stars label:hover ~ label { color: var(--gold); }
.review-form textarea { width: 100%; max-width: 460px; margin-bottom: 1rem; }

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

/* ---------- Cart ---------- */
.shop-layout--cart { grid-template-columns: 1fr 340px; }
@media (max-width: 900px) { .shop-layout--cart { grid-template-columns: 1fr; } }

.cart-item { display: grid; grid-template-columns: 84px 1fr auto; gap: 1.1rem; align-items: center; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: none; }
.cart-item img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--r-md); background: var(--sand); }
.cart-item__name { font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.cart-item__name:hover { color: var(--clay); }
.cart-item__variant { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }
.cart-item__unit-price { font-size: 0.85rem; margin-top: 0.35rem; color: var(--ink-soft); }
.cart-item__warning { color: var(--danger); font-size: 0.78rem; margin-top: 0.3rem; }
.cart-item__actions { text-align: right; }
.cart-item__qty-stepper { display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 0.65rem; }
.cart-item__qty-btn {
    width: 30px; height: 30px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--line); border-radius: var(--r-sm);
    background: var(--paper); color: var(--ink); font-size: 1.1rem; line-height: 1;
    cursor: pointer; transition: background .15s ease, border-color .15s ease;
}
.cart-item__qty-btn:hover { background: var(--sand); border-color: var(--clay); }
.cart-item__qty-stepper .js-cart-qty {
    width: 46px; flex-shrink: 0; text-align: center; padding: 0.45rem 0.2rem;
    border: 1.5px solid var(--line); border-radius: var(--r-sm);
}
.js-cart-qty::-webkit-outer-spin-button, .js-cart-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.js-cart-qty { -moz-appearance: textfield; }
.cart-item__price-row { display: flex; align-items: center; justify-content: flex-end; gap: 0.85rem; }
.cart-item__subtotal { font-weight: 700; font-family: var(--font-display); }
.co-cart-continue { margin-top: 1.25rem; }
.co-cart-checkout { margin-top: 1.25rem; }

.cart-summary { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.75rem; }
.cart-summary h2, .cart-summary h3 { margin-top: 0; }
.cart-summary__row { display: flex; justify-content: space-between; margin-bottom: 0.7rem; font-size: 0.92rem; color: var(--ink-soft); }
.cart-summary__row--muted { color: var(--muted); font-size: 0.8rem; }
.cart-summary__row--discount { color: var(--success); font-weight: 600; }
.cart-summary__row.total { font-weight: 700; font-size: 1.2rem; color: var(--ink); border-top: 1px solid var(--line); padding-top: 0.85rem; margin-top: 0.4rem; font-family: var(--font-display); }

.cart-coupon { margin-bottom: 1.25rem; }
.cart-coupon__form { display: flex; gap: 0.5rem; }
.cart-coupon__form .co-input { flex: 1; padding: 0.6rem 0.8rem; font-size: 0.85rem; }
.cart-coupon__applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    background: var(--success-soft);
    color: var(--success);
    border-radius: var(--r-sm);
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
}
.cart-coupon__remove { border: none; background: none; color: var(--success); font-weight: 600; text-decoration: underline; cursor: pointer; padding: 0; font-size: 0.82rem; }

.empty-state { text-align: center; padding: 4rem 1.5rem; color: var(--muted); font-size: 1rem; }
.empty-state__cta { max-width: 240px; margin: 1.5rem auto 0; }

/* ---------- Tunnel de commande (commande/paiement/confirmation) ---------- */
.checkout-block { margin-bottom: 1.5rem; }
.checkout-block h2, .checkout-block h3 { margin-top: 0; font-size: 1.15rem; }
.form-row { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.form-row .co-form-group { flex: 1; min-width: 200px; }
.zone-option { display: flex; justify-content: space-between; align-items: center; padding: 0.9rem 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; cursor: pointer; }
.zone-option:last-child { border-bottom: none; }
.zone-option__meta { color: var(--muted); font-size: 0.85rem; }
.checkout-summary-item { font-size: 0.85rem; }
.checkout-submit { margin-top: 1.5rem; max-width: 360px; }
.order-status-pill { background: var(--gold-soft); color: var(--gold); }
.form-narrow { max-width: 580px; }
.payment-method-option { display: block; padding: 1rem 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.payment-method-option:last-child { border-bottom: none; }
.payment-method-option__instructions { font-size: 0.8rem; color: var(--muted); margin: 0.35rem 0 0 1.6rem; }
.confirmation-wrap { max-width: 680px; }
.confirmation-wrap .cart-summary { margin-bottom: 1.5rem; }
.confirmation-wrap p { font-size: 0.9rem; margin: 0 0 0.3rem; }
.confirmation-wrap p.co-hint { margin-top: 0.5rem; }
.confirmation-actions { display: flex; gap: 0.85rem; flex-wrap: wrap; max-width: 680px; }

/* ---------- Compte client ---------- */
.account-sidebar { align-self: start; display: flex; flex-direction: column; gap: 0.75rem; }

.account-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.75rem; }
.account-nav__link {
    padding: 0.5rem 1.1rem;
    border-radius: var(--r-pill);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-soft);
    background: var(--paper);
    border: 1px solid var(--line);
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.account-nav__link:hover { background: var(--sand); color: var(--ink); }
.account-nav__link.is-active { background: var(--forest); border-color: var(--forest); color: #fff; }
.account-nav__link--ghost { margin-left: auto; }

.order-list-item { margin-bottom: 1rem; }
.order-list-item .cart-summary__row .total-amount { font-weight: 700; }

.co-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.address-card { margin-bottom: 1rem; }
.address-card__default { color: var(--forest); font-weight: 600; }
.address-card__meta { margin: 0.5rem 0 0; font-size: 0.9rem; }
.address-card__location { margin: 0.25rem 0 0; font-size: 0.85rem; color: var(--muted); }
.address-card .co-actions { margin-top: 0.9rem; }
.address-form-cancel { margin-left: 0.75rem; font-size: 0.85rem; color: var(--muted); }
.address-form-cancel:hover { color: var(--clay); }

/* ---------- Badges ---------- */
.co-badge { display: inline-flex; align-items: center; padding: 0.3rem 0.75rem; border-radius: var(--r-pill); font-size: 0.75rem; font-weight: 700; }
.co-badge--gold { background: var(--gold-soft); color: var(--gold); }
.co-badge--success { background: var(--success-soft); color: var(--success); }
.co-badge--danger { background: var(--danger-soft); color: var(--danger); }

/* ---------- Install banner (PWA) ---------- */
/* display ne doit s'appliquer que si l'élément n'est pas [hidden] : sinon la
   règle auteur (display:flex) prime sur la règle UA ([hidden]{display:none})
   et l'attribut hidden n'a plus aucun effet visuel, quoi que fasse le JS. */
.install-banner:not([hidden]) {
    display: flex;
}
.install-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 50;
    background: var(--forest);
    color: #fff;
    border-radius: var(--r-lg);
    padding: 1rem 1.25rem;
    align-items: center;
    gap: 0.85rem;
    box-shadow: var(--shadow-lg);
    max-width: 440px;
    margin: 0 auto;
}
.install-banner img { width: 42px; height: 42px; border-radius: var(--r-sm); object-fit: cover; flex-shrink: 0; }
.install-banner__text { flex: 1; font-size: 0.82rem; line-height: 1.35; }
.install-banner__actions { display: flex; flex-direction: column; gap: 0.4rem; }
.install-banner button { border: none; border-radius: var(--r-pill); font-size: 0.78rem; font-weight: 700; cursor: pointer; padding: 0.45rem 0.9rem; white-space: nowrap; }
.install-banner__install { background: var(--clay); color: #fff; }
.install-banner__dismiss { background: transparent; color: rgba(255,255,255,0.65); }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-deep); color: rgba(255,255,255,0.7); margin-top: 3rem; }
.site-footer .container { padding: 3.5rem 1.5rem 2.5rem; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.site-footer h4 { color: #fff; font-family: var(--font-display); font-size: 1.05rem; margin: 0 0 1rem; font-weight: 600; }
.site-footer__logo {
    display: inline-flex;
    background: var(--cream);
    border-radius: var(--r-md);
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
}
.site-footer__logo img { height: 84px; width: auto; display: block; }
.site-footer p { font-size: 0.85rem; margin: 0 0 0.5rem; line-height: 1.5; }
.site-footer a { display: block; font-size: 0.85rem; margin-bottom: 0.55rem; color: rgba(255,255,255,0.65); transition: color .15s ease; }
.site-footer a:hover { color: var(--gold); }
.site-footer__bottom { text-align: center; font-size: 0.78rem; padding: 1.25rem; border-top: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.45); }

@media (max-width: 900px) {
    .site-footer .container { grid-template-columns: 1fr 1fr; }
}

/* ---------- Pages de contenu génériques (CGV, FAQ...) ---------- */
.content-page h1 { margin-bottom: 1.5rem; }
.content-page__body { color: var(--ink-soft); white-space: pre-line; max-width: 720px; }
.faq-item { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { margin-bottom: 0.4rem; font-size: 1.05rem; }
.faq-item p { color: var(--ink-soft); margin: 0; }

/* ---------- Auth pages (connexion/inscription) ---------- */
.auth-page { max-width: 420px; margin: 3rem auto; }
.auth-page h1 { text-align: center; margin-bottom: 1.75rem; }
.auth-page__footer { text-align: center; margin-top: 1.5rem; font-size: 0.88rem; color: var(--muted); }
.auth-page__footer a { color: var(--clay); font-weight: 600; }
.auth-page__footer a:hover { text-decoration: underline; }

/* ---------- Responsive globaux ---------- */
@media (max-width: 760px) {
    /* En-tête compact sur mobile : une seule ligne (menu / logo / recherche+compte+panier en icônes),
       recherche et catégories repliées derrière des boutons pour ne pas monopoliser l'écran. */
    .site-header__top { flex-wrap: nowrap; padding: 0.6rem 1rem; gap: 0.35rem; }
    .site-header__brand span { display: none; }
    .site-header__menu-toggle, .site-header__search-toggle, .site-header__account-icon { display: inline-flex; }
    .site-header__link { display: none; }

    /* Recherche mobile : modale ancrée en haut de l'écran plutôt qu'un champ
       permanent qui pousserait le contenu de la page vers le bas. */
    .site-search {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        max-width: none;
        margin-top: 0;
        padding: 1.1rem 1.25rem 1.35rem;
        background: var(--paper);
        border-radius: 0 0 var(--r-lg) var(--r-lg);
        box-shadow: var(--shadow-lg);
        z-index: 101;
    }
    .site-search.is-open { display: flex; }
    .site-search__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; }
    .site-search__close { display: inline-flex; }
    .site-search__row { width: 100%; }

    .site-header__cart { padding: 0; width: 38px; height: 38px; border-radius: 50%; justify-content: center; gap: 0; }
    .site-header__cart-icon { display: block; }
    .site-header__cart-label { display: none; }
    .site-header__cart-count { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; font-size: 0.62rem; }

    .site-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        max-height: 85vh;
        overflow-y: auto;
        box-shadow: var(--shadow-lg);
        z-index: 101;
    }
    .site-nav.is-open { display: block; }
    .site-nav__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1.25rem 0.5rem;
    }
    .site-nav__title { color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
    .site-nav__close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        border: none;
        background: rgba(255,255,255,0.12);
        color: #fff;
        cursor: pointer;
        padding: 0;
        flex-shrink: 0;
    }
    .site-nav__close svg { width: 16px; height: 16px; }
    .site-nav__inner { flex-direction: column; gap: 0; overflow-x: visible; white-space: normal; padding: 0 1.25rem 1rem; }
    .site-nav__inner a { display: block; padding: 0.7rem 0; border-bottom: 1px solid rgba(255,255,255,0.14); }
    .site-nav__inner a:last-child { border-bottom: none; }

    .section { padding: 2.5rem 0; }
    .section--tight { padding: 1.25rem 0 2rem; }
    .product-detail { gap: 1.25rem; }
}

@media (max-width: 480px) {
    .container { padding: 0 1.1rem; }
    .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
    .cat-card { padding: 0.6rem 0.3rem; font-size: 0.68rem; }
    .cat-card img { width: 40px; height: 40px; margin-bottom: 0.4rem; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
    .cart-item { grid-template-columns: 64px 1fr; }
    .cart-item > div:last-child { grid-column: 1 / -1; margin-top: 0.75rem; }
    .cart-item__actions { text-align: left; }
    .cart-item__qty-stepper { width: 100%; justify-content: center; margin-bottom: 0.75rem; }
    .cart-item__price-row { justify-content: space-between; }
}
