/* =======================================================
   MAIN CSS - Styles métier spécifiques à l'application
   ======================================================= */

/* =======================================================
   ONBOARDING STYLES
   ======================================================= */

/* Step indicator styles */
.step-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--gray-200);
    border: 2px solid var(--gray-200);
    transition: all 0.3s ease;
}

.step-indicator.step-active {
    background-color: var(--primary);
    border-color: var(--primary);
}

.step-indicator.step-completed {
    background-color: var(--primary);
    border-color: var(--primary);
}

.step-connector {
    width: 60px;
    height: 2px;
    background-color: var(--gray-200);
    margin: 0 8px;
    transition: all 0.3s ease;
}

.step-connector.step-connector-completed {
    background-color: var(--primary);
}

/* Loading dots animation */
.loading-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.loading-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary);
    animation: loading-bounce 1.4s infinite ease-in-out;
}

.loading-dots .dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots .dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Statistics styling */
.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
}

/* =======================================================
   HEADER SPECIFIQUE
   ======================================================= */

.main-header {
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--bg-border);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

.header-spacer {
    height: var(--header-height);
}

.main-header .navbar-brand {
    padding: 0;
    margin: 0;
}

.main-header .brand-logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.main-header .navbar-brand:hover .brand-logo {
    opacity: 0.8;
}

.main-header .navbar-toggler {
    border: none;
    padding: 8px;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.main-header .navbar-toggler:focus {
    box-shadow: none;
}

.main-header .navbar-nav {
    gap: 8px;
}

.main-header .nav-link {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.main-header .nav-link:hover {
    color: var(--primary);
    background: var(--bg-secondary);
}

.main-header .nav-link i {
    font-size: 1rem;
}

.main-header .navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-user-menu {
    display: flex;
    align-items: center;
}

#header-user-icon {
    height: 44px;
    width: 44px;
    text-decoration: none;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

#header-user-icon:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--white);
    text-decoration: none;
}

/* Mobile adjustments */
@media (max-width: 991.98px) {
    .main-header .navbar-collapse {
        margin-top: 16px;
        padding: 16px;
        background: var(--white);
        border-radius: 8px;
        box-shadow: var(--shadow-md);
    }

    .main-header .navbar-nav {
        margin-bottom: 16px;
    }

    .main-header .navbar-actions {
        flex-direction: column;
        width: 100%;
    }

    .main-header .navbar-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* =======================================================
   HERO SECTION SPECIFIQUE
   ======================================================= */

.hero-section {
    background: var(--gradient-subtle);
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-visual {
    position: relative;
    z-index: 2;
}

/* =======================================================
   DEMO CHAT CONTAINER
   ======================================================= */

.demo-chat-container {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 20px 40px var(--black-alpha-10);
    overflow: hidden;
    margin: 0 auto;
    max-width: 600px;
}

.demo-chat-header {
    background: var(--bg-secondary);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--bg-border);
}

.demo-chat-dots {
    display: flex;
    gap: 6px;
}

.demo-chat-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray-300);
}

.demo-chat-dots span:nth-child(1) { background: var(--chat-dot-red); }
.demo-chat-dots span:nth-child(2) { background: var(--chat-dot-yellow); }
.demo-chat-dots span:nth-child(3) { background: var(--chat-dot-green); }

.demo-chat-title {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.demo-chat-messages {
    padding: 24px;
}

.demo-message {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.demo-message.user {
    background: var(--bg-border);
    color: var(--text-muted);
    width: fit-content;
    margin-left: auto;
    text-align: right;
}

.demo-message.assistant {
    background: var(--gradient-primary);
    color: var(--white);
    margin-right: 20%;
}

/* =======================================================
   SECTIONS BUSINESS
   ======================================================= */

.trust-section {
    background: var(--white);
}

.trust-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.trust-stat {
    text-align: center;
}

.trust-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.trust-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.features-section {
    background: var(--white);
}

.feature-card {
    text-align: center;
    padding: 2rem;
    height: 100%;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--white);
    font-size: 2rem;
}

.feature-card h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.how-it-works-section {
    background: var(--bg-secondary) !important;
}

.step-card {
    padding: 2rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
}

.step-card h5 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.step-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.cta-section {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
    pointer-events: none;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
}

.cta-subtitle {
    font-size: 1.2rem;
    color: var(--white-alpha-90);
    line-height: 1.6;
}

.text-light-subtle {
    color: var(--white-alpha-80);
}

/* =======================================================
   FOOTER BUSINESS
   ======================================================= */

.footer-brand .brand-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--bg-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--gradient-primary);
    color: var(--white);
    transform: translateY(-2px);
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-cta-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

.footer-bottom {
    border-top: 1px solid var(--bg-border);
}

.footer-legal a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--primary);
}

/* =======================================================
   CHAT SPECIFIQUE
   ======================================================= */

/* Chat Layout */
#chat-content-container {
    background-color: var(--bg-primary) !important;
}

#chat-messages-container {
    padding: 24px 15%;
}

#chat-input-container {
    padding: 16px 15%;
    background-color: var(--bg-primary);
}

/* Chat Header */
#chat-header {
    padding: 16px 15%;
    border-bottom: 1px solid var(--bg-border);
    background-color: var(--bg-primary);
}

#chat-header-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

#chat-header-time {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Chat Input Form */
.chat-input-form {
    display: flex;
    align-items: center;
    background-color: var(--bg-secondary);
    border: 1px solid var(--bg-border);
    border-radius: 24px;
    padding: 4px 4px 4px 20px;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.chat-input-form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-alpha-10), var(--shadow-md);
}

.chat-submit-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.chat-submit-button:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 8px var(--primary-alpha-30);
}

.chat-submit-button:active {
    transform: scale(0.98);
}

.chat-submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Chat Input Field */
#chat-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 15px;
    line-height: 1.5;
    min-height: 1.5em;
    max-height: calc(1.5em * 5);
    overflow-y: auto;
    font-family: inherit;
    outline: none;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--text-primary);
}

#chat-input:empty::before {
    content: attr(data-placeholder);
    color: var(--text-secondary);
    opacity: 0.7;
    pointer-events: none;
}

/* Chat Messages */
.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
    max-width: 100%;
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message-assistant {
    align-self: flex-start;
    max-width: 85%;
}

.chat-message-user {
    align-self: flex-end;
    max-width: 75%;
    margin-left: auto;
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.chat-message-content {
    flex-grow: 1;
    line-height: 1.6;
    padding: 14px 18px;
    border-radius: 18px;
    word-wrap: break-word;
    font-size: 15px;
}

.chat-message-assistant .chat-message-content {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-top-left-radius: 4px;
}

.chat-message-user .chat-message-content {
    background: var(--gradient-primary);
    color: white;
    border-top-right-radius: 4px;
    box-shadow: var(--shadow-sm);
}

/* Chart container styling */
.chart-container {
    margin-top: 12px;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--bg-border);
}

/* Chat Sidebar */
#chat-sidebar {
    background-color: var(--chat-sidebar-bg);
    border-right: 1px solid var(--bg-border);
    max-width: 280px;
    min-width: 280px;
    box-shadow: var(--shadow-sm);
}

#chat-sidebar .navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    padding: 8px 12px;
    margin-bottom: 8px;
}

#chat-sidebar .btn-primary {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
}

#chat-sidebar-list {
    background-color: transparent !important;
    padding: 0;
    gap: 2px;
}

#chat-sidebar-list .nav-item {
    width: 100%;
}

#chat-sidebar-list .nav-link {
    color: var(--text-primary);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: transparent;
}

#chat-sidebar-list .nav-link:hover {
    background-color: var(--bg-secondary);
    color: var(--primary);
}

#chat-sidebar-list .nav-link.active {
    background-color: var(--primary);
    color: white;
}

/* Chat Index Hero Section */
#chat-index-hero {
    text-align: center;
    padding: 40px 20px;
}

#chat-index-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#chat-index-hero > p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

#chat-index-hero-examples {
    margin-top: 2rem;
}

#chat-index-hero-examples li {
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    cursor: pointer;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--bg-border);
}

#chat-index-hero-examples li:hover {
    background: var(--primary-alpha-10);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#chat-index-hero-examples li i {
    color: var(--primary);
}

.mouse-pointer {
    cursor: pointer;
}

/* =======================================================
   ACCOUNT PAGE STYLES
   ======================================================= */

/* Account Sidebar */
.account-sidebar {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--bg-border);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.account-sidebar .nav {
    gap: 4px;
}

.account-sidebar .nav-link {
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: left;
    border: none;
    background: transparent;
}

.account-sidebar .nav-link:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.account-sidebar .nav-link.active {
    background: var(--gradient-primary);
    color: white;
}

.account-sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid var(--bg-border);
}

/* Account Content Card */
.account-content-card {
    background: var(--white);
    border-radius: 12px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--bg-border);
}

.account-content-card h3 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Account Sections */
.account-section {
    padding: 24px 0;
    border-bottom: 1px solid var(--bg-border);
}

.account-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.account-section:first-of-type {
    padding-top: 0;
}

.account-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* Account Info Grid */
.account-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.account-info-item label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.account-info-item p {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
}

/* Account Form */
.account-form .form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.account-form .form-control {
    border: 1px solid var(--bg-border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 15px;
    transition: all 0.2s ease;
}

.account-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-alpha-10);
}

.account-form button[type="submit"] {
    margin-top: 20px;
}

/* Sync Status */
.sync-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
}

.sync-status i {
    font-size: 1.1rem;
}

.sync-status-info {
    background: var(--primary-alpha-10);
    color: var(--info);
    border: 1px solid var(--primary-alpha-20);
}

.sync-status-success {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.sync-status-danger {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

.sync-status-warning {
    background: var(--warning-light);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}

.sync-resources ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sync-resources li {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.sync-resources li:last-child {
    margin-bottom: 0;
}

.sync-error pre {
    background: var(--bg-border);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--danger);
    margin: 0;
    overflow-x: auto;
}
