/* ==========================================================================
   Boozeplace — feuille de style de base
   Jetons de conception, typographie, en-têtes, pied de page, composants communs.
   Contrastes vérifiés (WCAG AA, texte normal ≥ 4,5:1) :
   - anthracite sur vert #75B72A : 5,8:1 ; anthracite sur vert survol #69A625 : 4,8:1 ;
   - vert texte #3D6B12 sur blanc : 6,3:1 ; blanc sur anthracite : 14,3:1.
   Le blanc sur #75B72A (2,5:1) est proscrit pour du texte.
   ========================================================================== */

:root {
    --bp-green: #75B72A;
    --bp-green-hover: #69A625;
    --bp-green-text: #3D6B12;
    --bp-green-soft: #EEF6E4;
    --bp-anthracite: #2B2B2B;
    --bp-anthracite-hover: #3A3A3A;
    --bp-white: #FFFFFF;
    --bp-gray-50: #F7F7F5;
    --bp-gray-100: #EFEFEC;
    --bp-gray-200: #E2E2DE;
    --bp-gray-400: #A3A39D;
    --bp-gray-600: #5F5F5A;
    --bp-danger: #B42318;

    --bp-font: "Inter Tight", Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
    --bp-radius: 6px;
    --bp-radius-lg: 10px;
    --bp-shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 4px 16px rgb(0 0 0 / 6%);
    --bp-container: 1280px;
    --bp-gutter: 16px;
    --bp-focus: 0 0 0 3px rgb(117 183 42 / 45%);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--bp-font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--bp-anthracite);
    background: var(--bp-gray-50);
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
h1:focus, h1:focus-visible { outline: none; box-shadow: none; }

a { color: var(--bp-green-text); }
a:hover { color: var(--bp-anthracite); }

:focus-visible { outline: none; box-shadow: var(--bp-focus); border-radius: var(--bp-radius); }

/* Chiffres tabulaires pour prix, quantités et dates. */
.bp-num, table, input[type="number"] { font-variant-numeric: tabular-nums; }

.bp-container {
    width: 100%;
    max-width: var(--bp-container);
    margin-inline: auto;
    padding-inline: var(--bp-gutter);
}

.bp-main { flex: 1 0 auto; padding-block: 24px; }
.bp-muted { color: var(--bp-gray-600); }

.bp-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.bp-skip-link {
    position: absolute; left: 8px; top: -48px; z-index: 100;
    padding: 8px 12px; background: var(--bp-anthracite); color: var(--bp-white);
    border-radius: var(--bp-radius);
}
.bp-skip-link:focus { top: 8px; color: var(--bp-white); }

/* --- Logo (provisoire) --------------------------------------------------- */
.bp-logo { display: inline-flex; align-items: center; text-decoration: none; color: var(--bp-anthracite); }
.bp-logo__mark { font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; }
.bp-logo__mark span { color: var(--bp-green-text); }

/* --- Icônes et pictogrammes ---------------------------------------------- */
.bp-icon { flex: none; vertical-align: middle; }

.bp-sales-unit {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px;
    font-size: .8rem; font-weight: 600;
    border-radius: 999px;
    background: var(--bp-gray-100);
    color: var(--bp-anthracite);
}
.bp-sales-unit--case { background: var(--bp-green-soft); color: var(--bp-green-text); }

/* --- Boutons ------------------------------------------------------------- */
.bp-button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 40px; padding: 8px 18px;
    font: inherit; font-weight: 600; text-decoration: none;
    color: var(--bp-anthracite); background: var(--bp-green);
    border: 1px solid transparent; border-radius: var(--bp-radius);
    cursor: pointer; transition: background-color .15s ease;
}
.bp-button:hover { background: var(--bp-green-hover); color: var(--bp-anthracite); }
.bp-button--secondary { background: var(--bp-white); border-color: var(--bp-gray-200); }
.bp-button--secondary:hover { background: var(--bp-gray-100); }

/* --- Sélecteur de langue ------------------------------------------------- */
.bp-lang { display: inline-flex; gap: 2px; margin: 0; }
.bp-lang__option {
    min-width: 36px; min-height: 32px; padding: 4px 8px;
    font: inherit; font-size: .8rem; font-weight: 600;
    color: var(--bp-gray-600); background: transparent;
    border: 0; border-radius: var(--bp-radius); cursor: pointer;
}
.bp-lang__option:hover { color: var(--bp-anthracite); background: var(--bp-gray-100); }
.bp-lang__option[aria-pressed="true"] { color: var(--bp-anthracite); background: var(--bp-green); }

/* --- En-têtes ------------------------------------------------------------ */
.bp-header { background: var(--bp-white); border-bottom: 1px solid var(--bp-gray-200); }
.bp-header__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.bp-header__actions { display: flex; align-items: center; gap: 12px; }
.bp-header__link { color: var(--bp-anthracite); text-decoration: none; font-weight: 500; }
.bp-header__link:hover { color: var(--bp-green-text); }

/* Menu du client : <details> natif, utilisable sans JavaScript. */
.bp-user-menu { position: relative; }
.bp-user-menu__trigger {
    display: flex; align-items: center; gap: 6px;
    min-height: 36px; padding: 4px 8px;
    list-style: none; cursor: pointer; border-radius: var(--bp-radius);
}
.bp-user-menu__trigger::-webkit-details-marker { display: none; }
.bp-user-menu__trigger:hover { background: var(--bp-gray-100); }
.bp-user-menu__name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.bp-user-menu__list {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 20;
    min-width: 200px; margin: 0; padding: 6px; list-style: none;
    background: var(--bp-white); border: 1px solid var(--bp-gray-200);
    border-radius: var(--bp-radius-lg); box-shadow: var(--bp-shadow);
}
.bp-user-menu__list form { margin: 0; }
.bp-user-menu__list a, .bp-user-menu__list button {
    display: block; width: 100%; padding: 8px 10px;
    font: inherit; text-align: left; text-decoration: none;
    color: var(--bp-anthracite); background: none; border: 0;
    border-radius: var(--bp-radius); cursor: pointer;
}
.bp-user-menu__list a:hover, .bp-user-menu__list button:hover { background: var(--bp-gray-100); }

/* Ligne anthracite. */
.bp-header__bar { background: var(--bp-anthracite); color: var(--bp-white); }
.bp-header__bar-inner { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.bp-bar__catalog {
    padding: 6px 14px; font-weight: 600; text-decoration: none;
    color: var(--bp-anthracite); background: var(--bp-green); border-radius: var(--bp-radius);
}
.bp-bar__catalog:hover { color: var(--bp-anthracite); background: var(--bp-green-hover); }
.bp-bar__action {
    position: relative; display: inline-flex; align-items: center; gap: 6px;
    min-height: 40px; padding: 6px 10px;
    color: var(--bp-white); text-decoration: none; font-size: .9rem; white-space: nowrap;
    border-radius: var(--bp-radius);
}
.bp-bar__action:hover { color: var(--bp-white); background: var(--bp-anthracite-hover); }

.bp-badge {
    position: absolute; top: 0; right: 0;
    min-width: 20px; height: 20px; padding: 0 5px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums;
    color: var(--bp-anthracite); background: var(--bp-green); border-radius: 999px;
}

/* Recherche extensible : s'élargit à la prise de focus. */
.bp-search { position: relative; flex: 1 1 auto; max-width: 420px; transition: max-width .2s ease; margin: 0; }
.bp-search:focus-within { max-width: 720px; }
.bp-search__icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--bp-gray-600); pointer-events: none; }
.bp-search__input {
    width: 100%; height: 38px; padding: 6px 12px 6px 36px;
    font: inherit; color: var(--bp-anthracite);
    background: var(--bp-white); border: 1px solid transparent; border-radius: var(--bp-radius);
}
.bp-search__input:focus { outline: none; box-shadow: var(--bp-focus); }

/* --- Pied de page -------------------------------------------------------- */
.bp-footer { flex-shrink: 0; margin-top: 32px; background: var(--bp-white); border-top: 1px solid var(--bp-gray-200); }
.bp-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 24px; }

/* --- Accueil public ------------------------------------------------------ */
.bp-hero {
    display: flex; align-items: center; min-height: 280px; margin-top: -24px;
    color: var(--bp-white);
    /* Photo du bar administrable au lot L2 ; dégradé anthracite en attendant. */
    background: linear-gradient(135deg, #1E1E1E 0%, #3A3A3A 100%);
    background-size: cover; background-position: center;
}
.bp-hero__title { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 700; text-align: center; width: 100%; text-shadow: 0 2px 12px rgb(0 0 0 / 40%); }
.bp-home__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: -56px; }

.bp-card {
    padding: 24px; background: var(--bp-white);
    border: 1px solid var(--bp-gray-200); border-radius: var(--bp-radius-lg); box-shadow: var(--bp-shadow);
}
.bp-card__title { text-align: center; }
.bp-card__intro { text-align: center; color: var(--bp-gray-600); margin: 0; }

/* --- Pages de message et tableaux --------------------------------------- */
.bp-message-page { max-width: 640px; padding-block: 48px; }

.bp-table { border-collapse: collapse; background: var(--bp-white); }
.bp-table th, .bp-table td { padding: 8px 12px; border-bottom: 1px solid var(--bp-gray-200); text-align: left; }
.bp-table td.bp-num { text-align: right; }

/* --- Aperçu de développement -------------------------------------------- */
.bp-preview { margin-bottom: 32px; }
.bp-preview__frame { border: 1px dashed var(--bp-gray-400); }

/* --- Formulaires (lot L2) ------------------------------------------------ */
.bp-narrow { max-width: 480px; }
.bp-form { display: grid; gap: 14px; margin: 16px 0 0; }
.bp-field { display: grid; gap: 6px; }
.bp-field label { font-weight: 600; font-size: .9rem; }
.bp-input {
    width: 100%; min-height: 42px; padding: 8px 12px;
    font: inherit; color: var(--bp-anthracite);
    background: var(--bp-white); border: 1px solid var(--bp-gray-400); border-radius: var(--bp-radius);
}
.bp-input:focus { outline: none; border-color: var(--bp-green-text); box-shadow: var(--bp-focus); }
.bp-button--block { width: 100%; }
.bp-form__links { margin: 4px 0 0; text-align: center; font-size: .9rem; }
.bp-link-button {
    padding: 6px 8px; font: inherit; color: var(--bp-anthracite);
    background: none; border: 0; border-radius: var(--bp-radius); cursor: pointer;
}
.bp-link-button:hover { background: var(--bp-gray-100); }
.bp-header__actions form { margin: 0; }

.bp-alert { margin: 0; padding: 10px 14px; border-radius: var(--bp-radius); border: 1px solid; }
.bp-alert--error { color: var(--bp-danger); background: #FEF3F2; border-color: #FECDCA; }
.bp-alert--success { color: var(--bp-green-text); background: var(--bp-green-soft); border-color: #C9E3AB; }
.bp-alert--info { color: var(--bp-anthracite); background: var(--bp-gray-100); border-color: var(--bp-gray-200); }
ul.bp-alert { padding-left: 32px; }

.bp-steps { padding-left: 20px; display: grid; gap: 12px; }
.bp-qr { width: 200px; margin: 12px 0; }
.bp-qr svg { width: 100%; height: auto; display: block; }
.bp-key { font-size: 1rem; letter-spacing: .05em; padding: 4px 8px; background: var(--bp-gray-100); border-radius: var(--bp-radius); }
.bp-codes { columns: 2; padding-left: 20px; font-family: ui-monospace, Consolas, monospace; }

/* --- Contenus administrables -------------------------------------------- */
.bp-prose p { margin: 0 0 .6em; }
.bp-prose p:last-child { margin-bottom: 0; }
.bp-prose ul, .bp-prose ol { margin: 0 0 .6em; padding-left: 20px; }
.bp-home__text { margin-top: 32px; max-width: 880px; }
.bp-hero--image {
    background-image: linear-gradient(rgb(0 0 0 / 45%), rgb(0 0 0 / 45%)), url('/media/accueil');
    background-size: cover; background-position: center;
}

.bp-footer__brand { display: grid; gap: 4px; }
.bp-footer__contact { font-size: .9rem; color: var(--bp-gray-600); }
.bp-footer__links { display: flex; align-items: center; gap: 16px; }

/* --- Espace client ------------------------------------------------------- */
.bp-section-title { margin-top: 24px; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bp-gray-600); }
.bp-category-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px;
    margin: 0; padding: 0; list-style: none;
}
.bp-category-card {
    display: block; padding: 18px 16px; font-weight: 600; text-decoration: none;
    color: var(--bp-anthracite); background: var(--bp-white);
    border: 1px solid var(--bp-gray-200); border-radius: var(--bp-radius-lg);
}
.bp-category-card:hover { border-color: var(--bp-green); color: var(--bp-anthracite); }

/* --- Suggestions de recherche (en-tête) ---------------------------------- */
.bp-suggestions {
    position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; right: 0; max-height: 70vh; overflow-y: auto;
    margin: 0; padding: 6px 0; list-style: none; color: var(--bp-anthracite); background: var(--bp-white);
    border: 1px solid var(--bp-gray-200); border-radius: var(--bp-radius-lg); box-shadow: var(--bp-shadow);
}
.bp-suggestions__link {
    display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px;
    padding: 6px 12px; color: inherit; text-decoration: none;
}
.bp-suggestions__item[aria-selected="true"] .bp-suggestions__link, .bp-suggestions__link:hover { background: var(--bp-green-soft); color: inherit; }
.bp-suggestions__media { display: grid; place-items: center; width: 40px; height: 40px; background: var(--bp-white); }
.bp-suggestions__media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bp-suggestions__text { display: grid; min-width: 0; }
.bp-suggestions__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-suggestions__meta { font-size: .8rem; color: var(--bp-gray-600); }
.bp-suggestions__price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bp-suggestions__all { border-top: 1px solid var(--bp-gray-200); margin-top: 4px; }
.bp-suggestions__all .bp-suggestions__link { display: block; font-weight: 600; color: var(--bp-green-text); }
.bp-suggestions__empty { padding: 8px 12px; color: var(--bp-gray-600); }

/* --- Catalogue ----------------------------------------------------------- */
.bp-catalog { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.bp-catalog__query { margin: -4px 0 16px; color: var(--bp-gray-600); }
.bp-filters {
    display: grid; gap: 14px; padding: 16px; background: var(--bp-white);
    border: 1px solid var(--bp-gray-200); border-radius: var(--bp-radius-lg);
}
.bp-filters select.bp-input { width: 100%; }
.bp-range { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.bp-range legend { grid-column: 1 / -1; padding: 0; margin-bottom: 6px; font-weight: 600; font-size: .9rem; }
.bp-range .bp-input { width: 100%; min-width: 0; }
.bp-filters__clear { justify-self: start; font-size: .9rem; }

.bp-catalog__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 16px; }
.bp-catalog__count { margin: 0 auto 0 0; color: var(--bp-gray-600); }
.bp-catalog__sort { display: flex; align-items: center; gap: 8px; }
.bp-catalog__sort label { font-weight: 600; font-size: .9rem; }
.bp-view-switch { display: inline-flex; border: 1px solid var(--bp-gray-200); border-radius: var(--bp-radius); background: var(--bp-white); }
.bp-view-switch a { display: grid; place-items: center; width: 38px; height: 36px; color: var(--bp-gray-600); }
.bp-view-switch a:hover { color: var(--bp-anthracite); background: var(--bp-gray-100); }
.bp-view-switch a[aria-current="page"] { color: var(--bp-anthracite); background: var(--bp-green); }

.bp-article-grid, .bp-article-list { margin: 0; padding: 0; list-style: none; }
.bp-article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.bp-article-list { display: grid; gap: 8px; }

.bp-article-card, .bp-article-row {
    height: 100%; background: var(--bp-white); border: 1px solid var(--bp-gray-200); border-radius: var(--bp-radius-lg);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.bp-article-card:hover, .bp-article-row:hover { border-color: var(--bp-green); box-shadow: var(--bp-shadow); }
.bp-article-card { display: flex; flex-direction: column; padding: 12px; gap: 10px; }
.bp-article-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 8px 16px 8px 8px; }
.bp-article__media { display: block; }
.bp-article-card .bp-article-image { aspect-ratio: 1; }
.bp-article-row .bp-article-image { width: 72px; height: 72px; }
.bp-article__body { display: grid; gap: 2px; min-width: 0; }
.bp-article-card .bp-article__body { flex: 1 0 auto; align-content: start; }
.bp-article__brand { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bp-gray-600); }
.bp-article__name { margin: 0; font-size: 1rem; font-weight: 600; line-height: 1.3; }
.bp-article__name a { color: var(--bp-anthracite); text-decoration: none; }
.bp-article__name a:hover { color: var(--bp-green-text); text-decoration: underline; }
.bp-article__specs { margin: 0; font-size: .85rem; color: var(--bp-gray-600); }
.bp-article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 0; }
.bp-article__reference { font-size: .8rem; color: var(--bp-gray-600); }
.bp-article__pricing { display: grid; gap: 2px; }
.bp-article-row .bp-article__pricing { text-align: right; }
.bp-article__price { margin: 0; font-size: 1.1rem; font-weight: 700; }
.bp-article__case { margin: 0; font-size: .85rem; color: var(--bp-gray-600); }

.bp-article-image { position: relative; display: grid; place-items: center; overflow: hidden; background: var(--bp-white); border-radius: var(--bp-radius); }
.bp-article-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.bp-article-image__placeholder { color: var(--bp-gray-400); }
.bp-article-image--large { aspect-ratio: 1; border: 1px solid var(--bp-gray-200); border-radius: var(--bp-radius-lg); }

.bp-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 24px; }

/* --- Fiche article ------------------------------------------------------- */
.bp-back-link { margin: 0 0 16px; }
.bp-back-link a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 500; }
.bp-article-detail { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: start; }
.bp-article-detail__thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.bp-article-detail__thumbs .bp-article-image { aspect-ratio: 1; border: 1px solid var(--bp-gray-200); }
.bp-article-detail__reference { margin: 0 0 12px; color: var(--bp-gray-600); }
.bp-article-detail__price { margin: 0; font-size: 1.5rem; font-weight: 700; }
.bp-article-detail__description { white-space: pre-line; max-width: 70ch; }
.bp-specs {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1px; margin: 0;
    background: var(--bp-white); border: 1px solid var(--bp-gray-200); border-radius: var(--bp-radius-lg); overflow: hidden;
}
/* Séparateurs tracés dans l'espacement par le contour des cases : une dernière ligne incomplète reste blanche. */
.bp-specs > div { padding: 10px 12px; outline: 1px solid var(--bp-gray-200); }
.bp-specs dt { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bp-gray-600); }
.bp-specs dd { margin: 2px 0 0; font-weight: 600; }

/* --- Ajout au panier ----------------------------------------------------- */
.bp-add-to-cart { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; }
.bp-qty { width: 72px; padding-inline: 8px; text-align: right; }
.bp-add-to-cart__unit { font-size: .8rem; color: var(--bp-gray-600); white-space: nowrap; }
.bp-add-to-cart .bp-button { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.bp-article-detail__main .bp-add-to-cart { margin: 16px 0 8px; }
.bp-article-detail__main .bp-add-to-cart .bp-button { margin-left: 0; }

.bp-toast {
    position: fixed; z-index: 100; left: 50%; bottom: 24px; max-width: min(560px, calc(100vw - 32px));
    padding: 12px 16px; color: var(--bp-white); background: var(--bp-anthracite); border-radius: var(--bp-radius-lg);
    box-shadow: var(--bp-shadow); transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}
.bp-toast:empty { display: none; }
.bp-toast--visible { opacity: 1; transform: translate(-50%, 0); }
.bp-toast--error { background: var(--bp-danger); }

/* --- Panier -------------------------------------------------------------- */
.bp-empty { display: grid; justify-items: start; gap: 12px; padding: 24px; background: var(--bp-white); border: 1px solid var(--bp-gray-200); border-radius: var(--bp-radius-lg); }
.bp-empty p { margin: 0; }
.bp-cart { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.bp-cart > * { min-width: 0; }
.bp-cart-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bp-cart-line {
    display: grid; grid-template-columns: 64px minmax(0, 1fr) 130px 200px 120px 90px; align-items: center; gap: 12px 16px;
    padding: 10px 16px 10px 10px; background: var(--bp-white); border: 1px solid var(--bp-gray-200); border-radius: var(--bp-radius-lg);
}
.bp-cart-line--unavailable { grid-template-columns: 64px minmax(0, 1fr) auto; background: var(--bp-gray-50); }
.bp-cart-line--unavailable .bp-cart-line__image { opacity: .5; }
.bp-cart-line__image { width: 64px; height: 64px; }
.bp-cart-line__info { display: grid; gap: 2px; min-width: 0; }
.bp-cart-line__name { margin: 0; font-weight: 600; }
.bp-cart-line__name a { color: var(--bp-anthracite); text-decoration: none; }
.bp-cart-line__name a:hover { color: var(--bp-green-text); text-decoration: underline; }
.bp-cart-line__notice { margin: 4px 0 0; padding: 4px 8px; font-size: .85rem; background: #FFF6DB; border-radius: var(--bp-radius); }
.bp-cart-line__notice--error { color: var(--bp-danger); background: #FEF3F2; }
.bp-cart-line__label { display: block; white-space: nowrap; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--bp-gray-600); }
.bp-cart-line__price, .bp-cart-line__total { margin: 0; text-align: right; white-space: nowrap; }
.bp-cart-line__total { font-weight: 700; }
.bp-cart-line__quantity { margin: 0; }
.bp-cart-line__qty { display: flex; align-items: center; gap: 6px; }
.bp-cart-line__unit { font-size: .8rem; color: var(--bp-gray-600); white-space: nowrap; }
.bp-cart-line__remove { margin: 0; }
.bp-cart__clear { margin: 16px 0 0; }

.bp-cart__summary { position: sticky; top: 16px; padding: 16px; background: var(--bp-white); border: 1px solid var(--bp-gray-200); border-radius: var(--bp-radius-lg); }
.bp-totals { display: grid; gap: 6px; margin: 0; }
.bp-totals > div { display: flex; justify-content: space-between; gap: 12px; }
.bp-totals dt { color: var(--bp-gray-600); }
.bp-totals dd { margin: 0; font-weight: 600; white-space: nowrap; }
.bp-totals__reference { padding-top: 6px; border-top: 1px solid var(--bp-gray-200); }
.bp-totals__grand { margin-top: 6px; padding-top: 10px; border-top: 2px solid var(--bp-anthracite); font-size: 1.15rem; }
.bp-totals__grand dt, .bp-totals__grand dd { color: var(--bp-anthracite); font-weight: 700; }
.bp-cart__hint { margin: 14px 0 0; padding: 8px 10px; font-size: .9rem; background: var(--bp-gray-100); border-radius: var(--bp-radius); }
.bp-cart__hint--reached { color: var(--bp-green-text); background: var(--bp-green-soft); }
.bp-cart__delivery { margin: 14px 0 0; font-size: .9rem; }
.bp-reminders { display: grid; gap: 4px; margin: 0 0 16px; padding: 12px 16px; background: var(--bp-green-soft); border-radius: var(--bp-radius-lg); }
.bp-reminders p { margin: 0; }

/* --- Validation de commande et commandes --------------------------------- */
.bp-cart__checkout { margin-top: 16px; }
.bp-checkout { margin: 0; padding: 20px; background: var(--bp-white); border: 1px solid var(--bp-gray-200); border-radius: var(--bp-radius-lg); }
.bp-checkout__block { margin: 0; padding: 0; border: 0; }
.bp-checkout__block legend { padding: 0; margin-bottom: 6px; font-weight: 600; font-size: .9rem; }
.bp-checkout__address { font-style: normal; line-height: 1.5; }
.bp-checkout__note { margin: 4px 0 0; font-size: .85rem; }
.bp-checkout__date { max-width: 220px; }
.bp-check { display: flex; align-items: flex-start; gap: 10px; }
.bp-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--bp-green-text); }
.bp-checkout__lines { display: grid; gap: 6px; margin: 0 0 12px; padding: 0 0 12px; list-style: none; border-bottom: 1px solid var(--bp-gray-200); font-size: .9rem; }
.bp-checkout__lines li { display: flex; justify-content: space-between; gap: 12px; }
.bp-checkout__lines .bp-muted { display: block; font-size: .8rem; }

.bp-table-wrap { overflow-x: auto; background: var(--bp-white); border: 1px solid var(--bp-gray-200); border-radius: var(--bp-radius-lg); }
.bp-table-wrap .bp-table { width: 100%; }
.bp-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bp-gray-600); white-space: nowrap; }
.bp-table th.bp-num { text-align: right; }
.bp-table th a { color: inherit; }
.bp-table th[aria-sort="ascending"] a::after { content: " ▲"; }
.bp-table th[aria-sort="descending"] a::after { content: " ▼"; }
.bp-order__facts { margin-bottom: 16px; }
.bp-specs > .bp-specs__wide { grid-column: span 2; }
.bp-order__confirmed { display: grid; gap: 2px; margin-bottom: 16px; }
.bp-order__comment { margin: 0 0 16px; }
.bp-order__lines .bp-article__reference { display: block; }
.bp-order__reorder { margin: 16px 0 0; }
.bp-order__report { margin-top: 12px; }
.bp-order__report p { margin: 0 0 4px; }
.bp-order__report ul { margin: 0 0 4px; padding-left: 20px; }

/* --- Excel --------------------------------------------------------------- */
.bp-excel { max-width: 760px; }
.bp-messages { display: grid; gap: 4px; margin: 0; padding: 12px 16px 12px 32px; border-radius: var(--bp-radius-lg); }
.bp-messages--warning { background: #FFF6DB; }
.bp-messages--error { color: var(--bp-danger); background: #FEF3F2; }

/* --- Compte et contact --------------------------------------------------- */
.bp-account { display: grid; gap: 20px; max-width: 880px; }
.bp-account h2 { margin-bottom: 8px; }
.bp-account .bp-specs { margin-top: 12px; }
.bp-account .bp-form > .bp-button, .bp-checkout.bp-form > .bp-button { justify-self: start; }
.bp-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* --- Administration ------------------------------------------------------ */
.bp-admin-badge { padding: 2px 10px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--bp-gray-100); border-radius: 999px; }
.bp-admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; min-height: 52px; padding-block: 6px; }
.bp-admin-nav__link { padding: 6px 10px; color: var(--bp-white); text-decoration: none; font-weight: 500; border-radius: var(--bp-radius); }
.bp-admin-nav__link:hover { color: var(--bp-white); background: var(--bp-anthracite-hover); }
.bp-admin-nav__link[aria-current="page"] { color: var(--bp-anthracite); background: var(--bp-green); }
.bp-admin-section { margin-bottom: 20px; }
.bp-admin-section h2 { margin-bottom: 8px; }
.bp-admin-section .bp-form > .bp-button, .bp-admin-section.bp-form > .bp-button { justify-self: start; }
.bp-admin-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; align-items: start; }
.bp-admin-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 0 0 12px; }
.bp-admin-filters .bp-field { min-width: 180px; }
.bp-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bp-admin-actions form { margin: 0; }
.bp-admin-hero { display: block; max-width: 420px; max-height: 220px; object-fit: cover; margin-bottom: 12px; border-radius: var(--bp-radius); }
.bp-content-field { margin: 0; }
.bp-content-field legend { padding: 0 4px; font-weight: 700; }
.bp-content-field__languages { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bp-content-field__preview { margin-top: 10px; }
.bp-content-field__preview .bp-prose { padding: 10px; background: var(--bp-gray-50); border-radius: var(--bp-radius); }
.bp-closures { display: grid; gap: 4px; margin: 0 0 12px; padding: 0; list-style: none; }
.bp-closures li { display: flex; align-items: center; gap: 12px; }
.bp-closures form { margin: 0 0 0 auto; }
.bp-message-body { white-space: pre-line; margin-bottom: 12px; }
.bp-view-tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.bp-view-tabs a { padding: 6px 12px; text-decoration: none; color: var(--bp-anthracite); border: 1px solid var(--bp-gray-200); border-radius: var(--bp-radius); background: var(--bp-white); }
.bp-view-tabs a[aria-current="page"] { background: var(--bp-green); border-color: var(--bp-green); }

.bp-dashboard { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.bp-dashboard a { display: grid; gap: 4px; height: 100%; padding: 16px; color: var(--bp-gray-600); text-decoration: none; background: var(--bp-white); border: 1px solid var(--bp-gray-200); border-radius: var(--bp-radius-lg); }
.bp-dashboard a:hover { border-color: var(--bp-green); }
.bp-dashboard__value { font-size: 1.6rem; font-weight: 700; color: var(--bp-anthracite); }

.bp-status { display: inline-block; padding: 1px 8px; font-size: .78rem; font-weight: 600; border-radius: 999px; background: var(--bp-gray-100); color: var(--bp-anthracite); white-space: nowrap; }
.bp-status--active, .bp-status--completed, .bp-status--acknowledged { background: var(--bp-green-soft); color: var(--bp-green-text); }
.bp-status--invited, .bp-status--running, .bp-status--received, .bp-status--exported { background: #FFF6DB; color: #7A5A00; }
.bp-status--disabled, .bp-status--failed, .bp-status--rejected { background: #FEF3F2; color: var(--bp-danger); }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 1023px) {
    .bp-bar__label { display: none; }
    .bp-catalog { grid-template-columns: 1fr; }
    .bp-filters { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); align-items: end; }
    .bp-cart { grid-template-columns: 1fr; }
    .bp-cart__summary { position: static; }
    .bp-cart-line { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "image info remove" "image price price" "image quantity quantity" "image total total"; }
    .bp-cart-line__image { grid-area: image; align-self: start; }
    .bp-cart-line__info { grid-area: info; }
    .bp-cart-line__remove { grid-area: remove; align-self: start; }
    .bp-cart-line__price { grid-area: price; text-align: left; display: flex; gap: 8px; align-items: baseline; }
    .bp-cart-line__quantity { grid-area: quantity; }
    .bp-cart-line__total { grid-area: total; text-align: left; display: flex; gap: 8px; align-items: baseline; }
    .bp-cart-line__unit { white-space: normal; }
    .bp-cart-line--unavailable { grid-template-areas: "image info remove"; }
}

@media (max-width: 767px) {
    .bp-content-field__languages { grid-template-columns: 1fr; }
    .bp-admin-columns { grid-template-columns: 1fr; }
    .bp-filters { grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; }
    .bp-filters .bp-field label, .bp-range legend { font-size: .8rem; }
    .bp-range { gap: 4px; }
    .bp-range .bp-input { padding-inline: 8px; }
    .bp-filters__clear { grid-column: 1 / -1; }
    .bp-catalog { gap: 16px; }
    .bp-article-detail { grid-template-columns: 1fr; gap: 20px; }
    .bp-article-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .bp-article-row { grid-template-columns: 56px minmax(0, 1fr); }
    .bp-article-row .bp-article-image { width: 56px; height: 56px; }
    .bp-article-row .bp-article__pricing { grid-column: 2; text-align: left; }
}

@media (max-width: 767px) {
    .bp-header__top { min-height: 56px; }
    .bp-header__actions { gap: 4px; }
    .bp-user-menu__name { display: none; }
    .bp-header__bar-inner { gap: 4px; }
    .bp-bar__catalog { padding: 6px 10px; }
    .bp-search, .bp-search:focus-within { max-width: none; }
    .bp-hero { min-height: 200px; }
    .bp-home__cards { margin-top: 24px; }
}

/* --- Interface d'erreur Blazor ------------------------------------------ */
#blazor-error-ui {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
    padding: 12px 16px; background: #FFF4CC; box-shadow: 0 -1px 4px rgb(0 0 0 / 15%);
}
#blazor-error-ui .dismiss { float: right; background: none; border: 0; font-size: 1.2rem; cursor: pointer; }

.blazor-error-boundary { padding: 16px; color: var(--bp-white); background: var(--bp-danger); }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
