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

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface2: #1c2128;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --green: #3fb950;
  --yellow: #d29922;
  --red: #f85149;
  --purple: #bc8cff;
}

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ── Header ── */
header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 1.5rem 2rem;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
}

.logo-icon { font-size: 1.5rem; }

.tagline {
  margin-top: .25rem;
  color: var(--text-muted);
  font-size: .875rem;
}

/* ── Nav ── */
nav { display: flex; gap: .25rem; align-items: center; }

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .875rem;
  padding: .35rem .75rem;
  border-radius: 6px;
  transition: color .15s, background .15s;
}

.nav-link:hover { color: var(--text); background: var(--surface2); }
.nav-link.active { color: var(--accent); background: var(--accent)18; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 5rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.hero-badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent)18;
  border: 1px solid var(--accent)44;
  padding: .3rem .9rem;
  border-radius: 20px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.hero-accent { color: var(--accent); }

.hero-sub {
  max-width: 600px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

.btn-primary {
  background: var(--accent);
  color: #0d1117;
  font-weight: 700;
  font-size: .9rem;
  padding: .65rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity .15s;
}
.btn-primary:hover { opacity: .88; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .9rem;
  padding: .65rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }

/* ── Section title ── */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
}

/* ── Pillars ── */
.pillars {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 1.25rem;
}

.pillar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: border-color .2s;
}
.pillar:hover { border-color: var(--accent)66; }

.pillar-icon { font-size: 1.75rem; }
.pillar h3 { font-size: 1rem; font-weight: 600; }
.pillar p { font-size: .875rem; color: var(--text-muted); line-height: 1.6; }

/* ── Approach ── */
.approach {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.approach-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 700px) { .approach-content { grid-template-columns: 1fr; } }

.approach-text { display: flex; flex-direction: column; gap: 1rem; }
.approach-text h2 { font-size: 1.5rem; font-weight: 700; }
.approach-text p { color: var(--text-muted); line-height: 1.65; font-size: .95rem; }
.approach-text strong { color: var(--text); }

.approach-stack {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
}

.stack-title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.stack-list { list-style: none; display: flex; flex-direction: column; gap: .6rem; }

.stack-list li {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .875rem;
  color: var(--text-muted);
}

.stack-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.stack-dot.accent  { background: var(--accent); }
.stack-dot.green   { background: var(--green); }
.stack-dot.yellow  { background: var(--yellow); }
.stack-dot.purple  { background: var(--purple); }

/* ── Teaser ── */
.teaser {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.teaser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1rem;
}

.teaser-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.teaser-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent)22;
}

.teaser-icon {
  width: 38px; height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
}

.teaser-name { font-size: .95rem; font-weight: 600; }
.teaser-desc { font-size: .78rem; color: var(--text-muted); margin-top: .1rem; }
.teaser-card .status { margin-left: auto; }

/* ── Main grid ── */
main {
  flex: 1;
  padding: 2.5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 1.5rem;
}

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color .2s, box-shadow .2s;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent)22;
}

/* card header */
.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  flex-shrink: 0;
}

.griffe-icon   { background: #1f3d5c; color: #58a6ff; }
.cnc-icon      { background: #2d1f0e; color: #e3b341; font-size: 1.6rem; }
.cncapp-icon   { background: #1a1a2e; color: #bc8cff; font-size: 1.6rem; }
.git-icon      { background: #1f2d1f; color: #3fb950; font-size: 1.5rem; }
.solitaire-icon{ background: #2d1a1a; color: #f85149; font-size: 1.6rem; }
.comptes-icon  { background: #1a2d1a; color: #3fb950; font-size: 1.3rem; }
.finance-icon  { background: #2d2a0e; color: #e3b341; font-weight: 800; }
.tuya-icon     { background: #1a2d2d; color: #39d353; font-size: 1.5rem; }
.hdd-icon      { background: #251a2d; color: #bc8cff; font-size: 1.5rem; }
.batterie-icon { background: #2d2a0e; color: #f0c040; font-size: 1.5rem; }
.plongee-icon  { background: #0e1f2d; color: #58a6ff; font-size: 1.3rem; }
.banque-icon   { background: #1a2d1a; color: #3fb950; font-size: 1.3rem; }
.tsun-icon     { background: #2d1f0e; color: #e3b341; font-size: 1.5rem; }
.heimdall-icon { background: #1a1a2e; color: #bc8cff; font-size: 1.4rem; }

.card-meta { display: flex; flex-direction: column; gap: .25rem; }

.card-meta h2 { font-size: 1.1rem; font-weight: 600; }

/* status badges */
.status {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .15rem .55rem;
  border-radius: 20px;
  width: fit-content;
}

.status-actif  { background: #1a3a1a; color: var(--green); border: 1px solid var(--green)55; }
.status-proto  { background: #3a2d0a; color: var(--yellow); border: 1px solid var(--yellow)55; }
.status-stable { background: #0f2a4a; color: var(--accent); border: 1px solid var(--accent)55; }

/* description */
.card-desc {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* progress bar */
.card-progress { display: flex; flex-direction: column; gap: .35rem; }

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  color: var(--text-muted);
}

.progress-bar {
  height: 5px;
  background: var(--surface2);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #79c0ff);
  border-radius: 4px;
  transition: width .8s ease;
}

/* feature list */
.features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .85rem;
}

.features li { display: flex; align-items: baseline; gap: .5rem; color: var(--text-muted); }

.features li::before { font-size: .7rem; flex-shrink: 0; }

.features li.done        { color: var(--text); }
.features li.done::before  { content: "✓"; color: var(--green); }
.features li.wip::before   { content: "◐"; color: var(--yellow); }
.features li.todo::before  { content: "○"; color: var(--border); }

/* card footer */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: auto;
  padding-top: .5rem;
  border-top: 1px solid var(--border);
}

.tags { display: flex; flex-wrap: wrap; gap: .35rem; }

.tag {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .72rem;
  padding: .15rem .5rem;
  border-radius: 4px;
}

.btn {
  display: inline-block;
  background: var(--accent)18;
  border: 1px solid var(--accent)66;
  color: var(--accent);
  font-size: .8rem;
  font-weight: 600;
  padding: .3rem .8rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background .15s;
}

.btn:hover { background: var(--accent)30; }

/* ── Deploy block ── */
.deploy-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.deploy-block summary {
  cursor: pointer;
  padding: .6rem .9rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface2);
  list-style: none;
  display: flex;
  align-items: center;
  gap: .45rem;
  user-select: none;
  transition: color .15s;
}

.deploy-block summary::before {
  content: "▶";
  font-size: .6rem;
  transition: transform .2s;
}

.deploy-block[open] summary::before { transform: rotate(90deg); }
.deploy-block[open] summary { color: var(--accent); }
.deploy-block summary:hover { color: var(--text); }

.deploy-body {
  padding: .9rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  background: var(--bg);
}

.deploy-target {
  font-size: .82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.deploy-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: .1rem .45rem;
  border-radius: 4px;
}

.deploy-steps {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.deploy-steps li {
  counter-increment: step;
  font-size: .82rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.deploy-steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent)22;
  border: 1px solid var(--accent)55;
  color: var(--accent);
  font-size: .7rem;
  font-weight: 700;
}

.deploy-steps pre {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .5rem .75rem;
  overflow-x: auto;
}

.deploy-steps code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: .78rem;
  color: #79c0ff;
  white-space: pre;
}

.deploy-note {
  font-size: .78rem;
  color: var(--text-muted);
  border-left: 2px solid var(--border);
  padding-left: .65rem;
  line-height: 1.5;
}

.deploy-note code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: .75rem;
  color: #79c0ff;
}

/* ── Profil ── */
.profil-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 750px) {
  .profil-layout { grid-template-columns: 1fr; }
  .profil-aside { position: static; }
}

.profil-aside {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  position: sticky;
  top: 1.5rem;
}

.profil-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent)44, var(--purple)44);
  border: 2px solid var(--accent)66;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.profil-name { font-size: 1.1rem; font-weight: 700; }

.profil-title {
  font-size: .875rem;
  color: var(--accent);
  line-height: 1.4;
}

.profil-location {
  font-size: .8rem;
  color: var(--text-muted);
}

.profil-links { display: flex; flex-direction: column; gap: .4rem; }

.profil-link {
  font-size: .8rem;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.profil-link:hover { text-decoration: underline; }

.profil-skills {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .25rem;
}

.profil-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.profil-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
}

.profil-section h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .75rem;
}

.profil-text {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.timeline { display: flex; flex-direction: column; gap: 1.5rem; }

.timeline-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: .75rem;
}

.timeline-dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.timeline-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  outline: 2px solid var(--accent)55;
  flex-shrink: 0;
  margin-top: .3rem;
}

.timeline-line {
  flex: 1;
  width: 2px;
  background: var(--border);
  margin-top: .3rem;
}

.timeline-item:last-child .timeline-line { display: none; }

.timeline-body { padding-bottom: .5rem; }

.timeline-role {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
}

.timeline-company {
  font-size: .85rem;
  color: var(--accent);
  margin-top: .1rem;
}

.timeline-dates {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: .2rem;
}

.timeline-desc {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: .5rem;
  line-height: 1.6;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.25rem;
  font-size: .8rem;
  color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  header { padding: 1rem; }
  .header-inner { flex-wrap: wrap; gap: .5rem; }
  nav { gap: 0; }

  main { padding: 1.5rem 1rem; }
  .grid { grid-template-columns: 1fr; }

  .hero { padding: 3rem 0 2rem; }

  .pillars,
  .approach,
  .teaser { padding: 2rem 0; }

  .section-title { margin-bottom: 1.25rem; }
}
