/* === COULEURS ETS === */
:root {
    /* Primary - Rouge ETS */
    --red-ets: #E2231A;
    --red-dark: #B01A13;
    --red-light: #F45A4F;

    /* Secondary - Bleu IA */
    --blue-ai: #1B4F72;
    --blue-light: #5DADE2;
    --blue-accent: #2E86C1;

    /* Neutrals */
    --black: #1A1A1A;
    --grey-dark: #2E2E2E;
    --grey: #7A7A7A;
    --grey-light: #F2F2F2;
    --white: #FFFFFF;

    /* Status */
    --success: #2ECC71;
    --info: #3498DB;
    --warning: #E67E22;
    --error: #C0392B;

    /* Providers */
    --anthropic: #D35400;
    --openai: #00A896;
    --gemini: #3A0CA3;
    --ollama: #5F5F5F;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--grey-light);
    color: var(--black);
    line-height: 1.6;
}

/* === HEADER === */
header {
    background: linear-gradient(135deg, var(--red-ets), var(--red-dark));
    color: var(--white);
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
}

.logo-section h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-section p {
    font-size: 0.8rem;
    opacity: 0.9;
}

.status-section {
    text-align: right;
}

#agent-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* === HERO SECTION === */
.hero {
    background: linear-gradient(135deg, var(--blue-ai), var(--blue-accent));
    color: var(--white);
    padding: 8rem 2rem 4rem;
    margin-top: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
    z-index: 1;
}

.hero-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.btn-hero {
    background: var(--red-ets);
    color: var(--white);
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-hero:hover {
    background: var(--red-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero-visual {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 300px;
}

.ai-animation {
    position: relative;
    width: 100%;
    height: 100%;
}

.node {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    animation: float 3s ease-in-out infinite;
}

.node-1 { top: 10%; left: 20%; animation-delay: 0s; }
.node-2 { top: 30%; right: 10%; animation-delay: 0.5s; }
.node-3 { bottom: 20%; left: 30%; animation-delay: 1s; }
.node-4 { bottom: 10%; right: 20%; animation-delay: 1.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* === MAIN CONTAINER === */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* === SECTIONS === */
.section {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--grey-light);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--blue-ai);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-badge {
    background: var(--blue-light);
    color: var(--white);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

.section-main-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--blue-ai);
    text-align: center;
    margin-bottom: 2rem;
}

/* === FEATURES === */
.features-section {
    padding: 4rem 0;
}

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

.feature-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--black);
}

.feature-card p {
    color: var(--grey);
    font-size: 0.95rem;
}

/* === DEMO SECTION === */
.demo-section {
    background: linear-gradient(135deg, var(--white), #f8fafc);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.demo-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 2px solid var(--grey-light);
}

.demo-card h3 {
    color: var(--blue-ai);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

textarea {
    width: 100%;
    min-height: 180px;
    padding: 1rem;
    border: 2px solid var(--grey-light);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 1rem;
}

textarea:focus {
    outline: none;
    border-color: var(--blue-accent);
    box-shadow: 0 0 0 4px rgba(46, 134, 193, 0.1);
}

.provider-select {
    margin-bottom: 1rem;
}

.provider-select label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--grey-dark);
}

select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--grey-light);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--white);
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: var(--blue-accent);
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--red-ets), var(--red-dark));
    color: var(--white);
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(226, 35, 26, 0.4);
}

.btn-secondary {
    background: var(--blue-ai);
    color: var(--white);
    width: 100%;
    margin-top: 1rem;
}

.btn-secondary:hover {
    background: var(--blue-accent);
}

/* === PROJECT INFO === */
.project-info {
    background: var(--grey-light);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.info-row {
    display: flex;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.info-label {
    font-weight: 600;
    color: var(--blue-ai);
    min-width: 100px;
    margin-right: 0.5rem;
}

.info-value {
    color: var(--grey-dark);
    flex: 1;
}

.tag {
    display: inline-block;
    background: var(--blue-accent);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    margin: 0.15rem;
}

/* === PROGRESS === */
.progress-container {
    display: none;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 12px;
}

.progress-container.active {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--grey-light);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--red-ets), var(--blue-accent));
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    text-align: center;
    margin-top: 0.75rem;
    color: var(--grey);
    font-size: 0.9rem;
}

/* === RESULTS === */
.results-title {
    font-size: 1.5rem;
    color: var(--blue-ai);
    margin: 2rem 0 1.5rem;
    text-align: center;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.result-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-left: 4px solid var(--blue-accent);
    transition: transform 0.2s;
}

.result-card:hover {
    transform: translateY(-3px);
}

.result-card.top-1 {
    border-left-color: #FFD700;
    background: linear-gradient(135deg, #fffef5, var(--white));
}

.result-card.top-2 {
    border-left-color: #C0C0C0;
}

.result-card.top-3 {
    border-left-color: #CD7F32;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.result-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--grey);
}

.result-card.top-1 .result-rank { color: #FFD700; }
.result-card.top-2 .result-rank { color: #C0C0C0; }
.result-card.top-3 .result-rank { color: #CD7F32; }

.result-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--black);
}

.score-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
}

.score-high {
    background: #d4edda;
    color: #155724;
}

.score-medium {
    background: #fff3cd;
    color: #856404;
}

.score-low {
    background: #f8d7da;
    color: #721c24;
}

.result-role {
    color: var(--blue-accent);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.result-expertises {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.expertise-tag {
    background: var(--grey-light);
    color: var(--grey-dark);
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.7rem;
}

/* === PROVIDERS SECTION === */
.providers-section {
    padding: 4rem 0;
}

.providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.provider-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s;
    border-top: 4px solid transparent;
}

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

.provider-anthropic { border-top-color: var(--anthropic); }
.provider-openai { border-top-color: var(--openai); }
.provider-gemini { border-top-color: var(--gemini); }
.provider-ollama { border-top-color: var(--ollama); }

.provider-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.provider-anthropic .provider-logo { background: var(--anthropic); color: white; }
.provider-openai .provider-logo { background: var(--openai); color: white; }
.provider-gemini .provider-logo { background: var(--gemini); color: white; }
.provider-ollama .provider-logo { background: var(--ollama); color: white; }

.provider-card h4 {
    margin-bottom: 0.5rem;
    color: var(--black);
}

.provider-card p {
    color: var(--grey);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.provider-price {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--grey-light);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
}

.provider-free {
    background: var(--success);
    color: white;
}

/* === ABOUT SECTION === */
.about-section {
    background: var(--blue-ai);
    color: var(--white);
    border-radius: 20px;
    padding: 3rem;
    margin: 2rem 0;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.about-logo img {
    max-width: 200px;
    filter: brightness(0) invert(1);
}

.about-text h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.about-text p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.about-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-stats {
        justify-content: center;
    }
}

/* === FOOTER === */
footer {
    background: var(--grey-dark);
    color: var(--white);
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--red-light);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.footer-section p {
    opacity: 0.8;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.6;
    font-size: 0.85rem;
}

/* === TOAST === */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--black);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--error); }
.toast.info { background: var(--blue-accent); }

/* === CHATBOT WIDGET === */
.chatbot-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red-ets), var(--red-dark));
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(226, 35, 26, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    position: relative;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(226, 35, 26, 0.5);
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--blue-accent);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-height: 550px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chatbot-window.open {
    display: flex;
}

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

.chatbot-header {
    background: linear-gradient(135deg, var(--blue-ai), var(--blue-accent));
    color: white;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.chatbot-status {
    font-size: 0.75rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.chatbot-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
}

.chatbot-close {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: background 0.2s;
}

.chatbot-close:hover {
    background: rgba(255,255,255,0.3);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f8fafc;
    max-height: 320px;
    min-height: 200px;
}

.chat-message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease;
}

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

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--blue-ai);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: var(--red-ets);
    order: 2;
}

.user-message {
    flex-direction: row-reverse;
}

.message-content {
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    max-width: 80%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.user-message .message-content {
    background: var(--red-ets);
    color: white;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 4px;
}

.message-content p {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
    font-size: 0.85rem;
}

.message-content li {
    margin-bottom: 0.25rem;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.5rem;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--grey);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(-5px); opacity: 1; }
}

.chatbot-input-area {
    padding: 1rem;
    background: white;
    border-top: 1px solid var(--grey-light);
}

.quick-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.quick-btn {
    background: var(--grey-light);
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--grey-dark);
}

.quick-btn:hover {
    background: var(--blue-light);
    color: white;
}

.chatbot-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.chatbot-input-wrapper input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--grey-light);
    border-radius: 25px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input-wrapper input:focus {
    border-color: var(--blue-accent);
}

.chatbot-send {
    width: 44px;
    height: 44px;
    background: var(--red-ets);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s;
}

.chatbot-send:hover {
    background: var(--red-dark);
    transform: scale(1.05);
}

/* Responsive chatbot */
@media (max-width: 480px) {
    .chatbot-container {
        bottom: 1rem;
        right: 1rem;
    }

    .chatbot-window {
        width: calc(100vw - 2rem);
        max-height: 70vh;
        bottom: 70px;
        right: 0;
    }

    .chatbot-toggle {
        width: 55px;
        height: 55px;
    }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    header {
        padding: 0.75rem 1rem;
    }

    .logo-section h1 {
        font-size: 1.2rem;
    }

    .hero {
        padding: 6rem 1rem 3rem;
        text-align: center;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .hero-visual {
        display: none;
    }

    .container {
        padding: 1rem;
    }

    .feature-card {
        padding: 1.5rem;
    }
}
