/* ============================================================
   CHATBOT GÉNIO — Styles SaaS
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --green: #2d7a3a;
    --green-lt: #4aaa55;
    --green-bg: #e8f5e9;
    --gray: #f5f5f5;
    --border: #e0e0e0;
    --text: #1a1a1a;
    --text-m: #555;
    --text-l: #999;
    --radius: 12px;
    --shadow: 0 2px 16px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,.12);
}
body { font-family: 'Segoe UI', system-ui, sans-serif; background: #f0f4f1; color: var(--text); min-height: 100vh; }

/* ── LAYOUT ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.page { min-height: 100vh; display: flex; flex-direction: column; }

/* ── NAVBAR ── */
.navbar { background: #fff; border-bottom: 1px solid var(--border); padding: 0 24px; height: 60px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.navbar-brand { font-size: 20px; font-weight: 800; color: var(--green); display: flex; align-items: center; gap: 8px; text-decoration: none; }
.navbar-brand span { font-size: 22px; }
.navbar-nav { display: flex; align-items: center; gap: 8px; }
.nav-link { padding: 7px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--text-m); text-decoration: none; transition: background .15s; }
.nav-link:hover { background: var(--gray); color: var(--text); }
.nav-user { font-size: 13px; color: var(--text-m); font-weight: 600; }

/* ── BOUTONS ── */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 10px 20px; border-radius: 9px; font-size: 14px; font-weight: 700; cursor: pointer; border: none; transition: all .18s; text-decoration: none; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-lt); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(45,122,58,.3); }
.btn-outline { background: #fff; color: var(--green); border: 2px solid var(--green); }
.btn-outline:hover { background: var(--green-bg); }
.btn-ghost { background: none; color: var(--text-m); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--gray); }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-lg { padding: 13px 28px; font-size: 16px; border-radius: 11px; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 7px; }

/* ── CARDS ── */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card-header { border-bottom: 1px solid var(--border); padding-bottom: 16px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; }
.card-header h2 { font-size: 17px; font-weight: 700; }

/* ── FORMS ── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-m); margin-bottom: 6px; }
.form-control { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 9px; font-size: 14px; font-family: inherit; outline: none; transition: border-color .18s, box-shadow .18s; background: #fff; color: var(--text); }
.form-control:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(45,122,58,.1); }
.form-hint { font-size: 12px; color: var(--text-l); margin-top: 5px; }
.form-error { font-size: 12px; color: #e74c3c; margin-top: 5px; }

/* ── ALERTS ── */
.alert { padding: 12px 16px; border-radius: 9px; font-size: 14px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.alert-success { background: #e8f5e9; color: #2d7a3a; border: 1px solid #c8e6c9; }
.alert-error { background: #fdecea; color: #c0392b; border: 1px solid #f5c6cb; }
.alert-info { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }

/* ── BADGE ── */
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-success { background: var(--green-bg); color: var(--green); }
.badge-warning { background: #fff8e1; color: #f57f17; }
.badge-error { background: #fdecea; color: #c0392b; }
.badge-gray { background: var(--gray); color: var(--text-l); }

/* ── HERO (page accueil) ── */
.hero { padding: 80px 24px; text-align: center; }
.hero h1 { font-size: 48px; font-weight: 900; color: var(--text); line-height: 1.15; margin-bottom: 16px; }
.hero h1 span { color: var(--green); }
.hero p { font-size: 18px; color: var(--text-m); max-width: 560px; margin: 0 auto 32px; line-height: 1.6; }
.hero-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; padding: 40px 24px; max-width: 900px; margin: 0 auto; }
.feature { text-align: center; padding: 24px; }
.feature-icon { font-size: 36px; margin-bottom: 12px; display: block; }
.feature h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature p { font-size: 14px; color: var(--text-m); line-height: 1.5; }

/* ── AUTH ── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #e8f5e9 0%, #f0f4f1 100%); padding: 20px; }
.auth-box { background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); padding: 36px; width: 100%; max-width: 420px; }
.auth-logo { text-align: center; font-size: 26px; font-weight: 900; color: var(--green); margin-bottom: 6px; }
.auth-tagline { text-align: center; font-size: 14px; color: var(--text-l); margin-bottom: 28px; }
.auth-divider { text-align: center; font-size: 13px; color: var(--text-l); margin: 16px 0; }
.auth-link { text-align: center; font-size: 13px; color: var(--text-m); margin-top: 16px; }
.auth-link a { color: var(--green); font-weight: 600; text-decoration: none; }

/* ── DASHBOARD ── */
.dash-layout { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 60px); }
.sidebar { background: #fff; border-right: 1px solid var(--border); padding: 20px 12px; }
.sidebar-item { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--text-m); text-decoration: none; margin-bottom: 4px; transition: background .15s; cursor: pointer; }
.sidebar-item:hover, .sidebar-item.active { background: var(--green-bg); color: var(--green); }
.sidebar-item span { font-size: 18px; }
.dash-main { padding: 28px; background: #f0f4f1; }
.dash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.dash-title { font-size: 22px; font-weight: 800; color: var(--text); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.project-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; cursor: pointer; border: 1.5px solid transparent; }
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--green); }
.project-card-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.project-card-url { font-size: 12px; color: var(--text-l); margin-bottom: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-card-footer { display: flex; align-items: center; justify-content: space-between; }
.new-project-card { border: 2px dashed var(--border); background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 160px; transition: border-color .15s; }
.new-project-card:hover { border-color: var(--green); background: var(--green-bg); }
.new-project-icon { font-size: 32px; }
.new-project-label { font-size: 14px; font-weight: 600; color: var(--text-m); }

/* ── STEPPER ── */
.stepper { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 36px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.step-num { width: 36px; height: 36px; border-radius: 50%; background: var(--border); color: var(--text-l); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; transition: all .3s; }
.step.active .step-num { background: var(--green); color: #fff; }
.step.done .step-num { background: var(--green-bg); color: var(--green); }
.step-label { font-size: 11px; font-weight: 600; color: var(--text-l); white-space: nowrap; }
.step.active .step-label { color: var(--green); }
.step-line { width: 80px; height: 2px; background: var(--border); margin-bottom: 20px; }
.step-line.done { background: var(--green); }

/* ── QUESTIONS ── */
.questions-list { display: flex; flex-direction: column; gap: 20px; }
.question-item { background: var(--gray); border-radius: 10px; padding: 16px; }
.question-text { font-size: 14px; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.question-req { color: #e74c3c; font-size: 12px; margin-left: 4px; }

/* ── PREVIEW ── */
.preview-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.preview-window { background: #f0f4f1; border-radius: 16px; padding: 20px; position: sticky; top: 80px; }
.preview-chat { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); }
.preview-chat-hdr { padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.preview-chat-msg { margin: 10px; background: #f5f5f5; border-radius: 10px; padding: 10px 12px; font-size: 12px; color: #333; line-height: 1.5; }
.preview-chat-btns { padding: 6px 10px 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.preview-chat-btn { padding: 5px 11px; border-radius: 20px; font-size: 11px; font-weight: 600; border: 1.5px solid #2d7a3a; color: #2d7a3a; background: #fff; }

/* ── DOWNLOAD ── */
.download-box { text-align: center; padding: 40px; }
.download-icon { font-size: 64px; margin-bottom: 16px; }
.download-title { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.download-sub { font-size: 15px; color: var(--text-m); margin-bottom: 28px; }
.install-steps { text-align: left; background: var(--gray); border-radius: 10px; padding: 20px 24px; margin: 24px auto; max-width: 500px; }
.install-steps ol { padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.install-steps li { font-size: 14px; color: var(--text-m); line-height: 1.5; }
.install-steps strong { color: var(--text); }
.install-steps code { background: #e8e8e8; padding: 1px 6px; border-radius: 4px; font-size: 12px; }

/* ── LOADER ── */
.loader { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px; gap: 16px; }
.spinner { width: 48px; height: 48px; border: 4px solid var(--border); border-top-color: var(--green); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { font-size: 14px; color: var(--text-m); font-weight: 500; }
.loader-steps { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.loader-step { font-size: 13px; color: var(--text-l); display: flex; align-items: center; gap: 8px; }
.loader-step.active { color: var(--green); font-weight: 600; }
.loader-step.done { color: var(--green-bg); }

/* ── TABLES ── */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { background: var(--gray); padding: 10px 14px; text-align: left; font-weight: 600; color: var(--text-m); border-bottom: 2px solid var(--border); }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:hover td { background: #fafafa; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .dash-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .hero h1 { font-size: 32px; }
    .preview-layout { grid-template-columns: 1fr; }
}
