/* --------- RESET SIMPLE --------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* --------- GLOBAL --------- */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #111827, #020617);
  color: #e5e7eb;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

a {
  color: #38bdf8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

main {
  width: 100%;
}

.main-container, .auth-wrapper, .page-container, body * {
    position: relative;
    z-index: 2;
}

/* --------- LAYOUT --------- */
.app-shell {
  max-width: 1400px;
  width: 100%;
  margin: 24px auto;
  padding: 16px;
}

.app-card {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 24px;
}

/* --------- HEADER / NAV --------- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: white;
  font-size: 18px;
}

.brand-title {
  font-size: 20px;
  font-weight: 600;
}

.brand-subtitle {
  font-size: 12px;
  color: #9ca3af;
}

.app-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.45);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
}

.link-small {
  font-size: 13px;
}

/* --------- TYPOGRAPHY --------- */
h1 {
  font-size: 22px;
  margin-bottom: 8px;
}

h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 20px;
}

/* --------- ALERTS --------- */
.alert {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.alert-error {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.5);
  color: #fecaca;
}

.alert-success {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.5);
  color: #bbf7d0;
}

/* --------- FORMS --------- */
.form-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 26px;
}

@media (max-width: 900px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-card {
  background: rgba(15, 23, 42, 0.75);
  border-radius: 16px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  padding: 18px 18px 16px;
}

.form-group {
  margin-bottom: 14px;
}

label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: #d1d5db;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"] {
  width: 100%;
  padding: 9px 11px;
  background: #020617;
  border-radius: 10px;
  border: 1px solid rgba(75, 85, 99, 0.9);
  color: #e5e7eb;
  font-size: 14px;
}

input::placeholder {
  color: #6b7280;
}

input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.45);
}

/* --------- BUTTONS --------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: white;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.7);
}

.btn-ghost {
  background: transparent;
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.9);
}

/* --------- FILES --------- */
.files-section {
  margin-top: 18px;
}

.files-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.files-meta {
  font-size: 12px;
  color: #9ca3af;
}

.file-list {
  list-style: none;
  border-radius: 14px;
  border: 1px solid rgba(55, 65, 81, 0.85);
  background: rgba(15, 23, 42, 0.8);
  overflow: hidden;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(31, 41, 55, 0.9);
  font-size: 14px;
}

.file-item:last-child {
  border-bottom: none;
}

.file-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #38bdf8;
}

.file-actions a {
  font-size: 13px;
  margin-left: 8px;
}

/* --------- AUTH LAYOUT --------- */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 16px;
}

.auth-card {
  max-width: 420px;
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 24px;
}

.auth-header {
  text-align: center;
  margin-bottom: 18px;
}

.auth-header h1 {
  font-size: 22px;
  margin-bottom: 6px;
}

.auth-header p {
  font-size: 13px;
  color: #9ca3af;
}

/* --------- SMALL TEXT --------- */
.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.25);
  color: #a5f3fc;
  font-size: 11px;
}

body {
    position: relative;
    overflow-x: hidden;
}

/* ---- FOND RÉACTIF AVEC SPOTLIGHT ---- */
#spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(
        circle at var(--spot-x, 50%) var(--spot-y, 50%),
        rgba(56, 189, 248, 0.25),
        rgba(0, 0, 0, 0) 35%
    );
}
