:root {
    --primary-orange: #FF8C42;
    --dark-orange: #E8702A;
    --beige-bg: #F5F5DC;
    --white: #FFFFFF;
    --text-dark: #333333;
    --light-grey: #F0F2F5;
    --border-color: #E0E0E0;
}

body {
    background-color: var(--beige-bg);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    color: var(--text-dark);
}

/* --- NAVBAR --- */
.navbar {
    background-color: var(--white);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 10%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

img.logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo span { color: var(--primary-orange); }

.search-bar input {
    background-color: var(--light-grey);
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    width: 300px;
}

.nav-links a {
    color: #666;
    font-size: 20px;
    margin: 0 15px;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-account {
    margin-left: 10px;
    display: flex;
    align-items: center;
}

.user-avatar-nav {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ddd url('https://i.pravatar.cc/150?u=alex') center/cover;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.nav-links a.active .user-avatar-nav {
    border-color: var(--primary-orange);
}

.user-avatar-nav:hover {
    border-color: var(--primary-orange);
}

.nav-links a.active { color: var(--primary-orange); }

/* --- LAYOUTS --- */
.container {
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    gap: 20px;
    padding: 20px 10%;
}

.marketplace-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    padding: 30px 10%;
}

.details-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    padding: 40px 10%;
}

/* --- COMMON COMPONENTS --- */
.profile-card, .create-post, .post, .suggestions, .filters-sidebar, .agent-card, .agent-detail-header, .info-card, .suggestions-card {
    background-color: var(--white);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 20px;
}

.btn-primary { 
    background-color: var(--primary-orange); 
    color: white; 
    border: none; 
    padding: 8px 20px; 
    border-radius: 5px; 
    cursor: pointer; 
    transition: background 0.2s;
}

.btn-primary:hover { background-color: var(--dark-orange); }

.btn-outline { 
    border: 1px solid var(--primary-orange); 
    color: var(--primary-orange); 
    background: none; 
    padding: 5px 10px; 
    border-radius: 5px; 
    cursor: pointer; 
}

/* --- PAGE HOME / FEED --- */
.profile-card .cover { height: 60px; background-color: var(--primary-orange); }
.avatar-large {
    width: 70px; height: 70px; border-radius: 50%;
    background-color: #ccc; border: 3px solid white;
    margin: -35px auto 10px;
}
.profile-card h2, .profile-card p { text-align: center; margin: 5px 0; }
.stats { display: flex; justify-content: space-around; padding: 15px; border-top: 1px solid var(--light-grey); }
.stat { display: flex; flex-direction: column; font-size: 12px; }

.create-post { padding: 15px; }
.post-input-row { display: flex; align-items: center; gap: 10px; }
.avatar-small { 
    width: 40px; height: 40px; border-radius: 50%; 
    background-color: #ddd; flex-shrink: 0;
    background-size: cover; background-position: center;
    border: 1px solid var(--border-color);
}
.create-post input { border: 1px solid var(--border-color); border-radius: 20px; padding: 10px 15px; width: 100%; }
.post-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }

.post { padding: 15px; }
.post-header { display: flex; gap: 10px; margin-bottom: 15px; }
.agent-preview-card {
    display: flex; align-items: center; gap: 15px;
    background-color: var(--beige-bg); padding: 10px;
    border-radius: 8px; margin-top: 10px;
}

.post-content img { border-radius: 8px; transition: transform 0.3s ease; }
.post-content img:hover { transform: scale(1.01); }

.post-interactions {
    display: flex; gap: 20px; padding-top: 15px;
    border-top: 1px solid var(--light-grey); color: #666; cursor: pointer;
}
.post-interactions span:hover { color: var(--primary-orange); }

/* --- PAGE MARKETPLACE --- */
.filters-sidebar { padding: 20px; height: fit-content; }
.filter-group { margin-bottom: 25px; }
.filter-group h4 { margin-bottom: 10px; color: var(--primary-orange); font-size: 14px; text-transform: uppercase; }
.filter-group label { display: block; margin-bottom: 8px; font-size: 14px; cursor: pointer; }

.market-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.agents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

.agent-card { padding: 20px; transition: transform 0.2s, box-shadow 0.2s; position: relative; }
.agent-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.agent-card .badge { position: absolute; top: 15px; right: 15px; background: var(--beige-bg); color: var(--dark-orange); padding: 4px 8px; border-radius: 5px; font-size: 10px; font-weight: bold; }
.agent-card-header { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.agent-card-icon { width: 50px; height: 50px; background: var(--primary-orange); color: white; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 24px; }
.agent-card h3 { margin: 0; font-size: 18px; }
.agent-card p { font-size: 14px; color: #666; line-height: 1.4; height: 40px; overflow: hidden; }
.agent-card-footer { margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--light-grey); display: flex; justify-content: space-between; align-items: center; }

/* --- PAGE DETAILS (CORRECTIONS) --- */
.agent-detail-header {
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Espace entre les infos et les boutons */
    gap: 25px;
}

.agent-title-area { flex-grow: 1; } /* Prend l'espace disponible */

.action-buttons {
    display: flex;
    flex-direction: column; /* Aligne verticalement */
    gap: 12px;              /* Espacement entre les deux boutons */
    min-width: 220px;       /* Largeur minimale pour éviter l'écrasement */
}

.btn-large { 
    padding: 15px 25px; 
    font-weight: bold; 
    font-size: 16px; 
    text-align: center;
    border-radius: 8px;
}

.btn-github { 
    background: #333; 
    color: white; 
    padding: 12px 25px; 
    border-radius: 8px; 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px;
    font-size: 14px;
}

.btn-github:hover { opacity: 0.9; }

.agent-main-icon {
    width: 100px; height: 100px;
    background: var(--primary-orange);
    color: white;
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 50px; flex-shrink: 0;
}

.version-tag {
    background: var(--beige-bg);
    font-size: 14px;
    padding: 2px 10px;
    border-radius: 15px;
    color: var(--dark-orange);
    margin-left: 10px;
}

.tabs { display: flex; gap: 20px; border-bottom: 2px solid var(--border-color); margin-bottom: 20px; }
.tabs button { background: none; border: none; padding: 10px 0; font-size: 16px; cursor: pointer; color: #666; }
.tabs button.active { color: var(--primary-orange); border-bottom: 2px solid var(--primary-orange); }

.code-block { background: #2d2d2d; color: #ccc; padding: 20px; border-radius: 8px; font-family: monospace; margin: 20px 0; }
.agent-media img { width: 100%; border-radius: 12px; margin-top: 20px; }

.info-card, .suggestions-card { padding: 20px; }
.info-card ul { list-style: none; padding: 0; }
.info-card li { margin-bottom: 10px; font-size: 14px; border-bottom: 1px solid var(--light-grey); padding-bottom: 5px; }

.rating-large { color: #FFB400; margin-top: 10px; font-size: 18px; }
.rating-large span { color: #666; font-size: 14px; margin-left: 5px; }

/* --- PAGE PUBLISH --- */
.publish-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.publish-header {
    text-align: center;
    margin-bottom: 40px;
}

.publish-header h1 { color: var(--text-dark); margin-bottom: 10px; }
.publish-header p { color: #666; }

.publish-form {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.form-section {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--light-grey);
}

.form-section:last-of-type { border-bottom: none; }

.form-section h3 {
    color: var(--primary-orange);
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    font-weight: 600;
    font-size: 14px;
}

.form-group input, 
.form-group textarea, 
.form-group select {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    background-color: #fafafa;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-orange);
    background-color: white;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    color: #666;
}

.input-with-icon input {
    padding-left: 40px;
    width: 100%;
}

.form-hint {
    font-size: 13px;
    color: #888;
    margin-bottom: 15px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
}

.btn-secondary {
    background: none;
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

/* --- PAGE ACCOUNT --- */
.account-container { padding: 20px 10%; }

.account-header {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.account-banner { height: 150px; background: linear-gradient(90deg, var(--primary-orange), var(--dark-orange)); }

.account-profile-info {
    padding: 0 30px 25px;
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-top: -50px;
}

.avatar-extra-large {
    width: 120px; height: 120px;
    border-radius: 50%;
    background: #ddd url('https://i.pravatar.cc/150?u=alex') center/cover;
    border: 5px solid var(--white);
}

.account-titles { flex-grow: 1; margin-bottom: 10px; }
.account-titles h1 { margin: 0; font-size: 28px; }
.account-titles p { color: #666; margin: 5px 0 0; }

.account-content { display: grid; grid-template-columns: 300px 1fr; gap: 30px; }

.stat-row {
    display: flex; justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--light-grey);
    font-size: 14px;
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* --- NOTIFICATIONS --- */
.notifications-container {
    position: relative;
    display: flex;
    align-items: center;
}

.notif-badge {
    position: absolute;
    top: -5px;
    right: 5px;
    background: red;
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: bold;
    border: 2px solid var(--white);
}

.notif-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 320px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: none; /* Caché par défaut */
    z-index: 2000;
}

.notif-dropdown.show {
    display: block; /* Affiché via JS */
}

.notif-header {
    padding: 12px 15px;
    border-bottom: 1px solid var(--light-grey);
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: bold;
}

.notif-header a {
    font-size: 12px;
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: normal;
}

.notif-list {
    max-height: 400px;
    overflow-y: auto;
}

.notif-item {
    padding: 12px 15px;
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--light-grey);
    transition: background 0.2s;
    cursor: pointer;
}

.notif-item:hover { background-color: var(--beige-bg); }
.notif-item.unread { background-color: #fff9f5; }

.avatar-mini {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #ddd;
    flex-shrink: 0;
}

.notif-text {
    font-size: 13px;
    line-height: 1.4;
}

.notif-text span {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.notif-footer {
    display: block;
    text-align: center;
    padding: 12px;
    font-size: 13px;
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: bold;
}

/* --- LANDING PAGE (HOMEBREW STYLE) --- */
.landing-body {
    text-align: center;
}

.hero-section {
    padding: 60px 20px;
    background-color: var(--white);
    margin-bottom: 40px;
}

.hero-logo {
    height: 120px;
    margin-bottom: 20px;
}

.hero-section h1 {
    font-size: 64px;
    margin: 0;
    color: var(--text-dark);
}

.tagline {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-muted);
}

.search-container-hero {
    margin-top: 30px;
    display: inline-flex;
    align-items: center;
    background: var(--light-grey);
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.search-container-hero input {
    background: transparent;
    border: none;
    outline: none;
    width: 300px;
    font-size: 16px;
}

.search-container-hero kbd {
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
    margin: 0 2px;
}

/* Section Installation */
.install-section {
    max-width: 900px;
    margin: 0 auto 60px;
    padding: 20px;
}

.install-command {
    background: #2d2d2d;
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    margin: 20px 0;
}

.install-command code { color: #50fa7b; } /* Vert Terminal */

.install-command button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
}

.install-hint { color: var(--text-muted); font-size: 14px; }

/* Features Grid */
.features-grid-landing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.feature-item {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.feature-item h3 { color: var(--primary-orange); margin-bottom: 10px; }