@import url(font-awesome.min.css);

/* ============================================================
   Romain Lapicardise — site personnel
   Design system maison (plus de template Dimension/HTML5 UP)
   ============================================================ */

:root {
	--bg: #0a0e14;
	--bg-alt: #0e131b;
	--surface: rgba(255, 255, 255, 0.035);
	--surface-strong: rgba(16, 20, 27, 0.92);
	--border: rgba(255, 255, 255, 0.1);
	--border-strong: rgba(255, 255, 255, 0.2);
	--fg: #e7eaf0;
	--fg-strong: #ffffff;
	--fg-muted: rgba(231, 234, 240, 0.62);
	--accent: #38bdf8;
	--accent-soft: rgba(56, 189, 248, 0.12);
	--accent-border: rgba(56, 189, 248, 0.35);
	--radius: 10px;
	--mono: ui-monospace, SFMono-Regular, "Cascadia Code", "Courier New", monospace;
	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--maxw: 46rem;
	--header-h: 4rem;
}

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

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--sans);
	font-weight: 400;
	font-size: 16px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

img, svg, video, iframe {
	max-width: 100%;
}

a {
	color: var(--accent);
	text-decoration: none;
}

	a:hover {
		text-decoration: underline;
	}

h1, h2, h3, h4 {
	color: var(--fg-strong);
	font-weight: 600;
	line-height: 1.25;
	margin: 0 0 1rem 0;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1.1rem 0; }

ul { margin: 0 0 1.1rem 0; padding-left: 1.25rem; }

/* ===== Background ===== */

.bg {
	position: fixed;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(ellipse 900px 600px at 50% -10%, rgba(56, 189, 248, 0.1), transparent 60%),
		radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
		radial-gradient(ellipse at top, #131c28 0%, #0d131b 55%, var(--bg) 100%);
	background-size: auto, 28px 28px, auto;
	background-position: center, center, center;
	animation: bg-drift 22s ease-in-out infinite;
}

@keyframes bg-drift {
	0%, 100% { background-position: center, 0 0, center; }
	50% { background-position: center, 14px 14px, center; }
}

/* ===== Layout helpers ===== */

.wrap {
	width: 100%;
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 1.5rem;
}

main {
	display: block;
}

section {
	padding: 4rem 0;
	border-top: solid 1px var(--border);
	scroll-margin-top: var(--header-h);
}

	section:first-of-type {
		border-top: none;
	}

/* ===== Site header / nav ===== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	background: rgba(10, 14, 20, 0.75);
	border-bottom: solid 1px var(--border);
}

	.site-header .wrap {
		max-width: 56rem;
		height: var(--header-h);
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.brand {
		display: flex;
		align-items: center;
		gap: 0.7rem;
		font-family: var(--mono);
		font-size: 0.95rem;
		color: var(--fg-strong);
	}

		.brand img {
			width: 2.1rem;
			height: 2.1rem;
			border-radius: 100%;
			object-fit: cover;
			border: solid 1px var(--border-strong);
		}

		.brand .icon {
			width: 2.1rem;
			height: 2.1rem;
			border-radius: 100%;
			border: solid 1px var(--border-strong);
			display: flex;
			align-items: center;
			justify-content: center;
		}

	.site-nav {
		display: flex;
		align-items: center;
		gap: 0.25rem;
	}

		.site-nav a {
			color: var(--fg-muted);
			font-size: 0.85rem;
			padding: 0.5rem 0.8rem;
			border-radius: 6px;
			transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
		}

		.site-nav a:hover,
		.site-nav a.active {
			color: var(--fg-strong);
			background-color: var(--surface);
			text-decoration: none;
		}

		.site-nav a.active {
			color: var(--accent);
		}

	.nav-toggle {
		display: none;
		width: 2.25rem;
		height: 2.25rem;
		border: solid 1px var(--border-strong);
		border-radius: 6px;
		background: transparent;
		color: var(--fg-strong);
		font-size: 1.1rem;
		cursor: pointer;
	}

	@media screen and (max-width: 640px) {

		.nav-toggle {
			display: block;
		}

		.site-nav {
			position: absolute;
			top: var(--header-h);
			left: 0;
			right: 0;
			flex-direction: column;
			align-items: stretch;
			background: rgba(10, 14, 20, 0.97);
			border-bottom: solid 1px var(--border);
			padding: 0.5rem;
			gap: 0;
			display: none;
		}

		.site-nav.open {
			display: flex;
		}

		.site-nav a {
			padding: 0.85rem 1rem;
		}

	}

/* ===== Hero ===== */

.hero {
	padding: 4.5rem 0 3.5rem 0;
	text-align: center;
	border-top: none;
}

	.hero .avatar {
		width: 7.5rem;
		height: 7.5rem;
		border-radius: 100%;
		overflow: hidden;
		margin: 0 auto 1.5rem auto;
		border: solid 1px var(--border-strong);
		box-shadow: 0 0 0 6px var(--accent-soft);
		transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;
	}

		.hero .avatar:hover {
			box-shadow: 0 0 0 10px var(--accent-soft);
			transform: translateY(-2px);
		}

		.hero .avatar img {
			width: 100%;
			height: 100%;
			object-fit: cover;
			display: block;
		}

	.hero h1 {
		margin-bottom: 0.6rem;
	}

	.hero .tagline {
		color: var(--fg-muted);
		max-width: 34rem;
		margin: 0 auto;
		font-size: 1.05rem;
	}

/* Compact header used on archive pages */

.page-head {
	padding: 3.5rem 0 2.5rem 0;
	border-top: none;
}

	.page-head .back {
		display: inline-flex;
		align-items: center;
		gap: 0.4rem;
		font-family: var(--mono);
		font-size: 0.85rem;
		color: var(--fg-muted);
		margin-bottom: 1.5rem;
	}

		.page-head .back:hover {
			color: var(--accent);
			text-decoration: none;
		}

	.page-head h1 {
		margin-bottom: 1.25rem;
	}

	.page-head .lede {
		color: var(--fg-muted);
	}

/* ===== Kicker / terminal accents ===== */

.kicker {
	display: inline-block;
	font-family: var(--mono);
	font-size: 0.85rem;
	letter-spacing: 0.02em;
	color: var(--accent);
	background-color: var(--accent-soft);
	border: solid 1px var(--accent-border);
	border-radius: 6px;
	padding: 0.3rem 0.7rem;
	margin: 0 0 1.25rem 0;
}

.live-dot {
	display: inline-block;
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 100%;
	background-color: var(--accent);
	margin-right: 0.5rem;
	vertical-align: middle;
	animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
	0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.55); }
	70% { box-shadow: 0 0 0 0.5rem rgba(56, 189, 248, 0); }
	100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

/* ===== Cards / surfaces ===== */

.card {
	position: relative;
	background-color: var(--surface-strong);
	border: solid 1px var(--border);
	border-radius: var(--radius);
	padding: 1.75rem;
}

	.card:before, .card:after {
		content: '';
		position: absolute;
		width: 1rem;
		height: 1rem;
		border-color: var(--accent);
		border-style: solid;
		opacity: 0.7;
	}

	.card:before {
		top: -1px;
		left: -1px;
		border-width: 2px 0 0 2px;
	}

	.card:after {
		bottom: -1px;
		right: -1px;
		border-width: 0 2px 2px 0;
	}

/* ===== Encart projet en cours (SalaryWatch) ===== */

.project-teaser {
	position: relative;
	display: block;
	margin-top: 1.5rem;
	padding: 1.5rem;
	overflow: hidden;
	border: solid 1px var(--accent-border);
	border-radius: var(--radius);
	background:
		radial-gradient(ellipse 420px 220px at 100% 0%, rgba(52, 211, 153, 0.16), transparent 70%),
		radial-gradient(ellipse 380px 240px at 0% 100%, rgba(56, 189, 248, 0.14), transparent 70%),
		var(--surface-strong);
	color: var(--fg);
	transition: border-color 0.25s ease-in-out, transform 0.25s ease-in-out, box-shadow 0.25s ease-in-out;
}

	.project-teaser:hover {
		border-color: rgba(56, 189, 248, 0.8);
		transform: translateY(-3px);
		box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.45), 0 0 2.5rem rgba(56, 189, 248, 0.16);
		text-decoration: none;
	}

	/* Reflet qui balaie la carte pour attirer l'oeil */
	.project-teaser:before {
		content: '';
		position: absolute;
		top: 0;
		bottom: 0;
		left: -60%;
		width: 45%;
		background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.07), transparent);
		transform: skewX(-18deg);
		pointer-events: none;
		animation: teaser-sheen 6s ease-in-out infinite;
	}

@keyframes teaser-sheen {
	0%, 65% { left: -60%; }
	100% { left: 130%; }
}

	.project-teaser-top {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 0.75rem;
		flex-wrap: wrap;
		margin-bottom: 1.1rem;
	}

	.project-teaser .label {
		display: inline-flex;
		align-items: center;
		text-transform: uppercase;
		letter-spacing: 0.1em;
		font-size: 0.7rem;
		color: var(--accent);
	}

	.teaser-badge {
		font-size: 0.7rem;
		letter-spacing: 0.06em;
		text-transform: uppercase;
		color: var(--fg-muted);
		border: solid 1px var(--border);
		border-radius: 999px;
		padding: 0.2rem 0.65rem;
	}

	.project-teaser-main {
		display: flex;
		align-items: flex-start;
		gap: 1.1rem;
	}

	.teaser-mark {
		flex: 0 0 auto;
		display: block;
		width: 3rem;
		height: 3rem;
		border-radius: 14px;
		object-fit: cover;
		box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.35);
		transition: transform 0.25s ease-in-out, box-shadow 0.25s ease-in-out;
	}

	.project-teaser:hover .teaser-mark {
		transform: scale(1.06) rotate(-4deg);
		box-shadow: 0 0.6rem 1.75rem rgba(224, 184, 78, 0.45);
	}

	.project-teaser h3 {
		margin-bottom: 0.4rem;
		font-size: 1.25rem;
	}

	.project-teaser p {
		margin: 0;
		color: var(--fg-muted);
		font-size: 0.95rem;
	}

	.teaser-counter {
		display: flex;
		align-items: baseline;
		gap: 0.6rem;
		flex-wrap: wrap;
		margin: 1.25rem 0 1.1rem 0;
		padding: 0.85rem 1rem;
		border: solid 1px var(--border);
		border-radius: 8px;
		background-color: rgba(0, 0, 0, 0.25);
	}

	.teaser-counter-value {
		font-family: var(--mono);
		font-size: 1.9rem;
		font-weight: 600;
		font-variant-numeric: tabular-nums;
		color: #4ade80;
		text-shadow: 0 0 1.5rem rgba(74, 222, 128, 0.45);
	}

	.teaser-counter-sub {
		font-size: 0.78rem;
		color: var(--fg-muted);
	}

	.teaser-cta {
		display: inline-flex;
		align-items: center;
		gap: 0.5rem;
		padding: 0.65rem 1.15rem;
		border-radius: 999px;
		border: solid 1px var(--accent-border);
		background-color: var(--accent-soft);
		font-size: 0.9rem;
		font-weight: 600;
		color: var(--accent);
		transition: background-color 0.25s ease-in-out, border-color 0.25s ease-in-out, color 0.25s ease-in-out;
	}

	.project-teaser:hover .teaser-cta {
		background-color: var(--accent);
		border-color: var(--accent);
		color: #04121a;
	}

	.project-teaser:hover .teaser-cta span {
		transform: translateX(3px);
	}

	.teaser-cta span {
		display: inline-block;
		transition: transform 0.2s ease-in-out;
	}

	@media screen and (max-width: 480px) {

		.project-teaser-main {
			flex-direction: column;
			gap: 0.85rem;
		}

	}

/* Bande de photos, sans legende */

.photo-gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.6rem;
	margin: 1.5rem 0 0 0;
}

	.photo-gallery img {
		display: block;
		width: 100%;
		height: 9.5rem;
		object-fit: cover;
		border: solid 1px var(--border);
		border-radius: 8px;
		background-color: var(--bg-alt);
	}

	@media screen and (max-width: 520px) {

		.photo-gallery img {
			height: 6.5rem;
		}

	}

/* Photo legendee dans une carte */

.photo-figure {
	margin: 1.5rem 0 0 0;
	border: solid 1px var(--border);
	border-radius: 8px;
	overflow: hidden;
	background-color: var(--bg-alt);
}

	.photo-figure img {
		display: block;
		width: 100%;
		height: auto;
	}

	.photo-figure figcaption {
		padding: 0.8rem 1.1rem;
		border-top: solid 1px var(--border);
		background-color: var(--surface);
		font-size: 0.84rem;
		color: var(--fg-muted);
	}

/* Carte de presentation de l'IGA sur l'accueil */

.iga-intro {
	margin-top: 1.5rem;
}

	.iga-intro h3 {
		margin-bottom: 0.9rem;
		font-size: 1.2rem;
	}

	.iga-intro p {
		color: var(--fg-muted);
	}

	.iga-intro strong {
		color: var(--fg-strong);
	}

	.iga-intro-links {
		display: flex;
		flex-wrap: wrap;
		gap: 0.7rem;
		margin: 1.4rem 0 0 0;
	}

.archive-note {
	display: block;
	margin: 0 0 1.75rem 0;
	padding: 1rem 1.25rem;
	border-left: solid 3px var(--accent);
	background-color: var(--accent-soft);
	border-radius: 0 6px 6px 0;
	font-size: 0.9rem;
	line-height: 1.6;
	color: var(--fg-muted);
}

	.archive-note strong {
		color: var(--fg-strong);
	}

/* ===== CV section ===== */

.cv-card {
	display: flex;
	gap: 2rem;
	align-items: flex-start;
	flex-wrap: wrap;
}

	.cv-card .media {
		flex: 0 0 20rem;
		width: 20rem;
		max-width: 100%;
		transition: transform 0.25s ease-in-out, border-color 0.25s ease-in-out;
	}

		.cv-card .media:hover {
			transform: translateY(-3px);
			border-color: var(--accent);
		}

	.cv-card .cv-body {
		flex: 1 1 14rem;
		min-width: 14rem;
	}

	@media screen and (max-width: 640px) {

		.cv-card {
			gap: 1.5rem;
		}

		.cv-card .media {
			flex: 1 1 100%;
			width: 100%;
		}

	}

.media {
	display: block;
	border-radius: 8px;
	overflow: hidden;
	border: solid 1px var(--border);
	background-color: var(--bg-alt);
}

	.media img, .media iframe {
		display: block;
		width: 100%;
		height: auto;
	}

	.media.video {
		aspect-ratio: 16 / 9;
	}

		.media.video iframe {
			height: 100%;
		}

/* Vignette vidéo cliquable (lecture sur YouTube) */

.video-link {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	border-radius: 8px;
	overflow: hidden;
	border: solid 1px var(--border);
	background-color: var(--bg-alt);
	margin-bottom: 1.25rem;
}

	.video-link img {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
		transition: transform 0.35s ease-in-out, opacity 0.25s ease-in-out;
	}

	.video-link:hover img {
		transform: scale(1.03);
		opacity: 0.8;
	}

	.video-link .play {
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		width: 4rem;
		height: 4rem;
		border-radius: 100%;
		background-color: rgba(10, 14, 20, 0.75);
		border: solid 1px var(--border-strong);
		display: flex;
		align-items: center;
		justify-content: center;
		color: var(--fg-strong);
		font-size: 1.1rem;
		transition: background-color 0.25s ease-in-out, border-color 0.25s ease-in-out, transform 0.25s ease-in-out;
	}

	.video-link:hover .play {
		background-color: var(--accent);
		border-color: var(--accent);
		color: #04121a;
		transform: translate(-50%, -50%) scale(1.08);
	}

	.video-link .caption {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		padding: 0.9rem 1rem;
		font-size: 0.8rem;
		color: var(--fg);
		background: linear-gradient(to top, rgba(5, 8, 12, 0.9), transparent);
	}

	.video-link:hover {
		text-decoration: none;
		border-color: var(--accent);
	}

/* Vidéo devenue indisponible sur YouTube (privée ou supprimée) */

.video-missing {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	margin-bottom: 1.25rem;
	padding: 1.1rem 1.25rem;
	border: dashed 1px var(--border-strong);
	border-radius: 8px;
	background-color: var(--surface);
	color: var(--fg-muted);
	font-size: 0.9rem;
}

	.video-missing .mark {
		flex: 0 0 auto;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 2.5rem;
		height: 2.5rem;
		border-radius: 100%;
		border: solid 1px var(--border-strong);
		color: var(--fg);
	}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.7rem 1.25rem;
	border-radius: 6px;
	border: solid 1px var(--accent-border);
	background-color: var(--accent-soft);
	color: var(--fg-strong);
	font-size: 0.9rem;
	transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

	.btn:hover {
		background-color: rgba(56, 189, 248, 0.22);
		border-color: var(--accent);
		transform: translateY(-2px);
		text-decoration: none;
	}

/* ===== Contact / icons ===== */

.icon-row {
	display: flex;
	gap: 0.75rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

	.icon-row a {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 2.75rem;
		height: 2.75rem;
		border-radius: 100%;
		border: solid 1px var(--border-strong);
		color: var(--fg);
		transition: transform 0.2s ease-in-out, border-color 0.2s ease-in-out, background-color 0.2s ease-in-out, color 0.2s ease-in-out;
	}

		.icon-row a:hover {
			transform: translateY(-3px);
			border-color: var(--accent);
			background-color: var(--accent-soft);
			color: var(--accent);
			text-decoration: none;
		}

		.icon-row .label {
			display: none;
		}

/* ===== Chip grid (archive index) ===== */

.chip-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.6rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

	.chip-grid a {
		display: block;
		text-align: center;
		padding: 0.65rem 0.5rem;
		border: solid 1px var(--border);
		border-radius: 6px;
		background-color: var(--surface);
		color: var(--fg);
		font-size: 0.85rem;
		transition: border-color 0.2s ease-in-out, background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
	}

		.chip-grid a:hover {
			border-color: var(--accent);
			background-color: var(--accent-soft);
			transform: translateY(-2px);
			text-decoration: none;
		}

	@media screen and (max-width: 560px) {

		.chip-grid {
			grid-template-columns: repeat(2, 1fr);
		}

	}

/* ===== Project archive entries ===== */

.project {
	scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

	.project header {
		margin-bottom: 1.25rem;
	}

	.project .media {
		margin-bottom: 1.25rem;
	}

	.links-list {
		list-style: none;
		padding: 0;
		margin: 1rem 0 0 0;
		display: flex;
		flex-direction: column;
		gap: 0.4rem;
	}

		.links-list a {
			font-family: var(--mono);
			font-size: 0.85rem;
		}

	.project .note {
		color: var(--fg-muted);
		font-size: 0.85rem;
	}

/* ===== Footer ===== */

footer {
	padding: 3rem 0 4rem 0;
	text-align: center;
	color: var(--fg-muted);
	font-size: 0.85rem;
	border-top: solid 1px var(--border);
}

/* ===== Scroll reveal ===== */

.reveal {
	opacity: 0;
	transform: translateY(1.25rem);
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

	.reveal.in-view {
		opacity: 1;
		transform: translateY(0);
	}

@media (prefers-reduced-motion: reduce) {

	html {
		scroll-behavior: auto;
	}

	.bg {
		animation: none;
	}

	.live-dot {
		animation: none;
	}

	.project-teaser:before {
		animation: none;
		display: none;
	}

	.reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}

}

/* ===== Scrollbar ===== */

::-webkit-scrollbar {
	width: 0.7rem;
}

::-webkit-scrollbar-track {
	background: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
	background-color: rgba(56, 189, 248, 0.4);
	border-radius: 4px;
}

	::-webkit-scrollbar-thumb:hover {
		background-color: rgba(56, 189, 248, 0.7);
	}

html {
	scrollbar-color: rgba(56, 189, 248, 0.4) var(--bg-alt);
}
