/* Prix dégressif des extensions (inc/shop/degressif.php, assets/js/degressif.js).
   Présentation C validée par William le 13/10/2026 : grille sous le prix, carte « Vos extensions »
   après l'ajout, compteur vert sur les longueurs déjà choisies. Aucun chiffre de stock. */

/* Le stock ne s'affiche pas sur les fiches d'extensions (« Plus que 3 en stock »). */
body.mld-deg [data-variant-stock-msg] { display: none !important; }

/* ------------------------------------------------------------ grille sous le prix */
.dg-grille { margin-top: 14px; max-width: 460px; }
.dg-l { margin: 0 0 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(29,26,23,.5); }
.dg-g { display: grid; border: 1px solid rgba(126,96,64,.28); border-radius: 12px; overflow: hidden; background: #fff; }
.dg-c { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 4px 6px; text-align: center; border-left: 1px solid rgba(126,96,64,.18); transition: background .2s; }
.dg-c:first-child { border-left: 0; }
.dg-c span { font-size: 11px; color: rgba(29,26,23,.6); }
.dg-c b { font-size: 14.5px; font-weight: 600; color: #1D1A17; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dg-c small { font-size: 10.5px; font-weight: 600; color: #2F6B4F; white-space: nowrap; }
.dg-c.on { background: #1D1A17; }
.dg-c.on span, .dg-c.on small { color: #D7C3A5; }
.dg-c.on b { color: #fff; }
.dg-n { margin: 6px 0 0; font-size: 12px; line-height: 1.45; color: rgba(29,26,23,.6); }

/* ------------------------------------------------------------ carte « Vos extensions » */
.dg-card { margin-top: 12px; padding: 14px; border-radius: 16px; background: #fff; border: 1px solid rgba(29,26,23,.12); display: grid; gap: 10px; overflow-anchor: none; max-width: 520px; }
.dg-card[hidden], .dg-ok[hidden] { display: none; }
.dg-ok { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 14px; line-height: 1.4; color: #1D1A17; }
.dg-ok i { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: #2F6B4F; color: #fff; display: grid; place-items: center; font-style: normal; font-size: 12px; }
.dg-ok small { display: block; margin-top: 2px; font-size: 12.5px; color: #7E6040; }
.dg-t { margin: 0; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(29,26,23,.5); }
.dg-lst { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.dg-lst li { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 8px; font-size: 13.5px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.dg-lst li small { display: block; font-size: 11.5px; color: rgba(29,26,23,.55); }
.dg-mini { display: flex; align-items: center; border: 1px solid rgba(29,26,23,.16); border-radius: 999px; background: #FAF8F6; }
.dg-mini button { width: 32px; height: 30px; border: 0; background: none; font: 600 15px Inter, system-ui, sans-serif; color: #1D1A17; cursor: pointer; }
.dg-mini button:disabled { opacity: .3; cursor: not-allowed; }
.dg-mini span { min-width: 18px; text-align: center; font-weight: 600; }
.dg-rm { width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; color: rgba(29,26,23,.45); font-size: 18px; line-height: 1; cursor: pointer; }
.dg-mini button:focus-visible, .dg-rm:focus-visible, .dg-voir:focus-visible { outline: 2px solid #7E6040; outline-offset: 2px; }
.dg-pt { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0; padding-top: 10px; border-top: 1px solid rgba(29,26,23,.1); font-size: 14px; }
.dg-pt b { font-size: 16px; font-variant-numeric: tabular-nums; }
.dg-track { position: relative; margin: 4px 6px 0; height: 4px; border-radius: 2px; background: rgba(29,26,23,.1); }
.dg-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: #7E6040; transition: width .25s; }
.dg-dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; border: 2px solid rgba(29,26,23,.2); box-sizing: border-box; }
.dg-dot.on { border-color: #7E6040; background: #7E6040; }
.dg-lb { position: relative; height: 30px; margin: 0 6px; }
.dg-lb span { position: absolute; top: 2px; transform: translateX(-50%); font-size: 11px; line-height: 1.25; text-align: center; color: rgba(29,26,23,.55); white-space: nowrap; }
.dg-lb span b { display: block; font-size: 11.5px; color: #1D1A17; }
.dg-lb span:first-child { transform: none; left: -6px !important; text-align: left; }
.dg-lb span:last-child { transform: translateX(-100%); text-align: right; }
.dg-hint { margin: 0; font-size: 13px; font-weight: 600; color: #2F6B4F; }
.dg-voir { justify-self: start; font-size: 13.5px; font-weight: 600; color: #7E6040; text-decoration: underline; text-underline-offset: 3px; }

/* Bouton d'ajout : « ✓ Ajouté » un instant, sans panneau ni défilement. */
.dg-ajoute { background: #2F6B4F !important; border-color: #2F6B4F !important; color: #fff !important; transition: background .2s; }

/* Compteur vert sur les longueurs déjà dans le panier (attribut : le texte du bouton ne change pas). */
body.mld-deg [data-variant-picker] .chip { position: relative; }
body.mld-deg [data-variant-picker] .chip[data-dg-nb]::after { content: attr(data-dg-nb); position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; padding: 0 5px; box-sizing: border-box; border-radius: 10px; background: #2F6B4F; color: #fff; font: 600 11px/19px Inter, system-ui, sans-serif; text-align: center; text-decoration: none; box-shadow: 0 0 0 2px #FAF8F6; }

@media (max-width: 767.98px) {
	body.pd-m2 .m2-o-deg { order: 4; }
	body.pd-m2 .m2-o-qp { order: 8; }
}

/* ------------------------------------------------------------ panier */
.dg-pan { margin: 0 0 14px; padding: 12px 16px; border-radius: 14px; background: #F1EBE2; color: #1D1A17; font-size: 14px; line-height: 1.45; }
.dg-pan b { font-weight: 600; }
.dg-pan span { color: #2F6B4F; font-weight: 600; }
body.pn-m2 .dg-pan { margin: 0 16px 12px; }
.pk-lr { display: block; margin-top: 3px; font-size: 12px; line-height: 1.4; color: rgba(29,26,23,.62); }
.dg-lr { display: block; margin-top: 3px; font-size: 12px; font-weight: 600; color: #2F6B4F; }
.dg-promo { margin: 6px 0 0; font-size: 12px; line-height: 1.45; color: rgba(29,26,23,.65); }

@media (prefers-reduced-motion: reduce) {
	.dg-fill, .dg-c, .dg-ajoute { transition: none; }
}
