/* 🎨 STYLES POUR L'ÉDITEUR DE SLIDES */
/* Interface popup moderne pour l'édition des diapositives */

/* POPUP EDITOR STYLES */
.slide-editor-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
}

.slide-editor-popup.active {
    display: flex;
    opacity: 1;
}

.slide-editor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.slide-editor-container {
    position: relative;
    width: 95vw;
    height: 95vh;
    max-width: 1800px;
    margin: auto;
    background: #1a1a24;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* HEADER */
.slide-editor-header {
    background: #2a2a3e;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 80px;
}

.editor-title h2 {
    color: #f1f5f9;
    font-size: 1.4rem;
    margin: 0 0 4px 0;
}

.slide-indicator {
    color: #94a3b8;
    font-size: 0.9rem;
}

.editor-toolbar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
}

.toolbar-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.toolbar-separator {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.2);
}

.editor-tool-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #94a3b8;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 110px;
}

.editor-tool-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.editor-tool-btn.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: #6366f1;
    color: white;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.editor-actions {
    display: flex;
    gap: 12px;
}

.editor-btn {
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    font-size: 0.95rem;
}

.editor-btn.secondary {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.editor-btn.secondary:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

.editor-btn.primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: 1px solid #22c55e;
}

.editor-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3);
}

/* ZONE PRINCIPALE */
.slide-editor-main {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* CANVAS DE LA SLIDE */
.slide-editor-canvas {
    flex: 1;
    background: #0f0f17;
    display: flex;
    flex-direction: column;
    position: relative;
}

.canvas-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
}

.editor-iframe {
    width: 1280px;
    height: 720px;
    border: 3px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    background: white;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    transform-origin: center center;
}

.canvas-tools {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(26, 26, 36, 0.9);
    border-radius: 12px;
    padding: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    background: rgba(26, 26, 36, 0.95);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.zoom-controls button {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #e2e8f0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    position: relative;
}

.zoom-controls button:hover {
    background: rgba(99, 102, 241, 0.4);
    border-color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.zoom-controls button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
}

#zoom-level {
    color: #f1f5f9;
    font-size: 1rem;
    font-weight: 700;
    min-width: 60px;
    text-align: center;
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

/* PANNEAU PROPRIÉTÉS */
.slide-editor-properties {
    width: 320px;
    background: #16161f;
    border-left: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
}

.properties-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: #1a1a24;
}

.properties-header h3 {
    color: #f1f5f9;
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.element-info {
    color: #94a3b8;
    font-size: 0.9rem;
}

.properties-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.no-selection {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.no-selection-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* STYLES POUR LES PROPRIÉTÉS */
.property-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.property-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.property-section h4 {
    color: #e2e8f0;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.property-group {
    margin-bottom: 16px;
}

.property-group label {
    display: block;
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 6px;
    font-weight: 500;
}

.property-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.property-input:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.property-input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.property-input[type="color"] {
    width: 60px;
    height: 40px;
    padding: 4px;
    cursor: pointer;
}

.property-btn {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.property-btn.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.property-btn.danger:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.property-input textarea {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.property-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
}

.property-btn.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.property-btn.danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    transform: translateY(-2px);
}

/* STYLES D'ÉDITION DANS L'IFRAME */
.editable-element {
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.editable-element:hover {
    outline: 2px dashed rgba(99, 102, 241, 0.5) !important;
    outline-offset: 4px !important;
}

.editable-element.selected {
    outline: 3px solid #6366f1 !important;
    outline-offset: 4px !important;
    background: rgba(99, 102, 241, 0.05) !important;
}

.editable-element[contenteditable="true"] {
    cursor: text !important;
}

.editable-element[contenteditable="true"]:focus {
    outline: 3px solid #22c55e !important;
    outline-offset: 4px !important;
    background: rgba(34, 197, 94, 0.05) !important;
}

/* ANIMATIONS */
@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-editor-container {
    animation: slideInUp 0.4s ease-out;
}

/* RESPONSIVE */
@media (max-width: 1400px) {
    .slide-editor-container {
        width: 98vw;
        height: 98vh;
    }
    
    .editor-iframe {
        transform: scale(0.8);
    }
    
    .slide-editor-properties {
        width: 280px;
    }
}

/* TOOLTIP DE ZOOM */
.zoom-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    z-index: 99999;
    pointer-events: none;
    backdrop-filter: blur(10px);
}

/* ANIMATIONS SUPPLÉMENTAIRES */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
} 