/* SheppeR — design sombre « gamer developer » (conforme au preview fourni)
   Fond #0a0e1a très profond, accents violet #8b5cf6 → bleu #3b82f6,
   photo de setup immersive en fond de hero, boutons emoji, cartes fines. */

:root {
  --bg: #0a0e1a;
  --bg-2: #0d1220;
  --surface: #101522;
  --card: #141a2b;
  --card-hover: #1a2138;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --accent: #8b5cf6;
  --accent-2: #6366f1;
  --accent-3: #3b82f6;
  --cyan: #38bdf8;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --gradient: linear-gradient(90deg, #6366f1 0%, #8b5cf6 60%, #a78bfa 100%);
  --gradient-btn: linear-gradient(90deg, #5b4ee0 0%, #7a5cf0 100%);
  --radius: 14px;
  --radius-sm: 10px;
  --font: 'Outfit', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glow: 0 0 48px rgba(139, 92, 246, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(139, 92, 246, 0.35); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #232a3d; border-radius: 8px; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

.container { width: min(1200px, 92%); margin: 0 auto; }

/* ── Navigation ──────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(9, 12, 23, 0.92);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; gap: 16px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 19px; }
.brand-logo {
  font-family: var(--mono); font-size: 21px; font-weight: 800;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: -1px;
}
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
  padding: 7px 17px; border-radius: 999px; font-size: 14.5px; font-weight: 500;
  color: var(--text); opacity: .82; border: 1px solid transparent; transition: all .2s;
}
.nav-link:hover { opacity: 1; background: rgba(255,255,255,.045); }
.nav-link.active {
  opacity: 1; color: #fff;
  border-color: rgba(139, 92, 246, 0.38);
  background: rgba(45, 40, 90, 0.42);
}
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center;
  border: 1px solid var(--border-strong); background: rgba(255,255,255,.02);
  color: var(--muted); transition: all .2s;
}
.icon-btn:hover { color: var(--text); border-color: rgba(255,255,255,.28); }
.burger { display: none; }

@media (max-width: 880px) {
  .nav-links {
    display: none; position: absolute; top: 64px; left: 4%; right: 4%;
    flex-direction: column; align-items: stretch; padding: 10px;
    background: rgba(13, 18, 32, .98); border: 1px solid var(--border);
    border-radius: var(--radius); gap: 4px; backdrop-filter: blur(16px);
  }
  .nav-links.open { display: flex; }
  .burger { display: grid; }
}

/* ── Hero : photo immersive en fond ──────────────────────── */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url('/img/hero-bg.png') center right / cover no-repeat;
}
/* fondu de la photo vers le fond du site (haut + bas) */
.hero-fade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,14,26,.5) 0%, rgba(10,14,26,0) 24%, rgba(10,14,26,.08) 60%, var(--bg) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 96px 0 88px; }
.badge-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  color: #ddd8f5; background: rgba(16, 21, 36, 0.6);
  border: 1px solid rgba(255,255,255,.11); backdrop-filter: blur(6px); margin-bottom: 22px;
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2.2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.hero-title {
  font-size: clamp(32px, 4.2vw, 54px); line-height: 1.08; font-weight: 800;
  letter-spacing: -1px; margin-bottom: 13px;
}
.grad-text {
  background: linear-gradient(90deg, #6d7dfa 0%, #9d5cf6 60%, #b06cf0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: clamp(16px, 1.8vw, 20px); font-weight: 600; color: var(--text); margin-bottom: 11px; }
.hero-desc { color: #a8b3c7; font-size: 15px; max-width: 560px; margin-bottom: 26px; line-height: 1.6; }
.hero-cta { display: flex; gap: 13px; flex-wrap: wrap; margin-bottom: 30px; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px; border-radius: var(--radius-sm);
  font-size: 14.5px; font-weight: 600; border: 1px solid transparent;
  transition: all .22s;
}
.btn-primary {
  background: linear-gradient(90deg, #4f42c8 0%, #6d4fd6 100%); color: #fff;
  box-shadow: 0 4px 14px rgba(90, 70, 200, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 7px 20px rgba(90, 70, 200, 0.45); }
.btn-outline {
  background: rgba(13, 18, 32, 0.5); color: var(--text);
  border-color: rgba(255,255,255,.18);
}
.btn-outline:hover { background: rgba(30, 38, 60, 0.55); border-color: rgba(255,255,255,.3); transform: translateY(-2px); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: 8px 15px; font-size: 13px; border-radius: 9px; }
.btn-danger { background: rgba(239,68,68,.12); color: #f87171; border-color: rgba(239,68,68,.3); }
.btn-danger:hover { background: rgba(239,68,68,.22); }

.hero-socials { display: flex; gap: 9px; }
.social-btn {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(26, 30, 48, 0.55); border: 1px solid rgba(255,255,255,.06);
  color: #cdd5e4; backdrop-filter: blur(4px); transition: all .22s;
}
.social-btn:hover {
  color: #fff; background: rgba(60, 50, 120, 0.5);
  border-color: rgba(139,92,246,.45); transform: translateY(-3px);
}

@media (max-width: 720px) {
  .hero-bg { background-position: center; opacity: .8; }
}

/* ── Cartes catégories ───────────────────────────────────── */
.category-cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; z-index: 2;
  margin-top: -34px;
}
.cat-card {
  display: flex; align-items: center; gap: 13px; padding: 15px 17px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: all .2s; cursor: pointer;
}
.cat-card:hover { border-color: rgba(139,92,246,.42); background: var(--card-hover); transform: translateY(-3px); }
.cat-icon {
  flex: none; width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff;
}
.cat-icon.violet { background: linear-gradient(135deg, #8b5cf6, #a855f7); }
.cat-icon.cyan { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
.cat-title { font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.cat-sub { font-size: 12px; color: var(--muted-2); line-height: 1.35; }
.cat-arrow { margin-left: auto; color: var(--muted-2); transition: all .2s; }
.cat-card:hover .cat-arrow { color: var(--accent); transform: translateX(3px); }

@media (max-width: 980px) { .category-cards { grid-template-columns: repeat(2, 1fr); margin-top: 0; } }
@media (max-width: 560px) { .category-cards { grid-template-columns: 1fr; } }

/* ── Sections génériques ─────────────────────────────────── */
.section { position: relative; z-index: 1; padding: 88px 0; }
.section.surface { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { margin-bottom: 40px; }
.section-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; color: #b3a4f5; margin-bottom: 10px;
  letter-spacing: .5px; text-transform: uppercase;
}
.section-label::before { content: ''; width: 24px; height: 2px; background: var(--gradient); border-radius: 2px; }
.section-title { font-size: clamp(26px, 3.2vw, 38px); font-weight: 700; letter-spacing: -.5px; line-height: 1.15; }
.section-sub { color: var(--muted); margin-top: 10px; font-size: 15px; max-width: 640px; }
.section-head.split { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ── À propos / timeline ─────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: start; }
.about-lead { font-size: 18px; font-weight: 500; margin-bottom: 16px; line-height: 1.5; }
.about-text { color: var(--muted); margin-bottom: 15px; font-size: 15px; }
.highlights { display: grid; gap: 13px; margin-top: 26px; }
.highlight {
  display: flex; gap: 13px; padding: 16px; border-radius: var(--radius-sm);
  background: var(--card); border: 1px solid var(--border); transition: all .2s;
}
.highlight:hover { border-color: rgba(139,92,246,.32); }
.hl-icon {
  flex: none; width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center; background: var(--accent-soft); color: #c4b5fd;
}
.hl-title { font-weight: 600; font-size: 14.5px; margin-bottom: 3px; }
.hl-text { font-size: 13px; color: var(--muted); }

.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-3), transparent);
}
.tl-entry { position: relative; padding: 0 0 28px 20px; }
.tl-entry:last-child { padding-bottom: 0; }
.tl-entry::before {
  content: ''; position: absolute; left: -28px; top: 6px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg); border: 3px solid var(--accent);
  box-shadow: 0 0 10px rgba(139,92,246,.5);
}
.tl-period { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: #b3a4f5; margin-bottom: 4px; }
.tl-title { font-size: 16px; font-weight: 600; margin-bottom: 5px; }
.tl-desc { font-size: 13.5px; color: var(--muted); }

@media (max-width: 920px) { .about-grid { grid-template-columns: 1fr; } }

/* ── Compétences ─────────────────────────────────────────── */
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.skill-card {
  padding: 24px 20px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--border);
  transition: all .24s; position: relative; overflow: hidden;
}
.skill-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--gradient); opacity: 0; transition: opacity .24s;
}
.skill-card:hover { transform: translateY(-4px); border-color: rgba(139,92,246,.32); box-shadow: var(--glow); }
.skill-card:hover::before { opacity: 1; }
.skill-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: #c4b5fd; margin-bottom: 14px;
}
.skill-name { font-size: 16.5px; font-weight: 600; margin-bottom: 6px; }
.skill-desc { font-size: 13px; color: var(--muted); margin-bottom: 14px; min-height: 42px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 12px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--muted);
}
.tag.accent { background: rgba(139,92,246,.16); border-color: rgba(139,92,246,.3); color: #c4b5fd; }
.tag.cyan { background: rgba(56,189,248,.1); border-color: rgba(56,189,248,.26); color: var(--cyan); }

@media (max-width: 980px) { .skills-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .skills-grid { grid-template-columns: 1fr; } }

/* ── Projets ─────────────────────────────────────────────── */
.projects-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.projects-side { display: grid; gap: 16px; }
.project-card {
  border-radius: var(--radius); overflow: hidden; background: var(--card);
  border: 1px solid var(--border); transition: all .24s; display: flex; flex-direction: column;
}
.project-card:hover { border-color: rgba(139,92,246,.42); transform: translateY(-4px); box-shadow: var(--glow); }
.project-cover { position: relative; overflow: hidden; background: #10141f; }
.project-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.project-card:hover .project-cover img { transform: scale(1.045); }
.side-card .project-cover { height: 172px; }
.project-badge {
  position: absolute; top: 13px; left: 13px; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: rgba(76, 52, 150, 0.85); border: 1px solid rgba(139, 92, 246, 0.55);
  color: #fff; backdrop-filter: blur(6px);
}
.featured-body { padding: 22px 24px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.project-title { font-size: 21px; font-weight: 700; letter-spacing: -.3px; }
.side-card .project-title { font-size: 16.5px; }
.project-tagline { color: var(--muted); font-size: 14px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.project-link {
  margin-top: auto; align-self: flex-end; width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center; border: 1px solid var(--border-strong);
  color: var(--muted); transition: all .22s; background: rgba(255,255,255,.02);
}
.project-card:hover .project-link {
  background: var(--gradient-btn); color: #fff; border-color: transparent;
  transform: translateX(4px); box-shadow: 0 4px 16px rgba(110,80,230,.4);
}
.featured-card { display: grid; grid-template-columns: 1.05fr 1fr; }
.featured-card .project-cover { height: 100%; min-height: 300px; }
@media (max-width: 980px) {
  .projects-layout { grid-template-columns: 1fr; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-card .project-cover { min-height: 220px; }
}

/* grille page tous les projets */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 980px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .projects-grid { grid-template-columns: 1fr; } }

.status-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.status-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; }
.status-IN_PROGRESS::before { background: #fbbf24; box-shadow: 0 0 8px #fbbf24; }
.status-COMPLETED::before { background: #34d399; box-shadow: 0 0 8px #34d399; }
.status-PAUSED::before { background: #94a3b8; }
.status-PLANNED::before { background: #38bdf8; box-shadow: 0 0 8px #38bdf8; }

/* ── Blog ────────────────────────────────────────────────── */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.post-card {
  border-radius: var(--radius); overflow: hidden; background: var(--card);
  border: 1px solid var(--border); transition: all .24s; display: flex; flex-direction: column;
}
.post-card:hover { border-color: rgba(139,92,246,.42); transform: translateY(-4px); box-shadow: var(--glow); }
.post-cover { height: 158px; overflow: hidden; background: linear-gradient(135deg, #141a2b, #1a2138); display: grid; place-items: center; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-cover .fallback-icon { color: rgba(139,92,246,.45); }
.post-body { padding: 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.post-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted-2); flex-wrap: wrap; }
.post-cat { font-weight: 600; }
.post-title { font-size: 16.5px; font-weight: 600; line-height: 1.35; }
.post-excerpt { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted-2); }
.post-read { color: #b3a4f5; font-weight: 600; font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; }
@media (max-width: 980px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }

/* article complet */
.article { max-width: 760px; margin: 0 auto; }
.article-title { font-size: clamp(24px, 4vw, 36px); font-weight: 700; letter-spacing: -.5px; line-height: 1.2; margin-bottom: 14px; }
.article-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted-2); font-size: 13px; align-items: center; margin-bottom: 8px; }
.markdown { font-size: 15px; color: #d5dcea; }
.markdown h3 { font-size: 21px; margin: 30px 0 12px; letter-spacing: -.3px; }
.markdown h4 { font-size: 17px; margin: 24px 0 10px; }
.markdown p { margin-bottom: 14px; color: var(--muted); }
.markdown strong { color: var(--text); }
.markdown a { color: #b3a4f5; text-decoration: underline; text-decoration-color: rgba(139,92,246,.4); }
.markdown ul, .markdown ol { margin: 0 0 14px 22px; color: var(--muted); }
.markdown li { margin-bottom: 6px; }
.markdown blockquote {
  border-left: 3px solid var(--accent); background: rgba(139,92,246,.08);
  padding: 12px 16px; border-radius: 0 10px 10px 0; margin: 16px 0; color: #d8ccf7;
}
.markdown code {
  font-family: var(--mono); font-size: 12.5px; background: rgba(139,92,246,.12);
  padding: 2px 7px; border-radius: 6px; color: #d8b4fe;
}
.markdown pre {
  background: #0d1117; border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; overflow-x: auto; margin: 16px 0;
}
.markdown pre code { background: none; padding: 0; color: #c9d1d9; font-size: 12.5px; line-height: 1.65; }

/* ── Contact ─────────────────────────────────────────────── */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.25fr; gap: 40px; align-items: start; }
.contact-info-card { padding: 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); }
.contact-line { display: flex; align-items: center; gap: 12px; padding: 11px 0; color: var(--muted); font-size: 14px; }
.contact-line svg { color: #b3a4f5; flex: none; }
.form { display: grid; gap: 14px; padding: 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; display: block; }
.form input, .form textarea, .form select {
  width: 100%; padding: 11px 14px; border-radius: 10px; font-size: 14px;
  background: var(--bg-2); border: 1px solid var(--border-strong); color: var(--text);
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,92,246,.16); }
.form textarea { min-height: 130px; resize: vertical; }
@media (max-width: 880px) { .contact-wrap { grid-template-columns: 1fr; } .form-row { grid-template-columns: 1fr; } }

.form-feedback { padding: 12px 16px; border-radius: 10px; font-size: 13.5px; display: none; }
.form-feedback.ok { display: block; background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.35); color: #6ee7b7; }
.form-feedback.err { display: block; background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.35); color: #fca5a5; }

/* ── Footer ──────────────────────────────────────────────── */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--border); background: var(--bg-2); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 0; flex-wrap: wrap; }
.footer-links { display: flex; gap: 20px; font-size: 13.5px; color: var(--muted); }
.footer-links a:hover { color: #b3a4f5; }
.footer-note { font-size: 13px; color: var(--muted-2); }
.footer-admin {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px;
  border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--muted-2); border: 1px solid var(--border);
  transition: all .2s;
}
.footer-admin:hover { color: #c4b5fd; border-color: rgba(139,92,246,.45); background: rgba(139,92,246,.08); }

/* ── Animations ──────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .65s ease, transform .65s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ══════════════════════════════════════════════════════════
   ADMIN (panneau d'administration — thème cohérent)
   ══════════════════════════════════════════════════════════ */
.admin-layout { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-side {
  background: var(--bg-2); border-right: 1px solid var(--border);
  padding: 22px 16px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border-radius: 11px; font-size: 14.5px; font-weight: 500; color: var(--muted);
  transition: all .18s;
}
.admin-nav-item:hover { color: var(--text); background: rgba(255,255,255,.04); }
.admin-nav-item.active { color: #c4b5fd; background: var(--accent-soft); }
.admin-main { padding: 30px 34px; max-width: 100%; overflow-x: hidden; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; flex-wrap: wrap; gap: 12px; }
.admin-title { font-size: 24px; font-weight: 700; letter-spacing: -.4px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); }
.stat-value { font-size: 30px; font-weight: 700; letter-spacing: -.5px; }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 2px; }

.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.panel-title { font-size: 16px; font-weight: 600; margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left; padding: 10px 12px; color: var(--muted-2); font-size: 12px;
  text-transform: uppercase; letter-spacing: .6px; border-bottom: 1px solid var(--border);
}
table.data td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: rgba(255,255,255,.02); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px;
  border-radius: 999px; font-size: 12px; font-weight: 600;
}
.badge.green { background: rgba(52,211,153,.13); color: #6ee7b7; }
.badge.purple { background: var(--accent-soft); color: #c4b5fd; }
.badge.gray { background: rgba(148,163,184,.13); color: var(--muted); }
.badge.yellow { background: rgba(251,191,36,.13); color: #fcd34d; }
.badge.red { background: rgba(239,68,68,.13); color: #fca5a5; }
.badge.cyan { background: rgba(56,189,248,.13); color: var(--cyan); }

@media (max-width: 880px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; }
  .admin-main { padding: 20px 16px; }
}

/* builder de pages */
.builder-drop { min-height: 60px; }
.builder-section {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2);
  margin-bottom: 10px; cursor: grab; transition: border-color .2s, opacity .2s;
}
.builder-section.dragging { opacity: .45; border-style: dashed; }
.builder-section.over { border-color: var(--accent); }
.builder-grip { color: var(--muted-2); cursor: grab; }
.builder-type { font-weight: 600; font-size: 14.5px; }
.builder-visible { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* éditeur markdown */
.md-editor {
  width: 100%; min-height: 380px; padding: 16px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--border-strong); color: var(--text);
  font-family: var(--mono); font-size: 13.5px; line-height: 1.7; outline: none; resize: vertical;
}
.md-editor:focus { border-color: var(--accent); }

/* médias */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.media-item {
  border-radius: 13px; overflow: hidden; border: 1px solid var(--border);
  background: var(--bg-2); position: relative; cursor: pointer; transition: border-color .2s;
}
.media-item:hover { border-color: rgba(139,92,246,.5); }
.media-thumb { height: 120px; background: #0d1117; display: grid; place-items: center; overflow: hidden; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-name { padding: 9px 11px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; opacity: 0; transition: opacity .2s; }
.media-item:hover .media-actions { opacity: 1; }

/* toast */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 1000; display: grid; gap: 10px; }
.toast {
  padding: 14px 20px; border-radius: 13px; font-size: 14px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
  box-shadow: var(--shadow); animation: toastIn .3s ease; max-width: 360px;
}
.toast.ok { border-color: rgba(52,211,153,.5); }
.toast.err { border-color: rgba(239,68,68,.5); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }

/* modal */
.modal-back {
  position: fixed; inset: 0; background: rgba(5,8,15,.72); z-index: 500;
  display: grid; place-items: center; padding: 20px; backdrop-filter: blur(4px);
}
.modal {
  width: min(680px, 100%); max-height: 88vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 18px; padding: 28px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 19px; font-weight: 700; }

/* champs admin */
.field { margin-bottom: 15px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; display: block; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 14px; border-radius: 10px; font-size: 14px;
  background: var(--bg-2); border: 1px solid var(--border-strong); color: var(--text); outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

/* page détail projet */
.project-hero-cover { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-strong); margin-bottom: 30px; max-height: 420px; }
.project-hero-cover img { width: 100%; object-fit: cover; }
.detail-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 34px; align-items: start; }
@media (max-width: 880px) { .detail-cols { grid-template-columns: 1fr; } }
.feature-list { display: grid; gap: 10px; }
.feature-item { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; color: var(--muted); padding: 12px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.feature-item svg { color: #34d399; flex: none; margin-top: 2px; }

/* divers */
.muted { color: var(--muted); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; } .items-center { align-items: center; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.justify-between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%; margin: 60px auto;
  border: 3px solid var(--border-strong); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted-2); }

/* V9 — proportions fixes des trois cartes de projets sur l'accueil */
@media (min-width: 981px) {
  .projects-layout { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: stretch; }
  .projects-layout .featured-card { height: 340px; min-height: 0; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .projects-layout .featured-card .project-cover { height: 340px; min-height: 0; min-width: 0; }
  .projects-layout .featured-card .featured-body { min-width: 0; min-height: 0; }
  .projects-layout .projects-side { height: 340px; min-height: 0; grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .projects-layout .side-card { height: 100%; min-height: 0; }
  .projects-layout .side-card .project-cover { height: 76px; flex: 0 0 76px; }
  .projects-layout .side-card .featured-body { padding: 10px 16px; gap: 5px; min-height: 0; }
  .projects-layout .side-card .project-title { font-size: 15px; }
  .projects-layout .side-card .project-tagline { font-size: 12px; line-height: 1.35; }
  .projects-layout .side-card .project-link { width: 28px; height: 28px; border-radius: 8px; }
}
.projects-layout .project-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Google reCAPTCHA dans le formulaire de contact */
.contact-recaptcha { min-height: 78px; margin: 8px 0 12px; }

/* SheppeR V12 — animations équilibrées et accessibles */
.hero { isolation: isolate; }
.hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0; transition: opacity .45s ease;
  background: radial-gradient(440px circle at var(--pointer-x, 50%) var(--pointer-y, 50%), rgba(79,140,255,.17), rgba(139,92,246,.08) 42%, transparent 75%); }
.hero.pointer-active::after { opacity: 1; }
.hero-content { z-index: 2; }
.typing-line { min-height: 1.5em; }
.typing-line::after { content: ''; display: inline-block; width: 2px; height: .9em; margin-left: 4px;
  vertical-align: -.08em; background: #8b9dff; animation: shepper-caret .85s steps(1) infinite; }
@keyframes shepper-caret { 50% { opacity: 0; } }
.reveal { transition-delay: var(--reveal-delay, 0ms); }
.skill-animated .skill-icon { transform: scale(.82) translateY(6px); opacity: .55;
  transition: transform .55s cubic-bezier(.2,.8,.2,1), opacity .55s ease;
  transition-delay: var(--skill-delay, 0ms); }
.skill-animated.skill-visible .skill-icon { transform: scale(1) translateY(0); opacity: 1; }
.skill-animated .skill-tags .tag { opacity: .4; transform: translateY(5px);
  transition: opacity .45s ease, transform .45s ease; transition-delay: var(--skill-delay, 0ms); }
.skill-animated.skill-visible .skill-tags .tag { opacity: 1; transform: none; }
#app.page-entering { animation: shepper-page-in .38s ease both; }
#app.page-leaving { opacity: .88; }
@keyframes shepper-page-in { from { opacity: .65; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .hero::after { display: none; }
  .typing-line::after { animation: none; }
  .reveal, .skill-animated .skill-icon, .skill-animated .skill-tags .tag { transition: none !important; opacity: 1 !important; transform: none !important; }
  #app.page-entering { animation: none; }
}

/* V13 — Accueil plein écran, adapté aux fenêtres et aux mobiles. */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  box-sizing: border-box;
  padding-top: 64px; /* navigation fixe : réserver sa place */
  padding-bottom: 48px;
}
.hero-content {
  padding-top: clamp(24px, 5vh, 80px);
  padding-bottom: clamp(24px, 5vh, 80px);
}
.hero-scroll-cue {
  position: absolute;
  z-index: 3;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(225,230,250,.76);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  pointer-events: none;
  animation: hero-cue-float 2.5s ease-in-out infinite;
}
.hero-scroll-cue svg { width: 17px; height: 17px; }
@keyframes hero-cue-float {
  0%,100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}
/* Ne pas superposer les cartes à la première vue plein écran. */
.hero + .category-cards { margin-top: 0; }
@media (max-width: 720px) {
  .hero { padding-top: 70px; padding-bottom: 40px; }
  .hero-scroll-cue { bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-cue { animation: none; }
}

/* V14 — masquer l’indicateur dès le début du défilement. */
.hero-scroll-cue { transition: opacity .28s ease, visibility .28s ease; }
.hero-scroll-cue.is-hidden { opacity: 0; visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .hero-scroll-cue { transition: none; } }

/* V15 — l'indicateur reste au-dessus des cartes de catégories qui chevauchent le hero. */
.hero-scroll-cue { bottom: clamp(94px, 12vh, 130px); }
@media (max-width: 720px) { .hero-scroll-cue { bottom: 82px; } }

/* V16 — accueil véritablement plein écran : aucun chevauchement des catégories.
   L'indicateur « Défiler » a été retiré du HTML. */
.hero + .container > .category-cards {
  margin-top: 0;
  padding-top: 28px;
}
@media (max-width: 720px) {
  .hero + .container > .category-cards { padding-top: 20px; }
}


/* V17 — Thème clair complet, sans modifier le rendu sombre d'origine. */
:root { color-scheme: dark; }
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fc; --bg-2: #edf1f9; --surface: #ffffff;
  --card: #ffffff; --card-hover: #f3f0ff;
  --border: rgba(36, 45, 76, .11); --border-strong: rgba(36, 45, 76, .20);
  --text: #19243c; --muted: #52627b; --muted-2: #64748b;
  --accent: #6d4cda; --accent-2: #6254d9; --accent-3: #326bd5;
  --cyan: #0878ad; --accent-soft: rgba(109, 76, 218, .11);
  --shadow: 0 8px 32px rgba(30, 45, 80, .09);
  --glow: 0 0 48px rgba(109, 76, 218, .09);
}
html[data-theme="light"] .navbar.scrolled { background: rgba(255,255,255,.93); }
html[data-theme="light"] .nav-links.open { background: rgba(255,255,255,.98); }
html[data-theme="light"] .nav-link:hover { background: rgba(109,76,218,.08); }
html[data-theme="light"] .nav-link.active { color: #4d36ad; background: #eee9ff; border-color: rgba(109,76,218,.3); }
html[data-theme="light"] .icon-btn { background: rgba(255,255,255,.82); }
html[data-theme="light"] .icon-btn:hover { border-color: rgba(109,76,218,.5); }
/* Photo de l'accueil conservée, avec voile clair et texte contrasté. */
html[data-theme="light"] .hero-bg { opacity: 1; }
html[data-theme="light"] .hero-fade { background: linear-gradient(90deg, rgba(245,247,252,.88) 0%, rgba(245,247,252,.67) 29%, rgba(245,247,252,.20) 56%, rgba(245,247,252,.02) 100%), linear-gradient(180deg, rgba(245,247,252,.05) 0%, transparent 65%, var(--bg) 100%); }
html[data-theme="light"] .hero-desc { color: #394a66; }
html[data-theme="light"] .badge-pill { color: #4d36ad; background: rgba(255,255,255,.85); border-color: rgba(109,76,218,.2); }
html[data-theme="light"] .btn-outline { background: rgba(255,255,255,.85); color: var(--text); border-color: rgba(36,45,76,.24); }
html[data-theme="light"] .btn-outline:hover { background: #f0ecff; border-color: rgba(109,76,218,.4); }
html[data-theme="light"] .social-btn { color: #384867; background: rgba(255,255,255,.85); border-color: rgba(36,45,76,.16); }
html[data-theme="light"] .social-btn:hover { color: #4d36ad; background: #f0ecff; }
html[data-theme="light"] .section-label, html[data-theme="light"] .tl-period { color: #6442bc; }
html[data-theme="light"] .hl-icon { color: #6546c7; }
html[data-theme="light"] .badge.purple { color: #6442bc; }
html[data-theme="light"] .badge.green { color: #13724d; }
html[data-theme="light"] .badge.yellow { color: #805600; }
html[data-theme="light"] .badge.red { color: #ae3131; }
html[data-theme="light"] .modal-back { background: rgba(29,38,63,.48); }
html[data-theme="light"] table.data tr:hover td { background: rgba(109,76,218,.04); }
html[data-theme="light"] .media-thumb { background: #e8ecf6; }
html[data-theme="light"] .hero::after { opacity: .45; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #b6bfd2; }
html[data-theme="light"] .toast { box-shadow: 0 10px 28px rgba(30,45,80,.12); }
html[data-theme="light"] .project-card, html[data-theme="light"] .skill-card, html[data-theme="light"] .cat-card { box-shadow: 0 4px 18px rgba(30,45,80,.045); }
html[data-theme="light"] .theme-icon-moon { display: none; }
html:not([data-theme="light"]) .theme-icon-sun { display: none; }
@media (prefers-reduced-motion: no-preference) {
  body, .navbar.scrolled, .cat-card, .skill-card, .project-card, .section.surface { transition: background-color .25s ease, color .25s ease, border-color .25s ease; }
}


/* V19 — Navigation lisible en thème clair, même sur la photo de couverture. */
html[data-theme="light"] .navbar {
  background: rgba(249, 250, 255, .88);
  border-bottom-color: rgba(55, 65, 95, .14);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  backdrop-filter: blur(18px) saturate(145%);
  box-shadow: 0 2px 18px rgba(22, 33, 61, .07);
}
html[data-theme="light"] .navbar.scrolled { background: rgba(255,255,255,.97); }
html[data-theme="light"] .nav-link { color: #202d47; opacity: 1; font-weight: 600; }
html[data-theme="light"] .nav-link:hover { background: #e8e5fa; color: #4630a0; }
html[data-theme="light"] .nav-link.active { background: #e7e0ff; color: #4730a3; border-color: rgba(93,64,189,.35); }
html[data-theme="light"] .brand { color: #16233d; }
html[data-theme="light"] .icon-btn { color: #263653; border-color: rgba(40,52,83,.24); }
html[data-theme="light"] .nav-links.open { background: rgba(255,255,255,.98); }

/* V21 — cadre externe du widget reCAPTCHA (sans modifier l'iframe Google). */
.contact-recaptcha { border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent !important; padding: 0 !important; overflow: visible; }
.contact-recaptcha > div, .contact-recaptcha > div > div { border: 0 !important; outline: 0 !important; box-shadow: none !important; }
.contact-recaptcha iframe { border: 0 !important; outline: 0 !important; box-shadow: none !important; display: block; }

/* V22 — masque uniquement le filet clair de 1-2 px dessiné sur le bord
   de l’iframe reCAPTCHA sombre. Ne recouvre pas la case ni les liens Google. */
.contact-recaptcha iframe[title*="reCAPTCHA"],
.contact-recaptcha iframe[title*="recaptcha"] {
  clip-path: inset(4px);
}

/* V23 : masque complètement les derniers pixels du filet Google (bas et droite). */

/* V24 : sous-titre stable, sans déplacement des boutons pendant la frappe. */
.hero-sub.typing-line { min-height: 1.6em; max-width: 100%; overflow-wrap: normal; }
@media (min-width: 640px) { .hero-sub.typing-line { white-space: nowrap; } }
@media (prefers-reduced-motion: reduce) { .hero-sub.typing-line::after { display: none; } }
