/* ============================================
   Matériauthèque — styled like the real app
   ============================================ */

.materials-section {
  background: var(--bg);
  color: var(--on-bg);
  padding: var(--section-y) 0;
  position: relative;
  overflow: hidden;
}
.materials-section .s-head h2 { color: var(--on-bg); }
.materials-section .s-head p { color: rgba(var(--on-bg-rgb), 0.72); }

.mat-badge-new {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(201, 168, 106, 0.14);
  border: 1px solid rgba(201, 168, 106, 0.4);
  color: #E2C58A;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  margin-left: 12px;
  vertical-align: middle;
}

/* Browser frame */
.mat-app {
  background: #0A0F1E;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 18px;
  box-shadow: 0 50px 120px -40px rgba(0,0,0,0.7);
  overflow: hidden;
  max-width: 1220px;
  margin: 0 auto;
}

.ml-shell {
  display: grid;
  grid-template-columns: 190px 1fr;
  min-height: 460px;
}

/* Sidebar — like real app */
.ml-side {
  background: #0A0F1E;
  color: #E8E2D2;
  padding: 16px 10px;
  display: flex; flex-direction: column;
  font-size: 11px;
}
.ml-brand {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 8px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 10px;
}
.ml-brand-mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: #fff;
  display: grid; place-items: center;
}
.ml-brand-mark img {
  width: 72%;
  height: 72%;
  object-fit: contain;
  display: block;
}
.ml-brand-name {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 500;
  color: #F2EBDA;
}
.ml-brand-sub {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: rgba(242,235,218,0.45);
}
.ml-side-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 1px;
}
.ml-side-list li {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px;
  border-radius: 7px;
  color: rgba(242,235,218,0.62);
  font-size: 10.5px;
  cursor: default;
}
.ml-side-list li.is-active {
  background: rgba(255,255,255,0.08);
  color: #F2EBDA;
  font-weight: 500;
}
.ml-side-foot {
  margin-top: auto;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 8px 4px;
  border-top: 1px solid rgba(255,255,255,0.07);
  font-size: 10.5px;
  color: rgba(242,235,218,0.75);
}
.ml-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #C9A86A;
  color: #1A1407;
  display: grid; place-items: center;
  font-size: 10px;
  font-weight: 600;
}

/* Main — cream like real app */
.ml-main {
  background: #F4F1EA;
  color: #1A2233;
  padding: 14px 20px 18px;
  display: flex; flex-direction: column;
  gap: 12px;
}
.ml-crumbs {
  display: flex; align-items: center; gap: 7px;
  font-size: 10.5px;
  color: #98A0B0;
}
.ml-crumbs b { color: #1A2233; font-weight: 500; }
.ml-add-btn {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: 9px;
  border: 0;
  background: #C9A86A;
  color: #1A1407;
  font-size: 11px;
  font-weight: 600;
  transition: background .2s;
}
.ml-add-btn:hover { background: #D9BC80; }

.ml-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}
.ml-workspace {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: #98A0B0;
  margin-bottom: 8px;
}
.ml-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: #14192B;
}
.ml-title em {
  font-style: italic;
  font-weight: 400;
  color: #C9A86A;
}
.ml-desc {
  font-size: 11.5px;
  line-height: 1.5;
  color: #5C6478;
  max-width: 380px;
  margin: 0;
}
.ml-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  gap: 10px;
}
.ml-stat {
  background: #fff;
  border: 1px solid rgba(20, 25, 43, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
}
.ml-stat.gold {
  background: #F3E8D2;
  border-color: rgba(201, 168, 106, 0.5);
}
.ml-stat .k {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  color: #98A0B0;
  margin-bottom: 6px;
  white-space: nowrap;
}
.ml-stat.gold .k { color: #A98C50; }
.ml-stat .v {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  color: #14192B;
  transition: all .3s;
}
.ml-stat .f {
  font-size: 9px;
  color: #98A0B0;
  margin-top: 5px;
}

.ml-search-row {
  display: flex; gap: 10px;
}
.ml-search {
  flex: 1;
  display: flex; align-items: center; gap: 9px;
  background: #fff;
  border: 1px solid rgba(20, 25, 43, 0.1);
  border-radius: 10px;
  padding: 8px 13px;
  font-size: 11px;
  color: #98A0B0;
}
.ml-select {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff;
  border: 1px solid rgba(20, 25, 43, 0.1);
  border-radius: 10px;
  padding: 8px 13px;
  font-size: 11px;
  color: #1A2233;
  white-space: nowrap;
}
.ml-select span { color: #98A0B0; font-size: 9px; }

.ml-chips {
  display: flex; gap: 7px; flex-wrap: wrap;
}
.ml-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(20, 25, 43, 0.1);
  background: #fff;
  color: #3A445C;
  font-size: 10.5px;
  cursor: pointer;
  transition: all .22s;
}
.ml-chip em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 9px;
  color: #98A0B0;
}
.ml-chip:hover { border-color: rgba(201, 168, 106, 0.6); }
.ml-chip.is-active {
  background: #14192B;
  border-color: #14192B;
  color: #F2EBDA;
}
.ml-chip.is-active em { color: rgba(242,235,218,0.6); }
.chip-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* Catalog + fiche */
.ml-body {
  display: grid;
  grid-template-columns: 1fr 292px;
  gap: 16px;
  align-items: start;
}
.ml-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.ml-card {
  background: #fff;
  border: 1px solid rgba(20, 25, 43, 0.08);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .2s, box-shadow .3s;
}
.ml-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 168, 106, 0.55);
  box-shadow: 0 14px 30px -12px rgba(20, 25, 43, 0.18);
}
.ml-card.is-selected {
  border-color: #C9A86A;
  box-shadow: 0 0 0 1.5px #C9A86A, 0 14px 30px -12px rgba(201, 168, 106, 0.35);
}
.ml-champ {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 2;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(255, 252, 245, 0.92);
  border: 1px solid rgba(201, 168, 106, 0.6);
  color: #B8934D;
  display: grid; place-items: center;
  font-size: 10px;
}
.ml-swatch {
  height: 54px;
  position: relative;
}
.ml-swatch::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  opacity: 0.12;
  mix-blend-mode: overlay;
}
.ml-card-body { padding: 8px 10px 10px; }
.ml-card-name {
  font-size: 11px;
  font-weight: 500;
  color: #14192B;
  line-height: 1.25;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ml-card-marque {
  font-size: 9.5px;
  color: #98A0B0;
  margin-bottom: 6px;
}
.ml-card-foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px;
}
.ml-card-foot .prix {
  font-size: 10.5px;
  font-weight: 600;
  color: #A98C50;
}
.ml-card-foot .cat {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7A8296;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Fiche panel — like real app modal */
.ml-fiche {
  background: #fff;
  border: 1px solid rgba(20, 25, 43, 0.08);
  border-radius: 14px;
  padding: 16px;
  position: sticky;
  top: 12px;
  box-shadow: 0 20px 50px -25px rgba(20, 25, 43, 0.25);
}
.ml-fiche-eyebrow {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: #98A0B0;
  margin-bottom: 12px;
}
.ml-fiche-swatch {
  height: 84px;
  border-radius: 10px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(20, 25, 43, 0.08);
}
.ml-fiche-swatch::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  opacity: 0.12;
  mix-blend-mode: overlay;
}
.ml-fiche-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: #14192B;
  margin: 0 0 12px;
  line-height: 1.2;
}
.ml-fiche-rows { border-top: 1px solid rgba(20, 25, 43, 0.08); }
.ml-fiche-rows .r {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(20, 25, 43, 0.08);
}
.ml-fiche-rows .k {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  color: #98A0B0;
}
.ml-fiche-rows .v { font-size: 11.5px; font-weight: 500; color: #14192B; }
.ml-fiche-rows .v.mono { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; }
.ml-fiche-rows .v.gold { color: #A98C50; font-weight: 600; }
.ml-fiche-projets { margin: 10px 0 12px; }
.ml-fiche-projets .k {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  color: #98A0B0;
  margin-bottom: 8px;
}
.ml-proj {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #F4F1EA;
  border: 1px solid rgba(20, 25, 43, 0.08);
  font-size: 10px;
  color: #3A445C;
  margin: 0 6px 6px 0;
}
.dot-ok {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #34A46C;
  display: inline-block;
}
.ml-link-btn {
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
  border: 0;
  background: #C9A86A;
  color: #1A1407;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: all .25s;
}
.ml-link-btn:hover { background: #D9BC80; }
.ml-link-btn.linked {
  background: rgba(52, 164, 108, 0.12);
  color: #23794E;
  box-shadow: inset 0 0 0 1px rgba(52, 164, 108, 0.4);
}
.ml-fiche-foot {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: #98A0B0;
  margin-top: 10px;
  line-height: 1.5;
}

@media (max-width: 1080px) {
  .ml-body { grid-template-columns: 1fr; }
  .ml-fiche { position: static; }
  .ml-header { grid-template-columns: 1fr; }
  .ml-stats { grid-template-columns: repeat(2, 1fr); }
  .ml-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 780px) {
  .ml-shell { grid-template-columns: 1fr; }
  .ml-side { display: none; }
  .ml-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .ml-grid { grid-template-columns: 1fr; }
}

.mat-hint {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: rgba(var(--on-bg-rgb), 0.5);
  margin-top: 20px;
  text-transform: uppercase;
}
.mat-hint .pulse-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #C9A86A;
  margin-right: 8px;
  animation: mat-pulse 1.8s ease-out infinite;
}
@keyframes mat-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 106, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(201, 168, 106, 0); }
}

/* Real screenshots strip */
.mat-real {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 56px;
  max-width: 1220px;
  margin-left: auto;
  margin-right: auto;
}
.mat-real figure { margin: 0; }
.mat-real .realshot {
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.6);
}
.mat-real figcaption {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: rgba(var(--on-bg-rgb), 0.6);
  margin-top: 12px;
  padding: 0 4px;
}
@media (max-width: 900px) {
  .mat-real { grid-template-columns: 1fr; }
}

/* ============ Modal « Ajouter un matériau » ============ */
.mam-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: rgba(10, 15, 30, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.mam-modal {
  position: relative;
  background: #FDFBF5;
  border-radius: 14px;
  box-shadow: 0 40px 90px -30px rgba(10, 15, 30, 0.6);
  width: min(720px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
}
.mam-close {
  position: absolute;
  top: 12px; right: 14px;
  width: 26px; height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6E7890;
  font-size: 17px;
  cursor: pointer;
  line-height: 1;
}
.mam-close:hover { background: #F0EBDE; color: #0B1224; }
.mam-head { padding: 18px 22px 12px; }
.mam-eyebrow {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: #98A0B0;
}
.mam-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  color: #0B1224;
  margin: 6px 0 3px;
}
.mam-title em { font-style: italic; color: #A98C50; font-weight: 400; }
.mam-sub { font-size: 10.5px; color: #6E7890; margin: 0; }
.mam-body {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
  padding: 10px 22px 16px;
  overflow-y: auto;
  border-top: 1px solid rgba(11, 18, 36, 0.07);
}
.mam-tabs {
  display: inline-flex;
  gap: 2px;
  background: #F0EBDE;
  border-radius: 9px;
  padding: 3px;
  margin-bottom: 12px;
}
.mam-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  border-radius: 7px;
  padding: 5px 11px;
  font-size: 10px;
  color: #3A445C;
  cursor: pointer;
}
.mam-tabs button.is-active { background: #fff; color: #0B1224; box-shadow: 0 1px 3px rgba(11,18,36,0.08); }
.mam-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.14em;
  color: #98A0B0;
  margin: 10px 0 5px;
}
.mam-input {
  border: 1px solid rgba(11, 18, 36, 0.13);
  border-radius: 9px;
  background: #fff;
  padding: 8px 11px;
  font-size: 10.5px;
  color: #0B1224;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mam-input.ph { color: #A8AEBC; }
.mam-input.mono { font-family: var(--font-mono); font-size: 9.5px; }
.mam-input.area { min-height: 52px; align-items: flex-start; }
.mam-caret { color: #98A0B0; font-size: 9px; }
.mam-cats { display: flex; flex-wrap: wrap; gap: 5px; }
.mam-cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(11, 18, 36, 0.13);
  border-radius: 999px;
  background: #fff;
  padding: 5px 10px;
  font-size: 9.5px;
  color: #3A445C;
  cursor: pointer;
  transition: all .2s;
}
.mam-cat.is-active { border-color: #C9A86A; background: rgba(201, 168, 106, 0.12); color: #0B1224; }
.mam-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mam-row2.price { grid-template-columns: 2fr 1fr; }
.mam-drop {
  border: 1.5px dashed rgba(11, 18, 36, 0.18);
  border-radius: 11px;
  background: #FBF8F0;
  padding: 22px 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.mam-drop:hover { border-color: #C9A86A; background: rgba(201, 168, 106, 0.07); }
.mam-drop.sm { padding: 14px 12px; }
.mam-drop-icon {
  width: 30px; height: 30px;
  margin: 0 auto 7px;
  border-radius: 50%;
  background: rgba(201, 168, 106, 0.16);
  color: #A98C50;
  display: grid;
  place-items: center;
}
.mam-drop b { display: block; font-size: 10px; font-weight: 600; color: #0B1224; }
.mam-drop span { display: block; font-size: 8.5px; color: #98A0B0; margin-top: 3px; }
.mam-preview {
  border: 1px solid rgba(11, 18, 36, 0.1);
  border-radius: 11px;
  background: #fff;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
}
.mam-preview-img {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: #F0EBDE;
  color: #98A0B0;
  display: grid;
  place-items: center;
}
.mam-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border-top: 1px solid rgba(11, 18, 36, 0.07);
  background: #FBF8F0;
}
.mam-foot-note {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  color: #98A0B0;
}
.mam-cancel {
  border: 0;
  background: transparent;
  font-size: 11px;
  color: #3A445C;
  cursor: pointer;
  padding: 8px 10px;
}
.mam-cancel:hover { color: #0B1224; }
.mam-submit {
  border: 0;
  border-radius: 9px;
  background: #C9A86A;
  color: #1A1407;
  font-size: 11px;
  font-weight: 600;
  padding: 9px 16px;
  cursor: pointer;
  transition: background .2s;
}
.mam-submit:hover { background: #D9BC80; }
@media (max-width: 780px) {
  .mam-body { grid-template-columns: 1fr; }
  .mam-foot { flex-wrap: wrap; }
  .mam-foot-note { flex-basis: 100%; }
}

/* ============================================
   Manifesto — scroll-driven word fill
   ============================================ */
.manifesto {
  background: var(--bg);
  color: var(--on-bg);
  padding: calc(var(--section-y) * 1.4) 0;
  position: relative;
}
.manifesto-text {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 4.8vw, 68px);
  letter-spacing: -0.02em;
  line-height: 1.14;
  max-width: 1020px;
  margin: 0 auto;
  text-align: center;
}
.manifesto-text .mword {
  display: inline-block;
  opacity: 0.14;
  will-change: opacity;
}
.manifesto-text .gold { color: var(--accent); font-style: italic; font-weight: 400; }
.manifesto-eyebrow {
  text-align: center;
  margin-bottom: 40px;
}

/* Pain scroll — pinned, scroll-driven, one pain at a time */
.pain-scroll {
  position: relative;
  margin-top: 48px;
}
.pain-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 0 24px;
}
.pain-stage-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.pain-stage-eyebrow::before,
.pain-stage-eyebrow::after {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.pain-stage-body {
  position: relative;
  width: 100%;
  max-width: 980px;
  min-height: 200px;
  display: grid;
  place-items: center;
}
/* Pains are muted italic; the final promise is upright, bright, gold-lit */
.pain-line {
  grid-area: 1 / 1;
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(30px, 4vw, 54px);
  letter-spacing: -0.02em;
  line-height: 1.14;
  color: rgba(var(--on-bg-rgb), 0.62);
  opacity: 0;
  transform: translateY(46px);
  filter: blur(6px);
  transition: opacity .55s cubic-bezier(.2,.7,.2,1), transform .55s cubic-bezier(.2,.7,.2,1), filter .55s;
  pointer-events: none;
  will-change: opacity, transform;
}
.pain-line.is-active {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.pain-line.is-past {
  opacity: 0;
  transform: translateY(-46px);
}
/* Final line — the promise: upright, full brightness, bigger, gold glow */
.pain-line.pain-final {
  font-style: normal;
  font-weight: 500;
  font-size: clamp(48px, 6.6vw, 96px);
  color: var(--on-bg);
  text-shadow: 0 0 80px rgba(201, 168, 106, 0.35);
  transform: translateY(60px) scale(0.94);
  transition-duration: 1s, 1s, 1s;
}
.pain-line.pain-final.is-active {
  transform: translateY(0) scale(1);
}
.pain-line.pain-final em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

/* Hide the pains eyebrow when the promise takes over */
.pain-eyebrow-pains {
  transition: opacity .5s, transform .5s;
}
.pain-stage.is-final .pain-eyebrow-pains {
  opacity: 0;
  transform: translateY(-10px);
}

.pain-stage-foot {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 560px;
  transition: opacity .5s;
}
.pain-count {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
  flex-shrink: 0;
}
.pain-bar {
  flex: 1;
  height: 1px;
  background: rgba(var(--on-bg-rgb), 0.15);
  position: relative;
  overflow: hidden;
}
.pain-bar span {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: var(--accent, #C9A86A);
  transition: width .2s linear;
}
.pain-controls { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.pain-next {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(242, 235, 218, 0.25);
  background: transparent;
  color: #F2EBDA;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color .25s, background .25s;
}
.pain-next:hover { border-color: #C9A86A; background: rgba(201, 168, 106, 0.12); }
.pain-skip {
  border: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(242, 235, 218, 0.5);
  cursor: pointer;
  padding: 8px 2px;
  border-bottom: 1px solid transparent;
  transition: color .25s, border-color .25s;
}
.pain-skip:hover { color: #F2EBDA; border-bottom-color: rgba(242, 235, 218, 0.4); }
.pain-promise {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(var(--on-bg-rgb), 0.55);
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .pain-stage { gap: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .pain-line { transition: opacity .3s; transform: none; filter: none; }
}


/* ============================================
   MOBILE — matériauthèque & pains
   ============================================ */
@media (max-width: 720px) {
  .ml-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ml-chips::-webkit-scrollbar { display: none; }
  .ml-chip { flex: 0 0 auto; }
  .ml-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .ml-main { padding: 12px 14px 16px; }
  .ml-title { font-size: 24px; }
  .mat-hint { font-size: 9px; padding: 0 16px; line-height: 1.7; }

  /* Pain scroll */
  .pain-line { font-size: clamp(26px, 7.4vw, 40px); }
  .pain-line.pain-final { font-size: clamp(34px, 9.5vw, 56px); }
  .pain-stage-foot { max-width: 340px; flex-wrap: wrap; justify-content: center; }

  /* Manifesto */
  .manifesto-text { font-size: clamp(26px, 7.2vw, 40px); }
}


/* ============ Real-app restyle: icon rail + topbar + cards ============ */
.ml-shell.is-rail { grid-template-columns: 52px 1fr; }
.ml-rail {
  background: #0E1729;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 14px;
}
.ml-rail-logo {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: #F2EBDA;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.ml-rail-logo img { width: 70%; height: 70%; object-fit: contain; }
.ml-rail-items { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.ml-rail-item {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: rgba(242, 235, 218, 0.55);
}
.ml-rail-item.is-active { background: rgba(201, 168, 106, 0.16); color: #C9A86A; }
.ml-avatar.rail-foot { margin-top: auto; }
.ml-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(11, 18, 36, 0.06);
  margin-bottom: 10px;
}
.ml-top-create {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(11, 18, 36, 0.12);
  border-radius: 999px;
  background: #fff;
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 500;
  color: #0B1224;
  cursor: pointer;
}
.ml-top-ico {
  position: relative;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #5C6478;
}
.ml-top-ico.bell i {
  position: absolute;
  top: -2px; right: -3px;
  font-style: normal;
  font-size: 7px;
  font-weight: 700;
  background: #C0392B;
  color: #fff;
  border-radius: 999px;
  padding: 1px 4px;
}
.ml-import-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(11, 18, 36, 0.12);
  border-radius: 9px;
  background: #fff;
  padding: 6px 11px;
  font-size: 10px;
  color: #3A445C;
  cursor: pointer;
  margin-left: auto;
}
.ml-import-btn + .ml-import-btn, .ml-import-btn + .ml-add-btn { margin-left: 0; }
.ml-viewtoggle {
  display: inline-flex;
  gap: 2px;
  border: 1px solid rgba(11, 18, 36, 0.1);
  border-radius: 9px;
  background: #fff;
  padding: 3px;
}
.ml-viewtoggle span {
  width: 24px; height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #98A0B0;
}
.ml-viewtoggle span.is-active { background: #14192B; color: #F2EBDA; }
.ml-grid.is-wide { grid-template-columns: repeat(3, 1fr); gap: 22px 18px; }
.ml-grid.is-wide .ml-card { background: transparent; border: 0; box-shadow: none; border-radius: 0; }
.ml-grid.is-wide .ml-card:hover { transform: none; box-shadow: none; }
.ml-grid.is-wide .ml-swatch { border-radius: 14px; }
.ml-unused {
  position: absolute;
  top: 8px; right: 8px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.05em;
  background: rgba(253, 251, 245, 0.92);
  color: #3A445C;
  border-radius: 6px;
  padding: 3px 7px;
}
.ml-grid.is-wide .ml-swatch { position: relative; height: auto; aspect-ratio: 1 / 1.05; }
.ml-grid.is-wide .ml-card-body { padding: 10px 2px 0; }
.ml-grid.is-wide .ml-card-tags span { background: #F4F1EA; color: #5C6478; }

/* Hover actions sur l'image */
.ml-hover-actions {
  position: absolute;
  left: 8px; right: 8px; bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .22s, transform .22s;
  pointer-events: none;
}
.ml-card:hover .ml-hover-actions { opacity: 1; transform: none; pointer-events: auto; }
.mha-champ {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  color: #0B1224;
  box-shadow: 0 3px 10px rgba(11, 18, 36, 0.18);
  cursor: pointer;
}
.mha-ico {
  width: 26px; height: 26px;
  flex: none;
  border-radius: 50%;
  background: #fff;
  color: #3A445C;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 10px rgba(11, 18, 36, 0.18);
  cursor: pointer;
}
.mha-ico:hover { color: #0B1224; }
.mha-use {
  margin-left: auto;
  order: 4;
  background: #C9A86A;
  color: #1A1407;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 9.5px;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(11, 18, 36, 0.2);
  cursor: pointer;
  white-space: nowrap;
}
.mha-use:hover { background: #D9BC80; }
.ml-hover-actions .mha-ico:last-child { order: 5; }
.ml-grid.is-wide .ml-card-name { font-size: 12.5px; line-height: 1.3; }
.ml-card-size { font-size: 10px; color: #3A445C; margin-top: 2px; }
.ml-grid.is-wide .ml-card-desc { font-size: 8.5px; }
.ml-card-cat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.14em;
  color: #98A0B0;
  margin-bottom: 3px;
}
.ml-card-desc {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.02em;
  color: #6E7890;
  margin-top: 3px;
  line-height: 1.5;
}
.ml-card-desc b { color: #A98C50; font-weight: 500; }
.ml-card-tags { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.ml-card-tags span {
  font-size: 8px;
  color: #5C6478;
  background: #F0EBDE;
  border-radius: 5px;
  padding: 2px 7px;
}
@media (max-width: 980px) { .ml-grid.is-wide { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .ml-grid.is-wide { grid-template-columns: repeat(2, 1fr); gap: 8px; } .ml-topbar { display: none; } .ml-import-btn { display: none; } }
