/* Mode Édition Styles */

/* Styles pour l'édition en ligne */
.edit-mode-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1rem;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: none;
}

.edit-mode-bar.active {
    display: flex;
}

.edit-mode-content {
    max-width: 6xl;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.edit-mode-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.edit-mode-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.edit-mode-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.edit-mode-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.edit-mode-btn.active {
    background: rgba(255,255,255,0.4);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Styles pour les éléments éditables */
.editable-element {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.editable-element:hover {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 4px;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

.editable-element::after {
    content: '✏️';
    position: absolute;
    top: -8px;
    right: -8px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.editable-element:hover::after {
    opacity: 1;
}

/* Modal d'édition */
.edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.edit-modal.active {
    opacity: 1;
    visibility: visible;
}

.edit-modal-content {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.edit-modal.active .edit-modal-content {
    transform: scale(1);
}

.edit-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.edit-modal-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.edit-modal-close {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.edit-modal-close:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.edit-form-group {
    margin-bottom: 1.5rem;
}

.edit-form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.edit-form-input,
.edit-form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.edit-form-input:focus,
.edit-form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.edit-form-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.edit-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.edit-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.edit-btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.edit-btn-cancel:hover {
    background: #e5e7eb;
}

.edit-btn-save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.edit-btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.edit-btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Notification de sauvegarde */
.save-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.save-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Ajustement du contenu quand la barre d'édition est active */
body.edit-mode-active {
    padding-top: 60px;
}
