/* ─── LAYOUT ────────────────────────────────────────────────────────────
   Composants partagés sur toutes les pages :
   reset, sidebar, top-nav, footer, boutons, cards, tags, etc.
─────────────────────────────────────────────────────────────────────── */

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

/* ── Variables locales (alias des tokens du theme) ── */
:root {
  --bg:          var(--site-bg);
  --surface:     var(--site-surface);
  --surface-dim: var(--site-surface-dim);
  --ink:         var(--site-ink);
  --ink-2:       var(--site-ink-2);
  --ink-3:       var(--site-ink-3);
  --accent:      var(--site-accent);
  --accent-bg:   var(--site-accent-bg);
  --border:      var(--site-border);
  --border-md:   var(--site-border-md);
  --sidebar-w:   240px;
  --ease:        cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Base ── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--site-font-family);
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── CURSOR ─────────────────────────────────────────────────────────── */
.cursor {
  width: 9px; height: 9px;
  background: var(--ink); border-radius: 50%;
  position: fixed; pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  transition: width .3s var(--ease), height .3s var(--ease);
  mix-blend-mode: difference;
}
.cursor.big { width: 42px; height: 42px; }

/* ─── SIDEBAR ────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 40px 32px; z-index: 200;
}
.sidebar-logo {
  font-family: var(--site-font-family);
  font-weight: 700; font-size: 18px; letter-spacing: -0.5px;
  color: var(--ink); text-decoration: none;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 56px;
}
.logo-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); display: inline-block; flex-shrink: 0;
}
.sidebar-nav {
  list-style: none; display: flex; flex-direction: column; gap: 4px; flex: 1;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 400; color: var(--ink-2);
  text-decoration: none; padding: 10px 14px; border-radius: 10px;
  transition: all 0.2s; position: relative;
}
.sidebar-nav a:hover { background: var(--surface-dim); color: var(--ink); }
.sidebar-nav a.active { color: var(--ink); font-weight: 500; background: var(--bg); }
.sidebar-nav a.active::before {
  content: ''; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px; background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.nav-icon { width: 16px; height: 16px; opacity: 0.5; flex-shrink: 0; }
.sidebar-nav a.active .nav-icon,
.sidebar-nav a:hover .nav-icon { opacity: 1; }
.sidebar-bottom { display: flex; flex-direction: column; gap: 12px; }
.status-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 100px; padding: 8px 14px;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.45);
  animation: statusBlink 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
.status-text { font-size: 12px; font-weight: 500; color: var(--ink-2); line-height: 1.3; }
.sidebar-social { display: flex; gap: 8px; }
.social-btn {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 9px; background: transparent;
  border: 1px solid var(--border); border-radius: 10px;
  color: var(--ink-2); text-decoration: none;
  font-size: 12px; font-weight: 500; transition: all 0.2s;
}
.social-btn:hover { background: var(--surface-dim); color: var(--ink); border-color: var(--border-md); }

/* Sidebar mail hover */
.sidebar-social { overflow: hidden; transition: gap 0.3s var(--ease); }
.social-mail { min-width: 0; }
.social-mail .mail-full {
  max-width: 0; opacity: 0; margin-left: 0; overflow: hidden; white-space: nowrap;
  transition: max-width 0.35s var(--ease), opacity 0.25s var(--ease), margin-left 0.35s var(--ease);
}
.social-mail .mail-short { opacity: 1; transition: opacity 0.2s var(--ease); }
.sidebar-social .social-linkedin {
  flex: 1 1 auto; max-width: 180px;
  transition: max-width 0.35s var(--ease), opacity 0.25s var(--ease), padding 0.35s var(--ease), border-color 0.25s var(--ease), margin 0.35s var(--ease);
}
.sidebar-social .social-mail:hover { flex: 1 1 100%; width: 100%; }
.sidebar-social .social-mail:hover ~ .social-linkedin {
  max-width: 0; opacity: 0; padding-left: 0; padding-right: 0;
  margin: 0; border-color: transparent; border-width: 0;
  pointer-events: none; overflow: hidden;
}
.sidebar-social .social-mail:hover .mail-short { opacity: 0; position: absolute; }
.sidebar-social .social-mail:hover .mail-full { max-width: 240px; opacity: 1; margin-left: 0; }

/* ─── TOP NAV MOBILE ─────────────────────────────────────────────────── */
.top-nav {
  display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 60px; background: rgba(244,243,239,0.9);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  align-items: center; justify-content: space-between; padding: 0 24px;
}
.top-nav-logo {
  font-family: var(--site-font-family);
  font-weight: 700; font-size: 17px; letter-spacing: -0.5px;
  color: var(--ink); text-decoration: none;
  display: flex; align-items: center; gap: 7px;
}
.top-nav-links { display: flex; gap: 4px; list-style: none; }
.top-nav-links a {
  font-size: 13px; font-weight: 400; color: var(--ink-2);
  text-decoration: none; padding: 6px 14px; border-radius: 100px; transition: all 0.2s;
}
.top-nav-links a:hover,
.top-nav-links a.active { color: var(--ink); background: var(--surface); }
.top-nav-toggle {
  display: none; width: 28px; height: 28px; border: 0;
  background: transparent; color: var(--ink);
  align-items: center; justify-content: center;
  cursor: pointer; padding: 0; position: relative;
}
.top-nav-toggle img {
  width: 20px; height: 20px; position: absolute;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.top-nav-toggle .icon-close { opacity: 0; transform: scale(0.92); }
.top-nav.menu-open .top-nav-toggle .icon-menu { opacity: 0; transform: scale(0.92); }
.top-nav.menu-open .top-nav-toggle .icon-close { opacity: 1; transform: scale(1); }

/* ─── MAIN LAYOUT ────────────────────────────────────────────────────── */
.main { margin-left: var(--sidebar-w); min-height: 100vh; }

/* ─── FOOTER ─────────────────────────────────────────────────────────── */
footer {
  padding: 28px 80px 48px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-logo {
  font-weight: 700; font-size: 16px; letter-spacing: -0.4px;
  color: var(--ink); text-decoration: none;
  display: flex; align-items: center; gap: 7px;
}
.footer-copy { font-size: 12px; font-weight: 300; color: var(--ink-3); }
.footer-nav { display: flex; gap: 24px; list-style: none; }
.footer-nav a { font-size: 13px; color: var(--ink-2); text-decoration: none; transition: color 0.2s; }
.footer-nav a:hover { color: var(--ink); }

/* ─── BOUTONS ────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--bg);
  font-size: 14px; font-weight: 500;
  padding: 13px 26px; border-radius: 100px;
  text-decoration: none; border: 1.5px solid transparent;
  transition: all 0.28s var(--ease);
}
.btn-primary:hover { background: #1a1a18; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(14,14,13,0.16); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--ink);
  font-size: 14px; font-weight: 500;
  padding: 13px 26px; border-radius: 100px;
  text-decoration: none; border: 1.5px solid var(--border-md);
  transition: all 0.22s var(--ease);
}
.btn-outline:hover { background: var(--surface); transform: translateY(-1px); }

.btn-inv {
  display: inline-flex; align-items: center; gap: 8px;
  background: #F4F3EF; color: var(--ink);
  font-size: 14px; font-weight: 500;
  padding: 13px 26px; border-radius: 100px;
  text-decoration: none; border: 1.5px solid transparent;
  transition: all 0.28s var(--ease);
}
.btn-inv:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,0.2); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: rgba(244,243,239,0.6);
  font-size: 14px; font-weight: 500;
  padding: 13px 26px; border-radius: 100px;
  text-decoration: none; border: 1.5px solid rgba(244,243,239,0.2);
  transition: all 0.22s var(--ease);
}
.btn-ghost:hover { color: #F4F3EF; border-color: rgba(244,243,239,0.5); }

/* ─── TAGS ───────────────────────────────────────────────────────────── */
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 100px;
}
.tag-ux     { background: #EBF0FF; color: #1246F0; }
.tag-po     { background: #EAFAF0; color: #15803D; }
.tag-graph  { background: #FFF7E6; color: #B45309; }
.tag-motion { background: #FEF0FA; color: #A21CAF; }

/* ─── CARDS ──────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px; overflow: hidden;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.2s;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 56px rgba(14,14,13,0.09);
  border-color: var(--border-md);
}
.card-thumb { width: 100%; aspect-ratio: 16/9; overflow: hidden; }
.card-thumb-inner {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
  transition: transform 0.55s var(--ease); position: relative;
}
.card:hover .card-thumb-inner { transform: scale(1.03); }
.card-thumb-inner::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(14,14,13,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14,14,13,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}
/* Couleurs placeholder de card */
.t-blue  { background: #D6E4FF; }
.t-sand  { background: #F0E8D8; }
.t-sage  { background: #D4E8D8; }
.t-rose  { background: #F0D8DC; }
.t-slate { background: #D8DCE8; }
.t-mint  { background: #D4F0E8; }
.t-peach { background: #F0DDD4; }
.t-lav   { background: #E4D6FF; }

.card-body { padding: 24px 24px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card-arrow {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--border-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.3s var(--ease);
}
.card:hover .card-arrow { background: var(--ink); border-color: var(--ink); transform: rotate(45deg); }
.card:hover .card-arrow path { stroke: #F4F3EF; }
.card-title { font-weight: 700; font-size: 20px; letter-spacing: -0.4px; line-height: 1.15; color: var(--ink); }
.card-desc  { font-size: 14px; font-weight: 300; color: var(--ink-2); line-height: 1.65; }
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; border-top: 1px solid var(--border); margin-top: auto;
}
.card-year { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.card-cta  { font-size: 13px; font-weight: 500; color: var(--accent); }

/* ─── TOOL PILLS ─────────────────────────────────────────────────────── */
.tool-pill {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 100px; padding: 10px 18px;
  font-size: 14px; font-weight: 400; color: var(--ink-2);
  transition: all 0.2s;
}
.tool-pill:hover { border-color: var(--border-md); color: var(--ink); transform: translateY(-2px); }
.tool-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ─── CTA BLOCK ──────────────────────────────────────────────────────── */
.cta-block {
  background: var(--ink); border-radius: 28px;
  padding: 80px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 48px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.cta-block::before {
  content: ''; position: absolute;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(50,148,164,0.2) 0%, transparent 65%);
  top: -180px; right: -60px; pointer-events: none;
}
.cta-title {
  font-weight: 700; font-size: clamp(28px, 3.5vw, 52px);
  letter-spacing: -2px; line-height: 1.0;
  color: #F4F3EF; margin-bottom: 10px;
}
.cta-sub { font-size: 15px; font-weight: 300; color: rgba(244,243,239,0.5); max-width: 360px; line-height: 1.65; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }

/* ─── RESPONSIVE PARTAGÉ ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .sidebar { display: none; }
  .top-nav { display: flex; }
  .main { margin-left: 0; padding-top: 60px; }
  footer { padding: 28px 32px 48px; }
}

@media (max-width: 500px) {
  .top-nav { padding: 0 16px; }
  .top-nav-toggle { display: inline-flex; }
  .top-nav-links {
    position: absolute; top: 60px; left: 0; right: 0; width: 100%;
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 14px 16px 16px;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    opacity: 0; transform: translateY(-10px); pointer-events: none;
    max-height: 0; overflow: hidden;
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), max-height 0.25s var(--ease);
  }
  .top-nav.menu-open .top-nav-links {
    opacity: 1; transform: translateY(0);
    pointer-events: auto; max-height: 320px;
  }
  .top-nav-links li { width: 100%; }
  .top-nav-links a { width: 100%; text-align: center; padding: 12px 14px; border-radius: 10px; }
}

@media (min-width: 501px) {
  .top-nav-toggle { display: none !important; }
}
