/* IA Thérapeutique - Styles CSS */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    margin: 20px 0;
    padding: 50px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 100%;
    animation: gradientMove 3s ease infinite;
}

.header h1 {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    animation: fadeInUp 1s ease-out;
}

.header .subtitle {
    font-size: 1.4rem;
    color: #4a5568;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.header .description {
    font-size: 1.1rem;
    color: #718096;
    max-width: 600px;
    margin: 0 auto 30px;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.benefit-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.benefit-card:hover::before {
    left: 100%;
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.benefit-card h3 {
    color: #2d3748;
    margin-bottom: 10px;
    font-weight: 700;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.consultation-form, .user-registration {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h2 {
    font-size: 2.2rem;
    color: #2d3748;
    margin-bottom: 10px;
    font-weight: 800;
}

.form-header p {
    color: #718096;
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
    font-size: 1rem;
}

.required {
    color: #e53e3e;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f7fafc;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-control.textarea {
    min-height: 120px;
    resize: vertical;
}

.btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 18px 35px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.btn:active {
    transform: translateY(-1px);
}

.btn.secondary {
    background: linear-gradient(135deg, #48bb78, #38a169);
    margin-top: 15px;
}

.chat-interface {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: none;
}

.chat-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.chat-messages {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
}

.message {
    margin-bottom: 20px;
    padding: 15px 20px;
    border-radius: 20px;
    max-width: 80%;
    animation: messageSlide 0.5s ease-out;
}

.message.user {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.message.ai {
    background: white;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-input {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.message-input input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.message-input input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.send-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.user-info {
    background: rgba(240, 249, 255, 0.8);
    border: 1px solid #bee3f8;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
}

.user-info h4 {
    color: #2b6cb0;
    margin-bottom: 10px;
    font-weight: 600;
}

.emergency-contact {
    background: rgba(254, 235, 235, 0.9);
    border: 1px solid #feb2b2;
    border-left: 4px solid #f56565;
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
}

.emergency-contact h4 {
    color: #c53030;
    margin-bottom: 10px;
    font-weight: 600;
}

.emergency-contact p {
    color: #744210;
    margin-bottom: 10px;
}

.emergency-numbers {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.emergency-number {
    background: #c53030;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.emergency-number:hover {
    background: #9b2c2c;
    transform: scale(1.05);
}

.loading {
    display: none;
    text-align: center;
    color: #667eea;
    font-weight: 600;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

.success-message {
    background: rgba(236, 253, 245, 0.9);
    border: 1px solid #9ae6b4;
    color: #22543d;
    padding: 15px 20px;
    border-radius: 12px;
    margin: 15px 0;
    display: none;
}

.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

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

@keyframes gradientMove {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
    
    .benefits {
        grid-template-columns: 1fr;
    }
    
    .emergency-numbers {
        flex-direction: column;
    }
    
    .header {
        padding: 30px 20px;
    }
    
    .consultation-form, .user-registration {
        padding: 25px;
    }
    
    .message-input {
        flex-direction: column;
    }
    
    .send-btn {
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .benefit-card {
        padding: 20px;
    }
    
    .form-control {
        padding: 12px 16px;
    }
    
    .btn {
        padding: 15px 25px;
    }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    }
    
    .header, .consultation-form, .user-registration, .chat-interface, .footer {
        background: rgba(45, 55, 72, 0.95);
        color: #e2e8f0;
    }
    
    .form-control {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .form-control:focus {
        background: #1a202c;
    }
}