/* Styles pour l'administration des actualités */

/* Prévisualisation des images */
.image-preview {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.image-preview:hover {
    border-color: #0d6efd;
    background-color: #e7f1ff;
}

.image-preview img {
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.image-preview img:hover {
    transform: scale(1.05);
}

/* Badge pour photo principale */
.badge-main-photo {
    background: linear-gradient(45deg, #0d6efd, #6610f2);
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

/* Conteneur de photos supplémentaires */
.additional-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.photo-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.photo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.photo-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.photo-item .badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.7rem;
}

/* Styles pour TinyMCE */
.tox-tinymce {
    border-radius: 6px !important;
    border: 1px solid #dee2e6 !important;
}

.tox-toolbar {
    background: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6 !important;
}

/* Indicateur de caractères restants */
.char-counter {
    font-size: 0.875rem;
    color: #6c757d;
}

.char-counter.warning {
    color: #fd7e14;
    font-weight: 500;
}

.char-counter.danger {
    color: #dc3545;
    font-weight: 600;
}

/* Animation de chargement pour les uploads */
.upload-progress {
    position: relative;
    overflow: hidden;
}

.upload-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(13, 110, 253, 0.3), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Styles pour les alertes de validation */
.validation-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.validation-success {
    border-color: #198754 !important;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25) !important;
}

/* Amélioration des cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Boutons personnalisés */
.btn-primary {
    background: linear-gradient(45deg, #0d6efd, #6610f2);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0b5ed7, #5a0fc8);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Responsive design */
@media (max-width: 768px) {
    .additional-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .photo-item img {
        height: 100px;
    }
    
    .image-preview img {
        max-width: 150px;
        max-height: 100px;
    }
}

/* Styles pour les tooltips */
.tooltip-info {
    cursor: help;
    color: #6c757d;
    margin-left: 5px;
}

.tooltip-info:hover {
    color: #0d6efd;
}

/* Animation pour les éléments qui apparaissent */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Styles pour le drag & drop (futur) */
.dropzone {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dropzone.dragover {
    border-color: #0d6efd;
    background-color: #e7f1ff;
}

.dropzone-text {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.dropzone-subtext {
    color: #adb5bd;
    font-size: 0.9rem;
}