/* presentater-base.css - Variables, reset, layout principal */
/* Version 60 */

/* ==================== VARIABLES CSS ==================== */

:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --dark: #343a40;
    --light: #f8f9fa;
    --border: #dee2e6;
}

/* ==================== RESET ==================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    overflow: hidden;
}

/* ==================== LAYOUT PRINCIPAL ==================== */

.editor-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: white;
}

/* ==================== LIGNE 1: HEADER PRINCIPAL ==================== */

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    background: var(--dark);
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 60px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.header-left h1 {
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0.85;
}

.presentation-name-input {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.9rem;
    width: 15ch;
    min-width: unset;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

/* ==================== LIGNE 2: TOOLBAR DE NAVIGATION ==================== */

.editor-toolbar {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: white;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    align-items: center;
    min-height: 55px;
}

.slide-counter {
    font-weight: 600;
    font-size: 1rem;
    min-width: 80px;
    text-align: center;
    color: #333;
}

/* ==================== MAIN LAYOUT ==================== */

.editor-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ==================== THUMBNAILS PANEL ==================== */

.thumbnails-panel {
    width: 200px;
    background: #f8f9fa;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 1rem 0.5rem;
}

/* ==================== EDITOR CONTENT ==================== */

.editor-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preview-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ==================== SLIDE PREVIEW ==================== */

.slide-preview {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: #e9ecef;
    overflow: auto;
}

/* ==================== CODE SECTION ==================== */

.code-section {
    border-top: 1px solid var(--border);
    background: #f8f9fa;
    padding: 1rem 2rem;
    max-height: 300px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.code-section.hidden {
    display: none;
}

.code-section label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.markdown-editor {
    flex: 1;
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 200px;
}

/* ==================== STATUS MESSAGE ==================== */

.status-message {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--success-color);
    color: white;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 3000;
    max-width: 400px;
}

.status-message.show {
    opacity: 1;
    transform: translateY(0);
}

.status-message.error {
    background: var(--danger-color);
}

.status-message a {
    color: white;
    text-decoration: underline;
}

/* =============================================== */

/* ==================== IMAGES DANS LES SLIDES ==================== */

/* Images générales */
.slide img {
    max-width: 100%;
    max-height: 400px;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 1rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Images dans les colonnes (2 ou 3) */
.slide-columns img {
    max-width: 100%;
    max-height: 250px;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
}

/* Images dans les blocs (4) */
.slide-blocks img {
    max-width: 100%;
    max-height: 180px;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
}



/* console.log('✅ presentation_editor_base.css chargé'); */


/* ==================== CHAT SIDEBAR IA (ajoutee 2026-08-31) ==================== */
.editor-main > .ai-chat-sidebar { flex: none; }
#btnAIChatSidebar.active { background: #89b4fa; color: #1e1e2e; border-color: #89b4fa; }
