/* Page de travail : cinq propositions d'animations, dans le système visuel de la v2.
   Chaque scène démarre dans son état final si l'utilisateur a demandé moins de mouvement. */

.labo-intro { padding-block: 56px 24px; }
.labo-intro h1 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; font-weight: 650; letter-spacing: -.03em; }
.labo { padding-block: 72px; }
.panneau-labo { background: var(--fond-2); }
.labo-grille { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; align-items: center; }
.labo-texte { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.labo-texte p { margin: 0; max-width: 46ch; }
.labo-num { font-size: 13px; color: var(--sauge); }
.scene { background: var(--surface); border-radius: var(--r); box-shadow: var(--ombre-haute); padding: 28px; position: relative; overflow: hidden; }

/* ---- 1. balance ---- */
.scene-balance { display: flex; flex-direction: column; gap: 10px; }
.balance { display: grid; justify-items: center; gap: 14px; padding: 8px 0 12px; }
.cadran { position: relative; width: 240px; height: 132px; overflow: hidden; }
.graduations { position: absolute; left: 0; top: 0; width: 240px; height: 240px; border-radius: 50%;
  background: repeating-conic-gradient(from -90deg at 50% 50%, var(--trait-fort) 0deg 1deg, transparent 1deg 9deg);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 98px, #000 99px, #000 119px, transparent 120px);
          mask: radial-gradient(circle at 50% 50%, transparent 98px, #000 99px, #000 119px, transparent 120px); }
.aiguille { position: absolute; left: 50%; bottom: 12px; width: 2px; height: 104px; margin-left: -1px; background: var(--sauge); border-radius: 2px; transform-origin: 50% 100%; transform: rotate(0deg); }
.pivot { position: absolute; left: 50%; bottom: 6px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--encre); }
.afficheur { display: flex; align-items: baseline; gap: 6px; padding: 6px 16px; border-radius: var(--r-petit); background: var(--surface-2); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12); }
.afficheur .mono { font-size: 34px; font-weight: 550; color: var(--encre); letter-spacing: -.02em; min-width: 3ch; text-align: right; }
.afficheur small { font-size: 15px; color: var(--discret); }
.plateau { width: 220px; height: 10px; border-radius: 10px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--trait), 0 6px 12px -8px rgba(0, 0, 0, .4); }
.balance-lib { margin: 0; font-size: 14px; color: var(--discret); text-align: center; }
.balance-lib b { color: var(--encre); font-weight: 500; }

/* ---- 2. bon de livraison ---- */
.scene-bon { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.imprimante { position: relative; }
.fente { height: 12px; border-radius: 6px; background: var(--encre); opacity: .85; box-shadow: 0 2px 0 var(--trait-fort); position: relative; z-index: 2; }
.ticket-zone { overflow: hidden; margin: -4px 10px 0; }
.ticket { background: #fbfaf6; color: #2a2a26; padding: 16px 14px 18px; font-size: 12px; box-shadow: 0 8px 16px -10px rgba(0, 0, 0, .4);
  -webkit-mask: linear-gradient(#000 calc(100% - 8px), transparent 0), conic-gradient(from 135deg at 50% 100%, #000 90deg, transparent 0) 0 100% / 12px 8px repeat-x;
          mask: linear-gradient(#000 calc(100% - 8px), transparent 0), conic-gradient(from 135deg at 50% 100%, #000 90deg, transparent 0) 0 100% / 12px 8px repeat-x; }
.t-tete { margin: 0 0 10px; color: #6b6a63; line-height: 1.5; }
.t-lignes { list-style: none; margin: 0; padding: 8px 0; border-block: 1px dashed #c9c6bb; display: flex; flex-direction: column; gap: 6px; }
.t-lignes li, .t-total { display: flex; justify-content: space-between; gap: 8px; }
.t-lignes li.marque { color: #1d5a33; }
.t-total { margin: 8px 0 0; font-weight: 600; }
.catalogue { border-radius: var(--r-petit); box-shadow: 0 0 0 1px var(--trait); }
.cat-titre { margin: 0; padding: 10px 14px; font-size: 12.5px; font-weight: 550; color: var(--discret); box-shadow: 0 1px 0 var(--trait); }
.catalogue ul { list-style: none; margin: 0; padding: 4px 0; }
.catalogue li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; padding: 9px 14px; font-size: 13.5px; color: var(--encre); transition: background-color 400ms ease; }
.catalogue li b { font-weight: 500; }
.catalogue li em { grid-column: 1 / -1; justify-self: end; font-style: normal; font-size: 12px; color: var(--alerte); opacity: 0; transform: translateY(-4px); transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out); }
.catalogue li.maj { background: color-mix(in srgb, var(--sauge) 10%, transparent); }
.catalogue li.alerte-on { background: color-mix(in srgb, var(--alerte) 10%, transparent); }
.catalogue li.alerte-on em { opacity: 1; transform: none; }
.catalogue li.alerte-on b { color: var(--alerte); }

/* ---- 3. fiche technique ---- */
.scene-fiche { padding: 24px; background: var(--surface-2); }
.a4 { background: #fdfdfb; color: #1d211e; border-radius: 3px; padding: 28px 30px; box-shadow: 0 1px 2px rgba(0, 0, 0, .1), 0 16px 32px -16px rgba(0, 0, 0, .35); max-width: 520px; margin: 0 auto; }
.a4-tete { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 2px solid #1d211e; }
.a4-sur { margin: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #6f746f; }
.a4 h3 { color: #1d211e; font-size: 19px; margin-top: 2px; }
.a4-meta { margin: 0; font-size: 11px; color: #6f746f; text-align: right; line-height: 1.5; }
.a4-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 12.5px; }
.a4-table th { text-align: left; font: 500 10.5px var(--corps); letter-spacing: .06em; text-transform: uppercase; color: #6f746f; padding: 0 0 8px; }
.a4-table th:not(:first-child), .a4-table td:not(:first-child) { text-align: right; }
.a4-table td { padding: 7px 0; border-top: 1px solid #e3e5e1; }
.a4-table td:first-child { font-family: var(--corps); }
.a4-dressage { margin: 14px 0 0; font-size: 12.5px; line-height: 1.55; color: #444a45; }
.a4-pied { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; padding-top: 12px; border-top: 2px solid #1d211e; }
.a4-pied div { display: flex; flex-direction: column; gap: 1px; }
.a4-pied span { font-size: 10.5px; color: #6f746f; text-transform: uppercase; letter-spacing: .06em; }
.a4-pied b { font-size: 15px; font-weight: 550; }
.a4-pied b.acc { color: #3f6f4e; }

/* ---- 4. mercuriale ---- */
.scene-merc { display: flex; flex-direction: column; gap: 12px; }
.merc-tete { display: flex; justify-content: space-between; font-size: 14px; color: var(--discret); }
.merc-dernier { color: var(--encre); font-weight: 550; }
.merc-graphe { position: relative; }
.merc-graphe svg { display: block; width: 100%; height: auto; overflow: visible; }
.grille line { stroke: var(--trait); stroke-width: 1; vector-effect: non-scaling-stroke; }
.seuil { stroke: var(--alerte); stroke-width: 1; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; }
.courbe { fill: none; stroke: var(--sauge); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.aire { fill: color-mix(in srgb, var(--sauge) 14%, transparent); stroke: none; }
.point { fill: var(--alerte); stroke: var(--surface); stroke-width: 3; }
.merc-axe { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; color: var(--discret); }
.merc-seuil { position: absolute; left: 0; top: calc(36.6% - 34px); font-size: 11.5px; color: var(--alerte); }
.merc-alerte { margin: 0; align-self: flex-start; padding: 6px 10px; border-radius: 5px; background: color-mix(in srgb, var(--alerte) 12%, transparent); color: var(--alerte); font-size: 12.5px; }

/* ---- 5. coup de feu ---- */
.scene-coup { min-height: 300px; padding-top: 22px; background: var(--surface-2); }
.barre-cuisine { height: 14px; border-radius: 3px; background: linear-gradient(#c9cdc9, #9aa19b 60%, #7d847e); box-shadow: 0 2px 4px rgba(0, 0, 0, .25); }
.bons { display: flex; gap: 12px; margin-top: -6px; padding-inline: 8px; }
.bon { flex: 1; min-width: 0; background: #fbfaf6; color: #2a2a26; padding: 16px 12px 14px; border-radius: 0 0 3px 3px; box-shadow: 0 10px 18px -12px rgba(0, 0, 0, .5); transform-origin: 50% 0; }
.bon p { margin: 0; }
.b-table { font-size: 11px; color: #7a786f; }
.b-plat { margin-top: 6px !important; font: 600 14px/1.3 var(--titre); letter-spacing: -.01em; }
.b-marge { margin-top: 10px !important; padding-top: 8px; border-top: 1px dashed #cfccc1; font-size: 12px; color: #2f6a42; }
.bon.mauvais .b-marge { color: #a1461f; }

/* ---- états initiaux (animation lancée par animations.js) ---- */
@media (prefers-reduced-motion: no-preference) {
  .pret .ticket { transform: translateY(-101%); }
  .pret .t-lignes li, .pret .t-total { opacity: 0; }
  .pret .a4 .a4-tete, .pret .a4 tbody tr, .pret .a4-dressage, .pret .a4-pied { opacity: 0; transform: translateY(6px); }
  .pret .courbe { stroke-dasharray: 800; stroke-dashoffset: 800; }
  .pret .aire, .pret .point, .pret .merc-alerte, .pret .merc-seuil { opacity: 0; }
  .pret .bon { opacity: 0; transform: translateX(60px) rotate(2deg); }
}

@media (max-width: 1020px) { .labo-grille { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
@media (max-width: 720px) {
  .labo { padding-block: 56px; }
  .scene { padding: 18px; }
  .scene-bon { grid-template-columns: minmax(0, 1fr); }
  .bons { flex-wrap: wrap; }
  .bon { flex: 1 1 calc(50% - 12px); }
  .a4 { padding: 20px; }
  .nav-liens a:not(.btn) { display: none; }
}
