/* Base fluide (15px) — cohérence avec thème */
html { font-size: 0.9375rem; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#avision-dashboard-root,
.demo-dashboard-root {
    font-size: 0.8125rem !important; /* Réduction Master (base 13px) — facteur 0.8 */
}
#avision-dashboard-root {
    width: 100%;
    background-color: #f1f5f9;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #0f172a;
    line-height: 1.3;
    min-height: 100vh;
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --accent: #f59e0b;
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-light: #f8fafc;
    --text-muted: #475569;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --gold: #d97706;
    --gold-bg: #fffbeb;
    --gold-border: #fcd34d;
    --purple: #7c3aed;
    --purple-bg: #f5f3ff;
    --purple-border: #ddd6fe;
    --max-width: 1200px;
}

@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.social-proof-ticker {
    background: #0f172a;
    color: #94a3b8;
    font-size: 0.9rem;
    padding: 0.625rem 0;
    text-align: center;
    border-bottom: 1px solid #1e293b;
}

.social-proof-ticker strong {
    color: #fff;
}

.top-nav {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 1.25rem;
    height: 4.375rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
}
.top-nav .logo.logo-avision-img .avision-header-logo-img,
.top-nav .logo .avision-header-logo-img {
    display: block;
    width: 4.375rem;
    height: 4.375rem;
    object-fit: contain;
    aspect-ratio: 1 / 1;
}

.header-flags {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: rgba(0, 0, 0, 0.03);
    padding: 0.3125rem 0.625rem;
    border-radius: 20px;
}

.header-flag {
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 3px;
    cursor: pointer;
    opacity: 0.4;
    transition: all 0.2s;
    filter: grayscale(100%);
}

.header-flag:hover, .header-flag.active {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.1);
}

.opportunity-banner {
    background: #ef4444;
    color: white;
    text-align: center;
    padding: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
    animation: pulse-red 3s infinite;
}

@keyframes pulse-red {
    0% { background: #ef4444; }
    50% { background: #dc2626; }
    100% { background: #ef4444; }
}

.saas-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 1.5rem 0;
    margin-bottom: -80px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-align: center;
}

.saas-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.header-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.business-info h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin: 15px 0;
    letter-spacing: -1px;
    line-height: 1.1;
    color: white;
}

.certif-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.premium-badge {
    display: inline-block;
    background: linear-gradient(90deg, #fbbf24 0%, #d97706 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto 60px auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.score-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.75rem;
    margin-bottom: 35px;
}

.score-card {
    background: white;
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.score-card h4 {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.circular-chart {
    display: block;
    margin: 10px auto;
    max-width: 180px;
    max-height: 180px;
}

.circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 3.8;
}

.circle {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease, stroke 0.5s ease;
}

.percentage {
    fill: #475569;
    font-family: sans-serif;
    font-weight: 800;
    font-size: 0.35em;
    text-anchor: middle;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
}

.stat-value {
    font-weight: 800;
    color: var(--text-main);
    font-size: 1.1rem;
    text-align: right;
}

.stat-value.bad { color: var(--danger); }
.stat-value.good { color: var(--success); }

.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    margin-bottom: 35px;
    position: relative;
    overflow: hidden;
}

.phase-header {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 35px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
}

.unlock-icon {
    font-size: 3rem;
}

.phase-title {
    color: var(--danger);
    font-weight: 900;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.phase-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.ai-analysis-box {
    background: #f8fafc;
    border-left: 6px solid var(--primary-dark);
    padding: 1.5rem;
    border-radius: 0 10px 10px 0;
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.7;
}

.tag {
    display: inline-block;
    background: white;
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    color: var(--text-main);
    margin: 10px 10px 0 0;
    font-size: 1rem;
}

.level-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 20px;
    background: white;
    overflow: hidden;
    transition: all 0.3s ease;
}

.level-card.active {
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.level-card.locked {
    opacity: 0.8;
    background: #f8fafc;
    cursor: pointer;
}

.level-card.locked:hover {
    opacity: 1;
    border-color: var(--primary);
}

.level-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s;
}

.level-header:hover {
    background: #f8fafc;
}

.level-badge {
    background: var(--text-main);
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.9rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.level-card.active .level-badge {
    background: var(--primary-dark);
}

.level-title {
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--text-main);
}

.level-actions {
    padding: 1.5rem;
}

.level-actions p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.accordion-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.4s ease;
    opacity: 0;
}

.accordion-wrapper.open {
    max-height: 1500px;
    opacity: 1;
}

.chevron {
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
    margin-left: 15px;
}

.chevron.rotate {
    transform: rotate(180deg);
}

.btn-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-outline, .btn-primary, .btn-verify {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    justify-content: center;
}

.btn-outline {
    background: white;
    border: 2px solid var(--border);
    color: var(--text-muted);
}

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

.btn-verify {
    background: var(--text-main);
    color: white;
    margin-left: auto;
    transition: transform 0.1s;
}

.btn-verify:active {
    transform: scale(0.95);
}

.spinner {
    border: 3px solid rgba(37, 99, 235, 0.2);
    border-radius: 50%;
    border-top: 3px solid var(--primary-dark);
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.level-card.gold-level {
    border-color: var(--gold-border);
    background: var(--gold-bg);
}

.level-card.gold-level .level-badge {
    background: var(--gold);
}

.level-card.gold-level .level-title {
    color: #92400e;
}

.club-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 10px;
}

.level-card.purple-level {
    border-color: var(--purple-border);
    background: var(--purple-bg);
}

.level-card.purple-level .level-badge {
    background: var(--purple);
}

.level-card.purple-level .level-title {
    color: #5b21b6;
}

.iceberg-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, rgba(241, 245, 249, 0) 0%, rgba(241, 245, 249, 1) 100%);
    pointer-events: none;
    z-index: 20;
}

.iceberg-text {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 21;
}

.premium-blur {
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
    opacity: 0.6;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(2px);
}

.lock-btn {
    background: #0f172a;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s;
}

.lock-btn:hover {
    transform: scale(1.05);
}

.testimonials-section {
    margin-top: 60px;
    margin-bottom: 40px;
}

.testi-title {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.testi-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.testi-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.testi-avatar {
    width: 40px;
    height: 40px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.testi-name {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
}

.testi-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-style: italic;
}

.testi-result {
    color: var(--success);
    font-weight: 700;
    display: block;
    margin-top: 8px;
    font-size: 0.9rem;
}

.app-footer {
    margin-top: auto;
    background: white;
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
}

.sales-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(5px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}

.sales-modal {
    background: white;
    min-width: 400px;
    max-width: 90vw;
    width: 90%;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.4s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

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

.sales-price {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1;
    margin: 20px 0;
}

.sales-price span {
    font-size: 1.2rem;
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: 500;
    vertical-align: top;
}

.sales-timer {
    background: #fffbeb;
    color: #b45309;
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.sales-check-wrapper {
    background: #f1f5f9;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    text-align: left;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.sales-cta {
    background: #10b981;
    color: white;
    width: 100%;
    padding: 18px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 800;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.sales-cta:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

.sales-cta:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-2px);
}

.close-sales {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
}

.avi-widget-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 4.375rem;
    height: 4.375rem;
    background: var(--primary-dark);
    border-radius: 50%;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
    cursor: pointer;
    z-index: 2000;
    transition: transform 0.2s;
    border: 4px solid white;
    overflow: hidden;
}

.avi-widget-btn:hover {
    transform: scale(1.05);
}

.avi-icon {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.avi-icon .avi-chat-icon-img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 65px;
    height: 65px;
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    display: block;
    margin: 0;
    padding: 0;
}

.avi-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid white;
    color: white;
    font-size: 0.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    transform: scale(0.8);
}

.avi-badge.visible {
    opacity: 1;
    transform: scale(1);
}

/* Bouton chat demo : uniquement l'image AVI (pas de rond bleu ni bord blanc) */
.avi-widget-btn.avi-widget-btn-image-only,
.avi-widget-btn-image-only {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.avi-chat-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 380px;
    height: 500px;
    max-height: 70vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 2100;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.avi-chat-window.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.chat-header {
    padding: 15px 20px;
    background: var(--primary-dark);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
    font-size: 1rem;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.msg {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    max-width: 85%;
    line-height: 1.5;
}

.msg.avi {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.msg.user {
    background: var(--primary-dark);
    color: white;
    align-self: flex-end;
}

.chat-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 25px;
    outline: none;
    background: #f8fafc;
    font-size: 0.95rem;
    font-family: inherit;
}

.chat-send {
    background: var(--primary-dark);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
}

.chat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 10px;
}

.chat-chip {
    background: #e2e8f0;
    color: #0f172a;
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    transition: all 0.2s;
    font-weight: 600;
}

.chat-chip:hover {
    background: #cbd5e1;
    transform: translateY(-1px);
}

.typing-indicator {
    padding: 12px 18px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    width: fit-content;
    margin-bottom: 10px;
    display: none;
    gap: 4px;
    align-items: center;
}

.typing-indicator.active {
    display: flex;
}

.dot {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

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

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

@media (max-width: 900px) {
    .header-content {
        padding: 0 15px;
    }
    
    .business-info h1 {
        font-size: 2rem;
    }
    
    .score-grid {
        grid-template-columns: 1fr;
    }
    
    .avi-chat-window {
        width: 90%;
        left: 5%;
        right: 5%;
        bottom: 100px;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-outline, .btn-primary, .btn-verify {
        width: 100%;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .sales-modal {
        padding: 1.5rem;
        min-width: min(400px, 90vw);
    }
}
