/* ===== EKANDRA – styles globaux ===== */
:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --secondary: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); }

/* Sidebar */
.sidebar {
    width: 240px; min-height: 100vh; background: var(--primary);
    position: fixed; top: 0; left: 0; padding: 24px 0;
    display: flex; flex-direction: column; z-index: 100;
}
.sidebar .brand { color: #fff; font-size: 1.4rem; font-weight: 700; padding: 0 24px 24px; border-bottom: 1px solid rgba(255,255,255,.15); }
.sidebar .brand span { color: var(--secondary); }
.sidebar nav a {
    display: flex; align-items: center; gap: 10px;
    color: rgba(255,255,255,.8); text-decoration: none;
    padding: 12px 24px; font-size: .95rem; transition: .2s;
}
.sidebar nav a:hover, .sidebar nav a.active { background: rgba(255,255,255,.12); color: #fff; }
.sidebar nav a i { width: 20px; text-align: center; }
.sidebar .logout { margin-top: auto; padding: 16px 24px; }
.sidebar .logout a { color: rgba(255,255,255,.7); text-decoration: none; font-size: .9rem; }

/* Main */
.main { margin-left: 240px; padding: 32px; min-height: 100vh; }
.page-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 24px; }

/* Cards */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; }
.card-title { font-size: 1rem; font-weight: 600; margin-bottom: 16px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; text-align: center; }
.stat-card .value { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-card .label { font-size: .85rem; color: var(--muted); margin-top: 4px; }

/* Badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-secondary { background: #f1f5f9; color: #475569; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
thead th { background: var(--bg); padding: 10px 14px; text-align: left; font-weight: 600; color: var(--muted); border-bottom: 2px solid var(--border); }
tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:hover { background: #f8fafc; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-control {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: 8px; font-size: .95rem; background: #fff;
    transition: border .2s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
textarea.form-control { resize: vertical; min-height: 100px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 8px; font-size: .9rem; font-weight: 600; cursor: pointer; border: none; text-decoration: none; transition: .2s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-warning { background: var(--secondary); color: #fff; }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-sm { padding: 5px 12px; font-size: .82rem; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .9rem; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-danger   { background: #fee2e2; color: #991b1b; }
.alert-warning  { background: #fef3c7; color: #92400e; }
.alert-info     { background: #dbeafe; color: #1e40af; }

/* Auth pages */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); }
.auth-card { background: #fff; border-radius: var(--radius); box-shadow: 0 8px 40px rgba(0,0,0,.15); padding: 40px; width: 100%; max-width: 440px; }
.auth-card .brand { text-align: center; font-size: 1.8rem; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.auth-card .brand span { color: var(--secondary); }
.auth-card h2 { text-align: center; font-size: 1.1rem; color: var(--muted); margin-bottom: 28px; }

/* Stars */
.stars { color: var(--secondary); font-size: 1.1rem; }

/* Notification bell */
.notif-bell {
    display: flex; align-items: center; margin-left: auto;
}
.notif-bell-btn {
    position: relative; background: #fff; border: none; border-radius: 50%;
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow); cursor: pointer; font-size: 1.15rem; transition: .2s;
}
.notif-bell-btn:hover { background: var(--bg); }
.notif-badge {
    position: absolute; top: -4px; right: -4px;
    background: var(--danger); color: #fff; border-radius: 20px;
    font-size: .68rem; font-weight: 700; padding: 2px 6px;
    min-width: 18px; text-align: center; line-height: 1.4;
    display: none;
}
.notif-badge.visible { display: block; }

/* Animation cloche */
@keyframes bell-shake {
    0%,100% { transform: rotate(0); }
    15%      { transform: rotate(18deg); }
    30%      { transform: rotate(-16deg); }
    45%      { transform: rotate(12deg); }
    60%      { transform: rotate(-10deg); }
    75%      { transform: rotate(6deg); }
    90%      { transform: rotate(-4deg); }
}
.bell-shake { animation: bell-shake .6s ease; transform-origin: top center; }

/* Topbar (cloche alignée à droite) */
.topbar {
    display: flex; align-items: center; justify-content: flex-end;
    margin-bottom: 8px; min-height: 48px;
}

/* Layout chat avec sidebar right */
.chat-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    align-items: start;
}
.chat-main { min-width: 0; }
#chat-feed { max-width: 580px; }
.chat-sidebar {
    position: sticky; top: 24px;
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 20px;
    font-size: .88rem;
}
.chat-sidebar-title {
    font-size: .75rem; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: .06em;
    margin-bottom: 14px; padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.chat-sidebar-row {
    display: flex; flex-direction: column; gap: 2px;
    padding: 8px 0; border-bottom: 1px solid var(--border);
}
.chat-sidebar-row:last-child { border-bottom: none; }
.chat-sidebar-label { font-size: .75rem; color: var(--muted); }
.chat-sidebar-val   { font-weight: 600; color: var(--text); }

/* Message non lu highlight */
.msg-unread > div {
    animation: unread-glow .6s ease;
    outline: 2px solid var(--secondary) !important;
    outline-offset: 2px;
}
@keyframes unread-glow {
    0%   { box-shadow: 0 0 0 0 rgba(245,158,11,.5); }
    50%  { box-shadow: 0 0 0 8px rgba(245,158,11,.15); }
    100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); }
}
.msg-unread-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--secondary); display: inline-block; margin-left: 6px;
    vertical-align: middle;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar { width: 100%; min-height: auto; position: relative; }
    .main { margin-left: 0; padding: 16px; }
}

/* ===== LANDING PAGE ===== */
.landing-body { background: #fff; }

/* Header */
.lp-header {
    position: sticky; top: 0; z-index: 200;
    background: #fff; border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.lp-header-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; align-items: center; gap: 32px;
    padding: 14px 24px;
}
.lp-brand { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.lp-brand span { color: var(--secondary); }
.lp-brand-credit { font-family: 'Brush Script MT', 'Lucida Handwriting', cursive; font-size: 1.85rem; color: var(--secondary); font-weight: 500; margin-left: -24px; align-self: flex-end; padding-bottom: 2px; }
.lp-nav { display: flex; gap: 24px; margin-right: auto; }
.lp-nav a { color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500; transition: color .2s; }
.lp-nav a:hover { color: var(--primary); }
.lp-header-cta { display: flex; gap: 10px; }

/* Hero */
.lp-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 96px 24px;
    text-align: center;
}
.lp-hero-inner { max-width: 720px; margin: 0 auto; }
.lp-hero h1 { font-size: 2.6rem; font-weight: 800; color: #fff; line-height: 1.2; margin-bottom: 20px; }
.lp-hero h1 span { color: var(--secondary); }
.lp-hero p { font-size: 1.15rem; color: rgba(255,255,255,.85); margin-bottom: 36px; }
.lp-hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-outline {
    background: transparent; border: 2px solid #fff; color: #fff;
    padding: 9px 18px; border-radius: 8px; font-size: .9rem; font-weight: 600;
    text-decoration: none; transition: .2s; display: inline-flex; align-items: center;
}
.btn-outline:hover { background: rgba(255,255,255,.15); }
.btn-outline-white {
    background: transparent; border: 2px solid #fff; color: #fff;
    padding: 9px 18px; border-radius: 8px; font-size: .9rem; font-weight: 600;
    text-decoration: none; transition: .2s; display: inline-flex; align-items: center;
}
.btn-outline-white:hover { background: rgba(255,255,255,.15); }

/* Sections */
.lp-section { padding: 80px 24px; }
.lp-section-alt { background: var(--bg); }
.lp-section-title {
    text-align: center; font-size: 1.8rem; font-weight: 800;
    color: var(--text); margin-bottom: 48px;
}

/* Grid 3 colonnes */
.lp-grid-3 {
    max-width: 1100px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 24px;
}
.lp-card {
    background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 28px;
    border-top: 4px solid var(--primary); transition: transform .2s;
}
.lp-card:hover { transform: translateY(-4px); }
.lp-card-icon { font-size: 2rem; margin-bottom: 14px; }
.lp-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.lp-card p { font-size: .9rem; color: var(--muted); line-height: 1.6; }

/* Steps */
.lp-steps {
    max-width: 900px; margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
    gap: 16px; flex-wrap: wrap;
}
.lp-step { text-align: center; max-width: 220px; }
.lp-step-num {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--primary); color: #fff;
    font-size: 1.3rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px;
}
.lp-step h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.lp-step p { font-size: .88rem; color: var(--muted); line-height: 1.5; }
.lp-step-arrow { font-size: 1.8rem; color: var(--primary); font-weight: 700; }

/* Grid 2 colonnes rôles */
.lp-grid-2 {
    max-width: 900px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(380px,1fr)); gap: 24px;
}
.lp-role-card {
    background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 32px;
    display: flex; flex-direction: column;
}
.lp-role-freelance { border-top: 4px solid var(--primary); }
.lp-role-agence    { border-top: 4px solid var(--secondary); }
.lp-role-icon { font-size: 2.2rem; margin-bottom: 12px; }
.lp-role-card h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 16px; }
.lp-role-card ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.lp-role-card ul li { font-size: .9rem; color: var(--muted); }

/* CTA final */
.lp-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 80px 24px; text-align: center;
}
.lp-cta h2 { font-size: 2rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.lp-cta p { font-size: 1.05rem; color: rgba(255,255,255,.85); margin-bottom: 32px; }

/* Footer */
.lp-footer { background: var(--text); padding: 40px 24px; text-align: center; }
.lp-footer-inner { max-width: 600px; margin: 0 auto; }
.lp-footer .lp-brand { color: #fff; margin-bottom: 10px; display: block; }
.lp-footer p { color: rgba(255,255,255,.5); font-size: .88rem; margin-bottom: 16px; }
.lp-footer-links { display: flex; gap: 24px; justify-content: center; margin-bottom: 20px; }
.lp-footer-links a { color: rgba(255,255,255,.7); text-decoration: none; font-size: .9rem; transition: color .2s; }
.lp-footer-links a:hover { color: var(--secondary); }
.lp-footer-copy { color: rgba(255,255,255,.3) !important; font-size: .8rem !important; }

/* Responsive landing */
@media (max-width: 768px) {
    .lp-nav { display: none; }
    .lp-hero h1 { font-size: 1.8rem; }
    .lp-step-arrow { display: none; }
    .lp-grid-2 { grid-template-columns: 1fr; }
}
