/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Couleurs bleu nuit / violet foncé */
    --bg-primary: #0f0c29;
    --bg-secondary: #1a1638;
    --bg-tertiary: #1a1638;
    --accent-primary: #6366f1;
    --accent-secondary: #818cf8;
    --text-primary: #f3f4f6;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;

    /* Messages */
    --msg-user-bg: #4f46e5;
    --msg-bot-bg: #2d2a54;
    --msg-user-text: #ffffff;
    --msg-bot-text: #f3f4f6;

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* App Container */
#app {
    width: 100%;
    min-height: 100vh;
    position: relative;
}

/* ===========================
   ÉCRAN DE CODE D'ACCÈS
   =========================== */
.access-code-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--spacing-lg);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.access-code-card {
    background: rgba(26, 22, 56, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    padding: var(--spacing-xl);
    max-width: 450px;
    width: 100%;
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

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

.access-code-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    margin-bottom: var(--spacing-lg);
}

.access-code-icon .material-symbols-outlined {
    font-size: 40px;
    color: white;
}

.access-code-card h1 {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.access-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: var(--spacing-xs);
    line-height: 1.6;
}

.access-code-form {
    margin-top: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.access-code-input {
    width: 100%;
    padding: 1rem;
    background: rgba(26, 14, 46, 0.6);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    text-align: center;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: var(--transition-smooth);
}

.access-code-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(26, 14, 46, 0.8);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.access-code-input::placeholder {
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: normal;
}

.access-code-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.access-code-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

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

.access-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm);
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #fca5a5;
    font-size: 0.9rem;
    animation: shake 0.5s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.access-error .material-symbols-outlined {
    font-size: 20px;
}

/* ===========================
   ÉTAT INITIAL : INTRO
   =========================== */
.intro-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--spacing-lg);
    transition: var(--transition-smooth);
}

.intro-container.transitioning {
    opacity: 0;
    transform: translateY(-30px);
}

.persona-container {
    margin-bottom: var(--spacing-xl);
    animation: floatIn 1s ease-out;
}

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

.persona-image {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--accent-primary);
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.4);
    transition: var(--transition-smooth);
}

.persona-image:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 70px rgba(139, 92, 246, 0.6);
}

.start-button {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
    transition: var(--transition-smooth);
    animation: fadeInUp 1s ease-out 0.3s both;
}

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

.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.5);
}

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

/* ===========================
   ÉTAT CHAT
   =========================== */
.chat-container {
    display: flex;
    flex-direction: column;
    width: 60%;
    max-width: 900px;
    margin: 0 auto;
    min-height: 100vh;
    padding: var(--spacing-md);
    transition: var(--transition-smooth);
}

.chat-container.hidden {
    display: none;
}

/* Header du chat */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.5s ease-out;
}

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

.persona-mini {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.persona-mini-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.persona-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.status {
    font-size: 0.875rem;
    color: var(--accent-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

/* Header actions (compteur + bouton clear) */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* Bouton effacer conversation */
.clear-button {
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 0.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-button:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.clear-button:active {
    transform: translateY(0);
}

.clear-button .material-symbols-outlined {
    font-size: 1.5rem;
    transition: margin-right 0.3s ease;
}

.clear-button .clear-text {
    display: none;
    margin-left: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    animation: fadeInText 0.3s ease-out 0.1s forwards;
}

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateX(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.clear-button.expanded {
    width: auto;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transition: all 0.3s ease;
}

.clear-button.expanded:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* Zone de messages */
.messages-container {
    flex: 1;
    background: var(--bg-tertiary);
    padding: var(--spacing-lg);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-height: calc(100vh - 280px);
    animation: fadeIn 0.5s ease-out 0.2s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.messages-container::-webkit-scrollbar {
    width: 8px;
}

.messages-container::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.messages-container::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* Messages */
.message {
    display: flex;
    animation: messageSlideIn 0.4s ease-out;
}

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

.user-message {
    justify-content: flex-end;
}

.bot-message {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 75%;
    padding: var(--spacing-md);
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    word-wrap: break-word;
}

.user-message .message-bubble {
    background: var(--msg-user-bg);
    color: var(--msg-user-text);
    border-bottom-right-radius: 4px;
}

.bot-message .message-bubble {
    background: var(--msg-bot-bg);
    color: var(--msg-bot-text);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.message-bubble p {
    margin: 0;
    line-height: 1.5;
    font-size: 1rem;
}

/* Phone Links (lifestyle services) */
.phone-link {
    display: inline-flex !important;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 6px;
    color: var(--accent-primary) !important;
    text-decoration: none !important;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.phone-link:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.phone-link:active {
    transform: translateY(0);
}

.phone-link .material-symbols-outlined {
    font-size: 1rem;
    animation: pulse-phone 2s ease-in-out infinite;
}

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

/* Contact Card */
.contact-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(124, 58, 237, 0.05) 100%);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: var(--spacing-lg);
    margin: var(--spacing-sm) 0;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15);
}

.contact-card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    color: var(--accent-primary);
}

.contact-card-header span {
    font-size: 1.75rem;
}

.contact-card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.contact-card-text {
    margin: var(--spacing-md) 0;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.contact-card-buttons {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.contact-btn {
    flex: 1;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: var(--spacing-md);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-smooth);
    font-family: inherit;
}

.contact-btn span.material-symbols-outlined {
    font-size: 1.5rem;
}

.email-btn {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    color: white;
}

.email-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.sms-btn {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
}

.sms-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
}

.whatsapp-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Zone de saisie */
.input-wrapper {
    background: var(--bg-secondary);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.5s ease-out 0.3s both;
}

.message-counter {
    padding: 0.4rem 0.75rem;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.input-container {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-md) 0.75rem var(--spacing-md);
}

.powered-by {
    text-align: center;
    padding: 0.5rem var(--spacing-md) 0.75rem var(--spacing-md);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.powered-by a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.powered-by a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

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

#user-input {
    flex: 1;
    padding: var(--spacing-md);
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: 25px;
    outline: none;
    transition: var(--transition-smooth);
}

#user-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

#user-input::placeholder {
    color: var(--text-muted);
}

.send-button {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    transition: var(--transition-smooth);
}

.send-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.6);
}

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

.send-button .material-symbols-outlined {
    font-size: 24px;
}

/* Indicateur de chargement */
.loading-indicator {
    position: fixed;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-out;
}

.loading-indicator.hidden {
    display: none;
}

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

.typing-dots span {
    width: 10px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
}

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

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

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .chat-container {
        width: 95%;
    }

    .persona-image {
        width: 300px;
        height: 300px;
    }

    .message-bubble {
        max-width: 85%;
    }

    .bot-message-content {
        max-width: 85%;
    }

    .start-button {
        font-size: 1rem;
        padding: var(--spacing-sm) var(--spacing-lg);
    }

    .header-actions {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-end;
    }

    .message-counter {
        font-size: 0.75rem;
        padding: 0.35rem 0.65rem;
    }
}

@media (max-width: 480px) {
    .persona-image {
        width: 250px;
        height: 250px;
    }

    .chat-container {
        width: 100%;
        padding: var(--spacing-sm);
    }

    .messages-container {
        max-height: calc(100vh - 240px);
        padding: var(--spacing-sm);
    }

    .message-bubble {
        max-width: 90%;
        padding: var(--spacing-sm);
    }

    .bot-message-content {
        max-width: 90%;
    }

    .powered-by {
        font-size: 0.7rem;
        padding: 0.4rem var(--spacing-sm) 0.6rem var(--spacing-sm);
    }

    .chat-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .persona-info h3 {
        font-size: 1.1rem;
    }
}

/* ===========================
   FORMULAIRES DE DEMANDE
   =========================== */

.request-form-card {
    background: rgba(61, 38, 96, 0.7);
    border: 2px solid var(--accent-primary);
    border-radius: 16px;
    padding: var(--spacing-md);
    margin-top: var(--spacing-sm);
    width: 100%;
    max-width: 100%;
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.3);
    animation: formSlideIn 0.5s ease-out;
}

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

.form-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
    color: var(--accent-secondary);
}

.form-header span {
    font-size: 1.75rem;
}

.form-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.request-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm) var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Champs qui prennent toute la largeur */
.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.form-group .required {
    color: #ef4444;
    font-weight: 700;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    background: rgba(26, 14, 46, 0.6);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b5cf6' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.form-group select option {
    background: rgba(26, 14, 46, 0.95);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 50px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-message {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm);
    background: rgba(139, 92, 246, 0.1);
    border-left: 3px solid var(--accent-primary);
    border-radius: 4px;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
}

.photo-upload {
    width: 100%;
    padding: 0.75rem;
    background: rgba(26, 14, 46, 0.6);
    border: 2px dashed rgba(139, 92, 246, 0.4);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.95rem;
}

.photo-upload:hover {
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.1);
}

.photo-upload::-webkit-file-upload-button {
    padding: 0.5rem 1rem;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.photo-upload::-webkit-file-upload-button:hover {
    background: var(--accent-secondary);
}

.photo-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.photo-preview {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(26, 14, 46, 0.6);
    border: 2px solid rgba(139, 92, 246, 0.3);
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview small {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.25rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.75rem;
    text-align: center;
}

.remove-photo {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 28px;
    height: 28px;
    padding: 0;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    z-index: 10;
}

.remove-photo:hover {
    background: rgba(220, 38, 38, 1);
    transform: scale(1.1);
}

.remove-photo .material-symbols-outlined {
    font-size: 18px;
}

.checkbox-group {
    margin-top: var(--spacing-sm);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem var(--spacing-md);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    font-family: inherit;
    margin-top: var(--spacing-sm);
}

.submit-btn.full-width {
    grid-column: 1 / -1;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.submit-btn .material-symbols-outlined {
    font-size: 1.25rem;
}

.submit-btn .spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.success-message {
    text-align: center;
    padding: var(--spacing-lg);
    animation: successPulse 0.6s ease-out;
    grid-column: 1 / -1;
}

@keyframes successPulse {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-message .material-symbols-outlined {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: var(--spacing-md);
}

.success-message h3 {
    margin: 0 0 var(--spacing-sm) 0;
    font-size: 1.5rem;
    color: var(--accent-secondary);
}

.success-message p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
}

/* Responsive pour les formulaires */
@media (max-width: 768px) {
    .request-form {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .form-group.full-width {
        grid-column: 1;
    }

    .submit-btn.full-width {
        grid-column: 1;
    }
}

@media (max-width: 480px) {
    .request-form-card {
        padding: var(--spacing-sm);
    }

    .form-header {
        margin-bottom: var(--spacing-sm);
    }

    .form-header h3 {
        font-size: 1.1rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .submit-btn {
        font-size: 0.9rem;
        padding: 0.75rem var(--spacing-sm);
    }

    .success-message h3 {
        font-size: 1.25rem;
    }

    .success-message .material-symbols-outlined {
        font-size: 3rem;
    }
}

/* ========================================
   SYSTÈME BETTER ANSWER (FEEDBACK)
   ======================================== */

/* Wrapper pour la bulle + bouton Better Answer */
.bot-message-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    max-width: 75%;
}

/* Bouton Better Answer sous chaque message bot */
.better-answer-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    color: var(--accent-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.better-answer-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-1px);
}

.better-answer-btn .material-symbols-outlined {
    font-size: 1.1rem;
}

/* Modal de feedback */
.feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.feedback-modal.hidden {
    display: none;
}

.feedback-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.feedback-modal-content {
    position: relative;
    background: var(--bg-primary);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10001;
}

.feedback-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.feedback-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.close-modal-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.close-modal-btn .material-symbols-outlined {
    font-size: 1.5rem;
}

.feedback-modal-body {
    padding: 1.5rem;
}

.feedback-question-preview,
.feedback-answer-preview {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.feedback-question-preview strong,
.feedback-answer-preview strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.feedback-question-preview p {
    margin: 0;
    color: var(--text-secondary);
}

.feedback-answer-preview div {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.feedback-rating-group {
    margin-bottom: 1.5rem;
}

.feedback-rating-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
}

.feedback-stars {
    display: flex;
    gap: 0.5rem;
}

.feedback-star {
    font-size: 2rem;
    color: var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.feedback-star:hover,
.feedback-star.hover {
    color: #fbbf24;
    transform: scale(1.1);
}

.feedback-star.active {
    color: #fbbf24;
}

.feedback-criteria-group {
    margin-bottom: 1.5rem;
}

.feedback-criteria-group > label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
}

.feedback-criterion {
    margin-bottom: 0.5rem;
}

.feedback-criterion label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-criterion label:hover {
    background: var(--bg-secondary);
}

.feedback-criterion input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

.feedback-criterion span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.feedback-comments-group,
.feedback-ideal-group {
    margin-bottom: 1.5rem;
}

.feedback-comments-group label,
.feedback-ideal-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
}

.feedback-comments-group textarea,
.feedback-ideal-group textarea {
    width: 100%;
    padding: 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 100px;
}

.feedback-comments-group textarea:focus,
.feedback-ideal-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.feedback-modal-footer {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    justify-content: flex-end;
}

.feedback-modal-footer .btn-secondary {
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-modal-footer .btn-secondary:hover {
    background: var(--bg-hover);
}

.feedback-modal-footer .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--accent-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-modal-footer .btn-primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
}

.feedback-modal-footer .btn-primary .material-symbols-outlined {
    font-size: 1.1rem;
}

/* Responsive pour la modal */
@media (max-width: 768px) {
    .feedback-modal-content {
        max-height: 95vh;
    }

    .feedback-modal-header h2 {
        font-size: 1.25rem;
    }

    .feedback-modal-body {
        padding: 1rem;
    }

    .feedback-modal-footer {
        padding: 1rem;
        flex-direction: column;
    }

    .feedback-modal-footer .btn-secondary,
    .feedback-modal-footer .btn-primary {
        width: 100%;
        justify-content: center;
    }
}
