:root {
    --bg: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #141414;
    --border: #1f1f1f;
    --border-hover: #333;
    --text: #ededed;
    --text-muted: #888;
    --text-faint: #444;
    --accent: #fff;
    --blue: #3b82f6;
    --blue-dim: rgba(59,130,246,0.12);
    --green: #22c55e;
    --green-dim: rgba(34,197,94,0.1);
    --purple: #a855f7;
    --orange: #f97316;
    --font: 'Geist', sans-serif;
    --mono: 'Geist Mono', monospace;
    --radius: 6px;
  }

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

  html { scroll-behavior: smooth; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
  }

  /* ─── NOISE OVERLAY ─── */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.4;
  }

  /* ─── NAVBAR ─── */
  .navbar {
    position: sticky;
    top: 0;
    height: 64px;
    border-bottom: 1px solid var(--border);
    background: rgba(10,10,10,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
  }

  .navbar-inner {
    max-width: 1120px;
    height: 100%;
    margin: 0 auto;
    padding: 0 48px;
    display: flex;
    align-items: center;
    gap: 32px;
  }

  .logo-mark {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    flex-shrink: 0;
  }

  .logo-icon {
    flex-shrink: 0;
    border-radius: 8px;
  }

  .logo-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
  }

  .logo-sub {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--mono);
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 auto;
  }

  .nav-link {
    display: flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
    cursor: pointer;
  }

  .nav-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }

  .nav-link.active {
    color: var(--text);
    background: rgba(255,255,255,0.08);
  }

  .navbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
  }

  .nav-social {
    color: var(--text-muted);
    display: flex;
    transition: color 0.15s;
  }

  .nav-social:hover { color: var(--text); }

  .navbar-cta { padding: 7px 16px; font-size: 12px; }

  .status-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    animation: pulse 2s infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }

  .status-text {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--mono);
  }

  /* ─── MOBILE MENU ─── */
  .mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 149;
    opacity: 0;
    transition: opacity 0.2s;
  }

  .mobile-menu-overlay.visible { display: block; opacity: 1; }

  .mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(300px, 80vw);
    background: var(--bg);
    border-left: 1px solid var(--border);
    z-index: 150;
    padding: 80px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
  }

  .mobile-menu.open { transform: translateX(0); }

  .mobile-link {
    padding: 12px 14px;
    border-radius: var(--radius);
    font-size: 15px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
  }

  .mobile-link:hover, .mobile-link.active {
    color: var(--text);
    background: rgba(255,255,255,0.04);
  }

  .mobile-menu-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .mobile-menu-footer .btn-hero-secondary { margin-left: auto; }

  /* ─── SECTIONS ─── */
  .section {
    scroll-margin-top: 64px;
  }

  #home {
    position: relative;
    overflow: hidden;
  }

  /* Lecture d'un article : seule la section Blog reste visible, le reste du one-page est masqué. */
  body.viewing-article .section:not(#blog) {
    display: none;
  }
  body.viewing-article #blog .section-heading {
    display: none;
  }

  /* Fiche projet : seule la section Projets reste visible, le reste du one-page est masqué. */
  body.viewing-project .section:not(#projects) {
    display: none;
  }
  body.viewing-project #projects .section-heading {
    display: none;
  }

  .section-heading {
    padding: 56px 96px 0;
  }

  .section-kicker {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
  }

  .section-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* ─── HERO ─── */
  .hero {
    padding: 80px 96px 60px;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
  }

  .hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59,130,246,0.06) 0%, transparent 70%);
    pointer-events: none;
  }

  /* Effet de neige : des logos de langages/technos tombent doucement dans le hero. */
  .code-snow {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
  }

  .code-snow-icon {
    position: absolute;
    top: 0;
    color: var(--text-faint);
    animation-name: snow-fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
  }

  @keyframes snow-fall {
    from { transform: translateY(-40px) rotate(0deg); }
    to { transform: translateY(2000px) rotate(20deg); }
  }

  .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--border-hover);
    border-radius: 999px;
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--mono);
    margin-bottom: 24px;
  }

  .hero-badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--blue);
  }

  .hero h1 {
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 16px;
  }

  .hero h1 em {
    font-style: normal;
    background: linear-gradient(135deg, #fff 30%, #888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .hero-desc {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 520px;
    line-height: 1.7;
    margin-bottom: 32px;
  }

  .hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: var(--text);
    color: var(--bg);
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: opacity 0.15s;
    text-decoration: none;
  }

  .btn-hero-primary:hover { opacity: 0.88; }

  .btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: none;
    color: var(--text-muted);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.15s;
    text-decoration: none;
  }

  .btn-hero-secondary:hover {
    color: var(--text);
    border-color: var(--text-faint);
    background: rgba(255,255,255,0.03);
  }

  /* ─── QUICK STATS ─── */
  .stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    border-bottom: 1px solid var(--border);
  }

  .stat-item {
    padding: 24px 32px;
    border-right: 1px solid var(--border);
  }

  .stat-item:last-child { border-right: none; }

  .stat-num {
    font-size: 28px;
    font-weight: 700;
    font-family: var(--mono);
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1;
    margin-bottom: 4px;
  }

  .stat-label {
    font-size: 12px;
    color: var(--text-muted);
  }

  /* ─── ABOUT ─── */
  .about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .about-main {
    padding: 48px 96px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }

  .about-side {
    padding: 48px 60px;
    border-bottom: 1px solid var(--border);
  }

  .about-avatar {
    width: 300px;
    height: 300px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1d4ed8, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 24px;
    font-family: var(--mono);
    overflow: hidden;
  }

  .about-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .about-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
  }

  .about-role {
    font-size: 13px;
    color: var(--text-muted);
    font-family: var(--mono);
    margin-bottom: 20px;
  }

  .about-bio {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 480px;
  }

  .about-bio p { margin-bottom: 14px; }
  .about-bio p:last-child { margin-bottom: 0; }

  .info-block {
    margin-bottom: 32px;
  }

  .info-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--mono);
    margin-bottom: 12px;
  }

  .skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .tag {
    padding: 3px 10px;
    border: 1px solid var(--border-hover);
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--mono);
    background: var(--bg-card);
    transition: all 0.15s;
  }

  .tag:hover {
    border-color: var(--text-faint);
    color: var(--text);
  }

  .tag.blue {
    border-color: rgba(59,130,246,0.3);
    color: #60a5fa;
    background: var(--blue-dim);
  }

  .tag.green {
    border-color: rgba(34,197,94,0.3);
    color: #4ade80;
    background: var(--green-dim);
  }

  .info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .info-list li {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--mono);
    display: flex;
    gap: 8px;
  }

  .info-list li::before {
    content: '→';
    color: var(--text-faint);
    flex-shrink: 0;
  }

  /* ─── PROJECTS ─── */
  .projects-filters {
    padding: 16px 96px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 4px;
  }

  .filter-btn {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.15s;
  }

  .filter-btn:hover { color: var(--text); background: rgba(255,255,255,0.04); }
  .filter-btn.active { background: rgba(255,255,255,0.08); color: var(--text); }

  .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 0;
    border-bottom: 1px solid var(--border);
  }

  .project-card {
    padding: 28px 32px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }

  .project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--blue), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 4;
  }

  .project-hover-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 1;
  }

  .project-card.has-image:hover .project-hover-image {
    opacity: 1;
  }

  /* Voile sombre au-dessus de l'image pour garder le texte lisible quel que soit son contenu. */
  .project-card.has-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.88) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 2;
  }

  .project-card.has-image:hover::after {
    opacity: 1;
  }

  .project-content {
    position: relative;
    z-index: 3;
  }

  .project-card:hover { background: rgba(255,255,255,0.015); }
  .project-card:hover::before { opacity: 1; }

  .project-card.has-image:hover .project-name,
  .project-card.has-image:hover .project-link {
    color: #fff;
  }

  .project-card.has-image:hover .project-desc {
    color: rgba(255,255,255,0.85);
  }

  .project-card.has-image:hover .tech-tag {
    color: #fff;
    background: rgba(255,255,255,0.15);
  }

  .project-card.has-image:hover .project-link:hover {
    color: var(--blue);
  }

  .project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }

  .project-status {
    font-size: 10px;
    font-family: var(--mono);
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid;
    flex-shrink: 0;
  }

  .project-status.live {
    color: var(--green);
    border-color: rgba(34,197,94,0.3);
    background: var(--green-dim);
  }

  .project-status.wip {
    color: var(--orange);
    border-color: rgba(249,115,22,0.3);
    background: rgba(249,115,22,0.08);
  }

  .project-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
  }

  .project-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .project-tech {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
  }

  .tech-tag {
    font-size: 10px;
    font-family: var(--mono);
    color: var(--text-faint);
    padding: 2px 6px;
    background: rgba(255,255,255,0.04);
    border-radius: 3px;
  }

  .project-links {
    display: flex;
    gap: 8px;
  }

  .project-link {
    font-size: 11px;
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--mono);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
  }

  .project-link:hover { color: var(--blue); }

  /* ─── BLOG ─── */
  .blog-list {
    border-bottom: 1px solid var(--border);
  }

  .blog-post {
    padding: 28px 96px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: start;
    transition: background 0.15s;
  }

  .blog-post:hover { background: rgba(255,255,255,0.015); }

  .blog-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
  }

  .blog-cat {
    font-size: 10px;
    font-family: var(--mono);
    color: var(--blue);
    padding: 2px 8px;
    background: var(--blue-dim);
    border-radius: 999px;
  }

  .blog-date {
    font-size: 11px;
    color: var(--text-faint);
    font-family: var(--mono);
  }

  .blog-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
    color: var(--text);
    transition: color 0.15s;
  }

  .blog-post:hover .blog-title { color: var(--blue); }

  .blog-excerpt {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 600px;
  }

  .blog-read {
    font-size: 11px;
    font-family: var(--mono);
    color: var(--text-faint);
    white-space: nowrap;
    padding-top: 4px;
  }

  /* ─── CONTACT ─── */
  .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .contact-main {
    padding: 48px 96px;
    border-right: 1px solid var(--border);
  }

  .contact-info {
    padding: 48px 60px;
  }

  .contact-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
  }

  .contact-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.7;
  }

  .form-group {
    margin-bottom: 16px;
  }

  .form-label {
    display: block;
    font-size: 11px;
    font-family: var(--mono);
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .form-input {
    width: 100%;
    padding: 9px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.15s;
  }

  .form-input:focus { border-color: var(--border-hover); }
  .form-input::placeholder { color: var(--text-faint); }

  .form-input[type="file"] {
    padding: 6px;
    color: var(--text-muted);
    font-size: 12px;
  }

  .form-input[type="file"]::file-selector-button {
    padding: 7px 14px;
    margin-right: 10px;
    border: none;
    border-radius: var(--radius);
    background: var(--text);
    color: var(--bg);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: opacity 0.15s;
  }

  .form-input[type="file"]::file-selector-button:hover { opacity: 0.85; }

  textarea.form-input {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
  }

  .form-submit {
    width: 100%;
    padding: 10px;
    background: var(--text);
    color: var(--bg);
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: opacity 0.15s;
    margin-top: 8px;
  }

  .form-submit:hover { opacity: 0.88; }

  .social-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
  }

  .social-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    color: var(--text);
  }

  .social-item:hover {
    border-color: var(--border-hover);
    background: rgba(255,255,255,0.02);
  }

  .social-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
  }

  .social-name {
    font-size: 13px;
    font-weight: 500;
  }

  .social-handle {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--mono);
  }

  .social-arrow {
    margin-left: auto;
    color: var(--text-faint);
    font-size: 12px;
  }

  /* ─── CALLOUT ─── */
  .callout {
    margin: 24px 96px;
    padding: 16px 20px;
    border: 1px solid var(--border-hover);
    border-left: 3px solid var(--blue);
    border-radius: var(--radius);
    background: var(--blue-dim);
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    gap: 10px;
    align-items: flex-start;
  }

  .callout-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }

  /* ─── TERMINAL ─── */
  .terminal {
    margin: 0 96px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
  }

  .terminal-bar {
    padding: 10px 16px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-hover); }
  .dot.r { background: #ff5f57; }
  .dot.y { background: #ffbd2e; }
  .dot.g { background: #28c840; }

  .terminal-title {
    font-size: 11px;
    font-family: var(--mono);
    color: var(--text-faint);
    margin-left: auto;
    margin-right: auto;
  }

  .terminal-body {
    padding: 20px 20px;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.8;
  }

  .t-comment { color: #4a5568; }
  .t-prompt { color: var(--green); }
  .t-cmd { color: var(--text); }
  .t-out { color: var(--text-muted); }
  .t-key { color: #60a5fa; }
  .t-val { color: #f9a8d4; }
  .t-str { color: #86efac; }

  /* ─── MOBILE TOGGLE ─── */
  .menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    cursor: pointer;
    color: var(--text);
    flex-shrink: 0;
  }

  @media (max-width: 768px) {
    .nav-links, .navbar-actions { display: none; }
    .menu-toggle { display: flex; margin-left: auto; }
    .navbar-inner { padding: 0 20px; }
    .hero { padding: 60px 24px 40px; }
    .section-heading { padding: 40px 24px 0; }
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .about-main, .about-side, .contact-main, .contact-info { padding: 32px 24px; border-right: none; }
    .projects-grid { grid-template-columns: 1fr; }
    .projects-filters { padding: 16px 24px; }
    .blog-post { padding: 24px; grid-template-columns: 1fr; gap: 8px; }
    .stats-strip { grid-template-columns: 1fr 1fr; }
    .stat-item { padding: 20px; }
    .terminal { margin: 0 24px 24px; }
    .callout { margin: 16px 24px; }
    .about-grid .about-main { border-bottom: 1px solid var(--border); }
  }

  /* ─── WRITING VIEW ─── */
  .article-view {
    display: none;
    padding: 48px 96px 80px;
    max-width: 1120px;
    margin: 0 auto;
  }

  .article-view.active { display: block; animation: fadeIn 0.2s; }

  .article-view-layout {
    display: grid;
    grid-template-columns: minmax(0, 720px) 280px;
    gap: 100px;
    align-items: start;
  }

  .article-main { min-width: 0; }

  .article-suggestions {
    position: sticky;
    top: 88px;
  }

  .article-suggestions-title {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
  }

  .suggestion-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .suggestion-card {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
  }

  .suggestion-card:hover {
    border-color: var(--border-hover);
    background: rgba(255,255,255,0.02);
  }

  .suggestion-cat {
    font-size: 10px;
    font-family: var(--mono);
    color: var(--blue);
    margin-bottom: 6px;
  }

  .suggestion-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
    margin-bottom: 6px;
  }

  .suggestion-date {
    font-size: 11px;
    color: var(--text-faint);
    font-family: var(--mono);
  }

  @media (max-width: 1100px) {
    .article-view-layout { grid-template-columns: 1fr; }
    .article-suggestions {
      position: static;
      margin-top: 40px;
      padding-top: 32px;
      border-top: 1px solid var(--border);
    }
  }

  .article-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--mono);
    cursor: pointer;
    margin-bottom: 32px;
    transition: color 0.15s;
  }

  .article-back:hover { color: var(--text); }

  .article-h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 12px;
  }

  .article-meta {
    display: flex;
    gap: 16px;
    font-size: 11px;
    font-family: var(--mono);
    color: var(--text-faint);
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
  }

  .article-body {
    font-size: 15px;
    line-height: 1.85;
    color: #c9c9c9;
  }

  .article-body h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin: 36px 0 12px;
    letter-spacing: -0.01em;
  }

  .article-body p { margin-bottom: 18px; }

  .article-body code {
    font-family: var(--mono);
    font-size: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 3px;
    color: #f9a8d4;
  }

  .article-body pre {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-muted);
  }

  /* Bloc de code façon terminal (mêmes .terminal-bar/.dot que sur l'accueil) avec coloration syntaxique via highlight.js. */
  .article-code-terminal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
  }

  .article-body pre.article-code-body {
    background: none;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 20px;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.7;
  }

  .article-body pre.article-code-body code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
  }

  .article-actions-bar {
    display: flex; align-items: center; gap: 10px;
    margin-top: 32px; padding-top: 24px;
    border-top: 1px solid var(--border);
  }

  .article-like-btn, .article-share-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
  }
  .article-like-btn:hover, .article-share-btn:hover { border-color: var(--border-hover); color: var(--text); }
  .article-like-btn.liked { color: #ef4444; border-color: rgba(239,68,68,.35); }

  .share-feedback { font-size: 12px; color: var(--green); }

  .article-comments {
    margin-top: 32px; padding-top: 24px;
    border-top: 1px solid var(--border);
  }

  .comments-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; }

  .comments-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
  .comments-empty { font-size: 13px; color: var(--text-faint); }

  .comment-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
  }
  .comment-author { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
  .comment-message { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

  .comment-form { display: flex; flex-direction: column; gap: 10px; max-width: 480px; }
  .comment-form .comment-submit {
    align-self: flex-start;
    padding: 8px 18px;
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--bg);
    font-size: 13px; font-weight: 500;
    cursor: pointer;
    border: none;
  }
  .comment-form .comment-submit:hover { opacity: .88; }
  .comment-feedback { font-size: 12px; margin: 0; }

  /* ─── PROJECT DETAIL VIEW ─── */
  .project-view {
    display: none;
    padding: 48px 96px 80px;
    max-width: 820px;
  }

  .project-view.active { display: block; animation: fadeIn 0.2s; }

  .project-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--mono);
    cursor: pointer;
    margin-bottom: 32px;
    transition: color 0.15s;
  }

  .project-back:hover { color: var(--text); }

  .project-view-image {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
    margin-bottom: 28px;
  }

  .project-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
  }

  .project-view-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  .project-view-tech {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 24px;
  }

  .project-view-desc {
    font-size: 15px;
    line-height: 1.85;
    color: #c9c9c9;
    margin-bottom: 28px;
    white-space: pre-line;
  }

  .project-view-links {
    display: flex;
    gap: 14px;
    margin-bottom: 28px;
  }

  .project-cta {
    margin-bottom: 28px;
  }

  .buy-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 340px;
    margin: -14px 0 28px;
  }

  .buy-form-hint {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
  }

  .buy-form-proof-toggle {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
  }

  .buy-form-proof-toggle label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
  }

  .buy-form-feedback {
    font-size: 12px;
    margin: 0;
  }

  @media (max-width: 768px) {
    .article-view { padding: 32px 24px 60px; }
    .project-view { padding: 32px 24px 60px; }
  }

  /* ─── DEVIS WIZARD ─── */
  .devis-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .devis-topbar {
    height: 64px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
  }

  .devis-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
  }

  .wizard {
    width: 100%;
    max-width: 560px;
  }

  .wizard-progress-track {
    height: 4px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 10px;
  }

  .wizard-progress-fill {
    height: 100%;
    background: var(--text);
    border-radius: 999px;
    transition: width 0.25s ease;
  }

  .wizard-step-label {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 32px;
  }

  .wizard-panel {
    display: none;
  }

  .wizard-panel.active {
    display: block;
    animation: fadeIn 0.2s;
  }

  .wizard-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
  }

  .wizard-sub {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 28px;
  }

  .choice-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .choice-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
  }

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

  .choice-card.selected {
    border-color: var(--text);
    background: rgba(255,255,255,0.04);
  }

  .choice-card-dot {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border: 1px solid var(--border-hover);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .choice-card.selected .choice-card-dot { border-color: var(--text); }

  .choice-card.selected .choice-card-dot::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text);
  }

  .choice-card-label { font-weight: 500; }

  .wizard-field-group-label {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 24px 0 10px;
  }

  .wizard-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
  }

  .wizard-error {
    font-size: 12px;
    color: #ef4444;
    min-height: 16px;
    margin-top: 12px;
  }

  .wizard-success {
    text-align: center;
    padding: 12px 0;
  }

  .wizard-success .wizard-title,
  .wizard-success .wizard-sub {
    text-align: center;
  }

  .wizard-success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--green-dim);
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  @media (max-width: 768px) {
    .devis-topbar { padding: 0 20px; }
    .devis-topbar .logo-sub { display: none; }
  }