/* Samuel Toiture · fuite3d : section, scène 3D, repères, fiches, barre d'actions. Charte Samuel Toiture (variables --st-* redéfinissables). */
:where(:root) {
  --st-red: #C4161C; --st-red-deep: #8E0F14; --st-red-live: #E4403F; --st-yellow: #F2B705; --st-amber: #F29F05; --st-ink: #1F2421; --st-night: #171A18;
  --st-metal: #8D9196; --st-metal-hi: #C9CCCF; --st-cream: #FAF6EE; --st-paper: #FFFDF8; --st-brick: #A8442E;
  --f-display: "Bricolage Grotesque", "Arial Narrow", Arial, sans-serif; --f-text: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: "Newsreader", Georgia, "Times New Roman", serif; --f-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --st-ease: cubic-bezier(.2, .8, .2, 1); --st-line: rgba(214, 208, 196, .12); --st-line-2: rgba(214, 208, 196, .24); --st-glass: rgba(23, 26, 24, .74);
}
.f3d { position: relative; background: radial-gradient(110% 70% at 20% 0%, rgba(209, 40, 43, .16), transparent 60%), var(--st-night); color: #EEEEEE; font-family: var(--f-text); padding: clamp(56px, 8vw, 120px) 0; overflow: hidden; }
.f3d *, .f3d *::before, .f3d *::after { box-sizing: border-box; }
.f3d__wrap { width: min(1440px, 100% - 2 * clamp(16px, 3vw, 40px)); margin: 0 auto; }
.f3d__head { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 18px 56px; align-items: end; margin-bottom: clamp(26px, 3.4vw, 44px); }
.f3d__kicker { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 12px; font: 500 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--st-metal-hi); }
.f3d__kicker i { width: 34px; height: 1px; background: linear-gradient(90deg, var(--st-amber), transparent); box-shadow: 0 0 10px var(--st-amber); position: relative; }
.f3d__kicker i::before { content: ""; position: absolute; left: 0; top: -2.5px; width: 6px; height: 6px; border-radius: 50%; background: var(--st-amber); box-shadow: 0 0 10px var(--st-amber); }
.f3d__title { margin: 0; font-family: var(--f-display); font-stretch: 122%; font-weight: 800; text-transform: uppercase; letter-spacing: -.012em; font-size: clamp(30px, 4.4vw, 64px); line-height: .98; color: #fff; text-shadow: 0 2px 30px rgba(0, 0, 0, .5); }
.f3d__title em { display: block; font-family: var(--f-serif); font-style: italic; font-weight: 400; font-stretch: 100%; text-transform: none; letter-spacing: 0; color: var(--st-metal-hi); font-size: 1.04em; margin-top: .06em; }
.f3d__lede { margin: 0; font-size: clamp(15px, 1.15vw, 17px); line-height: 1.62; color: rgba(238, 238, 238, .74); max-width: 60ch; }

.f3d__app { position: relative; border-radius: 22px; isolation: isolate; }
.f3d__stage { position: relative; height: clamp(620px, 86vh, 900px); border-radius: 22px; overflow: hidden; background: #080808; border: 1px solid rgba(244, 192, 34, .16); box-shadow: 0 40px 120px -40px rgba(0, 0, 0, .9); }
.f3d__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; touch-action: pan-y; cursor: grab; }
.f3d__stage canvas:active { cursor: grabbing; }
.f3d__stage canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--st-yellow); }
.f3d__frame { position: absolute; inset: 14px; pointer-events: none; z-index: 1; }
.f3d__frame b { position: absolute; width: 18px; height: 18px; border: 0 solid rgba(210, 212, 210, .4); }
.f3d__frame b:nth-child(1) { left: 0; top: 0; border-left-width: 1px; border-top-width: 1px; }
.f3d__frame b:nth-child(2) { right: 0; top: 0; border-right-width: 1px; border-top-width: 1px; }
.f3d__frame b:nth-child(3) { left: 0; bottom: 0; border-left-width: 1px; border-bottom-width: 1px; }
.f3d__frame b:nth-child(4) { right: 0; bottom: 0; border-right-width: 1px; border-bottom-width: 1px; }
.f3d__panel, .f3d__steps, .f3d__tools { background: linear-gradient(180deg, rgba(25, 29, 26, .74), rgba(14, 16, 15, .8)); -webkit-backdrop-filter: blur(16px) saturate(1.25); backdrop-filter: blur(16px) saturate(1.25); border: 1px solid rgba(210, 212, 210, .11); box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .05); }

/* étapes : rail mono en haut à droite */
.f3d__steps { position: absolute; z-index: 3; top: 28px; right: 28px; margin: 0; padding: 6px; list-style: none; display: flex; gap: 2px; border-radius: 14px; counter-reset: s; }
.f3d__steps li { position: relative; display: flex; align-items: baseline; gap: 8px; padding: 10px 12px 12px; border-radius: 10px; font: 600 12.5px/1 var(--f-text); color: rgba(238, 238, 238, .4); transition: color .3s, background .3s; white-space: nowrap; }
.f3d__steps li b { font: 500 10.5px/1 var(--f-mono); letter-spacing: .06em; color: rgba(210, 212, 210, .35); }
.f3d__steps li::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 1px; background: rgba(210, 212, 210, .12); transform-origin: left; }
.f3d__steps li.is-done { color: rgba(238, 238, 238, .78); }
.f3d__steps li.is-done b { color: var(--st-yellow); }
.f3d__steps li.is-done::after { background: var(--st-yellow); box-shadow: 0 0 6px var(--st-yellow); }
.f3d__steps li.is-on { color: #fff; background: rgba(244, 192, 34, .12); }
.f3d__steps li.is-on b { color: var(--st-amber); }
.f3d__steps li.is-on::after { background: var(--st-amber); box-shadow: 0 0 8px var(--st-amber); animation: f3dGrow 1.2s ease-out; }
[data-step="0"] .f3d__steps { opacity: .55; }

/* panneau : à gauche */
.f3d__panel { position: absolute; z-index: 3; top: 28px; left: 28px; bottom: 28px; width: 392px; border-radius: 18px; padding: 24px 22px 18px; display: flex; flex-direction: column; overflow: hidden; }
.f3d__panel::before { content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--st-yellow) 30%, var(--st-yellow) 70%, transparent); box-shadow: 0 0 12px var(--st-yellow); opacity: .85; }
.f3d__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(210, 212, 210, .2) transparent; margin-right: -6px; padding-right: 6px; }
.f3d__lbl { display: inline-flex; align-items: center; gap: 8px; font: 500 10.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(210, 212, 210, .6); }
.f3d__lbl svg { width: 14px; height: 14px; color: var(--st-amber); }
.f3d__syms { display: grid; gap: 4px; margin: 12px 0 16px; }
.f3d__syms button { display: grid; grid-template-columns: 30px 1fr 16px; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 10px 10px; border-radius: 11px; border: 1px solid rgba(210, 212, 210, .07); background: rgba(255, 255, 255, .02); color: #fff; cursor: pointer; transition: border-color .25s, background .25s; }
.f3d__syms b { font: 500 11px/1 var(--f-mono); color: var(--st-yellow); letter-spacing: .06em; }
.f3d__syms strong { display: block; font: 600 14px/1.25 var(--f-text); }
.f3d__syms small { display: block; margin-top: 3px; font-size: 12px; color: rgba(210, 212, 210, .55); }
.f3d__syms svg { width: 16px; height: 16px; opacity: .35; transition: opacity .2s, transform .2s; }
.f3d__syms button:hover { border-color: rgba(244, 192, 34, .45); background: rgba(244, 192, 34, .06); }
.f3d__syms button:hover svg { opacity: 1; transform: translateX(2px); }
.f3d__syms button[aria-pressed="true"] { border-color: rgba(242, 159, 5, .5); background: radial-gradient(120% 140% at 0% 0%, rgba(242, 159, 5, .1), transparent 60%), rgba(255, 255, 255, .02); }
.f3d__syms button[aria-pressed="true"] b { color: var(--st-amber); }
.has-sym .f3d__syms { grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 12px; }
.has-sym .f3d__syms button { grid-template-columns: 1fr; justify-items: center; padding: 10px 0; }
.has-sym .f3d__syms button > span, .has-sym .f3d__syms button > svg { display: none; }
.has-sym .f3d__syms b { font-size: 12px; }
.f3d__card { display: none; padding: 16px 0 4px; border-top: 1px solid rgba(210, 212, 210, .09); }
.has-sym .f3d__card { display: block; }
.has-sym .f3d__empty { display: none; }
.f3d__card header span { font: 500 10.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--st-yellow); }
.f3d__card header h3 { margin: 8px 0 14px; font: 800 20px/1.08 var(--f-display); font-stretch: 120%; text-transform: uppercase; color: #fff; }
.f3d__card > div { display: none; margin-bottom: 14px; }
.f3d__card > div.is-shown { display: block; animation: f3dIn .55s cubic-bezier(.2, .8, .2, 1); }
.f3d__card h4 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 6px; font: 500 10.5px/1.3 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(210, 212, 210, .58); }
.f3d__card h4 em { font: 700 13px/1.2 var(--f-text); letter-spacing: 0; text-transform: none; color: var(--st-amber); font-style: normal; }
.f3d__card p { margin: 0; font-size: 14px; line-height: 1.58; color: rgba(238, 238, 238, .8); }
.f3d__found { padding: 12px 14px; border-radius: 11px; background: rgba(242, 159, 5, .07); border-left: 2px solid var(--st-amber); }
.f3d__urg { padding: 12px 14px; border-radius: 11px; background: rgba(244, 192, 34, .08); border-left: 2px solid var(--st-yellow); }
.f3d__urg h4 { color: #FBDC81; }
.f3d__err { padding: 12px 14px; border-radius: 11px; background: rgba(255, 255, 255, .03); border: 1px dashed rgba(242, 159, 5, .35); }
.f3d__err h4 { color: var(--st-amber); }
.f3d__empty { margin: 0; font-size: 14px; line-height: 1.6; color: rgba(238, 238, 238, .62); }
.f3d__go { flex: none; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; margin-top: 12px; border-radius: 12px; border: 1px solid rgba(248, 207, 86, .5); background: linear-gradient(180deg, #DA3334, var(--st-red)); color: #fff; font: 650 14.5px/1 var(--f-text); cursor: pointer; box-shadow: 0 10px 30px -10px rgba(209, 40, 43, .9), inset 0 1px 0 rgba(255, 255, 255, .2); transition: background .25s, box-shadow .25s, opacity .25s; }
.f3d__go svg { width: 18px; height: 18px; }
.f3d__go:hover:not(:disabled) { background: linear-gradient(180deg, #E13D3C, #D62D2F); }
.f3d__go:disabled { opacity: .5; cursor: default; background: rgba(255, 255, 255, .05); border-color: rgba(210, 212, 210, .15); box-shadow: none; }
.f3d__go.is-urgent { background: linear-gradient(180deg, #FFC56B, var(--st-amber)); border-color: rgba(255, 214, 150, .8); color: #1A1206; box-shadow: 0 10px 34px -10px rgba(242, 159, 5, .8), inset 0 1px 0 rgba(255, 255, 255, .4); }
.f3d__go.is-urgent:hover { background: linear-gradient(180deg, #FFD083, #FFBE5E); }
.f3d__forfait { flex: none; margin-top: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(242, 159, 5, .22); background: rgba(242, 159, 5, .05); }
.f3d__forfait p { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: rgba(238, 238, 238, .66); }
.f3d__forfait strong { color: #fff; font-weight: 600; }
.f3d__ctas { flex: none; display: flex; gap: 10px; margin-top: 12px; }
.f3d__cta { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 14px; border-radius: 12px; background: #fff; color: var(--st-ink); font: 650 14px/1 var(--f-text); text-decoration: none; transition: background .2s, transform .2s; }
.f3d__cta svg { width: 16px; height: 16px; }
.f3d__cta:hover { background: var(--st-cream); transform: translateY(-1px); }
.f3d__tel { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(210, 212, 210, .2); color: #fff; font: 500 13.5px/1 var(--f-mono); text-decoration: none; white-space: nowrap; }
.f3d__tel svg { width: 16px; height: 16px; color: var(--st-amber); }
.f3d__tel:hover { border-color: var(--st-yellow); }

/* repères */
.f3d__pins { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.f3d__pin { position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; align-items: center; gap: 8px; margin: -15px 0 0 -15px; padding: 0; border: 0; background: none; cursor: pointer; transition: opacity .35s; color: #fff; }
.f3d__pin b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font: 500 11px/1 var(--f-mono); background: rgba(9, 11, 10, .8); border: 1px solid rgba(242, 159, 5, .85); box-shadow: 0 0 0 4px rgba(242, 159, 5, .12), 0 0 18px rgba(242, 159, 5, .5); transition: background .2s, transform .2s; }
.f3d__pin > span { font: 600 12px/1 var(--f-text); padding: 7px 10px; border-radius: 8px; background: rgba(9, 11, 10, .82); border: 1px solid rgba(210, 212, 210, .14); white-space: nowrap; }
.f3d__pin:hover b { background: var(--st-amber); color: #1A1206; transform: scale(1.08); }
.f3d__pin.is-off { opacity: 0; pointer-events: none; }
.f3d__pin--layer { cursor: default; margin: -5px 0 0 -5px; }
.f3d__pin--layer b { width: 10px; height: 10px; border-color: var(--st-yellow); box-shadow: 0 0 10px var(--st-yellow); background: var(--st-yellow); }
.f3d__pin--layer > span { font: 500 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--st-metal-hi); }
.f3d__cause { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 10px; margin: -9px 0 0 -9px; pointer-events: none; transition: opacity .35s; }
.f3d__cause b { width: 18px; height: 18px; border-radius: 50%; background: var(--st-amber); box-shadow: 0 0 0 5px rgba(242, 159, 5, .2), 0 0 24px var(--st-amber); }
.f3d__cause > span { font: 500 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; padding: 8px 11px; border-radius: 8px; background: rgba(9, 11, 10, .86); border: 1px solid rgba(242, 159, 5, .45); color: var(--st-amber); }
.f3d__cause i { font-style: normal; display: none; }
.f3d__cause[data-state="cause"] [data-c="cause"], .f3d__cause[data-state="safe"] [data-c="safe"], .f3d__cause[data-state="fixed"] [data-c="fixed"] { display: inline; }
.f3d__cause[data-state="safe"] b, .f3d__cause[data-state="fixed"] b { background: var(--st-yellow); box-shadow: 0 0 0 5px rgba(244, 192, 34, .2), 0 0 24px var(--st-yellow); }
.f3d__cause[data-state="safe"] > span, .f3d__cause[data-state="fixed"] > span { color: #FCE08F; border-color: rgba(244, 192, 34, .5); }
.f3d__cause.is-off { opacity: 0; }

/* outils, aide, chargement */
.f3d__tools { position: absolute; z-index: 3; right: 28px; bottom: 28px; display: flex; gap: 4px; padding: 4px; border-radius: 14px; }
.f3d__btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 13px; border-radius: 10px; border: 0; background: none; color: rgba(238, 238, 238, .86); font: 600 13px/1 var(--f-text); cursor: pointer; transition: background .2s, color .2s; }
.f3d__btn svg { width: 17px; height: 17px; color: var(--st-yellow); }
.f3d__btn:hover { background: rgba(244, 192, 34, .1); color: #fff; }
.f3d__btn[aria-pressed="true"] svg { color: var(--st-amber); }
.f3d__btn[hidden] { display: none; }
.f3d__ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: none; color: #fff; cursor: pointer; padding: 0; }
.f3d__ico svg { width: 18px; height: 18px; }
.f3d__ico:hover { background: rgba(244, 192, 34, .1); }
.f3d__hint { position: absolute; z-index: 2; left: calc(50% + 60px); bottom: 42px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; font: 500 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(210, 212, 210, .7); pointer-events: none; transition: opacity .6s; white-space: nowrap; }
.f3d__hint i { width: 22px; height: 1px; background: var(--st-yellow); box-shadow: 0 0 8px var(--st-yellow); animation: f3dSlide 2.4s ease-in-out infinite; }
.is-touched .f3d__hint, .has-sym .f3d__hint { opacity: 0; }
.f3d__load { position: absolute; inset: 0; z-index: 6; display: grid; place-content: center; gap: 14px; justify-items: center; background: radial-gradient(60% 50% at 50% 55%, rgba(209, 40, 43, .18), transparent), #080808; transition: opacity .8s, visibility .8s; font: 500 11px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--st-metal-hi); }
.f3d__load i { width: 160px; height: 1px; background: rgba(210, 212, 210, .15); position: relative; overflow: hidden; }
.f3d__load i::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--st-yellow); box-shadow: 0 0 10px var(--st-yellow); animation: f3dLoad 1.4s ease-in-out infinite; }
.is-ready .f3d__load { opacity: 0; visibility: hidden; }
.f3d__nogl { display: none; position: absolute; inset: auto 28px 28px 440px; z-index: 7; margin: 0; padding: 14px 16px; border-radius: 12px; background: rgba(16, 19, 17, .9); color: var(--st-metal-hi); font-size: 14px; }
.no-gl .f3d__nogl { display: block; }
.no-gl .f3d__load { display: none; }
@keyframes f3dGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes f3dSlide { 0%, 100% { transform: translateX(-6px); } 50% { transform: translateX(6px); } }
@keyframes f3dLoad { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@keyframes f3dIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 1180px) {
  .f3d__head { grid-template-columns: 1fr; }
  .f3d__panel { width: 340px; }
  .f3d__steps li span { display: none; }
  .f3d__steps li.is-on span { display: inline; }
}
@media (max-width: 759px) {
  .f3d__stage { height: min(70svh, 580px); min-height: 460px; border-radius: 18px; }
  .f3d__frame { inset: 8px; }
  .f3d__steps { top: 10px; left: 10px; right: 10px; justify-content: space-between; border-radius: 12px; }
  .f3d__steps li { padding: 9px 8px 11px; font-size: 12px; }
  .f3d__panel { position: relative; inset: auto; width: auto; margin-top: 12px; border-radius: 18px; padding: 22px 18px 18px; }
  .f3d__scroll { overflow: visible; }
  .f3d__tools { right: 10px; bottom: 10px; left: 10px; justify-content: flex-end; flex-wrap: wrap; }
  .f3d__btn span { display: none; }
  .f3d__btn { padding: 0 11px; }
  .f3d__hint { left: 50%; bottom: 70px; }
  .f3d__pin > span { display: none; }
  .f3d__nogl { inset: auto 12px 12px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .f3d__hint i, .f3d__load i::after, .f3d__steps li.is-on::after { animation: none; }
  .f3d__card > div.is-shown { animation: none; }
}
