/* ============================================================
   davylheureux.fr — Shell commun (DA V2)
   Référence : RAF_DA_REFERENCE_V2.md (DA chiffrée) +
   prototype_header_footer_v4.html (header & footer validés).
   Header & footer repris VERBATIM du prototype v4. Codé une
   seule fois, injecté partout via site.js + assets/partials/.
   ============================================================ */

/* ---- Variables DA V2 — cheat sheet RAF_DA_REFERENCE_V2 §13 -- */
:root {
  /* Fond noir — couleurs du shader WebGL */
  --bg:            #050505;   /* c1 — noir profond      */
  --bg-2:          #1E1E1E;   /* c2 — anthracite        */
  --bg-3:          #323232;   /* c3 — gris foncé        */
  --bg-4:          #4A4A4A;   /* c4 — highlight smoke   */
  /* Cartouche claire — shader WebGL : #FFFFFF #EEEEEE #D5D5D5 #BCBCBC */
  --card:          #FAFAFA;
  /* Textes sur fond noir */
  --ink:           #FAFAFA;   /* principal  */
  --ink-soft:      #C8C8C8;   /* secondaire */
  --ink-muted:     #909090;   /* label      */
  /* Textes sur cartouche claire */
  --ink-dark:      #0A0A0A;
  --ink-dark-soft: #525252;
  --ink-dark-mut:  #888888;
  /* Accent cyan */
  --accent:        #00E5FF;   /* sur fond noir  */
  --accent-dark:   #00788A;   /* sur fond clair */
  --accent-hover:  #4CECFF;
  --line:          rgba(255,255,255,0.06);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ---- Fond WebGL permanent + grain — injectés par site.js -- */
#bg-canvas { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.grain {
  position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================ HEADER ============================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(5, 5, 5, 0.5); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transform: translateY(0); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.site-header.hidden { transform: translateY(-100%); }
.header-inner { max-width: 1400px; margin: 0 auto; padding: 20px 40px; display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.site-logo { font-size: 18px; font-weight: 700; color: #FAFAFA; text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.nav-item { position: relative; color: #C8C8C8; text-decoration: none; font-size: 14px; font-weight: 500; padding: 10px 16px; border-radius: 6px; transition: color 0.2s; white-space: nowrap; cursor: pointer; }
.nav-item:hover { color: #FFFFFF; }
.nav-item.has-dropdown::after { content: '▾'; margin-left: 6px; font-size: 10px; opacity: 0.7; }
.nav-item .nav-tagline { position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 600; color: #00E5FF; text-transform: uppercase; letter-spacing: 0.15em; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.nav-item:hover .nav-tagline { opacity: 1; }
.dropdown { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(-8px); background: rgba(12, 12, 12, 0.92); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px; padding: 8px 0; min-width: 220px; opacity: 0; visibility: hidden; transition: opacity 0.2s, transform 0.2s, visibility 0.2s; box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.8); }
.nav-item.has-dropdown:hover .dropdown, .dropdown:hover { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown a { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; color: #C8C8C8; text-decoration: none; font-size: 14px; font-weight: 400; transition: color 0.15s, background 0.15s; gap: 12px; }
.dropdown a:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.04); }
.dropdown-badge { font-size: 9px; font-weight: 600; color: #00E5FF; text-transform: uppercase; letter-spacing: 0.1em; padding: 3px 8px; border: 1px solid rgba(0, 229, 255, 0.3); border-radius: 100px; }
.nav-cta { margin-left: 16px; padding: 10px 20px; background: transparent; border: 1px solid #00E5FF; color: #00E5FF; border-radius: 6px; font-size: 14px; font-weight: 600; text-decoration: none; transition: background 0.2s, color 0.2s; white-space: nowrap; }
.nav-cta:hover { background: #00E5FF; color: #050505; }
.nav-toggle { display: none; background: none; border: none; color: #FAFAFA; cursor: pointer; padding: 8px; }

/* ============================ MAIN ============================ */
main { position: relative; z-index: 1; padding-top: 80px; }
.section-dark { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 80px 40px; }
.section-dark .content { max-width: 900px; text-align: center; }

/* Typographie DA — 3 niveaux (RAF_DA_REFERENCE_V2 §4) */
.tertiary { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; margin-bottom: 24px; display: inline-block; }
h1 { font-size: clamp(40px, 5vw, 72px); font-weight: 800; letter-spacing: -0.035em; line-height: 1; margin-bottom: 24px; }
h2 { font-size: clamp(18px, 1.6vw, 22px); font-weight: 400; letter-spacing: -0.01em; line-height: 1.5; max-width: 640px; margin: 0 auto; }
.section-dark .tertiary { color: #909090; }
.section-dark h1 { color: #FAFAFA; }
.section-dark h2 { color: #C8C8C8; }
.accent { color: #00E5FF; font-weight: 700; }

/* Marqueur de scaffold — cette passe uniquement, pas de contenu réel */
.placeholder { font-size: 12px; font-weight: 600; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.18em; }

/* ============================ FOOTER ============================ */
.site-footer { position: relative; z-index: 1; background: rgba(5, 5, 5, 0.35); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-top: 1px solid rgba(255, 255, 255, 0.06); padding: 60px 40px 32px; margin-top: 120px; }
.footer-inner { max-width: 1400px; margin: 0 auto; }
.footer-newsletter { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding-bottom: 32px; margin-bottom: 48px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.footer-newsletter-left { flex: 0 0 auto; }
.footer-newsletter-eyebrow { font-size: 10px; font-weight: 600; color: #00E5FF; text-transform: uppercase; letter-spacing: 0.18em; margin-bottom: 6px; display: block; }
.footer-newsletter-title { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: #FAFAFA; line-height: 1.2; }
.newsletter-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex: 1; max-width: 440px; }
.newsletter-form input { padding: 11px 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 6px; color: #FAFAFA; font-family: inherit; font-size: 14px; outline: none; transition: border-color 0.2s, background 0.2s; min-width: 0; }
.newsletter-form input:focus { border-color: #00E5FF; background: rgba(255, 255, 255, 0.06); }
.newsletter-form input::placeholder { color: #888; }
.newsletter-form button { grid-column: 1 / -1; padding: 11px 22px; background: #00E5FF; border: none; border-radius: 6px; color: #050505; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: background 0.2s, transform 0.1s; white-space: nowrap; }
.newsletter-form button:hover { background: #4CECFF; }
.newsletter-form button:active { transform: scale(0.97); }
.newsletter-feedback { grid-column: 1 / -1; font-size: 13px; color: #FF8A8A; margin: 2px 0 0; line-height: 1.4; }
.newsletter-feedback:empty { display: none; }
.newsletter-success {
  font-size: 14px; line-height: 1.5; color: #FAFAFA;
  flex: 1; max-width: 440px;
  padding: 12px 16px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 8px;
}
.footer-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 60px; margin-bottom: 48px; }
.footer-brand h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: #FAFAFA; margin-bottom: 14px; }
.footer-brand p { font-size: 14px; color: #C8C8C8; line-height: 1.55; margin-bottom: 24px; max-width: 320px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 50%; color: #C8C8C8; text-decoration: none; transition: all 0.2s; }
.footer-social a:hover { color: #FFFFFF; border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.05); }
.footer-social svg { width: 16px; height: 16px; }
.footer-col-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; color: #666; margin-bottom: 20px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: #C8C8C8; text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-col a:hover { color: #FFFFFF; }
.footer-bottom { padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.06); display: flex; flex-wrap: wrap; gap: 24px; font-size: 12px; color: #666; align-items: center; }
.footer-bottom a { color: #888; text-decoration: none; transition: color 0.2s; }
.footer-bottom a:hover { color: #FFFFFF; }

/* ============================ MOBILE ============================ */
@media (max-width: 980px) {
  .site-nav { display: none; }
  .nav-toggle { display: block; transition: transform 0.2s; }
  .header-inner { padding: 16px 20px; }
  /* Menu mobile ouvert : on bascule .nav-open sur .site-header via JS */
  .site-header.nav-open .site-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(5, 5, 5, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 14px 20px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  .site-header.nav-open .nav-item {
    font-size: 16px;
    padding: 13px 14px;
    border-radius: 8px;
  }
  .site-header.nav-open .nav-item .nav-tagline {
    position: static;
    transform: none;
    opacity: 1;
    display: inline-block;
    margin-left: 10px;
    font-size: 10px;
  }
  .site-header.nav-open .nav-cta {
    margin: 8px 0 0;
    text-align: center;
    padding: 13px 20px;
  }
  .site-header.nav-open .nav-toggle { transform: rotate(90deg); }
  .footer-newsletter { flex-direction: column; align-items: flex-start; gap: 24px; }
  .newsletter-form { max-width: 100%; width: 100%; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .section-dark { padding: 50px 20px; min-height: 50vh; }
  h1 { font-size: 36px; }
  h2 { font-size: 16px; }
  .footer-cols { grid-template-columns: 1fr; }
  .site-footer { padding: 50px 20px 24px; }
  .newsletter-form { grid-template-columns: 1fr; }
}
