/* ══ Configurateur de la ceinture B.R.M — page du site (12/11/2026), d'après celui du Cylindre ══════════════════════
   Panneau à gauche (blanc, charte G : étapes numérotées, Oswald), vitrine 3D à droite (iframe /3d/ceintures/, fond clair
   de studio : cuir et métal). Téléphone : vitrine en haut (≈ 52 % de l'écran), panneau dessous, cibles ≥ 44 px.
   + le bloc « Tour de taille » des fiches ceinture (.cei-taille, aussi dans l'étape 03). */
@property --cei-h1 { syntax: '<color>'; inherits: true; initial-value: #BD3238; }
.cei-main { --cei-encre: #15131A; --cei-doux: #5a5661; --cei-toile: #F3EFE7; --cei-filet: rgba(21,19,26,.12); --cei-rouge: #BD3238;
  --cei-ease: cubic-bezier(.2,.7,.2,1); transition: --cei-h1 .9s ease;
  display: grid; grid-template-columns: minmax(380px, 500px) minmax(0, 1fr); margin: var(--header, 72px) 0 0; padding: 0;   /* l'en-tête du site est fixe */
  height: calc(100dvh - var(--header, 72px)); min-height: 560px; background: #e6e2dc; color: var(--cei-encre); }
.cei-main button { font: inherit; color: inherit; cursor: pointer; }
.cei-main button:focus-visible { outline: 2px solid var(--cei-rouge); outline-offset: 2px; }
.cei-panneau { background: #fff; display: flex; flex-direction: column; min-height: 0; min-width: 0; z-index: 2; box-shadow: 8px 0 40px rgba(0,0,0,.35); }
.cei-entete { padding: 20px 28px 0; }
.cei-sur { margin: 0; font: 500 11px/1 var(--display); letter-spacing: .28em; text-transform: uppercase; color: var(--cei-doux); display: flex; align-items: center; gap: 12px; }
.cei-sur::before { content: ""; width: 34px; height: 3px; border-radius: 2px; background: var(--cei-h1); }
.cei-entete h1 { margin: 10px 0 0; font: 600 clamp(26px, 2.2vw, 34px)/1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.cei-chapeau { margin: 6px 0 0; color: var(--cei-doux); font-size: 13.5px; }
.cei-etapes { position: sticky; top: 0; z-index: 3; display: flex; margin: 14px 0 0; padding: 0 16px; background: #fff; border-bottom: 1px solid var(--cei-filet); }
.cei-etapes button { flex: 1 1 0; min-width: 0; min-height: 56px; border: 0; background: none; padding: 8px 2px 10px; display: grid; justify-items: center; align-content: center; gap: 2px; position: relative; color: var(--cei-doux); }
.cei-etapes i { font: 500 10.5px/1 var(--display); font-style: normal; letter-spacing: .1em; }
.cei-etapes span { font: 500 11.5px/1.1 var(--display); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.cei-etapes button::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -1px; height: 2px; background: var(--cei-rouge); transform: scaleX(0); transition: transform .45s var(--cei-ease); }
.cei-etapes button[aria-selected="true"] { color: var(--cei-encre); } .cei-etapes button[aria-selected="true"]::after { transform: scaleX(1); }
.cei-options { flex: 1; overflow: auto; padding: 0 28px 24px; min-width: 0; scroll-behavior: smooth; }
.cei-bloc { padding: 20px 0 22px; border-bottom: 1px solid var(--cei-filet); scroll-margin-top: 4px; }
.cei-bloc:last-child { border-bottom: 0; }
.cei-tete { display: flex; gap: 12px; align-items: baseline; margin-bottom: 14px; }
.cei-tete b { font: 600 15px/1 var(--display); letter-spacing: .06em; color: var(--cei-rouge); }
.cei-tete h2 { margin: 0; font: 600 21px/1 var(--display); text-transform: uppercase; letter-spacing: .03em; }
/* 01 architecture : boutons compacts */
/* 02 bloc moteur : cartes basses à petite vignette */
/* 03 cylindres */
.cei-pastille[aria-pressed="true"] i { box-shadow: inset 0 0 0 1px rgba(0,0,0,.14), 0 0 0 3px #fff, 0 0 0 5px var(--cei-encre); }
.cei-pastille[aria-pressed="true"] i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 13px; height: 7px; border: solid var(--coche, #fff); border-width: 0 0 3px 3px; transform: translate(-50%, -65%) rotate(-45deg); }
/* pied : récapitulatif, prix, panier */
.cei-pied { background: var(--cei-toile); padding: 14px 28px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--cei-filet); box-shadow: inset 0 3px 0 var(--cei-h1); }
.cei-recap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 14px; margin-bottom: 10px; }
.cei-recap span { display: block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--cei-doux); }
.cei-recap strong { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cei-recap .points { display: flex; gap: 3px; margin-top: 3px; flex-wrap: wrap; } .cei-recap .points i { width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.cei-total { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.cei-prix { margin: 0; display: flex; flex-direction: column; }
.cei-prix span { font: 600 30px/1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--cei-encre); }
.cei-prix small { font-size: 11.5px; color: var(--cei-doux); margin-top: 5px; }
.cei-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cei-actions .btn-plein { background: var(--cei-encre); color: #fff; border: 1px solid var(--cei-encre); cursor: pointer; }
.cei-actions .btn-plein:hover { background: #000; }
.cei-actions .btn { min-height: 48px; padding: 12px 20px; font-size: .74rem; letter-spacing: .14em; white-space: nowrap; }
.cei-lien { border: 0; background: none; padding: 6px 2px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; color: var(--cei-doux); min-height: 32px; }
/* vitrine 3D */
.cei-vitrine { position: relative; min-width: 0; min-height: 0; background: radial-gradient(ellipse at 50% 40%, #f7f5f1 0%, #e6e2dc 58%, #cfcac2 100%); }
.cei-vitrine iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; color-scheme: normal; }
.cei-charge { position: absolute; left: 50%; top: 50%; translate: -50% -50%; margin: 0; color: #15131A; opacity: .7; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; pointer-events: none; }
.cei-main.pret .cei-charge { display: none; }
.cei-toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; translate: -50% 20px; opacity: 0; margin: 0; padding: 10px 18px; border-radius: 999px; background: #15131A; color: #fff; font-size: 13px; transition: opacity .3s, translate .3s; pointer-events: none; }
.cei-toast.vu { opacity: 1; translate: -50% 0; }
/* la page n'a ni bandeau revendeurs ni « Voir le panier » collant au-dessus de la vitrine */
.cei-page .revendeurs { display: none; }
@media (max-width: 979px) {
  .cei-main { display: flex; flex-direction: column; height: auto; min-height: 0; }
  .cei-vitrine { order: 1; height: 52svh; min-height: 320px; flex: none; }
  .cei-panneau { order: 2; box-shadow: 0 -8px 30px rgba(0,0,0,.4); }
  .cei-entete { padding: 16px 18px 0; } .cei-entete h1 { font-size: 22px; } .cei-chapeau { display: none; }
  .cei-etapes { position: sticky; top: var(--header, 62px); padding: 0 6px; }
  .cei-options { overflow: visible; padding: 0 18px 18px; }
  .cei-pied { position: sticky; bottom: 0; z-index: 4; padding: 10px 18px calc(10px + env(safe-area-inset-bottom)); }
  .cei-recap { display: none; }
  .cei-prix span { font-size: 24px; }
  .cei-actions .btn { min-height: 46px; padding: 10px 14px; font-size: .7rem; letter-spacing: .1em; }
  .cei-main { margin-top: var(--header, 56px); }
}
/* ?lecture=1 : la configuration commandée, en lecture seule (Hub, bon de commande, Montage) */
.cei-main.lecture { grid-template-columns: minmax(0, 1fr); }
.cei-main.lecture .cei-panneau, .cei-main.lecture #cei-panier, .cei-main.lecture #cei-copier { display: none !important; }
@media (max-width: 979px) { .cei-main.lecture .cei-vitrine { height: calc(100svh - var(--header, 56px)); } }
.cei-actions .btn[aria-busy="true"] { opacity: .6; pointer-events: none; }

/* 01 cuir : cartes à vignette 3D */
.cei-cuirs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cei-carte { display: grid; grid-template-columns: 76px 1fr; grid-template-rows: auto auto auto; gap: 1px 10px; align-items: center; padding: 6px 10px 6px 6px; border-radius: 12px; border: 1px solid var(--cei-filet); background: #fff; text-align: left; transition: border-color .25s, box-shadow .25s, transform .25s var(--cei-ease); }
.cei-carte img { width: 76px; aspect-ratio: 1; object-fit: contain; border-radius: 9px; background: radial-gradient(circle at 50% 55%, #fff 0, #fff 30%, var(--cei-toile) 78%); grid-row: 1 / span 3; }
.cei-carte .nom { font: 600 15px/1.05 var(--display); text-transform: uppercase; letter-spacing: .03em; align-self: end; }
.cei-carte .det { font-size: 11.5px; line-height: 1.25; color: var(--cei-doux); }
.cei-carte .px { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; align-self: start; }
.cei-carte:hover { border-color: rgba(21,19,26,.34); transform: translateY(-1px); }
.cei-carte[aria-pressed="true"] { border-color: var(--cei-rouge); box-shadow: inset 0 0 0 1px var(--cei-rouge), 0 0 0 3px color-mix(in srgb, var(--cei-rouge) 18%, transparent); }
/* 02 boucle : trois pastilles */
.cei-boucles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 6px; }
.cei-pastille { display: grid; justify-items: center; gap: 5px; border: 1px solid transparent; border-radius: 12px; background: none; padding: 8px 2px; text-align: center; min-height: 44px; }
.cei-pastille i { position: relative; width: 52px; height: 52px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14), inset 0 -8px 14px rgba(0,0,0,.12), inset 0 6px 10px rgba(255,255,255,.25); transition: transform .25s var(--cei-ease); }
.cei-pastille .nom { font: 600 13px/1.1 var(--display); text-transform: uppercase; letter-spacing: .04em; }
.cei-pastille .px { font-size: 12px; color: var(--cei-doux); font-variant-numeric: tabular-nums; }
.cei-pastille:hover i { transform: scale(1.06); }
.cei-pastille[aria-pressed="true"] i { box-shadow: inset 0 0 0 1px rgba(0,0,0,.14), 0 0 0 3px #fff, 0 0 0 5px var(--cei-encre); }
.cei-pastille[aria-pressed="true"] i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 13px; height: 7px; border: solid #fff; border-width: 0 0 3px 3px; transform: translate(-50%, -65%) rotate(-45deg); }
/* 04 récapitulatif (dans le panneau) */
#cei-recap-etape .cei-recap { grid-template-columns: 1fr; gap: 10px; margin: 0; }
#cei-recap-etape .cei-recap div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--cei-filet); }
#cei-recap-etape .cei-recap strong { font-size: 14px; white-space: normal; text-align: right; }
.cei-recap strong.manque { color: var(--cei-rouge); }
.cei-delai { margin: 12px 0 0; font-size: 12.5px; color: var(--cei-doux); }

/* ── le tour de taille (fiche ET configurateur) ── */
.cei-taille { margin: 18px 0 14px; padding: 14px 16px; border-radius: 12px; background: #F4F2EF; border: 1px solid rgba(21,19,26,.08); }
.cei-taille label { display: block; font: 600 13px/1.2 var(--display, 'Oswald', sans-serif); letter-spacing: .1em; text-transform: uppercase; color: #15131A; }
.cei-taille label span { font-weight: 400; letter-spacing: .04em; text-transform: none; color: #5a5661; }
.cei-champ { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.cei-champ input { width: 120px; min-height: 46px; padding: 8px 12px; font-size: 16px; font-variant-numeric: tabular-nums; border: 1px solid rgba(21,19,26,.28); border-radius: 10px; background: #fff; color: #15131A; }
.cei-champ input:focus { outline: 2px solid #BD3238; outline-offset: 1px; }
.cei-champ span { font-size: 14px; color: #5a5661; }
.cei-aide { margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; color: #4a4650; }
.cei-erreur { margin: 8px 0 0; font-size: 12.5px; font-weight: 600; color: #BD3238; }
.cei-taille.absent { border-color: #BD3238; box-shadow: 0 0 0 3px rgba(189,50,56,.14); }
.cei-taille.absent input { border-color: #BD3238; }
.fiche-actions [data-configurer-ceinture] { justify-content: center; }

/* ── la fiche : trois paragraphes de savoir-faire (le bloc description de fiches.js est éteint) ── */
.cei-savoir { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 44px); padding-top: clamp(28px, 4vw, 56px); padding-bottom: clamp(12px, 2vw, 24px); }
.cei-savoir h2 { margin: 0 0 10px; font: 600 15px/1.1 var(--display, 'Oswald', sans-serif); letter-spacing: .14em; text-transform: uppercase; color: #15131A; }
.cei-savoir h2::before { content: ""; display: block; width: 28px; height: 3px; margin-bottom: 12px; border-radius: 2px; background: #BD3238; }
.cei-savoir p { margin: 0; font-size: 14.5px; line-height: 1.6; color: #3d3942; }
@media (max-width: 760px) { .cei-savoir { grid-template-columns: 1fr; gap: 22px; } }
/* bloc d'achat de la fiche (fiches.css range ses enfants par `order`) : la taille entre la boucle (6) et les boutons (7) */
.fiche-achat > .cei-taille { order: 6; margin: 16px 0 4px; }
