/* Styles personnalisés pour l'administration ECOLUX */

/* Amélioration des fieldsets */
.fieldset {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    background: #fafafa;
}

.fieldset h2 {
    background: linear-gradient(135deg, #1e1810, #2d2318);
    color: #d4af37;
    padding: 12px 20px;
    margin: 0;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    border-bottom: 2px solid #d4af37;
}

.fieldset .form-row {
    padding: 15px 20px;
}

/* Amélioration des inlines */
.inline-group {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin: 20px 0;
    background: #fff;
}

.inline-group h2 {
    background: linear-gradient(135deg, #d4af37, #c7a876);
    color: #1e1810;
    padding: 12px 20px;
    margin: 0;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
}

.inline-related {
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    margin: 10px;
    padding: 15px;
    background: #fafafa;
    position: relative;
}

.inline-related h3 {
    background: #f8f8f8;
    color: #333;
    padding: 8px 12px;
    margin: -15px -15px 15px -15px;
    border-radius: 6px 6px 0 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    font-weight: 600;
}

/* Styles pour les aperçus d'images et vidéos */
.image-preview, .video-preview {
    text-align: center;
    margin: 15px 0;
    padding: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.image-preview img, .video-preview video {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    max-width: 100%;
    height: auto;
}

/* Amélioration des boutons */
.button, input[type=submit], input[type=button], .submit-row input {
    background: linear-gradient(135deg, #d4af37, #c7a876);
    border: none;
    color: #1e1810;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.button:hover, input[type=submit]:hover, input[type=button]:hover {
    background: linear-gradient(135deg, #c7a876, #b8965f);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

/* Amélioration des champs de formulaire */
.form-row input[type=text], 
.form-row input[type=email], 
.form-row input[type=url], 
.form-row input[type=number], 
.form-row textarea, 
.form-row select {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    transition: border-color 0.3s ease;
}

.form-row input:focus, 
.form-row textarea:focus, 
.form-row select:focus {
    border-color: #d4af37;
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* Amélioration de la navigation */
#header {
    background: linear-gradient(135deg, #1e1810, #2d2318);
    border-bottom: 3px solid #d4af37;
}

#branding h1 {
    color: #d4af37;
    font-weight: 700;
}

#user-tools a {
    color: #d4af37;
}

#user-tools a:hover {
    color: #fff;
}

/* Amélioration des tables */
.results table {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.results th {
    background: linear-gradient(135deg, #f8f8f8, #f0f0f0);
    color: #333;
    font-weight: 600;
    border-bottom: 2px solid #d4af37;
}

.results tr:nth-child(even) {
    background: #fafafa;
}

.results tr:hover {
    background: #f0f8ff;
}

/* Messages et alertes */
.messagelist .info {
    background: linear-gradient(135deg, #d4af37, #c7a876);
    color: #1e1810;
    border-radius: 6px;
    border: none;
}

.messagelist .success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border-radius: 6px;
    border: none;
}

.messagelist .error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    border-radius: 6px;
    border: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .fieldset .form-row {
        padding: 10px 15px;
    }
    
    .inline-related {
        margin: 5px;
        padding: 10px;
    }
    
    .image-preview, .video-preview {
        padding: 10px;
    }
}

/* Amélioration du drag and drop pour l'ordre */
.sortable {
    cursor: move;
}

.sortable:hover {
    background: #f0f8ff;
}

/* Styles pour les champs d'ordre */
input[name*="order"] {
    width: 60px !important;
    text-align: center;
    background: #f8f8f8;
    border: 2px solid #d4af37;
    font-weight: bold;
}

/* Animation pour les éléments ajoutés dynamiquement */
.inline-related.newly-added {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
