/* ==========================================================================
   Catalogue en ligne — base commune des modèles modernes (eclat, atelier, table, pulse)
   Chargé après bootstrap.min.css (3.x) : les règles ci-dessous redéfinissent l'habillage
   des composants Bootstrap utilisés par les pages internes (panier, devis, paiement, connexion…)
   et stylent les composants « cm-* » des partiels modernes.
   Les variables --cm-* sont surchargées par <slug>.css puis par la route CSS du catalogue
   (couleur d'accent et police choisies par le pro).
   ========================================================================== */

:root {
	--cm-accent: #8c6a4a;
	--cm-accent-hover: #74573b;
	--cm-accent-soft: #f1ebe4;
	--cm-on-accent: #ffffff;
	--cm-ground: #ffffff;
	--cm-surface: #ffffff;
	--cm-surface-2: #f6f4f0;
	--cm-ink: #1c1b19;
	--cm-muted: #6b655c;
	--cm-line: #e8e4de;
	--cm-ok: #1e6b3a;
	--cm-ok-bg: #e3f3e8;
	--cm-ko: #9a2e22;
	--cm-ko-bg: #fbe9e7;
	--cm-radius: 16px;
	--cm-radius-sm: 10px;
	--cm-radius-pill: 999px;
	--cm-font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--cm-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--cm-maxw: 1280px;
	--cm-gutter: 24px;
	--cm-header-h: 72px;
	--cm-card-ratio: 4 / 5;
	--cm-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; }
body.theme-modern {
	margin: 0;
	background: var(--cm-ground);
	color: var(--cm-ink);
	font-family: var(--cm-font-body);
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}
.theme-modern h1, .theme-modern h2, .theme-modern h3, .theme-modern h4, .theme-modern h5 {
	font-family: var(--cm-font-display);
	color: var(--cm-ink);
	font-weight: 600;
	line-height: 1.15;
	margin: 0 0 .5em;
}
.theme-modern h1 { font-size: 34px; }
.theme-modern h2 { font-size: 26px; }
.theme-modern h3 { font-size: 20px; }
.theme-modern h4 { font-size: 17px; }
.theme-modern p { margin: 0 0 1em; }
/* :where() garde la spécificité à 0,0,1 : les composants (.cm-btn, .cm-card__cta…) gardent la main sur la couleur des liens */
:where(.theme-modern) a { color: var(--cm-ink); text-decoration: none; transition: color .15s ease, opacity .15s ease; }
:where(.theme-modern) a:hover, :where(.theme-modern) a:focus { color: var(--cm-accent-hover); text-decoration: none; }
.theme-modern img { max-width: 100%; height: auto; }
.theme-modern hr { border-top: 1px solid var(--cm-line); margin: 18px 0; }
.theme-modern label { font-weight: 600; color: var(--cm-ink); }
.theme-modern .obligatoire { color: var(--cm-ko); }
.theme-modern *:focus-visible { outline: 2px solid var(--cm-accent); outline-offset: 2px; }

.cm-container { max-width: var(--cm-maxw); margin: 0 auto; padding: 0 var(--cm-gutter); }
.cm-skip { position: absolute; left: -9999px; top: 8px; background: var(--cm-ink); color: var(--cm-ground); padding: 8px 12px; border-radius: 6px; z-index: 2000; }
.cm-skip:focus { left: 8px; }
.cm-page { min-height: 60vh; }
.cm-flashes { padding-top: 16px; }
.cm-alert { border-radius: var(--cm-radius-sm); border: 0; }

/* Conteneur des pages internes (Bootstrap) */
.theme-modern #main-container.container,
.theme-modern .container { width: auto; max-width: var(--cm-maxw); padding-left: var(--cm-gutter); padding-right: var(--cm-gutter); }
.theme-modern #main-container { padding-top: 24px; padding-bottom: 56px; }
.theme-modern .catalogue-main { float: none; width: 100%; }

/* --------------------------------------------------------------------------
   Boutons (cm-btn + remapping Bootstrap)
   -------------------------------------------------------------------------- */
.cm-btn,
.theme-modern .btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 10px 20px;
	border-radius: var(--cm-radius-sm); border: 1px solid transparent;
	font-family: var(--cm-font-body); font-size: 14px; font-weight: 600; line-height: 1.2;
	cursor: pointer; text-decoration: none; white-space: normal;
	transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
	box-shadow: none; text-shadow: none;
}
.cm-btn--primary,
.theme-modern .btn-primary, .theme-modern .btn-cart, .theme-modern .btn-main, .theme-modern .btn-success, .theme-modern .btn-info {
	background: var(--cm-accent); border-color: var(--cm-accent); color: var(--cm-on-accent);
}
.cm-btn--primary:hover, .cm-btn--primary:focus,
.theme-modern .btn-primary:hover, .theme-modern .btn-primary:focus, .theme-modern .btn-cart:hover, .theme-modern .btn-main:hover, .theme-modern .btn-success:hover, .theme-modern .btn-info:hover,
.theme-modern .btn-primary:active, .theme-modern .btn-success:active {
	background: var(--cm-accent-hover); border-color: var(--cm-accent-hover); color: var(--cm-on-accent);
}
.cm-btn--ghost,
.theme-modern .btn-default, .theme-modern .btn-link {
	background: var(--cm-surface); border-color: var(--cm-ink); color: var(--cm-ink);
}
.cm-btn--ghost:hover, .cm-btn--ghost:focus,
.theme-modern .btn-default:hover, .theme-modern .btn-default:focus, .theme-modern .btn-default:active {
	background: var(--cm-ink); border-color: var(--cm-ink); color: var(--cm-ground);
}
.theme-modern .btn-danger { background: var(--cm-ko-bg); border-color: var(--cm-ko-bg); color: var(--cm-ko); }
.theme-modern .btn-danger:hover { background: var(--cm-ko); color: #fff; }
.cm-btn--sm, .theme-modern .btn-sm, .theme-modern .btn-xs { min-height: 36px; padding: 6px 14px; font-size: 13px; }
.theme-modern .btn-lg { min-height: 48px; font-size: 15px; }
.theme-modern .btn-block { width: 100%; }
.theme-modern .btn[disabled], .theme-modern .btn.disabled { opacity: .5; cursor: not-allowed; }
.cm-link { font-weight: 600; font-size: 14px; color: var(--cm-accent); }
.cm-link:hover { color: var(--cm-accent-hover); }

/* --------------------------------------------------------------------------
   Formulaires
   -------------------------------------------------------------------------- */
.theme-modern .form-control {
	height: auto; min-height: 44px; padding: 10px 14px;
	background: var(--cm-surface); color: var(--cm-ink);
	border: 1px solid var(--cm-line); border-radius: var(--cm-radius-sm);
	box-shadow: none; font-size: 15px; transition: border-color .15s ease, box-shadow .15s ease;
}
.theme-modern .form-control:focus { border-color: var(--cm-accent); box-shadow: 0 0 0 3px var(--cm-accent-soft); outline: 0; }
.theme-modern select.form-control { padding-right: 32px; }
.theme-modern textarea.form-control { min-height: 120px; }
.theme-modern .form-group { margin-bottom: 18px; }
.theme-modern .form-horizontal .control-label { text-align: left; padding-top: 10px; }
.theme-modern .input-group-addon { background: var(--cm-surface-2); border-color: var(--cm-line); color: var(--cm-muted); border-radius: var(--cm-radius-sm); }
.theme-modern .input-group .form-control:first-child { border-top-left-radius: var(--cm-radius-sm); border-bottom-left-radius: var(--cm-radius-sm); }
.theme-modern .input-group-addon:last-child { border-top-right-radius: var(--cm-radius-sm); border-bottom-right-radius: var(--cm-radius-sm); }
.theme-modern .errors, .theme-modern .help-block.error { color: var(--cm-ko); font-size: 13px; }
.theme-modern .checkbox label, .theme-modern .radio label { font-weight: 400; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.cm-header { position: sticky; top: 0; z-index: 900; background: var(--cm-ground); border-bottom: 1px solid var(--cm-line); }
.cm-header__bar {
	display: grid; grid-template-columns: auto auto 1fr auto; grid-template-areas: "burger logo nav actions";
	align-items: center; gap: 20px; min-height: var(--cm-header-h);
}
.cm-burger { grid-area: burger; display: none; width: 44px; height: 44px; border: 0; background: none; padding: 10px; flex-direction: column; justify-content: center; gap: 5px; cursor: pointer; }
.cm-burger span { display: block; height: 2px; background: var(--cm-ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.cm-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.cm-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.cm-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.cm-logo { grid-area: logo; display: inline-flex; align-items: center; min-height: 44px; }
.cm-logo img { max-height: 48px; width: auto; display: block; }
.cm-logo__text { font-family: var(--cm-font-display); font-size: 24px; font-weight: 700; letter-spacing: -.01em; color: var(--cm-ink); }
.cm-nav { grid-area: nav; justify-self: center; }
.cm-nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.cm-nav__item { position: relative; display: flex; align-items: center; }
.cm-nav__link { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 12px; border-radius: var(--cm-radius-pill); font-size: 14px; font-weight: 500; color: var(--cm-ink); }
.cm-nav__link:hover, .cm-nav__item--sub:hover > .cm-nav__link { background: var(--cm-surface-2); color: var(--cm-ink); }
.cm-nav__caret { width: 32px; height: 32px; border: 0; background: none; color: var(--cm-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; margin-left: -8px; border-radius: 50%; }
.cm-nav__sub {
	position: absolute; top: 100%; left: 0; min-width: 220px; z-index: 950;
	list-style: none; margin: 4px 0 0; padding: 8px;
	background: var(--cm-surface); border: 1px solid var(--cm-line); border-radius: var(--cm-radius-sm); box-shadow: var(--cm-shadow);
	display: none;
}
.cm-nav__sub a { display: block; padding: 8px 12px; border-radius: 6px; font-size: 14px; }
.cm-nav__sub a:hover { background: var(--cm-surface-2); color: var(--cm-ink); }
.cm-nav__sub-all a { font-weight: 600; color: var(--cm-accent); }
@media (hover: hover) and (min-width: 993px) {
	.cm-nav__item--sub:hover .cm-nav__sub, .cm-nav__item--sub:focus-within .cm-nav__sub { display: block; }
}
.cm-nav__item--sub.is-open .cm-nav__sub { display: block; }
.cm-actions { grid-area: actions; display: flex; align-items: center; gap: 6px; }
.cm-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: none; color: var(--cm-ink); border-radius: 50%; cursor: pointer; }
.cm-iconbtn:hover, .cm-iconbtn:focus, .cm-iconbtn[aria-expanded="true"] { background: var(--cm-surface-2); color: var(--cm-ink); }

/* Recherche */
.cm-search { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px; background: var(--cm-surface-2); border-radius: var(--cm-radius-sm); color: var(--cm-muted); }
.cm-search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; color: var(--cm-ink); outline: none; }
.cm-search input::placeholder { color: var(--cm-muted); }
.cm-search__submit { border: 0; background: none; font: inherit; font-weight: 600; font-size: 13px; color: var(--cm-accent); cursor: pointer; padding: 8px 0; }
.cm-search--inline { grid-area: nav; justify-self: stretch; }
.cm-searchbar { border-top: 1px solid var(--cm-line); background: var(--cm-ground); padding: 12px 0; }
.cm-searchbar[hidden] { display: none; }

/* Panier (résumé dans l'entête) */
.cm-cart { position: relative; }
.cm-cart__btn {
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px;
	border: 1px solid var(--cm-ink); border-radius: var(--cm-radius-pill); background: none; color: var(--cm-ink);
	font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.cm-cart__btn:hover, .cm-cart__btn[aria-expanded="true"] { background: var(--cm-ink); color: var(--cm-ground); }
.cm-cart__count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--cm-accent); color: var(--cm-on-accent); font-size: 11px; font-weight: 700; }
.cm-cart__panel {
	position: absolute; right: 0; top: calc(100% + 10px); width: min(380px, calc(100vw - 32px)); z-index: 960;
	background: var(--cm-surface); color: var(--cm-ink); border: 1px solid var(--cm-line); border-radius: var(--cm-radius); box-shadow: var(--cm-shadow);
	padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.cm-cart__panel[hidden] { display: none; }
.cm-cart__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cm-cart__sub { font-size: 12px; color: var(--cm-muted); }
.cm-cart__lines { list-style: none; margin: 0; padding: 0; max-height: 40vh; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.cm-cart__line { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; }
.cm-cart__thumb { width: 48px; height: 48px; border-radius: 8px; background: var(--cm-surface-2); overflow: hidden; display: block; }
.cm-cart__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cm-cart__info { display: flex; flex-direction: column; font-size: 13px; min-width: 0; }
.cm-cart__info a { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-cart__info span { color: var(--cm-muted); font-size: 12px; }
.cm-cart__price { font-size: 13px; font-weight: 600; white-space: nowrap; }
.cm-cart__totals { margin: 0; padding-top: 10px; border-top: 1px solid var(--cm-line); display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13px; }
.cm-cart__totals dt { font-weight: 400; color: var(--cm-muted); }
.cm-cart__totals dd { margin: 0; text-align: right; }
.cm-cart__total { font-weight: 700; font-size: 15px; }
.cm-cart__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cm-cart__empty { margin: 0; color: var(--cm-muted); font-size: 14px; }
.cm-cart__dates { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border: 1px dashed var(--cm-line); border-radius: var(--cm-radius-sm); background: var(--cm-surface-2); color: var(--cm-ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; margin: 0; }
.cm-cart__dates em { font-style: normal; font-weight: 600; }
.cm-cart__dates--static { cursor: default; }

/* --------------------------------------------------------------------------
   Accueil : hero, sections, tuiles, grille, cartes, réassurance
   -------------------------------------------------------------------------- */
.cm-hero { position: relative; background: var(--cm-surface-2); color: var(--cm-ink); overflow: hidden; }
.cm-hero--photo { background-image: var(--cm-hero-image); background-size: cover; background-position: center; color: #fff; }
.cm-hero--photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.55) 100%); }
.cm-hero--photo .cm-hero__title, .cm-hero--photo .cm-eyebrow, .cm-hero--photo .cm-hero__lead { color: #fff; }
.cm-hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: end; min-height: 440px; padding-top: 56px; padding-bottom: 56px; }
.cm-hero__content { max-width: 640px; display: flex; flex-direction: column; gap: 16px; }
.cm-eyebrow { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--cm-muted); }
.cm-hero__title { margin: 0; font-size: clamp(34px, 5vw, 60px); line-height: 1.02; font-weight: 500; }
.cm-hero__lead { margin: 0; font-size: 17px; line-height: 1.5; max-width: 520px; }
.cm-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.cm-hero--photo .cm-btn--ghost { background: #fff; border-color: #fff; color: #1c1b19; }
.cm-hero--photo .cm-btn--ghost:hover { background: #1c1b19; border-color: #1c1b19; color: #fff; }
.cm-hero__tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.cm-section { padding: 56px 0 0; }
.cm-section--reassurance { padding-bottom: 0; margin-top: 56px; }
.cm-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.cm-section__title { margin: 0; font-size: clamp(26px, 3vw, 38px); font-weight: 500; }

.cm-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.cm-tile { position: relative; display: flex; flex-direction: column; gap: 12px; color: var(--cm-ink); }
.cm-tile__media { display: block; aspect-ratio: var(--cm-card-ratio); border-radius: var(--cm-radius); background: var(--cm-surface-2); overflow: hidden; }
.cm-tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.cm-tile:hover .cm-tile__media img { transform: scale(1.03); }
.cm-tile__label { font-family: var(--cm-font-display); font-size: 22px; font-weight: 500; }

.cm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.cm-grid--list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cm-empty { grid-column: 1 / -1; color: var(--cm-muted); }

.cm-card { display: flex; flex-direction: column; gap: 10px; background: var(--cm-surface); border-radius: var(--cm-radius); overflow: hidden; }
.cm-card__media { position: relative; display: block; aspect-ratio: var(--cm-card-ratio); background: var(--cm-surface-2); overflow: hidden; }
.cm-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.cm-card:hover .cm-card__media img { transform: scale(1.03); }
.cm-card__nophoto { position: absolute; inset: 0; background: var(--cm-surface-2); }
.cm-card__body { display: flex; flex-direction: column; gap: 6px; padding: 0 0 8px; }
.cm-card__title { margin: 0; font-family: var(--cm-font-body); font-size: 15px; font-weight: 600; line-height: 1.3; }
.cm-card__meta { margin: 0; font-size: 13px; color: var(--cm-muted); }
.cm-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; }
.cm-card__price { font-size: 15px; font-weight: 600; }
.cm-card__cta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--cm-accent); }
.cm-card__cta:hover { color: var(--cm-accent-hover); }
.cm-badge { position: absolute; top: 12px; left: 12px; display: inline-block; padding: 5px 9px; border-radius: var(--cm-radius-pill); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: var(--cm-surface); color: var(--cm-ink); }
.cm-badge--ok { background: var(--cm-ok-bg); color: var(--cm-ok); }
.cm-badge--ko { background: var(--cm-ko-bg); color: var(--cm-ko); }
.cm-badge--pack { background: var(--cm-ink); color: var(--cm-ground); }

.cm-reassurance { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; padding: 40px; background: var(--cm-surface-2); border-radius: var(--cm-radius); }
.cm-reassurance__item { display: flex; flex-direction: column; gap: 8px; color: var(--cm-ink); }
.cm-reassurance__item strong { font-size: 16px; }
.cm-reassurance__item span { font-size: 14px; color: var(--cm-muted); line-height: 1.5; }
.cm-prose { font-size: 16px; line-height: 1.7; max-width: 820px; }
.cm-prose img { border-radius: var(--cm-radius); }

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */
.cm-footer { margin-top: 72px; border-top: 1px solid var(--cm-line); background: var(--cm-ground); color: var(--cm-ink); }
.cm-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-top: 48px; padding-bottom: 32px; font-size: 14px; }
.cm-footer__brand { display: flex; flex-direction: column; gap: 12px; }
.cm-footer__logo { max-height: 40px; width: auto; align-self: flex-start; }
.cm-footer__name { font-family: var(--cm-font-display); font-size: 22px; font-weight: 600; }
.cm-footer__contact, .cm-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cm-footer__contact a, .cm-footer__col a { color: var(--cm-muted); }
.cm-footer__contact a:hover, .cm-footer__col a:hover { color: var(--cm-ink); }
.cm-footer__title { font-family: var(--cm-font-body); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 12px; }
.cm-footer__social i { width: 18px; text-align: center; margin-right: 4px; }
.cm-footer__bottom { padding-top: 16px; padding-bottom: 24px; border-top: 1px solid var(--cm-line); font-size: 12px; color: var(--cm-muted); }

/* --------------------------------------------------------------------------
   Pages internes (markup Bootstrap existant)
   -------------------------------------------------------------------------- */
.theme-modern .breadcrumb { background: none; padding: 0; margin: 0 0 18px; font-size: 13px; color: var(--cm-muted); }
.theme-modern .breadcrumb > li + li:before { content: "/"; color: var(--cm-line); padding: 0 8px; }
.theme-modern .breadcrumb a { color: var(--cm-muted); }
.theme-modern .breadcrumb > .active { color: var(--cm-ink); }
.theme-modern .main-heading, .theme-modern .main-heading2, .theme-modern .product-head, .theme-modern .side-heading {
	font-family: var(--cm-font-display); font-size: clamp(26px, 3vw, 36px); font-weight: 500; margin: 0 0 20px; padding: 0; border: 0; text-align: left; letter-spacing: 0; text-transform: none;
}
.theme-modern .main-heading.text-center { text-align: left; }
.theme-modern .cat-intro { margin: 0 0 24px; align-items: center; }
.theme-modern .cat-intro .product-image { border-radius: var(--cm-radius); }
.theme-modern .cat-body { color: var(--cm-muted); }
.theme-modern .product-filter { margin: 0 0 20px; padding: 0; border: 0; background: none; }
.theme-modern .product-filter .display a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: var(--cm-muted); }
.theme-modern .product-filter .display a.active, .theme-modern .product-filter .display a:hover { background: var(--cm-surface-2); color: var(--cm-ink); }

/* Carte legacy (.product-col) : sous-catégories, carrousel « produits recommandés », mode liste */
.theme-modern .product-col { position: relative; margin: 0 0 24px; padding: 0; border: 0; background: var(--cm-surface); border-radius: var(--cm-radius); overflow: hidden; box-shadow: none; }
.theme-modern .product-col .image { position: relative; aspect-ratio: var(--cm-card-ratio); background: var(--cm-surface-2); overflow: hidden; }
.theme-modern .product-col .image img { width: 100%; height: 100%; object-fit: cover; border: 0; }
.theme-modern .product-col .caption { padding: 12px 0 8px; text-align: left; }
.theme-modern .product-col .caption h4 { font-family: var(--cm-font-body); font-size: 15px; font-weight: 600; margin: 0 0 6px; text-transform: none; }
.theme-modern .product-col .description { font-size: 13px; color: var(--cm-muted); margin-bottom: 8px; }
.theme-modern .product-col .description label { font-weight: 600; color: var(--cm-ink); }
.theme-modern .product-col .manufacturer { margin: 0 0 8px; font-size: 12px; }
.theme-modern .product-col .price { margin: 0 0 8px; }
.theme-modern .product-col .price-new, .theme-modern .product-info .price-new { font-size: 18px; font-weight: 600; color: var(--cm-ink); }
.theme-modern .product-col .cart-button .btn-cart { min-height: 40px; padding: 8px 14px; font-size: 13px; }
.theme-modern .product-col.list { display: grid; grid-template-columns: 200px 1fr; gap: 20px; margin-bottom: 20px; padding: 12px; border: 1px solid var(--cm-line); }
.theme-modern .product-col.list .image { aspect-ratio: 1 / 1; border-radius: var(--cm-radius-sm); }
.theme-modern .product-col.list .caption { padding: 0; }

/* Fiche article / composition */
.theme-modern .product-info { margin-bottom: 40px; }
.theme-modern .images-block .img-main, .theme-modern .images-block .thumbnail { border: 0; padding: 0; border-radius: var(--cm-radius); background: var(--cm-surface-2); }
.theme-modern .images-block #img-0 { border-radius: var(--cm-radius); background: var(--cm-surface-2); overflow: hidden; }
.theme-modern .images-block .img-carousel { border-radius: var(--cm-radius-sm); background: var(--cm-surface-2); border: 2px solid transparent; }
.theme-modern .images-block .img-carousel.active { border-color: var(--cm-ink); }
.theme-modern .carousel-prev, .theme-modern .carousel-next { border: 1px solid var(--cm-line); background: var(--cm-surface); color: var(--cm-ink); border-radius: 50%; width: 36px; height: 36px; margin-top: 12px; }
.theme-modern .product-details .panel-smart { position: sticky; top: calc(var(--cm-header-h) + 16px); }
.theme-modern .product-details h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 500; margin: 0 0 12px; }
.theme-modern .product-details .badge { background: none; color: var(--cm-ink); border: 1px solid var(--cm-line); border-radius: var(--cm-radius-pill); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; margin: 0 4px 8px 0; }
.theme-modern .product-details .manufacturer { margin: 0; font-size: 13px; color: var(--cm-muted); }
.theme-modern .product-details .price { display: flex; align-items: baseline; gap: 10px; }
.theme-modern .product-details .price-head { font-size: 13px; color: var(--cm-muted); }
.theme-modern .product-details .price-new { font-size: 26px; }
.theme-modern .product-details .options label { font-size: 13px; }
.theme-modern .product-details .btn-cart { width: 100%; min-height: 48px; font-size: 15px; }
.theme-modern .product-details .cart-button { margin-top: 8px; }

/* Panneaux, onglets, tableaux */
.theme-modern .panel, .theme-modern .panel-smart, .theme-modern .tabs-panel { background: var(--cm-surface); border: 1px solid var(--cm-line); border-radius: var(--cm-radius); box-shadow: none; margin-bottom: 24px; }
.theme-modern .panel-smart { padding: 24px; }
.theme-modern .panel-smart .panel-smart, .theme-modern .product-details .panel-smart + .tabs-panel { margin-top: 16px; }
.theme-modern .panel-heading { background: none; border-bottom: 1px solid var(--cm-line); padding: 18px 24px; border-radius: var(--cm-radius) var(--cm-radius) 0 0; }
.theme-modern .panel-title { font-family: var(--cm-font-display); font-size: 20px; font-weight: 500; }
.theme-modern .panel-body { padding: 24px; }
.theme-modern .tabs-panel { padding: 0; overflow: hidden; }
.theme-modern .nav-tabs { border-bottom: 1px solid var(--cm-line); padding: 0 16px; background: var(--cm-surface-2); }
.theme-modern .nav-tabs > li > a { border: 0; border-radius: 0; margin: 0; padding: 14px 12px; font-weight: 600; font-size: 14px; color: var(--cm-muted); background: none; }
.theme-modern .nav-tabs > li.active > a, .theme-modern .nav-tabs > li > a:hover { border: 0; border-bottom: 2px solid var(--cm-accent); color: var(--cm-ink); background: none; }
.theme-modern .tab-content { padding: 20px 24px; }
.theme-modern .tab-content label { font-weight: 600; }
.theme-modern .table { background: transparent; color: var(--cm-ink); }
.theme-modern .table > thead > tr > td, .theme-modern .table > thead > tr > th { border-bottom: 1px solid var(--cm-line); border-top: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cm-muted); padding: 12px; vertical-align: middle; }
.theme-modern .table > tbody > tr > td, .theme-modern .table > tfoot > tr > td { border-top: 1px solid var(--cm-line); padding: 14px 12px; vertical-align: middle; }
.theme-modern .table-bordered, .theme-modern .table-bordered > thead > tr > td, .theme-modern .table-bordered > tbody > tr > td, .theme-modern .table-bordered > tfoot > tr > td { border-left: 0; border-right: 0; }
.theme-modern .table-bordered { border: 0; }
.theme-modern .table-striped > tbody > tr:nth-of-type(odd) { background: var(--cm-surface-2); }
.theme-modern .table .img-thumbnail { border: 0; padding: 0; border-radius: var(--cm-radius-sm); background: var(--cm-surface-2); max-height: 72px; }
.theme-modern .table .input-group.btn-block { max-width: 120px; margin: 0 auto; }
.theme-modern .table .form-control { text-align: center; min-height: 40px; }
.theme-modern .table .btn-default { min-height: 36px; padding: 6px 10px; margin: 2px; }
.theme-modern .shopping-cart-table { background: var(--cm-surface); border: 1px solid var(--cm-line); border-radius: var(--cm-radius); padding: 8px 16px; margin-bottom: 24px; }
.theme-modern .totalstr, .theme-modern #total { font-weight: 700; font-size: 16px; }
.theme-modern .dl-horizontal dt { text-align: left; width: auto; float: none; font-weight: 400; color: var(--cm-muted); }
.theme-modern .dl-horizontal dd { margin: 0 0 8px; font-weight: 600; }
.theme-modern .dl-horizontal.total dd { font-size: 20px; }
.theme-modern .registration-area { padding: 0; }
.theme-modern .list-group-item { border-color: var(--cm-line); background: var(--cm-surface); color: var(--cm-ink); }
.theme-modern .label { border-radius: var(--cm-radius-pill); padding: 4px 9px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.theme-modern .label-success { background: var(--cm-ok-bg); color: var(--cm-ok); }
.theme-modern .label-danger { background: var(--cm-ko-bg); color: var(--cm-ko); }
.theme-modern .alert { border-radius: var(--cm-radius-sm); border: 0; }
.theme-modern .alert-info { background: var(--cm-accent-soft); color: var(--cm-ink); }
.theme-modern .alert-danger { background: var(--cm-ko-bg); color: var(--cm-ko); }
.theme-modern .alert-success { background: var(--cm-ok-bg); color: var(--cm-ok); }
.theme-modern .well { background: var(--cm-surface-2); border: 0; border-radius: var(--cm-radius); box-shadow: none; }

/* Modales (Bootstrap 3) */
.theme-modern .modal-content { border: 0; border-radius: var(--cm-radius); box-shadow: var(--cm-shadow); background: var(--cm-surface); color: var(--cm-ink); }
.theme-modern .modal-header { border-bottom: 1px solid var(--cm-line); padding: 20px 24px; }
.theme-modern .modal-header .show-titre, .theme-modern .modal-title { font-family: var(--cm-font-display); font-size: 22px; font-weight: 500; margin: 0; }
.theme-modern .modal-body { padding: 24px; }
.theme-modern .modal-footer { border-top: 1px solid var(--cm-line); padding: 16px 24px; }
.theme-modern .modal .close { color: var(--cm-ink); opacity: .6; font-size: 24px; text-shadow: none; }
.theme-modern .modal-backdrop.in { opacity: .45; }
.theme-modern .datepicker { border-radius: var(--cm-radius-sm); font-family: var(--cm-font-body); }

/* « Produits recommandés » : le carrousel owl n'est pas chargé en moderne, le conteneur devient une grille */
.theme-modern .owl-carousel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.theme-modern .owl-carousel .item { padding: 0; }
.theme-modern .owl-carousel .product-col { margin: 0; }

/* Scanner QR */
.theme-modern .qr-scanner-fab { background-color: var(--cm-accent) !important; color: var(--cm-on-accent) !important; font-family: var(--cm-font-body); }
.theme-modern #qrScannerModal .modal-header { background-color: var(--cm-surface) !important; color: var(--cm-ink) !important; }
.theme-modern #qrScannerModal .article-price { color: var(--cm-ink) !important; }

/* --------------------------------------------------------------------------
   Thème sombre (Pulse) : ajustements des composants Bootstrap
   -------------------------------------------------------------------------- */
.theme-dark .form-control { background: var(--cm-surface); border-color: var(--cm-line); color: var(--cm-ink); }
.theme-dark .form-control::placeholder { color: var(--cm-muted); }
.theme-dark select.form-control option { color: #111; }
.theme-dark .input-group-addon { background: var(--cm-surface); color: var(--cm-muted); border-color: var(--cm-line); }
.theme-dark .table-striped > tbody > tr:nth-of-type(odd) { background: rgba(255,255,255,.03); }
.theme-dark .list-group-item { background: var(--cm-surface); }
.theme-dark .datepicker, .theme-dark .datepicker table tr td, .theme-dark .datepicker table tr th { color: #111; }
.theme-dark .cm-hero--photo .cm-btn--ghost { background: var(--cm-ink); color: var(--cm-ground); border-color: var(--cm-ink); }
.theme-dark .cm-badge--ok { background: rgba(72, 199, 116, .18); color: #7fe0a0; }
.theme-dark .cm-badge--ko { background: rgba(255, 99, 71, .18); color: #ff8a73; }
.theme-dark .label-success { background: rgba(72, 199, 116, .18); color: #7fe0a0; }
.theme-dark .label-danger { background: rgba(255, 99, 71, .18); color: #ff8a73; }
.theme-dark .alert-success { background: rgba(72, 199, 116, .18); color: #7fe0a0; }
.theme-dark .alert-danger { background: rgba(255, 99, 71, .18); color: #ff8a73; }
.theme-dark .alert-info { background: rgba(255,255,255,.08); color: var(--cm-ink); }
.theme-dark .btn-danger { background: rgba(255, 99, 71, .18); border-color: transparent; color: #ff8a73; }
.theme-dark .cm-hero--photo::before { background: linear-gradient(180deg, rgba(15,16,20,.2) 0%, rgba(15,16,20,.85) 100%); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
	.cm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.theme-modern .owl-carousel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 992px) {
	:root { --cm-header-h: 64px; }
	.cm-header__bar { grid-template-columns: auto auto 1fr auto; grid-template-areas: "burger logo . actions"; gap: 12px; }
	.cm-burger { display: flex; }
	.cm-nav { grid-area: auto; grid-column: 1 / -1; justify-self: stretch; display: none; padding: 8px 0 16px; border-top: 1px solid var(--cm-line); }
	.cm-nav.is-open { display: block; }
	.cm-nav__list { flex-direction: column; gap: 0; }
	.cm-nav__item { flex-wrap: wrap; }
	.cm-nav__link { flex: 1; min-height: 44px; border-radius: 8px; font-size: 15px; }
	.cm-nav__caret { width: 44px; height: 44px; margin: 0; }
	.cm-nav__sub { position: static; width: 100%; box-shadow: none; border: 0; background: var(--cm-surface-2); margin: 0 0 8px; }
	.cm-search--inline { grid-area: auto; grid-column: 1 / -1; }
	.cm-cart__label { display: none; }
	.cm-cart__btn { padding: 8px 12px; }
	.cm-tiles, .cm-hero__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cm-footer__grid { grid-template-columns: 1fr 1fr; }
	.theme-modern .product-details .panel-smart { position: static; }
	.theme-modern .product-col.list { grid-template-columns: 140px 1fr; }
}
@media (max-width: 768px) {
	:root { --cm-gutter: 16px; }
	.cm-grid, .cm-grid--list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
	.theme-modern .owl-carousel { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
	.cm-hero__grid { min-height: 0; padding-top: 40px; padding-bottom: 40px; }
	.cm-reassurance { padding: 24px; gap: 20px; }
	.cm-section { padding-top: 40px; }
	.cm-footer__grid { grid-template-columns: 1fr; gap: 24px; }
	.cm-cart__panel { position: fixed; left: 16px; right: 16px; top: calc(var(--cm-header-h) + 8px); width: auto; }
	.theme-modern .panel-smart, .theme-modern .panel-body { padding: 16px; }
	.theme-modern .product-col.list { grid-template-columns: 1fr; }
	.theme-modern .table-responsive { border: 0; }
	.theme-modern .shopping-cart-table { padding: 0 8px; }
}
@media (max-width: 480px) {
	.cm-grid, .cm-grid--list, .cm-tiles, .cm-hero__tiles { grid-template-columns: 1fr; }
	.theme-modern .owl-carousel { grid-template-columns: 1fr; }
	.cm-cart__actions { grid-template-columns: 1fr; }
	.cm-hero__actions .cm-btn { width: 100%; }
}
