/* --- ZONE DE DRAG & DROP --- */
.wptt-dropzone {
    border: 2px dashed #007cba;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    color: #555;
}

.wptt-dropzone.dragover {
    background: #e1f0fa;
    border-color: #005a87;
}

/* --- LIMITES PHP --- */
.wptt-upload-limits {
    font-size: 12px;
    color: #666;
    text-align: center;
    background: #f1f1f1;
    padding: 8px 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.wptt-upload-limits p {
    margin: 0;
}

/* --- BARRE DE PROGRESSION --- */
#wptt-progress-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
}

#wptt-progress-bar {
    width: 0%;
    height: 10px;
    background-color: #4caf50;
    transition: width 0.3s ease;
}

#wptt-status {
    margin-bottom: 15px;
    font-weight: bold;
    color: #007cba;
}

/* --- BOX D'INFORMATION (STATISTIQUES) --- */
.wptt-info-box {
    display: flex;
    justify-content: space-between;
    background: #ffffff;
    border-left: 4px solid #007cba;
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-size: 14px;
    color: #333;
}

.wptt-info-box strong { color: #007cba; }

/* --- ACTIONS GROUPÉES (SÉLECTION) --- */
.wptt-bulk-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f1f1f1;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.wptt-bulk-actions label { cursor: pointer; font-weight: bold; color: #333; }

.wptt-btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
}

.wptt-btn-danger:hover:not(:disabled) { background: #c82333; }
.wptt-btn-danger:disabled { background: #e58c96; cursor: not-allowed; opacity: 0.7; }

/* --- GALERIE & GRILLE --- */
.wptt-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.wptt-gallery-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    aspect-ratio: 1 / 1;
}

.wptt-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.wptt-thumb:hover { transform: scale(1.05); }

/* --- CASES À COCHER --- */
.wptt-item-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    width: 20px;
    height: 20px;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

/* --- BOUTON SUPPRIMER INDIVIDUEL --- */
.wptt-delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    line-height: 25px;
    text-align: center;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
}

.wptt-delete-btn:hover { background: #c82333; }

/* --- LIGHTBOX (PLEIN ÉCRAN) --- */
.wptt-lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
}

.wptt-lightbox img { 
    max-width: 90%; 
    max-height: 90vh; 
    border-radius: 4px; 
    box-shadow: 0 0 20px rgba(0,0,0,0.5); 
}
#wptt-lightbox-close { 
    position: absolute; 
    top: 20px; 
    right: 30px; 
    color: white; 
    font-size: 40px; 
    font-weight: bold; 
    cursor: pointer; 
}

/* --- PAGINATION --- */
.wptt-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.wptt-page-btn {
    padding: 8px 14px;
    border: 1px solid #007cba;
    background: #fff;
    color: #007cba;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.2s;
}

.wptt-page-btn:hover { background: #e1f0fa; }
.wptt-page-btn.active { background: #007cba; color: #fff; cursor: default; }

/* --- IMAGES D'ERREUR HUMOURISTIQUES --- */
.wptt-error-message-container {
    text-align: center;
    margin-bottom: 20px;
}

.wptt-error-img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 250px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.wptt-blink {
    animation: wptt-blink-anim 0.5s ease-in-out 6; 
}

@keyframes wptt-blink-anim {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}