/* Dashboard validation — thème NewAppAI (dark, violet accent) */

.cal-cell { width: 2.8rem; height: 2.8rem; line-height: 2.8rem; font-size: 14px; border-radius: 4px; text-decoration: none; color: #fff; font-weight: 600; display: block; }
.cal-cell:hover { background: rgba(139,92,246,0.3) !important; opacity: 0.9; }

:root {
  --bg-page: #000000;
  --bg-card: #1e293b;
  --bg-card-hover: #263548;
  --bg-nav: rgba(0, 0, 0, 0.85);
  --border: #334155;
  --accent: #8b5cf6;
  --accent-hover: #a78bfa;
  --accent-light: rgba(139, 92, 246, 0.15);
  --text: #ffffff;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --glass-bg: rgba(15, 23, 42, 0.8);
  --radius: 8px;
}

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

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-page);
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

/* Navigation — verre flouté Apple */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 24px;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand { font-weight: 600; font-size: 14px; color: var(--text); letter-spacing: -0.2px; }

.topbar nav { display: flex; gap: 4px; flex: 1; }
.topbar nav a {
  color: var(--text-muted); text-decoration: none;
  font-size: 13px; padding: 6px 12px; border-radius: 6px;
  transition: all 0.15s;
}
.topbar nav a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.topbar nav a.active { color: var(--accent); background: var(--accent-light); }

.logout-form { margin-left: auto; }
.link-button {
  background: none; border: none; color: var(--text-dim); cursor: pointer;
  font-size: 13px; padding: 6px 12px; border-radius: 6px;
}
.link-button:hover { color: var(--danger); background: rgba(239,68,68,0.1); }

/* Main content */
main { max-width: 1400px; margin: 0 auto; padding: 32px 24px; }

h1 { font-size: 28px; font-weight: 600; color: var(--text); letter-spacing: -0.3px; margin-bottom: 24px; }
h2 { font-size: 18px; font-weight: 600; color: var(--text); letter-spacing: -0.2px; margin: 24px 0 12px; }

/* Stats tiles */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 32px; }
.tile {
  background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border);
  padding: 20px; text-align: center;
}
.tile-num { font-size: 36px; font-weight: 600; color: var(--accent); display: block; line-height: 1; margin-bottom: 4px; }
.tile-label { font-size: 13px; color: var(--text-muted); }
.tile-hint { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

/* Tables */
.status-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border-radius: var(--radius); overflow: hidden; }
.status-table th {
  text-align: left; padding: 10px 16px; font-size: 12px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
  background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--border);
}
.status-table td { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 13px; }
.status-table tr:last-child td { border-bottom: none; }
.status-table tr:hover td { background: rgba(255,255,255,0.02); }

/* Status indicators */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-dot.active { background: var(--success); box-shadow: 0 0 6px rgba(34,197,94,0.4); }
.status-dot.inactive { background: var(--text-dim); }
.status-dot.error { background: var(--danger); box-shadow: 0 0 6px rgba(239,68,68,0.4); }

/* Forms */
.form-input, input[type="text"], input[type="password"], input[type="email"],
textarea, select {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); padding: 8px 12px; font-size: 14px; font-family: inherit;
  width: 100%; transition: border-color 0.15s;
}
.form-input:focus, input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light);
}

/* Buttons */
.btn, button[type="submit"] {
  background: var(--accent); color: white; border: none;
  padding: 8px 20px; border-radius: var(--radius); font-size: 14px;
  font-weight: 500; cursor: pointer; transition: all 0.15s;
  font-family: inherit;
}
.btn:hover, button[type="submit"]:hover { background: var(--accent-hover); }
.btn:disabled, button[type="submit"]:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-generate { font-size: 16px; padding: 12px 32px; display: block; width: 100%; }

/* Create form */
.create-form { max-width: 640px; }
.create-step {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px;
}
.create-step legend { font-weight: 600; color: var(--text); font-size: 15px; padding: 0 8px; }
.create-step label {
  display: block; margin-top: 12px; font-size: 13px; color: var(--text-muted);
}
.create-step select, .create-step textarea { margin-top: 4px; }

/* Login page */
.login-main {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 40px; width: 100%; max-width: 380px;
}
.login-card h1 { text-align: center; font-size: 22px; margin-bottom: 4px; }
.login-card .tile-hint { text-align: center; margin-bottom: 24px; color: var(--text-muted); }
.login-card label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.login-card input { margin-bottom: 16px; }
.login-card button { width: 100%; }

/* Calendar */
/* Filters */
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; align-items: end; }
.filters label { font-size: 12px; color: var(--text-muted); }
.filters select { width: auto; min-width: 160px; }

/* Validation cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; transition: border-color 0.15s;
}
.card:hover { border-color: var(--accent); }
.card h3 { font-size: 15px; color: var(--text); margin-bottom: 4px; }
.card-meta { font-size: 12px; color: var(--text-dim); }
.card-text { font-size: 13px; color: var(--text-body); margin: 8px 0; line-height: 1.6; }
.card-actions { display: flex; gap: 8px; margin-top: 12px; }
.card-actions form { display: inline; }

/* Preview page */
.preview-container { max-width: 800px; margin: 0 auto; }
.preview-text { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; white-space: pre-wrap; font-size: 15px; line-height: 1.7; margin-bottom: 20px; }
.preview-media { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.preview-media img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.preview-actions { display: flex; gap: 12px; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 16px 24px; font-size: 11px; color: var(--text-dim); text-align: center; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.empty-state .big { font-size: 48px; margin-bottom: 12px; }

/* Responsive */
@media (max-width: 768px) {
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .cal-grid { font-size: 11px; }
}
@media (max-width: 480px) {
  .tile-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar nav a { padding: 6px 8px; font-size: 12px; }
}


/* Validation page — compact cards */
.card { padding: 12px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.card-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tag {
  font-size: 10px; padding: 2px 6px; border-radius: 4px;
  background: var(--accent-light); color: var(--accent);
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.3px;
}
.tag-muted { background: rgba(100,116,139,0.2); color: var(--text-dim); }
.card-subject { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; line-height: 1.4; }

.card-media {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 8px;
  position: relative;
}
.card-media img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 4px; border: 1px solid var(--border);
}
.card-media-more {
  position: absolute; bottom: 4px; right: 4px;
  background: rgba(0,0,0,0.7); color: white; font-size: 10px;
  padding: 2px 6px; border-radius: 4px;
}

.card-text {
  font-size: 12px; color: var(--text-body); line-height: 1.5;
  margin-bottom: 6px; max-height: 80px; overflow-y: auto;
  padding: 4px; border-radius: 4px; border: 1px solid transparent;
  cursor: text; transition: border-color 0.15s;
}
.card-text:focus { outline: none; border-color: var(--accent); background: rgba(0,0,0,0.2); max-height: 300px; }

.card-media-controls { display: flex; gap: 6px; margin-bottom: 6px; }
.card-media-controls audio { width: 100%; height: 28px; }
.btn-small {
  font-size: 11px; padding: 3px 8px; border-radius: 4px;
  background: var(--accent); color: white; text-decoration: none;
}

.btn-validate, .btn-reject, .btn-save-text {
  font-size: 11px; padding: 4px 10px; border-radius: 4px; border: none; cursor: pointer;
  font-family: inherit; font-weight: 500;
}
.btn-validate { background: var(--success); color: white; }
.btn-reject { background: var(--danger); color: white; }
.btn-save-text { background: var(--accent); color: white; }

.reject-details { display: inline; }
.reject-details summary { font-size: 11px; color: var(--danger); cursor: pointer; display: inline; }
.reject-details textarea { font-size: 11px; padding: 4px; margin-top: 4px; width: 100%; }

.card-qa { font-size: 11px; color: var(--text-dim); margin-bottom: 4px; }
.card-date { font-size: 10px; color: var(--text-dim); }
.card-script { font-size: 11px; margin-top: 4px; }
.card-script summary { color: var(--text-muted); cursor: pointer; font-size: 11px; }
.card-comment, .card-notice { font-size: 11px; padding: 4px 8px; border-radius: 4px; margin-top: 4px; }
.card-comment { background: rgba(239,68,68,0.1); color: var(--danger); }
.card-notice { background: rgba(139,92,246,0.1); color: var(--accent); }

/* Calendar (git restored) */
.cal-wrap { overflow-x: auto; }
.cal-grid { border-collapse: collapse; font-size: 0.78rem; }
.cal-grid th, .cal-grid td { padding: 6px 8px; text-align: center; }
.cal-grid th { color: var(--text-dim); font-weight: 600; }
.cal-line-head {
  text-align: left; white-space: nowrap; font-weight: 600; padding-right: 0.6rem;
  position: sticky; left: 0; background: var(--bg-card);
}
.cal-validated, .cal-published { background: var(--success); }
.cal-draft { background: var(--accent); }
.cal-qa_failed { background: var(--danger); }
.cal-rejected { background: var(--warning); }
.cal-empty { background: var(--border); color: var(--text-dim); }
.cal-legend { color: inherit; }

/* Calendar cell colors */
.cal-cell-empty { background: rgba(139,92,246,0.08); }
.cal-cell-has { background: rgba(34,197,94,0.15); }
.cal-today { background: rgba(245,158,11,0.2) !important; }
.cal-td-today { background: rgba(245,158,11,0.05); }
.cal-td-past { background: rgba(239,68,68,0.05); }
.cal-th-today { color: #f59e0b; }
.cal-th-past { color: rgba(239,68,68,0.5); }


/* Responsive */
@media (max-width: 768px) {
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .cal-grid th, .cal-grid td { padding: 2px ; font-size: 9px ; }
  .cal-cell { width: 1.4rem !important; height: 1.4rem !important; line-height: 1.4rem !important; }
  .cal-line-head { font-size: 9px !important; }
  .topbar { flex-direction: column; height: auto; padding: 8px 12px; }
  .topbar nav { flex-wrap: wrap; gap: 2px; }
  .topbar nav a { font-size: 11px; padding: 4px 8px; }
}
@media (max-width: 480px) {
  .tile-grid { grid-template-columns: 1fr; }
  .topbar nav { display: grid; grid-template-columns: 1fr 1fr; }
  .cal-grid th, .cal-grid td { padding: 1px ; font-size: 8px ; }
  .cal-cell { width: 1.2rem !important; height: 1.2rem !important; line-height: 1.2rem !important; border-radius: 2px !important; }
}

.hero-mockup { background: #000; border-radius: 8px; overflow: hidden; font-family: system-ui, sans-serif; margin: 8px 0; }
.hero-mockup-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); background: rgba(0,0,0,0.85); }
.hero-mockup-logo { font-size: 12px; font-weight: 600; color: #fff; }
.hero-mockup-nav { display: flex; gap: 10px; font-size: 10px; color: rgba(255,255,255,0.5); }
.hero-mockup-body { padding: 28px 20px; text-align: center; background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.7) 100%), url('https://newappai.com/uploads/hero-ai-v2-wide.jpg') center/cover no-repeat; }
.hero-mockup-titre { font-size: 22px; font-weight: 700; color: #fff; line-height: 1.2; margin: 0 auto 8px; max-width: 90%; }
.hero-mockup-soustitre { font-size: 12px; color: rgba(255,255,255,0.55); line-height: 1.4; margin: 0 auto 12px; max-width: 80%; }
.hero-mockup-tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; margin-bottom: 12px; }
.hero-mockup-tag { font-size: 9px; padding: 2px 8px; border-radius: 999px; background: rgba(139,92,246,0.15); color: #a78bfa; font-weight: 500; }
.hero-mockup-cta-box { display: flex; gap: 8px; align-items: center; justify-content: center; }
.hero-mockup-cta { padding: 8px 18px; border-radius: 6px; background: #8b5cf6; color: #fff; font-size: 11px; font-weight: 600; }
.hero-mockup-voir { font-size: 10px; color: #8b5cf6; text-decoration: none; }
.hero-mockup-devices { display: flex; gap: 12px; justify-content: center; padding: 6px; background: rgba(255,255,255,0.02); border-top: 1px solid rgba(255,255,255,0.05); }
.hero-mockup-device { display: flex; align-items: center; gap: 4px; font-size: 8px; color: rgba(255,255,255,0.35); }
.hero-mockup-device .dash { display: inline-block; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.1); }
.hero-mockup-device .pc { width: 40px; }
.hero-mockup-device .tablet { width: 20px; }
.hero-mockup-device .phone { width: 10px; }
.hero-mockup-footer { padding: 6px; font-size: 8px; color: rgba(255,255,255,0.25); text-align: center; border-top: 1px solid rgba(255,255,255,0.04); }

