/* ═══════════════════════════════════════════════════════════
   adelmas.com — modern & minimal redesign
   Dark, typography-first. No JS, no fonts to download:
   system stack + system mono.
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Palette — dark, low-contrast, one accent */
  --bg:          #0b0e14;
  --bg-raised:   #10141d;
  --border:      #1c2230;
  --border-soft: #161b26;

  --text:        #d7dde8;
  --text-dim:    #8b94a7;
  --text-faint:  #565e70;

  --accent:      #a78bfa;          /* modern violet accent */
  --accent-dim:  #a78bfa26;        /* same, 15% alpha */

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI",
               "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code",
               Menlo, Consolas, monospace;

  --radius: 10px;
  --container: 720px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.mono { font-family: var(--font-mono); font-size: 0.85em; }

/* ── Header ────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}

.brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}

.nav-link {
  font-size: 14px;
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  transition: color .15s ease, background .15s ease;
}

.nav-link:hover  { color: var(--text); background: var(--bg-raised); }
.nav-link.is-active { color: var(--text); }

.header-social {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.social-link {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--text-faint);
  transition: color .15s ease, background .15s ease;
}
.social-link:hover { color: var(--text); background: var(--bg-raised); }

/* ── Intro ─────────────────────────────────────────────── */
/* NB: .page-intro partage l'élément .container — on ne touche
   pas au padding horizontal, seulement vertical. */
.page-intro { padding-top: 48px; padding-bottom: 8px; }

.intro-kicker {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.intro-lead {
  margin-top: 10px;
  max-width: 54ch;
  font-size: 19px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--text-dim);
}

.intro-lead strong { color: var(--text); font-weight: 650; }
.intro-lead em     { color: var(--text); font-style: italic; }

/* ── Section head ──────────────────────────────────────── */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border-soft);
}

/* First section of the page: no divider, sits higher */
.section-head--flush {
  margin-top: 40px;
  padding-top: 0;
  border-top: none;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.section-note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  text-align: right;
}

/* ── Ventures ──────────────────────────────────────────── */
.ventures-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.venture {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 28px 28px 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--bg-raised) 0%, var(--bg) 100%);
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}

.venture:hover {
  transform: translateY(-3px);
  border-color: #2b3448;
  box-shadow: 0 16px 40px -16px rgb(0 0 0 / 55%);
}

/* Filet lumineux en haut, révélé au survol */
.venture::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity .25s ease;
}
.venture:hover::before { opacity: .55; }

/* Produit phare : halo violet + bordure accent */
.venture-accent {
  border-color: var(--accent-dim);
  background:
    radial-gradient(130% 90% at 100% 0%, var(--accent-dim) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-raised) 0%, var(--bg) 100%);
}
.venture-accent::before { opacity: .55; }
.venture-accent:hover { border-color: var(--accent); }

.venture-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

/* Logo de marque (img) */
.venture-logo-img {
  display: block;
  height: 46px;
  width: auto;
}

/* Badge "Fondateur" : point coloré + libellé */
.venture-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
}

.venture-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.venture-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.venture:hover .venture-name { color: var(--accent); }

.venture-domain {
  margin-top: 3px;
  color: var(--text-faint);
}

.venture-desc {
  margin-top: 14px;
  font-size: 14.5px;
  color: var(--text-dim);
}

.venture-desc em { color: var(--text); font-style: italic; }

/* Badges de prestations */
.venture-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 2px;
}

.chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text);
  background: #1a2231;
  border-radius: 6px;
  padding: 4px 10px;
  transition: background .15s ease, color .15s ease;
}

.venture:hover .chip:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

/* CTA bas de carte */
.venture-more {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  transition: color .15s ease;
}
.venture:hover .venture-more { color: var(--accent); }

.arrow {
  display: inline-block;
  transition: transform .2s ease;
}
.venture:hover .arrow,
.archive-item:hover .arrow { transform: translateX(4px); }

/* ── Archive ───────────────────────────────────────────── */
.archive-intro {
  margin-top: 16px;
  font-size: 14.5px;
  color: var(--text-dim);
  max-width: 52ch;
}

.archive-intro a { color: var(--accent); }
.archive-intro a:hover { text-decoration: underline; }

.archive-list {
  margin-top: 16px;
}

.archive-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 12px;
  margin: 0 -12px;
  border-bottom: 1px solid var(--border-soft);
  transition: background .15s ease;
}

.archive-item:last-child { border-bottom: none; }
.archive-item:hover { background: var(--bg-raised); }

.archive-date {
  flex-shrink: 0;
  width: 92px;
  color: var(--text-faint);
  font-size: 12.5px;
}

.archive-title {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: -0.01em;
  transition: color .15s ease;
}

.archive-item:hover .archive-title { color: var(--accent); }

.archive-tag {
  flex-shrink: 0;
  font-size: 11.5px;
  color: var(--text-faint);
}

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
  margin-top: 88px;
  padding: 32px 0 40px;
  border-top: 1px solid var(--border-soft);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copyright { font-size: 13.5px; color: var(--text-dim); }

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-faint);
}

.footer-links a { color: var(--text-dim); transition: color .15s ease; }
.footer-links a:hover { color: var(--accent); }

.footer-sep { color: var(--text-faint); opacity: .5; }

/* ── Hamburger (mobile only) ───────────────────────────── */
.hamburger {
  position: relative;
  display: none;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

/* Barres centrées en absolu : rotation pure autour du centre,
   pas de surprise de rendu entre état sandwich et croix */
.hamburger span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: var(--text);
  margin: -1px 0 0 -9px;
  transition: transform .2s ease, opacity .2s ease;
}

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

/* Sandwich → X */
.hamburger.open span:nth-child(1) { transform: rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg); }

/* ── Pages article ─────────────────────────────────────── */
.article { padding-top: 40px; }

.article-back {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  transition: color .15s ease;
}
.article-back:hover { color: var(--accent); }
.article-back .arrow { transition: transform .2s ease; }
.article-back:hover .arrow { transform: translateX(-4px); }

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.article-title {
  margin-top: 10px;
  font-size: clamp(26px, 5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.article-content { margin-top: 36px; font-size: 16px; overflow-wrap: break-word; }

.article-content p { margin: 18px 0; color: #aeb6c6; }

.article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-dim);
  text-underline-offset: 3px;
  transition: text-decoration-color .15s ease;
}
.article-content a:hover { text-decoration-color: var(--accent); }

.article-content h2 {
  margin: 48px 0 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.article-content h3 {
  margin: 36px 0 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.article-content h4 {
  margin: 28px 0 0;
  font-size: 15px;
  font-weight: 650;
}

.article-content ul, .article-content ol {
  margin: 18px 0;
  padding-left: 24px;
  color: #aeb6c6;
}

.article-content li { margin: 8px 0; }
.article-content li::marker { color: var(--text-faint); }

.article-content strong { color: var(--text); font-weight: 650; }

.article-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 10px 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--bg-raised);
}

.article-content figure { margin: 24px 0; }
.article-content figcaption {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 10px;
  line-height: 1.5;
}

.article-content p.ref {
  font-style: italic;
  color: var(--text-faint);
  font-size: 14px;
}

/* Blocs de code */
.article-content pre {
  margin: 20px 0;
  padding: 16px 18px;
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.55;
}

.article-content pre code {
  padding: 0;
  background: none;
  border: none;
  font-size: inherit;
  white-space: pre;
}

.article-content code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--text);
}

/* Badges d'analyse (VirusTotal, etc.) */
.article-content a.ext-badge {
  display: inline-block;
  margin: 0 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease;
}
.article-content a.ext-badge:hover { color: var(--accent); border-color: var(--accent-dim); }

/* Tableaux */
.article-content table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  font-size: 13.5px;
  color: #aeb6c6;
}

.article-content th, .article-content td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
}

.article-content th { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }

/* Intégrations gist */
.article-content .gist,
.article-content iframe { margin: 20px 0; }

/* Navigation précédent / suivant */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 56px;
}

.article-prev, .article-next {
  padding: 18px 20px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  transition: border-color .2s ease, background .2s ease;
}

.article-prev:hover, .article-next:hover {
  background: var(--bg-raised);
  border-color: var(--border);
}

.article-next { text-align: right; }

.nav-dir {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.nav-title {
  display: block;
  margin-top: 6px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-dim);
  transition: color .15s ease;
}

.article-prev:hover .nav-title,
.article-next:hover .nav-title { color: var(--accent); }

/* ── Page contact ──────────────────────────────────────── */
.contact-page { padding-top: 48px; padding-bottom: 40px; }

.contact-title {
  margin-top: 12px;
  font-size: clamp(30px, 6vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.contact-text {
  margin-top: 20px;
  font-size: 18px;
  color: var(--text-dim);
}

.contact-email {
  display: inline-block;
  margin-top: 20px;
  padding: 16px 24px;
  font-family: var(--font-mono);
  font-size: clamp(15px, 4vw, 19px);
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  user-select: all;
  cursor: text;
}

.contact-email span { color: var(--text-dim); }

.contact-alt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-dim);
}

.contact-alt-label { color: var(--text-faint); font-size: 13px; }
.contact-alt a { color: var(--text-dim); transition: color .15s ease; }
.contact-alt a:hover { color: var(--accent); }

/* Bloc partenaire (SSHACK) */
.contact-partner {
  margin-top: 44px;
  padding: 24px 26px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

.contact-partner-title {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text);
}
.contact-partner-title em { color: var(--accent); font-style: italic; }

.contact-partner-text {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--text-dim);
}
.contact-partner-text a { color: var(--accent); }
.contact-partner-text a:hover { text-decoration: underline; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 640px) {
  .header-inner { height: auto; padding: 12px 18px; flex-wrap: wrap; row-gap: 0; gap: 16px; }

  .hamburger { display: block; }
  .header-social { margin-left: auto; }

  /* Nav becomes a full-width dropdown panel */
  .nav {
    display: none;
    order: 4;
    width: 100%;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 10px 20px 16px 0;
    border-top: 1px solid var(--border-soft);
  }

  .nav.open { display: flex; }

  .nav-link {
    padding: 10px 14px 10px 8px;
    font-size: 15px;
    border-radius: 8px;
  }

  .page-intro { padding-top: 32px; }
  .intro-lead { font-size: 17px; }
  .ventures-grid { grid-template-columns: 1fr; }
  .venture      { padding: 24px; }
  .archive-item { flex-wrap: wrap; row-gap: 2px; padding: 14px 8px; margin: 0 -8px; }
  .archive-date { width: auto; }
  .archive-tag  { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .article      { padding-top: 28px; }
  .article-nav  { grid-template-columns: 1fr; }
  .article-content pre { font-size: 12px; padding: 14px; }
}

/* ── Motion preferences ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
