/* ==========================================================================
   FreeDevLance — Modern dark design system
   Hand-written, no framework. Replaces Bootstrap 3 + plugins.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
	--bg: #ffffff;
	--bg-2: #fafafa;
	--surface: #ffffff;
	--surface-2: #f4f4f5;
	--border: rgba(0, 0, 0, 0.1);
	--border-strong: rgba(0, 0, 0, 0.24);
	--text: #0a0a0a;
	--text-muted: #52525b;
	--text-dim: #71717a;
	--brand: #0a0a0a;
	--brand-2: #333333;
	--brand-3: #555555;
	--brand-soft: rgba(0, 0, 0, 0.05);
	/* ---- Accent: green -> teal ---- */
	--accent: #0d9488;
	--accent-2: #059669;
	--accent-3: #10b981;
	--accent-deep: #065f46;
	--accent-soft: rgba(13, 148, 136, 0.1);
	--accent-border: rgba(13, 148, 136, 0.28);
	--accent-gradient: linear-gradient(120deg, #059669 0%, #0d9488 50%, #0f766e 100%);
	--accent-gradient-soft: linear-gradient(135deg, rgba(5, 150, 105, .14), rgba(13, 148, 136, .06));
	--accent-glow: 0 0 0 1px rgba(13, 148, 136, .22), 0 18px 45px -20px rgba(13, 148, 136, .45);
	--gradient: linear-gradient(120deg, #0a0a0a 0%, #333333 50%, #555555 100%);
	--gradient-soft: linear-gradient(135deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .03));
	--glow: 0 0 0 1px rgba(0, 0, 0, .16), 0 18px 45px -20px rgba(0, 0, 0, .28);
	--danger: #dc2626;
	--radius: 18px;
	--radius-sm: 12px;
	--radius-pill: 999px;
	--shadow: 0 18px 40px -22px rgba(0, 0, 0, .22);
	--shadow-lg: 0 34px 70px -30px rgba(0, 0, 0, .26);
	--maxw: 1180px;
	--nav-h: 74px;
	--font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.65;
	color: var(--text);
	background: var(--bg);
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	position: relative;
}

/* Animated monochrome haze — fixed behind all content */
body::before {
	content: "";
	position: fixed;
	inset: -30%;
	z-index: -2;
	background:
		radial-gradient(closest-side, rgba(0, 0, 0, .07), transparent 72%) 12% 18% / 42% 42% no-repeat,
		radial-gradient(closest-side, rgba(0, 0, 0, .055), transparent 72%) 88% 12% / 46% 46% no-repeat,
		radial-gradient(closest-side, rgba(0, 0, 0, .045), transparent 72%) 70% 88% / 50% 50% no-repeat,
		radial-gradient(closest-side, rgba(0, 0, 0, .04), transparent 72%) 22% 92% / 40% 40% no-repeat;
	filter: blur(30px);
	animation: aurora 26s ease-in-out infinite alternate;
	pointer-events: none;
}

/* Faint tech grid overlay */
body::after {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	background-image:
		linear-gradient(rgba(0, 0, 0, .04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(0, 0, 0, .04) 1px, transparent 1px);
	background-size: 46px 46px;
	mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 100%);
	-webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 100%);
	pointer-events: none;
}

@keyframes aurora {
	0% { transform: translate3d(0, 0, 0) scale(1); }
	50% { transform: translate3d(2%, -2.5%, 0) scale(1.08); }
	100% { transform: translate3d(-2.5%, 2%, 0) scale(1.05); }
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.18; font-weight: 700; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 3px; border-radius: 6px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 96px 0; position: relative; }
.section--tight { padding: 68px 0; }
.section--alt { background: linear-gradient(180deg, rgba(0, 0, 0, .035), transparent); }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--accent-deep);
	background: var(--accent-soft);
	border: 1px solid var(--accent-border);
	padding: 6px 14px;
	border-radius: var(--radius-pill);
	margin-bottom: 18px;
	backdrop-filter: blur(6px);
}
.section-head h2 {
	font-size: clamp(1.9rem, 4.4vw, 2.85rem);
	background: linear-gradient(120deg, #0a0a0a 10%, #1a1a1a 45%, #0d9488 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.section-head p { color: var(--text-muted); font-size: 1.05rem; margin: 0; }

.grid { display: grid; gap: 26px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 13px 26px;
	border-radius: var(--radius-pill);
	border: 1px solid transparent;
	font-weight: 600;
	font-size: .95rem;
	line-height: 1;
	transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
	white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--gradient); background-size: 200% 200%; color: #ffffff;
	box-shadow: 0 14px 32px -14px rgba(0, 0, 0, .55);
	animation: gradShift 8s ease infinite;
}
.btn--primary:hover { box-shadow: 0 22px 46px -16px rgba(0, 0, 0, .6); }
.btn--accent { background: var(--accent-gradient); background-size: 200% 200%; color: #ffffff;
	box-shadow: 0 14px 32px -14px rgba(13, 148, 136, .65);
	animation: gradShift 8s ease infinite;
}
.btn--accent:hover { box-shadow: 0 22px 46px -16px rgba(13, 148, 136, .75); }
.btn--ghost { border-color: var(--border-strong); color: var(--text); background: rgba(255, 255, 255, .6); backdrop-filter: blur(8px); }
.btn--ghost:hover { border-color: var(--accent); color: #ffffff; background: var(--accent); box-shadow: var(--accent-glow); }
.btn--sm { padding: 10px 20px; font-size: .875rem; }
.btn--block { width: 100%; }

/* ---------- Formulaire de contact — état « envoi en cours » ---------- */
.btn.is-sending {
	cursor: progress;
	pointer-events: none;
}
.btn.is-sending:hover { transform: none; }
.btn.is-sending[disabled] { opacity: .92; }

.btn__spinner {
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, .38);
	border-top-color: #ffffff;
	border-radius: 50%;
	flex: 0 0 auto;
	animation: btnSpin .65s linear infinite;
}

@keyframes btnSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
	.btn__spinner { animation-duration: 1.8s; }
}

@keyframes gradShift {
	0%, 100% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
}

/* ---------- Nav ---------- */
.nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: var(--nav-h);
	z-index: 100;
	display: flex;
	align-items: center;
	transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
	border-bottom: 1px solid transparent;
}
.nav.is-stuck {
	background: rgba(255, 255, 255, .72);
	backdrop-filter: blur(18px) saturate(160%);
	-webkit-backdrop-filter: blur(18px) saturate(160%);
	border-bottom-color: var(--border);
	box-shadow: 0 10px 30px -22px rgba(0, 0, 0, .25);
}
/* Menu mobile ouvert : en-tête opaque pour que le panneau s'y rattache proprement. */
.nav.is-open {
	background: #ffffff;
	backdrop-filter: blur(18px) saturate(160%);
	-webkit-backdrop-filter: blur(18px) saturate(160%);
	border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; }
.nav__logo { display: flex; align-items: center; gap: 10px; }
.nav__logo img { height: 38px; width: auto; }

/* ---------- Liens de navigation ----------
   Style sobre : texte seul, changement de couleur au survol.
   L'état actif conserve la pastille dégradée du design system. */
.nav__links { display: flex; align-items: center; gap: 2px; }
.nav__links a {
	padding: 8px 13px;
	border-radius: var(--radius-pill);
	font-size: .92rem;
	font-weight: 500;
	color: var(--text-muted);
	transition: color .16s ease, background .16s ease;
}
.nav__links a:hover { color: var(--accent-deep); background: var(--accent-soft); }
.nav__links a.is-active {
	color: #ffffff;
	background: var(--accent-gradient);
	box-shadow: 0 8px 20px -10px rgba(13, 148, 136, .6);
}

.nav__right { display: flex; align-items: center; gap: 12px; }

/* ---------- Sélecteur de langue ---------- */
.nav__lang { display: flex; align-items: center; gap: 2px; border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 3px; background: rgba(255, 255, 255, .6); }
.nav__lang a { padding: 5px 11px; border-radius: var(--radius-pill); font-size: .8rem; font-weight: 600; color: var(--text-dim); transition: color .16s ease, background .16s ease; }
.nav__lang a:hover { color: var(--accent-deep); background: var(--accent-soft); }
.nav__lang a.is-active { background: var(--accent-gradient); color: #ffffff; }

/* ---------- Réseaux sociaux ---------- */
.nav__social { display: flex; gap: 6px; }
.nav__social a {
	width: 36px; height: 36px;
	display: grid; place-items: center;
	border-radius: 50%;
	border: 1px solid var(--border);
	color: var(--text-muted);
	background: rgba(255, 255, 255, .6);
	transition: all .16s ease;
}
.nav__social a:hover { color: #ffffff; border-color: transparent; background: var(--accent-gradient); box-shadow: var(--accent-glow); }
.nav__toggle {
	display: none;
	width: 44px; height: 44px;
	flex: 0 0 auto;
	border-radius: 12px;
	border: 1px solid var(--border);
	background: rgba(255, 255, 255, .68);
	color: var(--accent);
	cursor: pointer;
	position: relative;
	transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.nav__toggle:hover { border-color: var(--accent); box-shadow: var(--accent-glow); }

/* Les 3 barres du bouton menu — centrées et toujours visibles. */
.nav__toggle span {
	position: absolute;
	left: 50%;
	width: 20px;
	height: 2px;
	margin-left: -10px;
	border-radius: 2px;
	background: currentColor;
	transition: transform .26s ease, opacity .18s ease, top .26s ease;
}
.nav__toggle span:nth-child(1) { top: 15px; }
.nav__toggle span:nth-child(2) { top: 21px; }
.nav__toggle span:nth-child(3) { top: 27px; }

/* État ouvert : les barres forment une croix. */
.nav__toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-top: calc(var(--nav-h) + 84px); padding-bottom: 96px; }
.hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5.6vw, 3.65rem); color: var(--text); }
.hero h1 .grad {
	background: linear-gradient(120deg, #0a0a0a, #444444, #8a8a8a, #0a0a0a);
	background-size: 250% auto;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	animation: textFlow 6s linear infinite;
}
@keyframes textFlow {
	to { background-position: 250% center; }
}
.hero__lead { font-size: 1.12rem; color: var(--text-muted); max-width: 54ch; margin: 20px 0 32px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.badge {
	display: inline-flex; align-items: center; gap: 7px;
	font-size: .82rem; font-weight: 500; color: var(--text-muted);
	background: rgba(255, 255, 255, .68); border: 1px solid var(--border);
	padding: 7px 14px; border-radius: var(--radius-pill);
	backdrop-filter: blur(6px);
}
.badge i { color: var(--accent); }

/* Hero dashboard mock */
.hero__panel {
	background: linear-gradient(180deg, #ffffff, #fbfbfc);
	border: 1px solid var(--border-strong);
	border-radius: 22px;
	padding: 22px;
	backdrop-filter: blur(14px);
	transform: perspective(1400px) rotateY(-7deg) rotateX(3deg);
	position: relative;
}
.hero__panel-top { display: flex; gap: 6px; margin-bottom: 18px; }
.hero__panel-top i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.hero__panel-top i:first-child { background: var(--accent); }
.hero__rows { display: grid; gap: 14px; }
.hero__row {
	display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, .16);
	border-radius: 14px;
	padding: 16px 18px;
	transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.hero__row:hover {
	transform: translateY(-2px);
	border-color: var(--accent-border);
	box-shadow: 0 12px 26px -14px rgba(13, 148, 136, .45);
}
.hero__row > div { flex: 1 1 auto; min-width: 0; }
.hero__row strong {
	display: block;
	font-size: 1rem;
	font-weight: 600;
	color: #0a0a0a;
	letter-spacing: -.01em;
}
.hero__row span {
	flex: 0 0 auto;
	font-size: .84rem;
	color: var(--accent-deep);
	font-weight: 700;
	white-space: nowrap;
	padding-top: 2px;
}
.hero__row span b { font-weight: 700; font-variant-numeric: tabular-nums; }
.hero__bar {
	height: 8px;
	border-radius: 999px;
	background: rgba(0, 0, 0, .09);
	overflow: hidden;
	margin-top: 11px;
}
.hero__bar i { display: block; height: 100%; background: var(--accent-gradient); border-radius: 999px; }

/* ---------- Cards ---------- */
.card {
	background: rgba(255, 255, 255, .72);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 28px;
	transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
	height: 100%;
	backdrop-filter: blur(10px);
	position: relative;
	overflow: hidden;
}
.card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 3px;
	background: var(--accent-gradient);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .3s ease;
}
.card:hover { transform: translateY(-6px); border-color: var(--accent-border); box-shadow: var(--shadow-lg); }
.card:hover::before { transform: scaleX(1); }
.card__icon {
	width: 52px; height: 52px;
	display: grid; place-items: center;
	border-radius: 14px;
	background: var(--accent-gradient-soft);
	border: 1px solid var(--accent-border);
	color: var(--accent);
	font-size: 1.3rem;
	margin-bottom: 18px;
}
.card h3 { font-size: 1.16rem; margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: .94rem; margin: 0; }

/* ---------- Process steps ---------- */
.step {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	background: rgba(255, 255, 255, .72);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 28px;
	backdrop-filter: blur(10px);
	transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
	height: 100%;
}
.step:hover { transform: translateY(-4px); border-color: var(--accent-border); box-shadow: var(--shadow); }
.step__num {
	flex: 0 0 auto;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: -.02em;
	color: var(--accent-deep);
	background: var(--accent-gradient-soft);
	border: 1px solid var(--accent-border);
	width: 52px; height: 52px;
	display: grid; place-items: center;
	border-radius: 14px;
	font-variant-numeric: tabular-nums;
}
.step h3 { font-size: 1.16rem; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: .94rem; margin: 0; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq__item {
	background: rgba(255, 255, 255, .72);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	backdrop-filter: blur(10px);
	transition: border-color .2s ease, box-shadow .2s ease;
	overflow: hidden;
}
.faq__item[open] { border-color: var(--accent-border); box-shadow: var(--shadow); }
.faq__item summary {
	cursor: pointer;
	list-style: none;
	padding: 19px 56px 19px 22px;
	font-weight: 600;
	font-size: 1.01rem;
	color: var(--text);
	position: relative;
	transition: color .18s ease;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
	content: "";
	position: absolute;
	right: 22px; top: 50%;
	width: 10px; height: 10px;
	border-right: 2px solid var(--accent);
	border-bottom: 2px solid var(--accent);
	transform: translateY(-70%) rotate(45deg);
	transition: transform .25s ease;
}
.faq__item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq__item summary:hover { color: var(--accent-deep); }
.faq__item p {
	margin: 0;
	padding: 0 22px 22px;
	color: var(--text-muted);
	font-size: .94rem;
	line-height: 1.7;
	animation: faqIn .3s ease both;
}
@keyframes faqIn {
	from { opacity: 0; transform: translateY(-6px); }
	to { opacity: 1; transform: none; }
}
[dir="rtl"] .faq__item summary { padding: 19px 22px 19px 56px; }
[dir="rtl"] .faq__item summary::after { right: auto; left: 22px; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 300px 1fr; gap: 46px; align-items: start; }
.about__photo { position: relative; }
.about__photo img {
	border-radius: 20px;
	border: 1px solid var(--border-strong);
	box-shadow: var(--shadow);
	width: 100%;
}
.about__photo::after {
	content: "";
	position: absolute; inset: auto -14px -14px auto;
	width: 120px; height: 120px;
	background: var(--accent-gradient);
	border-radius: 20px;
	z-index: -1;
	opacity: .28;
	filter: blur(6px);
}
.about p { color: var(--text-muted); }
.stack { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.stack li {
	font-size: .82rem; font-weight: 500;
	background: var(--surface); border: 1px solid var(--border);
	color: var(--text-muted);
	padding: 6px 13px; border-radius: var(--radius-pill);
}

/* ---------- Apps (featured) ---------- */
.app {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	background: rgba(255, 255, 255, .82);
	border: 1px solid var(--border);
	border-radius: 22px;
	overflow: hidden;
	margin-bottom: 34px;
	transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
	backdrop-filter: blur(12px);
}
.app:hover { border-color: rgba(0, 0, 0, .4); box-shadow: var(--shadow-lg), 0 0 70px -30px rgba(0, 0, 0, .3); transform: translateY(-5px); }
.app__body { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.app__logo {
	display: block;
	height: 60px;
	width: auto;
	max-width: 300px;
	max-height: 60px;
	object-fit: contain;
	object-position: center;
	margin: 0 auto 22px;
	flex: 0 0 auto;
	align-self: center;
}
/* Square logo: allow more height + horizontal breathing room so it reads wider */
.app__logo--syndigest {
	height: 124px;
	max-height: 124px;
	max-width: 260px;
	padding: 0 22px;
}
.app__logo-fallback { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 auto 22px; font-size: 1.5rem; font-weight: 700; }
.app__logo-fallback i { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-gradient); color: #ffffff; font-size: 1.15rem;
}
.app__tagline { color: var(--text-muted); margin-bottom: 18px; font-size: .98rem; }
.app__features { display: grid; gap: 9px; margin: 4px 0 24px; }
.app__features li { display: flex; gap: 10px; font-size: .92rem; color: var(--text-muted); }
.app__features li::before { content: "\2713"; color: var(--accent); font-weight: 700; }
.app__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.app__meta li { font-size: .76rem; font-weight: 600; color: var(--accent-deep); background: var(--accent-soft); border: 1px solid var(--accent-border); padding: 4px 11px; border-radius: var(--radius-pill); }
.app__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.app__media {
	position: relative;
	min-height: 340px;
	background: linear-gradient(150deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .02)), var(--surface-2);
	display: grid; place-items: center;
	overflow: hidden;
	border-left: 1px solid var(--border);
}
.app__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; max-width: none; }
/* Click-to-zoom affordance */
.app__media { cursor: zoom-in; }
.app__media::after {
	content: "\f00e";
	font-family: "FontAwesome";
	position: absolute;
	top: 14px; right: 14px;
	width: 40px; height: 40px;
	display: grid; place-items: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, .9);
	color: var(--accent-deep);
	font-size: 1rem;
	border: 1px solid var(--border);
	opacity: 0;
	transform: scale(.85);
	transition: opacity .2s ease, transform .2s ease;
	pointer-events: none;
	z-index: 2;
}
.app__media:hover::after { opacity: 1; transform: scale(1); }
.app__media-fallback { text-align: center; color: var(--text-dim); padding: 30px; }
.app__media-fallback i { font-size: 3.4rem; margin-bottom: 12px; color: var(--accent); opacity: .35; display: block; }
.app:nth-child(even) .app__body { order: 2; }
.app:nth-child(even) .app__media { order: 1; border-left: 0; border-right: 1px solid var(--border); }

/* ---------- Works / portfolio ---------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-bottom: 40px; }
.filters button {
	background: rgba(255, 255, 255, .7); border: 1px solid var(--border); color: var(--text-muted);
	padding: 9px 18px; border-radius: var(--radius-pill); font-size: .86rem; font-weight: 500;
	transition: all .16s ease;
}
.filters button:hover { color: var(--accent-deep); border-color: var(--accent-border); }
.filters button.is-active { background: var(--accent-gradient); border-color: transparent; color: #ffffff; font-weight: 600; box-shadow: 0 10px 24px -12px rgba(13, 148, 136, .7); }

.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.work {
	position: relative;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--border);
	background: var(--surface);
	aspect-ratio: 4 / 3;
	cursor: pointer;
}
.work img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	filter: grayscale(1);
	transition: transform .45s ease, filter .35s ease;
}
.work:hover img { transform: scale(1.06); filter: grayscale(0); }
.work__overlay {
	position: absolute; inset: 0;
	display: flex; flex-direction: column; justify-content: flex-end;
	padding: 22px;
	background: linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .82));
	opacity: 0; transition: opacity .25s ease;
}
.work:hover .work__overlay { opacity: 1; }
.work__overlay h4 { font-size: 1.05rem; margin-bottom: 4px; color: #fff; }
.work__overlay p { font-size: .82rem; color: #e5e5e5; margin: 0; font-weight: 500; }
.work__tag {
	position: absolute; top: 14px; left: 14px;
	font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
	background: rgba(255, 255, 255, .88); backdrop-filter: blur(6px);
	color: var(--text); border: 1px solid var(--border);
	padding: 5px 11px; border-radius: var(--radius-pill);
	transition: opacity .25s ease;
}
.work:hover .work__tag { opacity: 0; }
.work.is-hidden { display: none; }

/* Wide app screenshots: identical tile size to the rest of the grid
   (4/3), but scale the shot to fill it evenly instead of hard-cropping
   it off-centre. Declared fully so the global `img { max-width:100%;
   height:auto }` rule cannot shrink it inside the tile. */
.work--wide { aspect-ratio: 4 / 3; }
.work--wide img {
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center center;
}

/* ---------- Case study ---------- */
.case { padding-top: calc(var(--nav-h) + 56px); padding-bottom: 90px; }
.case .container { max-width: 960px; }
.case__back {
	display: inline-flex; align-items: center; gap: 9px;
	font-size: .88rem; font-weight: 600; color: var(--text-muted);
	margin-bottom: 30px;
	transition: color .16s ease, gap .16s ease;
}
.case__back:hover { color: var(--accent-deep); gap: 13px; }
.case__head { max-width: 100%; margin-bottom: 34px; text-align: center; }
.case__head h1 { font-size: clamp(1.9rem, 4.4vw, 2.7rem); margin-bottom: 14px; }
.case__head p { color: var(--text-muted); font-size: 1.05rem; margin: 0 auto; max-width: 620px; }
.case__meta {
	display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
	margin-bottom: 38px;
}
.case__meta li {
	display: flex; flex-direction: column; gap: 3px;
	background: rgba(255, 255, 255, .72);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 14px 20px;
	backdrop-filter: blur(8px);
	min-width: 170px;
}
.case__meta span {
	font-size: .68rem; font-weight: 700; text-transform: uppercase;
	letter-spacing: .1em; color: var(--accent-deep);
}
.case__meta strong { font-size: .95rem; font-weight: 600; color: var(--text); }
.case__shots {
	display: grid;
	gap: 26px;
	margin: 0 auto 40px;
	max-width: 960px;
}
.case__shot {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--surface);
	box-shadow: var(--shadow);
	transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.case__shot:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent-border); }
.case__shot img {
	width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
	object-fit: contain;
}
.case__shot figcaption {
	font-size: .84rem; color: var(--text-dim);
	padding: 13px 18px; border-top: 1px solid var(--border);
}
.case__body { max-width: 760px; margin: 0 auto; }
.case__body h2 { font-size: 1.4rem; margin: 34px 0 12px; text-align: center; }
.case__body p { color: var(--text-muted); margin-bottom: 14px; text-align: center; }
.case__body ul { display: grid; gap: 9px; margin: 0 0 14px; max-width: 560px; margin-left: auto; margin-right: auto; }
.case__body li { display: flex; gap: 10px; color: var(--text-muted); font-size: .96rem; }
.case__body li::before { content: "\2713"; color: var(--accent); font-weight: 700; }
.case__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 38px; }

/* ---------- Clients ---------- */
.clients { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.clients img {
	width: 100%; height: 92px; object-fit: contain;
	background: rgba(255, 255, 255, .75);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 14px;
	filter: grayscale(1);
	opacity: .75;
	transition: all .25s ease;
}
.clients img:hover { filter: none; opacity: 1; border-color: var(--accent-border); box-shadow: var(--accent-glow); }

/* ---------- Quotes ---------- */
.quote-band { text-align: center; }
.quote-band .grid--3 { gap: 22px; }
.quote {
	background: rgba(255, 255, 255, .78);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 30px 26px;
	text-align: left;
	backdrop-filter: blur(10px);
	transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.quote:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--accent-border); }
.quote i { color: var(--accent); font-size: 1.4rem; opacity: .8; }
.quote blockquote { margin: 14px 0 16px; font-size: 1rem; color: var(--text); line-height: 1.6; }
.quote cite { font-style: normal; font-size: .84rem; color: var(--text-dim); font-weight: 600; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 44px; align-items: start; }
.contact-info__item { display: flex; gap: 15px; margin-bottom: 24px; }
.contact-info__item i {
	flex: 0 0 46px; width: 46px; height: 46px;
	display: grid; place-items: center;
	border-radius: 13px; background: var(--accent-gradient-soft);
	border: 1px solid var(--accent-border); color: var(--accent);
}
.contact-info__item h4 { font-size: .95rem; margin-bottom: 2px; }
.contact-info__item p { margin: 0; color: var(--text-muted); font-size: .92rem; }

.form { background: rgba(255, 255, 255, .82); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.form .field { margin-bottom: 16px; position: relative; }
.form input, .form textarea {
	width: 100%;
	background: rgba(0, 0, 0, .03);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	color: var(--text);
	font-family: inherit;
	font-size: .95rem;
	padding: 14px 16px;
	transition: border-color .16s ease, box-shadow .16s ease;
}
.form input::placeholder, .form textarea::placeholder { color: var(--text-dim); }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: rgba(244, 244, 245, .7); }
.form textarea { resize: vertical; min-height: 130px; }
.form .error { display: none; color: var(--danger); font-size: .8rem; margin-top: 6px; }

/* Honeypot anti-spam : invisible pour les humains, visible pour les robots.
   On l'éloigne hors écran plutôt que display:none, car certains bots
   ignorent les champs en display:none. */
.hp-field {
	position: absolute !important;
	left: 0 !important;
	top: 0 !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
}
.form .response { border: 1px solid rgba(0, 0, 0, .28); background: var(--brand-soft); border-radius: var(--radius-sm); padding: 20px; }
.form .response h3 { font-size: 1.05rem; }
.form .response h4 { font-size: .9rem; margin: 0; color: var(--text-muted); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 40px 0; background: rgba(255, 255, 255, .6); backdrop-filter: blur(10px); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer p { margin: 0; color: var(--text-dim); font-size: .88rem; }
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--accent-deep); }
.footer__social { display: flex; gap: 8px; }
.footer__social a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); color: var(--text-muted); transition: all .16s ease; }
.footer__social a:hover { color: #ffffff; border-color: transparent; background: var(--accent-gradient); box-shadow: var(--accent-glow); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Staggered children get their delay from JS via --d (in ms) */
.reveal { transition-delay: var(--d, 0ms); }

/* Slide-in variants */
.reveal--left { transform: translateX(-28px); }
.reveal--right { transform: translateX(28px); }
.reveal--scale { transform: scale(.94); }
.reveal--left.is-visible,
.reveal--right.is-visible,
.reveal--scale.is-visible { transform: none; }

/* ---------- Page enter ---------- */
@keyframes pageIn {
	from { opacity: 0; }
	to { opacity: 1; }
}
body { animation: pageIn .5s ease both; }

/* ---------- Hero entrance ---------- */
@keyframes riseIn {
	from { opacity: 0; transform: translateY(26px); }
	to { opacity: 1; transform: none; }
}
.hero__badges .badge {
	animation: riseIn .6s cubic-bezier(.22,1,.36,1) both;
}
.hero__badges .badge:nth-child(1) { animation-delay: .35s; }
.hero__badges .badge:nth-child(2) { animation-delay: .45s; }
.hero__badges .badge:nth-child(3) { animation-delay: .55s; }
.hero__badges .badge:nth-child(4) { animation-delay: .65s; }
.hero__badges .badge:nth-child(5) { animation-delay: .75s; }

/* ---------- Floating badge icons ---------- */
@keyframes iconPop {
	0%, 100% { transform: translateY(0) scale(1); }
	50% { transform: translateY(-3px) scale(1.08); }
}
.badge i, .card__icon i, .contact-info__item i {
	animation: iconPop 3.6s ease-in-out infinite;
}
.card:hover .card__icon i,
.badge:hover i,
.contact-info__item:hover i { animation-play-state: paused; }

/* ---------- Card sheen sweep ---------- */
.card::after {
	content: "";
	position: absolute;
	top: 0; left: -140%;
	width: 60%; height: 100%;
	background: linear-gradient(100deg, transparent, rgba(13, 148, 136, .12), transparent);
	transform: skewX(-18deg);
	transition: left .7s ease;
	pointer-events: none;
}
.card:hover::after { left: 140%; }

/* ---------- Nav : plus de soulignement animé ----------
   L'état actif utilise la pastille dégradée, le survol un fond doux.
   (Le soulignement entrait en conflit avec la pastille.) */

/* ---------- Progress bars animate when shown ---------- */
.hero__bar i { width: 0; transition: width 1.1s cubic-bezier(.22,1,.36,1); }
.hero__panel.is-visible .hero__bar i { width: var(--w, 60%); }

/* ---------- Card icon tint pulse ---------- */
@keyframes softPulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0); }
	50% { box-shadow: 0 0 0 6px rgba(13, 148, 136, .1); }
}
.card__icon { animation: softPulse 4s ease-in-out infinite; }

/* ---------- Sticky header slide ---------- */
.nav.is-stuck { animation: navDrop .35s cubic-bezier(.22,1,.36,1); }
@keyframes navDrop {
	from { transform: translateY(-12px); }
	to { transform: none; }
}

/* ---------- Gradient text slow shimmer ---------- */
.section-head h2 {
	background-size: 220% auto;
	animation: headShimmer 9s linear infinite;
}
@keyframes headShimmer {
	to { background-position: 220% center; }
}

/* ---------- Back to top ---------- */
.to-top {
	position: fixed; right: 22px; bottom: 22px; z-index: 90;
	width: 46px; height: 46px; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--accent-gradient); color: #ffffff; border: 0;
	box-shadow: 0 14px 30px -12px rgba(13, 148, 136, .6);
	opacity: 0; visibility: hidden;
	transform: translateY(12px);
	transition: all .25s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { box-shadow: var(--accent-glow); transform: translateY(-3px); }

/* ---------- Lightbox ---------- */
.lightbox {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 24px;
	background: rgba(8, 8, 8, .9);
	backdrop-filter: blur(10px);
	opacity: 0;
	visibility: hidden;
	transition: opacity .28s ease, visibility .28s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img {
	max-width: min(1500px, 96vw);
	max-height: 88vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 14px;
	border: 1px solid rgba(255, 255, 255, .18);
	box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9);
	transform: scale(.95);
	transition: transform .3s cubic-bezier(.22,1,.36,1);
	background: #ffffff;
}
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__close {
	position: absolute;
	top: 22px; right: 22px;
	width: 46px; height: 46px;
	display: grid; place-items: center;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .3);
	background: rgba(255, 255, 255, .12);
	color: #ffffff;
	font-size: 1.1rem;
	cursor: pointer;
	transition: background .18s ease, transform .18s ease, border-color .18s ease;
}
.lightbox__close:hover { background: var(--accent); border-color: transparent; transform: rotate(90deg); }
.lightbox__caption {
	position: absolute;
	left: 0; right: 0; bottom: 18px;
	text-align: center;
	color: rgba(255, 255, 255, .82);
	font-size: .88rem;
	padding: 0 24px;
}
body.lightbox-open { overflow: hidden; }
[dir="rtl"] .lightbox__close { right: auto; left: 22px; }

/* ---------- AI extras: floating orbs & shimmer ---------- */
.orbs {
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	overflow: hidden;
}
.orbs span {
	position: absolute;
	border-radius: 50%;
	filter: blur(48px);
	opacity: .16;
	will-change: transform;
}
.orbs span:nth-child(1) {
	width: 340px; height: 340px;
	top: 6%; left: -6%;
	background: radial-gradient(circle, #10b981, transparent 70%);
	animation: float1 19s ease-in-out infinite;
}
.orbs span:nth-child(2) {
	width: 300px; height: 300px;
	top: 48%; right: -5%;
	background: radial-gradient(circle, #0d9488, transparent 70%);
	animation: float2 23s ease-in-out infinite;
}
.orbs span:nth-child(3) {
	width: 260px; height: 260px;
	bottom: 4%; left: 24%;
	background: radial-gradient(circle, #0f766e, transparent 70%);
	animation: float3 27s ease-in-out infinite;
}
@keyframes float1 {
	0%, 100% { transform: translate(0, 0) scale(1); }
	50% { transform: translate(60px, 40px) scale(1.15); }
}
@keyframes float2 {
	0%, 100% { transform: translate(0, 0) scale(1.05); }
	50% { transform: translate(-70px, -50px) scale(.9); }
}
@keyframes float3 {
	0%, 100% { transform: translate(0, 0) scale(1); }
	50% { transform: translate(40px, -60px) scale(1.12); }
}

/* Gradient divider line between sections */
.section--alt::before {
	content: "";
	position: absolute;
	top: 0; left: 50%;
	transform: translateX(-50%);
	width: min(60%, 620px);
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .35), rgba(0, 0, 0, .35), transparent);
}

/* ---------- RTL ---------- */
[dir="rtl"] body { font-family: "Tajawal", "Tahoma", "Segoe UI", var(--font); }
[dir="rtl"] .app__logo { align-self: center; object-position: center; }
[dir="rtl"] .quote { text-align: right; }
[dir="rtl"] .app__features li::before { content: "\2713"; }
[dir="rtl"] .work__tag { left: auto; right: 14px; }
[dir="rtl"] .to-top { right: auto; left: 22px; }
[dir="rtl"] .about__photo::after { inset: auto auto -14px -14px; }
[dir="rtl"] .app:nth-child(even) .app__media { border-right: 0; border-left: 1px solid var(--border); }
[dir="rtl"] .app__media { border-left: 0; border-right: 1px solid var(--border); }
/* Barre d'accent du menu mobile : à droite en arabe. */
[dir="rtl"] .nav__links a { border-left: 0; border-right: 3px solid transparent; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.hero__inner { grid-template-columns: 1fr; gap: 40px; }
	.hero__panel { transform: none; }
	.grid--4 { grid-template-columns: repeat(2, 1fr); }
	.clients { grid-template-columns: repeat(4, 1fr); }
	.app { grid-template-columns: 1fr; }
	.app:nth-child(even) .app__body,
	.app:nth-child(even) .app__media { order: initial; }
	.app__media { border-left: 0; border-top: 1px solid var(--border); min-height: 280px; }
	.about { grid-template-columns: 240px 1fr; gap: 32px; }
	.contact-grid { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 860px) {
	/* Panneau déroulant : plein écran sous l'en-tête, liste verticale propre. */
	.nav__links {
		position: fixed;
		top: var(--nav-h); left: 0; right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		background: #ffffff;
		backdrop-filter: blur(18px);
		box-shadow: 0 24px 48px -28px rgba(0, 0, 0, .3);
		border-bottom: 1px solid var(--border);
		padding: 10px 14px 18px;
		transform: translateY(-120%);
		transition: transform .3s cubic-bezier(.22,1,.36,1), visibility .3s;
		max-height: calc(100vh - var(--nav-h));
		overflow-y: auto;
		overscroll-behavior: contain;
		visibility: hidden;
	}
	.nav.is-open .nav__links { transform: none; visibility: visible; }

	/* Chaque entrée : ligne pleine largeur, hauteur confortable au doigt. */
	.nav__links li { width: 100%; }
	.nav__links a {
		display: block;
		width: 100%;
		padding: 14px 16px;
		border-radius: var(--radius-sm);
		font-size: 1rem;
		font-weight: 500;
		color: var(--text-muted);
		background: none;
		box-shadow: none;
		/* Barre d'accent à gauche, révélée au survol / état actif. */
		border-left: 3px solid transparent;
		transition: color .16s ease, background .16s ease, border-color .16s ease;
	}
	.nav__links a:hover,
	.nav__links a:focus-visible {
		color: var(--accent-deep);
		background: var(--accent-soft);
		border-left-color: var(--accent-3);
	}

	/* État actif : texte vert + fine barre verticale. Pas de trait épais. */
	.nav__links a.is-active {
		color: var(--accent-2);
		background: var(--accent-soft);
		border-left-color: var(--accent-2);
		font-weight: 600;
	}

	.nav__toggle { display: block; }
	.nav__social { display: none; }
	.grid--3, .grid--2 { grid-template-columns: 1fr; }
	.works { grid-template-columns: repeat(2, 1fr); }
	.clients { grid-template-columns: repeat(3, 1fr); }
	.section { padding: 72px 0; }
}

@media (max-width: 560px) {
	.hero { padding-top: calc(var(--nav-h) + 48px); }
	.about { grid-template-columns: 1fr; }
	.about__photo { max-width: 240px; }
	.works { grid-template-columns: 1fr; }
	.clients { grid-template-columns: repeat(2, 1fr); }
	.app__body { padding: 28px 24px; }
	.form { padding: 22px; }
	.footer__inner { flex-direction: column; text-align: center; }

	/* Le sélecteur de langue reste visible sur petit écran. */
	.nav__right { gap: 8px; }
	.nav__lang { padding: 2px; }
	.nav__lang a { padding: 5px 8px; font-size: .75rem; }
	.nav__logo img { height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal { opacity: 1; transform: none; transition: none; }
	* { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
	body { animation: none; }
	.hero__bar i { width: var(--w, 60%); }
	.card::after { display: none; }
}

@media print {
	body::before, .nav, .to-top, .hero__panel { display: none !important; }
	body { background: #fff; color: #000; }
}
