/* =============================================================================
   OMAR BELMAMOUN — Landing « Midnight »  (omarbelmamoun.com)
   Direction : dark mode, vert-noir profond, accent lime électrique + teal.
   Type : Sora (titres) · Inter (texte) · JetBrains Mono (libellés).
   ========================================================================== */

:root {
  --bg:        #0B0F0E;
  --surface:   #131A17;
  --surface-2: #1A2420;
  --lime:      #C2F252;
  --teal:      #36E0B0;
  --text:      #EAF2EC;
  --muted:     #8CA298;
  --line:      rgba(255,255,255,0.10);

  --font-display: "Sora", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --radius: 16px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --ease: cubic-bezier(0.22, 0.7, 0.3, 1);
}

* { margin: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.97rem + 0.18vw, 1.07rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
::selection { background: var(--lime); color: #0B0F0E; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; color: #fff; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }

.kicker {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--lime);
  display: inline-flex; align-items: center; gap: 0.6rem;
}
.kicker::before { content: "▸"; color: var(--lime); }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.04em;
  padding: 0.95rem 1.6rem; border-radius: 8px; border: 1px solid transparent;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--lime); color: #0B0F0E; }
.btn--primary:hover { box-shadow: 0 12px 36px -10px rgba(194,242,82,0.55); }
.btn--ghost { border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--lime); color: var(--lime); }

/* En-tête */
.nav { position: sticky; top: 0; z-index: 40; background: rgba(11,15,14,0.8); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; min-height: 78px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.04em; display: inline-flex; align-items: center; gap: 0.6rem; color: #fff; }
.brand b { width: 11px; height: 11px; background: var(--lime); border-radius: 50%; box-shadow: 0 0 14px var(--lime); }
.nav-links { display: flex; gap: 2rem; }
.nav-links a { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); transition: color 0.25s; }
.nav-links a:hover { color: var(--lime); }

/* Fond grille + halo */
.hero { position: relative; padding: clamp(3rem, 7vw, 6rem) 0 clamp(2rem, 5vw, 4rem); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 60px 60px; mask-image: radial-gradient(circle at 70% 20%, #000 0%, transparent 70%); opacity: 0.5;
}
.hero::after {
  content: ""; position: absolute; top: -20%; right: -10%; width: 55%; height: 80%; z-index: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(54,224,176,0.18), transparent 65%);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 1.6rem + 4.6vw, 5.4rem); }
.hero h1 .hl { color: var(--lime); }
.hero p.lead { font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem); color: var(--muted); max-width: 44ch; margin: 1.6rem 0 2.2rem; }
.hero-cta { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.hero-tags { margin-top: 2.2rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }
.hero-tags span { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); border: 1px solid var(--line); border-radius: 100px; padding: 0.4rem 0.9rem; }

/* Portrait duotone sombre + cadre lime */
.hero-photo { position: relative; }
.hero-photo .frame { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); aspect-ratio: 4/5; border: 1px solid var(--line); }
.hero-photo .frame img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: luminosity; opacity: 0.78; filter: contrast(1.1); }
.hero-photo .frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(54,224,176,0.12), transparent 50%, rgba(11,15,14,0.6)); }
.hero-photo .badge { position: absolute; z-index: 2; left: 1rem; bottom: 1rem; }
.hero-photo .badge .r { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lime); }
.hero-photo .badge .n { font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 1.2rem; }
.hero-photo .corner { position: absolute; z-index: 2; top: 12px; right: 12px; width: 30px; height: 30px; border-top: 2px solid var(--lime); border-right: 2px solid var(--lime); }

/* Bandeau stats */
.stats { border-block: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: clamp(2rem, 4vw, 3rem) 1rem; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat .fig { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 1.4rem + 2vw, 3rem); color: #fff; line-height: 1; }
.stat .fig span { color: var(--lime); }
.stat .lab { font-family: var(--font-mono); color: var(--muted); font-size: 0.78rem; margin-top: 0.7rem; }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.sec-head { max-width: 54ch; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.sec-head h2 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); margin: 0.9rem 0; }
.sec-head p { color: var(--muted); }

/* Cartes capacités */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; transition: transform 0.4s var(--ease), border-color 0.4s var(--ease); }
.card:hover { transform: translateY(-5px); border-color: rgba(194,242,82,0.5); }
.card .ic { font-family: var(--font-mono); font-size: 0.8rem; color: var(--lime); margin-bottom: 1rem; }
.card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.card p { color: var(--muted); font-size: 0.96rem; }

/* Articles */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.4s var(--ease), border-color 0.4s var(--ease); }
.post-card:hover { transform: translateY(-5px); border-color: rgba(194,242,82,0.5); }
.post-card .thumb { aspect-ratio: 16/10; background: #0B0F0E; overflow: hidden; position: relative; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: luminosity; opacity: 0.72; }
.post-card .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(54,224,176,0.14), transparent 55%); }
.post-card .body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
.post-card .tag { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lime); }
.post-card h3 { font-size: 1.2rem; line-height: 1.22; }
.post-card p { color: var(--muted); font-size: 0.92rem; flex: 1; }
.post-card .more { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text); }
.post-card:hover .more { color: var(--lime); }

/* CTA */
.cta { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: clamp(16px, 3vw, 28px); padding: clamp(2.5rem, 6vw, 5rem); text-align: center; }
.cta::after { content: ""; position: absolute; inset: -40% 30% auto; height: 80%; background: radial-gradient(circle, rgba(194,242,82,0.18), transparent 60%); pointer-events: none; }
.cta h2 { position: relative; font-size: clamp(1.8rem, 1.2rem + 2.6vw, 3.2rem); max-width: 22ch; margin: 0 auto 1rem; }
.cta p { position: relative; color: var(--muted); max-width: 50ch; margin: 0 auto 2rem; }
.cta .btn { position: relative; }

/* Pied de page */
.foot { border-top: 1px solid var(--line); padding: clamp(2.5rem, 5vw, 4rem) 0 2rem; }
.foot-top { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.foot p { color: var(--muted); max-width: 36ch; margin-top: 0.8rem; font-size: 0.92rem; }
.foot-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.foot-links a { font-family: var(--font-mono); color: var(--muted); font-size: 0.82rem; }
.foot-links a:hover { color: var(--lime); }
.foot-bot { padding-top: 1.5rem; color: var(--muted); font-family: var(--font-mono); font-size: 0.78rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* Article */
.article { padding: clamp(2.5rem, 6vw, 5rem) 0; }
.article .meta { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lime); margin-bottom: 1.2rem; }
.article h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.6rem); max-width: 20ch; }
.article .standfirst { font-size: 1.2rem; color: var(--muted); max-width: 56ch; margin-top: 1.2rem; }
.article-cover { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: var(--surface); margin: clamp(2rem,4vw,3rem) 0; border: 1px solid var(--line); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: luminosity; opacity: 0.8; }
.prose { max-width: 70ch; }
.prose > * + * { margin-top: 1.4rem; }
.prose h2 { font-size: 1.7rem; margin-top: 2.6rem; color: #fff; }
.prose blockquote { border-left: 3px solid var(--lime); padding-left: 1.4rem; font-family: var(--font-display); font-size: 1.4rem; line-height: 1.3; color: #fff; }
.prose strong { color: #fff; }
.prose a { color: var(--lime); }

/* Réactivité */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; max-width: 460px; }
  .cards, .posts { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 620px) {
  .cards, .posts, .stats-grid { grid-template-columns: 1fr; }
  .stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .stat:first-child { border-top: 0; }
}


/* =============================================================================
   Menu mobile (hamburger) — liens de navigation en menu déroulant
   ========================================================================== */
.nav-toggle {
  display: none; width: 44px; height: 44px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  background: none; border: 0; cursor: pointer; margin-right: -8px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-in > .btn { display: none; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    padding: 0.25rem var(--gutter) 1rem;
    box-shadow: 0 26px 44px -26px rgba(0,0,0,0.60);
    transform: translateY(-10px); opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }
  .nav-links.is-open { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto; }
  .nav-links a { display: block; width: 100%; padding: 0.95rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; color: var(--text); }
  .nav-links a:last-child { border-bottom: 0; }
}
