/* ===============================================
   Variables CSS
   =============================================== */
:root {
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary-color: #059669;
    --accent-color: #dc2626;
    
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-alt: #f3f4f6;
    
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===============================================
   Reset et Base
   =============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===============================================
   Navigation
   =============================================== */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-brand i {
    font-size: 1.75rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* ===============================================
   Hero Section
   =============================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4.2rem 0; /* reduced ~30% from 6rem */
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)" /></svg>');
    opacity: 0.3;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* ===============================================
   Buttons
   =============================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    opacity: 0.9;
}

/* ===============================================
   Sections
   =============================================== */
.section {
    padding: 5rem 0;
}

.section-alt {
    background-color: var(--bg-secondary);
}

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

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

/* ===============================================
   Tools Grid
   =============================================== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.tool-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.tool-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: white;
}

.tool-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.tool-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* ===============================================
   About Section
   =============================================== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content > p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

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

.feature {
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.feature:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.feature i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature p {
    color: var(--text-secondary);
}

/* ===============================================
   Footer
   =============================================== */
.footer {
    background-color: var(--text-primary);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 5rem;
}

/* ===============================================
   Modal
   =============================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 5% auto;
    padding: 2rem;
    border-radius: var(--radius-xl);
    max-width: 600px;
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.3s ease;
    position: relative;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    color: var(--text-secondary);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--text-primary);
}

.modal-content h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.instructions {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary-color);
}

.instructions li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.instructions code {
    background-color: var(--bg-alt);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* ===============================================
   Tool Container (pour les pages d'outils)
   =============================================== */
.tool-container {
    max-width: 900px;
    margin: 3rem auto;
    padding: 2rem;
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-header h1 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.tool-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.tool-content {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

/* ===============================================
   Styles communs pour tous les outils
   =============================================== */

/* Wrapper de contenu */
.content-wrapper {
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header avec titre centré */
.header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 30px;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.header-container h1 {
    margin: 0;
    font-weight: bold;
    color: #333;
    position: relative;
    z-index: 2;
    font-size: 2.5rem;
}

.header-container img {
    height: 112px; /* doubled from 56px */
    width: auto;
    position: relative;
    top: -1px;
    z-index: 2;
}

/* Chevauchement texte/logo pour le générateur de visio */
.header-container h1:first-child {
    margin-right: -10px;
}

.header-container h1:last-child {
    margin-left: -10px;
}

/* Calculatrice */
.calculator {
    max-width: 400px;
    margin: 0 auto;
}

.calculator-display {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    text-align: right;
    font-size: 2.5rem;
    font-weight: 700;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    word-wrap: break-word;
    box-shadow: var(--shadow-md);
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.calc-btn {
    padding: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--border-color);
}

.calc-btn:hover {
    background: var(--bg-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.calc-btn:active {
    transform: translateY(0);
}

.calc-btn.operator {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
    color: white;
    border: none;
}

.calc-btn.operator:hover {
    opacity: 0.9;
}

.calc-btn.equals {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: white;
    border: none;
}

.calc-btn.clear {
    background: #ef4444;
    color: white;
    border: none;
}

.calc-btn.clear:hover {
    background: #dc2626;
}

.calc-btn.zero {
    grid-column: span 2;
}

/* Générateur de mot de passe */
.password-generator {
    max-width: 700px;
    margin: 0 auto;
}

.password-display-box {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.password-text {
    font-size: 1.5rem;
    font-weight: 700;
    min-height: 40px;
    word-wrap: break-word;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    letter-spacing: 0.05em;
}

.password-hidden {
    letter-spacing: 0.3em;
}

.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.options-panel {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    margin-top: 2rem;
    box-shadow: var(--shadow-sm);
}

.options-panel.hidden {
    display: none;
}

.options-panel h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #10b981;
}

.alert.hidden {
    display: none;
}

.instructions {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    margin-top: 2rem;
}

.instructions h3 {
    margin-top: 0;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.instructions ul {
    margin: 0;
    padding-left: 1.5rem;
}

.instructions li {
    margin-bottom: 0.5rem;
}

/* Test de mot de passe */
.card {
    max-width: 720px;
    margin: 0 auto;
    background: #ffffff;
    padding: 25px;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
    transition: box-shadow .18s ease, transform .12s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(15,15,30,.08);
}

.card label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.card input[type=password] {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #dfe4ee;
    border-radius: 6px;
    box-sizing: border-box;
}

.card .row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.card button {
    padding: 8px 12px;
    border-radius: 6px;
    border: 0;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.card button:hover {
    background: #1d4ed8;
}

.result {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    background: #f3f6ff;
}

.badge {
    display: inline-block;
    padding: 6px 8px;
    border-radius: 6px;
    font-weight: 700;
}

.green {
    background: #e6ffed;
    color: #046c2b;
}

.orange {
    background: #fff4e6;
    color: #7a4a00;
}

.red {
    background: #ffecee;
    color: #8b1b1b;
}

.card table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.card th, 
.card td {
    padding: 6px 8px;
    border: 1px solid #eef2f7;
    text-align: center;
    font-size: 14px;
}

.card th {
    background: #f8fafc;
}

.small {
    font-size: 13px;
    color: #556;
}

.note {
    margin-top: 12px;
    font-size: 13px;
    color: #444;
}

.masked {
    font-family: monospace;
    padding: 1px 6px;
    border-radius: 4px;
    background: #eef3ff;
}

.meter {
    width: 100%;
    height: 12px;
    background: #e9eef8;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}

.meter > div {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff6b6b, #ffd166, #60c78f);
    transition: width .4s ease;
}

#loadStatus {
    font-size: 13px;
    color: #607085;
    align-self: center;
}

/* Générateur de visio */
.container-custom { 
    max-width: 100%; 
    margin: auto; 
    background: #ffffff; 
    padding: 25px; 
    border-radius: 6px; 
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.visio-row { 
    display: grid; 
    grid-template-columns: 1.5fr 1.5fr 0.8fr 0.6fr 0.8fr 40px 40px; 
    gap: 10px; 
    margin-bottom: 10px; 
    align-items: center; 
}

.btn-action {
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: none;
    color: white;
    font-size: 24px;
    font-weight: bold;
    transition: opacity 0.2s;
    cursor: pointer;
    line-height: 1;
}

.btn-action:hover {
    opacity: 0.8;
}

.btn-add-row {
    background-color: #f0ad4e;
}

.btn-remove {
    background-color: #d9534f;
}

.actions { 
    display: flex; 
    justify-content: space-between; 
    margin: 20px 0; 
    align-items: center; 
}

.mail-wrapper { 
    position: relative; 
    margin-top: 25px; 
}

.mail-preview { 
    padding: 15px; 
    padding-bottom: 60px; 
    background: #fafafa; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    min-height: 100px; 
}

#btnCopy { 
    position: absolute; 
    bottom: 15px; 
    right: 15px; 
    display: none; 
}

.copied { 
    color: green; 
    font-weight: bold; 
    margin-top: 10px; 
    display: none; 
    text-align: right; 
}

.qr-container { 
    text-align: center; 
    margin-top: 10px; 
    padding: 10px; 
    background: white; 
    border: 1px solid #ccc; 
    display: inline-block; 
}

.switch { 
    position: relative; 
    display: inline-block; 
    width: 45px; 
    height: 20px; 
    vertical-align: middle; 
    margin-right: 8px; 
}

.switch input { 
    opacity: 0; 
    width: 0; 
    height: 0; 
}

.slider { 
    position: absolute; 
    cursor: pointer; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    background-color: #ccc; 
    transition: .4s; 
    border-radius: 20px; 
}

.slider:before { 
    position: absolute; 
    content: ""; 
    height: 14px; 
    width: 14px; 
    left: 3px; 
    bottom: 3px; 
    background-color: white; 
    transition: .4s; 
    border-radius: 50%; 
}

input:checked + .slider { 
    background-color: #f0ad4e; 
}

input:checked + .slider:before { 
    transform: translateX(25px); 
}

.toggle-label { 
    font-size: 13px; 
    font-weight: bold; 
    color: #555; 
}

.preview-row { 
    background-color: #fcf8e3 !important; 
}

.preview-content {
    padding: 15px;
    border: 1px dashed #f0ad4e;
    margin: 10px 0;
    font-family: sans-serif;
    text-align: left;
    background: #fff;
    line-height: 1.4;
}

#linksTableBody td button {
    background: #f7f9fb;
    color: #2b2f33;
    border: 1px solid #d6dde3;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1;
    box-shadow: none;
    margin-right: 6px;
}

#linksTableBody td button.btn-download {
    background: #eef6ff;
    border-color: #c8ddfb;
    color: #0b3d91;
}

#linksTableBody td button.btn-warning,
#linksTableBody td button.btn-default,
#linksTableBody td button.btn-xs {
    background: #f7f9fb;
    color: #2b2f33;
    border-color: #d6dde3;
}

#linksTableBody td button:hover {
    transform: translateY(-1px);
    opacity: 0.98;
}

/* ===============================================
   Animations
   =============================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* ===============================================
   Responsive
   =============================================== */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 4rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section {
        padding: 3rem 0;
    }
}

/* ===============================================
   Widget de Chat EVE
   =============================================== */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Bouton de chat flottant */
.chat-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    border: 3px solid white;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 30px -5px rgba(30, 64, 175, 0.4);
}

.chat-robot-icon {
    width: 45px;
    height: 45px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.chat-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Fenêtre de chat */
.chat-window {
    position: absolute;
    bottom: 90px;
    right: 0;
    width: 380px;
    height: 550px;
    background-color: white;
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chat-window.active {
    display: flex;
}

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

/* En-tête du chat */
.chat-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chat-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: white;
    padding: 5px;
    object-fit: contain;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.chat-status {
    font-size: 0.85rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

.chat-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.chat-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Zone de messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.chat-message {
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

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

.chat-message-bot {
    align-self: flex-start;
}

.chat-message-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: contain;
    background-color: white;
    padding: 5px;
    box-shadow: var(--shadow-sm);
}

.message-content {
    max-width: 75%;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-wrap: break-word;
}

.chat-message-bot .message-content p {
    background-color: white;
    color: var(--text-primary);
    padding: 0.8rem 1rem;
    border-radius: 1rem 1rem 1rem 0.3rem;
    box-shadow: var(--shadow-sm);
    margin: 0;
    line-height: 1.5;
    min-width: fit-content;
}

.chat-message-user .message-content p {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 0.8rem 1rem;
    border-radius: 1rem 1rem 0.3rem 1rem;
    box-shadow: var(--shadow-sm);
    margin: 0;
    line-height: 1.5;
    min-width: fit-content;
    white-space: normal;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-light);
    padding: 0 0.5rem;
}

.chat-message-user .message-time {
    text-align: right;
}

/* Zone de saisie */
.chat-input-container {
    display: flex;
    gap: 10px;
    padding: 1rem;
    background-color: white;
    border-top: 1px solid var(--border-color);
}

.chat-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: var(--primary-color);
}

.chat-send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-md);
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

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

/* Liens d'outils dans le chat */
.chat-tool-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin: 4px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.chat-tool-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
}

.chat-tool-link i {
    font-size: 16px;
}

.message-content a {
    display: block;
    margin-top: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .chat-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 150px);
        max-height: 600px;
    }
    
    .chat-button {
        width: 60px;
        height: 60px;
    }
    
    .chat-robot-icon {
        width: 38px;
        height: 38px;
    }
}
