/* ==========================================================
   components.css — liste de projets et fiche détaillée
   Chaque projet a sa propre teinte (--tint), qui s'adapte au thème.
   ========================================================== */
.slides { counter-reset: proj; border-bottom: 1px solid var(--line-strong); }
.slider-ctrl { display: none; }
.slide { --tint: var(--accent); counter-increment: proj; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 88px); align-items: center; padding: clamp(36px, 6vw, 84px) 0; border-top: 1px solid var(--line-strong); }

.shot { --tint: var(--accent); position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; cursor: pointer; display: grid; place-items: center; isolation: isolate;
  background: radial-gradient(120% 120% at 20% 10%, color-mix(in srgb, var(--tint) 38%, var(--bg-alt)), color-mix(in srgb, var(--tint) 10%, var(--bg-alt)) 70%); }
.slide .shot.s-gofolyx { --tint: #a855f7; } .slide .shot.s-bf1 { --tint: #ef4444; } .slide .shot.s-ediscussion { --tint: #3b82f6; }
.slide .shot.s-edvia { --tint: #10b981; } .slide .shot.s-sira { --tint: #eab308; } .slide .shot.s-nunilib { --tint: #ec6d0f; }
.shot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 30%, transparent); pointer-events: none; z-index: 3; }
.shot-cap { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; z-index: 1; transition: transform 1.2s var(--ease), opacity .4s; will-change: transform; }
.slide:hover .shot-cap { transform: scale(1.05); }
.shot.no-img .shot-cap { display: none; }
.shot-logo { position: relative; z-index: 0; max-width: 40%; max-height: 38%; object-fit: contain; border-radius: 16px; box-shadow: 0 20px 50px -20px color-mix(in srgb, var(--tint) 70%, transparent); }
.shot-word { font-size: clamp(2.4rem, 6vw, 4.8rem); font-weight: 900; letter-spacing: -.05em; color: var(--tint); }
.shot-word i { font-style: normal; color: var(--text); }
.os-win { width: min(70%, 320px); border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); overflow: hidden; }
.os-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.os-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--tint); opacity: .7; }
.os-body { display: grid; gap: 4px; padding: 22px 18px 26px; }
.os-body b { font-size: 1.3rem; font-weight: 900; letter-spacing: -.03em; }
.os-body span { font-size: 13px; color: var(--muted); }

.p-body { display: grid; gap: clamp(14px, 2vw, 22px); justify-items: start; }
.p-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.p-meta::before { content: counter(proj, decimal-leading-zero); color: var(--accent-text); font-variant-numeric: tabular-nums; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 11px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.status.live { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.status.live::before { background: var(--ok); animation: pulse 2s ease-out infinite; }
.p-body h3 { font-size: clamp(2.2rem, 4.8vw, 4.2rem); font-weight: 900; letter-spacing: -.045em; line-height: 1.02; transition: color .4s; }
.slide:hover .p-body h3 { color: var(--accent-text); }
.p-body > p { color: var(--muted); max-width: 46ch; }

.p-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 6px; }
.link-out { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 0; border-bottom: 2px solid var(--line-strong); transition: border-color .3s, gap .4s var(--ease), color .3s; }
.link-out:hover { border-color: var(--accent); color: var(--accent-text); gap: 12px; }
.link-out.primary { border-color: var(--accent); color: var(--accent-text); }
.dl { display: inline-grid; gap: 1px; padding: 10px 18px; border: 1.5px solid var(--line-strong); border-radius: 999px; transition: border-color .3s, background .3s, color .3s; }
.dl b { font-size: 13px; font-weight: 700; }
.dl small { font-size: 11px; color: var(--muted); }
.dl:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.dl:hover small { color: inherit; opacity: .8; }
.dl.is-off { border-style: dashed; color: var(--faint); pointer-events: none; }
.hint { font-size: 13px; color: var(--faint); }

/* ---------- Fiche détaillée ---------- */
dialog.detail { border: 0; padding: 0; margin: 0; width: 100%; height: 100%; max-width: none; max-height: none; background: transparent; color: var(--text); overflow: hidden; }
dialog.detail[open] { display: grid; place-items: center; padding: 24px; }
dialog.detail::backdrop { background: rgb(8 5 2 / .72); backdrop-filter: blur(10px); opacity: 0; transition: opacity .4s var(--ease); }
dialog.detail.show::backdrop { opacity: 1; }
.d-card { position: relative; width: min(1100px, 100%); max-height: calc(100dvh - 48px); overflow: auto; overscroll-behavior: contain; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 20px; padding: clamp(24px, 4vw, 48px); opacity: 0; transform: translateY(32px) scale(.98); transition: opacity .45s var(--ease), transform .7s var(--ease); }
.d-card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
dialog.detail.show .d-card { opacity: 1; transform: none; }
.d-close { position: sticky; top: 0; float: right; z-index: 3; width: 40px; height: 40px; margin: -6px -6px 0 12px; display: grid; place-items: center; border: 1.5px solid var(--line-strong); border-radius: 50%; background: var(--surface); font-size: 22px; line-height: 1; transition: background .3s, color .3s, border-color .3s, transform .6s var(--ease); }
.d-close:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); transform: rotate(90deg); }
.d-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: clamp(24px, 4vw, 40px); }
.d-tile { width: 54px; height: 54px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--bg-alt); display: grid; place-items: center; overflow: hidden; font-weight: 900; color: var(--accent-text); flex: none; }
.d-tile img { width: 100%; height: 100%; object-fit: contain; }
.d-cat { display: block; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-text); }
.d-head h2 { font-size: clamp(1.9rem, 3.8vw, 3.2rem); font-weight: 900; letter-spacing: -.04em; line-height: 1.05; }
.d-head .status { margin-left: auto; }
.d-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.d-info { display: grid; gap: 16px; }
.d-info > p { color: var(--muted); }
.d-info h3 { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-text); margin-top: 12px; }
.d-features li { position: relative; padding: 11px 0 11px 22px; border-top: 1px solid var(--line); font-size: 15px; }
.d-features li::before { content: ""; position: absolute; left: 0; top: 19px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.d-features li:last-child { border-bottom: 1px solid var(--line); }
.stack-row { display: grid; gap: 8px; }
.stack-row h4 { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .06em; }

.d-shots { position: sticky; top: 0; min-width: 0; }
.d-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 14px; }
.d-track::-webkit-scrollbar { display: none; }
.d-fig { position: relative; flex: 0 0 auto; scroll-snap-align: start; border-radius: 14px; overflow: hidden; background: var(--bg-alt); }
.d-fig img { height: min(60vh, 520px); width: auto; max-width: 100%; }
.d-fig.is-loading { min-width: 170px; min-height: 300px; }
.d-tile.is-loading::after { width: 20px; height: 20px; margin: -10px 0 0 -10px; border-width: 2px; }
.d-arrows { display: flex; gap: 8px; margin-top: 14px; }
.arrow { width: 40px; height: 40px; border: 1.5px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; transition: background .3s, color .3s, border-color .3s; }
.arrow:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.d-empty { display: grid; gap: 4px; place-content: center; text-align: center; min-height: 260px; border: 1.5px dashed var(--line-strong); border-radius: 14px; padding: 24px; }
.d-empty span { font-size: 14px; color: var(--muted); }

@media (max-width: 880px) {
  .slide { grid-template-columns: 1fr; gap: 24px; }
  .d-grid { grid-template-columns: 1fr; }
  .d-shots { position: static; }
  dialog.detail[open] { padding: 0; }
  .d-card { width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; }
}
