/* Styles pour l'application Générateur de Diapositives IA */

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    background: #f8f9fb;
    height: 100vh;
    overflow: hidden;
    color: #1a1a1a;
    margin: 0;
    padding: 0;
    font-size: 16px;
}

/* Layout principal */
.app-wrapper {
    width: 100vw;
    height: 100vh;
    background: #f8f9fb;
    overflow: hidden;
    transform-origin: top left;
}

.app-container {
    display: flex;
    height: 100%;
    background: #f8f9fb;
    overflow: hidden;
}

/* Panel gauche */
.left-panel {
    width: 620px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 2px 0 8px rgba(0,0,0,0.03);
    flex-shrink: 0;
}

.app-header {
    background: #ffffff;
    padding: 0;
    border-bottom: 1px solid #e5e7eb;
    height: 56px;
    display: flex;
    align-items: center;
}

.page-header-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    width: 100%;
    height: 100%;
}

.page-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-header-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-header-icon svg {
    width: 18px;
    height: 18px;
    color: white;
}

.page-header-label {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.page-header-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #dbeafe;
    padding: 4px 12px;
    font-weight: 600;
    font-size: 13px;
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

/* Chat */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #ffffff;
}

.chat-message {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    transition: opacity 0.3s ease;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.user-message {
    align-items: flex-end;
}

.user-message .message-container {
    flex-direction: column;
    align-items: flex-end;
}

.message-avatar {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    flex-shrink: 0;
    overflow: hidden;
}

.user-message .message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar-bg {
    background: #9ca3af;
    border-color: #9ca3af;
    color: white;
}

.user-avatar-bg svg {
    width: 16px;
    height: 16px;
}

.ai-avatar {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #1a1a1a;
}

.message-avatar svg {
    width: 16px;
    height: 16px;
}

.message-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.user-message .message-content-wrapper {
    background: #f3f4f6;
    padding: 12px;
    border-radius: 12px;
    max-width: 576px;
    width: auto;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0px;
}

.user-message .message-header {
    justify-content: flex-start;
}

.message-author {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
}

.message-content {
    max-width: 100%;
    color: #1a1a1a;
    line-height: 1.6;
    font-size: 15px;
}

.user-message .message-content {
    margin-left: 16px;
    color: #1a1a1a;
}

.ai-message .message-content {
    max-width: none;
}

.message-text {
    margin: 0;
    line-height: 1.6;
}

.user-message .message-author {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
}

.message-image {
    margin: 8px 0;
}

.user-message .message-image {
    margin: 8px 0;
}

.user-message .message-image + .message-text {
    margin-top: 8px;
}

.chat-uploaded-image {
    max-width: 400px;
    max-height: 300px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    object-fit: cover;
    transition: all 0.3s ease;
    cursor: pointer;
}

.chat-uploaded-image:hover {
    transform: scale(1.02);
    border-color: #3b82f6;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

/* Popup image */
.image-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.image-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.image-popup-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.image-popup-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.image-popup-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.image-popup-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* Messages de processus */
.process-message {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    transition: opacity 0.3s ease;
    animation: fadeIn 0.3s ease;
}

.process-message .message-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.process-message .message-content {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 16px;
    max-width: 100%;
}

.process-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.process-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
}

.process-title {
    font-weight: 600;
    color: #1e40af;
    font-size: 0.95rem;
    flex: 1;
}

.process-status {
    font-size: 0.8rem;
    color: #3b82f6;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Thinking box */
.thinking-box {
    background: #f9fafb !important;
    border-radius: 8px !important;
    margin-top: 4px !important;
    margin-bottom: 4px !important;
    font-size: 0.8rem !important;
    color: #4b5563;
    line-height: 1.3 !important;
    border-left: 2px solid #3b82f6 !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.thinking-header {
    padding: 4px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #eff6ff;
    border-radius: 6px;
    margin-bottom: 0;
    transition: background-color 0.2s ease;
}

.thinking-header:hover {
    background: #dbeafe;
}

.thinking-toggle {
    font-size: 0.7rem;
    color: #3b82f6;
    transition: transform 0.3s ease;
    user-select: none;
}

.thinking-toggle.expanded {
    transform: rotate(180deg);
}

.thinking-content-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.thinking-content-wrapper.expanded {
    max-height: 200px;
    overflow-y: auto;
}

.thinking-label {
    font-size: 0.7rem !important;
    color: #3b82f6;
    margin-bottom: 2px !important;
    margin-top: 0 !important;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px !important;
}

.thinking-content {
    margin-top: 2px !important;
    margin-bottom: 0 !important;
    position: relative;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.thinking-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: #3b82f6;
    animation: blink 1s infinite;
    margin-left: 2px;
    vertical-align: text-bottom;
}

.process-message .thinking-box {
    margin: 4px 0 !important;
    font-size: 0.8rem !important;
    line-height: 1.3 !important;
    overflow: hidden;
    transition: all 0.3s ease;
}

.process-message .thinking-header {
    padding: 4px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #eff6ff;
    border-radius: 6px;
    margin-bottom: 0;
    transition: background-color 0.2s ease;
}

.process-message .thinking-header:hover {
    background: #dbeafe;
}

.process-message .thinking-label {
    font-size: 0.7rem !important;
    margin-bottom: 0 !important;
    gap: 3px !important;
    display: flex;
    align-items: center;
}

.process-message .thinking-toggle {
    font-size: 0.7rem;
    color: #3b82f6;
    transition: transform 0.3s ease;
    user-select: none;
}

.process-message .thinking-toggle.expanded {
    transform: rotate(180deg);
}

.process-message .thinking-content-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.process-message .thinking-content-wrapper.expanded {
    max-height: 200px;
    overflow-y: auto;
}

.process-message .thinking-content {
    margin: 0 !important;
    padding: 6px 8px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.thinking-loader {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.sub-progress {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #60a5fa;
    padding-left: 20px;
}

/* Barre de progression inline */
.inline-progress {
    margin-top: 12px;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 12px;
}

.inline-progress-bar {
    background: #e5e7eb;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.inline-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    transition: width 0.3s ease;
    border-radius: 3px;
}

.inline-progress-text {
    font-size: 0.85rem;
    color: #6b7280;
    text-align: center;
}

/* Styles pour l'analyse de l'image */
.analysis-message {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    transition: opacity 0.3s ease;
    animation: fadeIn 0.3s ease;
}

.analysis-message .message-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.analysis-message .message-content {
    max-width: none;
}

/* Container principal avec effet rainbow moderne */
.analysis-container {
    position: relative;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-radius: 16px;
    padding: 24px;
    margin-top: 12px;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0,0,0,0.3),
        inset 0 1px 0 0 rgba(255,255,255,0.1);
}

.analysis-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        oklch(65.6% .241 354.308) 0%,
        oklch(62.7% .265 303.9) 25%,
        oklch(54.6% .245 262.881) 50%,
        oklch(70.7% .165 254.624) 75%,
        oklch(80.9% .105 251.813) 100%
    );
    opacity: 0.03;
    z-index: 0;
}

.analysis-container > * {
    position: relative;
    z-index: 1;
}

.analysis-narrative {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.analysis-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    color: #9ca3af;
}

.analysis-text {
    color: #f1f5f9;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
    text-align: justify;
}

.analysis-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.analysis-detail-item {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.analysis-detail-item:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.12);
}

.analysis-detail-item h4 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e2e8f0;
}

.detail-grid {
    display: grid;
    gap: 12px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
}

.detail-label {
    color: #cbd5e1;
    font-size: 0.9rem;
    margin-right: 16px;
    min-width: 100px;
    font-weight: 500;
    opacity: 0.8;
}

.detail-value {
    color: #f1f5f9;
    font-weight: 600;
    text-transform: capitalize;
    flex: 1;
    text-align: right;
    padding-left: 12px;
    font-size: 0.95rem;
}

.color-palette {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding: 20px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    align-items: center;
    justify-content: flex-start;
    min-height: 80px;
    backdrop-filter: blur(5px);
}

.color-swatch {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 
        0 4px 16px rgba(0,0,0,0.3),
        inset 0 1px 0 0 rgba(255,255,255,0.2);
    min-width: 50px;
    min-height: 50px;
    display: inline-block;
    opacity: 1;
    visibility: visible;
    flex-shrink: 0;
    overflow: hidden;
}

.color-swatch:hover {
    transform: translateY(-2px) scale(1.05);
    border-color: rgba(255,255,255,0.3);
    box-shadow: 
        0 6px 20px rgba(0,0,0,0.3),
        inset 0 1px 0 0 rgba(255,255,255,0.2);
}

.analysis-strategy {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.analysis-strategy:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.12);
}

.analysis-strategy h4 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e2e8f0;
}

.strategy-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.strategy-item:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
}

.strategy-label {
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.8;
}

.strategy-value {
    color: #f1f5f9;
    font-weight: 600;
    text-align: right;
    flex: 1;
    margin-left: 16px;
    font-size: 0.95rem;
}

/* Styles pour le plan de présentation */
.plan-message {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    transition: opacity 0.3s ease;
    animation: fadeIn 0.3s ease;
}

.plan-message .message-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.plan-message .message-content {
    max-width: none;
}

.plan-container {
    position: relative;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-radius: 16px;
    padding: 28px;
    margin-top: 12px;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0,0,0,0.3),
        inset 0 1px 0 0 rgba(255,255,255,0.1);
}

.plan-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        oklch(65.6% .241 354.308) 0%,
        oklch(62.7% .265 303.9) 25%,
        oklch(54.6% .245 262.881) 50%,
        oklch(70.7% .165 254.624) 75%,
        oklch(80.9% .105 251.813) 100%
    );
    opacity: 0.02;
    z-index: 0;
}

.plan-container > * {
    position: relative;
    z-index: 1;
}

.plan-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.plan-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #f1f5f9;
}

.plan-subtitle {
    font-size: 1.1rem;
    color: #94a3b8;
    margin: 0 0 16px 0;
    font-style: italic;
}

.plan-pages {
    background: white;
    color: #1f2937;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid rgba(31, 41, 55, 0.1);
}

.plan-slides {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.plan-slide {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    border-left: 4px solid #9ca3af;
    transition: all 0.3s ease;
    opacity: 0;
    animation: slideInPlan 0.5s ease forwards;
}

@keyframes slideInPlan {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.plan-slide:hover {
    background: rgba(255,255,255,0.08);
    transform: translateX(4px);
}

.plan-slide .slide-number {
    background: white;
    color: #1f2937;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(31, 41, 55, 0.1);
}

.slide-info {
    flex: 1;
}

.slide-info .slide-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0 0 6px 0;
}

.slide-info .slide-description {
    font-size: 0.95rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.5;
}

/* Conteneur de contenu généré avec navigation */
.content-generation-container {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-top: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.content-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.content-nav-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-nav-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.content-nav-indicator {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.content-slides-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.content-slides-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.content-slide-item {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 20px;
}

.content-slide-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.content-slide-number {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.content-slide-title {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    color: #f1f5f9;
}

.content-slide-body {
    color: #e2e8f0;
}

.content-field {
    margin-bottom: 16px;
}

.content-field-label {
    color: #22c55e;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.content-field-value {
    color: #f1f5f9;
    line-height: 1.6;
}

.content-bullet-list {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}

.content-bullet-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
}

.content-bullet-icon {
    color: #22c55e;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Input */
.input-container {
    padding: 16px 20px;
    background: #ffffff;
}

/* Nouveau style avec effet rainbow */
.modern-input-wrapper {
    max-width: 100%;
    position: relative;
}

.rainbow-gradient-bg {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 88%;
    height: 40%;
    background: linear-gradient(
        90deg,
        oklch(65.6% .241 354.308) 0%,
        oklch(62.7% .265 303.9) 16.66%,
        oklch(54.6% .245 262.881) 33.33%,
        oklch(62.3% .214 259.815) 50%,
        oklch(70.7% .165 254.624) 66.66%,
        oklch(80.9% .105 251.813) 83.33%,
        oklch(65.6% .241 354.308) 100%
    );
    filter: blur(calc(1.5rem));
    opacity: 1;
    z-index: 0;
}

.modern-input-container {
    position: relative;
    width: 100%;
    border-radius: 12px;
    border: 1px solid hsla(240, 3%, 94%, 0.5);
    background: #f1f3f4;
    transition: all 0.2s duration-200;
    overflow: hidden;
}

.modern-input-container:focus-within {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.05);
}

.input-content-wrapper {
    padding: 6px;
    position: relative;
    z-index: 10;
}

@media (min-width: 768px) {
    .input-content-wrapper {
        padding: 8px;
    }
}

.textarea-wrapper {
    position: relative;
}

.modern-textarea {
    width: 100%;
    min-height: 64px;
    height: 96px;
    resize: none;
    padding: 8px 180px 8px 12px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
    color: #0f1419;
    line-height: 1.5;
    transition: color, box-shadow;
    field-sizing: content;
}

@media (min-width: 768px) {
    .modern-textarea {
        font-size: 14px;
        padding-right: 160px;
    }
}

@media (min-width: 1024px) {
    .modern-textarea {
        padding-right: 176px;
    }
}

.modern-textarea::placeholder {
    color: #64748b;
    font-weight: 400;
}

.input-actions {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (min-width: 768px) {
    .input-actions {
        gap: 6px;
    }
}

.action-button {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
}

.action-button:hover {
    background: #f3f4f6;
    color: #4b5563;
}

.action-button svg {
    width: 20px;
    height: 20px;
}

.send-button {
    width: 36px;
    height: 36px;
    background: #1a1a1a;
    color: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.send-button:hover:not(:disabled) {
    background: #000000;
    transform: translateY(-1px);
}

.send-button:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

.send-button.loading {
    background: #6b7280;
}

/* Zone des fichiers attachés */
.attached-files-zone {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 2px 8px 2px 8px;
    border-top: 1px solid rgba(229, 231, 235, 0.8);
    height: 40px;
    overflow: hidden;
}

.attached-files-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding-top: 0px;
    height: 100%;
    align-items: flex-start;
}

.files-placeholder {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
    color: #64748b;
    font-size: 14px;
    font-weight: 400;
    height: 32px;
}

.files-placeholder-icon {
    width: 16px;
    height: 16px;
    color: #64748b;
}

.attached-file-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 4px 4px 8px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 12px;
    color: #1a1a1a;
    max-width: 150px;
}

.attached-file-icon {
    width: 16px;
    height: 16px;
    color: #6b7280;
    flex-shrink: 0;
}

.attached-file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.remove-file-btn {
    width: 16px;
    height: 16px;
    padding: 2px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remove-file-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.remove-file-btn svg {
    width: 12px;
    height: 12px;
}

/* Panel droit */
.right-panel {
    flex: 1;
    background: #f8f9fb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preview-header {
    background: #ffffff;
    padding: 0 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    height: 56px;
}

.preview-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-title h1 {
    font-size: 18px;
    color: #1f2937;
    font-weight: 300;
    margin: 0;
}

/* Bouton export avec effet rainbow et design moderne */
.export-btn-wrapper {
    position: relative;
    margin-left: 8px;
}

.export-btn-wrapper::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(
        90deg,
        oklch(65.6% .241 354.308) 0%,
        oklch(62.7% .265 303.9) 16.66%,
        oklch(54.6% .245 262.881) 33.33%,
        oklch(62.3% .214 259.815) 50%,
        oklch(70.7% .165 254.624) 66.66%,
        oklch(80.9% .105 251.813) 83.33%,
        oklch(65.6% .241 354.308) 100%
    );
    border-radius: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
    filter: blur(8px);
}

.export-btn-wrapper:hover::before {
    opacity: 0.6;
}

#export-pptx-btn {
    position: relative;
    height: 2.5rem;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    border-radius: 0.5rem;
    color: white;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 
        0 2px 8px 0 rgba(0, 0, 0, 0.1),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    z-index: 1;
}

#export-pptx-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        oklch(65.6% .241 354.308) 0%,
        oklch(62.7% .265 303.9) 25%,
        oklch(54.6% .245 262.881) 50%,
        oklch(70.7% .165 254.624) 75%,
        oklch(80.9% .105 251.813) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

#export-pptx-btn:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 4px 16px 0 rgba(0, 0, 0, 0.15),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(255,255,255,0.2);
}

#export-pptx-btn:hover::before {
    opacity: 0.8;
}

#export-pptx-btn:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

#export-pptx-btn svg {
    height: 1rem;
    width: 1rem;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}

#export-pptx-btn:hover svg {
    filter: drop-shadow(0 0 4px rgba(255,255,255,0.5));
}

#export-pptx-btn span {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

#export-pptx-btn:hover span {
    text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

/* État désactivé avec style cohérent */
.export-btn-wrapper.disabled::before {
    opacity: 0;
}

#export-pptx-btn:disabled {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: 
        0 1px 3px 0 rgba(0, 0, 0, 0.1),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.8);
    border-color: rgba(148, 163, 184, 0.2);
    transform: none;
}

#export-pptx-btn:disabled::before {
    opacity: 0;
}

#export-pptx-btn:disabled:hover {
    transform: none;
    box-shadow: 
        0 1px 3px 0 rgba(0, 0, 0, 0.1),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.8);
    border-color: rgba(148, 163, 184, 0.2);
}

#export-pptx-btn:disabled svg {
    opacity: 0.5;
    filter: none;
}

#export-pptx-btn:disabled span {
    text-shadow: none;
}

#export-pptx-btn:disabled:hover svg,
#export-pptx-btn:disabled:hover span {
    filter: none;
    text-shadow: none;
}

/* Slides preview */
.slides-preview-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    scroll-behavior: smooth;
    background: #f8f9fb;
}

.slide-card {
    width: 100%;
    max-width: 1300px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    animation: slideIn 0.5s ease;
    margin-bottom: 16px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.slide-header {
    background: #f9fafb;
    padding: 8px 8px;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.slide-number {
    background: #1a1a1a;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.slide-title {
    flex: 1;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 0.95rem;
}

.slide-tabs {
    display: flex;
    gap: 8px;
}

.slide-tab {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.825rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.slide-tab:hover {
    background: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.slide-tab.active {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.slide-tab.edit-popup-btn {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    transition: all 0.2s ease;
}

.slide-tab.edit-popup-btn:hover {
    transform: translateY(-1px);
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.slide-view {
    display: none;
    width: 100%;
    height: 100%;
    position: relative;
}

.slide-view.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-code-display {
    background: #f9fafb;
    color: #1a1a1a;
    padding: 16px;
    margin: 0;
    border-radius: 8px;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.4;
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
}

.slide-code-display code {
    color: inherit;
    background: none;
    padding: 0;
    font-family: inherit;
}

.slide-code-display .token.tag {
    color: #dc2626;
}

.slide-code-display .token.attr-name {
    color: #2563eb;
}

.slide-code-display .token.attr-value {
    color: #059669;
}

.slide-code-display .token.string {
    color: #059669;
}

.slide-code-display .token.comment {
    color: #9ca3af;
    font-style: italic;
}

.slide-content {
    padding: 0;
    background: #f8f9fb;
    height: 720px;
    border-radius: 0 0 16px 16px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    border-top: none;
}

.slide-iframe-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.slide-iframe {
    width: 1280px;
    height: 720px;
    border: none;
    background: white;
    display: block;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center;
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 0 0 16px 16px;
    box-shadow: none;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
    color: #9ca3af;
}

.empty-state-text {
    font-size: 1.05rem;
    margin-bottom: 10px;
    color: #4b5563;
    font-weight: 500;
}

.empty-state-subtext {
    font-size: 0.9rem;
    color: #9ca3af;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: white;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Désactivation des media queries pour maintenir la mise à l'échelle fixe */
