/* =========================================================
   l'autoédition.fr — Global styles (nav + footer)
   ========================================================= */

/* ── Reset minimal ── */
*, *::before, *::after { box-sizing: border-box; }
a { text-decoration: none; }

/* ── Typographie globale ── */
:root {
  --font-brand: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body:  'Inter', system-ui, sans-serif;
  --indigo:     #4338CA;
  --indigo-dk:  #3730A3;
  --stone-900:  #1C1917;
  --stone-600:  #44403C;
  --stone-400:  #78716C;
  --stone-200:  #E7E5E4;
  --bg:         #FAFAF7;
}

/* ── Header (nav sticky) ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--stone-200);
  box-shadow: 0 1px 8px rgba(0,0,0,.04);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: inherit;
}
.header-logo span {
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 800;
  color: var(--stone-900);
  white-space: nowrap;
}
.header-search {
  flex: 1;
  max-width: 480px;
}
.header-search form {
  display: flex;
}
.header-search input {
  flex: 1;
  padding: 8px 14px;
  border: 1.5px solid var(--stone-200);
  border-right: none;
  border-radius: 8px 0 0 8px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--stone-900);
  background: var(--bg);
  outline: none;
  transition: border-color 150ms;
}
.header-search input:focus {
  border-color: var(--indigo);
  background: #fff;
}
.header-search button {
  padding: 8px 14px;
  background: var(--indigo);
  color: #fff;
  border: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  font-size: 14px;
  transition: background 140ms;
  line-height: 0;
}
.header-search button:hover { background: var(--indigo-dk); }

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-username {
  font-family: var(--font-brand);
  font-size: 13px;
  font-weight: 800;
  color: var(--stone-900);
  padding: 0 4px;
}
.points-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  border-radius: 9999px;
  font-family: var(--font-brand);
  font-size: 13px;
  font-weight: 700;
  color: var(--indigo);
  white-space: nowrap;
}
.btn-outline {
  padding: 7px 14px;
  border: 1.5px solid var(--stone-200);
  border-radius: 8px;
  font-family: var(--font-brand);
  font-size: 13px;
  font-weight: 600;
  color: var(--stone-600);
  transition: all 140ms;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.btn-outline:hover { border-color: var(--indigo); color: var(--indigo); }
.btn-primary {
  padding: 7px 16px;
  background: var(--indigo);
  border: none;
  border-radius: 8px;
  font-family: var(--font-brand);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: background 140ms;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--indigo-dk); }
.author-link {
  padding: 7px 10px;
  border-radius: 8px;
  font-family: var(--font-brand);
  font-size: 12px;
  font-weight: 600;
  color: var(--stone-400);
  transition: color 140ms;
  white-space: nowrap;
}
.author-link:hover { color: var(--indigo); }

/* ── Header variante connecté (fond noir) ── */
.site-header--auth {
  background: #1C1917 !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.4) !important;
}
.site-header--auth .header-logo span { color: #fff !important; }
.site-header--auth .header-search input {
  background: rgba(255,255,255,.07) !important;
  border-color: rgba(255,255,255,.14) !important;
  color: #fff !important;
}
.site-header--auth .header-search input::placeholder { color: rgba(255,255,255,.35) !important; }
.site-header--auth .header-search input:focus {
  border-color: rgba(99,102,241,.7) !important;
  background: rgba(255,255,255,.12) !important;
}
.site-header--auth .header-search button { background: #4338CA !important; }
.site-header--auth .header-search button:hover { background: #3730A3 !important; }
.site-header--auth .nav-username { color: #fff !important; }
.site-header--auth .btn-outline {
  border-color: rgba(255,255,255,.45) !important;
  color: #fff !important;
  background: rgba(255,255,255,.08) !important;
}
.site-header--auth .btn-outline:hover {
  border-color: rgba(255,255,255,.75) !important;
  color: #fff !important;
  background: rgba(255,255,255,.14) !important;
}
.site-header--auth .points-pill {
  background: rgba(99,102,241,.35) !important;
  border-color: rgba(129,140,248,.6) !important;
  color: #C7D2FE !important;
}
.site-header--auth .author-link { color: rgba(255,255,255,.55) !important; }
.site-header--auth .author-link:hover { color: rgba(255,255,255,.9) !important; }

/* ── Auth page wrapper ── */
.auth-page {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 64px;
}

/* ── Footer ── */
.site-footer {
  background: #1C1917;
  color: rgba(255,255,255,.72);
  padding: 56px 24px 32px;
  margin-top: 72px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand { }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.footer-logo span {
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}
.footer-tagline {
  font-size: 13px;
  color: rgba(255,255,255,.45);
  line-height: 1.6;
  max-width: 220px;
  margin-bottom: 20px;
}
.footer-col h4 {
  font-family: var(--font-brand);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.35);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,.6);
  margin-bottom: 10px;
  transition: color 140ms;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p {
  font-size: 12px;
  color: rgba(255,255,255,.3);
}
.footer-bottom-links { display: flex; gap: 16px; }
.footer-bottom-links a {
  font-size: 12px;
  color: rgba(255,255,255,.35);
  transition: color 140ms;
}
.footer-bottom-links a:hover { color: rgba(255,255,255,.7); }

/* ── Mobile ── */
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header-search { display: none; }
  .header-logo span { font-size: 14px; }
  .author-link { display: none; }
}
