/**
 * Imagilire Studio - Styles du modal d'export PDF
 * Modal pour choisir le type d'export (syllabé, non syllabé, ou les deux)
 */

/* Overlay du modal */
.pdf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(54, 177, 179, 0.95) 0%, 
        rgba(247, 183, 49, 0.95) 100%);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pdf-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Container principal du modal */
.pdf-modal {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(54, 177, 179, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9) translateY(-20px);
    transition: all 0.3s ease;
    border: 2px solid #36B1B3;
}

.pdf-modal-overlay.active .pdf-modal {
    transform: scale(1) translateY(0);
}

/* En-tête du modal */
.pdf-modal-header {
    background: linear-gradient(135deg, #36B1B3 0%, #2a9496 100%);
    padding: 1.5rem;
    border-bottom: 1px solid #e0e5ec;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pdf-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pdf-modal-title i {
    color: #F7B731;
}

.pdf-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Corps du modal */
.pdf-modal-body {
    padding: 2rem;
    background: #f5f7fa;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* Information pour mobile */
.pdf-modal-mobile-info {
    background: rgba(54, 177, 179, 0.1);
    border: 1px solid rgba(54, 177, 179, 0.3);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.pdf-modal-mobile-info i {
    color: #36B1B3;
    font-size: 1.25rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.pdf-modal-mobile-info p {
    margin: 0;
    color: #333;
    font-size: 0.9rem;
    line-height: 1.4;
}

.pdf-modal-description {
    margin: 0 0 1.5rem 0;
    color: #555555;
    line-height: 1.5;
}

/* Options d'export */
.pdf-export-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pdf-export-option {
    border: 2px solid #e0e5ec;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    position: relative;
}

.pdf-export-option:hover {
    border-color: #36B1B3;
    background: #f8fafb;
    box-shadow: 0 2px 8px rgba(54, 177, 179, 0.1);
}

.pdf-export-option.selected {
    border-color: #36B1B3;
    background: rgba(54, 177, 179, 0.05);
    box-shadow: 0 4px 12px rgba(54, 177, 179, 0.15);
}

.pdf-export-option-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.pdf-export-option-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #e0e5ec;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    transition: all 0.2s ease;
}

.pdf-export-option.selected .pdf-export-option-radio {
    border-color: #36B1B3;
}

.pdf-export-option.selected .pdf-export-option-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #36B1B3;
    border-radius: 50%;
}

.pdf-export-option-info {
    flex: 1;
}

.pdf-export-option-title {
    font-weight: 600;
    color: #333333;
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
}

.pdf-export-option-description {
    color: #555555;
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 0;
}

.pdf-export-option-icon {
    color: #F7B731;
    font-size: 1.25rem;
    margin-top: 1px;
}

/* Preview des options */
.pdf-export-preview {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 6px;
    border-left: 4px solid #36B1B3;
    border: 1px solid #e0e5ec;
}

.pdf-export-preview-title {
    font-weight: 600;
    color: #333333;
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pdf-export-preview-title i {
    color: #F7B731;
}

.pdf-export-preview-content {
    color: #555555;
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0;
}

/* Pied du modal */
.pdf-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e0e5ec;
    background: #ffffff;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-shrink: 0;
}

.pdf-modal-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.875rem;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pdf-modal-btn-secondary {
    background: #ffffff;
    color: #555555;
    border: 1px solid #e0e5ec;
}

.pdf-modal-btn-secondary:hover {
    background: #f5f7fa;
    color: #333333;
    border-color: #36B1B3;
}

.pdf-modal-btn-primary {
    background: linear-gradient(135deg, #36B1B3 0%, #2a9496 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(54, 177, 179, 0.3);
}

.pdf-modal-btn-primary:hover {
    background: linear-gradient(135deg, #2a9496 0%, #1f7a7c 100%);
    box-shadow: 0 4px 12px rgba(54, 177, 179, 0.4);
    transform: translateY(-1px);
}

.pdf-modal-btn-primary:disabled {
    background: #777777;
    cursor: not-allowed;
    opacity: 0.6;
}

.pdf-modal-btn.processing {
    pointer-events: none;
}

.pdf-modal-btn.processing i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* États responsifs */
@media (max-width: 768px) {
    .pdf-modal-overlay {
        padding: 1rem;
    }
    
    .pdf-modal {
        width: 100%;
        max-height: 85vh;
        margin: 0;
    }
    
    .pdf-modal-header {
        padding: 1rem;
    }
    
    .pdf-modal-body {
        padding: 1.5rem;
    }
    
    .pdf-modal-footer {
        padding: 1rem;
        flex-direction: column;
    }
    
    .pdf-modal-btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .pdf-export-option-content {
        gap: 0.5rem;
    }
    
    .pdf-export-option {
        padding: 0.75rem;
    }
}

/* États responsifs pour très petits écrans (smartphones en mode portrait) */
@media (max-width: 480px) {
    .pdf-modal-overlay {
        padding: 0.5rem;
    }
    
    .pdf-modal {
        max-height: 80vh;
    }
    
    .pdf-modal-header {
        padding: 0.75rem;
    }
    
    .pdf-modal-body {
        padding: 1rem;
    }
    
    .pdf-modal-footer {
        padding: 0.75rem;
    }
    
    .pdf-export-option {
        padding: 0.5rem;
    }
    
    .pdf-export-option-title {
        font-size: 0.9rem;
    }
    
    .pdf-export-option-description {
        font-size: 0.8rem;
    }
}

/* Animation d'entrée */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.pdf-modal-overlay.active .pdf-modal {
    animation: modalSlideIn 0.3s ease-out;
}

/* Variables CSS pour la cohérence */
:root {
    --pdf-modal-z-index: 9999;
    --pdf-modal-border-radius: 12px;
    --pdf-modal-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
} 