/* ============================================================
   ROOT VARIABLES — Design System
   ============================================================ */
:root {
    /* Colors */
    --color-primary: #1a1a1a;
    --color-secondary: #8b7355;
    --color-accent: #c9a96e;
    --color-accent-light: #e8d5b0;
    --color-bg: #fafafa;
    --color-bg-card: #ffffff;
    --color-bg-dark: #111111;
    --color-surface: white;
    --color-border: #e8e2d9;
    --color-border-light: #f0ece6;
    --color-text-primary: #1a1a1a;
    --color-text-secondary: #6b6b6b;
    --color-text-muted: #a0a0a0;
    --color-text-light: #ffffff;
    --color-sale: #c0392b;
    --color-sale-bg: #fdf0ee;
    --color-price-old: #a0a0a0;
    --color-price-new: #c0392b;
    /* Typography */
    --font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    --font-body: 'Jost', 'Gill Sans', 'Trebuchet MS', sans-serif;
    --font-mono: 'Courier New', monospace;
    --text-xs: 0.65rem;
    --text-sm: 0.75rem;
    --text-base: 0.875rem;
    --text-md: 1rem;
    --text-lg: 1.25rem;
    --text-xl: 1.5rem;
    --text-2xl: 2rem;
    --text-3xl: 2.75rem;
    --text-4xl: 3.5rem;
    --tracking-widest: 0.25em;
    --tracking-wide: 0.12em;
    --tracking-normal: 0.04em;
    --weight-light: 300;
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    /* Border Radius */
    --radius-none: 0;
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;
    --radius-full: 9999px;
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
    --shadow-xl: 0 24px 64px rgba(0,0,0,0.15);
    --shadow-card-hover: 0 20px 60px rgba(0,0,0,0.14), 0 8px 20px rgba(0,0,0,0.08);
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 280ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Layout */
    --container-max: 1440px;
    --container-content: 1200px;
    --grid-gap: var(--space-6);
    --nav-height: 70px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-text-primary);
    background-color: var(--color-bg);
    line-height: 1.6;
    font-weight: var(--weight-regular);
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */
.label-caps {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    letter-spacing: var(--tracking-widest);
    text-transform: var(--site-caps, uppercase);
    color: var(--color-text-secondary);
}

.heading-display {
    font-family: var(--font-display);
    font-weight: var(--weight-light);
    letter-spacing: var(--tracking-normal);
    line-height: 1.15;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
    max-width: var(--container-content);
    margin: 0 auto;
    padding: 0 var(--space-8);
}

.container--wide {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-8);
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    margin-bottom: var(--space-12);
}

.section-header__tabs {
    display: flex;
    gap: var(--space-8);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0;
}

.section-tab {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    letter-spacing: var(--tracking-widest);
    text-transform: var(--site-caps, uppercase);
    color: var(--color-text-muted);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color var(--transition-base), border-color var(--transition-base);
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

    .section-tab:hover {
        color: var(--color-text-primary);
    }

.section-tab--active {
    color: var(--color-text-primary);
    border-bottom-color: var(--color-text-primary);
}

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* Category Grid (3 col) */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

@media (max-width: 900px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   BADGE / TAG
   ============================================================ */
.badge {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    letter-spacing: var(--tracking-wide);
    text-transform: var(--site-caps, uppercase);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
}

.badge--sale {
    color: var(--color-sale);
    background: var(--color-sale-bg);
}

.badge--new {
    color: var(--color-text-light);
    background: var(--color-primary);
}

/* ============================================================
   PRICE
   ============================================================ */
.price {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
}

.price__current {
    font-family: var(--font-body);
    font-size: var(--text-md);
    font-weight: var(--weight-medium);
    color: var(--color-price-new);
}

.price__original {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--color-price-old);
    text-decoration: line-through;
}

.price--regular .price__current {
    color: var(--color-text-primary);
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
    width: 40px;
    height: 1px;
    background: var(--color-accent);
    margin: var(--space-4) 0;
}

/* ============================================================
   SCROLL REVEAL ANIMATION
   ============================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.5s ease forwards;
}

/* ============================================================
   THEME LAYER — variables --site-* injectées par SiteTheme.razor
   (couleurs / polices / arrondis choisis dans le portail + template)
   ============================================================ */
:root {
    --site-primary: #1a1a1a;
    --site-primary-hover: #3a3a3a;
    --site-on-primary: #ffffff;
    --site-accent: #c9a96e;
    --site-surface: #faf8f5;
    --site-surface-alt: #f4f1ec;
    --site-radius: 0px;
    --site-btn-transform: uppercase;
}

body {
    font-family: var(--font-body);
}

/* Blazor <FocusOnNavigate Selector="h1"> donne le focus au titre de la page
   pour les lecteurs d'écran : pas de cadre visible autour du titre. */
h1:focus, h1:focus-visible {
    outline: none;
}

::selection {
    background: var(--site-accent);
    color: #ffffff;
}

/* Arrondis du template sur les boutons principaux (classes scoped existantes) */
.pd__btn, .pd__qty, .ck-submit, .ck-login-btn, .ck-input, .ck-select, .ck-delivery-tab,
.pc__cart-bar, .cart-sidebar__checkout, .cart-sidebar__note-save, .col-loadmore__btn,
.auth-card__submit, .acc-btn, .adr-btn, .adm-submit, .contact-form__submit, .ckr-btn,
.qv-add-btn, .cf-panel__apply, .cat-card__btn, .hero-carousel__cta, .home-btn {
    border-radius: var(--site-radius) !important;
}

.pc, .cat-card, .pd__main, .pd__thumb, .ck-summary-col {
    border-radius: var(--site-radius);
}

/* ── Utilitaires partagés des nouvelles pages ───────────────── */
.site-container {
    max-width: var(--container-content);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.site-page-top {
    padding-top: 140px;
}

/* ══ Liste d'envies (/liste-envies) & comparateur (/comparer) ══════════ */
.pl-page { padding: 40px 0 80px; background: var(--site-surface, #fff); }
.pl-container { width: min(1280px, calc(100% - 40px)); margin: 0 auto; }
.pl-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pl-title { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; font-family: var(--font-display, inherit); font-size: clamp(1.5rem, 3vw, 2rem); }
.pl-title i { color: var(--site-primary, #c8202f); font-size: .8em; }
.pl-muted { color: #6b6b6b; font-size: 14px; }
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 26px; margin-top: 22px; padding-bottom: 60px; }
.pl-empty { padding: 50px 20px; text-align: center; border: 1px dashed #d6d6d6; margin-top: 20px; }
.pl-empty p { margin: 0 0 8px; }
.pl-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 18px; border: 1px solid var(--site-primary, #c8202f); border-radius: 5px; background: var(--site-primary, #c8202f); color: #fff; font: inherit; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; }
.pl-btn:hover { background: var(--site-primary-hover, #a51a26); color: #fff; }
.pl-btn--ghost { background: #fff; color: var(--site-primary, #c8202f); }
.pl-link { border: none; background: none; color: var(--site-primary, #c8202f); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.pl-ok { color: #1f7a3d; }
.pl-compare-wrap { margin-top: 24px; overflow-x: auto; }
.pl-compare { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 640px; }
.pl-compare th { width: 150px; padding: 14px 12px; text-align: left; font-size: 13px; color: #4a4a4a; vertical-align: top; }
.pl-compare td { position: relative; padding: 14px 12px; border-left: 1px solid #e3e3e3; font-size: 14px; vertical-align: top; }
.pl-compare tr + tr th, .pl-compare tr + tr td { border-top: 1px solid #e3e3e3; }
.pl-compare__product { display: flex; flex-direction: column; gap: 10px; color: inherit; text-decoration: none; }
.pl-compare__product img { width: 100%; height: 180px; object-fit: contain; }
.pl-compare__product strong { font-size: 13.5px; line-height: 1.4; }
.pl-remove { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 1px solid #d6d6d6; border-radius: 50%; background: #fff; color: #4a4a4a; cursor: pointer; }
.pl-remove:hover { border-color: var(--site-primary, #c8202f); color: var(--site-primary, #c8202f); }

/* ══ Impression ══════════════════════════════════════════════════════
   Jamais les boutons flottants ni les bandeaux ; sur le comparateur,
   ni l'en-tête ni le pied de page du site (la page a son propre en-tête). */
@media print {
    .cookie-fab, .cookie-banner, .cc-backdrop, .cc-modal, .cmp-fab, .cmp-panel, .cmp-backdrop { display: none !important; }
    body:has(.cmpp) header,
    body:has(.cmpp) footer { display: none !important; }
}
/* Menu mobile ouvert : la page derrière ne défile plus */
html.mnav-open, html.mnav-open body { overflow: hidden; }

/* Téléphone : rien ne doit dépasser en largeur (images, vidéos, tableaux, cartes) */
@media (max-width: 900px) {
    html, body { overflow-x: clip; }
    img, video, iframe { max-width: 100%; }
    table { display: block; max-width: 100%; overflow-x: auto; }
}

/* Menu mobile ouvert : le header (et son tiroir) passe au-dessus de tout,
   la pastille cookies et « haut de page » disparaissent (elles cachaient la langue / le compte) */
html.mnav-open .site-header,
body:has(.mnav-toggle:checked) .site-header { z-index: 2000; }
html.mnav-open .cookie-fab, body:has(.mnav-toggle:checked) .cookie-fab,
html.mnav-open #ceres-totop, body:has(.mnav-toggle:checked) #ceres-totop { opacity: 0; visibility: hidden; pointer-events: none; }
body:has(.mnav-toggle:checked) { overflow: hidden; }
