/* ===== Hero de l'accueil « une page qui se construit » (2026-10-13, en ligne à la place du diaporama de 3 photos).
   Shortcode [dsi_hero_build] ; ce fichier n'est chargé que sur les pages qui le contiennent.
   Cycle de 12 s joué en boucle (script dans functions.php) : maquette en pointillés (1 à 3 s), remplissage (3,6 à 6,4 s),
   version mobile et mise en ligne (7 s), pause, fondu, recommence. Bouton pause (WCAG 2.2.2) ; mouvement réduit : image finale fixe.
   Fond : ambiance des bandeaux des autres pages (média 978, partie gauche du bandeau Services en miroir) + lumière en haut à droite. ===== */
.dsi-hero-home.l-section {
	background:
		radial-gradient(ellipse 45% 60% at 100% 0%, rgba(255, 255, 255, .85), transparent 70%),
		radial-gradient(ellipse 35% 70% at 100% 60%, rgba(167, 139, 250, .18), transparent 70%),
		url(../../../uploads/2026/10/fond-accueil-ambiance.webp) center bottom / cover no-repeat,
		#EAF1FD;
}
.dsi-hero-home .dsi-hero-slides, .dsi-hero-home .dsi-hero-pause { display: none; }

.dsi-hb { position: absolute; z-index: 0; top: calc(50% + var(--header-height, 88px) / 2); right: max(4rem, calc((100vw - 1400px) / 2 + 3rem)); width: min(44vw, 600px); transform: translateY(-50%); }
.dsi-hb * { box-sizing: border-box; }
.dsi-hb-stage { position: relative; }

/* navigateur (apparaît une seule fois) */
.dsi-hb-browser { position: relative; border-radius: 14px; background: #fff; box-shadow: 0 1.5rem 3.5rem rgba(15, 31, 58, .16), 0 0 0 1px rgba(15, 31, 58, .06); overflow: hidden; animation: hb-pop .8s cubic-bezier(.2, .7, .3, 1) both; }
.dsi-hb-bar { display: flex; align-items: center; gap: .4rem; height: 2.1rem; padding: 0 .9rem; background: #F1F5F9; border-bottom: 1px solid #E2E8F0; }
.dsi-hb-bar > span { width: .6rem; height: .6rem; border-radius: 50%; }
.dsi-hb-bar > span:nth-child(1) { background: #F87171; } .dsi-hb-bar > span:nth-child(2) { background: #FBBF24; } .dsi-hb-bar > span:nth-child(3) { background: #34D399; }
.dsi-hb-url { flex: 1; display: flex; align-items: center; gap: .4rem; height: 1.25rem; margin-left: .8rem; padding: 0 .6rem; border-radius: 999px; background: #fff; }
.dsi-hb-url i { width: 38%; height: .35rem; border-radius: 3px; background: #E2E8F0; }
.dsi-hb-lock { width: .55rem; height: .55rem; border-radius: 2px; background: #CBD5E1; }
.dsi-hb-page { display: grid; gap: 1rem; padding: 1rem 1.25rem 1.4rem; transition: opacity .7s ease; }

/* blocs : état de départ caché ; la classe .is-on lance le cycle */
.dsi-hb-b { position: relative; border: 1.5px dashed #94A3B8; border-radius: 6px; opacity: 0; }
.dsi-hb-b::after { content: ""; position: absolute; inset: -1.5px; border-radius: inherit; background: var(--f, #E2E8F0); opacity: 0; }
.dsi-hb-nav { display: flex; align-items: center; gap: .6rem; }
.dsi-hb-nav .dsi-hb-b { height: .55rem; width: 11%; --f: #CBD5E1; }
.dsi-hb-nav .dsi-hb-logo { width: 1.4rem; height: 1.4rem; border-radius: 50%; margin-right: auto; --f: #2563EB; }
.dsi-hb-nav .dsi-hb-btn { width: 18%; height: 1.2rem; border-radius: 999px; --f: #0B1020; }
.dsi-hb-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1rem; align-items: center; }
.dsi-hb-txt { display: grid; gap: .5rem; }
.dsi-hb-t { height: .95rem; --f: #0B1020; } .dsi-hb-t.s { width: 72%; }
.dsi-hb-p { height: .45rem; --f: #CBD5E1; } .dsi-hb-p.s { width: 80%; }
.dsi-hb-cta { width: 46%; height: 1.5rem; margin-top: .35rem; border-radius: 999px; --f: #2563EB; }
.dsi-hb-img { aspect-ratio: 4 / 3; border-radius: 10px; --f: linear-gradient(140deg, #DBEAFE 0%, #BFDBFE 55%, #A5B4FC 100%); }
.dsi-hb-img svg { position: absolute; z-index: 1; inset: 22% 22%; width: 56%; height: 56%; opacity: 0; }
.dsi-hb-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.dsi-hb-card { display: grid; gap: .4rem; padding: .7rem; height: 5.2rem; --f: #fff; }
.dsi-hb-card::after { box-shadow: 0 .5rem 1rem rgba(15, 31, 58, .08), inset 0 3px 0 var(--c); }
.dsi-hb-card i { position: relative; z-index: 1; display: block; height: .4rem; border-radius: 3px; background: #E2E8F0; opacity: 0; }
.dsi-hb-card i:first-child { width: 1.3rem; height: 1.3rem; border-radius: 6px; background: var(--c); }
.dsi-hb-card i:last-child { width: 70%; }
.dsi-hb-card:nth-child(1) { --c: #2563EB; } .dsi-hb-card:nth-child(2) { --c: #0D9488; } .dsi-hb-card:nth-child(3) { --c: #D97706; }

/* version mobile */
.dsi-hb-phone { position: absolute; right: -2rem; bottom: -1.75rem; width: 25%; aspect-ratio: 9 / 18; padding: .45rem; border-radius: 1.1rem; background: #0B1020; box-shadow: 0 1.25rem 2.5rem rgba(15, 31, 58, .28); opacity: 0; transition: opacity .7s ease; }
.dsi-hb-phone > div { display: grid; align-content: start; gap: .35rem; height: 100%; padding: .55rem .45rem; border-radius: .75rem; background: #fff; overflow: hidden; }
.dsi-hb-phone i { display: block; height: .3rem; border-radius: 2px; background: #CBD5E1; }
.dsi-hb-phone i.t { height: .55rem; background: #0B1020; width: 85%; } .dsi-hb-phone i.s { width: 60%; }
.dsi-hb-phone i.b { width: 55%; height: .75rem; border-radius: 999px; background: #2563EB; margin: .15rem 0 .2rem; }
.dsi-hb-phone i.im { height: 3.2rem; border-radius: 6px; background: linear-gradient(140deg, #DBEAFE, #A5B4FC); }
.dsi-hb-phone i.c { height: 1.6rem; border-radius: 5px; background: #fff; box-shadow: inset 0 2px 0 var(--c), 0 0 0 1px #E2E8F0; }
.dsi-hb-phone i.c:nth-of-type(6) { --c: #2563EB; } .dsi-hb-phone i.c:nth-of-type(7) { --c: #0D9488; } .dsi-hb-phone i.c:nth-of-type(10) { --c: #D97706; }

/* étapes */
.dsi-hb-steps { display: flex; gap: .5rem; margin: 1.1rem 0 0; padding: 0; list-style: none; font-size: .8125rem; font-weight: 600; }
.dsi-hb-steps li { display: flex; align-items: center; gap: .4rem; margin: 0; padding: .35rem .75rem .35rem .4rem; border-radius: 999px; background: rgba(255, 255, 255, .75); color: #64748B; box-shadow: 0 0 0 1px rgba(15, 31, 58, .06); transition: background-color .4s, color .4s, box-shadow .4s; }
.dsi-hb-steps li::before { content: attr(data-n); display: flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: #E2E8F0; color: #475569; font-size: .6875rem; transition: background-color .4s, color .4s; }
.dsi-hb-steps li:nth-child(3)::before { content: "\f00c"; font-family: "fontawesome"; font-weight: 900; }

/* ----- cycle (.is-on posé par le script ; sans script, il est présent dès le départ : une seule lecture) ----- */
.dsi-hb.is-on .dsi-hb-b { animation: hb-wire .6s both; }
.dsi-hb.is-on .dsi-hb-b::after { animation: hb-show .7s both; animation-delay: var(--fd); }
.dsi-hb.is-on .dsi-hb-img svg { animation: hb-show .6s both; animation-delay: 4.7s; }
.dsi-hb.is-on .dsi-hb-card i { animation: hb-show .5s both; animation-delay: calc(var(--fd) + .35s); }
.dsi-hb.is-on .dsi-hb-phone { animation: hb-phone .9s cubic-bezier(.2, .7, .3, 1) both; animation-delay: 7s; }
.dsi-hb.is-on .dsi-hb-lock { animation: hb-green .5s both; animation-delay: 7s; }
.dsi-hb.is-on .dsi-hb-steps li { animation: hb-step .4s both; animation-delay: var(--sd); }
.dsi-hb.is-on .dsi-hb-steps li::before { animation: hb-step-dot .4s both; animation-delay: var(--sd); }
.dsi-hb-steps li:nth-child(1) { --sd: .9s; } .dsi-hb-steps li:nth-child(2) { --sd: 3.4s; } .dsi-hb-steps li:nth-child(3) { --sd: 7s; }
/* calendrier : maquette 1 à 2,8 s, remplissage 3,6 à 6,4 s */
.dsi-hb-nav .dsi-hb-b { animation-delay: 1s !important; --fd: 3.6s; }
.dsi-hb-t { animation-delay: 1.3s !important; --fd: 3.9s; } .dsi-hb-t.s { animation-delay: 1.45s !important; --fd: 4.05s; }
.dsi-hb-p { animation-delay: 1.6s !important; --fd: 4.2s; } .dsi-hb-p.s { animation-delay: 1.75s !important; --fd: 4.35s; }
.dsi-hb-cta { animation-delay: 1.9s !important; --fd: 4.5s; }
.dsi-hb-img { animation-delay: 1.7s !important; --fd: 4.6s; }
.dsi-hb-card:nth-child(1) { animation-delay: 2.2s !important; --fd: 5.3s; }
.dsi-hb-card:nth-child(2) { animation-delay: 2.45s !important; --fd: 5.7s; }
.dsi-hb-card:nth-child(3) { animation-delay: 2.7s !important; --fd: 6.1s; }
/* fin de cycle : fondu de la page avant de recommencer */
.dsi-hb.is-out .dsi-hb-page, .dsi-hb.is-out .dsi-hb-phone { opacity: 0 !important; }
.dsi-hb.is-paused *, .dsi-hb.is-paused *::before, .dsi-hb.is-paused *::after { animation-play-state: paused !important; }

@keyframes hb-pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes hb-wire { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes hb-show { from { opacity: 0; } to { opacity: 1; } }
@keyframes hb-green { to { background: #10B981; } }
@keyframes hb-phone { from { opacity: 0; transform: translate(18px, 24px); } to { opacity: 1; transform: none; } }
@keyframes hb-step { to { background: #fff; color: #1E3A8A; box-shadow: 0 0 0 1px rgba(37, 99, 235, .3), 0 .35rem .9rem rgba(37, 99, 235, .12); } }
@keyframes hb-step-dot { to { background: #2563EB; color: #fff; } }

/* bouton pause, en bas à droite du hero (même style que celui de l'ancien diaporama) */
.dsi-hb-pause {
	position: absolute; right: 1.5rem; bottom: 1.5rem; z-index: 2;
	display: flex; align-items: center; justify-content: center;
	width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: 50%;
	background: rgba(11, 16, 32, .6); color: #fff; font-size: .875rem; cursor: pointer;
}
.dsi-hb-pause:hover { background: rgba(11, 16, 32, .85); }
.dsi-hb-pause:focus-visible { outline: 3px solid #60A5FA; outline-offset: 2px; }

/* tablette et mobile : la composition passe sous les boutons, dans le flux */
@media (max-width: 1199px) {
	.dsi-hero-home.l-section > .l-section-h { padding-bottom: 3.5rem !important; }
	.dsi-hero-home .vc_column-inner { display: flex; flex-wrap: wrap; align-items: flex-start; }
	.dsi-hero-home .vc_column-inner > * { flex: 0 0 100%; }
	.dsi-hero-home .vc_column-inner > .w-btn-wrapper { flex: 0 0 auto; }
	.dsi-hero-home .vc_column-inner > .wpb_text_column { order: 10; }
	.dsi-hb { position: relative; top: auto; right: auto; width: min(100%, 560px); margin: 2.5rem auto 0; transform: none; }
	.dsi-hb-phone { right: -.75rem; }
}
@media (max-width: 599px) {
	.dsi-hb { margin-top: 2rem; }
	.dsi-hb-page { gap: .7rem; padding: .75rem .85rem 1rem; }
	.dsi-hb-card { height: 3.8rem; padding: .5rem; }
	.dsi-hb-steps { font-size: .75rem; flex-wrap: wrap; }
	.dsi-hb-phone { width: 24%; right: -.5rem; bottom: -1.25rem; }
	.dsi-hb-pause { right: 1rem; bottom: 1rem; }
}

/* mouvement réduit : la page s'affiche directement terminée, pas de boucle ni de bouton */
@media (prefers-reduced-motion: reduce) {
	.dsi-hb *, .dsi-hb *::before, .dsi-hb *::after, .dsi-hb-browser { animation-duration: 1ms !important; animation-delay: 0s !important; }
	.dsi-hb-pause { display: none; }
}
