/* ============================================================
   style.css — VolApp TIP (mobile-first)
   ------------------------------------------------------------
   Tokens repris dans l'esprit du site principal (fond sombre,
   violet primaire) — à ajuster une fois le logo/charte fournis.
   ============================================================ */

:root {
  --bg: #0B0B12;
  --card: #14141F;
  --card-alt: #1A1A28;
  --border: rgba(255,255,255,0.08);
  --primary: #7B4BFF;
  --primary-light: #A67CFF;
  --text: #E6EDF3;
  --text-muted: #9BA5B4;
  --text-dim: #6B7280;
  --success: #4DDB6A;
  --warning: #E0A94D;
  --danger: #FF6B6B;
  --info: #4B9EFF;
  --radius: 16px;
  --radius-sm: 10px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: 'Syne', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
body { min-height: 100vh; }
body.has-bottom-nav { padding-bottom: calc(72px + var(--safe-bottom)); }
a { color: inherit; text-decoration: none; }

/* ── Structure globale ── */
.app-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + var(--safe-top)) 18px 14px;
  background: rgba(11,11,18,0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.app-header-title { font-family: 'Bebas Neue', sans-serif; font-size: 20px; letter-spacing: 0.04em; }
.app-header-title span { color: var(--primary-light); }
.app-main { padding: 16px; max-width: 560px; margin: 0 auto; }

/* ── Navigation basse ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-around; align-items: center;
  background: rgba(20,20,31,0.96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 8px 4px calc(8px + var(--safe-bottom));
}
.bottom-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-dim); font-size: 10px; font-weight: 700;
  padding: 4px 10px; border-radius: var(--radius-sm);
  flex: 1; text-align: center;
}
.bottom-nav-item svg { width: 22px; height: 22px; }
.bottom-nav-item.active { color: var(--primary-light); }

/* ── Bouton QR flottant : accessible partout, un seul geste ── */
.fab-qr {
  position: fixed; right: 18px; bottom: calc(84px + var(--safe-bottom)); z-index: 55;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #5B2FD6);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(123,75,255,0.45);
  border: none; cursor: pointer;
}
.fab-qr svg { width: 26px; height: 26px; color: white; }

/* ── Cartes ── */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; margin-bottom: 14px;
}
.card-alt { background: var(--card-alt); }

/* ── Carte "prochaine mission" (hero) ── */
.next-mission-card {
  background: linear-gradient(160deg, rgba(123,75,255,0.16), rgba(123,75,255,0.03));
  border: 1px solid rgba(123,75,255,0.30); border-radius: var(--radius);
  padding: 22px 20px; margin-bottom: 16px; text-align: center;
}
.next-mission-eyebrow { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary-light); margin-bottom: 6px; }
.next-mission-compte-a-rebours { font-family: 'Bebas Neue', sans-serif; font-size: 38px; letter-spacing: 0.03em; line-height: 1.1; margin-bottom: 4px; }
.next-mission-titre { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.next-mission-detail { font-size: 13px; color: var(--text-muted); }
.next-mission-empty { font-size: 14px; color: var(--text-muted); padding: 8px 0; }

/* ── Bannière rappel scan sortie ── */
.banner-rappel-sortie {
  display: flex; align-items: center; gap: 10px;
  background: rgba(224,169,77,0.14); border: 1px solid rgba(224,169,77,0.40);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px;
  font-size: 13px; color: #F0CB6A;
}
.banner-rappel-sortie svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ── Badges statut ── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge-attente  { background: rgba(224,169,77,0.16); color: #E0A94D; }
.badge-validee  { background: rgba(77,219,106,0.16); color: #4DDB6A; }
.badge-refusee  { background: rgba(255,107,107,0.16); color: #FF6B6B; }
.badge-noshow   { background: rgba(255,107,107,0.16); color: #FF6B6B; }
.badge-present  { background: rgba(77,219,106,0.20); color: #4DDB6A; }
.badge-referent { background: rgba(224,184,77,0.16); color: #E0B84D; }

/* ── Missions list ── */
.mission-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.mission-item:last-child { border-bottom: none; }
.mission-item-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.mission-item-titre { font-size: 14px; font-weight: 700; }
.mission-item-detail { font-size: 12px; color: var(--text-muted); }

/* ── Filtres pills (statut) ── */
.filtres-pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; -webkit-overflow-scrolling: touch; }
.filtre-pill {
  flex-shrink: 0; padding: 7px 14px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--card); border: 1px solid var(--border); color: var(--text-muted); cursor: pointer;
}
.filtre-pill.active { background: rgba(123,75,255,0.18); border-color: var(--primary); color: var(--text); }

/* ── Formulaires (auth) ── */
.form-group { margin-bottom: 16px; }
.form-input {
  width: 100%; padding: 13px 14px; border-radius: var(--radius-sm);
  background: var(--card-alt); border: 1px solid var(--border); color: var(--text);
  font-family: 'Syne', -apple-system, sans-serif; font-size: 15px;
  transition: border-color 0.2s, background 0.2s;
}
.form-input:focus { outline: none; border-color: var(--primary); background: rgba(123,75,255,0.05); }
.form-input::placeholder { color: rgba(255,255,255,0.18); }

.auth-shell {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px;
  font-family: 'Syne', -apple-system, sans-serif;
}
body.auth-page {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 50% 20%, rgba(123,75,255,0.16) 0%, transparent 55%),
    linear-gradient(rgba(123,75,255,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123,75,255,0.12) 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px;
  background-repeat: no-repeat, repeat, repeat;
  background-attachment: fixed, fixed, fixed;
}

.auth-header { text-align: center; margin-bottom: 32px; }
.auth-hero-img { display: block; width: 100%; max-width: 200px; height: auto; margin: 0 auto 14px; filter: drop-shadow(0 4px 20px rgba(123,75,255,0.35)); }

.auth-logo {
  font-family: 'Bebas Neue', sans-serif; font-size: 34px; letter-spacing: 0.06em; line-height: 1;
  background: linear-gradient(135deg, var(--text) 30%, var(--primary-light) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 6px;
}
.auth-eyebrow { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim); }

.auth-card {
  width: 100%; max-width: 360px; background: var(--card);
  border: 1px solid var(--border); border-radius: 20px; padding: 30px 26px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5); position: relative; z-index: 1;
}
.form-label {
  display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 8px;
}
.btn-primary {
  display: block; width: 100%; padding: 15px; border-radius: 12px;
  font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; border: none;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #ffffff; transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:active { transform: translateY(1px); }
.auth-footer-year { margin-top: 24px; text-align: center; font-size: 11px; color: var(--text-dim); position: relative; z-index: 1; }
.btn-secondary {
  display: block; width: 100%; padding: 14px; border-radius: var(--radius-sm);
  background: transparent; color: var(--text); font-size: 14px; font-weight: 700;
  border: 1px solid var(--border); cursor: pointer; text-align: center;
}
.auth-links { text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-muted); }
.auth-links a { color: var(--primary-light); font-weight: 700; }

/* ── Alertes ── */
.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; }
.alert-error { background: rgba(255,107,107,0.14); border: 1px solid rgba(255,107,107,0.35); color: #FF8C8C; }
.alert-success { background: rgba(77,219,106,0.14); border: 1px solid rgba(77,219,106,0.35); color: #6FE889; }

/* ── QR plein écran ── */
.qr-fullscreen { text-align: center; padding: 20px 0; }
.qr-fullscreen img { width: 240px; height: 240px; border-radius: 12px; background: white; padding: 12px; }
.qr-fullscreen-nom { font-family: 'Bebas Neue', sans-serif; font-size: 22px; letter-spacing: 0.03em; margin-top: 16px; }
.qr-fullscreen-hint { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ── Placeholder / empty states ── */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 14px; }
.row-hidden { display: none; }

@media (min-width: 600px) {
  .bottom-nav { max-width: 560px; left: 50%; transform: translateX(-50%); border-radius: var(--radius) var(--radius) 0 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
  .fab-qr { right: calc(50% - 280px + 18px); }
}
