/* ============================================================
   LIBRE — Design system partagé
   Esthétique épurée, inspiration Apple / Inter
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   Menu de navigation partagé (injecté par assets/js/nav.js)
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1rem;
  padding: .9rem 1.5rem;
  background: rgba(245,245,247,.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav .brand { display: inline-flex; align-items: center; }
.nav .brand img { height: 30px; width: auto; display: block; }
.nav .spacer { flex: 1; }

/* Liens — communs au menu public (.nav) et à la barre de l'app (.topbar) */
.nav .links, .topbar .links { display: flex; gap: 1.2rem; align-items: center; margin-left: .5rem; }
.nav .links a, .topbar .links a { font-size: .9rem; font-weight: 600; color: var(--ink); }
.nav .links a:hover, .topbar .links a:hover { color: var(--accent); }
.nav .links a.is-active, .topbar .links a.is-active { color: var(--accent); }
@media (max-width: 560px){ .nav .links, .topbar .links { display: none; } }

:root {
  /* Palette d'états (reprise du brief) */
  --etat-libre:      #93c47d;
  --etat-encadre:    #f9cb9c;
  --etat-travail:    #ea9999;
  --etat-milibre:    #a2c4c9;
  --etat-transit:    #e0e0e0;
  --etat-avenir:     #F0F0F5;
  --etat-ralenti:    #b7b7b7;
  --etat-crepuscule: #666666;
  --etat-audela:     #1D1D1F;

  /* Interface */
  --bg:      #F5F5F7;
  --card:    #ffffff;
  --ink:     #1D1D1F;
  --sub:     #86868B;
  --line:    #E5E5EA;
  --accent:  #2E7DD6;
  --accent-d:#1f63ad;

  --radius:  16px;
  --radius-s:10px;
  --shadow:  0 1px 3px rgba(0,0,0,.06), 0 8px 30px rgba(0,0,0,.05);
  --shadow-l:0 10px 40px rgba(0,0,0,.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-d); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  padding: .7rem 1.4rem;
  border-radius: 980px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease, opacity .15s;
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-d); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: #fff; box-shadow: var(--shadow); }
.btn-sm { padding: .45rem .9rem; font-size: .82rem; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- Carrés de couleur (légende) ---------- */
.sq {
  width: 13px; height: 13px;
  border-radius: 3px;
  display: inline-block;
  border: 1px solid rgba(0,0,0,.10);
  flex: none;
}

/* ---------- Cartes ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow);
}

/* ---------- Utilitaires ---------- */
.kicker {
  font-size: .74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent);
}
.muted { color: var(--sub); }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------- Responsive base ---------- */
@media (max-width: 640px) {
  .btn { padding: .65rem 1.1rem; font-size: .9rem; }
}
