/* static/css/admin-message.css - Styles pour le message admin */

/* Bouton d'édition du message (admin) */
.edit-message-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: 10px;
    transition: background 0.3s;
}

.edit-message-btn:hover {
    background: #2980b9;
}

/* Conteneur du message d'accueil */
.admin-welcome-message {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-welcome-message.empty {
    display: none;
}

/* Modal d'édition */
#admin-message-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

#admin-message-modal .modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#admin-message-modal .modal-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#admin-message-modal .modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

#admin-message-modal .modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #6c757d;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

#admin-message-modal .modal-close:hover {
    color: #343a40;
}

#admin-message-modal .modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Éditeur de message */
#admin-message-editor {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    resize: vertical;
}

#admin-message-editor:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Zone de prévisualisation */
.preview-section {
    margin-top: 20px;
}

.preview-section h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

#admin-message-preview {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    min-height: 100px;
}

/* Boutons du modal */
#admin-message-modal .modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

#admin-message-modal .modal-footer button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s;
}

#preview-admin-message-btn {
    background: #6c757d;
    color: white;
}

#preview-admin-message-btn:hover {
    background: #5a6268;
}

#save-admin-message-btn {
    background: #28a745;
    color: white;
}

#save-admin-message-btn:hover {
    background: #218838;
}

/* Aide pour les balises HTML */
.html-help {
    background: #e7f3ff;
    border-left: 4px solid #3498db;
    padding: 12px;
    margin-top: 15px;
    font-size: 0.85rem;
}

.html-help h4 {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
}

.html-help code {
    background: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

/* Responsive */
@media (max-width: 768px) {
    #admin-message-modal .modal-content {
        width: 95%;
    }
    
    #admin-message-editor {
        min-height: 150px;
        font-size: 0.85rem;
    }
}
