/*
Theme Name: SM Portfolio
Theme URI: https://smportfolio.fr
Author: Serge Martins
Author URI: https://smportfolio.fr
Description: Thème portfolio moderne de Serge Martins — professeur d’informatique et instructeur Cisco. Page d’accueil one-page, page Services avec filtres, thème clair / sombre.
Version: 2.7.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sm-portfolio
*/

/* =========================================================
   SM Portfolio — styles
   ========================================================= */
:root {
	--font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
	--c1: #7c5cff;   /* violet */
	--c2: #22d3ee;   /* cyan */
	--c3: #f472b6;   /* rose */
	--grad: linear-gradient(120deg, var(--c1), var(--c2));
	--radius: 20px;
	--radius-sm: 12px;
	--ease: cubic-bezier(.2, .8, .2, 1);
	--maxw: 1180px;
}
:root,
[data-theme="dark"] {
	--bg: #07070d;
	--bg-2: #0e0e18;
	--text: #ecebf5;
	--muted: #9d9bb3;
	--line: rgba(255, 255, 255, .08);
	--glass: rgba(255, 255, 255, .04);
	--glass-2: rgba(255, 255, 255, .07);
	--shadow: 0 20px 60px -20px rgba(0, 0, 0, .7);
	--blob-o: .55;
	color-scheme: dark;
}
[data-theme="light"] {
	--bg: #f7f6fc;
	--bg-2: #ffffff;
	--text: #16142a;
	--muted: #5e5b78;
	--line: rgba(22, 20, 42, .09);
	--glass: rgba(255, 255, 255, .65);
	--glass-2: rgba(255, 255, 255, .9);
	--shadow: 0 20px 50px -24px rgba(60, 40, 140, .25);
	--blob-o: .35;
	color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.65;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
	transition: background .4s var(--ease), color .4s var(--ease);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, .h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 750; }
h3, .h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }
ul { padding: 0; margin: 0; list-style: none; }
.muted { color: var(--muted); }
.container { width: min(var(--maxw), 100% - 40px); margin-inline: auto; }
.icon { flex-shrink: 0; vertical-align: middle; }
::selection { background: var(--c1); color: #fff; }
:focus-visible { outline: 2px solid var(--c2); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: -999px; top: 10px; z-index: 100; background: var(--c1); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 10px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Fond animé ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg__blob { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(90px); opacity: var(--blob-o); animation: float 22s ease-in-out infinite; }
.bg__blob--1 { background: var(--c1); top: -18vmax; left: -12vmax; }
.bg__blob--2 { background: var(--c2); top: 20vh; right: -20vmax; animation-delay: -7s; opacity: calc(var(--blob-o) * .6); }
.bg__blob--3 { background: var(--c3); bottom: -25vmax; left: 25vw; animation-delay: -14s; opacity: calc(var(--blob-o) * .45); }
.bg__grid {
	position: absolute; inset: 0;
	background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
	background-size: 56px 56px;
	mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
	-webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}
@keyframes float {
	0%, 100% { transform: translate(0, 0) scale(1); }
	33% { transform: translate(6vw, 4vh) scale(1.08); }
	66% { transform: translate(-4vw, 6vh) scale(.95); }
}
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); z-index: 60; }

/* ---------- Verre, boutons, pastilles ---------- */
.glass {
	background: var(--glass);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	backdrop-filter: blur(18px) saturate(140%);
	-webkit-backdrop-filter: blur(18px) saturate(140%);
	box-shadow: var(--shadow);
}
.gradient-text { color: var(--c1); }
[data-theme="dark"] .gradient-text { color: #a996ff; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
	.gradient-text {
		display: inline-block; padding-bottom: .08em;
		background-image: linear-gradient(120deg, #7c5cff, #22d3ee);
		-webkit-background-clip: text; background-clip: text;
		-webkit-text-fill-color: transparent;
	}
}
.btn {
	display: inline-flex; align-items: center; gap: .55em;
	padding: .8em 1.35em; border-radius: 999px; font-weight: 600; font-size: .98rem;
	border: 1px solid transparent; cursor: pointer; white-space: nowrap;
	transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -10px var(--c1); }
.btn--primary:hover { box-shadow: 0 16px 40px -12px var(--c1); }
.btn--ghost { background: var(--glass); border-color: var(--line); backdrop-filter: blur(10px); }
.btn--ghost:hover { border-color: var(--c1); }
.btn--sm { padding: .55em 1.05em; font-size: .9rem; }
.btn--lg { padding: 1em 1.6em; font-size: 1.02rem; }
.icon-btn {
	display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
	background: var(--glass); border: 1px solid var(--line); color: var(--text); cursor: pointer;
	transition: border-color .25s, transform .25s var(--ease);
}
.icon-btn:hover { border-color: var(--c1); transform: translateY(-2px); }
.pill {
	display: inline-flex; align-items: center; gap: .55em; padding: .4em .9em; border-radius: 999px;
	font-size: .85rem; font-weight: 550; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px);
}
.pill--soft { color: var(--muted); }
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.eyebrow { display: inline-block; font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--c2); margin-bottom: .8em; }
[data-theme="light"] .eyebrow { color: var(--c1); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: .35em .8em; border-radius: 999px; font-size: .85rem; background: var(--glass-2); border: 1px solid var(--line); transition: border-color .2s, color .2s; }
.chips li:hover { border-color: var(--c1); }
.chips--sm li { font-size: .78rem; padding: .25em .7em; }
.chips--check li { display: inline-flex; align-items: center; gap: .45em; }
.chips--check .icon { color: #34d399; }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 50; padding: 14px 0; transition: padding .3s var(--ease); }
.site-header__inner {
	display: flex; align-items: center; gap: 20px; padding: 10px 12px 10px 18px;
	border-radius: 999px; border: 1px solid transparent; transition: background .3s, border-color .3s, box-shadow .3s;
}
.is-scrolled .site-header { padding: 8px 0; }
.is-scrolled .site-header__inner { background: var(--glass); border-color: var(--line); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand__mark { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--grad); color: #fff; font-size: .9rem; font-weight: 800; letter-spacing: .02em; }
.brand__mark--sm { width: 30px; height: 30px; border-radius: 9px; font-size: .75rem; margin-right: 8px; }
.brand__logo { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; }
.nav { margin-left: auto; }
.nav__list { display: flex; gap: 4px; }
.nav__list a { display: block; padding: .5em .95em; border-radius: 999px; font-size: .95rem; color: var(--muted); transition: color .2s, background .2s; }
.nav__list a:hover, .nav__list a.is-active { color: var(--text); background: var(--glass-2); }
.site-header__actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle .icon--moon, [data-theme="light"] .theme-toggle .icon--sun { display: none; }
[data-theme="light"] .theme-toggle .icon--moon { display: block; }
.nav-toggle { display: none; }
.nav-toggle .icon--close { display: none; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; min-height: calc(100vh - 90px); padding: 40px 0 60px; }
.hero__title { margin: .5em 0 .25em; font-size: clamp(2.8rem, 6.5vw, 5.4rem); font-weight: 800; letter-spacing: -.04em; }
.hero__name { display: block; color: var(--text) !important; -webkit-text-fill-color: currentColor !important; opacity: 1 !important; }
.hero__name-accent { color: #8f75ff !important; -webkit-text-fill-color: currentColor !important; }
[data-theme="light"] .hero__name-accent { color: #6a4cf0 !important; }
.hero__hello { display: block; font-size: .32em; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-bottom: .3em; }
.hero__role { font-family: var(--mono); font-size: clamp(1rem, 2vw, 1.25rem); color: var(--c2); min-height: 1.6em; margin-bottom: 1.2em; }
[data-theme="light"] .hero__role { color: var(--c1); }
.caret { display: inline-block; width: 2px; height: 1.1em; background: currentColor; margin-left: 4px; vertical-align: -.15em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0; }
.hero__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: .95rem; }
.hero__meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero__meta a { transition: color .2s, transform .2s; }
.hero__meta a:hover { color: var(--text); transform: translateY(-2px); }
.hero__visual { position: relative; }
.hero > * { min-width: 0; }
.hero-figure { margin: 0; padding: 0; overflow: hidden; line-height: 0; background: linear-gradient(160deg, rgba(124, 92, 255, .14), rgba(34, 211, 238, .06)); }
.hero-figure img { width: 100%; height: auto; }
.search-form { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); transition: border-color .25s, box-shadow .25s; }
.search-form:focus-within { border-color: var(--c1); box-shadow: 0 0 0 4px rgba(124, 92, 255, .2); }
.search-form > .icon { color: var(--muted); }
.search-form input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 1rem; padding: .6em 0; }
.search-form input::placeholder { color: var(--muted); }
.search-form input::-webkit-search-cancel-button { display: none; }
.search-form .btn { padding: .7em 1.2em; }
.float-card {
	position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px;
	font-size: .85rem; font-weight: 600; background: var(--glass-2); border: 1px solid var(--line);
	backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow); animation: bob 6s ease-in-out infinite;
}
.float-card .icon { color: var(--c1); }
.float-card--1 { top: -26px; right: -14px; }
.float-card--2 { bottom: -26px; left: -18px; animation-delay: -3s; }
@keyframes bob { 50% { transform: translateY(-10px); } }

/* ---------- Chiffres ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 40px; }
.stat { padding: 26px 24px; }
.stat__value { display: block; font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.1; color: #8f75ff; }
.stat__label { display: block; margin-top: 8px; color: var(--muted); font-size: .92rem; line-height: 1.4; }

/* ---------- Sections ---------- */
.section { padding: 90px 0 30px; }
.section__head { max-width: 720px; margin-bottom: 44px; }
.page-top { padding-top: 60px; min-height: 60vh; }

/* À propos */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
.about__text p { font-size: 1.1rem; }
.about__text .chips { margin-top: 24px; }
.about__side { display: grid; gap: 16px; }
.about__card { padding: 26px 28px; }
.about__card h3 { margin-bottom: 16px; }
.lang + .lang { margin-top: 18px; }
.lang__row { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 8px; font-size: .95rem; }
.bar { height: 8px; border-radius: 99px; background: var(--glass-2); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width 1.4s var(--ease) .2s; }
.is-visible .bar span, html:not(.js) .bar span { width: var(--w); }

/* Compétences : bento */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.bento__card { padding: 26px; position: relative; overflow: hidden; transition: transform .35s var(--ease), border-color .35s; }
.bento__card--wide { grid-column: span 2; }
.bento__card::before {
	content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; opacity: 0;
	background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), var(--c1), transparent 45%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
	transition: opacity .3s;
}
.bento__card:hover { transform: translateY(-4px); }
.bento__card:hover::before { opacity: 1; }
.bento__icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; margin-bottom: 16px; color: #fff; background: var(--grad); box-shadow: 0 10px 24px -10px var(--c1); }

/* Parcours */
.tabs { display: inline-flex; padding: 5px; gap: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); margin-bottom: 36px; }
.tabs__btn { user-select: none; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; padding: .6em 1.4em; border-radius: 999px; cursor: pointer; transition: all .25s var(--ease); }
.sr-radio { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tabs__btn:hover { color: var(--text); }
#smp-tab-exp:checked ~ .tabs label[for="smp-tab-exp"],
#smp-tab-form:checked ~ .tabs label[for="smp-tab-form"] { background: var(--grad); color: #fff; }
#smp-tab-exp:focus-visible ~ .tabs label[for="smp-tab-exp"],
#smp-tab-form:focus-visible ~ .tabs label[for="smp-tab-form"] { outline: 2px solid var(--c2); outline-offset: 2px; }
.timeline--form, #smp-tab-form:checked ~ .timeline--exp { display: none; }
#smp-tab-form:checked ~ .timeline--form { display: block; }
.timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 34px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--c1), var(--c2), transparent); border-radius: 2px; }
.timeline__item { position: relative; margin-bottom: 18px; }
.timeline__item::before { content: ""; position: absolute; left: -31px; top: 26px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--c1); }
.timeline__item.is-current::before { background: #34d399; border-color: #34d399; box-shadow: 0 0 0 6px rgba(52, 211, 153, .18); }
.timeline__card { padding: 22px 26px; transition: transform .3s var(--ease), border-color .3s; }
.timeline__card:hover { transform: translateX(6px); border-color: rgba(124, 92, 255, .4); }
.timeline__top { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; flex-wrap: wrap; }
.timeline__top h3 { margin: 0; }
.timeline__date { font-family: var(--mono); font-size: .8rem; color: var(--c2); white-space: nowrap; }
[data-theme="light"] .timeline__date { color: var(--c1); }
.timeline__org { margin: 4px 0 10px; color: var(--muted); font-weight: 550; font-size: .95rem; }
.timeline__card ul li { position: relative; padding-left: 18px; font-size: .95rem; color: var(--muted); }
.timeline__card ul li::before { content: "▹"; position: absolute; left: 0; color: var(--c1); }

/* Projets */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters__btn { user-select: none; font: inherit; font-size: .9rem; font-weight: 600; padding: .5em 1.1em; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--muted); cursor: pointer; transition: all .25s var(--ease); }
.filters__btn:hover { color: var(--text); }
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project { overflow: hidden; display: flex; flex-direction: column; transition: transform .35s var(--ease), border-color .35s, opacity .35s; }
.project:hover { transform: translateY(-6px); border-color: rgba(124, 92, 255, .45); }
.project__media {
	position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden;
	background:
		radial-gradient(circle at 25% 30%, hsl(calc(250 + var(--h, 0) * .3) 90% 65% / .9), transparent 55%),
		radial-gradient(circle at 80% 70%, hsl(calc(185 + var(--h, 0) * .2) 85% 55% / .8), transparent 55%),
		#14132a;
}
.project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.project:hover .project__media img { transform: scale(1.05); }
.project__initial { font-size: 4.5rem; font-weight: 800; color: rgba(255, 255, 255, .92); letter-spacing: -.04em; text-shadow: 0 10px 30px rgba(0, 0, 0, .3); transition: transform .5s var(--ease); }
.project:hover .project__initial { transform: scale(1.12) rotate(-4deg); }
.project__type { position: absolute; top: 12px; left: 12px; padding: .3em .75em; border-radius: 999px; font-size: .75rem; font-weight: 650; color: #fff; background: rgba(0, 0, 0, .35); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .2); }
.project__body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.project__head h3 { margin: 0; }
.project__head .muted { font-family: var(--mono); font-size: .76rem; white-space: nowrap; }
.project__body p { margin: 0; color: var(--muted); font-size: .95rem; }
.project__links { display: flex; gap: 18px; margin-top: auto; padding-top: 8px; }
.project__links a { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: .9rem; color: var(--c1); transition: gap .2s; }
[data-theme="dark"] .project__links a { color: #b9a8ff; }
.project__links a:hover { gap: 9px; }

/* YouTube */
.yt { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.yt__card { display: flex; align-items: center; gap: 20px; padding: 24px; transition: transform .3s var(--ease), border-color .3s; }
.yt__card:hover { transform: translateY(-4px); border-color: rgba(255, 0, 51, .45); }
.yt__play { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: linear-gradient(135deg, #ff2d55, #ff7a45); color: #fff; flex-shrink: 0; box-shadow: 0 12px 26px -10px #ff2d55; }
.yt__play .icon { fill: currentColor; }
.yt__text { display: flex; flex-direction: column; line-height: 1.4; }
.yt__text strong { font-size: 1.15rem; }
.yt__text span { color: var(--muted); }
.yt__arrow { margin-left: auto; color: var(--muted); transition: transform .3s var(--ease), color .3s; }
.yt__card:hover .yt__arrow { transform: translate(3px, -3px); color: var(--text); }

/* Contact */
.cta { text-align: center; padding: clamp(40px, 7vw, 80px) 24px; position: relative; overflow: hidden; }
.cta::after { content: ""; position: absolute; inset: auto -20% -60% -20%; height: 120%; background: radial-gradient(closest-side, rgba(124, 92, 255, .35), transparent); z-index: -1; }
.cta h2 { max-width: 760px; margin-inline: auto; }
.cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }

/* Pied de page */
.site-footer { margin-top: 90px; border-top: 1px solid var(--line); padding: 28px 0; font-size: .92rem; color: var(--muted); }
.site-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer__inner > div:first-child { display: flex; align-items: center; }
.socials { display: flex; gap: 8px; }
.to-top:hover { color: var(--text); }

/* Contenus (articles, pages, projets) */
.entry { max-width: 880px; }
.entry__head { margin-bottom: 30px; }
.entry__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.entry__cover { overflow: hidden; margin: 0 0 24px; }
.entry__content { padding: clamp(24px, 4vw, 44px); }
.entry__content > *:last-child { margin-bottom: 0; }
.entry__content a { color: var(--c1); text-decoration: underline; text-underline-offset: 3px; }
.entry__content pre, .entry__content code { font-family: var(--mono); font-size: .9em; }
.entry__content pre { background: rgba(13, 12, 24, .85); color: #d8d6ee; padding: 18px; border-radius: var(--radius-sm); overflow: auto; }
.entry__content ul { list-style: disc; padding-left: 1.3em; margin-bottom: 1em; }
.entry__content img { border-radius: var(--radius-sm); }
.back { display: inline-block; margin-bottom: 16px; color: var(--muted); font-weight: 600; }
.back:hover { color: var(--text); }
.notfound { text-align: center; }
.notfound__code { font-size: clamp(6rem, 18vw, 12rem); font-weight: 800; line-height: 1; margin: 0; letter-spacing: -.06em; }
.pagination { margin-top: 30px; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { padding: .45em .9em; border-radius: 10px; border: 1px solid var(--line); background: var(--glass); }
.pagination .current { background: var(--grad); color: #fff; border-color: transparent; }

/* ---------- Apparition au défilement ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.hero { grid-template-columns: minmax(0, 1fr); min-height: auto; padding-top: 30px; gap: 60px; }
	.hero__visual { max-width: 560px; }
	.bento { grid-template-columns: repeat(2, 1fr); }
	.projects { grid-template-columns: repeat(2, 1fr); }
	.stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
	.nav-toggle { display: inline-grid; }
	.hide-sm { display: none; }
	.nav {
		position: fixed; inset: 80px 16px auto 16px; padding: 14px; border-radius: var(--radius);
		background: var(--bg-2); border: 1px solid var(--line); box-shadow: var(--shadow);
		opacity: 0; transform: translateY(-10px) scale(.98); pointer-events: none; transition: all .25s var(--ease);
	}
	.nav__list { flex-direction: column; }
	.nav__list a { padding: .8em 1em; font-size: 1.05rem; }
	.nav-open .nav { opacity: 1; transform: none; pointer-events: auto; }
	.nav-open .nav-toggle .icon--menu { display: none; }
	.nav-open .nav-toggle .icon--close { display: block; }
	.about { grid-template-columns: 1fr; }
	.yt { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
	body { font-size: 16px; }
	.bento, .projects { grid-template-columns: 1fr; }
	.bento__card--wide { grid-column: auto; }
	.stats { gap: 10px; }
	.stat { padding: 20px 16px; }
	.float-card { display: none; }
	.search-form .btn { padding: .7em .9em; font-size: .85rem; }
	.timeline { padding-left: 26px; }
	.timeline__item::before { left: -23px; }
	.timeline::before { left: 5px; }
	.section { padding-top: 70px; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
	.js .reveal { opacity: 1; transform: none; }
}

.hero-svg{display:block;height:auto}

/* ---------- Services ---------- */
.svc-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.svc-mini__card { padding: 26px; transition: transform .35s var(--ease), border-color .35s; }
.svc-mini__card:hover { transform: translateY(-4px); border-color: rgba(124, 92, 255, .45); }
.svc-mini__card p { margin: 0; color: var(--muted); font-size: .95rem; }
.svc-more { margin-top: 28px; display: flex; justify-content: center; }
.page-hero { padding: 50px 0 10px; }
.page-hero h1, .page-hero .lead { max-width: 820px; }
.page-hero h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 800; letter-spacing: -.04em; }
.page-hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 40em; }
.audience { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.svc { padding: 26px; display: flex; flex-direction: column; gap: 12px; transition: transform .35s var(--ease), border-color .35s; }
.svc:hover { transform: translateY(-5px); border-color: rgba(124, 92, 255, .45); }
.svc__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.svc__top .bento__icon { margin: 0; }
.svc__cat { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.svc h3 { margin: 4px 0 0; }
.svc > p { margin: 0; color: var(--muted); font-size: .95rem; }
.svc__list li { position: relative; padding-left: 24px; font-size: .93rem; margin-bottom: 6px; }
.svc__list .icon { position: absolute; left: 0; top: .3em; color: #34d399; }
.svc__foot { margin-top: auto; padding-top: 6px; display: flex; flex-direction: column; gap: 14px; }
.svc__link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; color: var(--c1); transition: gap .2s; }
[data-theme="dark"] .svc__link { color: #b9a8ff; }
.svc__link:hover { gap: 10px; }
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.process__step { padding: 26px; counter-increment: step; }
.process__step::before { content: "0" counter(step); display: block; font-family: var(--mono); font-weight: 700; font-size: 1.6rem; margin-bottom: 10px; color: #8f75ff; }
.process__step p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 1024px) { .svc-grid, .svc-mini { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .svc-grid, .svc-mini, .process { grid-template-columns: 1fr; } }


/* ---------- WordPress ---------- */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-inline: auto; }
.alignwide, .alignfull { max-width: none; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--muted); }
.sticky .entry__content { border-color: var(--c1); }
.post-list { display: grid; gap: 20px; }
.post-card { padding: 26px; }
.post-card h2 { font-size: 1.5rem; }
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }

/* ---------- Logo ---------- */
.brand { gap: 12px; line-height: 1.15; }
.brand .logo-mark { flex-shrink: 0; border-radius: 12px; box-shadow: 0 8px 22px -8px rgba(124, 92, 255, .8); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.brand:hover .logo-mark { transform: rotate(-6deg) scale(1.06); box-shadow: 0 12px 28px -8px rgba(34, 211, 238, .75); }
.logo-mark__trace { stroke-dasharray: 60; stroke-dashoffset: 0; }
.brand:hover .logo-mark__trace { animation: smp-trace 1.1s var(--ease); }
.logo-mark__dot { animation: pulse-dot 2.4s ease-in-out infinite; transform-origin: 20px 22px; transform-box: view-box; }
@keyframes smp-trace { from { stroke-dashoffset: 60; } to { stroke-dashoffset: 0; } }
@keyframes pulse-dot { 50% { opacity: .35; transform: scale(.6); } }
.brand__text { display: flex; flex-direction: column; }
.brand__name { font-weight: 750; letter-spacing: -.01em; }
.brand__tag { font-family: var(--mono); font-size: .66rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.brand__logo { width: auto; max-height: 40px; border-radius: 10px; }
.brand__mark--svg { display: inline-flex; margin-right: 10px; }
.brand__mark--svg .logo-mark { border-radius: 9px; }
@media (max-width: 600px) { .brand__tag { display: none; } }

.svc-sub { margin: 64px 0 20px; font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 700; }

/* ---------- v2.3 : compétences détaillées, parcours groupé, CV ---------- */
.bento__desc { margin: -6px 0 14px; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.timeline__group { list-style: none; margin: 30px 0 14px -34px; }
.timeline__group:first-child { margin-top: 0; }
.timeline__group span { display: inline-block; position: relative; z-index: 1; font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; padding: .35em 1em; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.cv-toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.cv-viewer { max-width: 900px; margin-inline: auto; display: grid; gap: 22px; padding: clamp(12px, 3vw, 28px); border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line); }
.cv-page { margin: 0; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.cv-page img { width: 100%; height: auto; }
.cv-pdf { display: block; width: 100%; height: min(1200px, 85vh); border: 0; border-radius: 10px; background: #fff; }
@media (max-width: 600px) { .cv-toolbar .btn { flex: 1 1 100%; justify-content: center; } }
@media print { .site-header, .site-footer, .bg, .progress { display: none !important; } }

/* ---------- v2.4 : visionneuse plein écran, galerie, recherche ---------- */
html.lb-open { overflow: hidden; }
.mono { font-family: var(--mono); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Visionneuse */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: auto 1fr auto; background: rgba(5, 5, 12, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #ecebf5; opacity: 0; transition: opacity .2s var(--ease); }
.lightbox.is-open { opacity: 1; }
.lightbox[hidden] { display: none; }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px clamp(12px, 3vw, 28px); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.lightbox__title { margin: 0; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox__tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lightbox__count { font-size: .85rem; color: #9d9bb3; margin-right: 6px; }
.lightbox .icon-btn { color: #ecebf5; }
.lightbox .btn--ghost { color: #ecebf5; border-color: rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .06); }
.lightbox__stage { position: relative; min-height: 0; display: grid; place-items: center; padding: clamp(8px, 2vw, 24px); overflow: hidden; }
.lightbox__img { max-width: 100%; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); object-fit: contain; border-radius: 10px; box-shadow: 0 30px 80px -20px #000; cursor: zoom-in; transition: transform .3s var(--ease); }
.lightbox__img.is-zoomed { transform: scale(1.8); cursor: zoom-out; }
.lightbox__stage--cv { place-items: stretch; padding: 0; }
.lightbox__doc { overflow-y: auto; height: 100%; padding: clamp(10px, 3vw, 32px); display: grid; gap: 20px; justify-items: center; overscroll-behavior: contain; }
.lightbox__doc img { width: min(1000px, 100%); border-radius: 8px; background: #fff; box-shadow: 0 20px 60px -20px #000; }
.lightbox__frame { width: min(1400px, 100%); aspect-ratio: 16 / 9; max-height: 100%; border: 0; border-radius: 12px; background: #000; box-shadow: 0 30px 80px -20px #000; }
.lightbox__frame--pdf { aspect-ratio: auto; height: 100%; background: #fff; }
.lightbox__desc { margin: 0; padding: 10px clamp(12px, 3vw, 28px) 18px; text-align: center; color: #b9b7d2; font-size: .95rem; }
.lightbox__desc[hidden] { display: none; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .15); background: rgba(20, 19, 42, .7); color: #fff; cursor: pointer; transition: background .2s; }
.lightbox__nav:hover { background: var(--c1); }
.lightbox__nav--prev { left: clamp(6px, 2vw, 24px); }
.lightbox__nav--next { right: clamp(6px, 2vw, 24px); }
.lightbox__nav[hidden], .lightbox [hidden] { display: none; }
.lightbox:fullscreen { background: #05050c; }
@media (max-width: 600px) {
	.lightbox__dl span, .lightbox__ext { display: none; }
	.lightbox__nav { top: auto; bottom: 64px; transform: none; width: 44px; height: 44px; }
}

/* CV cliquable */
.cv-page { cursor: zoom-in; transition: transform .3s var(--ease); }
.cv-page:hover { transform: translateY(-3px); }
.cv-page:focus-visible { outline: 3px solid var(--c2); outline-offset: 4px; }

/* Lecture YouTube en popup */
.yt__card[data-embed]:not([data-embed=""]) .yt__arrow svg { display: none; }
.yt__card[data-embed]:not([data-embed=""]) .yt__arrow::after { content: "▶"; font-size: .9rem; }

/* Recherche */
.search-overlay { position: fixed; inset: 0; z-index: 900; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: rgba(5, 5, 12, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity .2s var(--ease); }
.search-overlay.is-open { opacity: 1; }
.search-overlay[hidden] { display: none; }
.search-overlay__panel { width: min(720px, 100%); max-height: 76vh; display: flex; flex-direction: column; padding: 18px; background: var(--bg-2); box-shadow: var(--shadow); }
.search-overlay__top { display: flex; gap: 10px; align-items: center; }
.search-overlay__top .search-form { flex: 1; }
.search-overlay__hint { font-size: .85rem; margin: 10px 4px 6px; }
.search-results { overflow-y: auto; display: grid; gap: 6px; margin-top: 6px; }
.search-result { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid transparent; transition: background .2s, border-color .2s; }
.search-result:hover, .search-result:focus-visible { background: var(--glass-2); border-color: var(--line); outline: 0; }
.search-result strong { font-size: .98rem; }
.search-result .muted { font-size: .87rem; line-height: 1.45; }
.search-result__sec { font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--c2); }
[data-theme="light"] .search-result__sec { color: var(--c1); }
.search-result--all strong { color: var(--c1); }
.search-empty { padding: 8px 14px; font-size: .9rem; }
.search-page-form { margin-top: 18px; max-width: 620px; }
.search-home { margin-bottom: 40px; }
.search-results--page { margin-top: 12px; }
.is-found { animation: smp-found 2.2s var(--ease); }
@keyframes smp-found { 0%, 60% { box-shadow: 0 0 0 3px var(--c2), 0 0 40px -6px var(--c2); } 100% { box-shadow: none; } }

/* Menu : tient sur une ligne avec le bouton de recherche */
.nav__list a { white-space: nowrap; }
@media (max-width: 1320px) and (min-width: 861px) {
	.nav__list a { padding: .5em .65em; font-size: .9rem; }
	.brand__tag { display: none; }
}
@media (max-width: 1100px) and (min-width: 861px) {
	.site-header__actions .hide-sm { display: none; }
	.brand__name { white-space: nowrap; }
}
.search-overlay__top .search-form { min-width: 0; }
.lightbox__title { min-width: 0; }
@media (max-width: 600px) {
	.search-overlay { padding-top: 70px; }
	.search-overlay__top .search-form .btn { display: none; }
	.lightbox__bar { padding: 10px 12px; gap: 8px; }
	.lightbox__tools { gap: 6px; }
	.lightbox__dl { padding: .55em .7em; }
	.lightbox__count { display: none; }
}
.lightbox { grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.lightbox__stage { width: 100%; height: 100%; }

/* Visionneuse : fond clair pour les logos */
.lightbox__img.is-logo { background: #fff; padding: 3%; }

/* ---------- v2.6 : formulaire de contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); gap: clamp(24px, 4vw, 56px); padding: clamp(24px, 4vw, 48px); }
.contact__intro h2 { margin-top: 8px; }
.contact__list { display: grid; gap: 10px; margin: 22px 0 26px; }
.contact__list li { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.contact__list .icon { color: #34d399; }
.contact__direct { display: flex; flex-wrap: wrap; gap: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.field { margin: 0; display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .9rem; font-weight: 600; }
.field label .muted { font-weight: 400; font-size: .85em; }
.req { color: var(--c3); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
	width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .75em .95em; transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 140px; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 2.6em;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239d9bb3' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right .9em center; }
.field select option, .field select optgroup { background: var(--bg-2); color: var(--text); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--c1); box-shadow: 0 0 0 4px rgba(124, 92, 255, .2); }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: #f87171; box-shadow: 0 0 0 4px rgba(248, 113, 113, .15); }
.field.is-invalid label { color: #f87171; }
.field--check { grid-template-columns: auto 1fr; align-items: start; gap: 10px; }
.field--check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--c1); }
.field--check label { font-weight: 400; font-size: .88rem; color: var(--muted); }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.small { font-size: .85rem; }
.form-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-notice { margin: 0 0 18px; padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 600; }
.form-notice--ok { background: rgba(52, 211, 153, .12); border: 1px solid rgba(52, 211, 153, .4); color: #34d399; }
.form-notice--err { background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .4); color: #f87171; }
[data-theme="light"] .form-notice--ok { color: #047857; }
[data-theme="light"] .form-notice--err { color: #b91c1c; }
#cf-sujet.is-picked { animation: smp-pick 1.6s var(--ease); }
@keyframes smp-pick { 0%, 50% { border-color: var(--c2); box-shadow: 0 0 0 5px rgba(34, 211, 238, .25); } }
.btn.is-loading { opacity: .7; pointer-events: none; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } .form-foot .btn { width: 100%; justify-content: center; } }
