/* =============================================================================
   ROBIN — Styles de base
   Palette sobre, mobile-first, sans framework
   ============================================================================= */

/* ---- Reset léger ---------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #1a1a1a;
  background: #f5f5f7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  margin: 0 0 0.75rem 0;
  line-height: 1.2;
}

p { margin: 0 0 1rem 0; }

a { color: #1a73e8; text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: #666; font-size: 0.95rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---- Boutons -------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.btn-primary {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}
.btn-primary:hover { background: #000; }

.btn-ghost {
  background: transparent;
  color: #1a1a1a;
  border-color: #ccc;
}
.btn-ghost:hover { background: #f0f0f0; }

/* ---- Flash messages ------------------------------------------------------- */
.flash {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  border: 1px solid transparent;
}
.flash-success { background: #e8f5e9; border-color: #a5d6a7; color: #1b5e20; }
.flash-error   { background: #ffebee; border-color: #ef9a9a; color: #b71c1c; }
.flash-info    { background: #e3f2fd; border-color: #90caf9; color: #0d47a1; }
.flash-warning { background: #fff3e0; border-color: #ffcc80; color: #e65100; }

/* ---- Page login ----------------------------------------------------------- */
.page-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-box {
  width: 100%;
  max-width: 380px;
  background: #fff;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.login-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
  text-align: center;
}

.login-subtitle {
  color: #666;
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-form input[type="password"] {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
  margin-bottom: 0.75rem;
  -webkit-appearance: none;
  appearance: none;
}
.login-form input[type="password"]:focus {
  outline: none;
  border-color: #1a1a1a;
  background: #fff;
}

.login-form .btn {
  width: 100%;
}

/* ---- Header app (dashboard, missions, etc.) ------------------------------- */
.app-header {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  position: sticky;
  top: 0;
  z-index: 10;
}

.app-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.app-brand {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.logout-form {
  margin: 0;
}

.logout-form .btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* ---- Main ----------------------------------------------------------------- */
.app-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* ---- Placeholder stats (dashboard Paquet 2) ------------------------------ */
.placeholder-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.stat-card {
  background: #fff;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
}

.stat-label {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ---- Page 404 ------------------------------------------------------------- */
.page-404 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.error-box {
  text-align: center;
  max-width: 400px;
}

.error-box h1 {
  font-size: 5rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.05em;
  color: #1a1a1a;
}

.error-box p {
  color: #666;
  margin-bottom: 1.5rem;
}
