/* ==========================================================================
   Page Produits (catalogue, fiche produit, panier)
   ========================================================================== */

.hero { background: var(--bleu); color: var(--blanc); }
.hero__inner { padding-top: 56px; padding-bottom: 48px; }
.hero__title { font-family: var(--font-titre); font-size: clamp(28px, 5vw, 42px); line-height: 1.1; margin: 0 0 16px; font-weight: 800; text-wrap: pretty; }
.hero__text { font-size: 17px; line-height: 1.6; max-width: 620px; margin: 0 0 12px; }
.hero__note { font-size: 13px; margin: 0 0 26px; font-style: italic; }

.catalog-search { display: flex; align-items: center; background: var(--creme); border-radius: 28px; padding: 11px 18px; gap: 10px; max-width: 560px; }
.catalog-search input { border: none; background: transparent; font-size: 15px; flex: 1; min-width: 0; color: var(--encre); }

/* --- Mise en page catalogue --- */
.section--catalog { padding-top: 40px; }
.catalog { display: flex; flex-wrap: wrap; gap: 20px 48px; align-items: flex-start; }
.catalog__aside { flex: 0 0 220px; position: sticky; top: 110px; display: flex; flex-direction: column; gap: 22px; }
.catalog__chips { display: none; }
.catalog__main { flex: 1 1 0; min-width: 0; }

.filter-group { display: flex; flex-direction: column; gap: 2px; }
.filter-group__title { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--rouge); margin: 0 0 6px 12px; }
.filter-btn { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; background: transparent; color: var(--encre); border: none; border-radius: 4px; padding: 8px 12px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .15s ease, color .15s ease; }
.filter-btn__count { font-size: 13px; font-weight: 500; color: #8a8f86; }
.filter-btn.is-active { background: var(--bleu); color: var(--blanc); }
.filter-btn.is-active .filter-btn__count { color: var(--blanc); }

.catalog__toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 20px; padding-bottom: 14px; border-bottom: 1px solid var(--sable); font-size: 15px; }
.catalog__avail { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.catalog__avail input { accent-color: var(--bleu); width: 16px; height: 16px; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.product-grid .card { flex: none; }
.card__body--catalog { padding: 16px 18px 18px; }
.card__cat { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--rouge); margin-bottom: 4px; }

.catalog__empty { background: var(--blanc); border: 1px solid var(--sable); border-radius: 8px; padding: 40px 24px; text-align: center; }
.catalog__empty-title { font-family: var(--font-titre); font-size: 19px; color: var(--bleu); margin: 0 0 6px; font-weight: 700; }
.catalog__empty-text { font-size: 15px; margin: 0 0 18px; }
.btn-card--inline { display: inline-flex; width: auto; padding: 10px 20px; font-size: 15px; }

/* --- Panier (tiroir) --- */
.drawer { position: fixed; inset: 0; background: rgba(14, 46, 63, .55); z-index: 100; display: flex; justify-content: flex-end; }
.drawer__panel { background: var(--creme); width: 100%; max-width: 440px; height: 100%; display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(14, 46, 63, .25); }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; background: var(--bleu); color: var(--blanc); }
.drawer__kicker { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.drawer__title { font-family: var(--font-titre); font-size: 22px; margin: 2px 0 0; }
.drawer__close { background: none; border: none; font-size: 20px; color: var(--blanc); cursor: pointer; padding: 8px; }
.drawer__pad { padding: 32px 24px; }
.drawer__text { font-size: 15px; line-height: 1.6; margin: 0 0 18px; }
.drawer__done-title { font-family: var(--font-titre); font-weight: 700; font-size: 20px; color: var(--bleu); margin-bottom: 6px; }
.drawer__list { flex: 1; overflow-y: auto; padding: 8px 24px; }
.drawer__foot { padding: 18px 24px 24px; border-top: 1px solid var(--sable); }
.drawer__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 8px; font-family: var(--font-titre); color: var(--bleu); }
.drawer__total span { font-size: 17px; font-weight: 700; }
.drawer__total strong { font-size: 20px; font-weight: 800; }
.drawer__small { font-size: 13px; line-height: 1.5; margin: 0 0 14px; }
.drawer__form { flex: 1; overflow-y: auto; padding: 20px 24px 24px; display: grid; gap: 14px; align-content: start; }
.drawer__back { justify-self: start; background: none; border: none; padding: 0; font-size: 13px; color: var(--bleu); font-weight: 600; cursor: pointer; }
.drawer__summary { display: flex; justify-content: space-between; align-items: baseline; background: var(--blanc); border: 1px solid var(--sable); border-radius: 6px; padding: 12px 14px; font-size: 15px; }
.drawer__summary strong { color: var(--bleu); }

.cart-line { display: flex; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--sable); }
.cart-line__info { min-width: 0; flex: 1; }
.cart-line__nom { font-family: var(--font-titre); font-weight: 700; font-size: 15px; color: var(--bleu); }
.cart-line__sub, .cart-line__detail { font-size: 13px; }
.cart-line__detail { margin-top: 2px; }
.cart-line__remove { background: none; border: none; padding: 0; margin-top: 6px; font-size: 13px; color: var(--encre); text-decoration: underline; cursor: pointer; }
.cart-line__side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.cart-line__total { font-size: 15px; font-weight: 700; white-space: nowrap; }
.cart-line__qty { display: flex; align-items: center; gap: 6px; }
.cart-line__btn { background: var(--blanc); border: 1px solid var(--sable-fonce); color: var(--bleu); font-size: 15px; font-weight: 700; width: 30px; height: 30px; border-radius: 4px; cursor: pointer; }
.cart-line__qty-value { min-width: 56px; text-align: center; font-size: 13px; font-weight: 700; white-space: nowrap; }

/* Formulaire clair (panier) */
.form-light__two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-light label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.form-light label span { font-weight: 400; }
.form-light input, .form-light select, .form-light textarea { width: 100%; border: 1px solid var(--sable-fonce); border-radius: 4px; padding: 10px 12px; font-size: 15px; background: var(--blanc); color: var(--encre); }
.form-light textarea { resize: vertical; }

/* Cases à cocher : conditions générales et nouvelles de la boutique */
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.45; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--bleu); flex-shrink: 0; }
.consent a { font-weight: 700; }

/* --- Fiche produit --- */
.product-modal { position: fixed; inset: 0; background: rgba(14, 46, 63, .6); z-index: 110; display: flex; align-items: center; justify-content: center; padding: 16px; }
.product-modal__box { position: relative; background: var(--creme); border-radius: 10px; overflow: hidden; width: 100%; max-width: 780px; max-height: calc(100vh - 32px); overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); box-shadow: 0 20px 50px rgba(14, 46, 63, .35); }
.product-modal__close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 36px; height: 36px; border-radius: 18px; background: var(--blanc); border: 1px solid var(--sable); color: var(--bleu); font-size: 16px; cursor: pointer; line-height: 1; }
.product-modal__media { min-height: 240px; }
.product-modal__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-modal__placeholder { width: 100%; height: 100%; min-height: 240px; display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center; background: #f1ebdc; color: #8a8f86; }
.product-modal__body { padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 14px; }
.product-modal__title { font-family: var(--font-titre); font-size: 24px; line-height: 1.2; margin: 0 40px 6px 0; color: var(--bleu); text-wrap: pretty; }
.product-modal__desc { font-size: 15px; line-height: 1.6; margin: 0; }
.product-modal__price { background: var(--blanc); border: 1px solid var(--sable); border-radius: 6px; padding: 12px 14px; }
.product-modal__price-main { font-size: 17px; font-weight: 700; color: var(--bleu); }
.product-modal__price-hint { font-size: 13px; margin-top: 2px; }
.product-modal__qty-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.product-modal__subtotal { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--sable); padding-top: 14px; font-size: 15px; }
.product-modal__subtotal strong { font-family: var(--font-titre); font-size: 22px; font-weight: 800; color: var(--bleu); }
.product-modal__small { font-size: 13px; line-height: 1.5; margin: 0; }

.stepper { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--blanc); border: 1px solid var(--sable-fonce); border-radius: 6px; padding: 4px; }
.stepper__btn { width: 44px; height: 44px; background: var(--creme); border: none; border-radius: 4px; color: var(--bleu); font-size: 20px; font-weight: 700; cursor: pointer; }
.stepper__value { font-family: var(--font-titre); font-size: 20px; font-weight: 700; color: var(--bleu); }
.presets { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.preset { background: var(--blanc); color: var(--bleu); border: 1px solid var(--sable); padding: 6px 12px; font-size: 13px; font-weight: 700; border-radius: 16px; cursor: pointer; }
.preset.is-active { background: var(--bleu); color: var(--blanc); border-color: var(--bleu); }

/* --- Toast --- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 120; display: flex; align-items: center; gap: 14px; background: var(--bleu); color: var(--blanc); border-radius: 6px; padding: 12px 16px; box-shadow: 0 10px 30px rgba(14, 46, 63, .3); font-size: 15px; max-width: calc(100vw - 32px); }
.toast__link { background: none; border: none; color: var(--blanc); font-weight: 700; text-decoration: underline; cursor: pointer; font-size: 15px; padding: 0; white-space: nowrap; }

@media (max-width: 1020px) {
  .catalog__aside { display: none; }
  .catalog__chips { display: flex; flex: 1 1 100%; min-width: 0; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
  .catalog__chips .chip { flex: 0 0 auto; white-space: nowrap; }
}
