/* Entrepreneur 360 · Fef Services — or et noir */
:root {
    --black: #0b0b0c;
    --panel: #151517;
    --panel-2: #1d1d20;
    --line: #2a2a2e;
    --gold: #c9a24b;
    --gold-2: #e3c27a;
    --text: #f2efe8;
    --muted: #9a968d;
    --danger: #e0705f;
    --ok: #7fb98a;
    --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
    background: var(--black);
    color: var(--text);
    font: 15px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 600; margin: 0 0 .4em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Barre du haut */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--black);
    position: sticky; top: 0; z-index: 10;
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-mark {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    border: 2px solid var(--gold); color: var(--gold); font-weight: 700; font-size: 12px;
}
.logo-text { display: flex; flex-direction: column; font-family: Georgia, serif; font-size: 17px; line-height: 1.1; }
.logo-text small { font-family: system-ui, sans-serif; font-size: 11px; color: var(--gold); letter-spacing: .08em; text-transform: uppercase; }
.topbar nav { display: flex; gap: 20px; }
.topbar nav a { color: var(--text); }
.topbar nav a.muted { color: var(--muted); }

/* Boutons et formulaires */
.btn {
    display: inline-block; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line);
    background: var(--panel-2); color: var(--text); font: inherit; cursor: pointer; text-align: center;
}
.btn:hover { text-decoration: none; border-color: var(--gold); }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #1a1407; border: 0; font-weight: 600; }
.btn-gold:hover { filter: brightness(1.06); }
.btn-gold:disabled { opacity: .5; cursor: wait; }
.btn-block { display: block; width: 100%; }
label { display: block; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
input, textarea {
    display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--black); color: var(--text); font: inherit; font-size: 15px;
}
input:focus, textarea:focus { outline: none; border-color: var(--gold); }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--text); margin-right: 18px; }
.check input { width: auto; margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 4px; margin: 0 0 18px; }
legend { color: var(--gold); padding: 0 6px; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; }
.alert { padding: 12px 14px; border-radius: 10px; background: rgba(224,112,95,.12); border: 1px solid var(--danger); margin-bottom: 14px; }
.alert-ok { background: rgba(127,185,138,.12); border-color: var(--ok); }

/* Connexion */
.auth { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 32px; }
.auth-mark { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--gold); color: var(--gold); display: grid; place-items: center; font-weight: 700; margin-bottom: 18px; }
.auth .btn { width: 100%; margin-top: 6px; }

/* Tableau de bord */
.container { max-width: 1100px; margin: 0 auto; padding: 32px 24px 60px; }
.hero { margin-bottom: 28px; }
.hero h1 { font-size: 34px; }
.usage { max-width: 320px; margin-top: 14px; }
.usage-bar { height: 6px; background: var(--panel-2); border-radius: 99px; overflow: hidden; margin-bottom: 6px; }
.usage-bar span { display: block; height: 100%; background: var(--gold); }
.agents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.agent-card {
    display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 18px;
    background: var(--panel); border: 1px solid var(--line); color: var(--text); transition: .15s;
}
.agent-card:hover { text-decoration: none; border-color: var(--gold); transform: translateY(-2px); }
.agent-card h2 { font-size: 20px; margin: 4px 0 0; }
.agent-card p { color: var(--muted); margin: 0; flex: 1; }
.agent-icon {
    width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
    background: rgba(201,162,75,.12); color: var(--gold); font-size: 18px;
}
.agent-tag { color: var(--gold); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-top: 8px; }
.agent-cta { color: var(--gold-2); font-weight: 600; margin-top: 8px; }

/* Discussion */
.chat-layout { display: grid; grid-template-columns: 270px 1fr; height: calc(100vh - 67px); }
.chat-sidebar { border-right: 1px solid var(--line); padding: 18px; overflow-y: auto; background: var(--panel); }
.conv-list { margin-top: 16px; }
.conv-item { display: flex; align-items: center; border-radius: 10px; }
.conv-item a { flex: 1; padding: 9px 10px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.conv-item:hover, .conv-item.active { background: var(--panel-2); }
.conv-item.active a { color: var(--gold-2); }
.conv-item button { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; padding: 4px 10px; visibility: hidden; }
.conv-item:hover button { visibility: visible; }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
.chat-head { display: flex; gap: 14px; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.chat-head h1 { font-size: 20px; margin: 0; }
.chat-head p { margin: 0; }
.messages { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; }
.msg-user { justify-content: flex-end; }
.bubble { position: relative; max-width: min(760px, 88%); padding: 12px 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); overflow-wrap: anywhere; }
.msg-user .bubble { background: rgba(201,162,75,.14); border-color: rgba(201,162,75,.35); }
.msg-error .bubble { border-color: var(--danger); color: var(--danger); }
.bubble p { margin: 0 0 .7em; }
.bubble p:last-of-type { margin-bottom: 0; }
.bubble table { border-collapse: collapse; margin: .6em 0; display: block; overflow-x: auto; }
.bubble th, .bubble td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.bubble th { color: var(--gold); }
.bubble code { background: var(--black); padding: 1px 5px; border-radius: 5px; }
.bubble pre { background: var(--black); padding: 10px; border-radius: 10px; overflow-x: auto; }
.bubble h1, .bubble h2, .bubble h3 { font-size: 17px; color: var(--gold-2); margin-top: .6em; }
.copy { position: absolute; top: 8px; right: 8px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); border-radius: 8px; font-size: 12px; padding: 3px 8px; cursor: pointer; opacity: 0; transition: .15s; }
.bubble:hover .copy { opacity: 1; }
.typing { display: flex; gap: 5px; padding: 16px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
.starters { margin: auto; max-width: 560px; text-align: center; }
.starter { display: block; width: 100%; margin: 8px 0; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.starter:hover { border-color: var(--gold); }
.chat-input { display: flex; gap: 10px; padding: 16px 24px 20px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-input textarea { margin: 0; resize: none; max-height: 220px; }

/* Administration */
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; margin-bottom: 22px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.checks { padding-bottom: 10px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.table th { color: var(--gold); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.badge { font-size: 11px; color: var(--gold); border: 1px solid var(--gold); border-radius: 99px; padding: 1px 7px; margin-left: 4px; }

/* Mobile */
@media (max-width: 760px) {
    .topbar { padding: 12px 16px; }
    .topbar nav { gap: 12px; font-size: 14px; }
    .logo-text small { display: none; }
    .chat-layout { grid-template-columns: 1fr; height: auto; min-height: calc(100vh - 63px); }
    .chat-sidebar { border-right: 0; border-bottom: 1px solid var(--line); max-height: 180px; }
    .chat-main { height: calc(100vh - 243px); }
    .messages { padding: 16px; }
    .chat-input { padding: 12px 16px 16px; }
    .grid-2 { grid-template-columns: 1fr; }
    .table { display: block; overflow-x: auto; }
}
