/* =========================================================
   NextAgency — version unique :
   haut de page nuit violette → bande dégradée violet → lavande → page claire.
   ========================================================= */

:root {
	--grad: linear-gradient(90deg, #2F6BFF 0%, #7B5CFF 100%);
	--grad-text: linear-gradient(90deg, #8A6CFF 0%, #3D8BFF 100%);
	--violet: #6D5CFF;
	--night: #0A0920;
}

/* Les zones sombres (haut de page) redéfinissent les couleurs pour leur contenu. */
.hero, .hero-x, .logos-x {
	--text: #F2F1FF;
	--muted: #B4B1D6;
	--line: rgba(167, 155, 255, .13);
	--line-2: rgba(167, 155, 255, .28);
	--surface: #15133A;
	--surface-2: #1D1A4A;
	color: var(--text);
}

/* ---------- Boutons ---------- */
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -10px rgba(109, 92, 255, .6); }
.btn-primary:hover { box-shadow: 0 14px 36px -10px rgba(109, 92, 255, .8); }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--violet); }
.btn-outline:hover { background: rgba(109, 92, 255, .14); color: var(--text); }
.btn-outline svg { transition: transform .25s var(--ease); }
.btn-outline:hover svg { transform: translate(2px, -2px); }
.btn-lg { padding: 19px 32px; font-size: 17px; font-weight: 600; }
.diamond { display: inline-block; width: 11px; height: 11px; transform: rotate(45deg); border-radius: 2px; background: var(--grad); flex-shrink: 0; }

/* ---------- En-tête posé sur le haut de page sombre ---------- */
body:not(.nav-open) .site-header:not(.is-scrolled) .brand { color: #fff; }
body:not(.nav-open) .site-header:not(.is-scrolled) .brand-mark path:first-child { stroke: #2C3570; }
body:not(.nav-open) .site-header:not(.is-scrolled) .nav-side .menu { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); }
body:not(.nav-open) .site-header:not(.is-scrolled) .nav-side .menu > li > a { color: rgba(255, 255, 255, .78); }
body:not(.nav-open) .site-header:not(.is-scrolled) .nav-side .menu > li > a:hover,
body:not(.nav-open) .site-header:not(.is-scrolled) .nav-side .current-menu-item > a { color: #fff; background: rgba(255, 255, 255, .09); }
body:not(.nav-open) .site-header:not(.is-scrolled) .nav-toggle { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .25); }
body:not(.nav-open) .site-header:not(.is-scrolled) .nav-toggle .bar { background: #fff; }
.scroll-progress span { background: var(--grad); }

/* ---------- Haut de page de l'accueil ---------- */
.hero-x { position: relative; overflow: hidden; padding: clamp(130px, 14vw, 180px) 0 clamp(50px, 6vw, 80px); background: var(--night); isolation: isolate; }
.hero-x::after { display: none; }
.hero-x-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero-x-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; }

/* Objet 3D (canvas WebGL) */
.hero-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.4s ease; }
.hero-gl.is-live { opacity: 1; }
.hero-gl.is-live ~ .orb { display: none; }

/* Repli sans WebGL : anneau lumineux en CSS */
.orb { position: absolute; border-radius: 50%; }
.orb-ring {
	width: min(980px, 95vw); aspect-ratio: 1; left: 22%; top: -52%;
	background: conic-gradient(from 0deg, transparent 0deg, rgba(91, 108, 255, .15) 50deg, rgba(123, 92, 255, .6) 120deg, rgba(225, 220, 255, .95) 165deg, rgba(91, 108, 255, .45) 210deg, transparent 280deg, transparent 360deg);
	-webkit-mask: radial-gradient(circle, transparent 46%, #000 52%, #000 63%, transparent 70%);
	mask: radial-gradient(circle, transparent 46%, #000 52%, #000 63%, transparent 70%);
	animation: orbSpin 26s linear infinite;
}
.orb-ring-2 { width: min(620px, 70vw); left: 58%; top: 8%; opacity: .55; animation-duration: 34s; animation-direction: reverse; }
.orb-glow { width: 70vw; aspect-ratio: 1.6; right: -20%; bottom: -55%; background: radial-gradient(closest-side, rgba(109, 92, 255, .35), transparent); }
@keyframes orbSpin { to { transform: rotate(360deg); } }
.hero-x-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 9, 32, .82) 0%, rgba(10, 9, 32, .45) 42%, transparent 68%), linear-gradient(to bottom, transparent 70%, var(--night) 100%); }
.hero-x-dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(167, 155, 255, .22) 1px, transparent 1.4px); background-size: 26px 26px; mask-image: radial-gradient(ellipse at 25% 30%, #000, transparent 60%); -webkit-mask-image: radial-gradient(ellipse at 25% 30%, #000, transparent 60%); opacity: .5; }

.hero-x-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(30px, 4vw, 60px); align-items: center; }
.hero-x-copy { position: relative; z-index: 2; }
.hero-x-badge { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; margin: 0 0 26px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(21, 19, 58, .6); font-size: 14px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--text); }
.hero-x-title { font-size: clamp(38px, 4.6vw, 66px); line-height: 1.07; letter-spacing: -0.035em; margin: 0 0 24px; max-width: 18ch; color: var(--text); }
.hero-x-title .t-light { font-weight: 300; }
.hero-x-title .t-grad { font-weight: 700; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-x-title .t-bold { font-weight: 700; }
.hero-x-title .hl { color: #8A7CFF; }
.hero-x-lead { font-size: clamp(17px, 1.4vw, 19px); color: var(--muted); max-width: 590px; margin-bottom: 36px; line-height: 1.6; }
.hero-x .hero-actions { gap: 22px; }
.hero-x .laurels { justify-content: flex-start; margin-top: 40px; }

/* Cartes flottantes */
.hero-x-cards { position: relative; height: 480px; }
.hx-card { display: block;
	position: absolute; width: min(290px, 70%); padding: 9px; border-radius: 20px;
	background: rgba(21, 19, 56, .78); border: 1px solid rgba(167, 155, 255, .32);
	box-shadow: 0 30px 70px -30px rgba(10, 5, 60, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
	animation: hxFloat 7s ease-in-out infinite alternate;
}
.hx-card-1 { left: 0; top: 20px; }
.hx-card-2 { right: 0; top: 165px; z-index: 2; animation-delay: -3.5s; }
.hx-browser { display: block; border-radius: 13px; overflow: hidden; background: #fff; }
.hx-dots { display: flex; gap: 5px; padding: 8px 10px; background: #F1F2F7; }
.hx-dots i { width: 7px; height: 7px; border-radius: 50%; background: #FF5F57; }
.hx-dots i:nth-child(2) { background: #FEBC2E; } .hx-dots i:nth-child(3) { background: #28C840; }
.hx-shot { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.hx-shot img, .hx-shot .media-placeholder { width: 100%; height: 100%; object-fit: cover; }
.hx-shot .media-placeholder span { font-size: 18px; }
.hx-meta { display: block; padding: 14px 10px 8px; }
.hx-label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.hx-ico { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 10px; color: var(--text); }
.hx-value { display: block; margin-top: 4px; font: 600 clamp(18px, 1.7vw, 23px)/1.2 var(--font-display); color: var(--text); letter-spacing: -0.01em; }
.hx-bars { display: block; margin-top: 12px; }
.hx-bars i { display: block; height: 6px; border-radius: 6px; background: var(--line-2); margin-top: 7px; }
.hx-bars i:first-child { width: 85%; } .hx-bars i:last-child { width: 55%; }
.hx-tag {
	position: absolute; z-index: 3; display: flex; flex-direction: column; padding: 14px 20px; border-radius: 16px;
	background: rgba(25, 22, 64, .82); border: 1px solid rgba(167, 155, 255, .32); box-shadow: 0 20px 40px -20px rgba(10, 5, 60, .9);
	backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hx-tag strong { font: 600 22px var(--font-display); color: var(--text); line-height: 1.1; }
.hx-tag small { font-size: 12px; color: var(--muted); margin-top: 2px; }
.hx-tag-1 { right: 4%; top: -10px; --r: -9deg; transform: rotate(var(--r)); animation: hxTag 6s ease-in-out infinite alternate; }
.hx-tag-2 { left: 0; bottom: -6px; --r: 10deg; transform: rotate(var(--r)); animation: hxTag 6s ease-in-out -3s infinite alternate; }
@keyframes hxFloat { to { transform: translateY(-14px); } }
@keyframes hxTag { from { transform: rotate(var(--r)) translateY(0); } to { transform: rotate(var(--r)) translateY(-10px); } }

@media (max-width: 960px) {
	.hero-x-grid { grid-template-columns: 1fr; }
	.hero-x-cards { height: 420px; max-width: 520px; width: 100%; margin: 10px auto 0; }
}
@media (max-width: 520px) {
	.hero-x-cards { height: 400px; }
	.hx-card { width: 62%; }
	.hx-card-2 { top: 150px; }
	.hx-value { font-size: 16px; }
	.hx-tag { display: none; }
	.hero-x .btn-lg { width: 100%; }
}

/* ---------- Bande des logos : dégradé nuit → violet → lavande ---------- */
.logos-x {
	position: relative; border: 0; padding: 10px 0 clamp(120px, 14vw, 180px);
	background: linear-gradient(180deg, var(--night) 0%, #120F3A 22%, #3E2BC9 52%, #8D79F5 74%, #D4CAFB 90%, var(--bg, #F8F6FF) 100%);
}
.logos-x-title { display: flex; align-items: center; gap: 14px; margin: 0 0 36px; font-size: 16px; font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; text-align: left; }
.logos-x-line { flex: 1; height: 1px; background: var(--line-2); }
.logos-x .client-name { color: rgba(255, 255, 255, .82); }
.logos-x .logo-item:hover .client-name { color: #fff; }
.logos-x .client-logo { filter: grayscale(1) brightness(0) invert(1); opacity: .85; }
.logos-x .logos-viewport { mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }

/* ---------- Haut des pages internes : même ambiance, fondu vers lavande ---------- */
.hero:not(.hero-x) {
	background:
		radial-gradient(60% 80% at 85% 0%, rgba(109, 92, 255, .35), transparent 70%),
		linear-gradient(180deg, var(--night) 0%, var(--night) 45%, #2A1F8E 72%, #A897F7 90%, #F8F6FF 100%);
	padding-bottom: clamp(90px, 11vw, 140px);
}
.hero:not(.hero-x)::after { opacity: .35; }
.hero .kicker { color: #A99BFF; }
.hero .hero-tagline { color: color-mix(in srgb, var(--accent) 50%, #fff); }
.hero .service-icon { color: color-mix(in srgb, var(--accent) 55%, #fff); background: color-mix(in srgb, var(--accent) 25%, transparent); }
.hero .breadcrumb a:hover { color: #fff; }
.hero .ref-facts > div { background: rgba(21, 19, 58, .7); box-shadow: none; }
.hero .ref-facts .fact-result dd { color: color-mix(in srgb, var(--accent) 50%, #fff); }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .3); }
.hero .btn-ghost:hover { border-color: #fff; color: #fff; }

/* ---------- Titres de sections : mot en italique en dégradé ---------- */
.svc-heading em { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.kicker { color: var(--brand); }
.final-box { background: radial-gradient(60% 80% at 85% 10%, rgba(255, 255, 255, .22), transparent 60%), linear-gradient(120deg, #2F6BFF 0%, #6D5CFF 55%, #8A5CFF 100%); }
.btn-white { color: #5A55F5; }

@media (prefers-reduced-motion: reduce) {
	.orb-ring, .hx-card, .hx-tag { animation: none !important; }
}

/* =========================================================
   Optimisation mobile
   ========================================================= */
@media (max-width: 760px) {
	/* Rythme vertical plus compact */
	.section { padding: 64px 0; }
	.section-tight { padding: 36px 0; }
	.section-head { margin-bottom: 30px; }
	.h-xl { font-size: clamp(28px, 7.6vw, 36px); }
	.lead { font-size: 16.5px; }

	/* En-tête */
	.site-header { padding: 12px 0; }
	.brand { font-size: 21px; }
	.brand-mark { width: 22px; height: 26px; }

	/* Hero de l'accueil */
	.hero-x { padding: 108px 0 36px; }
	.hero-x-badge { font-size: 12px; padding: 7px 13px; margin-bottom: 20px; }
	.hero-x-title { font-size: clamp(34px, 9.4vw, 44px); margin-bottom: 18px; }
	.hero-x-lead { font-size: 16px; margin-bottom: 26px; }
	.hero-x .hero-actions { gap: 12px; flex-direction: column; }
	.hero-x .btn-lg { width: 100%; padding: 17px 24px; font-size: 16px; }
	.hero-x .laurels { gap: 10px 20px; margin-top: 28px; }
	.laurel span { font-size: 12.5px; }
	/* Une seule carte projet, bien lisible */
	.hero-x-cards { height: auto; max-width: 340px; margin: 34px auto 0; }
	.hx-card { position: relative; display: block; inset: auto; top: 0; left: 0; width: 100%; }
	.hx-card-2, .hx-tag { display: none; }
	.hx-value { font-size: 19px; }

	/* Bande des logos */
	.logos-x { padding: 4px 0 84px; }
	.logos-x-title { font-size: 14px; margin-bottom: 22px; }
	.logos-track { gap: 40px; }
	.client-name { font-size: 18px; }

	/* Haut des pages internes */
	.hero:not(.hero-x) { padding: 108px 0 76px; }
	.hero-title { font-size: clamp(34px, 10vw, 46px); }
	.hero-title-md { font-size: clamp(30px, 8.6vw, 40px); }
	.hero-tagline { font-size: 19px; }
	.service-icon-lg { width: 60px; height: 60px; border-radius: 18px; margin-bottom: 18px; }
	.service-icon-lg .nova-icon { width: 28px; height: 28px; }
	.hero .hero-actions { flex-direction: column; align-items: stretch; }
	.hero .hero-actions .btn { width: 100%; }
	.ref-facts { gap: 10px; }
	.ref-facts > div { flex: 1 1 calc(50% - 10px); padding: 12px 14px; }

	/* Chiffres clés : compacts, chiffre à gauche */
	.stats-row { gap: 10px; }
	.stat { display: flex; align-items: center; gap: 16px; padding: 16px 20px; }
	.stat strong { font-size: 30px; margin: 0; min-width: 86px; }
	.stat span { font-size: 15px; line-height: 1.35; }

	/* Méthode : numéro à gauche */
	.process { gap: 10px; }
	.process-step { display: grid; grid-template-columns: 52px 1fr; column-gap: 12px; padding: 18px 18px 18px 16px; }
	.process-num { grid-row: span 2; font-size: 28px; margin: 2px 0 0; }
	.process-step h3 { font-size: 17px; margin-bottom: 4px; }
	.process-step::after { left: 16px; right: 16px; }
	.deliverables { position: static; padding: 24px 20px; }

	/* Services de l'accueil */
	.svc-list { gap: 16px; }
	.svc-row { border-radius: 20px; }
	.svc-body { padding: 22px 20px 24px; }
	.svc-title { font-size: 26px; }
	.svc-text { font-size: 16px; margin-bottom: 14px; }
	.svc-explore { padding: 10px 0; }
	.svc-ph-icon { width: 60px; height: 60px; }
	.svc-ph-title { font-size: 22px; }

	/* Filtres des réalisations : une ligne qui défile */
	.filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 0 24px; padding: 2px 0 6px; scrollbar-width: none; scroll-snap-type: x proximity; mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
	.filters::-webkit-scrollbar { display: none; }
	.filter { flex-shrink: 0; scroll-snap-align: start; padding: 10px 16px; }

	/* Cartes réalisations */
	.refs-grid { gap: 16px; }
	.ref-body { padding: 18px 18px 20px; }
	.ref-title { font-size: 18px; }
	.ref-year { margin-left: 0; }

	/* Témoignages */
	.reels-head { align-items: center; }
	.reels-nav { margin-bottom: 24px; }
	.reels-btn { width: 44px; height: 44px; }
	.reel { flex-basis: 64vw; }
	.reel-role { font-size: 12px; }

	/* Dossier de projets */
	.folder-section { padding: 70px 0 80px; }
	.folder-stage { margin-top: 64px; }
	.folder-chips { gap: 8px; }
	.folder-chips a { font-size: 13px; padding: 11px 14px 11px 11px; }
	.paper-label { font-size: 12px; }

	/* Rendez-vous et formulaire */
	.cta-form { padding: 22px 18px; border-radius: 20px; }
	.contact-form { gap: 14px; }
	.contact-form .btn { width: 100%; }
	.booking-embed iframe { height: 640px; }
	.booking-card { padding: 24px 20px; gap: 22px; }
	.booking-cal { width: 180px; }

	/* FAQ */
	.founder-card { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; }
	.founder-photo { width: 76px; aspect-ratio: 1; border-radius: 14px; }
	.founder-photo .brand-mark { width: 32px; height: 38px; }
	.founder-body .btn { width: 100%; }
	.faq-item summary { padding: 18px; font-size: 16px; gap: 12px; }
	.faq-answer { padding: 0 18px 18px; font-size: 15.5px; }
	.faq-plus { width: 28px; height: 28px; }

	/* Bandeau final */
	.final-cta { padding-top: 50px; }
	.final-box { border-radius: 24px; padding: 44px 22px; }
	.final-box .btn { width: 100%; }

	/* Pied de page */
	.site-footer { padding: 50px 0 26px; }
	.footer-top { gap: 30px; padding-bottom: 34px; }
	.footer-col li { margin-bottom: 4px; }
	.footer-col a { display: inline-block; padding: 6px 0; }
	.footer-bottom { flex-direction: column; gap: 8px; }

	/* Textes trop petits */
	.hx-ico { font-size: 11px; }
	.hx-label { font-size: 12.5px; }
	.ref-meta { font-size: 12.5px; }

	/* Menu mobile */
	.mobile-nav { padding-top: 88px; gap: 18px; }
	.mobile-nav .menu > li > a { font-size: 24px; padding: 13px 0; }
	.mobile-nav .sub-menu a { padding: 9px 0; font-size: 16px; }
	.nav-cta-mobile { width: 100%; }

	/* Lecteur vidéo plein écran */
	.video-modal { padding: 14px; }
	.video-modal-close { top: 10px; right: 10px; }
}

/* Très petits écrans (iPhone SE, Android 360 px) */
@media (max-width: 380px) {
	.hero-x-title { font-size: 32px; }
	.h-xl { font-size: 27px; }
	.stat strong { font-size: 26px; min-width: 72px; }
	.laurels { gap: 8px 14px; }
	.laurel span { font-size: 11.5px; }
	.laurel-svg { width: 13px; height: 28px; }
	.reel { flex-basis: 70vw; }
}

/* Écrans tactiles : pas d'effets de survol qui restent « collés » */
@media (hover: none) {
	.svc-row:hover .svc-media > img, .svc-row:hover .svc-placeholder, .reel:hover, .ref-card:hover, .service-card:hover { transform: none; }
}

/* Logo personnalisé (Identité du site) */
.brand-logo { display: block; max-height: 44px; width: auto; max-width: 220px; object-fit: contain; }
.brand-logo-footer { max-height: 48px; }
.founder-photo .founder-logo { width: 80%; height: auto; max-height: 60%; object-fit: contain; }
@media (max-width: 760px) { .site-header .brand-logo { max-height: 38px; max-width: 170px; } }
