/* AESPRINT – configurateur de badges PVC */
#aesbadge-root {
  --aes-primary: #1d4ed8;
  --aes-primary-dark: #1e3a8a;
  --aes-border: #d9dde3;
  --aes-muted: #6b7280;
  --aes-bg: #f6f7f9;
  --aes-ok: #15803d;
  --aes-warn: #b45309;
  --aes-err: #b91c1c;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  color: #111827;
  margin: 24px 0;
  clear: both;
}
#aesbadge-root *, #aesbadge-root *::before, #aesbadge-root *::after { box-sizing: border-box; }
#aesbadge-root h2 { font-size: 20px; margin: 0 0 4px; font-weight: 700; }
#aesbadge-root h3 { font-size: 15px; margin: 0 0 10px; font-weight: 700; }
#aesbadge-root p { margin: 0 0 8px; }
#aesbadge-root .aes-sub { color: var(--aes-muted); margin-bottom: 16px; }

.aes-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .aes-layout { grid-template-columns: 1fr; } }

.aes-card { background: #fff; border: 1px solid var(--aes-border); border-radius: 10px; padding: 16px; }
.aes-side { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 12px; }

/* Étapes */
.aes-steps { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.aes-step-btn { flex: 1 1 0; min-width: 120px; border: 1px solid var(--aes-border); background: var(--aes-bg); border-radius: 8px; padding: 9px 10px; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.aes-step-btn .n { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; background: #e5e7eb; font-weight: 700; font-size: 12px; margin-right: 6px; }
.aes-step-btn.active { border-color: var(--aes-primary); background: #eef2ff; }
.aes-step-btn.active .n { background: var(--aes-primary); color: #fff; }
.aes-step-btn.done .n { background: var(--aes-ok); color: #fff; }
.aes-panel { display: none; }
.aes-panel.active { display: block; }

/* Boutons */
.aes-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--aes-border); background: #fff; color: #111827; border-radius: 7px; padding: 7px 11px; cursor: pointer; font: inherit; line-height: 1.2; white-space: nowrap; }
.aes-btn:hover { border-color: #9ca3af; }
.aes-btn:disabled { opacity: .45; cursor: not-allowed; }
.aes-btn.primary { background: var(--aes-primary, #5b21b6); border-color: var(--aes-primary, #5b21b6); color: #fff; font-weight: 600; }
.aes-btn.primary:hover { background: var(--aes-primary-dark, #4c1d95); filter: brightness(0.92); }
.aes-btn.big { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.aes-btn.danger { color: var(--aes-err); }
.aes-btn.small { padding: 5px 8px; font-size: 13px; }
.aes-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.aes-nav { display: flex; justify-content: space-between; margin-top: 16px; }

/* Modèles */
.aes-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.aes-tpl { border: 2px solid var(--aes-border); border-radius: 8px; padding: 6px; cursor: pointer; background: #fff; font: inherit; text-align: center; }
.aes-tpl:hover, .aes-tpl.active { border-color: var(--aes-primary); }
.aes-tpl img { width: 100%; display: block; border-radius: 4px; border: 1px solid #eee; margin-bottom: 4px; background: #fafafa; }
.aes-tpl span { font-size: 12px; font-weight: 600; }

/* Éditeur */
.aes-toolbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: var(--aes-bg); border: 1px solid var(--aes-border); border-radius: 8px 8px 0 0; border-bottom: none; }
.aes-toolbar .sep { width: 1px; background: var(--aes-border); margin: 0 4px; }
.aes-stage { background: repeating-conic-gradient(#eef0f3 0% 25%, #f8f9fb 0% 50%) 50% / 20px 20px; border: 1px solid var(--aes-border); padding: 20px; display: flex; justify-content: center; overflow: hidden; }
.aes-stage .canvas-container { box-shadow: 0 6px 24px rgba(0,0,0,.18); border-radius: 12px; overflow: hidden; }
.aes-facebar { display: flex; justify-content: space-between; align-items: center; padding: 8px; border: 1px solid var(--aes-border); border-top: none; border-radius: 0 0 8px 8px; background: #fff; gap: 8px; flex-wrap: wrap; }
.aes-seg { display: inline-flex; border: 1px solid var(--aes-border); border-radius: 7px; overflow: hidden; }
.aes-seg button { border: none; background: #fff; padding: 6px 12px; cursor: pointer; font: inherit; }
.aes-seg button + button { border-left: 1px solid var(--aes-border); }
.aes-seg button.active { background: var(--aes-primary); color: #fff; }
.aes-hint { color: var(--aes-muted); font-size: 12px; }

.aes-props { margin-top: 10px; padding: 10px; border: 1px dashed var(--aes-border); border-radius: 8px; display: none; gap: 10px; flex-wrap: wrap; align-items: center; }
.aes-props.show { display: flex; }
.aes-props label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.aes-props input[type=number] { width: 64px; }
.aes-props select, .aes-props input, .aes-side select, .aes-side input[type=number], #aesbadge-root textarea { border: 1px solid var(--aes-border); border-radius: 6px; padding: 5px 7px; font: inherit; background: #fff; }
.aes-props input[type=color] { width: 36px; height: 30px; padding: 2px; }

.aes-dropdown { position: relative; display: inline-block; }
.aes-menu { position: absolute; z-index: 50; top: 100%; left: 0; margin-top: 4px; background: #fff; border: 1px solid var(--aes-border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); min-width: 180px; padding: 4px; display: none; }
.aes-menu.open { display: block; }
.aes-menu button { display: block; width: 100%; text-align: left; border: none; background: none; padding: 7px 10px; border-radius: 6px; cursor: pointer; font: inherit; }
.aes-menu button:hover { background: var(--aes-bg); }

/* Données */
.aes-drop { border: 2px dashed var(--aes-border); border-radius: 10px; padding: 22px; text-align: center; background: var(--aes-bg); cursor: pointer; }
.aes-drop.over { border-color: var(--aes-primary); background: #eef2ff; }
.aes-drop strong { display: block; font-size: 15px; margin-bottom: 4px; }
.aes-table-wrap { overflow: auto; max-height: 300px; border: 1px solid var(--aes-border); border-radius: 8px; margin-top: 12px; }
.aes-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.aes-table th, .aes-table td { border-bottom: 1px solid #eef0f3; padding: 6px 8px; text-align: left; white-space: nowrap; }
.aes-table th { background: var(--aes-bg); position: sticky; top: 0; }
.aes-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.aes-chip { background: #eef2ff; color: var(--aes-primary-dark); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-family: ui-monospace, Menlo, monospace; }
.aes-alert { border-radius: 8px; padding: 9px 12px; margin-top: 10px; font-size: 13px; }
.aes-alert.ok { background: #ecfdf3; color: var(--aes-ok); }
.aes-alert.warn { background: #fffbeb; color: var(--aes-warn); }
.aes-alert.err { background: #fef2f2; color: var(--aes-err); }
.aes-alert ul { margin: 4px 0 0 18px; padding: 0; }
.aes-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
@media (max-width: 700px) { .aes-two { grid-template-columns: 1fr; } }
#aesbadge-root textarea { width: 100%; min-height: 110px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }

/* Aperçu */
.aes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 12px; }
.aes-thumb { border: 1px solid var(--aes-border); border-radius: 8px; padding: 6px; background: #fff; }
.aes-thumb img { width: 100%; display: block; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.15); background: #f3f4f6; min-height: 60px; }
.aes-thumb img + img { margin-top: 6px; }
.aes-thumb .cap { font-size: 12px; color: var(--aes-muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aes-pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 12px; }
.aes-progress { height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; margin-top: 8px; display: none; }
.aes-progress.show { display: block; }
.aes-progress div { height: 100%; width: 0; background: var(--aes-primary); transition: width .15s; }

/* Récap */
.aes-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.aes-field label { font-weight: 600; font-size: 13px; }
.aes-side select, .aes-side input[type=number] { width: 100%; padding: 7px 8px; }
.aes-price { border-top: 1px solid var(--aes-border); padding-top: 10px; margin-top: 4px; }
.aes-price .line { display: flex; justify-content: space-between; margin-bottom: 4px; }
.aes-price .total { font-size: 20px; font-weight: 800; }
.aes-price .ttc { color: var(--aes-muted); font-size: 12px; text-align: right; }
.aes-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin: 10px 0; }
.aes-check input { margin-top: 3px; }
.aes-list { margin: 0; padding-left: 18px; font-size: 13px; }
.aes-list li { margin-bottom: 3px; }
.aes-list li.ok { color: var(--aes-ok); }
.aes-list li.todo { color: var(--aes-muted); }

.aes-modal { position: fixed; inset: 0; background: rgba(17,24,39,.5); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.aes-modal .box { background: #fff; border-radius: 12px; max-width: 520px; width: calc(100% - 32px); padding: 20px; max-height: 80vh; overflow: auto; }
.aes-modal pre { background: var(--aes-bg); padding: 10px; border-radius: 8px; font-size: 12px; overflow: auto; max-height: 260px; }


/* Étape 1 : options en cartes */
.aes-optgroup { margin-bottom: 18px; }
.aes-optlabel { font-weight: 700; margin-bottom: 8px; }
.aes-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.aes-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; border: 2px solid var(--aes-border); background: #fff; border-radius: 10px; padding: 10px 12px; cursor: pointer; font: inherit; color: inherit; min-height: 64px; }
.aes-opt:hover { border-color: #9ca3af; }
.aes-opt:disabled { opacity: .45; cursor: not-allowed; border-style: dashed; }
.aes-opt:disabled:hover { border-color: var(--aes-border); }
#aesbadge-root .aes-qtytip { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: #ecfdf5; color: #065f46; font-size: 13px; }
#aesbadge-root .aes-qtytip button { margin-left: 6px; }
.aes-opt.active { border-color: var(--aes-primary); background: #eef2ff; box-shadow: 0 0 0 3px rgba(29,78,216,.12); }
.aes-opt .pic { width: 60px; height: 40px; }
.aes-opt .t { font-weight: 600; line-height: 1.25; }
.aes-opt .p { font-size: 12px; color: var(--aes-muted); }
.aes-opt.active .p { color: var(--aes-primary-dark); font-weight: 600; }
.aes-opt .h { font-size: 12px; color: var(--aes-muted); }
.aes-optsum { list-style: none; margin: 0 0 12px; padding: 0; font-size: 13px; }
.aes-optsum li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px solid #f0f1f4; }
.aes-optsum li span { color: var(--aes-muted); }
.aes-optsum li strong { text-align: right; }
.aes-optsum li:last-child { border-bottom: none; }
.aes-link { border: none; background: none; padding: 0; color: var(--aes-primary); cursor: pointer; font: inherit; font-size: 13px; text-decoration: underline; }
.aes-seg button[hidden] { display: none; }
.aes-seg button:disabled { color: var(--aes-muted); cursor: default; }
.aes-format { margin: 0 0 14px; padding: 8px 12px; background: var(--aes-bg); border-radius: 8px; font-size: 13px; color: #374151; }
.aes-numbering { margin-top: 14px; padding: 12px; border: 1px solid var(--aes-border); border-radius: 10px; background: #fafbfc; }
.aes-mini { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.aes-mini input { width: 90px; border: 1px solid var(--aes-border); border-radius: 6px; padding: 5px 7px; font: inherit; }

/* Isolation vis-à-vis des styles de formulaire du site hôte */
#aesbadge-root label { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-weight: inherit; font-size: inherit; margin: 0; }
#aesbadge-root .aes-field label { display: block; font-weight: 600; font-size: 13px; }
#aesbadge-root .aes-check { display: flex; align-items: flex-start; font-size: 13px; margin: 10px 0; }
#aesbadge-root input, #aesbadge-root select, #aesbadge-root textarea { width: auto; }
#aesbadge-root .aes-side select, #aesbadge-root .aes-side input[type=number], #aesbadge-root textarea { width: 100%; }
#aesbadge-root input[type=checkbox] { width: auto; margin-top: 3px; }
#aesbadge-root .aes-toolbar label.aes-btn { padding: 5px 8px; }
.aes-templates { align-items: start; }
.aes-tpl img { max-height: 120px; object-fit: contain; }
.aes-validate { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--aes-border); border-radius: 10px; background: #f8fafc; }
.aes-validate .aes-check { flex: 1 1 320px; margin: 0; }
.aes-opt .pic { color: var(--aes-primary); }
#aesbadge-root [hidden] { display: none !important; }

/* ================================================================== */
/* Expérience : accueil interactif, badge porté, prix vivant           */
/* ================================================================== */
#aesbadge-root .aes-kicker { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--aes-primary, #5b21b6); }

#aesbadge-root .aes-hero {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 28px; align-items: center;
  padding: 36px 40px; margin-bottom: 26px; border-radius: 22px; overflow: hidden; position: relative;
  background: radial-gradient(circle at 88% 18%, rgba(45, 212, 191, .22), transparent 42%),
              radial-gradient(circle at 70% 95%, rgba(91, 33, 182, .14), transparent 45%),
              linear-gradient(135deg, #f5f3ff 0%, #eef2ff 60%, #ecfeff 100%);
}
#aesbadge-root .aes-hero h1 { font-size: 40px; line-height: 1.08; margin: 10px 0 12px; letter-spacing: -.02em; color: #1e1b4b; }
#aesbadge-root .aes-hero-sub { font-size: 16.5px; color: #4b5563; margin: 0 0 20px; max-width: 34em; }
#aesbadge-root .aes-hero-inputs { display: flex; gap: 12px; flex-wrap: wrap; }
#aesbadge-root .aes-hero-inputs label { flex: 1 1 130px; text-align: left; align-items: stretch; display: flex; flex-direction: column; gap: 4px; margin: 0; font-weight: 400; }
#aesbadge-root .aes-hero-inputs label span { text-align: left; font-size: 12px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; }
#aesbadge-root .aes-hero-inputs input { font-size: 18px; padding: 12px 14px; border: 2px solid #e5e7eb; border-radius: 12px; background: #fff; width: 100%; box-sizing: border-box; transition: border-color .15s, box-shadow .15s; }
#aesbadge-root .aes-hero-inputs input:focus { outline: none; border-color: var(--aes-primary, #5b21b6); box-shadow: 0 0 0 4px rgba(91, 33, 182, .14); }
#aesbadge-root .aes-usage-label { margin: 18px 0 8px; font-weight: 700; font-size: 14px; color: #374151; }
#aesbadge-root .aes-usages { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
#aesbadge-root .aes-usage {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; cursor: pointer;
  padding: 10px 12px; border: 2px solid transparent; border-radius: 14px; background: rgba(255, 255, 255, .85); font: inherit; color: inherit;
  box-shadow: 0 1px 3px rgba(17, 24, 39, .08); transition: transform .15s, box-shadow .15s, border-color .15s;
}
#aesbadge-root .aes-usage:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(17, 24, 39, .12); }
#aesbadge-root .aes-usage.active { border-color: var(--aes-primary, #5b21b6); background: #fff; }
#aesbadge-root .aes-usage .i { font-size: 22px; line-height: 1.2; }
#aesbadge-root .aes-usage .t { font-weight: 700; font-size: 14px; }
#aesbadge-root .aes-usage .s { font-size: 12px; color: #6b7280; }
#aesbadge-root .aes-hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 22px; }
#aesbadge-root .aes-hero-cta .aes-btn.big { width: auto; padding: 14px 26px; font-size: 16px; border-radius: 12px; box-shadow: 0 8px 20px rgba(91, 33, 182, .28); }
#aesbadge-root .aes-from { color: #374151; font-size: 15px; }
#aesbadge-root .aes-from strong { font-size: 20px; color: #1e1b4b; }
#aesbadge-root .aes-hero-visual { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; min-height: 440px; perspective: 1100px; }
#aesbadge-root .aes-hero-hint { margin-top: 18px; font-size: 13px; color: #6b7280; min-height: 1em; }

/* Badge porté sur un cordon */
#aesbadge-root .aes-lanyard { display: flex; flex-direction: column; align-items: center; transform-origin: 50% 0; animation: aes-swing 6s ease-in-out infinite; opacity: 0; transition: opacity .4s; }
#aesbadge-root .aes-lanyard.ready { opacity: 1; }
#aesbadge-root .aes-strap { position: relative; width: 120px; height: 150px; }
#aesbadge-root .aes-strap i {
  position: absolute; bottom: 0; left: 50%; width: 16px; height: 168px; margin-left: -8px; border-radius: 2px; transform-origin: 50% 100%;
  background: linear-gradient(90deg, rgba(0, 0, 0, .22), rgba(255, 255, 255, .12) 35%, rgba(255, 255, 255, 0) 65%, rgba(0, 0, 0, .22)), var(--aes-strap, var(--aes-primary, #5b21b6));
}
#aesbadge-root .aes-strap i:first-child { transform: rotate(17deg); }
#aesbadge-root .aes-strap i:last-child { transform: rotate(-17deg); }
#aesbadge-root .aes-clip { position: relative; z-index: 3; width: 22px; height: 36px; margin-top: -4px; border-radius: 6px 6px 5px 5px; background: linear-gradient(90deg, #9ca3af, #f9fafb 45%, #9ca3af); box-shadow: 0 2px 5px rgba(0, 0, 0, .3); }
#aesbadge-root .aes-tilt { margin-top: -22px; transition: transform .25s ease-out; transform-style: preserve-3d; }
#aesbadge-root .aes-card3d { position: relative; width: 340px; aspect-ratio: 85.6 / 54; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.2, .75, .25, 1); cursor: pointer; }
#aesbadge-root .aes-lanyard.portrait .aes-card3d { width: 220px; aspect-ratio: 54 / 85.6; }
#aesbadge-root .aes-card3d.flipped { transform: rotateY(180deg); }
#aesbadge-root .aes-card3d.wiggle { animation: aes-wiggle .55s ease-in-out; }
#aesbadge-root .aes-face { position: absolute; inset: 0; border-radius: 13px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #fff; box-shadow: 0 22px 44px rgba(17, 24, 39, .26), 0 2px 6px rgba(17, 24, 39, .14); }
#aesbadge-root .aes-face.back { transform: rotateY(180deg); }
#aesbadge-root .aes-face img { display: block; width: 100%; height: 100%; object-fit: cover; }
#aesbadge-root .aes-face::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, .38) 49%, rgba(255, 255, 255, 0) 60%); background-size: 250% 100%; animation: aes-sheen 6s ease-in-out infinite; }
@keyframes aes-swing { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }
@keyframes aes-wiggle { 0%, 100% { transform: rotateY(0); } 30% { transform: rotateY(-16deg); } 65% { transform: rotateY(10deg); } }
@keyframes aes-sheen { 0%, 60% { background-position: 120% 0; } 100% { background-position: -120% 0; } }

/* Étape 4 : en situation + mur */
#aesbadge-root .aes-scene { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 30px; align-items: center; padding: 18px 26px 26px; margin: 12px 0 18px; border-radius: 18px; background: linear-gradient(135deg, #f5f3ff, #ecfeff); perspective: 1100px; }
#aesbadge-root .aes-scene .aes-strap { height: 96px; width: 90px; }
#aesbadge-root .aes-scene .aes-strap i { height: 108px; }
#aesbadge-root .aes-scene .aes-card3d { width: 300px; }
#aesbadge-root .aes-scene .aes-lanyard.portrait .aes-card3d { width: 190px; }
#aesbadge-root .aes-scene-visual { padding: 0 14px; }
#aesbadge-root .aes-scene-name { font-size: 26px; font-weight: 800; color: #1e1b4b; margin: 6px 0 10px; }
#aesbadge-root .aes-scene-nav { display: flex; align-items: center; gap: 10px; }
#aesbadge-root .aes-scene-nav span { font-variant-numeric: tabular-nums; color: #4b5563; }
#aesbadge-root .aes-wall-title { margin: 4px 0 10px; font-size: 15px; }
#aesbadge-root .aes-grid .aes-thumb { animation: aes-pop .45s cubic-bezier(.2, .75, .25, 1) both; cursor: pointer; transition: transform .15s, box-shadow .15s; }
#aesbadge-root .aes-grid .aes-thumb:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(17, 24, 39, .14); }
#aesbadge-root .aes-grid .aes-thumb.current { outline: 3px solid var(--aes-primary, #5b21b6); outline-offset: 2px; }
@keyframes aes-pop { from { opacity: 0; transform: translateY(12px) scale(.96); } }

/* Prix vivant */
#aesbadge-root [data-unit], #aesbadge-root [data-total] { display: inline-block; font-variant-numeric: tabular-nums; }
#aesbadge-root .aes-bump { animation: aes-bump .45s ease-out; }
@keyframes aes-bump { 40% { transform: scale(1.09); color: var(--aes-primary, #5b21b6); } }
#aesbadge-root .aes-tier { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #f5f3ff; font-size: 13.5px; line-height: 1.45; }
#aesbadge-root .aes-tier.best { background: #ecfdf5; color: #065f46; }
#aesbadge-root .aes-tier .bar { height: 7px; margin: 8px 0 4px; border-radius: 5px; background: #e5e7eb; overflow: hidden; }
#aesbadge-root .aes-tier .bar span { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--aes-primary, #5b21b6), #2dd4bf); transition: width .6s cubic-bezier(.2, .75, .25, 1); }
#aesbadge-root .aes-tier .save { display: inline-block; padding: 1px 6px; border-radius: 6px; background: #dcfce7; color: #166534; font-weight: 700; font-size: 12px; }
#aesbadge-root .aes-eta { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #f0f9ff; color: #0c4a6e; font-size: 13.5px; line-height: 1.45; }
#aesbadge-root .aes-eta strong:first-letter { text-transform: uppercase; }
#aesbadge-root .aes-trust { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 4px; font-size: 13px; color: #374151; }
#aesbadge-root .aes-trust li::before { content: '✓'; color: #059669; font-weight: 800; margin-right: 7px; }
#aesbadge-root .aes-trust.inline { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; }

@media (max-width: 900px) {
  #aesbadge-root .aes-hero { grid-template-columns: 1fr; padding: 22px 18px; gap: 6px; }
  #aesbadge-root .aes-hero-visual { order: -1; min-height: 0; padding-bottom: 6px; }
  #aesbadge-root .aes-hero h1 { font-size: 29px; }
  #aesbadge-root .aes-hero .aes-strap { height: 70px; }
  #aesbadge-root .aes-hero .aes-strap i { height: 80px; }
  #aesbadge-root .aes-card3d { width: min(300px, 78vw); }
  #aesbadge-root .aes-lanyard.portrait .aes-card3d { width: min(190px, 52vw); }
  #aesbadge-root .aes-scene { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  #aesbadge-root .aes-scene-nav { justify-content: center; }
  #aesbadge-root .aes-hero-cta .aes-btn.big { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  #aesbadge-root .aes-lanyard, #aesbadge-root .aes-face::after, #aesbadge-root .aes-grid .aes-thumb { animation: none; }
  #aesbadge-root .aes-card3d { transition: none; }
}

/* Choix du produit (PVC / carton) et couleurs par catégorie */
#aesbadge-root .aes-products { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 999px; background: rgba(255, 255, 255, .75); box-shadow: 0 1px 3px rgba(17, 24, 39, .08); flex-wrap: wrap; }
#aesbadge-root .aes-product { padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: #374151; text-decoration: none; transition: background .15s, color .15s; }
#aesbadge-root .aes-product:hover { background: #f5f3ff; color: var(--aes-primary, #5b21b6); }
#aesbadge-root .aes-product.active { background: var(--aes-primary, #5b21b6); color: #fff; }
#aesbadge-root .aes-catmap { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#aesbadge-root .aes-catmap .aes-mini { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--aes-border, #d9dde3); border-radius: 8px; background: #fff; }
#aesbadge-root .aes-catname { font-size: 12px; font-weight: 700; letter-spacing: .03em; }
#aesbadge-root .aes-catmap input[type="color"] { width: 28px; height: 22px; border: none; padding: 0; background: none; }
#aesbadge-root .aes-props input[type="color"] { width: 34px; height: 26px; padding: 1px; border: 1px solid var(--aes-border, #d9dde3); border-radius: 6px; background: #fff; }

/* Produits complémentaires */
#aesbadge-root .aes-acc { margin: 22px 0 6px; padding: 20px; border-radius: 16px; background: #fafaff; border: 1px solid #ede9fe; }
#aesbadge-root .aes-acc h4 { margin: 0 0 2px; font-size: 17px; }
#aesbadge-root .aes-acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; margin-top: 12px; }
#aesbadge-root .aes-acc-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 12px; border-radius: 14px; background: #fff; border: 2px solid transparent; box-shadow: 0 1px 3px rgba(17, 24, 39, .07); transition: border-color .15s, box-shadow .15s; }
#aesbadge-root .aes-acc-card.reco { box-shadow: 0 0 0 1px #c4b5fd, 0 6px 16px rgba(91, 33, 182, .08); }
#aesbadge-root .aes-acc-card.on { border-color: var(--aes-primary, #5b21b6); }
#aesbadge-root .aes-acc-card.off { opacity: .6; }
#aesbadge-root .aes-acc-pic { background: #f5f3ff; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
#aesbadge-root .aes-acc-pic svg { width: 92px; height: 70px; }
#aesbadge-root .aes-acc-body h5 { margin: 2px 0 2px; font-size: 14.5px; }
#aesbadge-root .aes-acc-body p { margin: 0 0 6px; font-size: 12.5px; color: #6b7280; line-height: 1.4; }
#aesbadge-root .aes-acc-reason { font-size: 11.5px; font-weight: 700; color: #6b7280; }
#aesbadge-root .aes-acc-reason.reco { color: var(--aes-primary, #5b21b6); }
#aesbadge-root .aes-acc-colors { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin: 4px 0 8px; }
#aesbadge-root .aes-sw { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #d1d5db; cursor: pointer; padding: 0; }
#aesbadge-root .aes-sw.on { box-shadow: 0 0 0 2px var(--aes-primary, #5b21b6); }
#aesbadge-root .aes-sw-name { font-size: 12px; color: #4b5563; margin-left: 4px; }
#aesbadge-root .aes-acc-buy { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: space-between; }
#aesbadge-root .aes-acc-price { font-size: 12.5px; color: #374151; }
#aesbadge-root .aes-acc-qty { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; margin: 0; }
#aesbadge-root .aes-acc-qty input { width: 70px; padding: 4px 6px; }
#aesbadge-root .aes-acc-line { font-size: 13px; color: #6b7280; }
#aesbadge-root .aes-acc-pic.photo { background: #fff; border: 1px solid #f1f0f7; overflow: hidden; }
#aesbadge-root .aes-acc-pic img { display: block; width: 100%; height: 100%; max-height: 110px; object-fit: contain; }
