/* Variables */
:root {
  --bg: #fafaf8;
  --green: #00311e;
  --muted: #7a8c7e;
  --border: rgba(0,49,30,0.1);
  --border-hover: rgba(0,49,30,0.22);
  --navbar-bg: rgba(250,250,248,0.88);
  --navbar-border: rgba(0,49,30,0.1);
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--green);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  min-height: 100vh;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  position: relative;
}

.chibi-hero {
  position: fixed;
  top: 160px;
  left: calc(50% + 320px);
  height: 320px;
  width: auto;
  image-rendering: pixelated;
  z-index: 10;
  pointer-events: none;
}

@media (max-width: 900px) {
  .chibi-hero { display: none; }
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 65% at -5% 25%, rgba(100,180,90,0.38) 0%, transparent 68%),
    radial-gradient(ellipse 55% 65% at 105% 40%, rgba(100,180,90,0.32) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

/* Blob — unique, discret */
.blob {
  position: fixed;
  width: 600px;
  height: 600px;
  top: -200px;
  right: -200px;
  background: radial-gradient(circle, rgba(10,92,53,0.07) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* Container */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
  position: relative;
  z-index: 1;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--navbar-border);
  padding-top: env(safe-area-inset-top, 0px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  font-family: 'Raleway', sans-serif;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--green);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-link:hover { color: var(--green); }

/* Lang switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.5;
  padding: 2px 4px;
  transition: opacity 0.15s;
}

.lang-btn.active { opacity: 1; color: var(--green); }
.lang-btn:hover { opacity: 0.8; }

.lang-sep {
  font-size: 12px;
  color: var(--green);
  opacity: 0.2;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Main */
main {
  flex: 1;
  padding-top: 120px;
  padding-bottom: 48px;
}

/* Hero */
.hero {
  margin-bottom: 64px;
  text-align: center;
}

.hero-label {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-tagline {
  font-family: 'Raleway', sans-serif;
  font-weight: 800;
  font-size: clamp(32px, 5.5vw, 52px);
  color: var(--green);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  max-width: 100%;
}

.hero-author {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 14px;
  color: var(--muted);
}

.hero-desc {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  margin: 20px auto 0;
  max-width: 480px;
}

/* Section label */
.section-label {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::after {
  content: '';
  display: block;
  height: 1px;
  flex: 1;
  background: var(--border);
}

/* POC list */
.poc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Card */
.card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,49,30,0.03);
  cursor: pointer;
  transition: border-color 0.2s;
}

.card:hover { border-color: var(--border-hover); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
}

.card-title {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--green);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.card-date {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--muted);
}

.card-chevron {
  color: var(--muted);
  font-size: 12px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.card.open .card-chevron { transform: rotate(180deg); }

/* Card body — accordion */
.card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.card.open .card-body { max-height: 400px; }

.card-body-inner { padding: 0 24px 22px; }

.card-separator {
  border: none;
  border-top: 1px solid var(--border);
  margin-bottom: 18px;
}

.card-desc {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 10px;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-live {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}

.btn-live:hover {
  color: var(--green);
  border-color: var(--green);
}

.btn-poc {
  display: inline-block;
  background: var(--green);
  color: var(--bg);
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn-poc:hover { opacity: 0.85; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  padding-bottom: 14px;
}

footer p, .footer-github {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
}

.footer-github:hover { color: var(--green); }

.footer-nav {
  display: flex;
  gap: 20px;
}

.footer-nav a {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-nav a:hover { color: var(--green); }

@media (max-width: 480px) {
  .footer-nav { display: none; }
}

/* POC page */
.poc-page {
  padding-top: 100px;
  padding-bottom: 80px;
}

.poc-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 36px;
  transition: color 0.2s;
}

.poc-back:hover { color: var(--green); }

.poc-header { margin-bottom: 48px; text-align: center; }

.poc-title {
  font-family: 'Raleway', sans-serif;
  font-weight: 800;
  font-size: clamp(24px, 4vw, 36px);
  color: var(--green);
  line-height: 1.2;
  margin-bottom: 10px;
}

.poc-date {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 14px;
  color: var(--muted);
}

.poc-section { margin-bottom: 36px; }

.poc-section-title {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--green);
  margin-bottom: 12px;
}

.poc-section p {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 15px;
  color: var(--green);
  line-height: 1.75;
}

.poc-live a {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 15px;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.poc-live a:hover { opacity: 0.7; }

/* 404 page */
.not-found {
  padding-top: 140px;
  padding-bottom: 80px;
  text-align: center;
}

.not-found-title {
  font-family: 'Raleway', sans-serif;
  font-weight: 800;
  font-size: clamp(72px, 15vw, 120px);
  color: var(--green);
  line-height: 1;
  margin-bottom: 16px;
}

.not-found-sub {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 36px;
}

.btn-home {
  display: inline-block;
  background: var(--green);
  color: var(--bg);
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn-home:hover { opacity: 0.82; }

/* Contact page */
.contact-page {
  padding-top: 100px;
  padding-bottom: 48px;
}

.contact-title {
  text-align: center;
  font-family: 'Raleway', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 5vw, 42px);
  color: var(--green);
  letter-spacing: -0.03em;
  margin-bottom: 48px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.contact-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  background: rgba(0,49,30,0.03);
}

.contact-card-desc {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.contact-email {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  margin-bottom: 16px;
  transition: border-color 0.15s;
  width: fit-content;
}

.contact-email:hover { border-color: var(--green); }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  transition: border-color 0.2s, color 0.15s;
}

.contact-link:hover {
  border-color: var(--border-hover);
  color: var(--green);
}

.contact-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(0,49,30,0.07);
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 16px;
}

.contact-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.contact-avail-title {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--green);
  margin-bottom: 12px;
}

.contact-avail-text {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.btn-contact {
  display: inline-block;
  background: var(--green);
  color: var(--bg);
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn-contact:hover { opacity: 0.85; }

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

/* Responsive */
@media (max-width: 768px) {
  .navbar { position: sticky; top: 0; }
  main { padding-top: 120px; padding-bottom: 64px; }
  .hamburger { display: flex; }

  .nav-menu {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 28px 28px;
    gap: 18px;
    border-bottom: 1px solid var(--navbar-border);
  }

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

  .lang-switcher { margin-top: 4px; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .hero { margin-bottom: 48px; }
  .card-header { padding: 16px 18px; }
  .card-body-inner { padding: 0 18px 18px; }
  .footer-inner { padding: 12px 18px; }
}

@media (max-width: 360px) {
  .hero-tagline { font-size: 24px; }
  .btn-poc { font-size: 12px; padding: 9px 14px; }
}

/* ---- CV SECTION ---- */

.cv-section {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.cv-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.cv-section-title {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--green);
  letter-spacing: -0.01em;
}

.cv-download-btn {
  background: var(--green);
  color: #fafaf8;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
  text-decoration: none;
  display: inline-block;
}

.cv-download-btn:hover { opacity: 0.82; }

.cv-doc {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 40px;
  background: rgba(0,49,30,0.02);
}

.cv-doc-header {
  padding-bottom: 16px;
  border-bottom: 2px solid var(--green);
  margin-bottom: 20px;
}

.cv-doc-name {
  font-family: 'Raleway', sans-serif;
  font-weight: 500;
  font-size: 19px;
  color: var(--muted);
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}

.cv-doc-role {
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 8px;
}

.cv-doc-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--muted);
}

.cv-doc-contact a {
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.cv-doc-contact a:hover { border-color: var(--green); }

.cv-doc-summary {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.65;
  padding: 12px 14px;
  border-left: 2px solid var(--green);
  background: rgba(0,49,30,0.03);
  margin-bottom: 24px;
}

.cv-doc-section {
  margin-bottom: 22px;
}

.cv-doc-section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--green);
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  margin-bottom: 14px;
}

.cv-entry {
  margin-bottom: 14px;
}

.cv-entry-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.cv-entry-title {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--green);
}

.cv-entry-date {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.cv-entry-org {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.cv-entry-list {
  padding-left: 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cv-entry-list li {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.55;
}

/* Projets */
.cv-project-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cv-project-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.cv-project-name {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  color: var(--green);
}

.cv-project-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.cv-project-link:hover { color: var(--green); border-color: var(--green); }

.cv-project-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.5;
}

/* Compétences deux colonnes */
.cv-skills-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
}

.cv-skills-col-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.cv-skills-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cv-skill {
  font-family: 'DM Sans', sans-serif;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 300;
}

.cv-skill::before { content: "· "; color: var(--green); font-weight: 700; }

/* Bas de page : langues + loisirs côte à côte */
.cv-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
  margin-top: 0;
}

.cv-doc-section--inline { margin-bottom: 0; }

.cv-lang-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.cv-lang {
  font-family: 'DM Sans', sans-serif;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 300;
}

.cv-lang strong { color: var(--green); font-weight: 500; }

@media (max-width: 600px) {
  .cv-doc { padding: 24px 20px; }
  .cv-skills-cols { grid-template-columns: 1fr; gap: 12px 0; }
  .cv-bottom-row { grid-template-columns: 1fr; }
  .cv-section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ---- IMPRESSION ---- */
@media print {
  @page { size: A4; margin: 14mm 16mm; }

  .navbar,
  .blob,
  body::before,
  .contact-title,
  .contact-grid,
  .cv-section-header,
  footer { display: none !important; }

  body { background: #fff; }

  /* Compactage pour tenir sur une page A4 */
  .cv-doc-summary { margin-bottom: 11px; padding: 8px 12px; line-height: 1.48; }
  .cv-doc-section { margin-bottom: 8px; }
  .cv-doc-section-title { margin-bottom: 7px; padding-bottom: 3px; }
  .cv-entry { margin-bottom: 6px; }
  .cv-entry-list { gap: 2px; }
  .cv-entry-list li { line-height: 1.38; }
  .cv-bottom-row { margin-top: 0; }

  .contact-page { padding-top: 0; padding-bottom: 0; }

  .cv-section {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }

  .cv-doc {
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
  }

  .cv-skills-cols { grid-template-columns: 1fr 1fr; }

  a { color: var(--green) !important; border-bottom: none !important; }
}
