/* ============================================================
   DIAPORAMA « LA MODULARITÉ, EN DÉTAIL » (assets/demo/slides.js)
   ------------------------------------------------------------
   Remplace la vidéo : un diaporama animé, sans son, d'environ
   1 min 50, qui défile tout seul (pause, précédent, suivant).
   Toutes les tailles sont exprimées en unités de conteneur
   (cqw) : le diaporama se met à l'échelle comme une vidéo.
   Sur téléphone, il passe en format portrait lisible.
   ============================================================ */
.sl { position: relative; border-radius: 1.25rem; overflow: hidden; background: #0b1120; color: #e2e8f0; font-family: 'Inter', system-ui, sans-serif; container-type: inline-size; isolation: isolate; }
.sl *, .sl *::before, .sl *::after { box-sizing: border-box; }
:where(.sl) :where(p, h3, h4, ul) { margin: 0; }
.sl-stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.sl-bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(60cqw 40cqw at 85% 10%, rgba(45, 212, 191, .16), transparent 60%), radial-gradient(50cqw 40cqw at 0% 100%, rgba(59, 130, 246, .16), transparent 60%), #0b1120; }
.sl-bg::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px); background-size: 4cqw 4cqw; mask-image: radial-gradient(circle at 50% 40%, #000, transparent 80%); }

/* Barre de progression (une par diapositive) */
.sl-bars { position: absolute; top: 1.4cqw; left: 2cqw; right: 2cqw; z-index: 5; display: flex; gap: .5cqw; }
.sl-bars button { flex: 1; height: max(4px, .35cqw); border-radius: 999px; background: rgba(255, 255, 255, .18); overflow: hidden; padding: 0; border: 0; cursor: pointer; position: relative; }
.sl-bars button::before { content: ""; position: absolute; inset: -8px 0; }
.sl-bars i { display: block; height: 100%; width: 0; background: #2dd4bf; border-radius: inherit; }

/* Diapositives */
.sl-slide { position: absolute; inset: 0; padding: 5cqw 5cqw 6.5cqw; display: grid; grid-template-columns: 1fr 1.15fr; gap: 4cqw; align-items: center; font-size: 1.45cqw; opacity: 0; visibility: hidden; transform: scale(1.02); transition: opacity .6s ease, transform .8s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .6s; }
.sl-slide.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .6s ease, transform .8s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
.sl-slide.is-center { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.sl-eyebrow { display: inline-flex; align-items: center; gap: .6em; font-size: .78em; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #5eead4; }
.sl-eyebrow::before { content: ""; width: 2.2em; height: 2px; background: currentColor; border-radius: 2px; }
.sl-title { font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 700; font-size: 3.1em; line-height: 1.04; letter-spacing: -.02em; color: #fff; margin-top: .35em !important; }
.sl-title em { font-style: normal; background: linear-gradient(135deg, #2dd4bf, #60a5fa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sl-text { font-size: 1.12em; line-height: 1.55; color: #cbd5e1; margin-top: .9em !important; max-width: 32em; }
.sl-chips { display: flex; flex-wrap: wrap; gap: .6em; margin-top: 1.3em; }
.sl-chip { display: inline-flex; align-items: center; gap: .45em; padding: .5em .95em; border-radius: 999px; font-weight: 700; font-size: .95em; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); color: #f1f5f9; }
.sl-chip i { color: #5eead4; font-size: 1.15em; }
.sl-slide.is-center .sl-chips { justify-content: center; }

/* Entrées animées (déclenchées à chaque affichage) */
.sl-a { opacity: 0; }
.sl-slide.is-on .sl-a { animation: sl-up .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d, 0s); }
.sl-slide.is-on .sl-a.pop { animation-name: sl-pop; }
.sl-slide.is-on .sl-a.left { animation-name: sl-left; }
.sl-slide.is-on .sl-a.fly { animation: sl-fly .9s cubic-bezier(.2, .9, .3, 1.15) both; animation-delay: var(--d, 0s); }
@keyframes sl-up { from { opacity: 0; transform: translateY(1.4cqw); } to { opacity: 1; transform: none; } }
@keyframes sl-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes sl-left { from { opacity: 0; transform: translateX(3cqw); } to { opacity: 1; transform: none; } }
@keyframes sl-fly { 0% { opacity: 0; transform: translate(var(--fx, 0), var(--fy, -8cqw)) rotate(var(--fr, -8deg)) scale(.8); } 100% { opacity: 1; transform: none; } }

/* Fenêtre d'interface (Espace, site) */
.sl-win { position: relative; width: 100%; border-radius: 1.1em; overflow: hidden; background: #fff; color: #0f172a; box-shadow: 0 3cqw 6cqw -2cqw rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .06); font-size: .92em; }
.sl-win__bar { display: flex; align-items: center; gap: .5em; padding: .55em .8em; background: #f1f5f9; border-bottom: 1px solid #e2e8f0; }
.sl-win__bar i { width: .65em; height: .65em; border-radius: 999px; background: #cbd5e1; }
.sl-win__bar i:nth-child(1) { background: #f87171; } .sl-win__bar i:nth-child(2) { background: #fbbf24; } .sl-win__bar i:nth-child(3) { background: #34d399; }
.sl-win__bar span { margin-left: .6em; flex: 1; padding: .25em .7em; border-radius: 999px; background: #fff; border: 1px solid #e2e8f0; color: #64748b; font-size: .78em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-win__body { padding: 1em 1.1em 1.1em; background: #f8fafc; }
.sl-es-head { display: flex; align-items: center; gap: .7em; margin-bottom: .8em; }
.sl-mono { display: inline-flex; align-items: center; justify-content: center; width: 2.4em; height: 2.4em; border-radius: 999px; font-weight: 800; font-size: .85em; color: #fff; background: var(--ink, #0f172a); flex: none; }
.sl-es-head small { display: block; font-size: .62em; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--acc, #db2777); }
.sl-es-head b { display: block; font-size: 1.15em; font-weight: 800; color: var(--ink, #0f172a); }
.sl-mods { display: grid; grid-template-columns: 1fr 1fr; gap: .6em; }
.sl-mod { display: flex; align-items: center; gap: .6em; padding: .65em .7em; border-radius: .8em; background: #fff; border: 1px solid #e2e8f0; }
.sl-mod > i { width: 2em; height: 2em; border-radius: .6em; display: inline-flex; align-items: center; justify-content: center; background: #f1f5f9; color: #94a3b8; font-size: 1.05em; flex: none; transition: background-color .4s ease, color .4s ease; }
.sl-mod b { flex: 1; font-size: .82em; font-weight: 700; color: var(--ink, #0f172a); line-height: 1.2; }
.sl-sw { width: 2.3em; height: 1.3em; border-radius: 999px; background: #cbd5e1; position: relative; flex: none; transition: background-color .35s ease; }
.sl-sw::after { content: ""; position: absolute; top: .15em; left: .15em; width: 1em; height: 1em; border-radius: 999px; background: #fff; transition: transform .35s cubic-bezier(.2, .9, .3, 1.3); }
.sl-slide.is-on .sl-mod.turn .sl-sw { animation: sl-sw-on .01s linear both; animation-delay: var(--d, 1s); }
.sl-slide.is-on .sl-mod.turn .sl-sw::after { animation: sl-knob .35s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: var(--d, 1s); }
.sl-slide.is-on .sl-mod.turn > i { animation: sl-ico-on .01s linear both; animation-delay: var(--d, 1s); }
.sl-mod.on .sl-sw { background: #22c55e; }
.sl-mod.on .sl-sw::after { transform: translateX(1em); }
.sl-mod.on > i { background: color-mix(in srgb, var(--acc, #db2777) 14%, #fff); color: var(--acc, #db2777); }
@keyframes sl-sw-on { to { background: #22c55e; } }
@keyframes sl-knob { to { transform: translateX(1em); } }
@keyframes sl-ico-on { to { background: color-mix(in srgb, var(--acc, #db2777) 14%, #fff); color: var(--acc, #db2777); } }

.sl-row { display: flex; align-items: center; gap: .7em; padding: .6em .75em; border-radius: .8em; background: #fff; border: 1px solid #e2e8f0; margin-top: .5em; font-size: .85em; }
.sl-row time { font-weight: 800; color: var(--ink, #0f172a); min-width: 3em; }
.sl-row div { flex: 1; min-width: 0; }
.sl-row strong { display: block; font-size: .95em; }
.sl-row small { display: block; color: #64748b; font-size: .82em; }
.sl-pill { position: relative; display: inline-grid; padding: .2em .65em; border-radius: 999px; font-size: .78em; font-weight: 800; white-space: nowrap; }
.sl-pill > span { grid-area: 1 / 1; text-align: center; }
.p-new { background: #fef3c7; color: #92400e; } .p-doing { background: #dbeafe; color: #1e40af; } .p-ok { background: #dcfce7; color: #166534; }
/* Pastille qui change d'état (Nouveau → En cours → Résolu) */
.sl-states { display: inline-grid; }
.sl-states > span { grid-area: 1 / 1; opacity: 0; }
.sl-states > span:first-child { opacity: 1; }
.sl-slide.is-on .sl-states > span { animation: sl-state 1s linear both; animation-delay: var(--d); }
.sl-slide.is-on .sl-states > span:first-child { animation: sl-state-out .3s linear both; animation-delay: var(--d1); }
.sl-slide.is-on .sl-states > span:nth-child(2) { animation: sl-state-mid var(--span, 2.4s) linear both; animation-delay: var(--d1); }
.sl-slide.is-on .sl-states > span:nth-child(3) { animation: sl-state-in .3s linear both; animation-delay: var(--d2); }
@keyframes sl-state-out { to { opacity: 0; } }
@keyframes sl-state-in { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes sl-state-mid { 0% { opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { opacity: 0; } }

.sl-toast { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: .5em; padding: .55em .95em; border-radius: 999px; background: #0f172a; color: #fff; font-weight: 700; font-size: .82em; box-shadow: 0 1.5cqw 3cqw -1cqw rgba(0, 0, 0, .6); white-space: nowrap; }
.sl-toast i { color: #4ade80; }

/* Grille « Espace Gestion » */
.sl-gest { margin-top: .8em; padding: .8em; border-radius: .9em; background: #0f172a; display: grid; grid-template-columns: repeat(4, 1fr); gap: .5em; }
.sl-gt { padding: .7em .3em; border-radius: .7em; background: #1e293b; text-align: center; color: #fff; font-size: .72em; font-weight: 700; }
.sl-gt i { display: block; font-size: 1.6em; margin-bottom: .2em; color: var(--c); }

/* Score en direct */
.sl-score { display: flex; align-items: center; justify-content: space-between; gap: 1em; padding: .9em 1.1em; border-radius: 1em; background: #fff; border: 1px solid #e2e8f0; }
.sl-score .live { display: inline-flex; align-items: center; gap: .4em; font-size: .7em; font-weight: 900; color: #dc2626; letter-spacing: .1em; text-transform: uppercase; }
.sl-score .live::before { content: ""; width: .6em; height: .6em; border-radius: 999px; background: #dc2626; animation: sl-blink 1.2s infinite; }
@keyframes sl-blink { 50% { opacity: .2; } }
.sl-score b { font-size: 2em; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--acc, #db2777); }

/* Agenda de la semaine (coach / artisan) */
.sl-week { display: grid; grid-template-columns: 3em repeat(5, 1fr); gap: .35em; font-size: .75em; }
.sl-week .h { text-align: center; font-weight: 700; color: #57534e; padding-bottom: .2em; }
.sl-week .t { color: #78716c; text-align: right; padding-right: .3em; line-height: 2.3em; }
.sl-week .c { height: 2.3em; border-radius: .5em; background: #f5f0e8; border: 1px dashed #e7e0d4; }
.sl-week .c.b { background: var(--ink, #1c1917); border: 0; }
.sl-week .c.n { background: #d97706; border: 0; }

/* Site + panneau « Modifier » */
.sl-site { position: relative; height: 18em; overflow: hidden; background: #fff; }
.sl-site__hero { height: 7em; background: linear-gradient(135deg, #0f766e, #1d4ed8); display: flex; align-items: flex-end; padding: .9em; color: #fff; font-weight: 800; font-size: 1.3em; }
.sl-site__block { margin: .9em; padding: .9em; border-radius: .9em; border: 2px dashed rgba(13, 148, 136, .55); position: relative; }
.sl-site__block h4 { font-size: 1em; font-weight: 800; }
.sl-site__btn { position: absolute; top: -.9em; right: .8em; padding: .3em .75em; border-radius: 999px; background: #0d9488; color: #fff; font-size: .72em; font-weight: 800; }
.sl-type { display: block; margin-top: .4em; font-size: .85em; color: #334155; overflow: hidden; white-space: nowrap; border-right: 2px solid #0d9488; width: 0; }
.sl-slide.is-on .sl-type { animation: sl-type 2.6s steps(38) both, sl-caret .8s step-end infinite; animation-delay: var(--d, 2s), 0s; }
@keyframes sl-type { to { width: 100%; } }
@keyframes sl-caret { 50% { border-color: transparent; } }
.sl-panel { position: absolute; top: 0; right: 0; bottom: 0; width: 46%; background: #fff; border-left: 1px solid #e2e8f0; box-shadow: -1.5cqw 0 3cqw -1cqw rgba(15, 23, 42, .35); padding: .9em; transform: translateX(105%); }
.sl-slide.is-on .sl-panel { animation: sl-panel-in .6s cubic-bezier(.2, .8, .2, 1) both, sl-panel-out .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: 1.2s, 6.2s; }
@keyframes sl-panel-in { to { transform: none; } }
@keyframes sl-panel-out { from { transform: none; } to { transform: translateX(105%); } }
.sl-panel small { display: block; font-size: .6em; font-weight: 800; letter-spacing: .14em; color: #0d9488; }
.sl-panel b { display: block; font-size: .9em; margin-bottom: .6em; }
.sl-field { height: 1.8em; border-radius: .45em; border: 1px solid #cbd5e1; margin-bottom: .5em; }
.sl-field.big { height: 5em; padding: .4em; font-size: .7em; color: #334155; }
.sl-save { display: inline-block; padding: .35em .8em; border-radius: .45em; background: #0d9488; color: #fff; font-size: .72em; font-weight: 800; float: right; }

/* Rôles */
.sl-people { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8em; }
.sl-person { padding: 1em .9em; border-radius: 1em; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); text-align: center; }
.sl-person .sl-mono { width: 3em; height: 3em; font-size: 1em; background: linear-gradient(135deg, #14b8a6, #3b82f6); margin-bottom: .5em; }
.sl-person b { display: block; color: #fff; font-size: .95em; }
.sl-perm { display: flex; flex-wrap: wrap; justify-content: center; gap: .3em; margin-top: .6em; }
.sl-perm span { font-size: .68em; font-weight: 700; padding: .25em .55em; border-radius: 999px; background: rgba(45, 212, 191, .14); color: #99f6e4; }
.sl-perm span.no { background: rgba(148, 163, 184, .12); color: #64748b; text-decoration: line-through; }

/* Socle + briques */
.sl-socle { position: relative; width: 100%; max-width: 30em; margin: 0 auto; }
.sl-bricks { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5em; margin-bottom: .6em; }
.sl-brick { padding: .7em .5em; border-radius: .7em; font-size: .8em; font-weight: 800; color: #fff; text-align: center; background: var(--c); box-shadow: inset 0 -.25em 0 rgba(0, 0, 0, .18); }
.sl-brick i { display: block; font-size: 1.5em; margin-bottom: .15em; }
.sl-base { padding: 1em; border-radius: .9em; background: linear-gradient(135deg, #1e293b, #0f172a); border: 1px solid rgba(255, 255, 255, .12); text-align: center; }
.sl-base b { display: block; color: #fff; font-size: 1.05em; }
.sl-base small { color: #94a3b8; font-size: .78em; }

/* Cartes finales */
.sl-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8em; margin-top: 1.4em; width: 100%; max-width: 60em; }
.sl-card { display: block; padding: 1em .8em; border-radius: 1em; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); color: #fff; text-decoration: none; transition: transform .2s ease, border-color .2s ease, background-color .2s ease; }
.sl-card:hover, .sl-card:focus-visible { transform: translateY(-.3em); border-color: #2dd4bf; background: rgba(45, 212, 191, .1); }
.sl-card i { font-size: 1.8em; color: #5eead4; }
.sl-card b { display: block; margin-top: .3em; font-size: .95em; }
.sl-card small { display: block; color: #94a3b8; font-size: .75em; margin-top: .15em; }

/* Commandes */
.sl-ctrl { position: absolute; left: 2cqw; right: 2cqw; bottom: 1.5cqw; z-index: 6; display: flex; align-items: center; gap: .8cqw; font-size: max(12px, 1.1cqw); }
.sl-ctrl button { display: inline-flex; align-items: center; justify-content: center; width: max(34px, 3cqw); height: max(34px, 3cqw); border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); color: #fff; font-size: 1.15em; cursor: pointer; transition: background-color .2s ease; }
.sl-ctrl button:hover { background: rgba(255, 255, 255, .2); }
.sl-ctrl button:focus-visible, .sl-bars button:focus-visible, .sl-card:focus-visible { outline: 2px solid #5eead4; outline-offset: 2px; }
.sl-ctrl .count { margin-left: auto; color: #cbd5e1; font-weight: 700; font-variant-numeric: tabular-nums; }
.sl-ctrl .label { color: #e2e8f0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Téléphone : format portrait, textes lisibles */
@container (max-width: 620px) {
	.sl-stage { aspect-ratio: 4 / 5.6; }
	.sl-slide { grid-template-columns: 1fr; align-content: center; gap: 5cqw; padding: 9cqw 5cqw 15cqw; font-size: 3.15cqw; }
	.sl-title { font-size: 2.35em; }
	.sl-text { font-size: 1.02em; }
	.sl-bars { top: 3cqw; left: 4cqw; right: 4cqw; }
	.sl-ctrl { left: 4cqw; right: 4cqw; bottom: 3.5cqw; gap: 2cqw; }
	.sl-ctrl .label { display: none; }
	.sl-cards { grid-template-columns: 1fr 1fr; }
	.sl-people { grid-template-columns: 1fr; gap: .5em; }
	.sl-person { display: flex; align-items: center; gap: .7em; text-align: left; padding: .6em .8em; }
	.sl-person .sl-mono { margin: 0; width: 2.4em; height: 2.4em; }
	.sl-perm { justify-content: flex-start; margin-top: .3em; }
	.sl-hide-sm { display: none !important; }
	.sl-slide:not(.is-center) .sl-chips { display: none; }
	.sl-site { height: 14em; }
	.sl-site__hero { height: 5em; }
}

@media (prefers-reduced-motion: reduce) {
	.sl-slide, .sl-slide.is-on { transition: none; }
	.sl-slide.is-on .sl-a, .sl-slide.is-on .sl-a.fly { animation: none; opacity: 1; }
}

/* Pastilles d'état (styles des états empilés) */
.sl-states { padding: 0; background: none; }
.sl-states > span { padding: .2em .65em; border-radius: 999px; font-size: 1em; font-weight: 800; white-space: nowrap; text-align: center; }
.sl-row { color: #0f172a; }
.sl-row > i { color: var(--acc, #0d9488); font-size: 1.25em; }
.sl-score > span { color: #0f172a; }

/* Diapositives centrées : bloc de texte et pastilles réellement centrés */
.sl-slide.is-center .sl-text { margin-inline: auto; }
.sl-slide.is-center .sl-chips { justify-content: center; }
