/* Michel Rénovation · nettoyage de toiture à la lance (common/js/lance.js, attribut data-lance) */
:root {
  --cm-ink: #0C0C0D;
  --cm-orange: #F7B500;
  --cm-zinc: #9EA3A8;
  --cm-bone: #F3F0E8;
}
.cm-lance {
  --l-display: var(--cm-font-display, 'Big Shoulders Display', 'Arial Narrow', sans-serif);
  --l-serif: var(--cm-font-serif, 'Big Shoulders Display', sans-serif);
  --l-text: var(--cm-font-text, 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif);
  --l-mono: var(--cm-font-mono, 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace);
  --l-bg: var(--cm-bone); --l-fg: var(--cm-ink); --l-mute: rgba(18, 19, 21, .66); --l-line: rgba(18, 19, 21, .14);
  position: relative; isolation: isolate; background: var(--l-bg); color: var(--l-fg); font-family: var(--l-text);
  padding: clamp(64px, 8vw, 128px) 0;
}
.cm-lance--sombre { --l-bg: var(--cm-ink); --l-fg: var(--cm-bone); --l-mute: rgba(243, 240, 232, .68); --l-line: rgba(243, 240, 232, .14); }
.cm-lance *, .cm-lance *::before, .cm-lance *::after { box-sizing: border-box; }
.cm-lance__wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }

/* en-tête */
.cm-lance__head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 72px); align-items: end; margin-bottom: clamp(26px, 3.4vw, 46px); }
.cm-lance__kicker { display: flex; align-items: center; gap: 14px; margin: 0; font: 600 12.5px/1 var(--l-display); letter-spacing: .3em; text-transform: uppercase; color: var(--cm-orange); }
.cm-lance__kicker::before { content: ''; width: 36px; height: 1px; background: currentColor; }
.cm-lance__title { margin: 18px 0 0; font: 600 clamp(32px, 4.6vw, 60px)/1.05 var(--l-display); letter-spacing: .01em; text-wrap: balance; }
.cm-lance__title em { font: inherit; font-style: normal; color: var(--cm-orange); }
.cm-lance__lede { margin: 0; font-size: clamp(16px, 1.2vw, 18px); line-height: 1.65; color: var(--l-mute); max-width: 520px; text-wrap: pretty; }

/* scène */
.cm-lance__app { position: relative; }
.cm-lance__stage {
  position: relative; aspect-ratio: var(--l-ratio, 16 / 9); overflow: hidden; background: #2a2b2e; outline: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 30px 60px -30px rgba(18, 19, 21, .55), 0 0 0 1px rgba(18, 19, 21, .3);
  touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.cm-lance__app[data-ready]:not(.is-touch) .cm-lance__stage { cursor: none; }
.cm-lance__app[data-ready]:not(.is-touch) .cm-lance__tag { cursor: none; }
.cm-lance__app.is-grab .cm-lance__stage { touch-action: none; box-shadow: 0 0 0 2px var(--cm-orange), 0 30px 60px -30px rgba(18, 19, 21, .55); }
.cm-lance__stage:focus-visible { box-shadow: 0 0 0 3px var(--cm-orange); }
.cm-lance__poster, .cm-lance__gl, .cm-lance__fx { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cm-lance__poster { object-fit: cover; }
.cm-lance__gl { opacity: 0; transition: opacity .5s ease; }
.cm-lance__app[data-ready] .cm-lance__gl { opacity: 1; }
.cm-lance__fx { pointer-events: none; }
/* coin de cadre et étiquette */
.cm-lance__stage::after { content: ''; position: absolute; inset: 12px; pointer-events: none; border: 1px solid rgba(243, 240, 232, .0);
  background: linear-gradient(var(--cm-orange), var(--cm-orange)) left top / 22px 1px no-repeat, linear-gradient(var(--cm-orange), var(--cm-orange)) left top / 1px 22px no-repeat,
              linear-gradient(var(--cm-orange), var(--cm-orange)) right bottom / 22px 1px no-repeat, linear-gradient(var(--cm-orange), var(--cm-orange)) right bottom / 1px 22px no-repeat; opacity: .9; }
.cm-lance__tag {
  position: absolute; top: 22px; left: 22px; z-index: 3; padding: 7px 11px 6px; background: rgba(18, 19, 21, .62); color: var(--cm-bone);
  font: 500 10.5px/1 var(--l-mono); letter-spacing: .16em; text-transform: uppercase; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); pointer-events: none;
}
/* la lance */
.cm-lance__buse { position: absolute; left: 0; top: 0; z-index: 2; width: 660px; height: 45px; margin-top: -22.5px; transform-origin: 0 50%; pointer-events: none; opacity: 0; will-change: transform; filter: drop-shadow(0 12px 9px rgba(0, 0, 0, .38)); }
.cm-lance__buse svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* consigne */
.cm-lance__hint {
  position: absolute; left: 50%; bottom: 22px; z-index: 3; transform: translateX(-50%); margin: 0; display: flex; align-items: center; gap: 10px; white-space: nowrap;
  padding: 11px 16px; background: rgba(18, 19, 21, .7); color: var(--cm-bone); font: 500 13.5px/1.2 var(--l-text); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: opacity .5s ease, transform .5s ease; pointer-events: none;
}
.cm-lance__hint i { width: 8px; height: 8px; border-radius: 50%; background: var(--cm-orange); box-shadow: 0 0 0 0 rgba(247, 181, 0, .6); animation: cm-lance-pulse 1.8s ease-out infinite; }
.cm-lance__hint .t { display: none; }
.cm-lance__app.is-touch .cm-lance__hint .t { display: inline; } .cm-lance__app.is-touch .cm-lance__hint .d { display: none; }
.cm-lance__hint.is-off { opacity: 0; transform: translate(-50%, 8px); }
.cm-lance__app[data-mode="demo"] .cm-lance__hint { opacity: 0; }
@keyframes cm-lance-pulse { to { box-shadow: 0 0 0 10px rgba(247, 181, 0, 0); } }
/* prendre la lance (écrans tactiles) */
.cm-lance__grab { display: none; }
.cm-lance__app.is-touch .cm-lance__grab {
  position: absolute; right: 14px; bottom: 14px; z-index: 4; display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 16px 0 12px;
  border: 0; border-radius: 0; background: var(--cm-orange); color: var(--cm-ink); font: 600 12.5px/1 var(--l-display); letter-spacing: .1em; text-transform: uppercase;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6);
}
.cm-lance__app.is-touch .cm-lance__grab svg { width: 24px; height: 24px; }
.cm-lance__app.is-grab .cm-lance__grab { background: var(--cm-ink); color: var(--cm-bone); box-shadow: 0 0 0 1px rgba(243, 240, 232, .3); }
.cm-lance__app.is-touch .cm-lance__hint { bottom: auto; top: 22px; left: auto; right: 14px; transform: none; white-space: normal; max-width: 58%; font-size: 12.5px; }
.cm-lance__app.is-touch .cm-lance__hint.is-off { transform: translateY(-6px); }
.cm-lance__app.is-grab .cm-lance__hint { opacity: 0; }

/* barre : compteur et actions */
.cm-lance__ctl { display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; padding: 18px 0 0; border-bottom: 1px solid var(--l-line); padding-bottom: 18px; }
.cm-lance__meter { display: flex; align-items: center; gap: 18px; min-width: 0; flex: 1 1 320px; }
.cm-lance__num { display: flex; align-items: baseline; gap: 4px; font: 500 clamp(30px, 3vw, 40px)/1 var(--l-mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; min-width: 3.4ch; }
.cm-lance__num small { font-size: .5em; color: var(--l-mute); }
.cm-lance__meter > span { font: 600 11.5px/1.35 var(--l-display); letter-spacing: .18em; text-transform: uppercase; color: var(--l-mute); }
.cm-lance__bar { position: relative; flex: 1 1 140px; height: 2px; background: var(--l-line); overflow: hidden; max-width: 340px; }
.cm-lance__bar i { position: absolute; inset: 0; background: var(--cm-orange); transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.cm-lance__app[data-done] .cm-lance__num { color: var(--cm-orange); }
.cm-lance__acts { display: flex; gap: 10px; flex-wrap: wrap; }
.cm-lance__btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 20px; cursor: pointer;
  font: 600 12.5px/1 var(--l-display); letter-spacing: .14em; text-transform: uppercase; border: 1px solid var(--l-fg); background: transparent; color: var(--l-fg);
  transition: background .25s ease, color .25s ease, border-color .25s ease, opacity .25s ease;
}
.cm-lance__btn svg { width: 17px; height: 17px; }
.cm-lance__btn--main { background: var(--l-fg); color: var(--l-bg); }
.cm-lance__btn:hover:not(:disabled), .cm-lance__btn:focus-visible { background: var(--cm-orange); border-color: var(--cm-orange); color: var(--cm-ink); outline: none; }
.cm-lance__btn:disabled { opacity: .4; cursor: default; }
.cm-lance__note { margin: 14px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--l-mute); }
.cm-lance__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.cm-lance__app[data-error] .cm-lance__ctl, .cm-lance__app[data-error] .cm-lance__hint, .cm-lance__app[data-error] .cm-lance__grab { display: none; }

@media (max-width: 860px) {
  .cm-lance__head { grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
}
@media (max-width: 600px) {
  .cm-lance__buse { width: 470px; height: 32px; margin-top: -16px; }
  .cm-lance__stage { --l-ratio: 4 / 3.4; margin-inline: -16px; }
  .cm-lance__stage::after { inset: 10px; }
  .cm-lance__tag { top: 18px; left: 18px; }
  .cm-lance__ctl { gap: 14px; }
  .cm-lance__meter { flex-basis: 100%; }
  .cm-lance__acts { width: 100%; }
  .cm-lance__btn { flex: 1 1 0; justify-content: center; padding: 0 10px; gap: 8px; font-size: 11.5px; letter-spacing: .07em; white-space: nowrap; }
  .cm-lance__btn svg { width: 15px; height: 15px; }
  .cm-lance__app.is-touch .cm-lance__grab { min-height: 42px; font-size: 11.5px; letter-spacing: .08em; right: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .cm-lance__hint i { animation: none; }
  .cm-lance__gl, .cm-lance__bar i, .cm-lance__hint { transition: none; }
}
